CN108491280B - Inter-process data interaction method and device - Google Patents

Inter-process data interaction method and device Download PDF

Info

Publication number
CN108491280B
CN108491280B CN201810228615.8A CN201810228615A CN108491280B CN 108491280 B CN108491280 B CN 108491280B CN 201810228615 A CN201810228615 A CN 201810228615A CN 108491280 B CN108491280 B CN 108491280B
Authority
CN
China
Prior art keywords
interactive
interaction
data
processes
mark
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.)
Active
Application number
CN201810228615.8A
Other languages
Chinese (zh)
Other versions
CN108491280A (en
Inventor
王鹏翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Dandick Science & Technology Development Co ltd
Original Assignee
Nanjing Dandick Science & Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Dandick Science & Technology Development Co ltd filed Critical Nanjing Dandick Science & Technology Development Co ltd
Priority to CN201810228615.8A priority Critical patent/CN108491280B/en
Publication of CN108491280A publication Critical patent/CN108491280A/en
Application granted granted Critical
Publication of CN108491280B publication Critical patent/CN108491280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention belongs to the technical field of data communication, and particularly relates to a method and a device for data interaction among processes; the technical problem to be solved is as follows: the data interaction method and the data interaction device have high interaction degree and can realize free data interaction among a plurality of interaction processes; the technical scheme is as follows: the method comprises the following steps: s1, establishing a data service process for controlling data interaction among a plurality of interactive processes; s2, a plurality of interactive processes needing data interaction respectively initiate registration requests to the data service process by the same interactive mark; s3, registering the data service process, and establishing a corresponding virtual interactive service group according to the interactive mark; s4, carrying out data interaction in the corresponding virtual interaction service group by a plurality of interaction processes with the same interaction mark; s5, after the data interaction is finished, the interactive process participating in the data interaction respectively initiates a logout and registration request to the data service process; and S6, the data service process logs off and registers.

Description

Inter-process data interaction method and device
Technical Field
The invention belongs to the technical field of data communication, and particularly relates to a method and a device for data interaction between processes.
Background
At present, the data interaction among the general processes mainly comprises various modes such as pipeline communication, shared memory communication, socket communication and the like;
such as: the pipeline communication adopts a half-duplex communication mode, data can only flow in a single direction, only can bear a plain byte stream, and has the defects of limited size of a buffer area and the like; the shared memory communication enables a plurality of interactive processes to directly access the memory space in the same block, and the efficiency is high; socket communications may be used for process communications between different machines; the data interaction mode is generally one-to-one interaction, one-to-many or many-to-many data interaction is not supported, and the data interaction performance is low in the application with complex application requirements.
Disclosure of Invention
The invention overcomes the defects of the prior art, and solves the technical problems that: the data interaction method and the data interaction device have high interaction degree and can realize free data interaction among a plurality of interaction processes.
In order to solve the technical problems, the invention adopts the technical scheme that:
a data interaction method between processes comprises the following steps:
s1, establishing a data service process for controlling data interaction among a plurality of interactive processes;
s2, a plurality of interactive processes needing data interaction respectively initiate registration requests to the data service process by the same interactive mark;
s3, registering the data service process, and establishing a corresponding virtual interactive service group according to the interactive mark;
s4, carrying out data interaction in the corresponding virtual interaction service group by a plurality of interaction processes with the same interaction mark;
s5, after the data interaction is finished, the interactive process participating in the data interaction respectively initiates a logout and registration request to the data service process;
and S6, the data service process logs off and registers.
Preferably, the plurality of interactive processes that need to perform data interaction respectively initiate a registration request to the data service process with the same interactive flag: the interactive mark is provided with an anti-counterfeiting structure.
Preferably, the plurality of interactive processes that need to perform data interaction respectively initiate a registration request to the data service process with the same interactive flag: each interactive process can send a plurality of interactive marks for registration;
the multiple interactive processes with the same interactive mark perform data interaction in the corresponding virtual interactive service group: and each interactive process enters different virtual interactive service groups according to the interactive marks and carries out data interaction with other interactive processes in the corresponding virtual interactive service groups.
Preferably, in the data interaction performed by the multiple interaction processes with the same interaction identifier in the corresponding virtual interaction service group, the specific information of the data interaction includes: interactive flags, data classification flags, and data.
Correspondingly, the data interaction device between the processes comprises:
the data service process is used for controlling the data service process for data interaction among the plurality of interactive processes;
a registration request unit, which is used for enabling a plurality of interactive processes needing data interaction to respectively initiate registration requests to the data service process by the same interactive mark;
the establishing unit is used for registering and establishing a corresponding virtual interactive service group according to the interactive mark;
the interaction unit is used for enabling a plurality of interaction processes with the same interaction mark to carry out data interaction in the corresponding virtual interaction service group;
a logout request unit, which is used for making the interactive process participating in the data interaction respectively initiate a logout and registration request to the data service process after the data interaction is finished;
and the log-out unit is used for log-out and registration.
Preferably, in the registration request unit, the interactive mark has an anti-counterfeiting structure.
Preferably, the registration request unit specifically includes: each interactive process can send a plurality of interactive marks for registration;
the interaction unit specifically comprises: and each interactive process enters different virtual interactive service groups according to the interactive mark to carry out data interaction.
Preferably, in the interaction unit, the specific information of data interaction includes: interactive flags, data classification flags, and data.
Compared with the prior art, the invention has the following beneficial effects:
1. in the invention, the data service process establishes the corresponding virtual interaction service group according to the interaction mark, so that the free interaction of a plurality of interaction process data in the interaction group service is realized, and the data interaction degree is high.
2. According to the invention, the specific information of data interaction comprises the interaction mark, the data classification mark and the data, and through the data classification mark, after the information is received, the data can be efficiently classified, managed and stored, and meanwhile, a basis can be provided for later-stage data retrieval and directional extraction.
Drawings
The present invention will be described in further detail with reference to the accompanying drawings;
fig. 1 is a schematic flowchart of a method for data interaction between processes according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a data interaction process of an inter-process data interaction method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a method for data interaction between processes according to an embodiment of the present invention;
in the figure: 101 is a data service process, 102 is a registration request unit, 103 is a setup unit, 104 is a logout unit, 105 is an interaction unit, and 106 is a logout request unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention; all other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a method for data interaction between processes according to an embodiment of the present invention; as shown in fig. 1, a method for data interaction between processes includes the following steps: s1, establishing a data service process for controlling data interaction among a plurality of interactive processes; s2, a plurality of interactive processes needing data interaction respectively initiate registration requests to the data service process by the same interactive mark; s3, registering the data service process, and establishing a corresponding virtual interactive service group according to the interactive mark; s4, carrying out data interaction in the corresponding virtual interaction service group by a plurality of interaction processes with the same interaction mark;
s5, after the data interaction is finished, each interactive process participating in the data interaction respectively initiates a logout and registration request to the data service process; and S6, the data service process logs off and registers.
In the invention, the data service process establishes the corresponding virtual interaction service group according to the interaction mark, so that the free interaction of a plurality of interaction process data in the interaction group service is realized, and the data interaction degree is high.
Specifically, the multiple interaction processes that need to perform data interaction respectively initiate a registration request to the data service process with the same interaction flag: the interactive mark is provided with an anti-counterfeiting structure.
Further, the multiple interaction processes which need to perform data interaction respectively initiate registration requests to the data service process by using the same interaction mark: each interactive process can send a plurality of interactive marks for registration;
the multiple interactive processes with the same interactive mark perform data interaction in the corresponding virtual interactive service group: and each interactive process enters different virtual interactive service groups according to the interactive marks and carries out data interaction with other interactive processes in the corresponding virtual interactive service groups.
Furthermore, in the data interaction performed by the multiple interaction processes with the same interaction identifier in the corresponding virtual interaction service group, the specific information of the data interaction includes: interactive marks, data classification marks and data; through the data classification marks, the data can be efficiently classified, managed and stored after the information is received, and meanwhile, a basis can be provided for later-stage data retrieval and directional extraction.
In the invention, the data service process is the core of the whole data interaction, and organically associates each interactive process needing data interaction, thereby realizing the data interaction among the interactive processes.
Fig. 2 is a schematic diagram of a data interaction process of an inter-process data interaction method according to an embodiment of the present invention; as shown in fig. 2, in this embodiment, when data interaction is required between the interactive process P1 and the interactive process P2, first, the interactive process P1 and the interactive process P2 respectively initiate a registration request to the data service process with the same interactive flag G1 (the interactive flag can be customized by the user); after the registration is successful, the data service process establishes a virtual interactive service group G1 according to the interactive mark; the interactive process P1 and the interactive process P2 become members of the virtual interactive service group G1, and bidirectional data interaction can be freely performed in the virtual interactive service group G1.
In the embodiment, each interactive mark has anti-counterfeiting property, so that data interference or data stealing in an extragroup process can be prevented; each interactive process can register a plurality of interactive marks according to requirements, and enter a plurality of virtual interactive service groups to realize many-to-many data interaction;
in this embodiment, the specific information of data interaction includes: interaction flag, data classification flag and data, specifically, interaction process P1 is to send data Da1 classified as Ca to interaction process P2 within interaction group G1, which is implemented by:
the interactive process P1 sends information (including interactive flag G1, data classification flag Ca and data Da1) to the data server, and after receiving the information, the data server forwards the classification 'Ca' of the data and the specific data 'Da 1' to the interactive process P2 in the interactive group according to the interactive group flag G1;
when the interactive process P2 receives the interactive information (interactive flag G1, data classification flag Ca and data Da1), the data Da1 can be effectively processed according to the classified data classification flag Ca;
in addition, if the interactive process P1 wants to send the information that the data classification flag is Cb and the data is Db1 to the interactive process P2, the interactive process P1 sends the information (interactive flag G1, data classification flag Cb, data Db1) to the data server, and the data server receives the information and then forwards the information to the interactive process P2 (interactive flag G1, data classification flag Cb, data Db1, and the interactive process P2 receives the information and effectively processes the data Db1 according to the classification flag Cb;
similarly, the interactive process P2 can also send data to be interacted with to the interactive process P1, and the process is the same.
In the above process, if the virtual interactive service group further includes the interactive process P3, after the interactive process P1 sends out the interactive data, the data service process will forward the data to the interactive process P2 and the interactive process P3 at the same time, that is, one-to-many or many-to-many data interaction is implemented.
And after all the interaction requirements are finished, the interaction process logs off the data service process.
In the interprocess data interaction method provided by the invention, all the interactive data are forwarded by the data service process, so that data can be conveniently recorded and stored in the forwarding process, a user can check the recorded and stored data through the interactive mark, namely, the monitoring function of the interactive data is realized, and the debugging or later maintenance of a program can be greatly facilitated.
Fig. 3 is a schematic structural diagram of a method for data interaction between processes according to an embodiment of the present invention; as shown in fig. 3, an inter-process data interaction apparatus includes: the data service process 101 is used for controlling a data service process for data interaction among a plurality of interactive processes; a registration request unit 102, configured to enable multiple interaction processes that need to perform data interaction to initiate registration requests to a data service process by using the same interaction flag respectively; the establishing unit 103 is used for registering and establishing a corresponding virtual interactive service group according to the interactive mark; an interaction unit 105, configured to enable multiple interaction processes with the same interaction identifier to perform data interaction in a corresponding virtual interaction service group; a logout request unit 106, configured to enable each interactive process participating in data interaction to initiate a logout and registration request to the data service process after the data interaction is finished; a deregistration unit 104 for deregistering.
Specifically, in the registration request unit 102, the interactive mark has an anti-counterfeit structure.
Further, the registration requesting unit 102 specifically includes: each interactive process can send a plurality of interactive marks for registration;
the interaction unit 105 specifically includes: and each interactive process enters different virtual interactive service groups according to the interactive mark to carry out data interaction.
Further, in the interaction unit 105, the specific information of data interaction includes: interactive flags, data classification flags, and data.
In addition, the data service process in the invention also has the functions of monitoring the interactive data, controlling the survival period, storing, managing by classification, retrieving, extracting directionally and the like.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (4)

1. A method for data interaction between processes is characterized in that: the method comprises the following steps:
s1, establishing a data service process for controlling data interaction among a plurality of interactive processes;
s2, a plurality of interactive processes needing data interaction respectively initiate registration requests to the data service process by the same interactive mark;
s3, registering the data service process, and establishing a corresponding virtual interactive service group according to the interactive mark;
s4, carrying out data interaction in the corresponding virtual interaction service group by a plurality of interaction processes with the same interaction mark;
s5, after the data interaction is finished, the interactive process participating in the data interaction respectively initiates a logout and registration request to the data service process;
s6, the data service process carries out logout and registration;
wherein, the multiple interactive processes needing data interaction respectively initiate registration requests to the data service process by the same interactive mark: the interactive mark is provided with an anti-counterfeiting structure;
and the plurality of interactive processes needing data interaction respectively initiate registration requests to the data service process by the same interactive mark:
each interactive process can send a plurality of interactive marks for registration;
the multiple interactive processes with the same interactive mark perform data interaction in the corresponding virtual interactive service group:
and each interactive process enters different virtual interactive service groups according to the interactive marks and carries out data interaction with other interactive processes in the corresponding virtual interactive service groups.
2. The method of claim 1, wherein the method comprises: in the data interaction of a plurality of interaction processes with the same interaction mark in a corresponding virtual interaction service group, the specific information of the data interaction comprises: interactive flags, data classification flags, and data.
3. An interprocess data interaction device, which is characterized in that: the method comprises the following steps:
the data service process (101) is used for controlling the data service process for data interaction among the interaction processes;
a registration request unit (102) for enabling a plurality of interactive processes needing data interaction to initiate registration requests to the data service process by the same interactive mark respectively;
the establishing unit (103) is used for registering and establishing a corresponding virtual interactive service group according to the interactive mark;
an interaction unit (105) for enabling a plurality of interaction processes with the same interaction mark to perform data interaction in the corresponding virtual interaction service group;
a logout request unit (106) which is used for enabling the interactive processes participating in the data interaction to respectively initiate logout and registration requests to the data service process after the data interaction is finished;
a deregistration unit (104) for deregistering;
wherein, in the registration request unit (102), the interactive mark has an anti-counterfeiting structure;
and the registration request unit (102) specifically comprises:
each interactive process can send a plurality of interactive marks for registration;
the interaction unit (105) specifically comprises:
and each interactive process enters different virtual interactive service groups according to the interactive mark to carry out data interaction.
4. The device of claim 3, wherein: in the interaction unit (105), the specific information of data interaction includes: interactive flags, data classification flags, and data.
CN201810228615.8A 2018-03-20 2018-03-20 Inter-process data interaction method and device Active CN108491280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810228615.8A CN108491280B (en) 2018-03-20 2018-03-20 Inter-process data interaction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810228615.8A CN108491280B (en) 2018-03-20 2018-03-20 Inter-process data interaction method and device

Publications (2)

Publication Number Publication Date
CN108491280A CN108491280A (en) 2018-09-04
CN108491280B true CN108491280B (en) 2022-03-01

Family

ID=63318530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810228615.8A Active CN108491280B (en) 2018-03-20 2018-03-20 Inter-process data interaction method and device

Country Status (1)

Country Link
CN (1) CN108491280B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103218327A (en) * 2013-04-28 2013-07-24 惠州市德赛西威汽车电子有限公司 Method for interactively sharing SPI communication bus through embedded system multiple processes
CN103970593A (en) * 2013-01-30 2014-08-06 云联(北京)信息技术有限公司 Multi-process interaction method and system
CN104298563A (en) * 2014-10-13 2015-01-21 中国外汇交易中心 Method and system for managing process
CN104615489A (en) * 2015-01-22 2015-05-13 江苏大烨智能电气股份有限公司 Multi-node data interaction achieving method
CN107153583A (en) * 2017-05-24 2017-09-12 努比亚技术有限公司 A kind of striding course interaction processing method, mobile terminal and computer-readable recording medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970593A (en) * 2013-01-30 2014-08-06 云联(北京)信息技术有限公司 Multi-process interaction method and system
CN103218327A (en) * 2013-04-28 2013-07-24 惠州市德赛西威汽车电子有限公司 Method for interactively sharing SPI communication bus through embedded system multiple processes
CN104298563A (en) * 2014-10-13 2015-01-21 中国外汇交易中心 Method and system for managing process
CN104615489A (en) * 2015-01-22 2015-05-13 江苏大烨智能电气股份有限公司 Multi-node data interaction achieving method
CN107153583A (en) * 2017-05-24 2017-09-12 努比亚技术有限公司 A kind of striding course interaction processing method, mobile terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN108491280A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
EP3621269B1 (en) Live broadcast method, system and related device
WO2016161857A1 (en) Multi-tenant high-concurrency instant messaging cloud platform
US9774932B2 (en) Method and apparatus for data packet switching, access switch and switching system
CN109905409A (en) Things-internet gateway real time bidirectional communication system based on Socket.IO
CN107332719A (en) A kind of method that daily record is analyzed in real time in CDN system
CN104519130B (en) A kind of data sharing caching method across IDC
CN104243610B (en) A kind of distributed document transmits method of servicing
CN109889567A (en) Support the implementation method of the platform of internet of things of bulk device access
CN112995234B (en) Media transmission link management method and device
WO2017181890A1 (en) Data processing system and method based on server cluster
CN103209214A (en) Not only structured query language (NoSQL)-based method for realizing message-oriented middleware
CN109547824A (en) A kind of video traffic method of servicing and system, storage medium and vpn server
US9154449B2 (en) Inter-board communication apparatus, method for transmitting and receiving message of inter-board communication
US20170289583A1 (en) Method and system for optimizing publication of live broadcasting message
CN114710571B (en) Data packet processing system
CN103763525A (en) Unified video monitoring platform system of power grid
CN105636317B (en) A kind of intelligent road lamp management system and information processing method
JP2014528611A5 (en)
CN108011795B (en) A kind of method and system for realizing more boards and multiple data channel management in communication equipment
CN108491280B (en) Inter-process data interaction method and device
CN110971986A (en) Cloud video exchange system
CN106209680A (en) Information processor and method
CN107465654B (en) System for distributing and safely searching and killing contents among service subnets of broadcast station
WO2017166485A1 (en) Method and system for optimizing release of live broadcast message
CN203327040U (en) Cloud calculation intelligent network gateway

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant