A network communication protocol method and system for geophysical special equipment

Through the MQTT protocol and encryption technology, combined with the Dijkstra algorithm and intelligent routing algorithm, the security and real-time data transmission in the network communication protocol of special geophysical equipment is solved, and real-time data acquisition and secure transmission of high-frequency sampling devices are realized.

CN118764515BActive Publication Date: 2024-11-15YUNNAN SEISMOLOGICAL BUREAU +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411219288.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-11-15
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

The existing special geophysical equipment network communication protocol adopts TCP/IP protocol, and the encoding implementation is complex. It requires manual processing of data sticking and packet loss problems. Moreover, the data transmission in plain text has a security risk and cannot be applied to high-frequency sampling devices. Real-time and security of data.

Method used

Data transmission is carried out using MQTT protocol, based on the publish subscription mode, encrypt data through TLS/SSL, use the Dijkstra algorithm to find the shortest data transmission path, and process instruction data through intelligent routing algorithms, combining high sampling rate and real-time data acquisition modules to ensure data security and real-time.

Benefits of technology

It improves the security and real-time nature of data transmission, adapts to high-frequency sampling equipment, reduces network load, ensures data timeliness and security, and supports the data transmission needs of devices with multiple sampling rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764515B_ABST
    Figure CN118764515B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of network communication technology, and specifically, to a network communication protocol method and system for geophysical special equipment. It includes the following steps: S1, geophysical station network special equipment transmits measurement data to a communication protocol system through the MQTT protocol; S2, the communication protocol system transmits measurement data to a client through the MQTT protocol; S3, the client sends identity credentials, the system verifies the identity credentials, and encrypts the data during the data transmission process; S4, the geophysical special equipment publishes real-time data to the real-time data transmission topic, the client subscribes to the real-time data transmission topic, and receives real-time data; S5, the client publishes instruction data to the instruction data transmission topic, the geophysical special equipment publishes response data to the instruction data transmission topic, the client subscribes to the instruction data transmission topic again, and receives response data. Request instructions are received and parsed by an intelligent routing algorithm to reduce delays and improve reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a network communication protocol method and system for geophysical special equipment. Background Art

[0002] The network communication protocol for geophysical special equipment is used to collect data from data acquisition equipment deployed in the geophysical network, improve the real-time data acquisition performance of the geophysical network business system, and improve the functional specifications of geophysical network special equipment.

[0003] In the existing network communication protocol method and system for geophysical special equipment, the current network communication protocol for geophysical special equipment is directly implemented using the TCP / IP protocol. The coding implementation is complex and not friendly to developers. It is necessary to manually handle problems such as data sticking and packet loss. There is a data security risk in the existing network communication of geophysical special equipment using plain text to transmit data. Plain text transmission means that the data transmission process in the network is not encrypted, which makes sensitive information easy to be intercepted and viewed by unauthorized third parties. The current network communication protocol for geophysical special equipment is not suitable for high-frequency sampling. For instruments with a sampling rate greater than 1 time / second, their data cannot be well collected and reported, which limits the geophysical network integrated business system from moving towards a higher data real-time direction. Therefore, a network communication protocol method and system for geophysical special equipment are provided. Summary of the invention

[0004] The purpose of the present invention is to provide a network communication protocol method and system for geophysical special equipment, so as to solve the problem proposed in the above background technology that in the existing network communication protocol method and system for geophysical special equipment, the current network communication protocol for geophysical special equipment is directly implemented using the TCP / IP protocol, the coding implementation is complex, it is not friendly to developers, and it is necessary to manually handle the problems of data sticking and packet loss. There is a data security risk in the existing network communication of geophysical special equipment using plain text to transmit data. Plain text transmission means that the data transmission process in the network is not encrypted, which makes sensitive information easy to be intercepted and viewed by unauthorized third parties. The current network communication protocol for geophysical special equipment is not suitable for high-frequency sampling. For instruments with a sampling rate greater than 1 time / second, their data cannot be well collected and reported, which limits the problem of the geophysical station network integrated business system moving towards a higher data real-time direction.

[0005] To achieve the above object, the present invention provides a network communication protocol method for geophysical dedicated equipment, comprising the following steps:

[0006] S1. The geophysical network unit transmits the measurement data to the communication protocol system through the MQTT protocol;

[0007] Among them, the MQTT protocol uses a publish-subscribe mode to realize data transmission; the measurement data includes time, station ID, instrument ID, sampling rate, and measurement item components;

[0008] S2, the communication protocol system transmits the measurement data to the client via the MQTT protocol;

[0009] S3: The client sends the identity credentials, the communication protocol system verifies the identity credentials, and encrypts the data during the data transmission process;

[0010] S4, the geophysical unit publishes the real-time data to the real-time data transmission topic through the communication protocol system, and the communication protocol system finds the shortest data transmission path based on the Dijkstra algorithm to improve the data transmission efficiency, and the client subscribes to the real-time data transmission topic to receive the real-time data;

[0011] S5. The client publishes the instruction data to the instruction data transmission topic through the communication protocol system. The geophysical unit subscribes to the instruction data transmission topic, receives the request instruction through the intelligent routing algorithm and processes the data, and then performs analysis based on the results of the data processing. The geophysical unit publishes the response data to the instruction data transmission topic through the communication protocol system. The client subscribes to the instruction data transmission topic again to receive the response data.

[0012] As a further improvement of the technical solution, in said S1, the geophysical network unit includes a high sampling rate data acquisition module and a real-time data acquisition module;

[0013] The high sampling rate data acquisition module is used to capture rapidly changing signals; and the real-time data acquisition module is used to capture instant data streams.

[0014] As a further improvement of the technical solution, in S2, the client includes:

[0015] Publishing unit: The publishing unit publishes messages to specific topics according to different levels of QoS;

[0016] Subscription unit: The subscription unit subscribes to a topic of interest or unsubscribes from a topic of no interest through received messages;

[0017] As a further improvement of the technical solution, in S3, the communication protocol system includes:

[0018] A communication management unit, which manages the connection status between the client and the system, and performs identity verification when each connection is established, as well as management of identity authentication methods;

[0019] A data transmission unit, which performs data transmission according to client requirements and encrypts network transmission using a TLS / SSL encryption algorithm;

[0020] A real-time monitoring unit, which continuously monitors the system status and the status of the equipment.

[0021] As a further improvement of the technical solution, the data transmission unit includes a real-time transmission module and an instruction transmission module;

[0022] The real-time transmission module is used to process data interaction between the client and the system that requires instant feedback;

[0023] The instruction transmission module is used to send and receive instruction data between the client and the system.

[0024] As a further improvement of the technical solution, the specific implementation steps of the real-time monitoring unit are:

[0025] Use Prometheus to collect and store real-time geophysical equipment status data, and use Grafana to display real-time geophysical equipment status data and set alerts.

[0026] As a further improvement of the technical solution, in S4, the specific steps of the communication protocol system finding the shortest data transmission path based on the Dijkstra algorithm are:

[0027] S7.1. Create a collection , used to save the nodes of the shortest path;

[0028] S7.2. Create a distance array To save the shortest distance from the starting node to each node, initially, the distances of all nodes except the starting node are set to infinity , the distance of the starting node is set to ;

[0029] Initialize the distance array:

[0030] ;

[0031] in, Indicates starting point To the top The length of the currently known shortest distance; Represents a distance array The vertices in represents the starting point, that is, the vertex at the beginning of the algorithm; The distance from the starting point to itself is ; The initial distance from the starting point to another point is set to infinity, indicating that the path has not yet been found;

[0032] S7.3. Create a predecessor node array To save the predecessor node of each node, which is used to construct the shortest path. Initially, the predecessor nodes of all nodes are set to ;

[0033] Initialize the predecessor array:

[0034] ;

[0035] ;

[0036] in, Represents a vertex The predecessor vertex, that is, the arrival vertex The previous vertex on the shortest path; Represents a distance array All vertices in

[0037] S7.4. Select distance array from nodes whose shortest path is not determined The smallest node , and the node Add to Collection In, it is used to determine the starting node arrive The shortest path;

[0038] S7.5. For nodes All neighbor vertices of , calculate from the starting node Via Node arrive The length of the path to reach:

[0039] ;

[0040] If the length of this path is less than the current , then update is the length of this path, and Set to :

[0041] ;

[0042] ;

[0043] in, Represents a vertex The leading vertex of Represents a distance array The smallest node; Representation Node Neighbor vertices of ; Represents a slave node To neighbor vertex The weight of the edge;

[0044] S7.6, repeat steps S7.4 and S7.5 until the set Until the target node, which is the node with the shortest path, is found;

[0045] S7.7, starting from the target node, along the predecessor node array Backtrack until you get back to the starting node and get the shortest path from the starting node to the target node.

[0046] As a further improvement of the technical solution, in S5, the specific steps of receiving the request instruction and performing data processing by the intelligent routing algorithm are as follows:

[0047] S8.1. Initialize device index number From 1 to ,in is the number of geophysical equipment dedicated to all available geophysical network units;

[0048] S8.2. For each device , get its processing power , Current load level , the distance from the data source and network latency ;

[0049] Among them, processing capacity Affected by device temperature, the device temperature is used as processing capacity The impact of Specifically:

[0050] ;

[0051] ;

[0052] in, Indicates the device processing capabilities; Indicates the device Basic processing capabilities at room temperature; Indicates the device The current temperature; Indicates the reference temperature, which is the ideal temperature for normal operation of the equipment; represents the temperature sensitivity coefficient; represents the base of natural logarithms;

[0053] S8.3. For each device Calculate the load rating:

[0054] ;

[0055] in, Indicates the device Load rating of Indicates the index number of the device, from 1 to ; Indicates the device processing capabilities; Indicates the device The current load level; Represents a small positive number used in the load scoring function to avoid the denominator being zero;

[0056] S8.4. For each device Calculate the location score:

[0057] ;

[0058] in, Indicates the device 's geolocation score; Indicates the device Distance from the data source; Represents a small positive number used in the geographic location scoring function to avoid the denominator being zero;

[0059] S8.5. For each device Calculate the network latency score:

[0060] ;

[0061] in, Indicates the device Network latency score; Indicates the device Network latency; Represents a small positive number used to avoid the denominator being zero in the network delay scoring function;

[0062] S8.6. Define weight coefficients , and , so that ;

[0063] in, Indicates the weight coefficient of the equipment load score; Indicates the weight coefficient of the geographic location score; Represents the weight coefficient of network delay score;

[0064] For each device Calculate the weighted composite score:

[0065] ;

[0066] in, Indicates the device The weighted comprehensive score of

[0067] S8.7. Select the device with the highest weighted comprehensive score from all devices As the best equipment:

[0068] ;

[0069] in, An index number indicating the best device; Indicates the maximum value of the argument;

[0070] S8.8. Distribute the received request instruction data to the device with the highest score to be processed.

[0071] As a further improvement of the technical solution, in S5, the parsing process is specifically as follows:

[0072] S9.1. Extract payload from client message;

[0073] S9.2. Convert the payload from a binary string to a parsable JSON format;

[0074] S9.3, parsing the command data in JSON format to extract the command type and parameters;

[0075] S9.4, setting the state of the geophysical dedicated equipment according to the parsed command type and parameters;

[0076] S9.5. Generate response data according to the result of command execution.

[0077] On the other hand, the present invention provides a network communication protocol system for geophysical special equipment, including geophysical special equipment, a processor, and a computer program stored in the geophysical special equipment and executable on the processor, wherein the computer program executable on the processor is used to implement the network communication protocol method for the above-mentioned geophysical special equipment.

[0078] Compared with the prior art, the present invention has the following beneficial effects:

[0079] 1. In the network communication protocol method and system of the geophysical special equipment, the high sampling rate observation data acquisition ensures the retention of data details and improves the quality of the measurement data. Real-time data acquisition enables the latest measurement data to be obtained immediately, which is very important for applications that require instant response. It supports and adapts to the data transmission requirements of various sampling rate devices, considers the security of data transmission during the data transmission process, and ensures the security of the data transmission process.

[0080] 2. In the network communication protocol method and system of the geophysical special equipment, the MQTT protocol can effectively reduce the network load and improve the efficiency of data transmission. It can collect and publish data in real time to ensure the timeliness of data. The MQTT protocol is used to ensure the consistency and standardization of data formats. The communication protocol system can reduce delays, save bandwidth or improve efficiency by finding the shortest data transmission path based on the Dijkstra algorithm. Receiving request instructions and parsing them through intelligent routing algorithms can reduce delays and improve reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 is a flow chart of the overall method of the present invention;

[0082] Figure 2 Composition graph for the client;

[0083] Figure 3 This is a diagram of the message gateway system composition.

[0084] The meaning of each number in the figure is:

[0085] 1. Publishing unit; 2. Subscribing unit; 3. Communication management unit; 4. Data transmission unit; 5. Real-time monitoring unit. DETAILED DESCRIPTION

[0086] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0087] Example 1: Please refer to Figure 1-3 As shown, this embodiment provides a network communication protocol method for geophysical dedicated equipment, including the following steps:

[0088] S1. The geophysical network unit transmits the measurement data to the communication protocol system through the MQTT protocol;

[0089] Among them, the MQTT protocol uses a publish-subscribe mode to realize data transmission; the measurement data includes time, station ID, instrument ID, sampling rate, and measurement item components;

[0090] In this example, the geophysical network unit includes a high sampling rate data acquisition module and a real-time data acquisition module;

[0091] Among them, the high sampling rate data acquisition module is used to capture rapidly changing signals; the real-time data acquisition module is used to capture instant data streams.

[0092] Among them, the specific operation methods involved in the high sampling rate data acquisition module are:

[0093] First define the sampling rate range, and support the configuration of the sampling rate through the network, allowing remote adjustment;

[0094] Use ProtoBuf and JSON as data formats to provide efficient serialization and deserialization mechanisms;

[0095] Monitor network bandwidth usage to ensure that the transmission of high-sampling-rate measurement data does not exceed the available bandwidth;

[0096] Use the lightweight compression algorithm Snappy to compress data before transmission;

[0097] Specifically, Snappy is a lightweight compression algorithm known for its fast compression and decompression capabilities. It is suitable for application scenarios that require high-speed data processing, such as big data processing, real-time data stream processing, etc. Snappy is widely used in a variety of environments due to its high performance and simplicity.

[0098] The compression algorithm Snappy is specifically:

[0099] Compression ratio:

[0100] ;

[0101] in, Indicates the compression ratio; Indicates the size of the original data; Indicates the size of the compressed data;

[0102] Compression speed:

[0103] ;

[0104] in, Indicates compression speed; Indicates the time required for compression;

[0105] Decompression speed:

[0106] ;

[0107] in, Indicates the decompression speed; Indicates the time required for decompression;

[0108] Memory consumption:

[0109] ;

[0110] in, Indicates the maximum memory size used during compression; Indicates the maximum memory used during compression.

[0111] Use data redundancy mechanisms to ensure that data transmission can be restored in the event of network failure or device failure.

[0112] Specifically, data redundancy mechanism refers to a strategy adopted during data transmission or storage to ensure the integrity and reliability of data.

[0113] The data redundancy mechanism is specifically as follows:

[0114] Purpose: To detect errors in data transmission by calculating redundant bits using a generator polynomial.

[0115] Principle: Use a predetermined polynomial to operate on the data and obtain a check value of fixed length which is appended to the data.

[0116] Expression: Assume that the original data is , the generating polynomial is , then the redundant bit It can be calculated as:

[0117] ;

[0118] Function: The receiving end uses the same generating polynomial to operate on the received data. If the result is 0, the data may be correct. The specific operation methods involved in the real-time data acquisition module are:

[0119] First, define that the total delay of the measured data from collection to transmission to the receiving end does not exceed the specified time threshold;

[0120] Redefine the priority of real-time measurement data over non-real-time measurement data;

[0121] Monitor network bandwidth usage to ensure that the transmission of real-time measurement data does not exceed the available bandwidth;

[0122] Use data redundancy mechanisms to ensure that data transmission can be restored in the event of network failure or device failure.

[0123] S2, the communication protocol system transmits the measurement data to the client via the MQTT protocol;

[0124] In this example, the client includes:

[0125] Publishing unit 1: Publishing unit 1 publishes messages to specific topics according to different levels of QoS;

[0126] Subscription unit 2: Subscription unit 2 subscribes to the topics of interest or unsubscribes from the topics of no interest through the received messages.

[0127] Specifically, MQTT shows strong adaptability in several aspects in the Internet of Things, especially in geophysical network applications:

[0128] (1) Lightweight and low bandwidth requirements

[0129] MQTT is designed for limited bandwidth and unstable network environments. Its message header is very small (minimum 2 bytes), which is suitable for IoT devices, especially instruments in geophysical networks that may be located in remote areas. These instruments often rely on low-bandwidth and potentially unstable network connections.

[0130] (2) Efficient message distribution

[0131] MQTT supports one-to-many message publishing, allowing a node to send messages to multiple clients at the same time. This is crucial for geophysical network operations because ground monitoring data needs to be transmitted to multiple research nodes and analysis systems in real time.

[0132] (3) Robust message-level quality assurance

[0133] MQTT provides three different levels of message delivery guarantees, including at most once (level 0), at least once (level 1), and exactly once (level 2). Geophysical data is often very critical and requires ensuring the correct transmission and integrity of the data. By appropriately selecting the MQTT Quality of Service (QoS) level, data can be ensured to be transmitted reliably as needed.

[0134] (4) Support unstable network connections

[0135] IoT devices, including geophysical monitoring equipment, may experience temporary network outages. MQTT's "Will" message allows a device to automatically send a message to other devices or applications when a connection is lost, allowing the system to respond to connection loss events in a timely manner.

[0136] (5) Flexible topic subscription mechanism

[0137] MQTT's topic and subscription mechanism makes data consumption extremely flexible. Geophysical networks can set different topics to correspond to different types of data or instruments in different geographical locations. Consumers can subscribe to relevant topics according to their needs and flexibly obtain the required data.

[0138] (6) Security

[0139] MQTT supports TLS / SSL to provide encryption of network transmissions, which is an important consideration for IoT devices, especially when transmitting sensitive geophysical data. In addition, MQTT also supports authentication based on username and password, as well as advanced security measures based on client certificates.

[0140] (7) Session persistence

[0141] MQTT maintains the persistence of client sessions even when the network is disconnected, which means that monitoring devices in the geophysical network can seamlessly resume their communication status when they reconnect, ensuring data integrity.

[0142] (8) Adaptability and scalability

[0143] MQTT is inherently scalable and can easily scale to tens of thousands of devices without placing too much load on the message center. This is critical for scenarios such as geophysical networks where a large number of sensors and devices may need to be connected.

[0144] S3: The client sends the identity credentials, the communication protocol system verifies the identity credentials, and encrypts the data during the data transmission process;

[0145] In this example, the communication protocol system includes:

[0146] Communication management unit 3, which manages the connection status between the client and the system, and verifies the identity when each connection is established, as well as manages the identity authentication method;

[0147] Data transmission unit 4, data transmission unit 4 performs data transmission according to client requirements and encrypts network transmission through TLS / SSL encryption algorithm;

[0148] In this example, the data transmission unit 4 includes a real-time transmission module and an instruction transmission module;

[0149] Among them, the real-time transmission module is used to process the data interaction between the client and the system that requires instant feedback;

[0150] The instruction transmission module is used to send and receive instruction data between the client and the system;

[0151] When the real-time transmission module transmits real-time data to the client, identity authentication is required to connect with the client;

[0152] When the instruction transmission module receives instruction data from the client, identity authentication is required to connect with the client.

[0153] The real-time monitoring unit 5 continuously monitors the system status and the status of the equipment.

[0154] In this example, the specific implementation steps of the real-time monitoring unit 5 are:

[0155] Use Prometheus to collect and store real-time geophysical equipment status data, and use Grafana to display real-time geophysical equipment status data and set alerts.

[0156] Among them, Prometheus is an open source monitoring system and time series database; Grafana is an open source multi-platform monitoring dashboard and visualization tool that can display data from various data sources to users in a graphical way;

[0157] S4. The geophysical network unit publishes the real-time data to the real-time data transmission topic through the communication protocol system, and the communication protocol system finds the shortest data transmission path based on the Dijkstra algorithm to improve the data transmission efficiency. The client subscribes to the real-time data transmission topic and receives the real-time data.

[0158] In this example, the specific steps for the communication protocol system to find the shortest data transmission path based on the Dijkstra algorithm are:

[0159] S7.1. Create a collection , used to save the nodes of the shortest path;

[0160] S7.2. Create a distance array To save the shortest distance from the starting node to each node, initially, the distances of all nodes except the starting node are set to infinity , the distance of the starting node is set to ;

[0161] Initialize the distance array:

[0162] ;

[0163] in, Indicates starting point To the top The length of the currently known shortest distance; Represents a distance array The vertices in represents the starting point, that is, the vertex at the beginning of the algorithm; The distance from the starting point to itself is ; The initial distance from the starting point to another point is set to infinity, indicating that the path has not yet been found;

[0164] S7.3. Create a predecessor node array To save the predecessor node of each node, which is used to construct the shortest path. Initially, the predecessor nodes of all nodes are set to ;

[0165] Initialize the predecessor array:

[0166] ;

[0167] in, Represents a vertex The predecessor vertex, that is, the arrival vertex The previous vertex on the shortest path; Represents a distance array All vertices in

[0168] S7.4. Select distance array from nodes whose shortest path is not determined The smallest node , and the node Add to Collection In, it is used to determine the starting node arrive The shortest path;

[0169] S7.5. For nodes All neighbor vertices of , calculate from the starting node Via Node arrive The length of the path to reach:

[0170] ;

[0171] If the length of this path is less than the current , then update is the length of this path, and Set to :

[0172] ;

[0173] ;

[0174] in, Represents a vertex The leading vertex of Represents a distance array The smallest node; Representation Node Neighbor vertices of ; Represents a slave node To neighbor vertex The weight of the edge;

[0175] S7.6, repeat steps S7.4 and S7.5 until the set Until the target node, which is the node with the shortest path, is found;

[0176] S7.7, starting from the target node, along the predecessor node array Backtrack until you get back to the starting node and get the shortest path from the starting node to the target node.

[0177] S5. The client publishes the command data to the command data transmission topic through the communication protocol system. The geophysical network unit subscribes to the command data transmission topic, receives the request command through the intelligent routing algorithm and processes the data, and then performs analysis based on the results of the data processing. The geophysical network unit publishes the response data to the command data transmission topic through the communication protocol system. The client subscribes to the command data transmission topic again to receive the response data.

[0178] In this example, the specific steps of receiving request instructions and processing data through the intelligent routing algorithm are as follows:

[0179] S8.1. Initialize device index number From 1 to ,in is the number of geophysical equipment dedicated to all available geophysical network units;

[0180] S8.2. For each device , get its processing power , Current load level , the distance from the data source and network latency ;

[0181] Among them, processing capacity Affected by device temperature, the device temperature is used as processing capacity The impact of Specifically:

[0182] ;

[0183] ;

[0184] in, Indicates the device processing capabilities; Indicates the device Basic processing capabilities at room temperature; Indicates the device The current temperature; Indicates the reference temperature, which is the ideal temperature for normal operation of the equipment; represents the temperature sensitivity coefficient; represents the base of natural logarithms;

[0185] S8.3. For each device Calculate the load rating:

[0186] ;

[0187] in, Indicates the device Load rating of Indicates the index number of the device, from 1 to ; Indicates the device processing capabilities; Indicates the device The current load level; Represents a small positive number used in the load scoring function to avoid the denominator being zero;

[0188] S8.4. For each device Calculate the location score:

[0189] ;

[0190] in, Indicates the device 's geolocation score; Indicates the device Distance from the data source; Represents a small positive number used in the geographic location scoring function to avoid the denominator being zero;

[0191] S8.5. For each device Calculate the network latency score:

[0192] ;

[0193] in, Indicates the device Network latency score; Indicates the device Network latency; Represents a small positive number used to avoid the denominator being zero in the network delay scoring function;

[0194] S8.6. Define weight coefficients , and , so that ;

[0195] in, The weight coefficient representing the equipment load score; Indicates the weight coefficient of the geographic location score; Represents the weight coefficient of network delay score;

[0196] For each device Calculate the weighted composite score:

[0197] ;

[0198] in, Indicates the device The weighted comprehensive score of

[0199] S8.7. Select the device with the highest weighted comprehensive score from all devices As the best equipment:

[0200] ;

[0201] in, An index number indicating the best device; Indicates the maximum value of the argument;

[0202] S8.8. Distribute the received request instruction data to the device with the highest score to be processed.

[0203] In this example, the parsing process is as follows:

[0204] S9.1. Extract payload from client message;

[0205] S9.2. Convert the payload from a binary string to a parsable JSON format;

[0206] S9.3, parsing the command data in JSON format to extract the command type and parameters;

[0207] S9.4, setting the state of the geophysical dedicated equipment according to the parsed command type and parameters;

[0208] S9.5. Generate response data according to the result of command execution.

[0209] Embodiment 2: This embodiment provides a network communication protocol system for geophysical special equipment, including geophysical special equipment, a processor, and a computer program stored in the geophysical special equipment and executable on the processor, wherein the computer program executable on the processor is used to implement the network communication protocol method for the above-mentioned geophysical special equipment.

[0210] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only preferred examples of the present invention, and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. A network communication protocol method for geophysical special equipment, characterized in that: The following steps are involved: S1. The geophysical network unit transmits the measurement data to the communication protocol system through the MQTT protocol; Among them, the MQTT protocol uses a publish-subscribe model to achieve data transmission; S2, the communication protocol system transmits the measurement data to the client via the MQTT protocol; S3: The client sends the identity credentials, the communication protocol system verifies the identity credentials, and encrypts the data during the data transmission process; S4. The geophysical network unit publishes the real-time data to the real-time data transmission topic through the communication protocol system, and the communication protocol system finds the shortest data transmission path based on the Dijkstra algorithm to improve the data transmission efficiency. The client subscribes to the real-time data transmission topic and receives the real-time data. S5. The client publishes the command data to the command data transmission topic through the communication protocol system. The geophysical network unit subscribes to the command data transmission topic, receives the request command through the intelligent routing algorithm and processes the data, and then performs parsing according to the result of the data processing. The geophysical network unit publishes the response data to the command data transmission topic through the communication protocol system. The client subscribes to the command data transmission topic again and receives the response data. In S5, the specific steps of receiving the request instruction and performing data processing through the intelligent routing algorithm are as follows: S8.

1. Initialize device index number from arrive ,in is the number of geophysical equipment dedicated to all available geophysical network units; S8.

2. For each device , get its processing power , Current load level , the distance from the data source and network latency ; Among them, processing capacity Affected by device temperature, the device temperature is used as processing capacity The amount of influence, that is, the processing capacity Specifically: ; ; in, Indicates the device processing capabilities; Indicates the device Basic processing capabilities at room temperature; Indicates the device The current temperature; Indicates the reference temperature, which is the ideal temperature for normal operation of the equipment; represents the temperature sensitivity coefficient; represents the base of natural logarithms; S8.

3. For each device Calculate the load rating: ; in, Indicates the device Load rating of Indicates the index number of the device, from arrive ; Indicates the device processing capabilities; Indicates the device The current load level; Represents a small positive number used in the load scoring function to avoid the denominator being zero; S8.

4. For each device Calculate the location score: ; in, Indicates the device 's geographic location score; Indicates the device Distance from the data source; Represents a small positive number used in the geographic location scoring function to avoid the denominator being zero; S8.

5. For each device Calculate the network latency score: ; in, Indicates the device Network latency score; Indicates the device Network latency; Represents a small positive number used to avoid the denominator being zero in the network delay scoring function; S8.

6. Define weight coefficients , and , so that ; in, Indicates the weight coefficient of the equipment load score; Indicates the weight coefficient of the geographic location score; Represents the weight coefficient of network delay score; For each device Calculate the weighted composite score: ; in, Indicates the device The weighted comprehensive score of S8.

7. Select the device with the highest weighted comprehensive score from all devices As the best equipment: ; in, An index number indicating the best device; Indicates the maximum value of the argument; S8.

8. Distribute the received request instruction data to the device with the highest score to be processed.

