A Distributed Intelligent Analysis and Release System for Earthquake Early Warning Signals
By combining parsing, computation, and reconstruction modules, and employing dynamic scheduling and adaptive transmission modes, the dynamic scheduling problem in existing network message distribution systems under high concurrency and time-sensitive scenarios is solved, thereby improving the resource utilization and message transmission efficiency of receiving nodes.
Patent Information
- Application Number
- CN202611635825.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-17
AI Technical Summary
Existing network message distribution systems, in scenarios with high concurrency, strong timeliness, and significant differences in node distribution, cannot dynamically schedule based on the remaining valid time of different receiving nodes. This results in problems such as expired messages continuing to occupy queue resources, large delays in sending critical time-sensitive messages, numerous regenerations of complete messages, and a lack of adaptive switching of network transmission modes.
The parsing module extracts the epicenter's geographic coordinates and absolute earthquake timestamp, the calculation module converts them into spatiotemporal parameters in a unified format, the reconstruction module reconstructs the publish-subscribe logical topology based on the receiver node's location, the scheduling module calculates the remaining valid time and pushes it into the priority queue, the distribution module generates different types of message payloads and selects the transmission mode, and stores and transmits them by combining network connection identifiers and bypass communication addresses.
It improves the efficiency of connection state management in high-concurrency receiver node scenarios, enhances the matching degree between message distribution logic and effective reception time window, avoids queue resources being occupied by expired messages, reduces queuing latency of critical time-sensitive messages, and adaptively selects transmission mode to reduce encapsulation and transmission overhead.
Smart Images

Figure CN123123399A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication and data processing technology, specifically to a distributed intelligent analysis and dissemination system for earthquake early warning signals. Background Technology
[0002] With the large-scale deployment of IoT terminals, mobile receiving terminals, and fixed information receiving nodes, real-time data dissemination systems for emergencies need to send event messages to a large number of distributed receiving nodes within a short period of time. These systems are typically deployed in core data centers and establish communication connections with upstream data sources and downstream receiving nodes through dedicated networks, public networks, or a combination of both. For time-sensitive services such as earthquake early warning, disaster early warning, and industrial safety alarms, the transmission latency between message generation at the central side and reception at the terminal side directly affects whether the receiving nodes can perform corresponding actions within the effective time window.
[0003] Existing emergency information dissemination systems typically include processes such as message reception, message type identification, dissemination rule judgment, message queue establishment, and service product delivery. Taking an earthquake information dissemination system as an example, after receiving earthquake information from an upstream data processing system or a higher-level information dissemination center, the system usually establishes early warning event message queues, earthquake rapid reporting queues, intensity rapid reporting queues, or message dissemination queues based on message type. Combined with preset dissemination strategies, dissemination channels, subscribed topics, and regional scope, it then pushes service products to relevant users or terminals. Some systems can also classify earthquake events from multiple message sources as the same event based on parameters such as event identifier, earthquake occurrence time deviation, epicenter location deviation, and magnitude deviation, to achieve integrated dissemination of initial, follow-up, or final reports.
[0004] The aforementioned publishing methods can meet the needs of message reception, rule judgment, topic subscription, and channel push in general business processes. However, their focus is usually on business rule configuration and service product publishing management. Existing systems, when distributing messages, often organize message queues based on the connection order of receiving nodes, static subscription relationships, administrative regions, terminal types, or fixed publishing topics, and typically generate and send complete application-layer messages to receiving nodes that meet the publishing conditions. While this approach is simple to implement, it is difficult to differentiate the sending tasks based on the actual remaining valid time of each receiving node in scenarios with a large number of receiving nodes, significant differences in node geographical locations, and different event validity time windows.
[0005] Especially in application scenarios with propagation timing characteristics, such as earthquake early warning, the distance between different receiving nodes and the event source location varies, resulting in significant differences in their available early warning time. For receiving nodes that have exceeded the effective time window, continuing to generate and send complete messages will result in the ineffective use of the sending queue, network bandwidth, and computing resources. For receiving nodes that are close to the effective time boundary, if conventional application layer message encapsulation and reliable connection queue sending methods are still used, the messages are very likely to miss the effective reception time due to serialization overhead, queue waiting, congestion control, or acknowledgment retransmission mechanisms.
[0006] Furthermore, existing publish-subscribe topologies are mostly established based on pre-configured business topics, publishing channels, or regional scopes, typically failing to dynamically reconstruct the distribution topology by incorporating the event source location, receiver node location, and theoretical propagation delay. Consequently, when multiple receiver nodes have different remaining valid times, the system struggles to establish a scheduling order that matches the event propagation sequence, and it also struggles to adaptively switch network transmission modes based on the urgency of delay.
[0007] Therefore, there is an urgent need for a network communication processing solution that can parse, calculate latency, reconstruct logical topology, schedule priority queues, and adaptively distribute multiple transmission modes for time-sensitive event data streams, in order to improve the timeliness of message distribution in high-concurrency receiving end node scenarios and reduce the occupation of system resources and network bandwidth by invalid message processing. Summary of the Invention
[0008] The technical problem to be solved by this invention is that existing network message distribution systems cannot dynamically schedule based on the remaining valid time of different receiving nodes in scenarios with high concurrency, strong timeliness, and significant differences in node distribution. This results in expired messages continuing to occupy queue resources, large delays in sending critical time-sensitive messages, numerous repetitions of generating complete messages, and a lack of adaptive switching of network transmission modes.
[0009] To address the above problems, the present invention provides the following technical solution: The first aspect of this invention provides a distributed intelligent analysis and dissemination system for earthquake early warning signals, comprising: The parsing module is used to receive upstream earthquake monitoring data streams and extract the epicenter's geographic coordinates, absolute earthquake timestamp, and the theoretical surface propagation velocity of shear waves. The calculation module is used to obtain the parameters extracted by the parsing module, perform format alignment, and convert them into a unified spatiotemporal parameter set; The reconstruction module is used to acquire the location coordinate data of the receiving nodes, calculate the physical distance of the corresponding receiving nodes based on the location coordinate data and the epicenter geographic coordinates in the spatiotemporal parameter set, and calculate the theoretical relative time delay of the seismic waves to each receiving node by combining the shear wave theory surface propagation velocity; and reconstruct the publish-subscribe logical topology of each receiving node based on the theoretical relative time delay. The scheduling module is used to obtain the current system's absolute timestamp and, in combination with the absolute earthquake timestamp and the theoretical relative delay, calculate the remaining valid time for each receiving node to acquire the warning data. When the remaining valid time is greater than zero, the corresponding sending task is pushed into the priority sending queue and scheduled using the absolute deadline of the message as the sorting key. The absolute deadline is obtained by adding the absolute earthquake timestamp and the theoretical relative delay. The distribution module is used to extract the dequeued sending tasks from the priority sending queue, recalculate the current remaining valid time based on the current system absolute timestamp at the moment of dequeueing, and compare the current remaining valid time with a preset latency tolerance threshold to determine the distribution mode: when the current remaining valid time is greater than or equal to the latency tolerance threshold, a complete application layer message payload is generated and sent through the pre-established main communication connection with the corresponding receiving node; when the current remaining valid time is less than the latency tolerance threshold but greater than zero, a simplified instruction payload is generated, and the bypass communication address information of the corresponding receiving node is obtained, and the simplified instruction payload is transparently transmitted to the corresponding receiving node through the bypass communication channel.
[0010] Preferably, the system further includes an access module and a connection module. The access module listens for network access requests initiated by receiving nodes and completes network access processing. The connection module connects to the access module and establishes a persistent Transmission Control Protocol (TCP) connection for the receiving nodes to serve as the primary communication connection, and assigns a network connection identifier to each connection. The connection module also constructs a location mapping table and a connection state mapping table in the distributed cache system. The location mapping table associates network connection identifiers with location coordinate data for the reconstruction module to read. The connection state mapping table associates network connection identifiers, persistent TCP connection handles, and bypass communication address information for the distribution module to read. Through the above settings, the system performs network handshake, connection establishment, and state mapping operations upfront, providing a data foundation for subsequent dynamic topology reconstruction based on physical spatiotemporal characteristics.
[0011] Preferably, the specific method by which the reconstruction module calculates the physical distance to the corresponding receiving node is as follows: Based on the spherical cosine theorem, using the location coordinate data of the receiving node and the geographical coordinates of the epicenter, the great circle distance between the geographical location of each receiving node and the geographical coordinates of the epicenter is calculated; the great circle distance is divided by the theoretical surface propagation speed of shear waves to obtain the theoretical relative time delay. By combining the physical distance calculation with the curvature characteristics of the Earth, the calculation benchmark of the propagation time delay conforms to the surface propagation law of seismic waves.
[0012] Furthermore, the specific process of reconstructing the publish-subscribe logical topology by the reconstruction module includes: discretizing the continuous theoretical relative latency into multiple latency slice intervals according to the preset latency slice step size; instantiating multiple latency-layered virtual topics corresponding to each latency slice interval in the memory space of the message middleware, and associating the network connection identifiers in the location mapping table with the corresponding latency-layered virtual topics to reconstruct the publish-subscribe logical topology. Through the discretized latency slices, receiving nodes are mapped to the corresponding virtual topics, reducing the resource consumption of establishing a separate distribution task for each node.
[0013] Furthermore, after completing the association, the reconstruction module also constructs a logical multicast tree in system memory organized according to latency tiers. The logical multicast tree uses a shared payload buffer as the root node, latency-tiered virtual topics as topic nodes, and receiver nodes associated with the corresponding latency-tiered virtual topics as leaf nodes. The reconstruction module generates a direct memory address pointer to the corresponding shared payload buffer for each latency-tiered virtual topic. By constructing the logical multicast tree and using direct memory address pointers, multiple receiver nodes can access the same warning payload, reducing memory copying steps and memory consumption during concurrent distribution.
[0014] Preferably, the priority sending queue is a min-heap priority queue. When executing scheduling, the scheduling module specifically pushes message descriptors containing network connection identifiers, absolute deadlines, and corresponding remaining valid time into the min-heap priority queue as sending tasks, and performs dynamic rearrangement within the binary min-heap structure to maintain the min-heap characteristic that the parent node's sorting key value is less than or equal to the child node's sorting key value. The system utilizes the min-heap characteristic to sort and extract sending tasks, ensuring that messages with smaller absolute deadlines are processed first.
[0015] Furthermore, the scheduling module also performs timeout branching during the sending queue scheduling process: when the calculated remaining valid time is less than or equal to zero, a timeout discard operation is performed, releasing the queue buffer resources occupied by the corresponding sending task and terminating the enqueue operation of that sending task. This operation blocks invalid sending tasks during the enqueue phase, preventing data that has lost its warning significance from occupying queue buffer resources.
[0016] Preferably, the two types of payloads generated by the distribution module have the following structural characteristics: the complete application layer message payload includes structured numerical fields and structured text fields to characterize the state of the seismic event; the simplified instruction payload strips the application layer structured text fields and contains preset instruction codes to instruct the receiving nodes to perform early warning actions, and the data length of the simplified instruction payload is shorter than that of the complete application layer message payload. The system adjusts the message structure according to the remaining effective time, sending out structured fields when there is sufficient time, and reducing the network transmission time by reducing the message size when time is tight.
[0017] Furthermore, when the distribution module transmits the simplified instruction payload through the bypass communication channel, it specifically performs the following: calls the connectionless socket interface to perform bypass transparent transmission distribution to the receiving node based on the bypass communication address information recorded in the connection state mapping table; during bypass transparent transmission distribution, it keeps the persistent transmission control protocol connection corresponding to the receiving node in an open state. Using connectionless sockets to perform packet transparent transmission while maintaining the main communication connection state reduces the additional processing steps caused by communication link switching.
[0018] Furthermore, after recalculating the remaining valid time, the distribution module also performs a secondary timeout check: if the remaining valid time is determined to be less than or equal to zero, the current earthquake event transmission task is deemed to have timed out, the corresponding transmission task is discarded, and the memory resources occupied by the transmission task in the current earthquake event are released. During the dequeue phase, the time consumed in the queuing process is confirmed through a secondary check, and timeout tasks are discarded to prevent invalid data from consuming downlink network bandwidth.
[0019] A second aspect of this invention provides a method for intelligent analysis and dissemination of distributed earthquake early warning signals, comprising the following steps: Receive upstream earthquake monitoring data streams and extract the epicenter's geographic coordinates, absolute earthquake timestamp, and theoretical surface propagation velocity of shear waves; The extracted parameters are obtained, their formats are aligned, and they are converted into a spatiotemporal parameter set with a unified format. The location coordinate data of the receiving nodes are obtained. The physical distance of the corresponding receiving nodes is calculated based on the location coordinate data and the epicenter geographic coordinates in the spatiotemporal parameter set. The theoretical relative time delay of the seismic waves to each receiving node is calculated by combining the shear wave theory surface propagation velocity. Reconstruct the publish-subscribe logical topology for each receiving node based on the theoretical relative time delay; Obtain the current system's absolute timestamp, and combine it with the absolute earthquake timestamp and the theoretical relative delay to calculate the remaining effective time for each receiving node to acquire the early warning data; When the remaining valid time is greater than zero, the corresponding sending task is pushed into the priority sending queue and scheduled using the absolute deadline of the message as the sorting key; the absolute deadline is obtained by adding the absolute seismic timestamp to the theoretical relative delay; Extract the dequeued sending tasks from the priority sending queue and recalculate the current remaining valid time based on the current system absolute timestamp at the moment of dequeueing; The current remaining valid time is compared with a preset latency tolerance threshold to determine the distribution mode: when the current remaining valid time is greater than or equal to the latency tolerance threshold, a complete application layer message payload is generated and sent through the pre-established main communication connection with the corresponding receiving node; when the current remaining valid time is less than the latency tolerance threshold but greater than zero, a simplified instruction payload is generated, and the bypass communication address information of the corresponding receiving node is obtained. The simplified instruction payload is then transparently transmitted to the corresponding receiving node through the bypass communication channel.
[0020] This invention provides a distributed intelligent analysis and dissemination system for earthquake early warning signals. It has the following advantages: 1. This invention associates and stores the location coordinates of the receiving node, the persistent transmission control protocol connection handle, and the bypass communication address information through a network connection identifier. This enables the system to perform location queries, connection queries, and bypass address queries within the same identifier system. This improves the efficiency of connection state management in high-concurrency receiving node scenarios and provides a data foundation for subsequent queue scheduling and transmission channel switching.
[0021] 2. This invention calculates the theoretical relative latency based on the great circle distance between the receiving node and the event source, and constructs a latency-layered virtual topic based on this theoretical relative latency. This reconstructs the traditional static publish-subscribe relationship into a dynamic logical topology that matches the event propagation sequence. Consequently, different receiving nodes can be organized and scheduled according to their timeliness requirements, improving the matching degree between message distribution logic and the effective reception time window.
[0022] 3. This invention calculates the remaining valid time based on the absolute earthquake timestamp, theoretical relative delay, and the current system absolute timestamp. Timed-out tasks are discarded, and non-timed-out tasks are pushed into a minimum-heap priority queue according to their absolute deadlines. This avoids expired messages from continuing to occupy queue buffer resources and egress bandwidth, and prioritizes messages closer to the timeout boundary for transmission, reducing queuing latency for time-sensitive messages.
[0023] 4. This invention recalculates the remaining valid time when a message is dequeued and adaptively selects between sending a complete application layer message or bypassing and transparently transmitting a simplified instruction based on a comparison between the remaining valid time and the latency tolerance threshold. Thus, when the remaining valid time is sufficient, message content integrity and reliable transmission are guaranteed; when the remaining valid time is insufficient but has not yet timed out, encapsulation and transmission overhead are reduced, increasing the probability of timely acquisition of core instructions at critical time-sensitive nodes.
[0024] 5. This invention recalculates the remaining valid time when a message is dequeued and adaptively selects between sending a complete application layer message or bypassing and transparently transmitting a simplified instruction based on a comparison between the remaining valid time and the latency tolerance threshold. Thus, when the remaining valid time is sufficient, message content integrity and reliable transmission are guaranteed; when the remaining valid time is insufficient but has not yet timed out, protocol encapsulation and network handshake overhead are reduced, increasing the probability that critical time-sensitive nodes can obtain core instructions in a timely manner. Attached Figure Description
[0025] Figure 1 This is a diagram of the distributed earthquake early warning signal intelligent analysis and dissemination system architecture of the present invention; Figure 2 This is a flowchart of the distributed earthquake early warning signal intelligent analysis and dissemination method of the present invention; Figure 3 This is the timing diagram for the node access and mapping state initialization of the present invention; Figure 4 This is a flowchart of the upstream earthquake monitoring data analysis and parameter standardization process of the present invention; Figure 5 This is a flowchart illustrating the calculation of physical distance and propagation delay according to the present invention; Figure 6 This is a schematic diagram of the time-delay-based logical topology reconfiguration process of the present invention; Figure 7 This is a flowchart of the time-delay-constrained dynamic queue scheduling process of the present invention; Figure 8 This is a flowchart illustrating the protocol adaptive distribution process of the present invention. Figure 9 This is a schematic diagram of the receiver node delay layering and distribution path of the present invention; Figure 10 This is a statistical diagram showing the theoretical relative delay and distribution mode of the receiving node in this invention; Figure 11 This is a comparison chart of the transmission delay of the critical node in this invention; Figure 12 This is a comparison chart of the export transmission load and timeout task occupancy for the present invention.
[0026] Among them, 10 is the access module; 20 is the connection module; 30 is the parsing module; 40 is the calculation module; 50 is the reconstruction module; 60 is the scheduling module; and 70 is the distribution module. Detailed Implementation
[0027] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] See attached document Figure 1 , Figure 1 This is an architecture diagram of a distributed intelligent earthquake early warning signal analysis and dissemination system according to an embodiment of the present invention. The present invention provides a distributed intelligent earthquake early warning signal analysis and dissemination system, which is deployed in a core data center and establishes network communication with upstream earthquake monitoring networks and downstream receiving nodes. The system includes an access module 10, a connection module 20, an analysis module 30, a calculation module 40, a reconstruction module 50, a scheduling module 60, and a distribution module 70.
[0029] Access module 10 is used to listen for network access requests initiated by multiple receiving nodes and complete the underlying network handshake processing. After the handshake is completed, access module 10 transfers the access object to connection module 20.
[0030] The connection module 20 is connected to the access module 10 to establish a persistent transmission control protocol connection for the access receiving node, and at the same time assigns a uniquely verified network connection identifier to each connection.
[0031] The connection module 20 receives the location coordinate data uploaded by the receiving node and builds a location mapping table in the distributed caching system to associate and store the network connection identifier with the corresponding location coordinate data in order to maintain the mapping relationship between the network status and geographical location of the receiving node.
[0032] The connection module 20 also constructs a connection state mapping table to associate and store network connection identifiers, persistent transmission control protocol connection handles, and bypass communication address information. The bypass communication address information is used by the distribution module 70 to determine the bypass communication address and bypass communication port of the corresponding receiving node when bypass transparent transmission distribution is triggered.
[0033] The parsing module 30 receives upstream earthquake monitoring data streams from the upstream earthquake monitoring network via a network interface, performs adaptive recognition and parsing on the input upstream data frames, extracts the epicenter geographic coordinates, absolute earthquake timestamp, and the theoretical surface propagation velocity of shear waves, and generates the corresponding earthquake event identifier.
[0034] The calculation module 40 obtains the parameters extracted by the parsing module 30, reads the corresponding earthquake event identifiers, performs numerical format alignment, and outputs them as a unified set of spatiotemporal parameters.
[0035] The reconstruction module 50 reads the location mapping table maintained by the connection module 20 and the set of spatiotemporal parameters output by the calculation module 40. Based on the spherical trigonometry calculation method, it calculates the great circle distance between the geographical location of each receiving node and the geographical coordinates of the epicenter, and calculates the theoretical relative time delay of the seismic wave reaching each receiving node by combining the surface propagation velocity of the transverse wave theory.
[0036] Based on the theoretical relative latency calculation results, the reconstruction module 50 instantiates multiple latency-layered virtual topics in the memory space of the message middleware and associates the network connection identifiers in the location mapping table with the corresponding latency-layered virtual topics to reconstruct the publish-subscribe logical topology.
[0037] The scheduling module 60 performs transmission queue scheduling for the receiving nodes under each latency-layered virtual topic. The scheduling module 60 obtains the current system absolute timestamp and, combined with the absolute seismic origin timestamp and the theoretical relative latency, calculates the remaining valid time for each receiving node to acquire the early warning data.
[0038] The scheduling module 60 performs branch processing based on the remaining valid time. When the remaining valid time is less than or equal to zero, the scheduling module 60 performs a timeout discard operation, releasing the queue buffer resources occupied by the corresponding network connection identifier in the current earthquake event transmission task. When the remaining valid time is greater than zero, the scheduling module 60 pushes the message descriptor containing the network connection identifier, absolute deadline, and corresponding remaining valid time into the min-heap priority queue, and dynamically rearranges it using the absolute deadline as the sorting key; wherein, the absolute deadline is obtained by adding the absolute earthquake timestamp to the theoretical relative delay.
[0039] The distribution module 70 works in conjunction with the scheduling module 60 to extract dequeued message descriptors from the min-heap priority queue. When a message descriptor is dequeued, the distribution module 70 recalculates the remaining valid time based on the current system absolute timestamp at the moment of dequeueing, and compares the remaining valid time with a preset latency tolerance threshold to determine the network transmission mode of the current message.
[0040] If the remaining valid time is greater than or equal to the latency tolerance threshold, the distribution module 70 generates a complete application layer message payload and sends it to the corresponding receiving node through the persistent transmission control protocol connection established by the connection module 20.
[0041] If the remaining valid time is less than the latency tolerance threshold but greater than zero, the distribution module 70 strips the application layer structured payload, generates a simplified instruction payload, and calls the connectionless socket interface. Based on the bypass communication address information recorded in the connection state mapping table, the simplified instruction payload is transmitted to the corresponding receiving node through the bypass communication channel.
[0042] If the remaining valid time is less than or equal to zero, the distribution module 70 discards the corresponding message descriptor and releases the memory resources occupied by the message descriptor in the current earthquake event transmission task.
[0043] See attached document Figure 2 , Figure 2 This is a flowchart of a distributed earthquake early warning signal intelligent analysis and dissemination method according to an embodiment of the present invention. The present invention provides a distributed earthquake early warning signal intelligent analysis and dissemination method, comprising the following steps: S10: Listen for network access requests from receiving nodes. After completing the network handshake, establish a persistent transmission control protocol (TCP) connection corresponding to the receiving node and assign a uniquely verified network connection identifier to the persistent TCP connection. Receive location coordinate data uploaded by the receiving node and construct a location mapping table. Record the bypass communication address information of the receiving node, construct a connection state mapping table, and associate and store the network connection identifier, location coordinate data, persistent TCP connection handle, and bypass communication address information. S20 receives upstream earthquake monitoring data stream, adaptively identifies and parses upstream data frames, extracts epicenter geographic coordinates, absolute earthquake timestamp and shear wave theoretical surface propagation velocity, generates corresponding earthquake event identifiers, and outputs a set of spatiotemporal parameters containing the above parameters. S30, read the location mapping table and spatiotemporal parameter set, calculate the great circle distance between the geographical location of each receiving node and the geographical coordinates of the epicenter, and calculate the theoretical relative time delay of the seismic wave to each receiving node based on the great circle distance and the theoretical surface propagation speed of the transverse wave. S40 uses earthquake event identifiers as namespaces, instantiates multiple latency-layered virtual topics in the memory space of the message middleware according to theoretical relative latency, and associates network connection identifiers in the location mapping table with the corresponding latency-layered virtual topics to reconstruct the publish-subscribe logical topology; S50: Obtain the current system absolute timestamp, and calculate the remaining valid time for each receiving node to acquire the early warning data by combining the absolute earthquake timestamp with the theoretical relative delay. When the remaining valid time is less than or equal to zero, perform a timeout discard operation to release the queue buffer resources occupied by the corresponding network connection identifier in the current earthquake event transmission task. When the remaining valid time is greater than zero, push the message descriptor containing the network connection identifier, earthquake event identifier, absolute deadline, and remaining valid time into the min-heap priority queue, and dynamically rearrange it using the absolute deadline as the sorting key value of the min-heap priority queue. The absolute deadline is obtained by adding the absolute earthquake timestamp to the theoretical relative delay. S60: Extract the dequeued message descriptor from the min-heap priority queue, recalculate the current remaining valid time based on the current system absolute timestamp at the moment of dequeue, and compare the current remaining valid time with the preset latency tolerance threshold; when the current remaining valid time is greater than or equal to the latency tolerance threshold, generate a complete application layer message payload and send it to the corresponding receiving node through the persistent transmission control protocol connection; when the current remaining valid time is less than the latency tolerance threshold but greater than zero, generate a simplified instruction payload, call the connectionless socket interface, and perform bypass transparent transmission distribution to the corresponding receiving node through the bypass communication channel according to the bypass communication address information recorded in the connection state mapping table; when the current remaining valid time is less than or equal to zero, discard the corresponding message descriptor.
[0044] The following section will further explain the specific implementation of the above method in conjunction with the processing procedures of each functional module.
[0045] See attached document Figure 3 , Figure 3 This is a timing diagram for node access and mapping state initialization according to an embodiment of the present invention. Figure 3 In the illustrated embodiment, node access and mapping state initialization are used to establish a communication association between the receiving node and the core data center, and to form the basic mapping data required for subsequent latency calculation, queue scheduling, and bypass transparent distribution. This process includes steps S11 to S13.
[0046] S11, the access module 10 starts listening to the underlying network socket on the preset network port, receives network access requests initiated by multiple receiving end nodes, and completes the handshake process according to the preset network protocol.
[0047] After the handshake is completed, the connection module 20 establishes a persistent transmission control protocol (TCP) connection for the receiving node. This persistent TCP connection maintains the link's activity by keeping the underlying network socket open and using periodic heartbeat packets to reduce the probability of abnormal disconnections caused by network idleness.
[0048] The connection module 20 assigns a network connection identifier to each persistent transport control protocol connection. Specifically, the connection module 20 extracts the current system timestamp, random seed, and connection context information, generates a string of a specific length through hash operation, and performs identifier conflict detection in the connection state mapping table. If a duplicate string is detected, a new string is generated until an unused network connection identifier is obtained. This network connection identifier is used to identify the corresponding receiving node during subsequent location mapping, queue scheduling, and data distribution processes.
[0049] Meanwhile, the connection module 20 generates a node session token for the receiving node and sends it to the corresponding receiving node through the persistent transmission control protocol; the connection module 20 also writes the node session token into the connection state mapping table as an authentication parameter for subsequent bypass communication command verification.
[0050] S12, the receiving node obtains its own satellite positioning data, encapsulates it into location coordinate data, and uploads it to the connection module 20 through the persistent transmission control protocol.
[0051] When the position change of the receiving node exceeds the preset distance threshold, or when the preset position refresh cycle is reached, the receiving node re-uploads the latest position coordinate data; the connection module 20 refreshes the standardized position parameters corresponding to the network connection identifier in the position mapping table according to the latest position coordinate data.
[0052] The connection module 20 parses the location coordinate data and extracts the original longitude and latitude angle values of the current geographical location of the receiving node. To reduce the inconsistency in floating-point bit length caused by the difference in the accuracy of positioning chips between different models of receiving nodes, the connection module 20 truncates the original longitude and latitude angle values, retaining a preset number of decimal places; in one embodiment, the preset number is 4 to 6 decimal places.
[0053] Subsequently, the connection module 20 converts the truncated latitude and longitude angle values into radians. The conversion relationship from angle to radians is as follows: ; ; in, This represents the converted node longitude in radians. This represents the generated node latitude in radians after conversion; This represents the original longitude angle value after truncation. This represents the original latitude and angle value after truncation. The constant pi, representing the system's preset accuracy, can be taken as 3.14159 in this embodiment.
[0054] S13, the connection module 20 encapsulates the node's longitude and latitude values into a standardized location structure, which serves as the standardized location parameter for the receiving node. The connection module 20 then calls its internal data storage interface to construct a location mapping table in the distributed caching system.
[0055] The location mapping table uses the network connection identifier as the primary key for querying and the corresponding standardized location parameters as storage values. Through this location mapping table, the system can obtain the geographical location of the receiving node based on the network connection identifier during subsequent distance calculations and message delivery.
[0056] The connection module 20 also constructs a connection state mapping table. The connection state mapping table uses the network connection identifier as the query primary key, and its stored values include the persistent Transmission Control Protocol connection handle, the network address of the receiving node, the bypass communication address, the bypass communication port, the node session token, and the time of the most recent heartbeat.
[0057] The bypass communication port is uploaded by the receiving node after establishing a persistent transmission control protocol connection, or determined by the system based on the receiving node's access registration information. When the receiving node is located after a network address translation device, the system determines the reachable bypass communication address and bypass communication port based on the receiving node's registration information, heartbeat detection results, or pre-configured port mapping relationships.
[0058] The connection module 20 writes the network connection identifier and standardized location parameters into the location mapping table, and writes the network connection identifier, persistent transmission control protocol connection handle, bypass communication address, bypass communication port, and node session token into the connection state mapping table. Thus, the location mapping table is used to maintain the association between the receiving node's network status and geographical location, and the connection state mapping table is used to maintain the association between the receiving node's network connection status and bypass communication address information.
[0059] To reduce read / write conflicts in the location mapping table when a large number of receiving nodes access the network concurrently, the connection module 20 is configured with a fragmented write control mechanism. The connection module 20 calculates hash slots based on the network connection identifier and divides the location mapping table into multiple data fragments according to the hash slots; each data fragment is configured with an independent mutex lock.
[0060] When it is necessary to write or refresh the location mapping data of a certain receiving node, the connection module 20 determines the corresponding data fragment based on the network connection identifier of the receiving node, and applies a locking operation only to the matched data fragment; the data fragments that are not locked continue to respond to concurrent read requests from other modules.
[0061] When a hash slot collision occurs, the connection module 20 adds a conflict entry to the corresponding slot using a linked list or red-black tree structure to maintain the integrity of the mapping relationship between the network connection identifier and the standardized location parameter.
[0062] The connection state mapping table can adopt the same fragmented write control mechanism as the location mapping table, or adopt an independent concurrent mapping structure to ensure that bypass communication address information, node session tokens and heartbeat times can be reliably written and queried in high-concurrency access scenarios.
[0063] See attached document Figure 4 , Figure 4 This is a flowchart of upstream earthquake monitoring data analysis and parameter standardization according to an embodiment of the present invention. Figure 4 In the illustrated embodiment, the upstream seismic monitoring data parsing and parameter standardization process is used to convert the upstream seismic monitoring data stream output by the upstream seismic monitoring network into a set of spatiotemporal parameters that can be directly used within the system for distance calculation, delay calculation, and queue scheduling. This process includes steps S21 to S25.
[0064] S21, the parsing module 30 receives upstream earthquake monitoring data streams from the upstream earthquake monitoring network via the dedicated network interface. The parsing module 30 performs adaptive identification and parsing of the upstream data frames based on the protocol type, frame header feature identifier bits, field arrangement rules, and abnormal field judgment rules.
[0065] To reduce the impact of instantaneous concurrent input of upstream seismic monitoring data streams on the parsing module 30, the parsing module 30 is configured with a circular buffer queue in the receiver-side memory. The parsing module 30 writes the received raw data frames into the circular buffer queue and reads the data frames to be parsed sequentially according to the writing order.
[0066] The parsing module 30 reads the feature identifier and length declaration field of the data frame header and compares the actual received length of the data frame with the declared length in the header. When the actual received length is inconsistent with the declared length in the header, or when the feature identifier does not match the preset protocol type, the parsing module 30 marks the data frame as an abnormal data frame and stops performing subsequent parameter extraction on the data frame.
[0067] In one implementation, the parsing module 30 further performs integrity verification on the data frame based on the cyclic redundancy check field or message digest field in the data frame; when the verification fails, the parsing module 30 discards the data frame and records the corresponding exception type.
[0068] S22, after the data frame verification passes, the parsing module 30 parses the effective payload area of the data frame and extracts the core parameters characterizing the state of the seismic event from preset fields. The core parameters include the original latitude and longitude coordinates of the epicenter obtained from the upstream seismic monitoring network, the original earthquake occurrence time data, and the original surface propagation velocity of the shear wave.
[0069] The parsing module 30 generates an earthquake event identifier based on the event number field in the data frame. When the event number field is not present in the data frame, the parsing module 30 generates the earthquake event identifier based on the original latitude and longitude coordinates of the epicenter, the original earthquake occurrence time data, and the data frame reception timestamp.
[0070] If the input data frame payload lacks the field of original shear wave surface propagation velocity, the parsing module 30 calls the pre-configured default geological wave velocity constant to assign a value, so as to maintain the continuity of the subsequent theoretical relative time delay calculation process. The default geological wave velocity constant can be set according to the geological structure of the target deployment area. In one embodiment, its value ranges from 3.2 km / s to 3.5 km / s.
[0071] If the parsing module 30 is unable to extract the original latitude and longitude coordinates of the epicenter, or is unable to extract the original earthquake occurrence time data, the parsing module 30 will discard the data frame and record an error log.
[0072] S23, the calculation module 40 obtains the original latitude and longitude coordinates of the epicenter extracted by the analysis module 30 and performs coordinate format standardization processing. To ensure that the geographical coordinates of the epicenter and the location coordinates of the receiving node maintain the same coordinate units, the calculation module 40 converts the original latitude and longitude coordinates of the epicenter from degrees to radians. The conversion relationship is as follows: ; ; in, This represents the epicenter longitude in radians generated by the conversion. This represents the epicenter latitude in radians generated by the conversion; This represents the original longitude angle value of the epicenter. This represents the original latitude and angle value of the epicenter; The constant pi, representing the system's preset accuracy, can be taken as 3.14159 in this embodiment.
[0073] S24, Calculation module 40 performs time standardization processing on the raw earthquake occurrence time data. The raw earthquake occurrence time data sent by the upstream earthquake monitoring network can be a second-level timestamp, a millisecond-level timestamp, or a time string containing a decimal offset. Calculation module 40 converts the raw earthquake occurrence time data into an absolute earthquake occurrence timestamp based on the system's reference epoch time, ensuring that it is on the same time scale as the current system's absolute timestamp.
[0074] The transformation relationship for time standardization is as follows: ; in, This represents the absolute seismic timestamp generated after the conversion; This represents the integer reference time portion extracted from the original earthquake time data; This represents the fractional time offset extracted from the original earthquake time data; This represents the time precision scaling factor, used to convert external time scales into millisecond or microsecond time units that are uniformly set by the system.
[0075] In one implementation, when When the unit is microseconds and the system's internal time dimension is milliseconds, The value is -3; when When the unit is milliseconds and the system's internal time unit is microseconds, The value is 3.
[0076] S25, Calculation module 40 performs velocity dimension standardization on the original surface propagation velocity of the shear wave, converting it into the distance-time ratio unit uniformly adopted by the system, to obtain the theoretical surface propagation velocity of the shear wave. In one implementation, the distance-time ratio is measured in meters per second.
[0077] Calculation module 40 will calculate the epicenter longitude in radians. , epicenter latitude in arc Absolute earthquake timestamp Transverse wave theory: Earth's surface propagation speed The earthquake event identifier is encapsulated into a set of spatiotemporal parameters. This set of spatiotemporal parameters is output to the reconstruction module 50 and the scheduling module 60 for subsequent calculation of the great circle distance on the Earth's surface, calculation of the theoretical relative time delay, reconstruction of the publish-subscribe logical topology, and queue scheduling.
[0078] See attached document Figure 5 , Figure 5 This is a flowchart illustrating the calculation of physical distance and propagation delay according to an embodiment of the present invention. Figure 5 In the illustrated embodiment, the physical distance and propagation delay derivation process is used to calculate the great circle distance and theoretical relative delay corresponding to each receiving node based on the geographical location of the receiving node, the geographical coordinates of the epicenter, and the theoretical surface propagation speed of shear waves. This provides input for subsequent delay-layered virtual topic partitioning and transmission queue scheduling. This process includes steps S31 to S34.
[0079] S31, the reconstruction module 50 reads the input data required for distance calculation.
[0080] Specifically, the reconstruction module 50 reads the location mapping table from the distributed cache system maintained by the connection module 20, and extracts the network connection identifier of each receiving node as well as the corresponding node longitude radian value and node latitude radian value.
[0081] The reconstruction module 50 simultaneously receives the spatiotemporal parameter set output by the calculation module 40, and extracts the epicenter longitude in radians, the epicenter latitude in radians, the theoretical surface propagation velocity of shear waves, and the earthquake event identifier from the spatiotemporal parameter set.
[0082] In one implementation, before starting to traverse the location mapping table, the reconstruction module 50 performs a consistent read on the location mapping table or generates a location mapping snapshot based on the read time point; when the location mapping table is refreshed during the calculation process, the reconstruction module 50 completes the distance calculation of the current earthquake event based on the consistent read result or the location mapping snapshot.
[0083] S32, the reconstruction module 50 traverses the standardized location parameters in the location mapping table and calculates the great circle distance between the geographical location of each receiving node and the geographical coordinates of the epicenter.
[0084] In this embodiment, the reconstruction module 50 uses the spherical cosine theorem for distance calculation. Considering the high requirements for computational timeliness in earthquake early warning scenarios, using an ideal spherical model can meet the distance accuracy required for early warning distribution while controlling computational overhead. The calculation relationship for the great circle distance on the Earth's surface is as follows: ; in, Represents the receiving node Great circle distance from the epicenter's geographical coordinates; This represents a preset average radius constant for the Earth, which can be taken as 6,371,000 meters in this embodiment. Represents the receiving node The node's longitude in radians; Represents the receiving node The latitude radian value of the node; Represents the longitude in radians of the epicenter; This represents the latitude in radians at the epicenter.
[0085] Before performing the inverse cosine calculation, the reconstruction module 50 performs threshold clamping on the input value of the inverse cosine function, limiting it to between -1.0 and 1.0.
[0086] S33, Reconstruction module 50 calculates the theoretical relative time delay of seismic waves arriving at each receiving node based on the great circle distance on the Earth's surface and the theoretical surface propagation speed of shear waves.
[0087] Reconstruction module 50 divides the great circle distance at the Earth's surface by the theoretical surface propagation speed of shear waves to obtain the theoretical relative time delay of the seismic wave propagating from the epicenter to the corresponding receiving node. The calculation relationship is as follows: ; in, This represents the arrival of seismic waves at the receiving node. Theoretical relative time delay; Represents the receiving node The corresponding great circle distance on the Earth's surface; This represents the propagation speed of transverse waves on the Earth's surface, according to theory.
[0088] when The unit is meters and When the unit is meters per second, the calculated The initial unit is seconds. Refactoring module 50 adjusts the time unit according to the system's internal unified time scale. Perform the conversion; when the system's internal time unit is milliseconds, then... Convert to millisecond-level latency values; when the system's internal time unit is microseconds, Convert to microsecond-level latency values so that With absolute seismic timestamp and the current system absolute timestamp Maintain the same time dimension.
[0089] Before performing the division operation, the reconstruction module 50 verifies the theoretical surface propagation speed of transverse waves. .like If the value is zero, negative, or less than the preset safe wave velocity lower limit, then the reconstruction module 50 will... Replace it with the preset safe wave velocity lower limit and then perform the theoretical relative time delay calculation.
[0090] S34, the reconstruction module 50 binds the calculated theoretical relative time delay with the corresponding network connection identifier and earthquake event identifier, and writes the binding result into the system's time delay cache area.
[0091] In one implementation, a single record in the delay buffer region includes at least an earthquake event identifier, a network connection identifier, a great circle distance on the Earth's surface, a theoretical relative delay, and a time dimension identifier for the theoretical relative delay.
[0092] The latency data in the latency buffer area serves as the input parameter for subsequent message middleware to divide latency-layered virtual topics, reconstruct the publish-subscribe logical topology, and execute send queue scheduling.
[0093] See attached document Figure 6 , Figure 6 This is a schematic flowchart of a time-delay-based logical topology reconfiguration process according to an embodiment of the present invention. Figure 6 In the illustrated embodiment, the time-delay-based logical topology reconstruction process is used to discretize the continuous theoretical relative time delay into multiple time delay slice intervals, and form a time delay-layered virtual topic corresponding to the seismic event identifier in the memory space of the message middleware. Through this process, the system can organize the publish-subscribe logical topology according to the time sequence of seismic waves arriving at the receiving node. This process includes steps S41 to S43.
[0094] S41, the refactoring module 50 configures the delay slice partitioning logic in the memory space of the message middleware, which is used to discretize the continuous theoretical relative delay into multiple delay slice intervals.
[0095] Reconstruction module 50 reads the preset delay slice step size. Time delay slice step size The time span used to determine two adjacent delay slice intervals can be configured based on system network bandwidth, receiver node access density, and queue scheduling granularity; in one implementation, the delay slice step size... Take 1 to 3 seconds.
[0096] Before participating in the topic sequence index calculation, the reconstruction module 50 converts the time delay slice step size Δt into a relative time delay compared to the theory. Consistent time units.
[0097] The refactoring module 50 generates latency-layered virtual topics in the message middleware's memory space. Let the topic index be a non-negative integer k, then the corresponding latency-layered virtual topic is denoted as... .
[0098] When the system processes multiple seismic events simultaneously, the reconstruction module 50 uses the seismic event identifier as a namespace prefix to generate a time-delay hierarchical virtual topic bound to the corresponding seismic event. .
[0099] The refactoring module 50 also configures a lifecycle management mechanism for latency-layered virtual topics. When the distribution process of a specific earthquake event ends, or when the number of network connection identifiers associated with the corresponding latency-layered virtual topic is cleared to zero, the system releases the memory resources occupied by that latency-layered virtual topic.
[0100] S42, the reconstruction module 50 traverses the latency data in the latency buffer area, reads the network connection identifier, earthquake event identifier and theoretical relative latency corresponding to each receiving node, and determines the latency slice interval to which the receiving node belongs based on the theoretical relative latency.
[0101] To avoid duplicate mapping or omission of the same theoretical relative delay, the reconstruction module 50 calculates the topic sequence number index corresponding to the receiving node according to the following formula: ; in, This represents the floor operation; The topic index represents the topic number of the latency-layered virtual topic; This represents the time delay slice step size; Represents the receiving node The corresponding theoretical relative time delay.
[0102] Through the above rounding operation, each time delay slice interval satisfies The left-closed, right-open condition ensures that the relative time delay of a single theory only hits one time delay slice interval.
[0103] To avoid generating idle latency-layered virtual topics without associated receiver nodes in the message middleware's memory space, the reconstruction module 50 only triggers the latency-layered virtual topic under the corresponding earthquake event identifier namespace when it detects that at least one receiver node exists in the latency slice interval corresponding to a topic index k. Instantiation operations.
[0104] Based on the calculated topic index The refactoring module 50 performs latency-based route mapping, associating the corresponding network connection identifier with the corresponding latency-layered virtual topic. This correlation process relies solely on theoretical relative time delay and earthquake event identifiers, and does not depend on the administrative division attributes or hardware model of the receiving node.
[0105] S43, after completing the association between the network connection identifier and the latency-layered virtual topic, the reconstruction module 50 constructs a logical multicast tree organized according to the latency hierarchy in the system memory.
[0106] In one implementation, the logical multicast tree uses a shared payload buffer as the root node, a latency-layered virtual topic as the topic node, and a receiver node associated with the corresponding latency-layered virtual topic as the leaf node.
[0107] To reduce duplicate payload copying in high-concurrency distribution scenarios, the reconstruction module 50 allocates a shared payload buffer in the direct memory area to store the application layer message payload to be sent later or the buffer reference corresponding to the payload.
[0108] When the system processes multiple seismic events simultaneously, the reconstruction module 50 allocates shared load buffers according to the seismic event identifiers, or establishes independent index areas for different seismic events in the shared load buffers, so that the loads to be sent by different seismic events are isolated from each other.
[0109] Reconstruction module 50 provides a layered virtual topic for each latency level. Generate a direct memory address pointer to the corresponding shared payload buffer or the corresponding index region, and associate it with the same latency-layered virtual topic. The network connection identifiers are organized as a list of leaf nodes.
[0110] When the system calls the underlying network sending interface to send data, the underlying network sending interface reads or references the data to be sent in the shared payload buffer based on the direct memory address pointer.
[0111] When the runtime environment supports a zero-copy send interface, the system reduces data copying between user space and kernel space using a zero-copy approach. When the runtime environment does not support a completely zero-copy send interface, the system reuses the same shared payload buffer to generate multiple send tasks and sends them to the persistent transport control protocol connection corresponding to each network connection identifier through the underlying network socket.
[0112] Therefore, the system does not need to generate an independent copy of the application layer message payload for each receiving node under the same latency layered virtual topic, thereby reducing the memory copying overhead during high-concurrency distribution.
[0113] See attached document Figure 7 , Figure 7 This is a flowchart of a time-constrained dynamic queue scheduling process according to an embodiment of the present invention. Figure 7 In the illustrated embodiment, the delay-constrained dynamic queue scheduling process is used to calculate the remaining valid time for the receiving node to obtain the warning data based on the theoretical relative delay corresponding to each receiving node and the current system absolute timestamp, and accordingly completes the removal of timed-out tasks, enqueueing of message descriptors, and sorting of the min-heap priority queue. This process includes steps S51 to S53.
[0114] S51, the scheduling module 60 obtains the current system absolute timestamp and calculates the remaining valid time for each receiving node.
[0115] To ensure consistency in time calculation, the scheduling module 60 obtains the current system absolute timestamp through the system clock calibrated with a unified time base. In another implementation, the scheduling module 60 calls a high-precision hardware timer and combines it with the system base epoch time to generate a microsecond-level or millisecond-level current system absolute timestamp.
[0116] The scheduling module 60 reads the absolute oscillation timestamp from the spatiotemporal parameter set. And read the theoretical relative delay corresponding to the current earthquake event identifier in the delay buffer area. Subsequently, the scheduling module 60, based on the absolute earthquake timestamp... Theoretical relative time delay and the current system absolute timestamp Calculate the remaining valid time for receiving node i to acquire the early warning data. .
[0117] The calculation relationship for the remaining valid time is as follows: ; in, This represents the remaining valid time for receiving node i to acquire the early warning data. Represents the absolute timestamp of the earthquake; This represents the arrival of seismic waves at the receiving node. Theoretical relative time delay; This represents the current system's absolute timestamp. All the above time parameters have been converted to the same time unit, which is in milliseconds or microseconds.
[0118] S52, the scheduling module 60 determines the remaining valid time... Execute branch control.
[0119] The scheduling module 60 will allocate the remaining valid time. It is compared with a zero-value threshold. The zero-value threshold is used to represent the critical moment when the seismic wave theoretically arrives at the receiving node; in this embodiment, the zero-value threshold is zero and is converted to the remaining effective time. Consistent time units.
[0120] when When the value is less than or equal to the zero threshold, the scheduling module 60 determines that the current earthquake event early warning task corresponding to the receiving node i has timed out and performs a timeout discard operation.
[0121] Specifically, the scheduling module 60 terminates the subsequent enqueueing operation of the network connection identifier corresponding to the receiving node in the current earthquake event transmission task, and releases the transmission buffer queue resources occupied by the network connection identifier in the current earthquake event message scheduling process.
[0122] The timeout discard operation only applies to the current earthquake event transmission task and does not release the persistent transmission control protocol connection state, location mapping relationship, and connection state mapping relationship corresponding to the network connection identifier; when the receiving node is detected to be disconnected or the heartbeat times out, the connection module 20 then cleans up the corresponding connection state data.
[0123] S53, when When the value is greater than the zero threshold, the scheduling module 60 generates a message descriptor and performs enqueue processing.
[0124] The message descriptor includes at least a network connection identifier, an earthquake event identifier, an absolute deadline, and remaining validity time. The absolute deadline is determined by the absolute earthquake timestamp. Relative time delay compared to theory The sum is used to represent the absolute time point at which the seismic wave arrives at the corresponding receiving node according to the theory.
[0125] The scheduling module 60 pushes the message descriptor into the min-heap priority queue and uses the absolute deadline as the sorting key value of the min-heap priority queue.
[0126] Due to the current system's absolute timestamp To synchronously advance each message descriptor in the queue, if the remaining valid time calculated at the time of enqueueing is directly used as the fixed sorting key, subsequent newly enqueued message descriptors may have sorting deviations due to different enqueue times. Therefore, the scheduling module 60 uses the absolute deadline as the static sorting key, and the distribution module 70 recalculates the current remaining valid time when a message descriptor is dequeued.
[0127] When a new message descriptor is enqueued, or after the queue performs a dequeue operation, the scheduling module 60 performs a floating or sinking adjustment in the binary min-heap structure according to the absolute deadline of the message descriptor, in order to maintain the min-heap characteristic that the parent node sort key value is less than or equal to the child node sort key value.
[0128] Using the sorting method described above, the message descriptor with the earliest absolute deadline is located at the top of the min-heap priority queue, enabling the system to prioritize the processing of urgent message delivery tasks that are closer to the timeout boundary.
[0129] In one implementation, the scheduling module 60 maintains an independent min-heap priority queue for each earthquake event identifier; in another implementation, the scheduling module 60 maintains a unified min-heap priority queue and writes the earthquake event identifier into the message descriptor to distinguish the message scheduling tasks corresponding to different earthquake events.
[0130] See attached document Figure 8 , Figure 8 This is a flowchart illustrating the protocol adaptive distribution process according to an embodiment of the present invention. Figure 8 In the illustrated embodiment, the protocol adaptive distribution process is used to select the corresponding network transmission mode based on the current remaining valid time after the message descriptor is dequeued. When the current remaining valid time is sufficient, the distribution module 70 sends the complete application layer message payload through the persistent transmission control protocol connection; when the current remaining valid time is lower than the latency tolerance threshold and has not yet timed out, the distribution module 70 performs bypass transparent distribution through the connectionless socket interface. This process includes steps S61 to S64.
[0131] S61, the distribution module 70 monitors the minimum heap priority queue maintained by the scheduling module 60 and triggers the distribution state machine when the message descriptor is dequeued from the top of the heap.
[0132] After the message descriptor is dequeued, the distribution module 70 reads the absolute deadline from the message descriptor and obtains the current system absolute timestamp at the moment of dequeue. Subsequently, the distribution module 70 recalculates the current remaining valid time of the corresponding receiving node based on the difference between the absolute deadline and the current system absolute timestamp.
[0133] The calculation relationship for the current remaining valid time is as follows: Current remaining valid time = absolute deadline The current system's absolute timestamp.
[0134] Since the message descriptor consumes actual time while waiting in the min-heap priority queue, the distribution module 70 does not directly use the remaining valid time recorded when the message descriptor is enqueued, but recalculates the current remaining valid time at the moment of dequeueing.
[0135] The distribution module 70 first compares the current remaining valid time with a zero threshold. The zero threshold represents the critical moment when the seismic wave theoretically arrives at the receiving node and is converted to a time dimension consistent with the current remaining valid time.
[0136] If the remaining valid time is less than or equal to the zero threshold, the distribution module 70 determines that the current earthquake event transmission task corresponding to the message descriptor has timed out, discards the message descriptor, and releases the memory resources occupied by the message descriptor in the current earthquake event transmission task.
[0137] If the current remaining valid time is greater than the zero threshold, the distribution module 70 continues to read the preset latency tolerance threshold and converts the latency tolerance threshold into a time dimension consistent with the current remaining valid time.
[0138] In one implementation, the latency tolerance threshold is configured to be between 200 milliseconds and 500 milliseconds, with the specific value determined based on the average round-trip latency of the target network environment, the number of receiving nodes, and the timeliness requirements of the early warning service.
[0139] S62, when the current remaining valid time is greater than or equal to the latency tolerance threshold, the distribution module 70 enters the high latency tolerance state and generates a complete application layer message payload.
[0140] The complete application layer message payload includes structured numerical fields and structured text fields used to characterize the state of the earthquake event; wherein, the structured numerical fields include at least one of the following: epicenter geographic coordinates, absolute earthquake timestamp, theoretical surface propagation velocity of shear waves, and theoretical relative time delay; and the structured text fields include at least one of the following: earthquake origin name, expected intensity level, and warning message content.
[0141] The complete application layer payload can be serialized using JSON, Protobuf, or other preset data exchange formats. After serialization, the distribution module 70 queries the connection state mapping table based on the network connection identifier to obtain the corresponding persistent transmission control protocol connection handle, and then sends the complete application layer payload to the corresponding receiving node through this persistent transmission control protocol connection.
[0142] This transmission method utilizes the acknowledgment and ordered transmission mechanism of the Transmission Control Protocol to improve the reliability of the complete application layer message payload reaching the receiving node.
[0143] S63, when the current remaining valid time is less than the delay tolerance threshold and greater than the zero threshold, the distribution module 70 enters the delay sensitive state and generates a simplified instruction payload.
[0144] In latency-sensitive states, the distribution module 70 no longer generates application layer message payloads containing complete structured text fields, but instead retains the core instruction fields required to trigger warning actions by the receiving node, in order to reduce the amount of serialization processing and network transmission data.
[0145] The simplified instruction payload uses a preset instruction code as its core field. The preset instruction code is used to instruct the receiving node to perform the corresponding warning action; for example, the single-byte instruction 0x0A can be used to characterize triggering the highest-level buzzer interrupt.
[0146] In one implementation, the simplified instruction payload also includes an earthquake event identifier, a node session token, and a verification field. Upon receiving the simplified instruction payload, the receiving node identifies the corresponding earthquake event based on the earthquake event identifier, verifies the source of the instruction based on the node session token, and verifies the integrity of the payload based on the verification field.
[0147] The data length of the simplified instruction payload is less than the data length of the full application layer message payload, and less than the network's maximum transmission unit.
[0148] S64, in a time-sensitive state, the distribution module 70 calls the connectionless socket interface to send the simplified instruction payload to the corresponding receiving node through the bypass communication channel.
[0149] Connectionless socket interfaces include User Datagram Protocol (UDP) interfaces, or, if system privileges are available, raw socket interfaces. The distribution module 70 queries the connection state mapping table based on the network connection identifier in the message descriptor to obtain the bypass communication address, bypass communication port, and node session token of the corresponding receiving node.
[0150] Based on the acquired bypass communication address and bypass communication port, the distribution module 70 sends the simplified instruction payload to the corresponding receiving node. Compared with sending the complete application layer message payload through the persistent transmission control protocol connection, bypass transparent distribution does not rely on the application layer sending queue of the current persistent transmission control protocol connection, which can reduce the impact of congestion control, acknowledgment, and timeout retransmission mechanisms on the delay of emergency message transmission.
[0151] In one implementation, when performing bypass transparent distribution, the distribution module 70 does not close the corresponding persistent transmission control protocol connection, nor does it delete the connection state data in the connection state mapping table; the persistent transmission control protocol connection continues to be used for subsequent complete application layer message payload transmission, heartbeat maintenance, or node state update.
[0152] In another implementation, the distribution module 70 records the transmission result, transmission timestamp, and corresponding earthquake event identifier of the bypass transparent transmission distribution to the transmission log for subsequent status tracking.
[0153] This bypass transparent transmission distribution method reduces end-to-end transmission latency at the cost of reducing some transmission reliability guarantees. It is suitable for receiving nodes whose remaining effective time is below the latency tolerance threshold but has not yet expired.
[0154] See attached document Figure 9 , Figure 9 This is a schematic diagram of the delay layering and distribution path of the receiving node according to an embodiment of the present invention. Figure 9 In the illustrated embodiment, the distributed intelligent analysis and dissemination system for earthquake early warning signals is deployed in the regional earthquake early warning core data center. The core data center is connected to the upstream earthquake monitoring network via a dedicated network and establishes network communication with multiple receiving nodes through a dedicated communication network, a public network, or a combination of both. The receiving nodes include fixed earthquake early warning terminals, mobile receiving terminals, and IoT terminals with audio-visual alerts.
[0155] After the receiving node connects to the system, the connection module 20 establishes a persistent transmission control protocol (TCP) connection for it, assigns a network connection identifier, and writes the location coordinate data uploaded by the receiving node into the location mapping table. The connection module 20 also writes the persistent TCP connection handle, bypass communication address, bypass communication port, and node session token into the connection state mapping table.
[0156] In the illustrative scenario of this embodiment, the upstream seismic monitoring network sends a set of simulated seismic event data to the core data center. The parameters of this simulated data are shown in Table 1.
[0157] Table 1. Input parameters for earthquake events: For ease of explanation, the absolute earthquake timestamp will be used below. As a relative zero point, that is =0ms; Current system absolute timestamp The time of the earthquake is 20,000 ms.
[0158] The locations of some receiving nodes maintained by the connection module 20 are shown in Table 2.
[0159] Table 2. Receiver node location data: The reconstruction module 50 reads the location coordinates of the receiver nodes from Table 2 and calculates the great circle distance between each receiver node and the geographical coordinates of the epicenter according to the formula for calculating the great circle distance. Subsequently, the reconstruction module 50 calculates the theoretical relative delay for each receiving node according to the following formula. : ; when Using meters as the unit When using meters per second as the unit, The initial unit is seconds. Refactoring module 50 will... After being converted to a time dimension consistent with the current system's absolute timestamp, the scheduling module 60 calculates the remaining valid time according to the following formula. : ; Taking receiver node A06 as an example, its great circle distance from the epicenter's geographical coordinates is approximately 68.50 km, or 68,500 m. (Theoretical surface propagation speed of transverse waves is...) If the speed is 3400 m / s, then: =68500 / 3400≈20.148s.
[0160] The current system time is offset from the time of the earthquake by 20.000s, therefore the remaining valid time for A06 is: =20.148s 20.000s = 0.148s.
[0161] because The distribution module 70 identifies A06 as a latency-sensitive node and distributes it through a bypass communication channel using a simplified instruction payload.
[0162] Taking receiver node A07 as an example, its great circle distance on the Earth's surface is approximately 73.41 km, then: =73410 / 3400≈21.590s; =21.590s 20.000s = 1.590s.
[0163] because If the latency tolerance threshold of 0.300s is greater than the threshold, the distribution module 70 sends the complete application layer message payload to A07 via the persistent transmission control protocol connection.
[0164] Taking receiver node A05 as an example, its great circle distance on the Earth's surface is approximately 65.67 km, then: =65670 / 3400≈19.313s; =19.313s 20.000s= 0.687s.
[0165] because If the value is less than zero, scheduling module 60 will perform a timeout discard operation on the current earthquake event sending task corresponding to A05, and will no longer push the corresponding message descriptor into the minimum heap priority queue.
[0166] The calculation results for each receiving node are shown in Table 3.
[0167] Table 3. Receiver node delay calculation and distribution processing results: In Table 3, the subject index k is calculated according to the following formula: ; In this embodiment, It is 2 seconds. For example, the theoretical relative time delay corresponding to A06 is 2 seconds. The value is 20.148s, therefore: ; Therefore, both A06 and A07 are associated with the time-delay hierarchical virtual topic W, which has a topic index of 10. 10 During subsequent scheduling, scheduling module 60 still pushes message descriptors into the min-heap priority queue according to the absolute deadlines corresponding to each receiving node. Since the absolute deadline for A06 is earlier than that for A07, the message descriptor corresponding to A06 is dequeued before A07 and is distributed by distribution module 70 via bypass pass-through.
[0168] See attached document Figure 10 , Figure 10 This is a statistical diagram of the theoretical relative latency and distribution mode of the receiving node according to an embodiment of the present invention. Figure 10It can be seen that under the same earthquake event, different receiving nodes have different theoretical relative time delays due to their different geographical locations, and the system performs differentiated distribution processing accordingly.
[0169] To verify the scheduling performance of the above embodiments in a high-concurrency earthquake early warning distribution scenario, a comparative verification environment was constructed. In the verification environment, a distributed caching system, message middleware, a min-heap priority queue, a persistent transmission control protocol connection management module, and a connectionless socket sending interface were deployed in the core data center. The verification parameters are shown in Table 4.
[0170] Table 4. Verification Environment Parameters: The comparative scheme uses a method of sending complete application layer message payloads one by one according to the access order of the receiving end nodes. This comparative scheme does not construct a latency-layered virtual topic based on theoretical relative latency, does not maintain a minimum heap priority queue with an absolute deadline, and does not switch to a bypass communication channel in latency-sensitive states.
[0171] This embodiment employs the aforementioned steps S10–S60 to perform early warning distribution. The system first calculates the theoretical relative delay based on the great circle distance between the receiving node and the epicenter's geographical coordinates, then calculates the remaining valid time based on the absolute earthquake timestamp and the current system absolute timestamp. For message tasks with a remaining valid time less than or equal to zero, timeout discarding is performed. For message tasks with a remaining valid time greater than zero, the absolute deadline is used as the sorting key value to push them into a min-heap priority queue. For receiving nodes with a current remaining valid time less than the delay tolerance threshold but greater than zero, a simplified instruction payload is sent through a connectionless socket interface.
[0172] Under the verification conditions shown in Table 4, when the current system time is offset by 20s from the time of the earthquake, the tasks corresponding to the receiving nodes are divided into three categories as shown in Table 5.
[0173] Table 5. Task classification results at a current system time offset of 20 seconds: Based on a complete application layer message payload of 512 bytes and a simplified instruction payload of 32 bytes, the outgoing transmission payload of the comparison scheme and the scheme of this embodiment are shown in Table 6.
[0174] Table 6 Comparison of Export Load Capacity: The calculation of the export transmission load in this embodiment is as follows: 5780×512+420×32=2972800 bytes.
[0175] Compared to the 5,120,000 bytes of the comparative scheme, the outgoing payload of this embodiment is reduced by approximately: (5120000 2972800) / 5120000×100%≈41.94%.
[0176] The above results show that the solution in this embodiment performs timeout discarding on 3800 timed-out tasks, so that these tasks no longer occupy the sending queue and egress bandwidth resources; at the same time, for 420 latency-sensitive tasks, the solution in this embodiment no longer sends the complete application layer message payload, but instead performs bypass transparent transmission and distribution through a simplified instruction payload.
[0177] Table 7 shows the critical node transmission delay statistics for different receiver node scales, comparing the scheme and the scheme in this embodiment. Critical node transmission delay refers to the time from message dequeueing to the completion of the transmission interface call for a node whose remaining effective time is less than the delay tolerance threshold but greater than zero.
[0178] Table 7. Comparison of transmission delays at critical node P95: See attached document Figure 11 , Figure 11 This is a comparison chart of critical node transmission delays according to an embodiment of the present invention. Figure 11 As can be seen, with the increase in the number of receiving nodes, the transmission delay of the critical node P95 in the comparison scheme increases rapidly, while the scheme in this embodiment keeps the transmission delay of the critical node at a low level by simplifying the instruction payload and bypassing the communication channel.
[0179] Table 8 shows the average queuing delay statistics of the comparison scheme and the scheme in this embodiment under different receiver node scales.
[0180] Table 8 Comparison of Average Queue Waiting Time: As shown in Table 8, with the increase in the number of receiving nodes, the comparative scheme, which sends complete application layer message payloads one by one according to the access order, is prone to causing receiving nodes with earlier absolute deadlines to remain in the sending queue. The scheme in this embodiment uses the absolute deadline as the sorting key value of the min-heap priority queue, allowing message descriptors with earlier absolute deadlines to be dequeued first, thereby reducing the average queuing latency.
[0181] With a scale of 10,000 receiving nodes, the resource consumption of the comparative scheme and the scheme in this embodiment is shown in Table 9.
[0182] Table 9. Resource Usage Comparison Results: In Table 9, the number of times the complete application layer message payload is generated is used to characterize the multiplexing effect of the shared payload buffer. In the comparative scheme, each receiving node generates a complete application layer message payload independently, so the number of generation times is 10,000. In this embodiment, the reconstruction module 50 organizes the receiving nodes according to latency-layered virtual topics. Receiving nodes under the same latency-layered virtual topic reuse the shared payload buffer, so the number of times the complete application layer message payload is generated is related to the number of effective latency-layered virtual topics. In this verification example, the number of effective latency-layered virtual topics is 24, so the number of times the complete application layer message payload is generated is 24.
[0183] See attached document Figure 12 , Figure 12 This is a comparison chart of outbound transmission load and timeout task occupancy according to an embodiment of the present invention. Figure 12 As can be seen, the solution in this embodiment can reduce the amount of outgoing load and the occupation of invalid queues by discarding overtime, simplifying instruction load, and reusing shared load buffers.
[0184] Based on the above verification results, under the same receiver node size, the same upstream seismic event input, and the same network conditions, the scheme of this embodiment has at least the following effects: by judging the remaining valid time and discarding timeouts, it avoids timed-out message tasks from continuing to occupy queue buffer resources; by using the absolute deadline as the sorting key value of the minimum heap priority queue, it prioritizes the scheduling of receiver nodes that are closer to the theoretical arrival time of seismic waves; by simplifying the instruction payload and bypassing the communication channel under time-delay sensitive conditions, it reduces the transmission latency of critical nodes; and by using time-delay layered virtual topics and shared payload buffers, it reduces the number of times the complete application layer message payload is repeatedly generated.
[0185] Therefore, the solution in this embodiment can improve the matching degree between the early warning distribution process and the theoretical arrival time of seismic waves in high-concurrency earthquake early warning distribution scenarios, and reduce the occupation of system resources by timeout tasks and repetitive load processing.
[0186] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A distributed intelligent analysis and dissemination system for earthquake early warning signals, characterized in that, include: The parsing module is used to receive upstream earthquake monitoring data streams and extract the epicenter's geographic coordinates, absolute earthquake timestamp, and the theoretical surface propagation velocity of shear waves. The calculation module is used to obtain the parameters extracted by the parsing module, perform format alignment, and convert them into a spatiotemporal parameter set in a unified format; The reconstruction module is used to acquire the location coordinate data of the receiving nodes, calculate the physical distance of the corresponding receiving nodes based on the location coordinate data and the epicenter geographic coordinates in the spatiotemporal parameter set, and calculate the theoretical relative time delay of the seismic waves arriving at each receiving node by combining the theoretical surface propagation velocity of the shear waves; and reconstruct the publish-subscribe logical topology for each receiving node based on the theoretical relative time delay. The scheduling module is used to obtain the current system absolute timestamp and, in combination with the absolute earthquake timestamp and the theoretical relative delay, calculate the remaining valid time for each receiving node to obtain the warning data; when the remaining valid time is greater than zero, the corresponding sending task is pushed into the priority sending queue and scheduled using the absolute deadline of the message as the sorting key value; the absolute deadline is obtained by adding the absolute earthquake timestamp and the theoretical relative delay. The distribution module is used to extract the dequeued sending task from the priority sending queue, recalculate the current remaining valid time based on the current system absolute timestamp at the moment of dequeueing, and compare the current remaining valid time with a preset latency tolerance threshold to determine the distribution mode: when the current remaining valid time is greater than or equal to the latency tolerance threshold, a complete application layer message payload is generated and sent through the pre-established main communication connection with the corresponding receiving node; when the current remaining valid time is less than the latency tolerance threshold but greater than zero, a simplified instruction payload is generated, and the bypass communication address information of the corresponding receiving node is obtained, and the simplified instruction payload is transparently transmitted to the corresponding receiving node through the bypass communication channel.
2. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 1, characterized in that, The system also includes an access module and a connection module; The access module is used to listen for network access requests initiated by the receiving node and to complete network access processing. The connection module, connected to the access module, is used to establish a persistent transmission control protocol connection for the access receiving node as the main communication connection, and to assign a network connection identifier to each connection. The connection module also constructs a location mapping table and a connection state mapping table in the distributed cache system. The location mapping table is used to associate and store the network connection identifier with the location coordinate data for the reconstruction module to read. The connection state mapping table is used to associate and store the network connection identifier, the persistent transmission control protocol connection handle, and the bypass communication address information for the distribution module to read.
3. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 1, characterized in that, The specific method by which the reconstruction module calculates the physical distance to the corresponding receiving node is as follows: Based on the spherical cosine theorem, using the location coordinate data of the receiving nodes and the geographical coordinates of the epicenter, the great circle distance between the geographical location of each receiving node and the geographical coordinates of the epicenter is calculated. The theoretical relative time delay is obtained by dividing the great circle distance on the Earth's surface by the theoretical surface propagation speed of the transverse wave.
4. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 2, characterized in that, The specific process of reconstructing the publish-subscribe logical topology by the reconstruction module includes: According to the preset time delay slice step size, the continuous theoretical relative time delay is discretized into multiple time delay slice intervals; In the memory space of the message middleware, multiple latency-layered virtual topics corresponding to each latency slice interval are instantiated, and the network connection identifiers in the location mapping table are associated with the corresponding latency-layered virtual topics to reconstruct the publish-subscribe logical topology.
5. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 4, characterized in that, After the association is completed, the reconstruction module also constructs a logical multicast tree in the system memory, organized according to the latency hierarchy; The logical multicast tree uses the shared payload buffer as the root node, the latency-layered virtual topic as the topic node, and the receiver node associated with the corresponding latency-layered virtual topic as the leaf node; the reconstruction module generates a direct memory address pointer to the corresponding shared payload buffer for each latency-layered virtual topic.
6. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 2, characterized in that, The priority sending queue is a min-heap priority queue; When performing scheduling, the scheduling module is specifically used to: push the message descriptor containing the network connection identifier, absolute deadline and corresponding remaining valid time into the min-heap priority queue as the sending task, and perform dynamic rearrangement in the binary min-heap structure to maintain the min-heap characteristic that the parent node sort key value is less than or equal to the child node sort key value.
7. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 1 or 6, characterized in that, When performing send queue scheduling, the scheduling module is also used to perform timeout branch processing: When the calculated remaining valid time is less than or equal to zero, a timeout discard operation is performed to release the queue buffer resources occupied by the corresponding sending task and terminate the enqueue operation of the sending task.
8. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 1, characterized in that, The structural characteristics of the two types of payloads generated by the distribution module are as follows: The complete application layer message payload includes structured numerical fields and structured text fields used to characterize the state of seismic events; The simplified instruction payload strips the application layer structured text fields and includes preset instruction codes for instructing the receiving node to perform a warning action. The data length of the simplified instruction payload is less than the data length of the complete application layer message payload.
9. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 2, characterized in that, When the distribution module transmits the simplified instruction payload through the bypass communication channel, it is specifically used for: The connectionless socket interface is invoked to perform bypass transparent transmission distribution to the receiving node according to the bypass communication address information recorded in the connection state mapping table; When performing bypass transparent transmission distribution, the persistent transmission control protocol connection corresponding to the receiving node is kept in an open state.
10. The distributed earthquake early warning signal intelligent analysis and dissemination system according to claim 1, characterized in that, After recalculating the remaining valid time, the distribution module also performs a secondary timeout check: If the remaining valid time is determined to be less than or equal to zero, the current earthquake event transmission task is determined to have timed out, the corresponding transmission task is discarded, and the memory resources occupied by the transmission task in the current earthquake event are released.
