CN109039952A - A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication - Google Patents
A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication Download PDFInfo
- Publication number
- CN109039952A CN109039952A CN201810700058.5A CN201810700058A CN109039952A CN 109039952 A CN109039952 A CN 109039952A CN 201810700058 A CN201810700058 A CN 201810700058A CN 109039952 A CN109039952 A CN 109039952A
- Authority
- CN
- China
- Prior art keywords
- server
- client
- binder
- communications
- interprocess communication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/622—Queue service order
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
- Telephonic Communication Services (AREA)
Abstract
This application discloses a kind of mobile terminal and its method for limiting of interprocess communication, storage medium, the method for limiting of the interprocess communication includes: to obtain number of communications of the client before sending binder request with server-side when client sends binder request to server-side;Judge whether number of communications is greater than given threshold;If so, binder to be requested to the end that waiting list is added;Wherein, the binder request of client head end of preferential answering waiting list during interprocess communication.By the above-mentioned means, the busy extent of server-side can be reduced, guarantee the fluency of system.
Description
Technical field
This application involves technical field of mobile terminals, more particularly to a kind of mobile terminal and its limitation of interprocess communication
Method, storage medium.
Background technique
It, generally can be using between process using being frequently necessary to carry out data transmission between service in Android operation system
The mode of communication, for example, can be transmitted by Binder mechanism, to obtain the data of other side.
During being communicated using Binder mechanism, a usual server-side can be led to multiple client
Letter, can aggravate the burden of server-side in this way, when interprocess communication is excessively busy, will affect the fluency of service or system.
Summary of the invention
The technical solution that the application uses is: providing a kind of method for limiting of interprocess communication, the method for limiting packet
Include: client to server-side send binder request when, obtain client send binder request before with server-side
Number of communications;Judge whether number of communications is greater than given threshold;If so, binder to be requested to the end that waiting list is added;Its
In, client responds the binder request in waiting list after set period of time.
Another technical solution that the application uses is: providing a kind of mobile terminal, which includes: acquisition mould
Block, for client to server-side send binder request when, obtain client send binder request before with service
The number of communications at end;Judgment module, for judging whether number of communications is greater than given threshold;Module is waited, for judging mould
The judging result of block is that binder is requested to the end that waiting list is added when being;Wherein, client is in interprocess communication process
The binder of the head end of middle preferential answering waiting list is requested.
The application use another technical solution be: a kind of mobile terminal is provided, the mobile terminal include processor and
Memory, wherein memory is for storing computer program, and computer program is when being executed by processor, for realizing as above
The method stated.
Another technical solution that the application uses is: providing a kind of computer storage medium, the computer storage medium
For storing computer program, computer program is when being executed by processor, for realizing such as above-mentioned method.
Be in contrast to the prior art, the method for limiting of interprocess communication provided by the present application include: server-side with
During client is based on the progress interprocess communication of binder mechanism, the number of communications between server-side and client is obtained,
And system is guaranteed so as to reduce the busy extent of server-side by the number of communications between limitation client and server-side
Fluency.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.Wherein:
Fig. 1 is the flow diagram of the method for limiting first embodiment of interprocess communication provided by the present application;
Fig. 2 is the schematic illustration of interprocess communication;
Fig. 3 is the schematic illustration of Binder communication mechanism;
Fig. 4 is the interaction schematic diagram of client and server-side;
Fig. 5 is the flow diagram of the method for limiting second embodiment of interprocess communication provided by the present application;
Fig. 6 be client, server-side, waiting list interaction schematic diagram;
Fig. 7 be customer end A, customer end B, server-side, waiting list interaction schematic diagram;
Fig. 8 is the flow diagram of the method for limiting 3rd embodiment of interprocess communication provided by the present application;
Fig. 9 is the flow diagram of the method for limiting fourth embodiment of interprocess communication provided by the present application;
Figure 10 is the flow diagram of the 5th embodiment of method for limiting of interprocess communication provided by the present application;
Figure 11 is the flow diagram of the method for limiting sixth embodiment of interprocess communication provided by the present application;
Figure 12 is the structural schematic diagram of one embodiment of mobile terminal provided by the present application;
Figure 13 is the structural schematic diagram of another embodiment of mobile terminal provided by the present application;
Figure 14 is the structural schematic diagram of one embodiment of computer storage medium provided by the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description.It is understood that specific embodiment described herein is only used for explaining the application, rather than to the limit of the application
It is fixed.It also should be noted that illustrating only part relevant to the application for ease of description, in attached drawing and not all knot
Structure.Based on the embodiment in the application, obtained by those of ordinary skill in the art without making creative efforts
Every other embodiment, shall fall in the protection scope of this application.
Term " first ", " second " in the application etc. be for distinguishing different objects, rather than it is specific suitable for describing
Sequence.In addition, term " includes " and " having " and their any deformations, it is intended that cover and non-exclusive include.Such as comprising
The process, method, system, product or equipment of a series of steps or units are not limited to listed step or unit, and
It is optionally further comprising the step of not listing or unit, or optionally further comprising for these process, methods, product or equipment
Intrinsic other step or units.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments
It is contained in embodiments herein.The phrase, which occurs, in each position in the description might not each mean identical implementation
Example, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art are explicitly and implicitly
Understand, embodiment described herein can be combined with other embodiments.
Refering to fig. 1, Fig. 1 is the flow diagram of the method for limiting first embodiment of interprocess communication provided by the present application,
This method comprises:
Step 11: when client sends binder request to server-side, obtaining client in transmission binder and request it
The preceding number of communications with server-side.
Binder is most heavy in a kind of mode and android system of Inter-Process Communication in android system (IPC)
One of characteristic wanted.Four big component Activity (workflow) in Android, Service (service), Broadcast (broadcast
Receiver), ContentProvider (content provider), different App (application program) etc. operates in different processes
In, it is the bridge of these Inter-Process Communications.As its name " adhesive ", various components in system have been adhered to one by it
It rises, is the bridge of various components.
As shown in Fig. 2, Fig. 2 is the schematic illustration of interprocess communication, the process of each Android can only be operated in certainly
The virtual address space that own process is possessed.For example, the virtual address space of a corresponding 4GB, wherein 3GB is user's sky
Between, 1GB is kernel spacing, and the size of certain kernel spacing can be adjusted by parameter configuration.It is different for user's space
It cannot be shared each other between process, and kernel spacing is sharable.Client process is to Server process communication, just
It is just to be worked using kernel memory headroom sharable between process to complete bottom communication, the end Client and the end Server process
Often using the methods of ioctl (function being managed in a kind of device driver to the channel I/O of equipment) with kernel sky
Between driving interact.
Fig. 3 is further regarded to, Fig. 3 is the schematic illustration of Binder communication mechanism, and Binder communication uses C/S framework,
For component visual angle, comprising Client (client), Server (server-side), ServiceManager (service management) and
Binder driving, wherein ServiceManager is for the various services in management system.
Wherein, Client process is the process using service;Server process is the process for the service that provides;
The effect of ServiceManager process is that the Binder name of character style is converted in Client to draw the Binder
With enabling Client to obtain reference to Binder entity in Server by Binder name;Binder driving is responsible for
Between process Binder communicate foundation, transmitting of the Binder between process, Binder reference count management, data packet into
A series of basic-level supports such as transmitting and interaction between journey.
Mainly include following three processes in the communication process based on binder mechanism:
Registration service (addService): Server process will first register Service to ServiceManager.The mistake
Journey: Server is client, and ServiceManager is server-side.
Obtain service (getService):, must be first to ServiceManager before Client process uses some Service
It is middle to obtain corresponding Service.The process: Client is client, and ServiceManager is server-side.
Use service: Client is established and the Server process communication where Service according to obtained Service information
Access, then can directly be interacted with Service.The process: client is client, and server is server-side.
It should be understood that Client in Fig. 3, interaction is all that dotted line indicates between Server, Service Manager,
It is since they are not directly interactive each other, all by being interacted with Binder driving, to realize IPC
Communication mode.Wherein Binder driving is located at kernel spacing, and Client, Server, Service Manager are located at user's sky
Between.Binder driving and ServiceManager can regard the architecture of Android platform as, and Client and Server
It is the application layer of Android, developer only needs the customized end realization client, Server, by the basic platform of Android
Framework can directly carry out IPC communication.
Based on the principle of above-mentioned binder mechanism, it is known that client and server-side can be any two process, it can
To be application, it is also possible to service, for example, it may be being also possible to using the communication between application using between service
Communication.
In addition, in an intelligent terminal, multiple applications may obtain same service simultaneously, so, a server-side may be same
When and multiple client between carry out interprocess communication, in this case, due to the number of communications of server-side is more, thread use
It measures that larger, communication is excessively frequent, will cause the Caton of system, the present embodiment mainly passes through one client of acquisition and a clothes
Number of communications between business end measures influence caused by the busy extent of the client to server-side, thus to the client
It is limited.
Optionally, in the present embodiment, which can be server of the system.
It optionally, can be by the way of accumulative, specifically when obtaining the number of communications between client and server-side
Ground, as shown in figure 4, Fig. 4 is the interaction schematic diagram of client and server-side, it is main in the communication process of client and server-side
It to include three processes, client initiates communication request, the communication request that server-side customer in response end is initiated, client to server-side
Data interaction is carried out between end and server-side.
Wherein, by above-mentioned process, just at last therefore a traffic carried process can pass through above three node
In any one add up number of communications.
Optionally, step 11 can be with specifically: when client initiates communication request to server-side, adds up number of communications.
Optionally, step 11 can be with specifically: when the communication request initiated at server-side customer in response end, adds up communication time
Number.
Optionally, step 11 can be with specifically: when the interprocess communication of client and server-side is completed, adds up communication time
Number.
In a specific embodiment, server-side may be because that the reasons such as busy do not respond to the communication request of client,
Also or client can not completed to communicate due to collapse etc. with server-side, in this embodiment it is possible in visitor
When the interprocess communication of family end and server-side is completed, then accumulative number of communications.It can also add up to lead to statistics to avoid missing in this way
Number of communications is excessive.
It should be understood that due to having added up number of communications, so when client sends binder request to server-side, directly
Subsequent judgement can be carried out by accumulative number of communications by connecing.It is worth noting that, number of communications here is just for same
Communication between one client and same server-side.
Step 12: judging whether number of communications is greater than given threshold.
When the judging result of step 12 is to be, step 13 is executed.
When the judging result of step 12 is no, the binder request that server-side customer in response end is sent carries out client
Interprocess communication between server-side.
Wherein, given threshold, which can be, is rule of thumb arranged, for example, by obtain in a period of time multiple client with
The average value of number of communications between server-side, when number of communications reaches some critical value, system be easy to appear it is not smooth, collapse
Phenomena such as bursting.
Step 13: binder is requested to the end that waiting list is added;Wherein, client is after set period of time to waiting
Binder request in queue is responded.
Wherein, the binder request in waiting list (pending) can't be responded by server-side immediately, be equivalent to foundation
The mechanism of one buffering, can over time or server-side is not busy when responded.
It is illustrated below by a specific example, is illustrated in the example according to chronological order:
1, the first process of application program A (client) and system service (server-side) carry out binder communication, add up 1
It is secondary;
2, the second process of application program A and system service carry out binder communication, add up 2 times;
3, the second process of application program A and system service carry out binder communication, add up 3 times;
4, the third process of application program A and system service carry out binder communication, add up 4 times;
5, the first process of application program A and system service carry out binder communication, add up 5 times.
In the above example, the number of communications carried out is 5 times, if preset given threshold is also 5 times, then tying
Step 11 is closed, if client sends binder request to server-side again, just requests the binder waiting list is added.
It should be understood that client and server-side in above-described embodiment can be with self-definings, therefore aforesaid way
It can be adapted for any application or service, its number of communications be monitored.
It is different from the prior art, the method for limiting of interprocess communication provided in this embodiment is by obtaining server-side and client
Number of communications between end, so that the busy extent to server-side is monitored, and using the result of monitoring to number of communications compared with
More clients are limited.By the above-mentioned means, the busy extent of server-side on the one hand can be quickly and effectively got, it is right
The optimization of system provides data and supports, on the other hand can be good at limiting number of communications from the angle of client, effectively
The burden for reducing server-side, reduces the busy extent of server-side, ensure that the process of system.
It is the flow diagram of the method for limiting second embodiment of interprocess communication provided by the present application refering to Fig. 5, Fig. 5,
This method comprises:
Step 51: in current time period, when client, which sends binder to server-side, requests, adding up communication time
Number.
Optionally, in another embodiment, step 51 is it may also is that in current time period, whenever client is to clothes
When business end sends binder request, corresponding client is marked.In subsequent operation, it is only necessary to pass through judge mark
Whether quantity is greater than given threshold.
Step 52: when client sends binder request to server-side, obtaining the accumulative communication time of current time period
Number.
It is worth noting that, number of communications here is the number of communications of same client Yu the server-side.
Wherein, binder request is that current time is sent, and the current time is in above-mentioned current time period.
Optionally, in the communication process of client and server-side, multiple time cycles can be divided into, when general each
Between the time span in period be equal.Further, number of communications can be added up within each time cycle, and in week
At the end of phase, accumulative number of communications is zeroed out, is added up again since next cycle.
Step 53: judging whether accumulative number of communications is greater than given threshold.
Step 54: binder is requested to the end that waiting list is added;Wherein, client is after set period of time to waiting
Binder request in queue is responded.
As shown in fig. 6, Fig. 6 be client, server-side, waiting list interaction schematic diagram, it is assumed that setting in each period
Number of communications threshold value be 10 times, then, in N time period, client with server-side is every is once communicated, with regard to adding up
Once.
In N time period, which to server-side sends the 11st binder request, and (i.e. communication in Fig. 6 is asked
It asks 11), getting number of communications in this period is 10 times, greater than the threshold value of setting, is waited then the binder is requested to be added
Queue.In addition, accumulative number of communications is reset at the end of this period.
Binder request when the N+1 time cycle starts, in server-side priority processing waiting list.
As shown in fig. 7, Fig. 7 be customer end A, customer end B, server-side, waiting list interaction schematic diagram, in customer end A
During being communicated simultaneously with server-side with customer end B, it is assumed that the threshold value of the setting of two kinds of clients is all 10 times.
In N time period, which to server-side sends the 11st binder request, and (i.e. communication in Fig. 6 is asked
It asks 11), getting number of communications in this period is 10 times, greater than the threshold value of setting, is waited then the binder is requested to be added
Queue.
But within this period, the number of communications between customer end B and server-side is also not up to 10 times, so, even if objective
The binder request that family end A is sent is added into waiting list, but customer end B still can be communicated between server-side, i.e.,
The binder request that customer end B is sent to server-side is added without waiting list.
In addition, accumulative number of communications is reset at the end of this period.
Binder request when the N+1 time cycle starts, in server-side priority processing waiting list.
Optionally, when next period starts, it is used as client to service the binder request of head end in waiting list
The binder request that end is sent, return step 51.
It is the flow diagram of the method for limiting 3rd embodiment of interprocess communication provided by the present application refering to Fig. 8, Fig. 8,
This method comprises:
Step 81: when client sends binder request to server-side, obtaining client in transmission binder and request it
The preceding number of communications with server-side.
Step 82: judging whether server-side meets preset condition.
Wherein, when the judging result of step 82, which is, is, step 83 is executed.
Step 83: judging whether number of communications is greater than given threshold.
Step 84: binder is requested to the end that waiting list is added;Wherein, client is excellent during interprocess communication
First respond the binder request of the head end of waiting list.
It is before sending binder request with the purpose of the number of communications of server-side it should be understood that obtaining client
Monitoring service end busy extent, it is thus possible to increase other Rule of judgment judges whether server-side is busy.
Optionally, the preset condition in step 82 is that the quantity of the available thread of server-side is less than given threshold.It can manage
Solution, the communication between two processes generally will use multiple threads.For example, android system provides SystemServer
Process can at most create 32 Binder threads and communicate for inter-process data;SurfaceFlinger process can at most be created
4 Binder threads are built to communicate for inter-process data;Program application process can at most create 8 Binder threads for into
Data communication between journey.
Therefore, can judge whether number of communications is greater than again when the thread usage quantity of server-side is met the requirements to set
Determine threshold value, for example, a server-side shares 32 threads, wherein 16 threads are used, available thread is 16 remaining, that is, works as quilt
Start to judge whether number of communications is greater than given threshold when being greater than half using thread.
Certainly, preset condition can also be the occupancy of CPU, while the quantity of the client communicated with same server-side,
Communication frequency etc. will not enumerate here.
It should be understood that the present embodiment is then to obtain whether busy other in detection service end by counting number of communications
Index, using number of communications as a base values.The busy extent that can judge server-side by multiple condition in this way, into
And the communication of client is limited, it is advantageously implemented the fluency of mobile terminal, additionally it is possible to prevent client from accidentally being disabled, cause
User's is inconvenient for use.
It is monitored below by time span of several embodiments to each stage in communication process, to judge to service
The mode of the busy extent at end is introduced.
It is the flow diagram of the method for limiting fourth embodiment of interprocess communication provided by the present application refering to Fig. 9, Fig. 9,
This method comprises:
Step 91: when client initiates communication request to server-side, recording first time point.
Step 92: at server-side customer in response end when the communication request of initiation, recording for the second time point.
Step 93: being based on first time point and the second time point, obtain service latency.
Here service latency is the period between first time point and the second time point.
Step 94: service latency is saved, to be monitored based on service latency to the communication of server-side.
0, Figure 10 is the process signal of the 5th embodiment of method for limiting of interprocess communication provided by the present application refering to fig. 1
Figure, this method comprises:
Step 101: at server-side customer in response end when the communication request of initiation, recording for the second time point.
Step 102: when the interprocess communication of client and server-side is completed, recording third time point.
Step 103: being based on the second time point and third time point, obtain the communication service time.
Here the communication service time is the period between the second time point and third time point.
Step 104: the communication service time is saved, to be monitored based on the communication service time to the communication of server-side.
1, Figure 11 is the process signal of the method for limiting sixth embodiment of interprocess communication provided by the present application refering to fig. 1
Figure, this method comprises:
Step 111: when client initiates communication request to server-side, recording first time point.
Step 112: when the interprocess communication of client and server-side is completed, recording third time point.
Step 113: being based on first time point and third time point, obtain interprocess communication total time.
Here interprocess communication total time is the period between first time point and third time point.
Step 114: saving and obtain interprocess communication total time, to be based on obtaining interprocess communication total time to server-side
Communication be monitored.
The embodiment of above-mentioned Fig. 9-Figure 11 can be combined with above-mentioned other embodiments to be implemented, different from three
Aspect gets the duration of communication, including service waiting time, communication service duration and total duration.
Wherein, the average value or total duration of specific available each duration.It is as shown in the table:
Number of communications | Service waiting time | Communication service duration | Interprocess communication total duration |
1 | a1 | a2 | a3 |
2 | b1 | b2 | b3 |
3 | c1 | c2 | c3 |
For example, the average value of service waiting time is exactly the average value of a1, b1 and c1;The average value of communication service duration is just
It is the average value of a2, b2 and c2;Interprocess communication total duration is exactly the average value of a3, b3 and c3.
Optionally, above-mentioned data can also be counted using other statistical statistical methods, such as variance.
In addition, to above-mentioned number of communications, service waiting time, communication service duration and interprocess communication total duration into
When row statistics and monitoring, histogram can be drawn and intuitively shown, the busy of system is further got using histogram
Degree guarantees the fluency of system so as to be optimized to system by the subsequent restriction to client.
2, Figure 12 is the structural schematic diagram of one embodiment of mobile terminal provided by the present application, the mobile terminal 120 refering to fig. 1
Including obtaining module 121, judgment module 122 and waiting module 123.
Wherein, module 121 is obtained to be used to obtain client when client sends binder request to server-side and send
Number of communications before binder request with server-side;Judgment module 122 is for judging whether number of communications is greater than given threshold;
Module 123 is waited to be used to that binder to be requested to the end that waiting list is added when the judging result of judgment module 122 is to be;
Wherein, the binder request of client head end of preferential answering waiting list during interprocess communication.
Optionally, it obtains module 121 to be specifically used in current time period, whenever client is sent to server-side
When binder is requested, add up number of communications, and obtain the accumulative number of communications of current time period.
Optionally, module 121 is obtained to be specifically used for ringing when client initiates communication request to server-side or in server-side
When the communication request for answering client to initiate or when the interprocess communication of client and server-side is completed, add up number of communications.
3, Figure 13 is the structural schematic diagram of another embodiment of mobile terminal provided by the present application, the mobile terminal refering to fig. 1
130 include processor 131 and memory 132, wherein processor 131 and memory 132 can pass through a data bus coupling
It connects.
Wherein, memory 132 is for storing computer program, and computer program by processor 131 when being executed, for real
Existing following method and step:
Client to server-side send binder request when, obtain client send binder request before with service
The number of communications at end;Judge whether number of communications is greater than given threshold;If so, binder to be requested to the end that waiting list is added
End;Wherein, the binder request of client head end of preferential answering waiting list during interprocess communication.
4, Figure 14 is the structural schematic diagram of one embodiment of computer storage medium provided by the present application, the calculating refering to fig. 1
Machine storage medium 140 is for storing computer program 141, and computer program 141 is when being executed by processor, for realizing as follows
Method and step:
Client to server-side send binder request when, obtain client send binder request before with service
The number of communications at end;Judge whether number of communications is greater than given threshold;If so, binder to be requested to the end that waiting list is added
End;Wherein, the binder request of client head end of preferential answering waiting list during interprocess communication.
It should be understood that the computer program in above-mentioned Figure 13 and Figure 14 embodiment is realized when being executed by processor
Method and step it is similar with the embodiment of above-mentioned mobile terminal and its method for limiting of interprocess communication, which is not described herein again.
Embodiments herein is realized in the form of SFU software functional unit and when sold or used as an independent product, can
To be stored in a computer readable storage medium.Based on this understanding, the technical solution of the application substantially or
Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products
Out, which is stored in a storage medium, including some instructions are used so that a computer equipment
(can be personal computer, server or the network equipment etc.) or processor (processor) execute each implementation of the application
The all or part of the steps of mode the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory
(ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk
Etc. the various media that can store program code.
The foregoing is merely presently filed embodiments, are not intended to limit the scope of the patents of the application, all to utilize this
Equivalent structure or equivalent flow shift made by application specification and accompanying drawing content, it is relevant to be applied directly or indirectly in other
Technical field similarly includes in the scope of patent protection of the application.
Claims (12)
1. a kind of method for limiting of interprocess communication characterized by comprising
When client sends binder to server-side and requests, obtain the client before sending binder request with
The number of communications of the server-side;
Judge whether the number of communications is greater than given threshold;
If so, the binder to be requested to the end that waiting list is added;Wherein, the client is after set period of time to institute
The binder request stated in waiting list is responded.
2. the method for limiting of interprocess communication according to claim 1, which is characterized in that
It is described when client sends binder to server-side and requests, obtain the client sending the binder and request it
Before the step of preceding number of communications with the server-side, comprising:
In current time period, when the client, which sends binder to the server-side, requests, add up number of communications;
It is described, the step of obtaining number of communications of the client before sending binder request with the server-side,
Include:
Obtain the accumulative number of communications of current time period;
It is described that the step of whether number of communications is greater than given threshold judged, comprising:
Judge whether the accumulative number of communications is greater than given threshold.
3. the method for limiting of interprocess communication according to claim 2, which is characterized in that
The method further includes:
At the end of current period, the accumulative number of communications is reset;
When next period starts, it is used as the client to the service binder request of head end in the waiting list
The binder request that end is sent, return is described in current time period, whenever the client is sent to the server-side
Binder request when, add up number of communications the step of.
4. the method for limiting of interprocess communication according to claim 2, which is characterized in that
The method further includes:
In current time period, whenever client to the server-side send binder request when, to corresponding client into
Line flag;
It is described that the step of whether number of communications is greater than given threshold judged, comprising:
Judge whether the label number of the corresponding client of current binder request is greater than given threshold.
5. the method for limiting of interprocess communication according to claim 1, which is characterized in that
It is described judge the step of whether number of communications is greater than given threshold after, further includes:
If it is not, the server-side responds the binder request that the client is sent, the client and the server-side are carried out
Between interprocess communication.
6. the method for limiting of interprocess communication according to claim 1, which is characterized in that
It is described judge the step of whether number of communications is greater than given threshold before, further includes:
Judge whether the server-side meets preset condition;
If so, execution is described to judge the step of whether number of communications is greater than given threshold;
Wherein, the preset condition is that the quantity of the available thread of the server-side is less than given threshold.
7. the method for limiting of interprocess communication according to claim 1, which is characterized in that
The method further includes:
When the client initiates communication request to the server-side, first time point is recorded;
When the server-side responds the communication request that the client is initiated, recorded for the second time point;
Based on the first time point and second time point, service latency is obtained;
The service latency is saved, to be monitored based on the service latency to the communication of the server-side.
8. the method for limiting of interprocess communication according to claim 7, which is characterized in that
The method further includes:
When the interprocess communication of the client and the server-side is completed, third time point is recorded;
Based on second time point and the third time point, the communication service time is obtained;
The communication service time is saved, to be monitored based on the communication service time to the communication of the server-side.
9. the method for limiting of interprocess communication according to claim 8, which is characterized in that
The method further includes:
Based on the first time point and the third time point, interprocess communication total time is obtained;
The acquisition interprocess communication total time is saved, to be based on the acquisition interprocess communication total time to the server-side
Communication be monitored.
10. a kind of mobile terminal characterized by comprising
Module is obtained, for obtaining the client described in the transmission when client sends binder to server-side and requests
Number of communications before binder request with the server-side;
Judgment module, for judging whether the number of communications is greater than given threshold;
Module is waited, waiting list is added for when the judgment result of the judgment module is yes, the binder to be requested
End;Wherein, the client responds the binder request in the waiting list after set period of time.
11. a kind of mobile terminal, which is characterized in that including processor and memory, wherein the memory is calculated for storing
Machine program, the computer program by the processor when being executed, for realizing such as described in any item sides of claim 1-9
Method.
12. a kind of computer storage medium, which is characterized in that for storing computer program, the computer program is being located
When managing device execution, for realizing such as described in any item methods of claim 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810700058.5A CN109039952B (en) | 2018-06-29 | 2018-06-29 | Mobile terminal, limiting method for interprocess communication of mobile terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810700058.5A CN109039952B (en) | 2018-06-29 | 2018-06-29 | Mobile terminal, limiting method for interprocess communication of mobile terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109039952A true CN109039952A (en) | 2018-12-18 |
CN109039952B CN109039952B (en) | 2022-06-07 |
Family
ID=65520985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810700058.5A Active CN109039952B (en) | 2018-06-29 | 2018-06-29 | Mobile terminal, limiting method for interprocess communication of mobile terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109039952B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110221928A (en) * | 2019-06-11 | 2019-09-10 | Oppo广东移动通信有限公司 | Information recording method, device, terminal and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050246716A1 (en) * | 2001-07-10 | 2005-11-03 | Microsoft Corporation | Application program interface for network software platform |
CN105843738A (en) * | 2016-03-22 | 2016-08-10 | 汉柏科技有限公司 | Inter-process communication statistics and debugging method and system |
CN106878410A (en) * | 2017-02-09 | 2017-06-20 | 北京奇虎科技有限公司 | The detection method and device of a kind of request of data |
-
2018
- 2018-06-29 CN CN201810700058.5A patent/CN109039952B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050246716A1 (en) * | 2001-07-10 | 2005-11-03 | Microsoft Corporation | Application program interface for network software platform |
CN105843738A (en) * | 2016-03-22 | 2016-08-10 | 汉柏科技有限公司 | Inter-process communication statistics and debugging method and system |
CN106878410A (en) * | 2017-02-09 | 2017-06-20 | 北京奇虎科技有限公司 | The detection method and device of a kind of request of data |
Non-Patent Citations (1)
Title |
---|
快乐安卓: "Android Binder通信数据结构介绍https://blog.csdn.net/yangwen123/article/details/9100599", 《CSDN》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110221928A (en) * | 2019-06-11 | 2019-09-10 | Oppo广东移动通信有限公司 | Information recording method, device, terminal and storage medium |
CN110221928B (en) * | 2019-06-11 | 2021-06-04 | Oppo广东移动通信有限公司 | Information recording method, information recording apparatus, terminal, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109039952B (en) | 2022-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10628216B2 (en) | I/O request scheduling method and apparatus by adjusting queue depth associated with storage device based on hige or low priority status | |
CN110673948B (en) | Cloud game resource scheduling method, server and storage medium | |
CN111131639A (en) | Customer service seat allocation method, customer service seat allocation device, server and storage medium | |
CN109117280B (en) | Electronic device, method for limiting inter-process communication thereof and storage medium | |
WO2021109767A1 (en) | Network device and method for reducing transmission delay therefor | |
EP3531749A1 (en) | Management method, management unit and system for network function | |
WO2020164476A1 (en) | Data downloading method and related apparatus | |
CN108924128A (en) | A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication | |
CN109618174A (en) | A kind of live data transmission method, device, system and storage medium | |
CN112395075A (en) | Resource processing method and device and resource scheduling system | |
CN109032812A (en) | A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication | |
CN109818810A (en) | A kind of access server connection optimization method, access server and communication system | |
CN109002364A (en) | Optimization method, electronic device and the readable storage medium storing program for executing of interprocess communication | |
CN108984321A (en) | A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication | |
CN109117279A (en) | The method that is communicated between electronic device and its limiting process, storage medium | |
CN115439250A (en) | Transaction request processing method and device, storage medium and electronic device | |
CN110336888B (en) | Server distribution method, device, system and medium | |
CN109818977B (en) | Access server communication optimization method, access server and communication system | |
CN109117278A (en) | A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication | |
CN109039952A (en) | A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication | |
CN109032814B (en) | Mobile terminal, method for monitoring interprocess communication of mobile terminal and storage medium | |
CN109117340A (en) | A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication | |
CN107329819A (en) | A kind of job management method and device | |
CN109062706B (en) | Electronic device, method for limiting inter-process communication thereof and storage medium | |
CN111857996B (en) | Interrupt processing method, system, equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |