A flexible and open information interaction system
By adopting a combination of recursive storage module, indexed interactive module and copy sending module in the interface protocol conversion system, the problem of long adaptation time of protocol conversion in the prior art is solved, and fast and flexible multi-protocol conversion and sending is achieved.
Patent Information
- Application Number
- CN202210477665.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-04-20
AI Technical Summary
The existing interface protocol conversion and forwarding methods require changes or adaptation to existing programs, and the adaptation time is too long when temporarily connecting to other equipment, which cannot meet the needs of rapid integration and joint trials of multiple systems.
Recursive storage module is used to parse source protocols to reduce the difficulty of software writing; indexing efficiency is improved by using indexed interactive modules; multi-protocol conversion and transmission are realized by adding a copy to send module.
It realizes the rapid implementation of protocol conversion and interaction between equipment in different systems without modifying existing programs, and improves the speed and adaptability of cross-system equipment integration.
Smart Images

Figure CN114880024B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of data communication, and in particular relates to a flexible open information interaction system. Background Art
[0002] In the field of command and control, the problem of access and integration of multiple equipment systems is usually involved. Due to historical legacy, industry barriers and other reasons, the data interface protocols used by different equipment are quite different, and data cannot be directly exchanged with access devices. Therefore, equipment interface protocol conversion and forwarding are required. Interface protocol conversion and forwarding refers to the process of using computer executable programs to obtain and interpret the source interface protocol, reorganize it according to the rules of the target interface protocol, and finally send the reorganized protocol to the designated receiving device. This process is a necessary step for the integration and scheduling of different equipment in the system.
[0003] Currently, the commonly used methods of interface protocol conversion and forwarding are: unifying the interface protocol and reconstructing the programs of each system and using communication middleware. Both of these commonly used methods can realize the information interaction function between different system data interface protocols. However, unifying the interface protocol and reconstructing the programs of each system requires rewriting the software program, and using communication middleware requires using third-party rules for modification and adaptation. Therefore, the existing methods have the following problems: (1) It is necessary to change or adapt the existing programs on the equipment; (2) When temporarily connecting to other equipment, the adaptation time required is too long, which cannot meet the needs of rapid integration and joint testing of multiple systems. Summary of the invention
[0004] In view of this, the present invention provides a flexible and open information interaction system, which adopts a recursive storage module and can cyclically call the module to perform source protocol parsing, thereby reducing the difficulty of software development; an indexed interaction module is adopted to improve indexing efficiency by using a one-time parsing and repeated calling method; a sending module with added copies can effectively realize the protocol conversion and sending of one source protocol to one or more target protocols, as well as multiple source protocols corresponding to one or more target protocols.
[0005] To achieve this purpose, the present invention adopts the following technical scheme: a flexible and open information interaction system, the system includes multiple information interaction architectures for different types of protocols, any one of the multiple information interaction architectures is composed of multiple information interaction layers connected in sequence from top to bottom, and each information interaction layer is connected to the value unit of the recursive storage module of the adjacent upper information interaction layer; wherein the top-level information interaction layer includes a recursive storage module, an index interaction module and a protocol sending module arranged in parallel, after the protocol is processed in the recursive storage module, it is input into the index interaction module for processing, and finally sent through the protocol sending module; other information interaction layers except the top-level layer include multiple recursive storage modules and multiple index interaction modules arranged in parallel,
[0006] The system works according to the following steps:
[0007] S1: Summarize and classify all protocols involved in the accusation field, build information interaction architecture for different types of protocols, configure storage and parsing configuration files of protocols in the recursive storage module, parse the protocol conversion matrix and element index data contained in all protocols in the index interaction module and open up space for storage, parse the trigger conditions, protocol sending types and protocol sending addresses of all protocols in the protocol sending module, and store them;
[0008] S2: Receive the source protocol and determine the source protocol type. If the source protocol can find a matching information interaction architecture in the information interaction architectures of different protocol types that have been built, and the matching information interaction architecture contains the storage and parsing configuration file of the protocol, then the source protocol is stored and parsed, and step S3 is executed; if the matching type of information interaction architecture cannot be found or the matching storage and parsing configuration file cannot be found in the matching information interaction architecture, it is necessary to further determine whether the source protocol comes from a new device. If not, the protocol is discarded and the program is terminated. If so, a new information interaction architecture or storage and parsing configuration file is added for the source protocol, and the program is terminated;
[0009] S3: According to the protocol conversion matrix and index data stored in the index interaction module of the information interaction architecture corresponding to the source protocol, determine the source protocol name index data and source element name index data corresponding to each element in the target protocol. If multiple source protocols are converted to one target protocol, multiple copies are opened for source protocol conversion; if one source protocol is converted to one target protocol or multiple target protocols, there is no need to add copies, and the index interaction module in the information interaction architecture is directly used for protocol conversion;
[0010] S4: After completing the protocol conversion, the sending method and sending address of the target protocol are determined according to the protocol sending method and protocol sending address set in the information interaction architecture corresponding to the source protocol, and the target protocol is sent.
[0011] Preferably, the recursive storage module includes: a protocol name unit, a protocol type unit, a keyword unit and a value unit.
[0012] Preferably, the index interaction module includes: a protocol name index unit and an element name index unit.
[0013] Preferably, the protocol sending module includes: a protocol sending condition unit and a protocol sending type unit.
[0014] Preferably, the protocol sending module further comprises a plurality of replica units, wherein the replica units are copies of all modules except the replica units in the flexible open information interaction architecture.
[0015] Preferably, the protocol sending type includes: a triggered protocol sending mode and a periodic protocol sending mode.
[0016] Preferably, the step S2 comprises:
[0017] S2.1: Receive the source protocol and determine the source protocol type. If the source protocol type matches the protocol type corresponding to one of the information interaction architectures built in step S1, execute step S2.2; if the source protocol type does not match the protocol type of all information interaction architectures in step S1, determine whether the source protocol is the protocol type of the newly accessed device. If not, discard it and end the program; if so, add the information interaction architecture for the source protocol of this type to the existing information interaction architecture and restart the program;
[0018] S2.2: traverse all protocols in the information interaction architecture corresponding to the source protocol, determine whether the source protocol has a corresponding storage and parsing configuration file in the recursive storage module of the information interaction architecture, and if so, execute step S2.3; if not, determine whether the source protocol is a protocol of the newly accessed device, and if not, discard it and terminate the program; if so, add the storage and parsing configuration file of the source protocol to the information interaction layer architecture corresponding to the source protocol, and restart the program;
[0019] S2.3: Receive the source protocol, and store and parse it using the storage and parsing configuration file in the recursive storage module of the information interaction layer architecture corresponding to the source protocol.
[0020] Preferably, the process of performing protocol exchange in step S3 includes: first obtaining the source protocol after storage and parsing in step S2.3, and then obtaining the protocol conversion matrix and element index data in the information interaction architecture corresponding to the source protocol; then using the conversion matrix between the source protocol and the target protocol to fill the protocol name index data and element target index data corresponding to the target protocol in the source protocol into the value unit of the recursive storage module of the target protocol to complete the protocol conversion.
[0021] Preferably, the process of sending the protocol in step S4 includes:
[0022] S4.1: Obtain the target protocol from the index interaction module, obtain the target protocol sending method according to the protocol sending method in the information interaction architecture corresponding to the source protocol, and determine the target address set for protocol sending by traversing the storage information of all target addresses, the target address set includes the sending address of the copy, if the protocol sending type is a periodic sending type, send the target protocol to the target address according to the periodic condition, and end the program; if the protocol sending type is a triggered sending type, execute step S4.2;
[0023] S4.2: Determine whether the source protocol is a trigger condition for the target protocol. If so, send the target protocol to the target address according to the established conditions and end the program; if not, execute step S4.3;
[0024] S4.3: Traverse all copies of the source protocol and determine whether the source protocol is a trigger condition for the target protocol of one of the copies among all the copies. If so, send the target protocol to the copy target address and end the program; if not, end the program directly.
[0025] The beneficial effects of the present invention are as follows: the flexible open information interaction architecture disclosed in the present invention adopts a recursive storage module, which can be cyclically called to perform source protocol parsing, thereby reducing the difficulty of software development; an index interaction module is adopted to improve indexing efficiency by using a one-time parsing and repeated calling method; a sending module with additional copies can effectively realize protocol conversion and sending of one source protocol to one or more target protocols, and multiple source protocols to one or more target protocols;
[0026] The information interaction architecture disclosed in the present invention has clear hierarchy, reliable functions, and strong cross-system adaptability. It can quickly realize protocol conversion and interaction between system equipment without modifying existing programs. The information interaction architecture in the present invention can be quickly transplanted and deployed, and has strong system environment adaptability, which greatly improves the integration speed of cross-system equipment, provides strong interactive support for the systematic integration of equipment, and can promote the rapid integration and development of cross-system equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of an information interaction system of a type of protocol in an embodiment of the present invention;
[0028] Figure 2 Schematic diagram of a flexible open information interaction system having only a recursive storage module in an embodiment of the present invention;
[0029] Figure 3 Schematic diagram of a flexible open information interaction system after adding a recursive storage module and an index interaction module in an embodiment of the present invention;
[0030] Figure 4 A schematic diagram of a flexible open information interaction system in which a recursive storage module, an index interaction module and a protocol sending module are added in an embodiment of the present invention;
[0031] Figure 5 It is a schematic diagram of the process of receiving, storing and parsing source protocols by a recursive storage module in an embodiment of the present invention;
[0032] Figure 6 A schematic diagram of a flow chart of protocol conversion performed by an index-based interaction module in an embodiment of the present invention;
[0033] Figure 7 A schematic diagram of a process of protocol forwarding performed by a protocol sending module in an embodiment of the present invention;
[0034] In the figure: 1. Complete protocol 2. Single element 101. Protocol name unit 102. Protocol type unit 103. Keyword unit 104. Value unit 201. Protocol name index unit 202. Element name index unit 301. Protocol sending condition unit 302. Protocol sending type unit 303. Copy unit 401. Header 402. Trailer. DETAILED DESCRIPTION
[0035] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
[0036] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0037] A flexible and open information exchange system includes multiple information exchange architectures for different types of protocols, such as Figure 1As shown, each type of information interaction architecture includes N information interaction layers connected in sequence from top to bottom, N≥1, and each information interaction layer is connected to the value unit 104 of the recursive storage module of the adjacent upper information interaction layer; the top-level information interaction layer of the information interaction architecture includes a recursive storage module, an index interaction module and a protocol sending module arranged in parallel. After the protocol is processed in the recursive storage module, it is input into the index interaction module for processing, and finally sent through the protocol sending module. Except for the top level, other information interaction layers only include recursive storage modules and index interaction modules arranged in parallel. The recursive storage modules and index interaction modules other than the top level are all called by the recursive storage module of the top level.
[0038] like Figure 2 As shown, the recursive storage module includes: a protocol name unit 101, a protocol type unit 102, a keyword unit 103 and a value unit 104, wherein the protocol name unit 101 is used to store the name of the protocol, the protocol type unit 102 is used to store the type of the protocol, including: char, short, int, string and structure, etc., the keyword unit 103 only has "true" and "false", and the value unit 104 is used to store the initial value of the protocol. When the keyword unit 103 is "true", the value of the value unit 104 is a fixed value, and it is further determined whether the value of the corresponding position of the source protocol is equal to the fixed value of the value unit 104. If they are not equal, it is determined that the received source protocol is not the protocol corresponding to the architecture and the protocol is discarded; if they are equal, the single element in the value unit 104 can be Figure 1 When the keyword unit 103 is "false", the single element in the value unit 104 is directly converted into Figure 1 As shown in the figure, the next level of decomposition is performed. As an example, from Figure 3 It can be seen that each value unit 104 can be connected to multiple next-level information interaction layers according to the number of its single elements. Figure 3 The 401 in the message header and the 403 in the message footer can also be Figure 1 The information interaction architecture in the
[0039] The index interaction module includes: a protocol name index unit 201 and an element name index unit 202; Figure 1 and Figure 3 As shown, these two units are located at the same layer as the units in the recursive storage module, and are used to generate a protocol conversion matrix between the source protocol and the target protocol, and to store the index information of each element in the protocol so as to be directly called during the protocol information interaction process.
[0040] The protocol sending module includes: a protocol sending condition unit 301 and a protocol sending type unit 302. Figure 4 As shown, when multiple source protocols are converted to a target protocol, a copy unit 303 needs to be added to the protocol sending module. The copy unit 303 includes multiple replicated protocol information interaction architectures that do not include the copy unit itself. The protocol sending type unit 302 includes a triggered protocol sending mode and a periodic protocol sending mode. The sending conditions corresponding to these two sending modes are stored in the protocol sending condition unit 301.
[0041] Before building the architecture, traverse all the protocols involved in the accusation field, summarize the protocol types of all protocols, build the information interaction architecture according to the protocol type, and set up each protocol information interaction architecture contained in the information interaction architecture corresponding to each type of protocol.
[0042] like Figures 5 to 7 The flexible open information interaction system working method shown is based on the above-mentioned flexible open information interaction system and comprises:
[0043] Step 1: Summarize and classify all protocols involved in the accusation field, build an information interaction architecture for different types of protocols, configure the storage and parsing configuration files of the protocols in the recursive storage module, parse the protocol conversion matrix and element index data contained in all protocols in the index interaction module and open up space for storage, parse the trigger conditions, protocol sending types and protocol sending addresses of all protocols in the protocol sending module, and store them;
[0044] Step 2: Receive the source protocol and determine the source protocol type. If the source protocol can find a matching information interaction architecture in the information interaction architectures of different protocol types that have been built, and the matching information interaction architecture contains the storage and parsing configuration file of the protocol, then the source protocol is stored and parsed, and step 3 is executed; if the matching type of information interaction architecture cannot be found or the matching storage and parsing configuration file cannot be found in the matching information interaction architecture, it is necessary to further determine whether the source protocol comes from a new device. If not, the protocol is discarded and the program is terminated. If so, a new information interaction architecture or storage and parsing configuration file is added for the source protocol, and the program is restarted;
[0045] The specific process is as follows Figure 5 As shown, including:
[0046] 2.1: Receive the source protocol and determine the source protocol type. If the source protocol type matches the protocol type corresponding to one of the information interaction architectures built in step S1, execute step 2.2; if the source protocol type does not match the protocol type of all information interaction architectures in the first step, determine whether the source protocol is the protocol type of the newly accessed device. If not, discard it and end the program; if so, add an information interaction architecture for the source protocol of this type to the existing information interaction architecture and restart the program;
[0047] 2.2: Traverse all protocols in the information interaction architecture corresponding to the source protocol, determine whether the source protocol has a corresponding storage and parsing configuration file in the information interaction architecture, if so, execute step 2.3; if not, determine whether the source protocol is a protocol of the newly connected device, if not, discard it and end the program, if yes, add the storage and parsing configuration file of the source protocol to the information interaction layer architecture corresponding to the source protocol, and restart the program;
[0048] 2.3: Receive the source protocol, and store and parse it using the storage and parsing configuration file in the information interaction layer architecture corresponding to the source protocol.
[0049] Step 3: According to the protocol conversion matrix and index data stored in the index interaction module of the information interaction architecture corresponding to the source protocol, determine the source protocol name index data and source element name index data corresponding to each element in the target protocol. If multiple source protocols are converted to one target protocol, multiple copies are opened for source protocol conversion; if one source protocol is converted to one target protocol or multiple target protocols, there is no need to add copies, and the index interaction module in the information interaction architecture is directly used for protocol conversion;
[0050] The specific process is as follows Figure 6 As shown, first obtain the source protocol after storage and parsing in the second step or step 2.3, then obtain the protocol conversion matrix in the information interaction architecture corresponding to the source protocol and all element index data of the protocol converted to the target protocol; then use the conversion matrix between the source protocol and the target protocol to fill the protocol name index data and element target index data corresponding to the target protocol in the source protocol into the value unit of the storage module of the target protocol to complete the protocol conversion.
[0051] Finally: After completing the protocol conversion, the target protocol's sending method and sending address are determined according to the protocol sending method and protocol sending address set in the information interaction architecture corresponding to the source protocol, and the target protocol is sent. The specific process is as follows: Figure 7 As shown:
[0052] 4.1: Obtain the target protocol from the index interaction module, obtain the target protocol sending method according to the protocol sending method in the information interaction architecture corresponding to the source protocol, and determine the target address set for protocol sending by traversing the storage information of all target addresses. If the protocol sending type is a periodic sending type, send the target protocol to the target address according to the established conditions and end the program; if the protocol sending type is a triggered sending type, execute step 4.2;
[0053] 4.2: Determine whether the source protocol is the trigger condition of the target protocol. If so, send the target protocol to the target address according to the established conditions and end the program; if not, execute step 4.3;
[0054] 4.3: Traverse all copies of the source protocol and determine whether the source protocol is the trigger condition of the target protocol of one of the copies. If so, send the target protocol to the target address and end the program; if not, end the program directly.
Claims
1. A flexible open information interaction system, characterized in that: The flexible open information interaction system includes multiple information interaction architectures for different types of protocols, and any one of the multiple information interaction architectures is composed of multiple information interaction layers connected in sequence from top to bottom, and each information interaction layer is connected to the value unit of the recursive storage module of the adjacent upper information interaction layer; wherein the top information interaction layer includes a recursive storage module, an index interaction module and a protocol sending module arranged in parallel, and after the protocol is processed in the recursive storage module, it is input into the index interaction module for processing, and finally sent through the protocol sending module; other information interaction layers except the top layer include multiple recursive storage modules and multiple index interaction modules arranged in parallel; The flexible open information interaction system works according to the following steps: S1: Summarize and classify all protocols involved in the accusation field, build information interaction architecture for different types of protocols, configure storage and parsing configuration files of protocols in the recursive storage module, parse the protocol conversion matrix and element index data contained in all protocols in the index interaction module and open up space for storage, parse the trigger conditions, protocol sending types and protocol sending addresses of all protocols in the protocol sending module, and store them; S2: receiving a source protocol and determining the type of the source protocol. If the source protocol can find a matching information interaction architecture in the established information interaction architectures of different protocol types, and the matching information interaction architecture contains a storage and parsing configuration file for the protocol, the source protocol is stored and parsed, and step S3 is executed; If a matching information interaction architecture cannot be found or a matching storage and parsing configuration file cannot be found in the matching information interaction architecture, it is necessary to further determine whether the source protocol is from a new device. If not, the protocol is discarded and the program is terminated. If so, a new information interaction architecture or storage and parsing configuration file is added for the source protocol and the program is restarted; S3: According to the protocol conversion matrix and index data stored in the index interaction module of the information interaction architecture corresponding to the source protocol, determine the source protocol name index data and source element name index data corresponding to each element in the target protocol. If multiple source protocols are converted to one target protocol, multiple copies are opened to perform source protocol conversion; if one source protocol is converted to one target protocol or multiple target protocols, no additional copies are required, and the index interaction module in the information interaction architecture is directly used to perform protocol conversion; S4: After completing the protocol conversion, the sending method and sending address of the target protocol are determined according to the protocol sending method and protocol sending address set in the information interaction architecture corresponding to the source protocol, and the target protocol is sent.
2. The flexible open information interaction system according to claim 1, characterized in that: The recursive storage module includes: a protocol name unit, a protocol type unit, a keyword unit and a value unit.
3. The flexible open information interaction system according to claim 1, characterized in that: The index interaction module includes: a protocol name index unit and an element name index unit.
4. The flexible open information interaction system according to claim 1, characterized in that: The protocol sending module includes: a protocol sending condition unit and a protocol sending type unit.
5. The flexible open information interaction system according to claim 4, characterized in that: The protocol sending module also includes a plurality of replica units, and the replica units are copies of all modules except the replica units in the flexible open information interaction architecture.
6. The flexible open information interaction system according to claim 4, characterized in that: The protocol sending type includes: a triggered protocol sending mode and a periodic protocol sending mode.
7. The flexible open information interaction system according to claim 1, characterized in that: The step S2 comprises: S2.1: Receive the source protocol and determine the source protocol type. If the source protocol type matches the protocol type corresponding to one of the information interaction architectures constructed in step S1, execute step S2.2; if the source protocol type does not match the protocol type of all information interaction architectures in step S1, determine whether the source protocol is the protocol type of the newly accessed device. If not, discard it and end the program; if so, add the information interaction architecture for the source protocol of this type to the existing information interaction architecture and restart the program; S2.2: Traverse all the protocols in the information interaction architecture corresponding to the source protocol, determine whether the source protocol has a corresponding storage and parsing configuration file in the recursive storage module of the information interaction architecture, and if so, execute step S2.3; if not, determine whether the source protocol is the protocol of the newly accessed device. If not, discard it and end the program. If so, add the storage and parsing configuration file of the source protocol to the information interaction layer architecture corresponding to the source protocol and restart the program; S2.3: Receive the source protocol, and store and parse it using the storage and parsing configuration file in the recursive storage module of the information interaction layer architecture corresponding to the source protocol.
8. The flexible open information interaction system according to claim 7, characterized in that: The process of protocol exchange in step S3 includes: first obtaining the source protocol after storage and parsing in step S2.3, and then obtaining the protocol conversion matrix and element index data in the information interaction architecture corresponding to the source protocol; then using the conversion matrix between the source protocol and the target protocol, the protocol name index data and element target index data corresponding to the target protocol in the source protocol are filled into the value unit of the recursive storage module of the target protocol to complete the protocol conversion.
9. The flexible open information interaction system according to claim 8, characterized in that: The process of sending the protocol in step S4 includes: S4.1: Obtain the target protocol from the index interaction module, obtain the target protocol sending method according to the protocol sending method in the information interaction architecture corresponding to the source protocol, and determine the target address set for protocol sending by traversing the storage information of all target addresses, the target address set includes the sending address of the copy, if the protocol sending type is a periodic sending type, send the target protocol to the target address according to the periodic condition, and end the program; if the protocol sending type is a triggered sending type, execute step S4.2; S4.2: Determine whether the source protocol is a trigger condition for the target protocol. If so, send the target protocol to the target address according to the established conditions and end the program; if not, execute step S4.3; S4.3: Traverse all copies of the source protocol and determine whether the source protocol is a trigger condition for the target protocol of one of the copies among all the copies. If so, send the target protocol to the copy target address and end the program; if not, end the program directly.
Citation Information
Patent Citations
Protocol configuration method and device
CN102404306A