CN109918215A - A kind of Way of Process Communication, system, terminal and storage medium - Google Patents
A kind of Way of Process Communication, system, terminal and storage medium Download PDFInfo
- Publication number
- CN109918215A CN109918215A CN201910164392.8A CN201910164392A CN109918215A CN 109918215 A CN109918215 A CN 109918215A CN 201910164392 A CN201910164392 A CN 201910164392A CN 109918215 A CN109918215 A CN 109918215A
- Authority
- CN
- China
- Prior art keywords
- parameter information
- information
- process parameter
- parameter
- target
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Telephonic Communication Services (AREA)
Abstract
The embodiment of the invention discloses a kind of Way of Process Communication, system, terminal and storage mediums, this method comprises: the first process when detecting that at least one first process parameter information changes, is traversed according to the corresponding second process parameter information of at least one second process that changed first process parameter information stores memory dictionary;First process determines corresponding the second process of target of changed first process parameter information, and the first process parameter information after variation is sent in corresponding the second process of target.Technical solution through the embodiment of the present invention, to reduce communication burden, can improve operational efficiency to avoid extra message informing is carried out.
Description
Technical field
The present embodiments relate to computer technologies more particularly to a kind of Way of Process Communication, system, terminal and storage to be situated between
Matter.
Background technique
With the development of computer technology, technical staff develops more and more softwares, growing to meet people
Demand.In general, software is the software systems being made up of multiple processes, and carried out between these processes by frequently communication
Co-ordination.
Currently, often being disappeared using broadcast when some process needs some parameter informations notifying remaining multiple process
The mode of breath realizes the communication between process.As shown in Figure 1, process A is by using broadcast message mode by some parameter informations
It is broadcasted, the message channel of process B, process C and process D process A registered in advance, to receive broadcast message.When appointing for process A
When what parameter information changes, the parameter information of variation is broadcast to all registered processes by process A, so that process B, process C
Parameter information after being changed with process D.
However, at least there are the following problems in the prior art for inventor's discovery in realizing process of the present invention:
When process A needs to broadcast multiple parameters information, such as parameter 1, parameter 2, parameter 3, parameter 4 and parameter 5, and into
Journey B only needs to obtain parameter 1, and process C only needs to obtain parameter 2 and parameter 3, and process D only needs to obtain parameter 1 and parameter 5 etc..If at this time
Communicated by way of broadcast message, then process B other than receiving the parameter 1 needed for itself, can also receive into
Remaining unnecessary parameter information of journey A broadcast, such as parameter 2, parameter 3, parameter 4 and parameter 5.As it can be seen that these extra message
Notice considerably increases system communication burden, reduces running efficiency of system.
Summary of the invention
The embodiment of the invention provides a kind of Way of Process Communication, system, terminal and storage mediums, extra to avoid carrying out
Message informing, thus reduce communication burden, improve operational efficiency.
In a first aspect, the embodiment of the invention provides a kind of Way of Process Communication, comprising:
First process is when detecting that at least one first process parameter information changes, according to changed first
The corresponding second process parameter information of at least one second process that process parameter information stores memory dictionary traverses;
First process determines corresponding the second process of target of changed first process parameter information, and will variation
The first process parameter information afterwards is sent in corresponding the second process of target.
Second aspect, the embodiment of the invention also provides a kind of process communication system, the system comprises: the first process and
At least one second process;
Wherein, first process is used for: when detecting that at least one first process parameter information changes, according to
The corresponding second process ginseng of at least one second process that changed first process parameter information stores memory dictionary
Number information is traversed;Determine corresponding the second process of target of changed first process parameter information, and will be after variation
First process parameter information is sent in corresponding the second process of target.
The third aspect, the embodiment of the invention also provides a kind of terminal, the terminal includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes such as Way of Process Communication provided by any embodiment of the invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program realizes such as Way of Process Communication provided by any embodiment of the invention when the program is executed by processor.
The embodiment of the present invention is by advance storing the corresponding second process parameter information of at least one second process to
In the memory dictionary of one process maintenance, the first process is responsible for whether each first process parameter information in detection system becomes
Change, and when detecting that at least one first process parameter information changes, to each of being stored second in memory dictionary
The corresponding second process parameter information of process is traversed, and determines the corresponding target of changed first process parameter information
Two processes, i.e., changed first process parameter information is parameter information needed for the second process of target, so as to become
The first process parameter information after change is only sent in corresponding the second process of target, without being sent in remaining second process,
So as to avoiding message informing extra in system, and remaining second process is avoided to receive unnecessary parameter information, into
And reduce communication burden, improve the operational efficiency of system.
Detailed description of the invention
Fig. 1 is a kind of flow chart of Way of Process Communication of the prior art;
Fig. 2 is a kind of flow chart for Way of Process Communication that the embodiment of the present invention one provides;
Fig. 3 is a kind of flow chart of Way of Process Communication provided by Embodiment 2 of the present invention;
Fig. 4 is a kind of Way of Process Communication applied in mobile C-arm software systems provided by Embodiment 2 of the present invention
Flow chart;
Fig. 5 is a kind of structural schematic diagram for process communication system that the embodiment of the present invention three provides;
Fig. 6 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 2 is a kind of flow chart for Way of Process Communication that the embodiment of the present invention one provides, and the present embodiment is applicable to soft
The case where being communicated between process in part system, it is particularly possible to the case where being used for interprocess communication in medical software system,
Middle medical treatment software systems can be mobile C-arm software systems.This method can be executed by process communication system, which can
It is realized in a manner of by software and/or hardware, being integrated in can be in the terminal of load software system, such as computer, personal notes
Sheet, mobile phone, game machine etc..As shown in Fig. 2, this method specifically includes the following steps:
S110, the first process are when detecting that at least one first process parameter information changes, according to changing
The first process parameter information corresponding second process parameter information of at least one second process that memory dictionary is stored into
Row traversal.
Wherein, the first process can refer to for being responsible for whether each first process parameter information in monitoring whole system is sent out
The process for changing.First process parameter information can refer to the parameters letter that the first process is responsible in the whole system of monitoring
Breath.Illustratively, the first process parameter information can be but not limited to resource using information and/or system status information, wherein
Resource using information can include but is not limited to CPU (Central Processing Unit, central processing unit) utilization rate and/
Or disk space etc.;System status information can include but is not limited to network connection state information etc..
Second process can refer in system for receiving the process of the message informing of the first process transmission, specifically can be
Refer to the process that respective specific function is realized using the second process parameter information.Second process parameter information can refer to the second process
The first process of one or more of required system parameter information when operation.Illustratively, it is assumed that the first process A is responsible for monitoring
Five the first process parameter informations in system are respectively as follows: parameter 1, parameter 2, parameter 3, parameter 4 and parameter 5, the second process B fortune
It is only needed when row using parameter 1 and parameter 5, then the corresponding second process parameter information of the second process B is parameter 1 and parameter 5, i.e.,
Parameter 1 and parameter 5 are necessary parameter information for the second process B, and parameter 2, parameter 3 and parameter 4 are for the second process B
It is unnecessary parameter information.
Memory dictionary can refer to the thread-safe safeguarded in the first process, for storing one or more second
The dictionary of the corresponding second process parameter information of process.The Stored Data Type of memory dictionary can be but unlimited in the present embodiment
In key-value pair type, in order to the storage and inquiry of data.Illustratively, memory dictionary can be used for storing at least one second
The corresponding key-value pair information of process, wherein the key information in key-value pair information is the corresponding character string string class of the second process
Second process identification (PID) of type;Value information in key-value pair information is that the second process of the corresponding set list type of the second process is joined
Number information.Wherein, the second process identification (PID) can be made of at least one of number, letter, Chinese character, symbol and figure, be used for
The second process of unique identification, to distinguish the second different processes.For example, memory dictionary can be with is defined as:
ConcurrentDictionary<string, List<SystemStatusType>>_ registeredMap, wherein
Registered Map is the title of memory dictionary, and key information string is the second process identification (PID) of string type;Value information
List<SystemStatusType>is the set being made of each second process parameter information SystemStatusType.
Specifically, the present embodiment can in advance store the corresponding second process parameter information of each second process to first
In the memory dictionary of process maintenance, in order to which the first process carries out data query.First process can be with real-time detection or periodicity
Ground detects whether each first process parameter information changes, and is detecting the generation of at least one first process parameter information
It, can be according to changed each first process parameter information to each of storing the second process pair in memory dictionary when variation
The each second process parameter information answered is traversed, that is, by changed each first process parameter information and memory
The second process parameter information each of is stored in dictionary and carries out parameter matching, with the changed first process parameter information of determination
Whether belong to same parameters with the second process parameter information in memory dictionary.
S120, the first process determine corresponding the second process of target of changed first process parameter information, and will become
The first process parameter information after change is sent in corresponding the second process of target.
Wherein, the second process of target can refer to that changed first process parameter information is the parameter letter needed for itself
The second corresponding process when breath.Changed first process parameter information can be one or more in the present embodiment.When
There are when multiple changed first process parameter informations, determine that each changed first process parameter information is corresponding
The second process of target.
Specifically, for each changed first process parameter information, by by changed first into
Each second process parameter information in journey parameter information and memory dictionary carries out parameter matching, determine changed first into
Whether the second process parameter information in journey parameter information and memory dictionary belongs to same parameters, and is determined and sent out according to matching result
Corresponding the second process of target of first process parameter information of changing.For example, if some second process is corresponding in memory dictionary
Some second process parameter information and changed first process parameter information belong to same parameters, then show matching at
Function, i.e., changed first process parameter information be second process needed for parameter information, at this time can by this second into
Journey is determined as corresponding the second process of target of changed first process parameter information.Similarly, it can determine to change
Corresponding one or more the second processes of target of the first process parameter information.
Illustratively, if five the first process parameter informations that the first process A is responsible in monitoring system be respectively as follows: parameter 1,
Parameter 2, parameter 3, parameter 4 and parameter 5, the corresponding second process parameter information of the second process B be parameter 1 and parameter 5, second into
The corresponding second process parameter information of journey C is that parameter 1 and parameter 4 can then when the first process A detects that parameter 1 changes
With determination corresponding the second process of target of changed parameter 1 for the second process B and C;Parameter 5 is detected in the first process A
When changing, it can determine that corresponding the second process of target of changed parameter 1 is only the second process B.In the first process A
When detecting parameter 1 and parameter 5 while changing, changed parameter 1 and the corresponding target second of parameter 5 can be determined
Process is the second process B.
After determining corresponding the second process of target of changed first process parameter information, the first process can lead to
Point-to-point transmission order is crossed, the first process parameter information fixed point after each variation is sent to corresponding the second process of target
In, so as to avoid message informing extra in system, and remaining second process is avoided to receive unnecessary parameter information,
And then reduce communication burden, improve the operational efficiency of system.It should be noted that fixed service involved in the present embodiment
Mode is different from fixed service mode in the prior art, and difference is: fixed service mode in the prior art is to be based on
The corresponding second process parameter information of second process pre-establishes the communication protocol between the first process and the second process, so that the
One process is based on the communication protocol and sends message informing to the second process.However, when the corresponding second process parameter of the second process
When information is changed because of reasons such as business demands, the first process can also be existed to second based on the communication protocol pre-established
Process sends the case where the second process institute unnecessary parameter information, to also result in extra message informing.And this implementation
Example only need to determine that changed first process is joined according to the memory dictionary that the first process is safeguarded without pre-establishing communication protocol
Corresponding the second process of target of number information, and what is stored in memory dictionary can be each second process corresponding current second
Process parameter information, so that the second process of target can be accurately determined out according to memory dictionary, so as to first after changing
Process parameter information is sent to corresponding the second process of target, so as to further avoid carrying out extra message informing.
The technical solution of the present embodiment, by advance depositing the corresponding second process parameter information of at least one second process
It stores up in the memory dictionary safeguarded to the first process, the first process is responsible for whether each first process parameter information in detection system is sent out
Changing, and when detecting that at least one first process parameter information changes, to each of being stored in memory dictionary
The corresponding second process parameter information of second process is traversed, and determines the corresponding mesh of changed first process parameter information
Mark the second process, i.e., changed first process parameter information is parameter information needed for the second process of target, so as to
The first process parameter information after variation is only sent in corresponding the second process of target, without being sent to remaining second process
In, so as to avoid message informing extra in system, and remaining second process is avoided to receive unnecessary parameter information,
And then reduce communication burden, improve the operational efficiency of system.
Based on the above technical solution, when memory dictionary is for storing the corresponding key-value pair information of each second process
When, " at least one second process that memory dictionary is stored according to changed first process parameter information in S110
Corresponding second process parameter information is traversed ", comprising: the second process in each value information for being stored memory dictionary
Parameter information is traversed, and the second process parameter information traversed and changed first process parameter information are carried out
Parameter matching.
Specifically, each value information stored in memory dictionary is the corresponding each second process parameter letter of the second process
Breath.The present embodiment can traverse each of each value information the second process parameter information, and the second process traversed is joined
Number information and changed first process parameter information carry out parameter matching, determine the second process parameter information for traversing with
Whether changed first process parameter information belongs to same parameters, if so, showing parameter successful match, if it is not, then table
It fails to match for bright parameter.
Illustratively, each second process parameter information of each value storage can be corresponding for the second process in memory dictionary
Each second process parameter identification, wherein the second process parameter identification can be the title of the second process parameter, or by counting
At least one of word, letter, Chinese character, symbol and figure composition, the second process parameter different for subregion.Correspondingly, originally
Embodiment can by each value information each second process parameter identification and changed first process parameter identification into
Line identifier matching shows that the two is same parameters, can determine parameter successful match at this time, otherwise parameter if mark is identical
It fails to match.
Correspondingly, " determining corresponding the second process of target of changed first process parameter information " in S120, packet
It includes: determining target value letter corresponding with the second process parameter information of changed first process parameter information successful match
Breath;Target key information is determined according to memory dictionary and target value information, and determines changed first according to target key information
Corresponding the second process of target of process parameter information.
Specifically, for each value information in memory dictionary, if the second process parameter in some value information is believed
Breath and changed first process parameter information parameter successful match can then determine that the value information is changed first
The corresponding target value information of process parameter information, and according to the corresponding relationship of key information and value information in memory dictionary, can be with
Determine the corresponding target key information of target value information.According to the second process identification (PID) of object key information acquisition, so as to by this
Corresponding second process of two process identification (PID)s is determined as corresponding the second process of target of changed first process parameter information.Together
Reason, can determine corresponding all the second processes of target of each changed first process parameter information.
Based on the above technical solution, before S110, further includes: when the second process of the first process reception is corresponding
When the second process parameter information, it whether there is corresponding second process of received second process in the first process detection memory dictionary
Mark;If the second process identification (PID) is not present in memory dictionary, by corresponding second process identification (PID) of the second process received
It stores with the second process parameter information into memory dictionary.
Specifically, the second process can join corresponding second process of the second process according to business demand and actual conditions
Number information is sent to the first process.Illustratively, in system initialisation phase, the second process of each of system by itself
Second process parameter information is sent to the first process.It, should when the second process parameter information of some the second process changes
The second process parameter information after change can be sent to the first process by the second process.When the first process receives the second process
When corresponding second process parameter information, the first process can traverse each second process mark currently stored in memory dictionary
Know, and the second currently stored process identification (PID) the second process identification (PID) corresponding with received second process is matched, determines
Whether second process is stored in current time memory dictionary.If currently stored all second process identification (PID)s of memory dictionary with
It fails to match for corresponding second process identification (PID) of received second process, then shows in memory dictionary and there is no received second
Corresponding second process identification (PID) of process, at this time can be by default storage Add function, by the second process received corresponding the
Two process identification (PID)s and the second process parameter information are stored into memory dictionary, so as to the first process can based on memory dictionary with
Second process is accurately communicated.
Based on the above technical solution, this method further include: if there are the second process identification (PID) in memory dictionary,
Corresponding history the second process parameter information of second process identification (PID) in memory dictionary and currently received current second process are joined
Number information is matched;If history the second process parameter information is with current second process parameter information, it fails to match, updates
History the second process parameter information is current second process parameter information.
Specifically, if currently stored some second process identification (PID) of memory dictionary and received second process corresponding second
Process identification (PID) successful match then shows that there are corresponding second process identification (PID)s of received second process, i.e. memory word in memory dictionary
Also it has been stored with the corresponding second process parameter information of second process in allusion quotation, can be somebody's turn to do at this time by what is stored in memory dictionary
The corresponding second process parameter information of second process, will be current as corresponding the second process of the history parameter information of second process
The corresponding second process parameter information of received second process is as the corresponding current second process parameter letter of second process
Breath.By matching each history the second process parameter information with each current second process parameter information, if history
Two process parameter informations are identical as current second process parameter information, and the quantity of history the second process parameter information and current the
The quantity of two process parameter informations is equal, then show the corresponding second process parameter information of second process there is no variation,
It may not need at this time and update memory dictionary.If history the second process parameter information and current second process parameter information be not identical,
And/or the quantity of history the second process parameter information and the quantity of current second process parameter information it is unequal, then show to match
Failure, the i.e. corresponding second process parameter information of second process change, and can update the history in memory dictionary at this time
Second process parameter information is current second process parameter information, to move to the second process parameter information in memory dictionary
State storage, communicates the first process according to the current second process parameter information of the second process, guarantees communication
Accuracy and further avoid extra message informing.
Embodiment two
Fig. 3 is a kind of flow chart of Way of Process Communication provided by Embodiment 2 of the present invention, and the present embodiment is in above-mentioned implementation
On the basis of example, " the first process receives the corresponding second process parameter information of the second process " is advanced optimized.Its
In explanation same as the previously described embodiments or corresponding term details are not described herein.
Referring to Fig. 3, Way of Process Communication provided in this embodiment specifically includes the following steps:
S210, the second process call the first process using the corresponding process parameter object of the second process as function input parameters
Preset interface in process registers function, process parameter object is registered in the first process.
Wherein, preset interface can refer to the registration interface that the first process is pre-set, externally provides, so as to second into
The corresponding second process parameter information of second process can be registered in the first process by journey by preset interface.Second process pair
The process parameter object answered is that the second process is pre-set, preset interface type, for storing the second process corresponding the
The object of two process parameter informations.Process registers function can be it is predetermined in preset interface, for by process parameter
Function of the object registration into the first process.Illustratively, process registers function can be with is defined as: RegisterStatusType
(SystemStatusTypeInfosystemStatusTypeInfo);Wherein, RegisterStatusType is process registers
The title of function, systemStatusTypeInfo are the second process pair of preset interface type SystemStatusTypeInfo
The process parameter object answered.
Illustratively, process registers function, which can be achieved by the steps of, is registered to the first process for process parameter object
In function: according to the second process parameter information in process parameter object to the first parameter sets object in preset interface into
Row initialization;The first parameter sets object after initialization is serialized, obtains the second parameter sets object, and by second
Parameter sets object is sent in the first process.
Wherein, the first parameter sets object can refer to predetermined in preparatory interface, for storing the first process
The collection object of corresponding first process parameter information.That is, each element information in the first parameter sets object is
The corresponding each first process parameter information of first process.
Specifically, in the second process using the corresponding process parameter object of the second process as function input parameters, first is called
After process registers function in the preset interface of process, joined according to the second process parameter information in process parameter object to first
Number collection object is initialized, that is, is instantiated.That is, initialization after the first parameter sets object storage be process
The second process parameter information in parameter object.The first parameter sets object after initial is serialized, to be encapsulated as
Meet the second parameter sets object of transformat, so that the second parameter sets object transfer into the first process, is realized number
According to transmission.
S220, the first process parse the process parameter object after registration, obtain the second process corresponding second into
Journey parameter information.
Specifically, the present embodiment can parse the process parameter object after first process that is registered to, so as to
The corresponding second process parameter information of the second process stored in acquisition process parameter object.
Illustratively, when receiving the second parameter sets object of the second process registers transmission, S220 may include: the
One process carries out unserializing to second set parameter object, obtains the corresponding second process parameter information of the second process.Specifically
Ground, the first process obtain the first process by carrying out unserializing and data parsing to second set parameter object
Obtain the corresponding second process parameter information of the second process stored in second set parameter object.
It, can process registers letter in the preset interface by calling the first process respectively when there are multiple second processes
Number, the corresponding process parameter object of each second process is registered in the first process so that the first process can receive it is every
The second process parameter information that a second process is sent.When the corresponding second process parameter information of some second process changes
When, which calls the process registers function in preset interface again, and corresponding process parameter object is registered to first
In process.
With the presence or absence of corresponding second process identification (PID) of the second process obtained in S230, the first process detection memory dictionary;
If the second process identification (PID) is not present in memory dictionary, by corresponding second process identification (PID) of the second process received and second
Process parameter information is stored into memory dictionary.
S240, the first process are when detecting that at least one first process parameter information changes, according to changing
The first process parameter information corresponding second process parameter information of at least one second process that memory dictionary is stored into
Row traversal.
S250, the first process determine corresponding the second process of target of changed first process parameter information, and will become
The first process parameter information after change is sent in corresponding the second process of target.
The technical solution of the present embodiment, the process registers function in preset interface that the second process passes through the first process of calling
Mode, the corresponding process parameter object of the second process is registered in the first process, so that the first process is more
The corresponding second process parameter information of the second process is quickly and easily obtained, the operational efficiency of system is further improved.
On the basis of above-mentioned each technical solution, Fig. 4 give it is a kind of applied in mobile C-arm software systems into
The flow chart of journey communication means.As shown in figure 4, using the system mode managing process in mobile C-arm software systems as first
Process, remaining process in the system is as the second process, wherein the corresponding parameter information of system mode managing process can wrap
Include but be not limited to disk space, network connection, bulb temperature, UPS (Uninterruptible Power System, uninterruptedly
Power supply) electricity, C-arm connection and the shutdown command from hardware module etc..
It is set forth in C-arm software systems by taking system mode managing process A and three second processes B, C and D as an example in Fig. 4
The process of process communication.Specific process communication process are as follows: the equal calling system condition managing process A's of second process B, C and D is pre-
If the process registers function in interface, the corresponding second process parameter information of the second process is registered in preset interface, i.e.,
Two process B register the second process parameter information 1 needed for itself by calling the process registers function in preset interface;Second
Process C registers the second process parameter information 2 needed for itself by calling the process registers function in preset interface;Second into
Journey D registers the second process parameter information 3 needed for itself by calling the process registers function in preset interface.Preset interface
System shape is sent commands to after respectively being serialized the second process parameter information 1,2 of registration and 3 corresponding collection objects
It is corresponding that state managing process A, system mode managing process A carry out second process B, C and D of parsing acquisition to received order respectively
Second process parameter information, and corresponding second process identification (PID) of second process B, C and D is not present in detecting memory dictionary
When, second process identification (PID) B, C and D and the second process parameter information 1,2 and 3 are stored into memory dictionary.System mode pipe
Reason process A is when detecting that at least one parameter information in C-arm software systems changes, system mode managing process A
Corresponding second process of changed parameter information is determined according to memory dictionary, if for example, the second process parameter information 1 is sent out
When changing, order is sent by point-to-point mode after the second process parameter information 1 after variation is packaged, will be changed
The second process parameter information 1 afterwards is sent to the second process B;Similarly, life is sent when the second process parameter information 2 changes
The second process parameter information 2 to the second process C, after changing is enabled to be sent in the second process C.Believe in the second process parameter
Breath 3 sends commands to the second process D when changing, and the second process parameter information 3 after changing is sent to the second process D
In.It thereby may be ensured that parameter information that each second process receives is the parameter information needed for itself, and then avoid
Extra message informing.
The embodiment of process communication system provided in an embodiment of the present invention below, the system and the various embodiments described above into
Journey communication means belongs to the same inventive concept, the detail content of not detailed description in the embodiment of process communication system, can
With the embodiment with reference to above-mentioned Way of Process Communication.
Embodiment three
Fig. 5 is a kind of structural schematic diagram for process communication system that the embodiment of the present invention three provides, and the present embodiment is applicable
The case where being communicated between process in software systems, the system include: the first process 310 and at least one second process
320;
Wherein, the first process 310 is used for: when detecting that at least one first process parameter information changes, according to
At least one corresponding second process of the second process 320 that changed first process parameter information stores memory dictionary
Parameter information is traversed;Determine corresponding the second process of target of changed first process parameter information, and will be after variation
The first process parameter information be sent in corresponding the second process of target.
Optionally, the first process 310 is also used to: detecting at least one first process parameter information hair in the first process
Before changing, when the first process receives the corresponding second process parameter information of the second process, detect in memory dictionary whether
There are corresponding second process identification (PID)s of received second process;If the second process identification (PID) is not present in memory dictionary, will connect
Corresponding second process identification (PID) of the second process received and the second process parameter information are stored into memory dictionary.
Optionally, the second process 320 is used for: using the corresponding process parameter object of the second process as function input parameters, being adjusted
With the process registers function in the preset interface of the first process, process parameter object is registered in the first process, wherein process
Parameter object is for storing the corresponding second process parameter information of the second process;Correspondingly, the first process 310 is also used to: to note
Process parameter object after volume is parsed, and the corresponding second process parameter information of the second process is obtained.
Optionally, process registers function is achieved by the steps of the function being registered to process parameter object in the first process
Can:
According to the second process parameter information in process parameter object to the first parameter sets object in preset interface into
Row initialization;The first parameter sets object after initialization is serialized, obtains the second parameter sets object, and by second
Parameter sets object is sent in the first process;
Correspondingly, the first process 310 is also used to: the first process carries out unserializing to second set parameter object, obtains
The corresponding second process parameter information of second process.
Optionally, the first process 310 is also used to: if there are the second process identification (PID)s in memory dictionary, by memory dictionary
In corresponding history the second process parameter information of the second process identification (PID) and currently received current second process parameter information carry out
Matching;If history the second process parameter information is with current second process parameter information, it fails to match, more new historical second into
Journey parameter information is current second process parameter information.
Optionally, memory dictionary is for storing at least one corresponding key-value pair information of the second process, wherein key-value pair letter
Key information in breath is the second process identification (PID) of the corresponding character string type of the second process;Value information in key-value pair information is the
Second process parameter information of the corresponding aggregate type of two processes.
Optionally, the first process 310 is specifically used for: the second process ginseng in each value information that memory dictionary is stored
Number information is traversed, and the second process parameter information traversed is joined with changed first process parameter information
Number matching;Determine target value corresponding with the second process parameter information of changed first process parameter information successful match
Information;Target key information is determined according to memory dictionary and target value information, and determines changed according to target key information
Corresponding the second process of target of one process parameter information.
Process communication system provided by the embodiment of the present invention, by the first process in advance by least one the second process pair
The the second process parameter information answered stores in the memory dictionary safeguarded to the first process, and the first process is responsible for each in detection system
Whether the first process parameter information changes, and when detecting that at least one first process parameter information changes, right
The corresponding second process parameter information of the second process each of is stored in memory dictionary to be traversed, and determines changed
Corresponding the second process of target of one process parameter information, i.e., changed first process parameter information are the second process of target institute
The parameter information needed, is only sent in corresponding the second process of target so as to the first process parameter information after changing,
Without being sent in remaining second process, so as to avoid message informing extra in system, and avoid remaining second into
Journey receives unnecessary parameter information, and then reduces communication burden, improves the operational efficiency of system.
Example IV
Fig. 6 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.Referring to Fig. 6, which includes:
One or more processors 410;
Memory 420, for storing one or more programs;
When one or more programs are executed by one or more processors 410, so that one or more processors 410 are realized
The Way of Process Communication as provided by any embodiment in above-described embodiment, this method comprises:
First process is when detecting that at least one first process parameter information changes, according to changed first
The corresponding second process parameter information of at least one second process that process parameter information stores memory dictionary traverses;
First process determines corresponding the second process of target of changed first process parameter information, and will be after variation
First process parameter information is sent in corresponding the second process of target.
Example;Processor 410 in terminal can be connected with memory 420 by bus or other modes, to pass through in Fig. 6
For bus connection.
Memory 420 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer
Sequence and module, such as the corresponding program instruction of Way of Process Communication in the embodiment of the present invention.Processor 410 passes through operation storage
Software program and instruction in memory 420 are realized thereby executing the various function application and data processing of terminal
Above-mentioned Way of Process Communication.
Memory 420 mainly includes storing program area and storage data area, wherein storing program area can store operation system
Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This
Outside, memory 420 may include high-speed random access memory, can also include nonvolatile memory, for example, at least one
Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 420 can be into one
Step includes the memory remotely located relative to processor 410, these remote memories can pass through network connection to terminal.On
The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
The Way of Process Communication that the terminal and above-described embodiment that the present embodiment proposes propose belongs to same inventive concept, does not exist
The technical detail of detailed description can be found in above-described embodiment in the present embodiment, and the present embodiment has executive process communication means
Identical beneficial effect.
Embodiment five
The present embodiment provides a kind of computer readable storage mediums, are stored thereon with computer program, and the program is processed
Such as Way of Process Communication provided by any embodiment of the invention is realized when device executes, this method comprises:
First process is when detecting that at least one first process parameter information changes, according to changed first
The corresponding second process parameter information of at least one second process that process parameter information stores memory dictionary traverses;
First process determines corresponding the second process of target of changed first process parameter information, and will be after variation
First process parameter information is sent in corresponding the second process of target.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium can be for example but not limited to: electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or
Any above combination of person.The more specific example (non exhaustive list) of computer readable storage medium includes: with one
Or the electrical connections of multiple conducting wires, portable computer diskette, hard disk, random access memory (RAM), read-only memory (ROM),
Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light
Memory device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer readable storage medium can
With to be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or
Person is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including but not limited to:
Wirelessly, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, programming language include object oriented program language, and such as Java, Smalltalk, C++ further include
Conventional procedural programming language-such as " C " language or similar programming language.Program code can be fully
Execute, partly execute on the user computer on the user computer, being executed as an independent software package, partially with
Part executes on the remote computer or executes on a remote computer or server completely on the computer of family.It is being related to far
In the situation of journey computer, remote computer can pass through the network of any kind, including local area network (LAN) or wide area network
(WAN), it is connected to subscriber computer, or, it may be connected to outer computer (such as led to using ISP
Cross internet connection).
Will be appreciated by those skilled in the art that each module of the above invention or each step can use general meter
Device is calculated to realize, they can be concentrated on single computing device, or be distributed in network constituted by multiple computing devices
On, optionally, they can be realized with the program code that computer installation can be performed, so as to be stored in storage
It is performed by computing device in device, perhaps they are fabricated to each integrated circuit modules or will be more in them
A module or step are fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and
The combination of software.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (10)
1. a kind of Way of Process Communication characterized by comprising
First process is when detecting that at least one first process parameter information changes, according to changed first process
The corresponding second process parameter information of at least one second process that parameter information stores memory dictionary traverses;
First process determines corresponding the second process of target of changed first process parameter information, and will be after variation
First process parameter information is sent in corresponding the second process of target.
2. the method according to claim 1, wherein first process detect at least one first into
Before journey parameter information changes, further includes:
When the corresponding second process parameter information of the second process of first process reception, the first process detection memory word
It whether there is corresponding second process identification (PID) of received second process in allusion quotation;
If in the memory dictionary be not present second process identification (PID), by the second process corresponding second received into
Journey mark and the second process parameter information are stored into memory dictionary.
3. according to the method described in claim 2, it is characterized in that, the first process receives the corresponding second process ginseng of the second process
Number information, comprising:
Second process calls the default of the first process using the corresponding process parameter object of second process as function input parameters
The process parameter object is registered in first process by the process registers function in interface, wherein the process parameter
Object is for storing the corresponding second process parameter information of second process;
First process parses the process parameter object after registration, obtains corresponding second process of second process
Parameter information.
4. according to the method described in claim 3, it is characterized in that, the process registers function is achieved by the steps of institute
The process parameter object of stating is registered to the function in first process:
According to the second process parameter information in the process parameter object to the first parameter sets pair in the preset interface
As being initialized;
The first parameter sets object after initialization is serialized, obtains the second parameter sets object, and by described second
Parameter sets object is sent in first process;
Correspondingly, first process parses the process parameter object after registration, and it is corresponding to obtain second process
Second process parameter information, comprising:
First process carries out unserializing to the second set parameter object, obtains second process corresponding second
Process parameter information.
5. according to the method described in claim 2, it is characterized by further comprising:
If there are second process identification (PID)s in the memory dictionary, by the second process identification (PID) described in the memory dictionary
Corresponding history the second process parameter information is matched with currently received current second process parameter information;
If history the second process parameter information is with the current second process parameter information, it fails to match, described in update
History the second process parameter information is the current second process parameter information.
6. the method according to claim 1, wherein the memory dictionary is for storing at least one second process
Corresponding key-value pair information, wherein the key information in the key-value pair information is the corresponding character string type of second process
The second process identification (PID);Value information in the key-value pair information is the second process of the corresponding aggregate type of second process
Parameter information.
7. according to the method described in claim 6, it is characterized in that, according to changed first process parameter information to memory
The corresponding second process parameter information of at least one second process that dictionary is stored is traversed, comprising:
Second that the second process parameter information in each value information that memory dictionary is stored is traversed, and will traversed
Process parameter information and changed first process parameter information carry out parameter matching;
Correspondingly, corresponding the second process of target of changed first process parameter information is determined, comprising:
Determine target value letter corresponding with the second process parameter information of changed first process parameter information successful match
Breath;
Target key information is determined according to the memory dictionary and the target value information, and is determined and sent out according to the target key information
Corresponding the second process of target of first process parameter information of changing.
8. a kind of process communication system, which is characterized in that the system comprises: the first process and at least one second process;
Wherein, first process is used for: when detecting that at least one first process parameter information changes, according to generation
The corresponding second process parameter letter of at least one second process that first process parameter information of variation stores memory dictionary
Breath is traversed;Determine corresponding the second process of target of changed first process parameter information, and by first after variation
Process parameter information is sent in corresponding the second process of target.
9. a kind of terminal, which is characterized in that the terminal includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now Way of Process Communication as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The Way of Process Communication as described in any in claim 1-7 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910164392.8A CN109918215B (en) | 2019-03-05 | 2019-03-05 | Process communication method, system, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910164392.8A CN109918215B (en) | 2019-03-05 | 2019-03-05 | Process communication method, system, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109918215A true CN109918215A (en) | 2019-06-21 |
CN109918215B CN109918215B (en) | 2023-06-30 |
Family
ID=66963430
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910164392.8A Active CN109918215B (en) | 2019-03-05 | 2019-03-05 | Process communication method, system, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109918215B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113296967A (en) * | 2020-02-21 | 2021-08-24 | 西安诺瓦星云科技股份有限公司 | Process management method, device and system based on embedded operating system |
WO2022188265A1 (en) * | 2021-03-09 | 2022-09-15 | 广州小鹏汽车科技有限公司 | Data management method and device and electronic controller |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5881286A (en) * | 1994-07-22 | 1999-03-09 | Sun Microsystems, Inc. | Method and apparatus for space efficient inter-process communications |
US20030222917A1 (en) * | 2002-05-30 | 2003-12-04 | Intel Corporation | Mobile virtual desktop |
CN101354695A (en) * | 2008-09-19 | 2009-01-28 | 杭州华三通信技术有限公司 | Method, system and distributed apparatus of communication between processes |
CN105446853A (en) * | 2015-11-03 | 2016-03-30 | 深圳市金立通信设备有限公司 | Application management method and terminal |
US20170279657A1 (en) * | 2016-03-22 | 2017-09-28 | International Business Machines Corporation | Communicating between components in business process management systems |
-
2019
- 2019-03-05 CN CN201910164392.8A patent/CN109918215B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5881286A (en) * | 1994-07-22 | 1999-03-09 | Sun Microsystems, Inc. | Method and apparatus for space efficient inter-process communications |
US20030222917A1 (en) * | 2002-05-30 | 2003-12-04 | Intel Corporation | Mobile virtual desktop |
CN101354695A (en) * | 2008-09-19 | 2009-01-28 | 杭州华三通信技术有限公司 | Method, system and distributed apparatus of communication between processes |
CN105446853A (en) * | 2015-11-03 | 2016-03-30 | 深圳市金立通信设备有限公司 | Application management method and terminal |
US20170279657A1 (en) * | 2016-03-22 | 2017-09-28 | International Business Machines Corporation | Communicating between components in business process management systems |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113296967A (en) * | 2020-02-21 | 2021-08-24 | 西安诺瓦星云科技股份有限公司 | Process management method, device and system based on embedded operating system |
CN113296967B (en) * | 2020-02-21 | 2024-06-04 | 西安诺瓦星云科技股份有限公司 | Process management method, device and system based on embedded operating system |
WO2022188265A1 (en) * | 2021-03-09 | 2022-09-15 | 广州小鹏汽车科技有限公司 | Data management method and device and electronic controller |
Also Published As
Publication number | Publication date |
---|---|
CN109918215B (en) | 2023-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9288538B2 (en) | Methods and apparatus for conveying a delivery schedule to mobile terminals | |
CN111198813B (en) | Interface testing method and device | |
CN105049502B (en) | The method and apparatus that device software updates in a kind of cloud network management system | |
CN108566290A (en) | service configuration management method, system, storage medium and server | |
US9596313B2 (en) | Method, terminal, cache server and system for updating webpage data | |
CN110633442A (en) | Pushing method and device and electronic equipment | |
US20130055271A1 (en) | Apparatus and method for controlling polling | |
US10469620B2 (en) | Method for transferring a new software version to at least one electricity meter via a communication network | |
CN109391673A (en) | A kind of method, system and the terminal device of management update file | |
WO2017219519A1 (en) | Method, apparatus, and system for controlling device | |
CN109918215A (en) | A kind of Way of Process Communication, system, terminal and storage medium | |
CN109348434A (en) | A kind of sending method of scene information, sending device and terminal device | |
CN110457132B (en) | Method and device for creating functional object and terminal equipment | |
CN103457748A (en) | Data transmission method, system and device | |
CN108462894A (en) | Direct broadcasting room broadcast processing method, device and readable storage medium storing program for executing | |
CN109787789B (en) | Compatibility management method, device and equipment for software upgrading and storage medium | |
CN109815056A (en) | Realize method, apparatus, storage medium and the equipment of message queue reconnection | |
CN113220342A (en) | Centralized configuration method and device, electronic equipment and storage medium | |
CN105676989A (en) | Electricity-saving method and device of mobile terminal | |
US20230163998A1 (en) | Data processing method, device, electronic device and computer readable medium | |
CN105677510A (en) | Monitoring method of communication processor and intelligent terminal | |
CN102693434B (en) | Communication apparatus and method for interface layer of radio frequency identification device | |
CN113783826B (en) | Micro-service exception handling method and device | |
CN109947630B (en) | Fault notification method, device and storage medium | |
CN113612659A (en) | Equipment networking test method and device, electronic equipment 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 | ||
CB02 | Change of applicant information |
Address after: 201807 Shanghai City, north of the city of Jiading District Road No. 2258 Applicant after: Shanghai Lianying Medical Technology Co.,Ltd. Address before: 201807 Shanghai City, north of the city of Jiading District Road No. 2258 Applicant before: SHANGHAI UNITED IMAGING HEALTHCARE Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |