Real-time database cross-gatekeeper transmission method and system
By establishing a one-to-one connection between the client and the server, using cross-gate gate module and subcontracting technology, the problem of insufficient real-time and reliability during massive cross-gate gate data transmission is solved, and high-performance real-time data transmission is achieved.
Patent Information
- Application Number
- CN202510117905.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-01-24
AI Technical Summary
In the process of transmitting massive cross-gate gate data, there is room for improvement in real-time and reliability.
By establishing a one-to-one connection between the client and the server, data transmission is carried out using cross-net gate modules and network transmission modules, subcontracting technology and data verification methods are adopted to ensure the real-time and reliability of data transmission.
It realizes high-performance transmission of massive real-time data, improves the real-time and reliability of transmission, reduces the read and write of disks, and enhances the security of data transmission.
Smart Images

Figure CN120074881A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and particularly to a method and system for real-time database cross-gateway transmission. Background Art
[0002] A gateway, also known as a network security isolation device, is a professional hardware installed between two non-connected networks. It completes the secure transmission of data resources between networks under certain restrictive conditions as required. Therefore, many enterprises choose to use gateways to isolate the networks of security domains in order to further protect internal data, and then perform data ferry across security domains through the built-in ferry function of the gateway.
[0003] Patent document CN111200624A discloses a method and system for cross-gateway data transmission, including: a first transmission device receives data from a data source, generates corresponding data records in a first database, stores the data in a set directory of a first cache in the form of a file, and initializes the flag bit in the data record to a first state; the first transmission device receives access from the gateway, ferries the data through the gateway to a second network; after the data is taken away by the gateway, the first transmission device updates the corresponding flag bit in the data record to a second state.
[0004] However, when patent document CN111200624A is used for transmitting a large amount of cross-gateway data, there is still room for improvement in terms of real-time performance and reliability.
[0005] Patent document CN113254411A discloses a method and system for cross-gateway real-time database data synchronization. Mirror tag sets are created in the databases inside and outside the gateway respectively, and the databases inside and outside the gateway are configured as mirror sending / receiving databases; the mirror sending end performs snapshot updates, caches the successfully updated snapshots, and packs and sends the snapshots and corresponding tags in the cache to the mirror receiving end; after receiving the packet, the mirror receiving end unpacks it, obtains the corresponding tags and snapshots, and writes them into the local database. The mirror tag set contains all the full names of the tags used, and the cyclic redundancy check method is used to compress all the full names of the tags to obtain the tag crc.
[0006] However, patent document CN113254411A relies on mirror sending. The snapshot and the corresponding tags need to be given to the sending end simultaneously, and there is mutual dependence and lag between the point table and the data. Summary of the Invention
[0007] Aiming at the deficiencies in the prior art, the purpose of the present invention is to provide a method and system for real-time database cross-gateway transmission.
[0008] According to a real-time database cross-gateway transmission method provided by the present invention, it is characterized by including:
[0009] Step S1: Establish a one-to-one connection between the client and the server to establish communication. The client includes a source-side cross-network gateway module and a client network transmission module, and the server includes a server network transmission module and a destination-side cross-network gateway module;
[0010] Step S2: After confirming the successful connection, the source-side cross-network gateway module obtains the point table data from its own end, processes it through the client network transmission module, and sends the point table data to the destination-side cross-network gateway module;
[0011] Step S3: After receiving the data, the destination-side cross-network gateway module parses the data according to different transmission data types, and sends a one-byte response to the client network transmission module according to the parsing result through the server-side network transmission module;
[0012] Step S4: After receiving the byte response, the client network transmission module will determine whether the byte response is legal. If it is, the current byte response will be sent to the source-side cross-network gateway module for parsing and then Step S5 will be executed; if not, it means that the source-side cross-network gateway module fails to receive the data, and then Step S6 will be executed;
[0013] Step S5: Determine whether the current byte response is the response to the first sent point table. If it is, execute Step S7; if not, continue to monitor whether there is new collected data;
[0014] Step S6: Determine whether the current byte response is the response to the first sent point table. If it is, return to Step S2; if not, it means that the current collection data sending fails, reconnect to the server according to the network status, and return to Step S3 to continue sending data;
[0015] Step S7: Determine whether the response is successful. If it is, start two threads, namely the first thread and the second thread; if not, return to execute Step S2.
[0016] Preferably, the Step S1 includes:
[0017] Step S1.1: During the startup process, the source-side cross-network gateway module initiates a connection to the server through the client network transmission module;
[0018] Step S1.2: After receiving the connection request from the source-side cross-network gateway module, the client network transmission module initiates a connection request to the server network transmission module.
[0019] Step S1.3: After receiving the connection request information sent by the client, the server network transmission module ensures a one-to-one connection between the client and the server.
[0020] Preferably, in Step S2, the data type is set to DATA_TAG_SYNC point table synchronization.
[0021] Preferably, step S2 includes:
[0022] Step S2.1: After the client network transmission module receives the data from the source-side cross-network gateway module, it sends the data in packets to the server network transmission module;
[0023] Step S2.2: After the server network transmission module receives the data sent by the client, it will repackage the data according to the header information and then send it to the destination-side cross-network gateway module;
[0024] During the packet splitting process, the already split packets are sent to the server in sequence.
[0025] Preferably, the header of each data packet consists of three fields, namely SubFlag, SubLen, and DataType. SubFlag represents the type of the packet, SubLen represents the length of the data, and DataType represents the type of the data;
[0026] The types of packets include single packets, tail packets, and non-tail packets, and the types of data include transmission data types and data types.
[0027] Preferably, step S2.1 includes:
[0028] Step S2.1.1: Determine whether the sum of the length of the data and the header length is less than 4069 bytes. If so, there is no need to split the packet, and the data and the corresponding header information are directly sent to the server, and the type of the current packet is set as a single packet; if not, packet splitting is required, and step S2.1.2 is executed;
[0029] Step S2.1.2: Perform packet splitting processing according to the length. The length of each packet except the last one is 4096 bytes, and each packet's bytes include split data bytes and header bytes;
[0030] Step S2.1.3: Determine whether the current packet is the last packet. If so, set the SubFlag flag as a tail packet, SubLen as the data length of the last packet, and DataType as the data type; if not, set the SubFlag flag as a non-tail packet, the length of SubLen as the split data length, and DataType as the transmission data type;
[0031] Preferably, step S2.2 includes: Determine the type of the SubFlag flag in the current data header. If it is a single packet, it means that the current data is not split, and the current data is directly sent to the destination-side cross-network gateway module;
[0032] If it is a non-tail packet, it means that the current data is split and is an intermediate packet. Receive the split data for repackaging, and send the transmission data type and the data of the repackaged packet to the destination-side cross-network gateway module;
[0033] If it is the last packet, it means that the current data is a sub-packet and is the last packet. Receive the data packet for packet assembly, and send the transmission data type and the data of the assembled packet to the destination cross-network gateway module.
[0034] Preferably, the first thread is a monitoring point table thread used to monitor whether the point table has changed;
[0035] The second thread is a monitoring acquisition data thread used to monitor the acquisition data.
[0036] Preferably, when the first thread monitors that the point table has changed, set the data type to DATA_TAG_SYNC for point table synchronization, and send the point table data to the server;
[0037] When the second thread monitors new acquisition data, set the data type to DATA_SNAPSHOTS for acquisition data, and send the acquisition data to the server.
[0038] A real-time database cross-network gateway transmission system provided by the present invention includes:
[0039] Module M1: Connect the client and the server one-to-one to establish communication. The client includes a source cross-network gateway module and a client network transmission module, and the server includes a server network transmission module and a destination cross-network gateway module;
[0040] Module M2: After confirming the successful connection, the source cross-network gateway module obtains the point table data from its own end, processes it through the client network transmission module, and sends the point table data to the destination cross-network gateway module;
[0041] Module M3: After receiving the data, the destination cross-network gateway module analyzes the data according to different transmission data types, and sends a one-byte response to the client network transmission module according to the analysis result through the server-side network transmission module;
[0042] Module M4: After receiving the byte response, the client network transmission module will judge whether the byte response is legal. If so, send the byte to the source cross-network gateway module for analysis and then trigger Module M5; if not, it means that the source cross-network gateway module fails to receive the data, and then trigger Module M6;
[0043] Module M5: Judge whether the current byte response is the response to the first sending of the point table. If so, trigger Module M7; if not, continue to monitor whether there is new acquisition data;
[0044] Module M6: Determine whether the current byte response is the response to the first sent point table. If so, trigger Module M2; if not, it means that the data transmission for this collection fails. Reconnect to the server according to the network status and trigger Module M3 to continue sending data.
[0045] Module M7: Determine whether the parsing is successful. If so, start two threads, namely the first thread and the second thread; if not, trigger Module M2.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. The present invention does not require disk storage and file exchange, minimizing disk read and write to the greatest extent, improving transmission real-time performance. At the same time, combined with the real-time database distributed technology, multiple real-time data of multiple data nodes are transmitted in parallel through multiple channels to achieve high-performance transmission of massive real-time data.
[0048] 2. The present invention realizes data encryption through a custom communication protocol, improving data transmission security.
[0049] 3. The present invention sets a data verification method to ensure that the data is not tampered with or lost during transmission, improving transmission reliability.
[0050] 4. The point table and data of the present invention are independent of each other. The point table supports dynamic update, and the data transmission does not depend on the point table, being more flexible. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, objects, and advantages of the present invention will become more apparent:
[0052] Figure 1 It is a schematic flowchart of the working method of the present invention;
[0053] Figure 2 It is a schematic diagram of the system architecture of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0054] The present invention will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that those of ordinary skill in the art can make several changes and improvements without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0055] Embodiment 1
[0056] According to a real-time database cross-network gateway transmission method provided by the present invention, as Figure 1 and Figure 2 shown, it includes:
[0057] Step S1: Connect the client and the server one-to-one to establish communication. The step S1 includes:
[0058] Step S1.1: During the startup process, the source-side cross-network gateway module initiates a connection to the destination end through the client network transmission module.
[0059] Step S1.2: After receiving the connection request from the source-side cross-network gateway module, the client network transmission module initiates a connection request to the server network transmission module.
[0060] Step S1.3: After receiving the connection request information sent by the client, the server network transmission module ensures a one-to-one connection between the client and the server.
[0061] Step S2: After confirming the successful connection, the source-side cross-network gateway module obtains the point table from its own side and sends the data to the destination end through the client network transmission module. Set the data type to DATA_TAG_SYNC point table synchronization. Among them, confirming whether the connection is successful includes judging whether there is already a connection from other clients on the current server. If not, receive the connection request from the client; if so, reject the connection request from the client.
[0062] Step S2.1: After receiving the data from the source-side cross-network gateway module, the client network transmission module sends the data in packets to the server network transmission module. The step S2 includes:
[0063] Step S2.1.1: Judge whether the sum of the length of the data and the header length is less than 4069 bytes. If so, there is no need to divide the packet, and directly send the data and the corresponding header to the server side, where SubFlag represents the type of the packet and is set to a single packet; if not, packet division is required, and step S2.1.2 is executed. Among them, the header of the data packet consists of three fields, namely SubFlag, SubLen, and DataType. SubFlag represents the type of the packet, SubLen represents the length of the data, and DataType represents the type of the data. The types of packets include single packets, tail packets, and non-tail packets, and the types of data include transmission data types and data types.
[0064] Step S2.1.2: Perform packet splitting according to the length. The length of each packet except the last one is 4096 bytes. Each packet includes split data and a header. If the current data packet is not the last one, the SubFlag flag is set to non-terminal packet, the length of SubLen is the length of the split data, and the DataType is the data transmission type. If the current data packet is the last one, the SubFlag flag is set to terminal packet, SubLen is the data length of the last packet, and the DataType is the data type. For example, if the length of the data is 5000 bytes and the header is 8 bytes, it can be divided into two packets. The first packet is (8 + 4088), and the second packet is (8 + 912). The SubFlag of the first packet is set to non-terminal packet, and the SubFlag of the second packet is set to terminal packet. During the packet splitting process, the already split packets are sent to the server side in sequence.
[0065] Step S2.2: After the server network transmission module receives the data sent by the client, it will perform packet assembly according to the header information. The said step S2.2 includes judging the type of the SubFlag flag of the current data header. If it is a single packet, it means that the current data is not split, and the current data is directly sent to the destination cross-network gateway module; if it is a non-terminal packet, it means that the current data is split and is an intermediate packet. The split data is received for packet assembly, and the data transmission type and the data of the assembled packet are sent to the destination cross-network gateway module; if it is a terminal packet, it means that the current data is split and is the last packet. The data packet is received for packet assembly, and the data transmission type and the data of the assembled packet are sent to the destination cross-network gateway module.
[0066] Step S3: After the destination cross-network gateway module receives the data, it parses the data according to different data transmission types, and sends a byte response to the source end through the server-side network transmission module according to the parsing result.
[0067] Step S4: The server-side network transmission module only supports sending one byte to the client. After receiving a byte response from the destination cross-network gateway module, the said response is sent to the client.
[0068] Step S5: After the client network transmission module receives a byte response from the server side, it will judge whether the byte is a legal response. If so, the byte is sent to the source cross-network gateway module for parsing and then step S6 is executed; if not, it means that the source cross-network gateway module fails to receive the data. It is judged whether the current byte response is the response of the first sent point table. If so, it returns to step S2; if not, it means that the current data collection and sending fails. The server is reconnected according to the network status, and it returns to step S3 to continue sending the data.
[0069] Step S6: The source-side cross-network gateway module determines whether the current byte response is the response for the first sent point table. If so, execute Step S7; if not, continue to monitor whether there is new acquisition data.
[0070] Step S7: Determine whether the parsing is successful. If so, start two threads, namely the first thread and the second thread. The first thread is the point table monitoring thread used to monitor whether the point table has changed, and the second thread is the acquisition data monitoring thread used to monitor the acquisition data; if not, return to execute Step S2.
[0071] When the first thread monitors that the point table has changed, set the data type to DATA_TAG_SYNC for point table synchronization, and send the point table data to the destination end. When the second thread monitors that there is new acquisition data, set the data type to DATA_SNAPSHOTS for acquisition data, and send the acquisition data to the destination end.
[0072] The present invention aims to achieve cross-network gateway data transmission between the source end and the destination end by establishing a one-to-one connection between the client and the server. The client network transmission module at the source end ensures the stable transmission of big data through the packet splitting technology, effectively improving the sending efficiency. The server network transmission module at the destination end ensures the one-to-one connection of the client and restricts sending only one byte to the client, meeting the cross-network gateway security policy.
[0073] Embodiment 2
[0074] The present invention also provides a real-time database cross-network gateway transmission system. Those skilled in the art can implement the real-time database cross-network gateway transmission system by executing the step flow of the real-time database cross-network gateway transmission method, that is, the real-time database cross-network gateway transmission method can be understood as the preferred implementation manner of the real-time database cross-network gateway transmission system.
[0075] A real-time database cross-network gateway transmission system provided by the present invention includes:
[0076] Module M1: Establish a one-to-one connection between the client and the server to establish communication. The client includes a source-side cross-network gateway module and a client network transmission module, and the server includes a server network transmission module and a destination-side cross-network gateway module. The module M1 includes: Module M1.1: The source-side cross-network gateway module will initiate a connection to the server through the client network transmission module during the startup process. Module M1.2: After receiving the connection request from the source-side cross-network gateway module, the client network transmission module initiates a connection request to the server network transmission module. Module M1.3: After receiving the connection request information sent by the client, the server network transmission module ensures the one-to-one connection between the client and the server.
[0077] Module M2: After confirming the successful connection, the source-side cross-network gateway module obtains the point table data from its own side, processes it through the client network transmission module, and then sends the point table data to the destination-side cross-network gateway module. In Module M2, the data type is set to DATA_TAG_SYNC for point table synchronization. Module M2 includes: Module M2.1: After receiving the data from the source-side cross-network gateway module, the client network transmission module sends the data in packets to the server network transmission module. Module M2.2: After receiving the data sent by the client, the server network transmission module assembles the packets according to the header information and then sends them to the destination-side cross-network gateway module. During the packet splitting process, the already split packets are sent to the server in sequence. The header of each data packet consists of three fields, namely SubFlag, SubLen, and DataType. SubFlag indicates the type of the packet, SubLen indicates the length of the data, and DataType indicates the type of the data. The types of packets include single packets, tail packets, and non-tail packets, and the types of data include transmission data types and data types.
[0078] Module M2.1 includes: Module M2.1.1: Determine whether the sum of the length of the data and the header length is less than 4069 bytes. If so, there is no need to split the packet, and the data and the corresponding header information are directly sent to the server, and the type of the current packet is set to a single packet. If not, packet splitting is required, and Module M2.1.2 is triggered. Module M2.1.2: Perform packet splitting processing according to the length. The length of each packet except the last one is 4096 bytes, and each packet's bytes include split data bytes and header bytes. Module M2.1.3: Determine whether the current packet is the last one. If so, set the SubFlag flag to a tail packet, SubLen to the data length of the last packet, and DataType to the data type. If not, set the SubFlag flag to a non-tail packet, the length of SubLen to the split data length, and DataType to the transmission data type.
[0079] Module M2.2 includes: Determine the type of the SubFlag flag in the current data header. If it is a single packet, it means the current data is not split, and the current data is directly sent to the destination-side cross-network gateway module. If it is a non-tail packet, it means the current data is split and is an intermediate packet. Receive the split data for packet assembly, and send the transmission data type and the data of the assembled packet to the destination-side cross-network gateway module. If it is a tail packet, it means the current data is split and is the last packet. Receive the data packet for packet assembly, and send the transmission data type and the data of the assembled packet to the destination-side cross-network gateway module.
[0080] Module M3: After receiving the data, the destination-side cross-network gateway module parses the data according to different transmission data types, and sends a byte response to the client network transmission module according to the parsing result through the server-side network transmission module.
[0081] Module M4: After receiving the byte response, the client network transmission module determines whether the byte response is legal. If it is, the current byte response is sent to the source cross-network gateway module for parsing and then triggers Module M5. If not, it indicates that the source cross-network gateway module fails to receive data, and then triggers Module M6.
[0082] Module M5: Determine whether the current byte response is the response for the first sending of the point table. If it is, trigger Module M7. If not, continue to monitor whether there is new acquisition data.
[0083] Module M6: Determine whether the current byte response is the response for the first sending of the point table. If it is, trigger Module M2. If not, it indicates that the sending of the current acquisition data fails. Reconnect to the server according to the network status and trigger Module M3 to continue sending data.
[0084] Module M7: Determine whether the response is successful. If it is, start two threads, namely the first thread and the second thread. If not, trigger Module M2. The first thread is the point table monitoring thread used to monitor whether there are changes in the point table. The second thread is the acquisition data monitoring thread used to monitor the acquisition data. When the first thread monitors that there are changes in the point table, set the data type to DATA_TAG_SYNC for point table synchronization and send the point table data to the server. When the second thread monitors that there is new acquisition data, set the data type to DATA_SNAPSHOTS for acquisition data and send the acquisition data to the server.
[0085] Those skilled in the art know that in addition to implementing the system and its various devices, modules, and units provided by the present invention in the form of pure computer-readable program code, the method steps can be logically programmed to enable the system and its various devices, modules, and units provided by the present invention to be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers, etc., to achieve the same functions. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a kind of hardware component, and the devices, modules, and units included therein for implementing various functions can also be regarded as the structures within the hardware component; it can also be considered that the devices, modules, and units for implementing various functions are both software modules for implementing the method and the structures within the hardware component.
[0086] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. Without conflict, the embodiments of the present application and the features in the embodiments can be combined arbitrarily with each other.
Claims
1. A real-time database cross-gate transmission method, characterized in that: include: Step S1: Connect the client and the server one-to-one to establish communication, wherein the client includes a source-end cross-gateway module and a client-end network transmission module, and the server includes a server network transmission module and a destination-end cross-gateway module; Step S2: After confirming that the connection is successful, the source-end cross-network gate module obtains the point table data from the local end and processes it through the client network transmission module and then sends the point table data to the destination-end cross-network gate module; Step S3: After receiving the data, the destination-side cross-gateway module parses the data according to different transmission data types, and sends a byte response to the client-side network transmission module through the server-side network transmission module according to the parsing result; Step S4: After receiving the byte response, the client network transmission module determines whether the byte response is legal. If so, the current byte response is sent to the source-end cross-gateway module for parsing and then executing step S5; if not, it indicates that the source-end cross-gateway module fails to receive data, and then executes step S6; Step S5: Determine whether the current byte response is the response of the first sending of the point table. If so, execute step S7; if not, continue to monitor whether there is new collected data; Step S6: Determine whether the current byte response is the response of the first sending of the point table. If so, return to step S2; if not, it means that the sending of the collected data this time fails, reconnect to the server according to the network status, and return to step S3 to continue sending data; Step S7: Determine whether the response is successful. If so, start two threads, namely the first thread and the second thread; if not, return to execute step S2.
2. The real-time database cross-gate transmission method according to claim 1 is characterized in that: The step S1 comprises: Step S1.1: During the startup process, the source-side cross-gateway module initiates a connection to the server through the client network transmission module; Step S1.2: After receiving the connection request from the source-side cross-gateway module, the client network transmission module initiates a connection request to the server network transmission module. Step S1.3: After receiving the connection request information sent by the client, the server network transmission module ensures a one-to-one connection between the client and the server.
3. The real-time database cross-gate transmission method according to claim 1 is characterized in that: In step S2, the data type is set to DATA_TAG_SYNC to indicate point table synchronization.
4. The real-time database cross-gate transmission method according to claim 1 is characterized in that: The step S2 comprises: Step S2.1: After receiving the data from the source-side cross-gateway module, the client network transmission module sends the data in packets to the server network transmission module; Step S2.2: After receiving the data sent by the client, the server network transmission module will package it according to the header information and send it to the destination cross-network gate module; During the packet splitting process, the split packets are sent to the server in sequence.
5. The real-time database cross-gate transmission method according to claim 4 is characterized in that: The header of each data packet consists of three fields: SubFlag, SubLen, and DataType. SubFlag indicates the type of packet, SubLen indicates the length of the data, and DataType indicates the type of data. The types of packets include single packet, tail packet, and non-tail packet. The types of data include transmission data type and data type.
6. The real-time database cross-gate transmission method according to claim 5 is characterized in that: Step S2.1 includes: Step S2.1.1: Determine whether the sum of the length of the data and the length of the header is less than 4069 bytes. If so, there is no need to split the data into packets, and the data and the corresponding header information are directly sent to the server, and the type of the current packet is set to a single packet; if not, split the data into packets, and execute step S2.1.2; Step S2.1.2: Divide the packets into packets according to their length. Except for the last packet, the length of each packet is 4096 bytes. The bytes of each packet include data bytes and header bytes. Step S2.1.3: Determine whether the current packet is the last packet. If so, set the SubFlag flag to the last packet, SubLen is the data length of the last packet, and DataType is the data type; if not, set the SubFlag flag to the non-last packet, the length of SubLen is the sub-packet data length, and DataType is the transmission data type.
7. The real-time database cross-gate transmission method according to claim 5 is characterized in that: Step S2.2 includes: determining the type of the SubFlag flag in the current data header, if it is a single packet, it means that the current data is not sub-packetized, and directly sending the current data to the destination cross-gate module; If it is not the last packet, it means that the current data is a sub-packet and an intermediate packet, the sub-packet data is received and assembled, and the transmission data type and the assembled packet data are sent to the destination cross-gate module; If it is the last packet, it means that the current data is sub-packetized and is the last packet. The received data packet is assembled and the transmission data type and the assembled packet data are sent to the destination cross-gate module.
8. The real-time database cross-gate transmission method according to claim 1, characterized in that: The first thread is a point table monitoring thread used to monitor whether the point table has changed; The second thread is a monitoring and collecting data thread for monitoring and collecting data.
9. The real-time database cross-gate transmission method according to claim 8, characterized in that: When the first thread monitors the point table changes, it sets the data type to DATA_TAG_SYNC point table synchronization and sends the point table data to the server; When the second thread detects new collected data, it sets the data type to DATA_SNAPSHOTS to collect the data and sends the collected data to the server.
10. A real-time database cross-gate transmission system, characterized in that: include: Module M1: connect the client and the server one-to-one to establish communication, the client includes a source-end cross-gateway module and a client-end network transmission module, and the server includes a server network transmission module and a destination-end cross-gateway module; Module M2: After confirming that the connection is successful, the source-end cross-gateway module obtains the point table data from the local end and processes it through the client network transmission module and then sends the point table data to the destination-end cross-gateway module; Module M3: After receiving the data, the destination cross-gateway module parses the data according to different transmission data types, and sends a byte response to the client network transmission module through the server network transmission module according to the parsing result; Module M4: After receiving the byte response, the client network transmission module determines whether the byte response is legal. If so, the byte is sent to the source-end cross-gateway module for parsing and then triggering module M5; if not, it indicates that the source-end cross-gateway module fails to receive data, and then triggering module M6; Module M5: Determine whether the current byte response is the response of the first sending of the point table. If so, trigger module M7; if not, continue to monitor whether there is new collection data; Module M6: Determine whether the current byte response is the response of the first sending of the point table. If so, module M2 is triggered; if not, it means that the sending of the collected data this time fails, and the server is reconnected according to the network status, triggering module M3 to continue sending data; Module M7: Determine whether the analysis is successful. If so, start two threads, namely the first thread and the second thread; if not, trigger module M2.
Citation Information
Patent Citations
Cross-gatekeeper data transmission method and system
CN111200624A
Cross-gatekeeper real-time database data synchronization method and system
CN113254411A
Data transmission method and system based on dual unidirectional gateways, equipment and medium
CN109474628A
Industrial network isolation method and device with different security levels
CN111478891A
Method and system for realizing ftp client multi-file transmission based on libcurl and gatekeeper equipment
CN116708409A