CN110008036A - Data transmission method and device - Google Patents
Data transmission method and device Download PDFInfo
- Publication number
- CN110008036A CN110008036A CN201910123154.2A CN201910123154A CN110008036A CN 110008036 A CN110008036 A CN 110008036A CN 201910123154 A CN201910123154 A CN 201910123154A CN 110008036 A CN110008036 A CN 110008036A
- Authority
- CN
- China
- Prior art keywords
- target
- communication data
- data
- address information
- target process
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The problem of disclosure provides a kind of data transmission method and device, is related to field of computer technology, is able to solve terminal when carrying different system platform, and each process communicate that required code is different, the higher cost safeguarded to each code.The specific technical proposal is: obtaining the corresponding target address information of target process;Judge whether the target process is online, obtains judging result;According to the judging result and the target address information, Xiang Suoshu target process sends communication data.Whether the disclosure is online by target process, communication data is sent to target process according to target address information, avoid the case where needing different code during different system platform runs each process, so that in each system platform when running each process, each process can be communicated by unified code, the cost safeguarded to code is reduced, the efficiency and flexibility safeguarded to code are improved.
Description
Technical field
This disclosure relates to field of computer technology more particularly to data transmission method and device.
Background technique
With the continuous development of science and technology, in the process of running, the number for the process that terminal is loaded is not yet for terminal
It is disconnected to increase, it can be communicated by the way of shared drive by pre-set shared memory space between each process.
In the related technology, each process can the shared drive to same mark be written and read visit according to the rule of agreement
It asks, to obtain the message of other processes write-in or the message for needing to send to other processes is written, thus between realizing process
Communication mechanism.
But terminal, when carrying different system platform, each process carries out communicating required code difference, to not homology
The higher cost that the corresponding code of system platform is safeguarded.
Summary of the invention
The embodiment of the present disclosure provides a kind of data transmission method and device, can solve terminal and carry different system platform
When, the problem of the higher cost safeguarded to the corresponding code of different system platform.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of data transmission method is provided, this method comprises:
Obtain the corresponding target address information of target process;
Judge whether the target process is online, obtains judging result;
According to the judging result and the target address information, Xiang Suoshu target process sends communication data.
In one embodiment, before the corresponding target address information of the acquisition target process, the method is also wrapped
It includes:
Create interprocess communication IPC object;
Source address information corresponding with originating process is obtained from shared drive by the IPC object;
The corresponding relationship between the source address information and originating process mark is sent to the shared drive.
In one embodiment, before the corresponding target address information of the acquisition target process, the method is also wrapped
It includes:
The corresponding initial processes information of multiple registered processes is obtained from the shared drive;
According to multiple initial processes information, choose target process from multiple registered processes, the target process be with
The process that the originating process is communicated;
The corresponding target address information of the acquisition target process, comprising:
According to the corresponding initial processes information of the target process, the target address information is obtained.
In one embodiment, described according to the judging result and the target address information, Xiang Suoshu target process
Send communication data, comprising:
According to the judging result and the target address information, by synchronizing transmission interface or asynchronous transmission interface to institute
It states target process and sends the communication data.
In one embodiment, described according to the judging result and the target address information, Xiang Suoshu target into
After journey sends communication data, the method also includes:
If sending the communication data to the target process by the synchronous transmission interface, the target process is received
The synchronous of feedback receives information.
In one embodiment, before the corresponding target address information of the acquisition target process, the method is also wrapped
It includes:
According to the function that the target process is realized, the communication data is generated.
According to the second aspect of an embodiment of the present disclosure, a kind of data transmission method is provided, this method comprises:
Receive communication data;
Message queue is added in the communication data;
Distribute each communication data in the message queue to each data handling component, so that each data processing group
Part handles the communication data of distribution.
In one embodiment, before the addition message queue by the communication data, the method also includes:
Judge whether the data type of the communication data is consistent with pre-set target data type, the number of targets
It is the data type that originating process is monitored according to type;
It is described that message queue is added in the communication data, comprising:
It, will be described in communication data addition if the data type of the communication data is consistent with the target data type
Message queue.
According to the third aspect of an embodiment of the present disclosure, a kind of data transmission device is provided, described device includes:
First obtains module, for obtaining the corresponding target address information of target process;
Judgment module obtains judging result for judging whether the target process is online;
First sending module, for according to the judging result and the target address information, Xiang Suoshu target process hair
Send communication data.
In one embodiment, described device further include:
Creation module, for creating interprocess communication IPC object;
Second obtains module, for obtaining source address corresponding with originating process from shared drive by the IPC object
Information;
Second sending module, for sending pair between the source address information and originating process mark to the shared drive
It should be related to.
In one embodiment, described device further include:
Third obtains module, for obtaining the corresponding initial processes of multiple registered processes from the shared drive
Information;
Module is chosen, it is described for choosing target process from multiple registered processes according to multiple initial processes information
Target process is the process communicated with the originating process;
Described first obtains module, is specifically used for according to the corresponding initial processes information of the target process, described in acquisition
Target address information.
In one embodiment, first sending module is specifically used for according to the judging result and the target
Location information sends the communication data to the target process by synchronous transmission interface or asynchronous transmission interface.
In one embodiment, described device further include:
Receiving module, if being connect for sending the communication data to the target process by the synchronous transmission interface
It receives the synchronous of target process feedback and receives information.
In one embodiment, described device further include:
Generation module, the function for being realized according to the target process, generates the communication data.
According to a fourth aspect of embodiments of the present disclosure, a kind of data transmission device is provided, described device includes:
Receiving module, for receiving communication data;
Adding module, for message queue to be added in the communication data;
Sending module, for distributing each communication data in the message queue to each data handling component, so that
Each data handling component handles the communication data of distribution.
In one embodiment, described device further include:
Judgment module, for judge the communication data data type whether with pre-set target data type one
It causes, the target data type is the data type that originating process is monitored;
The adding module, if the data type specifically for the communication data is consistent with the target data type,
The message queue is added in the communication data.
The data transmission method and device that the embodiment of the present disclosure provides are believed by obtaining the corresponding destination address of target process
Breath, and judge whether the target process is online, judging result is obtained, is believed further according to judging result and destination address
Breath sends communication data to target process.Whether it is online by target process, according to target address information to target
Process sends communication data, avoids the case where needing different code during different system platform runs each process,
So that each process can be communicated by unified code in each system platform when running each process, reduce
To the cost that code is safeguarded, the efficiency and flexibility safeguarded to code are improved.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is the schematic diagram of data transmitting scene involved in a kind of open data transmission method provided;
Fig. 2 is that the embodiment of the present disclosure provides a kind of step flow chart of data transmission method;
Fig. 3 is that another embodiment of the disclosure provides a kind of step flow chart of data transmission method;
Fig. 4 is that the another embodiment of the disclosure provides a kind of step flow chart of data transmission method;
Fig. 5 is that the another embodiment of the disclosure provides a kind of step flow chart of data transmission method;
Fig. 6 is a kind of structure chart for data transmission device that the embodiment of the present disclosure provides;
Fig. 7 is the structure chart for another data transmission device that the embodiment of the present disclosure provides;
Fig. 8 is the structure chart for another data transmission device that the embodiment of the present disclosure provides;
Fig. 9 is the structure chart for another data transmission device that the embodiment of the present disclosure provides;
Figure 10 is the structure chart for another data transmission device that the embodiment of the present disclosure provides;
Figure 11 is the structure chart for another data transmission device that the embodiment of the present disclosure provides;
Figure 12 is the structure chart for another data transmission device that the embodiment of the present disclosure provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
The schematic diagram of data transmitting scene involved in a kind of data transmission method that Fig. 1 provides for the disclosure;Such as Fig. 1 institute
Show, which includes: shared drive 110 and at least two processes 120.
Wherein, each process can obtain data from shared drive, can also send data to shared content.Moreover,
Communication data can also be mutually sent and received between each process.
During each process is in communication with each other, some process can send communication data to another process, then may be used
The process of communication data will be sent as originating process, and the process of communication data will be received as target process.
Moreover, IPC (Inter-Process can be generated during running for the first time in each process
Communication, interprocess communication) object, so as to carry out data interaction by IPC object and shared drive.
Specifically, originating process by IPC object, can obtain the address letter of multiple associated processes from shared drive
Breath that is to say that needs and originating process carry out the address information of each process of data communication.It needs to send out to some process when determining
, can be using the process as target process when sending communication data, and searched with obtaining target from the address information of multiple processes
Whether online location information judges target process further according to received historical data, can if target process is online
To send communication data to target process according to target address information.
Corresponding, target process can receive the communication data of originating process transmission, and received communication data is cached
In pre-set message queue, then message queue can according to the time of each communication data, according to chronological order,
Different communication datas is sent to the data handling component of different function respectively, allows target process according to each communication number
According to completing operation indicated by each communication data.
It should be noted that can store the identification information of each process, address information, port and each in shared drive
The identification information of a associated process.For example, referring to table 1, the corresponding identification information of each process is shown in table 1
(nameId), address information (ip (Intemet Protocol, Internet protocol)), port (port) and it is each it is associated into
The identification information (related1, related2 and relatedN) of journey.In addition, each process in shared drive can at most with
100 processes are associated.
Table 1
| nameId | ip | port | related1 | related2 | RelatedN (Max:100) |
| nameId | ip | port | related1 | related2 | RelatedN (Max:100) |
| nameId | ip | port | related1 | related2 | RelatedN (Max:100) |
| ... | ip | port | related1 | related2 | RelatedN (Max:100) |
The embodiment of the present disclosure provides a kind of data transmission method, as shown in Fig. 2, the data transmission method includes following step
It is rapid:
201, the corresponding target address information of target process is obtained.
Terminal in the process of running, can be total to the multiple processes of load operating between each process by being stored in
The corresponding process identification (PID) of each process in memory and address information are enjoyed, is in communication with each other.Illustrate for simplicity, it can be by intercommunication
The process of information is sent during letter as originating process, and will receive the process of information as target process, corresponding, target
Address information is used to indicate the address information of target process.
Therefore, before sending communication data to target process, the corresponding target address information of available target process.
Specifically, originating process can choose target from pre-stored multiple association process by corresponding IPC object
Process, and analysis extraction is carried out to the corresponding initial processes information of target process, obtain target address information.
It should be noted that in practical applications, originating process can create corresponding IPC object when online for the first time,
And the initial processes information of association process is obtained from shared drive by the IPC object, so as to any one be associated with into
It, can be according to the corresponding address information of initial processes acquisition of information when journey sends communication data.
Wherein, association process is the process for needing to carry out data communication with originating process.Moreover, initial processes information can wrap
Process identification (PID) and address information are included, certainly can also include other data, the embodiment of the present disclosure does not limit this.
In addition, in practical applications, target address information can be obtained according to the process identification (PID) of target process.For example, can
It searches to obtain corresponding initial processes information with the process identification (PID) according to target process, thus according to the initial processes acquisition of information
Target address information.
202, judge whether target process is online, obtain judging result.
After obtaining target address information, it is also necessary to determine whether target process is online, so as to target process
It can receive the communication data of originating process transmission.Therefore, before sending communication data to target process, originating process can pass through
Corresponding IPC object determines whether target process is online.
Specifically, it can be searched in the multiple message received, judge in the message received whether to include for referring to
Show the online notification information of target process, if including the online notification information in the message received, illustrates that target process is in
Presence.
But if in the message received not including online notification information, illustrate that target process is not in presence.
In addition, if in the message received including online notification information corresponding with target process, be also included within receive it is online
The offline notification information received after notification information then illustrates that target process is still not in presence.
203, according to judging result and target address information, communication data is sent to target process.
If judging result instruction target process is online, originating process can be by IPC object according to target
Location information sends communication data to target process, so that target process can execute and communication data phase according to the communication data
Corresponding operation.
Specifically, if the IPC object of originating process determines that target process is online, can believed according to destination address
Breath is packaged communication data, the communication data after being encapsulated, to be sent out according to the destination address information to target process
Send communication data.
The data transmission method that the embodiment of the present disclosure provides, by obtaining the corresponding target address information of target process, and
Judge whether the target process is online, obtain judging result, further according to judging result and target address information, to mesh
Mark process sends communication data.Whether it is online by target process, is sent out according to target address information to target process
Communication data is sent, the case where needing different code during different system platform runs each process is avoided, so that
When running each process, each process can be communicated each system platform by unified code, be reduced to code
The cost safeguarded improves the efficiency and flexibility safeguarded to code.
Based on the data transmission method that the corresponding embodiment of above-mentioned Fig. 2 provides, another embodiment of the disclosure provides a kind of number
According to transmission method, this method can be applied to terminal device, for example, sending device can be terminal device or network server
Deng receiving device is also possible to terminal device or network server etc..The present embodiment is illustrated for sending communication data,
It does not represent the disclosure and is confined to this.Referring to shown in Fig. 3, data transmission method provided in this embodiment the following steps are included:
301, to the corresponding relationship between shared drive transmission source address information and originating process mark.
Each process of terminal loads can pass through the corresponding IPC object of each process and pre-set shared drive
It is communicated.And before each process is communicated, it needs to send by the IPC object of each process to shared drive each
Corresponding relationship between the address information and process identification (PID) of process, so that in the next steps, each process can be right according to this
It should be related to the address information for searching other processes.
Wherein, IPC object is used to establish the mechanism that bottom communication is carried out with other target process for possessing IPC object.
Optionally, can create interprocess communication IPC object, and obtained from shared drive by IPC object and source into
The corresponding source address information of journey, the corresponding relationship between shared drive transmission source address information and originating process mark.
Specifically, before originating process is communicated with target process, IPC pairs can be created according to pre-set interface
As, and after the terminal loads originating process, it can be by the IPC object with obtaining source corresponding with originating process from shared drive
Location information.
Corresponding, originating process can establish the corresponding relationship between originating process mark and source address information, and pass through source
The IPC object of process sends the corresponding relationship to shared drive.It further, can also be to while sending corresponding relationship
Shared drive sends the relevant information of originating process, thus sent to shared drive be made of corresponding relationship and relevant information it is initial
Progress information.
302, target process is chosen from shared drive.
Wherein, target process is the process communicated with originating process.
Due to being stored with the corresponding initial processes information of multiple registered processes in shared drive, and originating process only need with
One or several processes in multiple registered processes are communicated, then originating process can be chosen from shared drive target into
Journey, so that in the next steps, data communication can be carried out with target process.
Optionally, the corresponding initial processes information of multiple registered processes, and root can be obtained from shared drive
According to multiple initial processes information, target process is chosen from multiple registered processes.
Specifically, originating process can obtain the first of each registered process by corresponding IPC object from shared drive
Beginning progress information, and according to pre-set related information, from the corresponding initial processes information of multiple processes, searches and be associated with
The initial processes information that information matches, to obtain process corresponding to multiple initial processes information to match, and then will
Each corresponding registered process is as target process.
303, the function of being realized according to target process generates communication data.
Since different processes can execute different operations, to realize different functions.Therefore, originating process can root
According to the function that needs are realized, the process different to other sends communication data.
Correspondingly, before sending communication data to target process, the function that can need to realize according to originating process, namely
It is the function that target process can be realized, generates the communication data that instruction target process executes corresponding operating.
304, according to the corresponding initial processes information of target process, target address information is obtained.
305, judge whether target process is online, obtain judging result.
Due to the process of step 304 to step 305, similar with the process of step 201 to step 202, details are not described herein.
306, according to judging result and target address information, by synchronous transmission interface or asynchronous transmission interface to target into
Journey sends communication data.
This step 306 is similar with step 203, and details are not described herein.
It should be noted that due to being previously provided with synchronous transmission interface and asynchronous transmission interface, originating process can be called
Different interfaces sends communication data.Communication data is sent according to synchronous transmission interface, then after sending communication data, this is same
Step transmission interface can be blocked, until receiving the source synchronous receiver of target process feedback;But it is connect according to asynchronous transmission
Mouth sends the communication data, then without waiting for the information of target process feedback.
If 307, sending communication data to target process by synchronous transmission interface, receives synchronizing for target process feedback and connect
It collects mail and ceases.
Due to sending communication data to target process using synchronous transmission interface within step 306, then target process can be with
Information is received to originating process feedback synchronization according to the communication data, it, can be true if originating process receives the synchronization and receives information
Recognize target process and receive communication data, and sends subsequent other communication datas to other processes.
The data transmission method that the embodiment of the present disclosure provides, by obtaining the corresponding target address information of target process, and
Judge whether the target process is online, obtain judging result, further according to judging result and target address information, to mesh
Mark process sends communication data.Whether it is online by target process, is sent out according to target address information to target process
Communication data is sent, the case where needing different code during different system platform runs each process is avoided, so that
When running each process, each process can be communicated each system platform by unified code, be reduced to code
The cost safeguarded improves the efficiency and flexibility safeguarded to code.
The embodiment of the present disclosure provides a kind of data transmission method, as shown in figure 4, the data transmission method includes following step
It is rapid:
401, communication data is received.
Corresponding with the affiliated embodiment of Fig. 2 to Fig. 3, after sending communication data, target process can then connect originating process
The communication data is received, to execute corresponding operation according to communication data.
It should be noted that target process after the corresponding IPC object of online creation, needs to be infused by IPC correspondence
Volume determines the information for needing to monitor, to monitor the communication data to match with data type according to the data type of registration.
402, message queue is added in communication data.
Wherein, which is pre-set message queue corresponding with target process, for storing target process
Received each communication data.
After the IPC object of target process receives communication data, communication data can be added to pre-set message team
In column, so as in the next steps, can by the different communication data distribution in message queue to different processing components so that
Target process can execute corresponding operation according to communication data.
403, each communication data into each data handling component dispatch messages queue, so that each data processing group
Part handles the communication data of distribution.
After message queue is added in received communication data, with the message queue manager pair for managing message queues
As can the function according to corresponding to each communication data, the data handling component of Xiang Butong distributes each communication data so that
Target process can execute corresponding operation according to each communication data.
Specifically, message queue manager object can be according to the time for receiving each communication data, according to from front to back
Sequence, the function of the realization in conjunction with required for each communication data, the message processing function of Xiang Butong distributes each communication data,
Message processing function handles received communication data.
By receiving communication data, and message is added in communication data by the data transmission method that the embodiment of the present disclosure provides
Queue, last each communication data into each data handling component dispatch messages queue, so that each data handling component
The communication data of distribution is handled.By the way that each communication data in message queue is distributed to the corresponding number of different processes
According to processing component, so that each process can receive the communication data that different processes are sent, avoids and transported in different system platform
The case where needing different code during each process of row, so that in each system platform when running each process, it is each
Process can be communicated by unified code, reduced the cost safeguarded to code, improved and tie up to code
The efficiency and flexibility of shield.
Based on the data transmission method that the corresponding embodiment of above-mentioned Fig. 4 provides, another embodiment of the disclosure provides a kind of number
According to transmission method, this method can be applied to terminal device, for example, sending device can be terminal device or network server
Deng receiving device is also possible to terminal device or network server etc..The present embodiment is illustrated for receiving communication data,
It does not represent the disclosure and is confined to this.Referring to Figure 5, data transmission method provided in this embodiment the following steps are included:
501, communication data is received.
This step 501 is similar with step 401, and details are not described herein.
502, judge whether the data type of communication data is consistent with pre-set target data type.
Wherein, target data type is the data type that originating process is monitored.
After receiving communication data, it is also necessary to judge whether the data type of communication data is consistent with target data type,
Avoid the data type of communication data inconsistent with target data type, cause target process can not to received communication data into
The case where row processing.
Specifically, the data type of communication data can be first determined, and by determining data type and pre-set mesh
Mark data type is compared, and judges whether the two is consistent.If the two is consistent, illustrate that communication data is that target process needs to supervise
The data listened can execute step 503;But if the two is inconsistent, the communication data can be abandoned.
If 503, the data type of communication data is consistent with target data type, message queue is added in communication data.
504, each communication data into each data handling component dispatch messages queue, so that each data processing group
Part handles the communication data of distribution.
Due to the process of step 503 to step 504, similar with the process of step 402 to step 403, details are not described herein.
By receiving communication data, and message is added in communication data by the data transmission method that the embodiment of the present disclosure provides
Queue, last each communication data into each data handling component dispatch messages queue, so that each data handling component
The communication data of distribution is handled.By the way that each communication data in message queue is distributed to the corresponding number of different processes
According to processing component, so that each process can receive the communication data that different processes are sent, avoids and transported in different system platform
The case where needing different code during each process of row, so that in each system platform when running each process, it is each
Process can be communicated by unified code, reduced the cost safeguarded to code, improved and tie up to code
The efficiency and flexibility of shield.
It is following for disclosure device reality based on data transmission method described in the corresponding embodiment of above-mentioned Fig. 2 and Fig. 3
Example is applied, can be used for executing embodiments of the present disclosure.
The embodiment of the present disclosure provides a kind of data transmission device, as shown in fig. 6, the data transmission device includes: first to obtain
Modulus block 601, judgment module 602 and the first sending module 603;
First obtains module 601, for obtaining the corresponding target address information of target process;
Judgment module 602 obtains judging result for judging whether the target process is online;
First sending module 603, for the target address information, being sent according to the judgment result to the target process logical
Letter data.
As shown in fig. 7, in one embodiment, the device further include:
Creation module 604, for creating interprocess communication IPC object;
Second obtains module 605, for obtaining source address corresponding with originating process from shared drive by the IPC object
Information;
Second sending module 606, for sending pair between the source address information and originating process mark to the shared drive
It should be related to.
As shown in figure 8, in one embodiment, the device further include:
Third obtain module 607, for obtained from the shared drive multiple registered processes it is corresponding initially into
Journey information;
Module 608 is chosen, for choosing target process from multiple registered processes according to multiple initial processes information,
The target process is the process communicated with the originating process;
The first acquisition module 601, is specifically used for obtaining the target according to the corresponding initial processes information of the target process
Address information.
In one embodiment, first sending module 603 is specifically used for believing with the destination address according to the judgment result
Breath sends the communication data to the target process by synchronous transmission interface or asynchronous transmission interface.
As shown in figure 9, in one embodiment, the device further include:
Receiving module 609, if receiving should for sending the communication data to the target process by the synchronization transmission interface
The synchronous of target process feedback receives information.
As shown in Figure 10, in one embodiment, the device further include:
Generation module 610, the function for being realized according to the target process, generates the communication data.
The data transmission device that the embodiment of the present disclosure provides, by obtaining the corresponding target address information of target process, and
Judge whether the target process is online, obtain judging result, further according to judging result and target address information, to mesh
Mark process sends communication data.Whether it is online by target process, is sent out according to target address information to target process
Communication data is sent, the case where needing different code during different system platform runs each process is avoided, so that
When running each process, each process can be communicated each system platform by unified code, be reduced to code
The cost safeguarded improves the efficiency and flexibility safeguarded to code.
It is following for disclosure device reality based on data transmission method described in the corresponding embodiment of above-mentioned Fig. 4 and Fig. 5
Example is applied, can be used for executing embodiments of the present disclosure.
The embodiment of the present disclosure provides a kind of data transmission device, and as shown in figure 11, which includes: reception mould
Block 1101, adding module 1102 and sending module 1103;
Receiving module 1101, for receiving communication data;
Adding module 1102, for message queue to be added in the communication data;
Sending module 1103 makes for distributing each communication data in the message queue to each data handling component
Each data handling component is obtained to handle the communication data of distribution.
As shown in figure 12, in one embodiment, the device further include:
Judgment module 1104, for judge the communication data data type whether with pre-set target data type
Unanimously, which is the data type that originating process is monitored;
The adding module 1102 will if the data type specifically for the communication data is consistent with the target data type
The message queue is added in the communication data.
By receiving communication data, and message is added in communication data by the data transmission device that the embodiment of the present disclosure provides
Queue, last each communication data into each data handling component dispatch messages queue, so that each data handling component
The communication data of distribution is handled.By the way that each communication data in message queue is distributed to the corresponding number of different processes
According to processing component, so that each process can receive the communication data that different processes are sent, avoids and transported in different system platform
The case where needing different code during each process of row, so that in each system platform when running each process, it is each
Process can be communicated by unified code, reduced the cost safeguarded to code, improved and tie up to code
The efficiency and flexibility of shield.
Based on data transmission method described in the corresponding embodiment of above-mentioned Fig. 2 to Fig. 5, the embodiment of the present disclosure is also provided
A kind of computer readable storage medium, for example, non-transitorycomputer readable storage medium can be read-only memory (English:
Read Only Memory, ROM), random access memory (English: Random Access Memory, RAM), CD-ROM, magnetic
Band, floppy disk and optical data storage devices etc..It is stored with computer instruction on the storage medium, for executing above-mentioned Fig. 2 to Fig. 5 pairs
Data transmission method described in the embodiment answered, details are not described herein again.
Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (10)
1. a kind of data transmission method, which is characterized in that the described method includes:
Obtain the corresponding target address information of target process;
Judge whether the target process is online, obtains judging result;
According to the judging result and the target address information, Xiang Suoshu target process sends communication data.
2. the method according to claim 1, wherein in the corresponding target address information of the acquisition target process
Before, the method also includes:
Create interprocess communication IPC object;
Source address information corresponding with originating process is obtained from shared drive by the IPC object;
The corresponding relationship between the source address information and originating process mark is sent to the shared drive.
3. according to the method described in claim 2, it is characterized in that, in the corresponding target address information of the acquisition target process
Before, the method also includes:
The corresponding initial processes information of multiple registered processes is obtained from the shared drive;
According to multiple initial processes information, choose target process from multiple registered processes, the target process be with it is described
The process that originating process is communicated;
The corresponding target address information of the acquisition target process, comprising:
According to the corresponding initial processes information of the target process, the target address information is obtained.
4. the method according to claim 1, wherein described believe according to the judging result and the destination address
Breath, Xiang Suoshu target process send communication data, comprising:
According to the judging result and the target address information, by synchronizing transmission interface or asynchronous transmission interface to the mesh
Mark process sends the communication data.
5. according to the method described in claim 4, it is characterized in that, described according to the judging result and the destination address
Information, after Xiang Suoshu target process sends communication data, the method also includes:
If sending the communication data to the target process by the synchronous transmission interface, the target process feedback is received
Synchronous receive information.
6. method according to any one of claims 1 to 5, which is characterized in that in the corresponding target of the acquisition target process
Before address information, the method also includes:
According to the function that the target process is realized, the communication data is generated.
7. a kind of data transmission method, which is characterized in that the described method includes:
Receive communication data;
Message queue is added in the communication data;
Distribute each communication data in the message queue to each data handling component, so that each data handling component pair
The communication data of distribution is handled.
8. the method according to the description of claim 7 is characterized in that it is described by the communication data be added message queue it
Before, the method also includes:
Judge whether the data type of the communication data is consistent with pre-set target data type, the target data class
Type is the data type that originating process is monitored;
It is described that message queue is added in the communication data, comprising:
If the data type of the communication data is consistent with the target data type, the message is added in the communication data
Queue.
9. a kind of data transmission device, which is characterized in that described device includes:
First obtains module, for obtaining the corresponding target address information of target process;
Judgment module obtains judging result for judging whether the target process is online;
First sending module, for according to the judging result and the target address information, Xiang Suoshu target process to send logical
Letter data.
10. a kind of data transmission device, which is characterized in that described device includes:
Receiving module, for receiving communication data;
Adding module, for message queue to be added in the communication data;
Sending module, for distributing each communication data in the message queue to each data handling component, so that each
Data handling component handles the communication data of distribution.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910123154.2A CN110008036A (en) | 2019-02-19 | 2019-02-19 | Data transmission method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910123154.2A CN110008036A (en) | 2019-02-19 | 2019-02-19 | Data transmission method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN110008036A true CN110008036A (en) | 2019-07-12 |
Family
ID=67165822
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910123154.2A Pending CN110008036A (en) | 2019-02-19 | 2019-02-19 | Data transmission method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110008036A (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 |
| CN115373874A (en) * | 2022-08-24 | 2022-11-22 | 阿波罗智能技术(北京)有限公司 | Cross-process event processing method, device, electronic device, storage medium and vehicle |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101876922A (en) * | 2009-10-30 | 2010-11-03 | 北京锐安科技有限公司 | Method for improving system stability |
| CN102455943A (en) * | 2010-10-19 | 2012-05-16 | 上海聚力传媒技术有限公司 | Method for carrying out data sharing based on memory pool, and computer device |
| US20160274966A1 (en) * | 2015-03-16 | 2016-09-22 | Oracle International Corporation | Intelligent inter-process communication latency surveillance and prognostics |
| CN107172230A (en) * | 2017-07-24 | 2017-09-15 | 北京赛特斯信息科技股份有限公司 | The method that service node address is found is realized based on third party database |
| CN107589999A (en) * | 2017-09-04 | 2018-01-16 | 哈尔滨工程大学 | Process communication safe channel establishing method in a kind of Incorporate chemical industry journey |
-
2019
- 2019-02-19 CN CN201910123154.2A patent/CN110008036A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101876922A (en) * | 2009-10-30 | 2010-11-03 | 北京锐安科技有限公司 | Method for improving system stability |
| CN102455943A (en) * | 2010-10-19 | 2012-05-16 | 上海聚力传媒技术有限公司 | Method for carrying out data sharing based on memory pool, and computer device |
| US20160274966A1 (en) * | 2015-03-16 | 2016-09-22 | Oracle International Corporation | Intelligent inter-process communication latency surveillance and prognostics |
| CN107172230A (en) * | 2017-07-24 | 2017-09-15 | 北京赛特斯信息科技股份有限公司 | The method that service node address is found is realized based on third party database |
| CN107589999A (en) * | 2017-09-04 | 2018-01-16 | 哈尔滨工程大学 | Process communication safe channel establishing method in a kind of Incorporate chemical industry journey |
Non-Patent Citations (1)
| Title |
|---|
| 陈盛杰: "基于RCC技术的公交空中圈存平台研究与设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
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 |
| CN115373874A (en) * | 2022-08-24 | 2022-11-22 | 阿波罗智能技术(北京)有限公司 | Cross-process event processing method, device, electronic device, storage medium and vehicle |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102185900B (en) | Application service platform system and method for developing application services | |
| US8209378B2 (en) | Methods and apparatus for widget sharing between content aggregation points | |
| US10341196B2 (en) | Reliably updating a messaging system | |
| US9888048B1 (en) | Supporting millions of parallel light weight data streams in a distributed system | |
| US6658485B1 (en) | Dynamic priority-based scheduling in a message queuing system | |
| US8484305B2 (en) | Method for activating and deactivating client-side services from a remote server | |
| US20100100605A1 (en) | Methods and apparatus for management of inter-widget interactions | |
| CN108510389A (en) | Intelligent contract call method, equipment and readable storage medium storing program for executing based on block chain | |
| CN110069346A (en) | Resource share method, device, electronic equipment between multi-process | |
| CN109639782A (en) | Message sends platform, method | |
| CN115334155B (en) | Message queue proxy method and device | |
| CN110213265A (en) | Image acquiring method, device, server and storage medium | |
| EP3138003A1 (en) | System and method for supporting a bypass-domain model and a proxy model and updating service information for across-domain messaging in a transactional middleware machine environment | |
| CN110442610A (en) | The method, apparatus of load balancing calculates equipment and medium | |
| CN109788029A (en) | Gray scale call method, device, terminal and the readable storage medium storing program for executing of micro services | |
| CN107864101A (en) | Load-balancing method and device | |
| JP6026992B2 (en) | Services and management layer for various data connections | |
| CN119211145A (en) | Message distribution method, network equipment and storage medium | |
| CN110728558A (en) | Method, device, device and storage medium for sending virtual goods package | |
| EP3574403B1 (en) | Deferring invocation requests for remote objects | |
| CN111126977A (en) | A transaction processing method for a blockchain system | |
| CN110008036A (en) | Data transmission method and device | |
| CN101895531A (en) | A client device, multimedia data unloading system and unloading method | |
| US8141103B2 (en) | Solution for modifying a queue manager to support smart aliasing which permits extensible software to execute against queued data without application modifications | |
| CN111756844B (en) | A multi-language message agent method and device |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190712 |
|
| RJ01 | Rejection of invention patent application after publication |