CN109032814A - 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 PDF

Info

Publication number
CN109032814A
CN109032814A CN201810701482.1A CN201810701482A CN109032814A CN 109032814 A CN109032814 A CN 109032814A CN 201810701482 A CN201810701482 A CN 201810701482A CN 109032814 A CN109032814 A CN 109032814A
Authority
CN
China
Prior art keywords
server
client
communication
binder
service
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
Application number
CN201810701482.1A
Other languages
Chinese (zh)
Other versions
CN109032814B (en
Inventor
周明君
方攀
陈岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810701482.1A priority Critical patent/CN109032814B/en
Publication of CN109032814A publication Critical patent/CN109032814A/en
Application granted granted Critical
Publication of CN109032814B publication Critical patent/CN109032814B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/545Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

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 binder thread service condition of server-side during server-side and at least one client are based on the progress interprocess communication of binder mechanism;Judge whether the binder thread service condition meets setting condition;If so, the communication between the first client of limitation and the server-side;Wherein, first client is at least one described client using the client that binder thread is most.By the above-mentioned means, the busy extent of server-side can be reduced, guarantee the fluency of system.

Description

A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication
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 It includes: during server-side and at least one client are based on the progress interprocess communication of binder mechanism, obtaining server-side Binder thread service condition;Judge whether the binder thread service condition meets setting condition;If so, the first visitor of limitation Communication between family end and the server-side;Wherein, first client is used at least one described client The most client of binder thread.
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 The binder thread service condition at end;Memory module, for for saving binder thread service condition, to be based on Binder thread service condition is monitored the communication of server-side.
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, the binder thread for obtaining server-side is used Situation;By limiting the communication of the client most with consumption binder number of threads in server-side communication process, can reduce The busy extent of server-side 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 binder thread service condition of 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 Service Manager can regard the architecture of Android platform as, and Client and Server is the application layer of Android, and developer only needs the customized end realization client, Server, by the base of Android This platform architecture 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.
It should be understood that realized when communication between client and server-side using thread, for example, Android system System regulation SystemServer process can at most create 32 Binder threads and communicate for inter-process data; SurfaceFlinger process can at most create 4 Binder threads and communicate for inter-process data;Program application process is most 8 Binder threads can be mostly created to communicate for inter-process data.
By taking system service (SystemServer) as an example, there are 32 available threads in total, led to client During letter, thread can be occupied, the usage amount of thread is bigger, shows that the system is busier.So by obtaining server-side The service condition of binder thread can be very good to judge its busy extent.
Optionally, the service condition of binder thread may include many aspects, illustrated below:
Optionally, step 11 may is that the quantity for obtaining the available binder thread of server-side.Here available binder The quantity of thread is exactly remaining binder number of threads, for example, server of the system 32 binder threads in total, have used 20 It is a, then remaining available binder thread is exactly 12.
Optionally, step 11 can also be the variation for obtaining the quantity of the available binder thread of server-side in a period of time Situation.It in other words, is here exactly the frequency of use of binder thread.For example, in 1 minute, the binder line of the server-side The usage amount of journey is 5.
Step 12: judging whether the binder thread service condition meets setting condition.
Binder thread service condition is from the busy extent for being on the one hand able to reflect out server-side, especially in multiple clients It can be subsequent system by monitoring its binder thread service condition when end is communicated with the same server-side simultaneously Optimization provides data and supports.Wherein, subsequent system optimization includes limiting the communication of client, can specifically be carried out to client Killing is freezed etc..Optionally, the service condition of binder thread can be the number of remaining available binder thread here The situation of change of the quantity of the available binder thread of the server-side in amount or a period of time.
It is illustrated below by a specific example, is illustrated in the example according to chronological order:
1, system service and customer end A carry out binder communication, occupy 5 binder threads;
2, the binder between system service and customer end A communicates completion, discharges 5 binder threads;
3, system service and customer end B carry out binder communication, occupy 3 binder threads;
4, system service and client C carry out binder communication, occupy 10 binder threads.
In the above example, since the binder between system service and customer end A communicates completion, 5 used Binder thread is released, so remaining available binder number of threads is 32-3-10=19, but if statistics one The usage amount of binder thread in the section time is then 5+3+10=18.
In addition, in one embodiment, also between the given client end in available server-side and multiple client Binder number of threads used in communicating.In such an embodiment, one-to-one monitoring is carried out.
When the judging result of step 12 is to be, step 13 is executed.
Step 13: the communication between the first client of limitation and the server-side;Wherein, first client is described The client that binder thread is most is used at least one client.
Optionally, in one embodiment, can by adding up the service condition of total binder thread of each client, It is also possible to the service condition of the binder thread of some process in certain primary communication.Such as:
1, the first process of system service and customer end A carries out binder communication, occupies 5 binder threads;
2, the second process of system service and customer end A carries out binder communication, occupies 10 binder threads;
3, the first process of system service and customer end B carries out binder communication, occupies 12 binder threads.
In the above example, if from the point of view of with the process of single communication, the first process of customer end B is occupied in communication 12 binder threads, quantity is most, can be as the first client;If with the usage quantity of total binder thread From the point of view of, customer end A occupies 15 binder threads in communication twice altogether, and quantity is most, can also be as the first visitor Family end.
Optionally, in one embodiment, the communication between the first client and server-side is limited, main mode includes: Limit binder number of threads used in communication process between the first client and the server-side.
For example, if one client of limitation can only occupy 10 threads of server-side in total in single communication, If the binder thread in communication process reaches 10, just forbid the communication between the client and server-side.
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, the service condition of its binder thread be monitored.
It is different from the prior art, the monitoring method of interprocess communication provided in this embodiment is by obtaining server-side Binder thread service condition, so that the busy extent to server-side is monitored, and using the result of monitoring to occupancy The more client of binder number of threads is limited.By the above-mentioned means, on the one hand can quickly and effectively get clothes The busy extent at business end provides data to the optimization of system and supports, on the other hand can be good at limiting from the angle of client The binder number of threads of server-side processed makes the remaining available binder thread of server-side be maintained at a preferable level, 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: when the binder thread of server-side is waken up, record wakes up the client of binder thread.
Here client can refer to some application program.
Step 52: whether the quantity of the available binder thread at detection service end is less than setting amount threshold.
When the testing result of step 52 is to be, step 53 is executed.
Step 53: counting the corresponding client of all used binder threads.
Statistical result can be as shown in the table in the form of tables of data:
Process Client Thread usage amount
Process 1 Customer end A 3
Process 2 Customer end A 5
Process 3 Customer end B 10
Above-mentioned statistical framework can be saved, be supported to provide data for follow-up system optimization.
In addition, whether the quantity in the available binder thread for stating server-side is less than setting amount threshold, it can also be to visitor Communication between family end and server-side is limited.
Optionally, in one embodiment, important client can be retained, and limits unessential client, For example, client is divided into first kind client and the second class client in advance, wherein the first client be it is unessential, second Class client is important.Obtain the type of the corresponding client of all used binder threads;Wherein, the class of client Type includes pre-set first kind client and the second class client;It limits logical between first kind client and server-side Letter.
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: judging whether the quantity of the available binder thread of server-side is less than setting amount threshold.
When the judging result of step 61 is to be, step 62 is executed.
Step 62: since the quantity of the available binder thread of server-side is less than setting amount threshold, statistical fractals end Binder thread service condition.
It is just to start when the available quantity of the binder thread of server-side is smaller different from above-described embodiment, in the present embodiment It is monitored.
Step 63: binder thread service condition being saved, to be based on binder thread service condition to service The communication at end is monitored.
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 binder thread service condition of server-side.
Step 102: judging whether the binder thread service condition meets setting condition.
Step 103: obtaining the service condition of the server-side.
Step 104: judging whether the service condition of the server-side meets setting condition.
Step 105: the communication between the first client of limitation and the server-side.
Wherein, the service condition of server-side includes at least the number of communications of server-side, communication frequency, and logical with server-side At least one of quantity of client of letter
It should be understood that being based on server-side after the present embodiment is the binder thread service condition by statistical fractals end Binder thread service condition obtain other whether busy indexs of detection service end again, the binder thread of server-side is made Use situation as a base values.It can judge the busy extent of server-side, and then by multiple condition in this way to limit The communication of client is advantageously implemented the fluency of mobile terminal, additionally it is possible to prevent client from accidentally being disabled, cause making for user With inconvenience.
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 binder thread service condition of server-side is obtained;Judgment module 112 is for judging the binder thread Whether service condition meets setting condition;Limitation module 113 is used for the limitation the when the judging result of judgment module 112 is to be Communication between one client and the server-side;Wherein, first client is used at least one described client The most client of binder thread.
Optionally, module 111 is obtained to be specifically used for obtaining the quantity of the available binder thread of server-side.
Optionally, module 111 is obtained to be specifically used for obtaining the quantity of the available binder thread of server-side in a period of time Situation of change.
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 The binder thread service condition at end;Judge whether the binder thread service condition meets setting condition;If so, limitation the Communication between one client and the server-side;Wherein, first client is used at least one described client The most client of binder thread.
Wherein it is possible to be specifically to obtain the quantity of the available binder thread of server-side, or obtain for oral administration for a period of time The situation of change of the quantity of the available binder thread at business end.
Optionally, computer program is also used to realize following method and step: working as server-side when being executed by processor 121 Binder thread when being waken up, record wakes up the client of binder thread;The available binder thread at detection service end Whether quantity is less than setting amount threshold;If so, counting the corresponding client of all used binder threads.
Optionally, computer program is also used to realize following method and step when being executed by processor 121: obtaining all The type of the corresponding client of used binder thread;Wherein, the type of client includes pre-set first kind visitor Family end and the second class client;Limit the communication between first kind client and server-side.
Optionally, computer program is also used to realize following method and step when being executed by processor 121: judgement service Whether the quantity of the available binder thread at end is less than setting amount threshold;If so, from the available binder thread of server-side Quantity is less than setting amount threshold and starts, the binder thread service condition at statistical fractals end.
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 Available thread quantity be less than setting amount threshold when, obtain the service condition of server-side;The service condition of server-side is carried out It saves, so that the service condition based on server-side is monitored the communication of server-side;Wherein, the service condition of server-side is at least Number of communications, communication frequency including server-side, and at least one of the quantity of client communicated with server-side.
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 The binder thread service condition at end;Judge whether the binder thread service condition meets setting condition;If so, limitation the Communication between one client and the server-side;Wherein, first client is used at least one described client The most client of binder thread.
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 (14)

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 The binder thread service condition at end;
Judge whether the binder thread service condition meets setting condition;
If so, the communication between the first client of limitation and the server-side;Wherein, first client is described at least one The client that binder thread is most is used in a client.
2. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of binder thread service condition for obtaining the server-side, specifically:
When the server-side is communicated with each client, this quantity for communicating occupied binder thread is obtained;
Obtain the quantity of the available binder thread of the server-side.
3. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of binder thread service condition for obtaining the server-side, specifically:
When the server-side is communicated with each client, this quantity for communicating occupied binder thread is obtained;
Obtain the situation of change of the quantity of the available binder thread of the server-side in a period of time.
4. 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 binder number of threads used in communication process between the first client and the server-side.
5. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of binder thread service condition for obtaining the server-side, comprising:
When the binder thread of the server-side is waken up, record wakes up the client of the binder thread;
Whether the quantity for detecting the available binder thread of the server-side is less than setting amount threshold;
If so, counting the corresponding client of all used binder threads.
6. the monitoring method of interprocess communication according to claim 5, which is characterized in that
The method further includes:
Obtain the type of the corresponding client of all used binder threads;Wherein, the type packet of the client Include pre-set first kind client and the second class client;
Limit the communication between first kind client and the server-side.
7. the monitoring method of interprocess communication according to claim 1, which is characterized in that
The step of binder thread service condition for obtaining the server-side, comprising:
Judge whether the quantity of the available binder thread of the server-side is less than setting amount threshold;
If so, counting the service since the quantity of the available binder thread of the server-side is less than setting amount threshold The binder thread service condition at end.
8. 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.
9. the monitoring method of interprocess communication according to claim 8, 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.
10. the monitoring method of interprocess communication according to claim 9, 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.
11. 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;
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.
Wherein, the service condition of the server-side includes at least the number of communications of the server-side, communication frequency, and with it is described At least one of the quantity of client of server-side communication.
12. 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 binder thread service condition of the server-side;
Judgment module, for judging whether the binder thread service condition meets setting condition;
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 at least one described client using the client that binder thread is most.
13. 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-11 when being executed by the processor Method.
14. 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-11.
CN201810701482.1A 2018-06-29 2018-06-29 Mobile terminal, method for monitoring interprocess communication of mobile terminal and storage medium Expired - Fee Related CN109032814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810701482.1A CN109032814B (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
CN201810701482.1A CN109032814B (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
CN109032814A true CN109032814A (en) 2018-12-18
CN109032814B CN109032814B (en) 2020-10-02

Family

ID=65521076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810701482.1A Expired - Fee Related CN109032814B (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) CN109032814B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988375A (en) * 2019-12-17 2021-06-18 华为技术有限公司 Process management method and device and electronic equipment
CN114153621A (en) * 2022-02-09 2022-03-08 荣耀终端有限公司 System process regulation and control method and device, electronic equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7451209B1 (en) * 2003-10-22 2008-11-11 Cisco Technology, Inc. Improving reliability and availability of a load balanced server
CN104750555A (en) * 2015-03-31 2015-07-01 北京奇虎科技有限公司 Management method and device for progresses in Android program
CN104850460A (en) * 2015-06-02 2015-08-19 上海斐讯数据通信技术有限公司 Service program thread management method
CN105740326A (en) * 2016-01-21 2016-07-06 腾讯科技(深圳)有限公司 Thread state monitoring method and device for browser
CN106648865A (en) * 2016-12-15 2017-05-10 北京奇虎科技有限公司 Intelligent terminal, game operating environment optimizing method and system
CN106776080A (en) * 2016-12-29 2017-05-31 北京奇虎科技有限公司 The connection method for building up and device of worker thread
CN107145389A (en) * 2017-03-09 2017-09-08 深圳市先河系统技术有限公司 A kind of system process monitoring method and computing device
CN107544840A (en) * 2016-06-28 2018-01-05 北京优朋普乐科技有限公司 A kind of process management method and device
CN107608785A (en) * 2017-08-15 2018-01-19 深圳天珑无线科技有限公司 Process management method, mobile terminal and readable storage medium
CN107967177A (en) * 2017-11-30 2018-04-27 努比亚技术有限公司 Memory Optimize Method, mobile terminal and readable storage medium storing program for executing based on kernel process

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7451209B1 (en) * 2003-10-22 2008-11-11 Cisco Technology, Inc. Improving reliability and availability of a load balanced server
CN104750555A (en) * 2015-03-31 2015-07-01 北京奇虎科技有限公司 Management method and device for progresses in Android program
CN104850460A (en) * 2015-06-02 2015-08-19 上海斐讯数据通信技术有限公司 Service program thread management method
CN105740326A (en) * 2016-01-21 2016-07-06 腾讯科技(深圳)有限公司 Thread state monitoring method and device for browser
CN107544840A (en) * 2016-06-28 2018-01-05 北京优朋普乐科技有限公司 A kind of process management method and device
CN106648865A (en) * 2016-12-15 2017-05-10 北京奇虎科技有限公司 Intelligent terminal, game operating environment optimizing method and system
CN106776080A (en) * 2016-12-29 2017-05-31 北京奇虎科技有限公司 The connection method for building up and device of worker thread
CN107145389A (en) * 2017-03-09 2017-09-08 深圳市先河系统技术有限公司 A kind of system process monitoring method and computing device
CN107608785A (en) * 2017-08-15 2018-01-19 深圳天珑无线科技有限公司 Process management method, mobile terminal and readable storage medium
CN107967177A (en) * 2017-11-30 2018-04-27 努比亚技术有限公司 Memory Optimize Method, mobile terminal and readable storage medium storing program for executing based on kernel process

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988375A (en) * 2019-12-17 2021-06-18 华为技术有限公司 Process management method and device and electronic equipment
WO2021121161A1 (en) * 2019-12-17 2021-06-24 华为技术有限公司 Process management method and apparatus, electronic device
CN112988375B (en) * 2019-12-17 2024-04-09 华为技术有限公司 Process management method and device and electronic equipment
CN114153621A (en) * 2022-02-09 2022-03-08 荣耀终端有限公司 System process regulation and control method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN109032814B (en) 2020-10-02

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
CN109032812A (en) A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication
CN109376053B (en) Data processing method and device and mobile terminal
CN108132735B (en) Terminal and application control method
CN111290917A (en) YARN-based resource monitoring method and device and terminal equipment
CN109117280B (en) Electronic device, method for limiting inter-process communication thereof and storage medium
CN110874265A (en) Method, device and equipment for rapidly acquiring data and storage medium
CN108924128A (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
CN109032814A (en) A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication
CN109117278A (en) A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication
CN107343023A (en) Resource allocation methods, device and electronic equipment in a kind of Mesos management cluster
CN109117279A (en) The method that is communicated between electronic device and its limiting process, storage medium
CN112395075A (en) Resource processing method and device and resource scheduling system
CN106557404B (en) Application control method and mobile terminal
CN109117340A (en) A kind of mobile terminal and its monitoring method, the storage medium of interprocess communication
CN110334081A (en) The cleaning method and device of mass data
CN109039952A (en) A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication
CN110569238A (en) data management method, system, storage medium and server based on big data
CN115952001A (en) Android system based can communication method, device and equipment
CN111352710A (en) Process management method and device, computing equipment and storage medium
CN109002381A (en) Process communication monitoring method, electronic device and computer readable storage medium
CN113835885A (en) Message detection method, device, electronic equipment and medium
CN111708614A (en) Method, system and related equipment for dynamically adjusting resource parameters of virtual machine
CN109032813A (en) A kind of mobile terminal and its method for limiting, the storage medium of interprocess communication

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20201002