2. The network communication protocol method for geophysical special equipment according to claim 1, characterized in that: In S1, the geophysical network unit includes a high sampling rate data acquisition module and a real-time data acquisition module; The high sampling rate data acquisition module is used to capture rapidly changing signals; and the real-time data acquisition module is used to capture instant data streams.

3. The network communication protocol method for geophysical dedicated equipment according to claim 1, characterized in that: In S2, the client includes: Publishing unit (1): the publishing unit (1) publishes messages to specific topics according to different levels of QoS; Subscription unit (2): The subscription unit (2) subscribes to a topic of interest or unsubscribes from a topic of no interest through received messages.

4. The network communication protocol method for geophysical dedicated equipment according to claim 1, characterized in that: In S1, the communication protocol system includes: A communication management unit (3), the communication management unit (3) managing the connection status between the client and the system, and performing identity verification when each connection is established, as well as managing the identity authentication method; A data transmission unit (4), wherein the data transmission unit (4) performs data transmission according to client requirements and encrypts network transmission using a TLS / SSL encryption algorithm; A real-time monitoring unit (5), wherein the real-time monitoring unit (5) continuously monitors the system status and the status of the device.

5. The network communication protocol method for geophysical dedicated equipment according to claim 4, characterized in that: The data transmission unit (4) comprises a real-time transmission module and an instruction transmission module; The real-time transmission module is used to process data interaction between the client and the system that requires instant feedback; The instruction transmission module is used to send and receive instruction data between the client and the system.

6. The network communication protocol method for geophysical dedicated equipment according to claim 4, characterized in that: The specific implementation steps of the real-time monitoring unit (5) are: Use Prometheus to collect and store real-time geophysical equipment status data, and use Grafana to display real-time geophysical equipment status data and set alerts.

7. The network communication protocol method for geophysical dedicated equipment according to claim 1, characterized in that: In S4, the specific steps of the communication protocol system finding the shortest data transmission path based on the Dijkstra algorithm are: S7.

1. Create a collection , used to save the nodes of the shortest path; S7.

2. Create a distance array To save the shortest distance from the starting node to each node, initially, the distances of all nodes except the starting node are set to infinity , the distance of the starting node is set to ; Initialize the distance array: ; in, Indicates starting point To the top The length of the currently known shortest distance; Represents a distance array The vertices in represents the starting point, that is, the vertex at the beginning of the algorithm; The distance from the starting point to itself is ; The initial distance from the starting point to another point is set to infinity, indicating that the path has not yet been found; S7.

3. Create a predecessor node array To save the predecessor node of each node, which is used to construct the shortest path. Initially, the predecessor nodes of all nodes are set to ; Initialize the predecessor array: ; ; in, Represents a vertex The predecessor vertex, that is, the arrival vertex The previous vertex on the shortest path; Represents a distance array All vertices in S7.

4. Select distance array from nodes whose shortest path is not determined The smallest node And the node Add to Collection In, it is used to determine the starting node arrive The shortest path; S7.

5. For nodes All neighbor vertices of , calculate from the starting node Via Node arrive The length of the path : ; If the length of this path is less than the current , then update is the length of this path, and Set to : ; ; in, Represents a vertex The leading vertex of Represents a distance array The smallest node; Representation Node Neighbor vertices of ; Represents a slave node To neighbor vertex The weight of the edge; S7.6, repeat steps S7.4 and S7.5 until the set Until the target node, which is the node with the shortest path, is found; S7.7, starting from the target node, along the predecessor node array Backtrack until you get back to the starting node and get the shortest path from the starting node to the target node.

8. The network communication protocol method for geophysical dedicated equipment according to claim 1, characterized in that: In S5, the specific process of parsing is as follows: S9.

1. Extract payload from client message; S9.

2. Convert the payload from a binary string to a parsable JSON format; S9.3, parsing the command data in JSON format to extract the command type and parameters; S9.4, setting the state of the geophysical dedicated equipment according to the parsed command type and parameters; S9.

5. Generate response data according to the result of command execution.

9. A network communication protocol system for geophysical dedicated equipment, comprising geophysical dedicated equipment, a processor, and a computer program stored in the geophysical dedicated equipment and executable on the processor, characterized in that: The computer program running on the processor is used to implement the network communication protocol method for geophysical dedicated equipment as described in any one of claims 1-8.