CN109117340A - A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication - Google Patents
A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication Download PDFInfo
- Publication number
- CN109117340A CN109117340A CN201810701485.5A CN201810701485A CN109117340A CN 109117340 A CN109117340 A CN 109117340A CN 201810701485 A CN201810701485 A CN 201810701485A CN 109117340 A CN109117340 A CN 109117340A
- Authority
- CN
- China
- Prior art keywords
- server
- client
- communication
- communications
- monitoring method
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- 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
Abstract
This application discloses a kind of mobile terminal and its monitoring methods of interprocess communication, storage medium, the monitoring method of the interprocess communication includes: to obtain the number of communications between server-side and at least one client during server-side and at least one client are based on the progress interprocess communication of binder mechanism;Judge whether number of communications is greater than given threshold;If so, the communication between the first client of limitation and server-side;Wherein, the first client is client most with server-side number of communications at least one client.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 monitoring 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 monitoring method of interprocess communication, the monitoring method packet
Include: during server-side and at least one client are based on binder mechanism and carry out interprocess communication, obtain server-side with
Number of communications between at least one client;Judge whether number of communications is greater than given threshold;If so, the first client of limitation
Communication between server-side;Wherein, the first client is visitor most with server-side number of communications at least one client
Family end.
Another technical solution that the application uses is: providing a kind of mobile terminal, which includes: acquisition mould
Block, for obtaining service during server-side and at least one client are based on the progress interprocess communication of binder mechanism
Number of communications between end and at least one client;Judgment module, for judging whether number of communications is greater than given threshold;Limit
Molding block is when being, to limit the communication between the first client and server-side for the judging result in judgment module;Wherein,
First client is client most with server-side number of communications at least one client.
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 monitoring method of interprocess communication provided by the present application include: server-side with
During at least one client is based on the progress interprocess communication of binder mechanism, server-side and at least one client are obtained
Between number of communications, by limit with the communication of the most client of server-side number of communications, the numerous of server-side can be reduced
Busy degree, guarantees the fluency of system.
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 monitoring method 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 monitoring method second embodiment of interprocess communication provided by the present application;
Fig. 6 is the flow diagram of the monitoring method 3rd embodiment of interprocess communication provided by the present application;
Fig. 7 is the flow diagram of the monitoring method fourth embodiment of interprocess communication provided by the present application;
Fig. 8 is the flow diagram of the 5th embodiment of monitoring method of interprocess communication provided by the present application;
Fig. 9 is the flow diagram of the monitoring method sixth embodiment of interprocess communication provided by the present application;
Figure 10 is the flow diagram of the 7th embodiment of monitoring method of interprocess communication provided by the present application;
Figure 11 is the structural schematic diagram of one embodiment of mobile terminal provided by the present application;
Figure 12 is the structural schematic diagram of another embodiment of mobile terminal provided by the present application;
Figure 13 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 at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical
Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art 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 monitoring method first embodiment of interprocess communication provided by the present application,
This method comprises:
Step 11: during server-side and at least one client are based on the progress interprocess communication of binder mechanism,
Obtain the number of communications between server-side and at least one client.
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 is that the number of communications serviced one is supervised
Control.
Optionally, in the present embodiment, which can be server of the system.
Specifically, as shown in figure 4, Fig. 4 is the interaction schematic diagram of client and server-side, in the logical of client and server-side
It mainly include three processes during letter, client is initiated logical to server-side initiation communication request, server-side customer in response end
Data interaction is carried out between letter request, client 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 at least one client initiates communication request to server-side, adds up logical
Believe number.
Optionally, step 11 can be with specifically: when server-side responds the communication request of at least one client initiation, tires out
Count number of communications.
Optionally, step 11 can be with specifically: when the interprocess communication of at least one client and server-side is completed, tires out
Count number of communications.
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.
Optionally, in one embodiment, a certain specific client and a certain specific server-side can also only be added up
Between number of communications, it is one-to-one to be counted.
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.
Wherein, given threshold, which can be, is rule of thumb arranged, for example, by obtaining the flat of number of communications in a period of time
Mean value, when number of communications reaches some critical value, system be easy to appear it is not smooth, collapse phenomena such as.
Number of communications from the busy extent for being on the one hand able to reflect out server-side, especially multiple client simultaneously with it is same
When one server-side is communicated, by monitoring its number of communications, data support can be provided for subsequent system optimization.Its
In, subsequent system optimization includes limiting the communication of client, killing can be specifically carried out to client, is freezed etc..
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 and the first process of application program B carry out binder communication;
2, the second process of application program A and system service carry out binder communication;
3, the first process of application program C and system service carry out binder communication;
4, the first process of application program D and system service carry out binder communication;
5, the second process of application program D and system service carry out binder communication.
In the above example, total number of communications is 5 times.Wherein, for application program A, number of communications 2
It is secondary;For application program B, number of communications is 1 time;For application program C, number of communications is 1 time;For answering
For program D, number of communications is 2 times;For system service, number of communications is 4 times.
Optionally, if the communication to system service is monitored, the number of communications acquired is 4 times.
Step 13: the communication between the first client of limitation and server-side;Wherein, the first client is at least one client
The client most with server-side number of communications in end.
Optionally, due to limit the communication between the first client and server-side in step 13, so in step 12
In can be communicated with client with server-side during, client is marked.Specifically, step 12 may is that
When server-side is communicated with each client, add up number of communications, and corresponding client is marked, label is most
Client as the first client.
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 and system service carry out binder communication, add up number of communications 1 time, and corresponding
It is marked with program A;
2, the second process of application program A and system service carry out binder communication, add up number of communications 2 times, and again
Application program A is marked;
3, the first process of application program B and system service carry out binder communication, add up number of communications 3 times, and corresponding
It is marked with program B;
4, the first process of application program C and system service carry out binder communication, add up number of communications 4 times, and corresponding
It is marked with program C;
5, the first process of application program D and system service carry out binder communication, add up number of communications 5 times, and corresponding
It is marked with program D.
In the above example, total number of communications is 5 times.Wherein, for application program A, there are two labels,
Number of communications is 2 times;It is 1 time for other applications;So using application program A as the first client, and limit
Communication between application program A processed and system service.
Optionally, in one embodiment, the communication between the first client and server-side is limited, main mode includes:
Limit number of communications between the first client and server-side, communication frequency, thread usage quantity.
Wherein, number of communications refers to the first client and the total number of communications of server-side, for example, can be limited to 5 times, from
First client is communicated with server-side for the first time to start to add up, and the number of communications when between the two reaches 5 times, then forbids the first visitor
It is communicated between family end and server-side.
Wherein, communication frequency is usually the number of communications in a period of time, for example, can be limited to 5 times per hour, from
First client is communicated with server-side for the first time starts accumulative and timing, and when one is small, interior number of communications between the two reaches 5
It is secondary, then forbid being communicated between the first client and server-side.After one hour, then allow the first client and server-side it
Between communication.
Wherein, thread usage quantity refers to the thread of the first client and the server-side server-side used in communication process
Quantity.By taking system service as an example, generally there are 32 threads, if the number of threads set then only allows the first client as 10
Communication most multipotency between end and server-side occupies 10 threads.
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 monitoring method of interprocess communication provided in this embodiment is by acquisition server-side and at least
Number of communications between one client, so that the busy extent to server-side is monitored, and using the result of monitoring to logical
The more client of letter number is limited.By the above-mentioned means, on the one hand can quickly and effectively get the numerous of server-side
Busy degree provides data to the optimization of system and supports, on the other hand can be good at limiting communication time from the angle of client
Number, the effective 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 monitoring method second embodiment of interprocess communication provided by the present application refering to Fig. 5, Fig. 5,
This method comprises:
Step 51: during server-side and at least one client are based on the progress interprocess communication of binder mechanism,
In each accumulative number of communications, while recording current time point.
Step 52: based on the time point communicated every time, obtaining the accumulative number of communications in set period of time.
Here for completing the time point of communication, 5 communication is completed whithin a period of time for same server-side, it is as follows
Shown in table:
Number of communications | Complete the time point of communication |
1st communication | Time point 1 |
2nd communication | Time point 2 |
3rd communication | Time point 3 |
The 4th communication | Time point 4 |
The 5th communication | Time point 5 |
Specifically, can be added up since a certain specific time point, for example, from time point 1 or time point 1 it
Some preceding time point, then the length of period can be arbitrarily arranged, such as 10 minutes.
For example, number of communications since time point 1 within 10 minutes will be added up by being added, then when last statistics
Between time point for ending be exactly time point 1+10 minute, if time point 1-5 within this period, then accumulative communication time
Number is exactly 5 times.
Furthermore it is possible to the step before repeating can be primary with every 10 minutes statistics here still for 10 minutes, and
The number continuously counted can be compared analysis.For example, communicate 5 times in 10 minutes at first, second in 10 minutes
Communication 10 times communicates 20 times, be monitored number of communications by the variation of data for third 10 minutes.
It is the flow diagram of the monitoring method 3rd embodiment of interprocess communication provided by the present application refering to Fig. 6, Fig. 6,
This method comprises:
Step 61: during server-side and at least one client are based on the progress interprocess communication of binder mechanism,
Judge whether server-side meets preset condition.
Wherein, when the judging result of step 61, which is, is, step 62 is executed.
Step 62: since server-side meets preset condition, adding up server-side and at least one client in set period of time
Number of communications between end.
It should be understood that the purpose of the number of communications at monitoring service end is to monitor its busy extent, therefore, can take
When the busy extent at business end meets some requirements, then start to monitor.
Optionally, preset condition is that the quantity of the available thread of server-side is less than given threshold.It should be understood that two into
Communication between journey generally will use multiple threads.For example, android system regulation SystemServer process at most can be with
32 Binder threads are created to communicate for inter-process data;SurfaceFlinger process can at most create 4 Binder
Thread is communicated for inter-process data;It is logical for inter-process data that program application process can at most create 8 Binder threads
Letter.
Therefore, can start to monitor number of communications when the thread usage quantity of server-side is met the requirements, for example, one
A server-side shares 32 threads, wherein 16 threads are used, available thread is 16 remaining, i.e., when being used thread to be greater than one
Start the number of communications in accumulative set period of time between server-side and at least one client when half.
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.
Step 63: number of communications being saved, to be monitored based on number of communications to the communication of server-side.
It is the flow diagram of the monitoring method fourth embodiment of interprocess communication provided by the present application refering to Fig. 7, Fig. 7,
This method comprises:
Step 71: when at least one client initiates communication request to server-side, recording first time point.
Step 72: when server-side responds the communication request of at least one client initiation, recording for the second time point.
Step 73: 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 74: service latency is saved, to be monitored based on service latency to the communication of server-side.
It is the flow diagram of the 5th embodiment of monitoring method of interprocess communication provided by the present application refering to Fig. 8, Fig. 8,
This method comprises:
Step 81: when server-side responds the communication request of at least one client initiation, recording for the second time point.
Step 82: when the interprocess communication of at least one client and server-side is completed, recording third time point.
Step 83: 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 84: the communication service time is saved, to be monitored based on the communication service time to the communication of server-side.
It is the flow diagram of the monitoring method sixth embodiment of interprocess communication provided by the present application refering to Fig. 9, Fig. 9,
This method comprises:
Step 91: when at least one client initiates communication request to server-side, recording first time point.
Step 92: when the interprocess communication of at least one client and server-side is completed, recording third time point.
Step 93: 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 94: 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. 7-Fig. 9 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.
0, Figure 10 is the process signal of the 7th embodiment of monitoring method of interprocess communication provided by the present application refering to fig. 1
Figure, this method comprises:
Step 101: during server-side and at least one client are based on the progress interprocess communication of binder mechanism,
Obtain the number of communications between server-side and at least one client.
Step 102: judging whether number of communications is greater than given threshold.
Step 103: obtaining the service condition of server-side.
Wherein, the client when service condition of server-side includes at least the available thread quantity and client communication of server-side
The quantity at end, communication efficiency of server-side etc., can also be the occupancy situation of CPU.
Step 104: judging whether the service condition of server-side meets setting condition.
By taking available thread quantity as an example, it may determine that whether the available thread quantity of server-side is less than the threshold of setting here
Value.
Step 105: the communication between the first client of limitation and server-side.
It should be understood that the present embodiment is by obtaining detection service end again based on number of communications after statistics number of communications
Whether other busy indexs, using number of communications as a base values.It can judge to service by multiple condition in this way
The busy extent at end, and then the communication of client is limited, it is advantageously implemented the fluency of mobile terminal, additionally it is possible to prevent client
End is accidentally disabled, and causes that user's is inconvenient for use.
1, Figure 11 is the structural schematic diagram of one embodiment of mobile terminal provided by the present application, the mobile terminal 110 refering to fig. 1
Including obtaining module 111, judgment module 112 and limitation module 113.
Wherein, module 111 is obtained to be used between server-side and at least one client are based on binder mechanism carry out process
During communication, the number of communications between server-side and at least one client is obtained;Judgment module 112 is for judging communication
Whether number is greater than given threshold;Limitation module 113 is used to limit the first client when the judging result of judgment module is to be
Communication between server-side;Wherein, the first client is visitor most with server-side number of communications at least one client
Family end.
Optionally, it obtains module 111 to be specifically used for when server-side is communicated with each client, adds up communication time
Number, and corresponding client is marked;Most clients will be marked as the first client.
Optionally, limitation module 113 is specifically for limiting the number of communications between the first client and server-side, communicating frequency
Rate, thread usage quantity.
Optionally, obtain module 111 be specifically used at least one client to server-side initiate communication request when or
Lead to when server-side responds the communication request of at least one client initiation or between at least one client and the process of server-side
When letter is completed, add up number of communications.
Optionally, it obtains module 111 to be also used in each accumulative number of communications, while recording current time point;Base
In the time point communicated every time, the accumulative number of communications in set period of time is obtained.
2, Figure 12 is the structural schematic diagram of another embodiment of mobile terminal provided by the present application, the mobile terminal refering to fig. 1
120 include processor 121 and memory 122, wherein processor 121 and memory 122 can pass through a data bus coupling
It connects.
Wherein, memory 122 is for storing computer program, and computer program by processor 121 when being executed, for real
Existing following method and step:
During server-side and at least one client are based on the progress interprocess communication of binder mechanism, service is obtained
Number of communications between end and at least one client;Judge whether number of communications is greater than given threshold;If so, the first visitor of limitation
Communication between family end and server-side;Wherein, the first client is most with server-side number of communications at least one client
Client.
Optionally, computer program is also used to realize following method and step: at least one when being executed by processor 121
A client to server-side initiate communication request when or server-side respond at least one client initiate communication request when,
Or when the interprocess communication of at least one client and server-side is completed, add up number of communications.
Optionally, computer program is also used to realize following method and step when being executed by processor 121: judgement service
Whether end meets preset condition;If so, since server-side meets preset condition, add up in set period of time server-side at least
Number of communications between one client;Wherein, preset condition is that the quantity of the available thread of server-side is less than given threshold.
Optionally, computer program is also used to realize following method and step: at least one when being executed by processor 121
When a client initiates communication request to server-side, first time point is recorded;At least one client is responded in server-side to initiate
Communication request when, record the second time point;Based on first time point and the second time point, service latency is obtained;It saves
Service latency, to be monitored based on service latency to the communication of server-side.And
When the interprocess communication of at least one client and server-side is completed, third time point is recorded;When based on second
Between point and third time point, obtain the communication service time;The communication service time is saved, to be based on the communication service time to service
The communication at end is monitored.And
Based on first time point and third time point, interprocess communication total time is obtained;It is total to save acquisition interprocess communication
Time, to be monitored to the communication of server-side interprocess communication total time based on acquisition.
Optionally, computer program is also used to realize following method and step: in server-side when being executed by processor 121
When number of communications between at least one client is greater than setting frequency threshold value, the service condition of client is obtained;By client
The service condition at end is saved, so that client-based service condition is monitored the communication of server-side;Wherein, client
The service condition at end includes at least the available thread quantity of client.
3, Figure 13 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 130 is for storing computer program 131, and computer program 131 is when being executed by processor, for realizing as follows
Method and step:
During server-side and at least one client are based on the progress interprocess communication of binder mechanism, service is obtained
Number of communications between end and at least one client;Judge whether number of communications is greater than given threshold;If so, the first visitor of limitation
Communication between family end and server-side;Wherein, the first client is most with server-side number of communications at least one client
Client.
It should be understood that the method and step and above-mentioned movement that computer program 131 when being executed by processor, is realized are whole
The embodiment at end is similar, and 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 (15)
1. a kind of monitoring method of interprocess communication characterized by comprising
During server-side and at least one client are based on the progress interprocess communication of binder mechanism, the service is obtained
Number of communications between end and at least one described client;
Judge whether the number of communications is greater than given threshold;
If so, the communication between the first client of limitation and the server-side;Wherein, first client is described at least one
The client most with the server-side number of communications in a client.
2. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The number of communications step obtained between the server-side and at least one described client, comprising:
When the server-side is communicated with each client, add up number of communications, and corresponding client is marked;
Most clients will be marked as first client.
3. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of communication limited between the first client and the server-side, comprising:
Limit number of communications between the first client and the server-side, communication frequency, thread usage quantity.
4. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of number of communications obtained between the server-side and at least one described client, comprising:
When at least one described client initiates communication request to the server-side, add up number of communications.
5. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of number of communications obtained between the server-side and at least one described client, comprising:
When the server-side responds the communication request that at least one described client is initiated, add up number of communications.
6. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of number of communications obtained between the server-side and at least one described client, comprising:
When the interprocess communication of at least one described client and the server-side is completed, add up number of communications.
7. according to the monitoring method of the described in any item interprocess communications of claim 4-6, which is characterized in that
The monitoring method further comprises:
In each accumulative number of communications, while recording current time point;
Based on the time point communicated every time, the accumulative number of communications in set period of time is obtained.
8. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of number of communications obtained between the server-side and at least one described client, comprising:
Judge whether the server-side meets preset condition;
If so, adding up the server-side and described at least one in set period of time since the server-side meets preset condition
Number of communications between a client;
Wherein, the preset condition is that the quantity of the available thread of the server-side is less than given threshold.
9. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The monitoring method further comprises:
When at least one described client initiates communication request to the server-side, first time point is recorded;
When the server-side responds the communication request that at least one described 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.
10. the monitoring method of interprocess communication according to claim 9, which is characterized in that
The monitoring method further comprises:
When the interprocess communication of at least one described 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.
11. the monitoring method of interprocess communication according to claim 10, which is characterized in that
The monitoring method further comprises:
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.
12. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of communication limited between the first client and the server-side, comprising:
Obtain the service condition of the server-side;Wherein, the service condition of the server-side include at least the server-side can
Use number of threads;
Judge whether the service condition of the server-side meets setting condition;
If so, the communication between the first client of limitation and the server-side.
13. a kind of mobile terminal characterized by comprising
Module is obtained, for carrying out the process of interprocess communication based on binder mechanism in server-side and at least one client
In, obtain the number of communications between the server-side and at least one described client;
Judgment module, for judging whether the number of communications is greater than given threshold;
Module is limited, is to limit between the first client and the server-side when being for the judging result in judgment module
Communication;Wherein, first client is client most with the server-side number of communications at least one described client
End.
14. 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 are described in any item for realizing such as claim 1-12 when being executed by the processor
Method.
15. 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-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810701485.5A CN109117340B (en) | 2018-06-29 | 2018-06-29 | Mobile terminal, method for monitoring interprocess communication of mobile terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810701485.5A CN109117340B (en) | 2018-06-29 | 2018-06-29 | Mobile terminal, method for monitoring interprocess communication of mobile terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109117340A true CN109117340A (en) | 2019-01-01 |
CN109117340B CN109117340B (en) | 2022-03-29 |
Family
ID=64822339
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810701485.5A Active CN109117340B (en) | 2018-06-29 | 2018-06-29 | Mobile terminal, method for monitoring interprocess communication of mobile terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109117340B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116662024A (en) * | 2022-12-30 | 2023-08-29 | 荣耀终端有限公司 | Inter-process communication monitoring method and device, electronic equipment and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6667967B1 (en) * | 1999-05-14 | 2003-12-23 | Omninet Capital, Llc | High-speed network of independently linked nodes |
CN102891843A (en) * | 2012-09-18 | 2013-01-23 | 北京深思洛克软件技术股份有限公司 | Method for authorizing application program at android client side through local service unit |
CN102970356A (en) * | 2012-11-08 | 2013-03-13 | 百度在线网络技术(北京)有限公司 | Communication method, system and device for cloud side server and client side |
US20130067492A1 (en) * | 2011-09-09 | 2013-03-14 | Eli Joshua FIDLER | Content-filter publish-subscribe system that optimizes interprocess communications |
CN103108320A (en) * | 2011-11-15 | 2013-05-15 | 网秦无限(北京)科技有限公司 | Method and system for monitoring application program of mobile device |
CN103139010A (en) * | 2012-11-13 | 2013-06-05 | 深圳中兴网信科技有限公司 | Terminal and testing server and testing method |
CN103150220A (en) * | 2011-12-07 | 2013-06-12 | 腾讯科技(深圳)有限公司 | Method and system for interprocess communications |
CN103902390A (en) * | 2014-03-12 | 2014-07-02 | 深圳创维-Rgb电子有限公司 | Inter-process communication method based on Android application layer and basis application communication system |
CN105335238A (en) * | 2014-08-12 | 2016-02-17 | 腾讯科技(深圳)有限公司 | Inter-process communication method and apparatus |
CN105843738A (en) * | 2016-03-22 | 2016-08-10 | 汉柏科技有限公司 | Inter-process communication statistics and debugging method and system |
CN108073499A (en) * | 2016-11-10 | 2018-05-25 | 腾讯科技(深圳)有限公司 | The test method and device of application program |
-
2018
- 2018-06-29 CN CN201810701485.5A patent/CN109117340B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6667967B1 (en) * | 1999-05-14 | 2003-12-23 | Omninet Capital, Llc | High-speed network of independently linked nodes |
US20130067492A1 (en) * | 2011-09-09 | 2013-03-14 | Eli Joshua FIDLER | Content-filter publish-subscribe system that optimizes interprocess communications |
CN103108320A (en) * | 2011-11-15 | 2013-05-15 | 网秦无限(北京)科技有限公司 | Method and system for monitoring application program of mobile device |
CN103150220A (en) * | 2011-12-07 | 2013-06-12 | 腾讯科技(深圳)有限公司 | Method and system for interprocess communications |
CN102891843A (en) * | 2012-09-18 | 2013-01-23 | 北京深思洛克软件技术股份有限公司 | Method for authorizing application program at android client side through local service unit |
CN102970356A (en) * | 2012-11-08 | 2013-03-13 | 百度在线网络技术(北京)有限公司 | Communication method, system and device for cloud side server and client side |
CN103139010A (en) * | 2012-11-13 | 2013-06-05 | 深圳中兴网信科技有限公司 | Terminal and testing server and testing method |
CN103902390A (en) * | 2014-03-12 | 2014-07-02 | 深圳创维-Rgb电子有限公司 | Inter-process communication method based on Android application layer and basis application communication system |
CN105335238A (en) * | 2014-08-12 | 2016-02-17 | 腾讯科技(深圳)有限公司 | Inter-process communication method and apparatus |
CN105843738A (en) * | 2016-03-22 | 2016-08-10 | 汉柏科技有限公司 | Inter-process communication statistics and debugging method and system |
CN108073499A (en) * | 2016-11-10 | 2018-05-25 | 腾讯科技(深圳)有限公司 | The test method and device of application program |
Non-Patent Citations (1)
Title |
---|
快乐安卓: "Android Binder通信数据结构介绍", 《HTTPS://BLOG.CSDN.NET/YANGWEN123/ARTICLE/DETAILS/9100599》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116662024A (en) * | 2022-12-30 | 2023-08-29 | 荣耀终端有限公司 | Inter-process communication monitoring method and device, electronic equipment and storage medium |
CN116662024B (en) * | 2022-12-30 | 2023-11-07 | 荣耀终端有限公司 | Inter-process communication monitoring method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109117340B (en) | 2022-03-29 |
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 | |
CN107483521A (en) | A kind of information displaying method, apparatus and system | |
CN109818810A (en) | A kind of access server connection optimization method, access server and communication system | |
WO2020220748A1 (en) | Application control method and apparatus, terminal, and computer-readable storage medium | |
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 | |
CN109117280B (en) | Electronic device, method for limiting inter-process communication thereof 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 | |
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 | |
CN106557404B (en) | Application control method and mobile terminal | |
CN109032814A (en) | A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication | |
CN109002364A (en) | Optimization method, electronic device and the readable storage medium storing program for executing of interprocess communication | |
CN109117278A (en) | A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication | |
CN109117340A (en) | A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication | |
CN103729417A (en) | Method and device for data scanning | |
CN109039952A (en) | A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication | |
CN109670932A (en) | Credit data calculate method, apparatus, system and computer storage medium | |
CN109002381A (en) | Process communication monitoring method, electronic device and computer readable storage medium | |
CN107329819A (en) | A kind of job management method and device | |
CN107704421A (en) | A kind of polycaryon processor and message processing method | |
CN109032813A (en) | A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication | |
CN109062706B (en) | Electronic device, method for limiting inter-process communication thereof and 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 |