Enterprise-level dynamic information aggregation and multi-terminal real-time push method and system
Through lightweight state fingerprint technology based on protocol native features and RDMA memory direct memory injection, combined with Raft strong consistency and asynchronous incremental broadcast, the state synchronization delay problem of heterogeneous protocol long connections in enterprise-level multi-terminal real-time push systems is solved, efficient and reliable connection migration and data transmission are achieved, and the real-time and scalability of the system is improved.
Patent Information
- Application Number
- CN202510607400.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-05-13
AI Technical Summary
In enterprise-level multi-end real-time push systems, there is a structural contradiction between the state synchronization mechanism and dynamic expansion requirements of the life cycle management of heterogeneous protocol long connections, resulting in delay in connection state synchronization, affecting the high availability and real-time nature of the system.
Through lightweight state fingerprint technology based on protocol native features, combined with Raft's strong consistency and asynchronous incremental broadcasting packet synchronization strategy, efficient synchronization of multi-protocol connection states is achieved, and microsecond-level inductive connection migration is realized through RDMA memory direct memory injection and user-state protocol stack reconstruction technology, and the dynamic keep-alive answering mechanism blocks the protocol layer differences.
It realizes accurate extraction of multi-protocol connection states and efficient synchronization across nodes, ensures financial-level real-time business data integrity, supports high throughput access to massive IoT terminals, improves the system's protocol compatibility, state synchronization efficiency and system scalability, and reduces the risk of business interruption and operation and maintenance complexity.
Smart Images

Figure CN120128564B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of enterprise-level real-time communication technology, and more specifically, to an enterprise-level dynamic information aggregation and multi-terminal real-time push method and system. Background Art
[0002] In enterprise-level multi-terminal real-time push systems, the lifecycle management of heterogeneous protocol persistent connections faces a structural contradiction between the state synchronization mechanism and the dynamic expansion requirements. Due to the essential differences in the connection keep-alive mechanism, session state storage, and subscription topology maintenance of different communication protocols (such as WebSocket, MQTT, etc.), when the system is horizontally expanded, there is an uncontrollable delay in the synchronization of the connection state between load balancing nodes, resulting in new access requests being incorrectly assigned to service nodes that have not fully synchronized context information. This problem stems from the fact that the traditional state synchronization strategy uses a static timed batch replication mechanism, which cannot adapt to the dynamic context change frequency unique to multi-protocol persistent connections (such as the sudden message interaction of WebSocket and the incremental update of the MQTT subscription tree), making the consistency guarantee of the session state replicas between nodes lag behind the scheduling rhythm of actual business requests. This defect will cause abnormal interruption of the protocol layer connection, loss of subscription relationship, and disordered instruction transmission, destroying the end-to-end session integrity in key business scenarios, while inducing load imbalance and resource contention, seriously restricting the system's high availability and real-time guarantee capabilities.
[0003] In order to solve the above problems, a technical solution is now provided. Summary of the invention
[0004] In order to overcome the above-mentioned defects of the prior art, the embodiments of the present invention provide an enterprise-level dynamic information aggregation and multi-terminal real-time push method and system, which realizes the extraction of the core state of multi-protocol connections and efficient synchronization across nodes through a lightweight state fingerprint technology based on protocol native features; combines the group synchronization strategy of Raft strong consistency and asynchronous incremental broadcast, while ensuring the integrity of financial-level real-time business data, it supports high-throughput access of massive IoT terminals; through RDMA memory direct storage injection and user-mode protocol stack reconstruction technology, it breaks through the throughput and delay limitations of the traditional kernel-mode protocol stack and realizes microsecond-level seamless connection migration; the dynamic keep-alive proxy mechanism shields the differences in the protocol layer to ensure end-to-end session continuity during the migration process, and provides a core architecture support with cross-protocol adaptability for high-concurrency, strong real-time enterprise-level information push systems to solve the problems raised in the above-mentioned background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] The enterprise-level dynamic information aggregation and multi-terminal real-time push method includes the following steps:
[0007] S1. Analyze the header fields and payload structure of the heterogeneous communication protocol, extract the keep-alive parameters and subscription paths, generate a binary hash fingerprint carrying a logical timestamp, and use it as the minimum synchronization unit for the connection status;
[0008] S2. Analyze the semantic characteristics of the protocol type corresponding to the binary hash fingerprint, perform feature engineering and in-depth analysis, divide the fingerprints into strong and weak consistency groups according to the evaluation results, and perform differential synchronization strategy processing;
[0009] S3. Serialize the grouped fingerprints and their associated session tokens and subscription tree topologies into self - contained data blocks in the native format of the protocol, append a metadata header with the protocol type and version number, and write them to the physical memory address of the target node through the RDMA memory window;
[0010] S4. The target node extracts the protocol identifier and five - tuple information from the self - contained data block in the memory - mapped area, and reconstructs a connection handle consistent with the source node in the user - state protocol stack;
[0011] S5. Utilize the reconstructed protocol stack context to parse the keep - alive messages of the input traffic in real - time, generate response frames that conform to the protocol specifications, return them to the client through the connection handle, and shield the disconnection due to heartbeat timeout during the migration process.
[0012] In a preferred embodiment, step S1 includes the following:
[0013] Identify the type of the communication protocol, analyze the header fields and payload structure of the communication protocol, extract the keep - alive parameters, subscription paths, and session identifiers from it, splice the keep - alive parameters, subscription paths, and session identifiers as core state elements into a byte stream, apply a hash algorithm to process the byte stream to generate a hash value, then append the logical timestamp to the hash value to form a binary hash fingerprint, and finally store and manage the binary hash fingerprint as the minimum synchronization unit for the connection status for subsequent processing.
[0014] In a preferred embodiment, step S2 includes the following:
[0015] Analyze the semantic characteristics of the protocol type corresponding to the binary hash fingerprint, determine the real - time requirements and throughput requirements of the protocol, perform feature engineering and in - depth analysis; among which the task of feature engineering is to extract the connection pulsation entropy index that reflects the dynamic complexity of message interaction, and the state transition trend index that reflects the dynamic importance of state changes.
[0016] In a preferred embodiment, step S2 further includes the following:
[0017] Calculate the connection pulsation entropy index based on the dynamic complexity of message interaction of the connection;
[0018] Calculate the state transition trend index based on the state change dynamics importance of the connection.
[0019] In a preferred embodiment, step S2 further includes the following:
[0020] Obtain the comprehensive coefficient by weighted summation of the connection pulsation entropy index and the state transition trend index; then divide the binary hash fingerprint into a strong consistency group or a weak consistency group according to the comparison between the comprehensive coefficient and the preset threshold.
[0021] In a preferred embodiment, step S2 further includes the following:
[0022] Submit the change of the binary hash fingerprint of the strong consistency group to the majority nodes using the Raft consensus algorithm; use the incremental broadcast packet to transmit the differential state of the binary hash fingerprint of the weak consistency group and trigger asynchronous conflict detection.
[0023] In a preferred embodiment, step S3 includes the following:
[0024] Extract the session token and subscription tree topology related to the connection state from the output grouped binary hash fingerprint and its group label, serialize the grouped binary hash fingerprint, session token and subscription tree topology into a self - contained data block in the native format of the protocol, append a metadata header containing the protocol type and protocol version number before the self - contained data block, and use the Remote Direct Memory Access technology to write the self - contained data block with the metadata header into the physical memory address of the target node.
[0025] In a preferred embodiment, step S4 includes the following:
[0026] The target node extracts the self - contained data block from the memory - mapped area, obtains the protocol type and version number by parsing the protocol type and version number fields of the metadata header, selects the corresponding protocol parser according to the protocol type and version number, parses the self - contained data block to extract the protocol identifier and five - tuple information, allocates a new connection handle in the user - state protocol stack and initializes the network parameters and protocol context of the connection handle using the five - tuple information and protocol identifier, synchronizes the session state parameters from the source node and assigns them to the new connection handle, registers the initialized connection handle to the session state table of the user - state protocol stack and associates the session token and subscription tree topology, synchronizes the data in the send buffer and receive buffer of the self - contained data block, and configures a keep - alive timer to maintain the active state of the connection handle.
[0027] In a preferred embodiment, step S5 includes the following:
[0028] The target node retrieves the connection handle from the session state table of the user-space protocol stack, extracts the protocol stack context associated with the connection handle, selects the corresponding protocol parser based on the protocol type and version number in the protocol stack context, parses the input traffic data packet to identify the keep-alive message type and extract the key fields, generates the corresponding response frame according to the keep-alive message type and copies the key fields to the payload field of the response frame, writes the response frame into the send buffer of the connection handle and transmits it to the client through the network interface of the user-space protocol stack, updates the keep-alive timer of the connection handle and introduces a preset grace period during the migration process to adjust the heartbeat timeout threshold to shield the risk of disconnection due to heartbeat timeout.
[0029] Enterprise-level dynamic information aggregation and multi-terminal real-time push system, including: protocol parsing module, feature evaluation module, data sequence module, connection reconstruction module and keep-alive response module;
[0030] Protocol parsing module: Parse the header fields and payload structure of heterogeneous communication protocols, extract keep-alive parameters and subscription paths, generate a binary hash fingerprint carrying a logical timestamp, which serves as the minimum synchronization unit of the connection state, and pass the binary hash fingerprint to the feature evaluation module.
[0031] Feature evaluation module: Conduct semantic feature analysis on the protocol type corresponding to the binary hash fingerprint, perform feature engineering and in-depth analysis, divide the fingerprint into strong and weak consistency groups according to the evaluation results, and perform differential synchronization strategy processing, and pass the grouped fingerprint to the data sequence module;
[0032] Data sequence module: Serialize the grouped fingerprint and its associated session token and subscription tree topology into a self-contained data block in the native format of the protocol, append the metadata header of the protocol type and version number, and write it to the physical memory address of the target node through the RDMA memory window, and pass the self-contained data block to the connection reconstruction module;
[0033] Connection reconstruction module: The target node extracts the protocol identifier and five-tuple information in the self-contained data block from the memory mapping area, reconstructs the connection handle consistent with the source node in the user-space protocol stack, and passes the reconstructed connection handle to the keep-alive response module.
[0034] Keep-alive response module: Utilize the reconstructed protocol stack context to parse the keep-alive message of the input traffic in real time, generate a response frame that conforms to the protocol specification, and return it to the client through the connection handle to shield the disconnection due to heartbeat timeout during the migration process.
[0035] The technical effects and advantages of the enterprise-level dynamic information aggregation and multi-terminal real-time push method and system of the present invention:
[0036] Through the lightweight state fingerprint technology based on the native features of protocols, the present invention realizes the accurate extraction of the core states of multi-protocol connections and the efficient cross-node synchronization; combined with the Raft strong consistency and asynchronous incremental broadcast-based packet synchronization strategy, while ensuring the integrity of financial-level real-time service data, it supports the high-throughput access of a large number of Internet of Things terminals; through the RDMA in-memory direct storage injection and user-space protocol stack reconstruction technology, it breaks through the throughput and latency limitations of the traditional kernel-space protocol stack and realizes microsecond-level seamless connection migration; the dynamic keep-alive proxy mechanism shields the protocol layer differences and ensures the end-to-end session continuity during the migration process. This solution achieves a breakthrough improvement in three dimensions: protocol compatibility, state synchronization efficiency, and system scalability, solves the problems of real-time, consistency, and reliability of multi-protocol connection state synchronization in a distributed environment, provides a core architecture support with cross-protocol adaptive capabilities for high-concurrency and strong-real-time enterprise-level information push systems, significantly reduces the risk of service interruption and the complexity of operation and maintenance, and empowers the real-time data service upgrade in key fields such as financial transactions and industrial Internet of Things. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic flowchart of the enterprise-level dynamic information aggregation and multi-terminal real-time push method of the present invention.
[0038] Figure 2 It is a schematic structural diagram of the enterprise-level dynamic information aggregation and multi-terminal real-time push system of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0040] Embodiment 1: Figure 1 The enterprise-level dynamic information aggregation and multi-terminal real-time push method of the present invention is given, including:
[0041] S1. Analyze the header fields and payload structures of heterogeneous communication protocols, extract keep-alive parameters and subscription paths, and generate binary hash fingerprints carrying logical timestamps as the minimum synchronization unit of the connection state;
[0042] S2. According to the semantic characteristics of the protocol, perform feature engineering and in-depth analysis on the binary hash fingerprints corresponding thereto, divide the fingerprints into strong and weak consistency groups according to the evaluation results, and perform differential synchronization strategy processing;
[0043] S3. Serialize the grouped fingerprints, their associated session tokens, and the subscription tree topology into self - contained data blocks in the native format of the protocol, append a metadata header with the protocol type and version number, and write them to the physical memory address of the target node through the RDMA memory window;
[0044] S4. The target node extracts the protocol identifier and five - tuple information from the self - contained data block in the memory - mapped area, and reconstructs a connection handle consistent with the source node in the user - state protocol stack;
[0045] S5. Utilize the reconstructed protocol stack context to parse the keep - alive messages of the input traffic in real - time, generate response frames that conform to the protocol specifications, and return them to the client through the connection handle, shielding the disconnection due to heartbeat timeout during the migration process.
[0046] In enterprise - level multi - device real - time push scenarios, heterogeneous communication protocols such as WebSocket and MQTT are widely used in services such as financial instruction transmission and log data push. The WebSocket protocol is suitable for financial instruction transmission with high real - time requirements, while the MQTT protocol is commonly used in low - real - time scenarios such as log data push. The differences in connection management, session state, and subscription models among these protocols lead to delays and inconsistencies in connection state synchronization during horizontal scaling, thus affecting business continuity and real - time performance. To solve this problem, the present invention proposes a dynamic information aggregation and multi - device real - time push method. Step S1 focuses on parsing the header fields and payload structures of heterogeneous communication protocols, extracting key state elements, and generating binary hash fingerprints as the minimum synchronization unit of the connection state, providing basic data for the grouping decision in subsequent step S2 to ensure efficient and reliable connection state management.
[0047] Step S1 includes the following:
[0048] S1 - 1, Protocol identification and classification:
[0049] First, identify the protocol type by detecting the header fields of the connection request. For the WebSocket protocol, check whether the "Upgrade: websocket" field exists in the header fields of the connection request to confirm the protocol identity. For the MQTT protocol, the system checks whether the type field of the connection message is 1, indicating that it is a CONNECT message. After identification, the protocols are divided into two categories: one is the protocols with high real - time requirements, such as WebSocket, mainly used for financial instruction transmission; the other is the protocols with low real - time requirements, such as MQTT, mainly used for log data push.
[0050] S1 - 2, Header field and payload parsing:
[0051] For the WebSocket protocol, parse the Sec-WebSocket-Key and Sec-WebSocket-Version in the connection request header fields. Among them, Sec-WebSocket-Key is the unique identifier of the connection, and Sec-WebSocket-Version represents the protocol version number. For the MQTT protocol, parse the ClientID, KeepAlive, and TopicFilter in the CONNECT message. Among them, ClientID is the unique identifier of the client, KeepAlive is the keep-alive period (in seconds), and TopicFilter is the subscribed topic path. Use the native parsing tools of the protocol to complete this process. For example, use libwebsocket to parse the WebSocket protocol and paho-mqtt to parse the MQTT protocol to ensure the accuracy and consistency of the parsing results.
[0052] S1-3, Core status element extraction:
[0053] Extract the core status elements from the parsing results, including keep-alive parameters, subscription paths, and session identifiers. For the WebSocket protocol, the keep-alive parameter refers to the ping / pong interval, which is determined by the server configuration or client negotiation and is in seconds; the subscription path is obtained through a custom header field (such as "Subscription: market-data"); the session identifier is Sec-WebSocket-Key. For the MQTT protocol, the keep-alive parameter is the value of the KeepAlive field; the subscription path is TopicFilter; the session identifier is ClientID. These core status elements are key components of the connection status, respectively reflecting the activity, data flow direction, and identity information of the connection.
[0054] Extracting the core status elements can streamline the connection status information and reduce the computational and transmission overhead in subsequent synchronization processes. The keep-alive parameter is used to judge the activity of the connection, the subscription path reflects the data flow direction and subscription relationship, and the session identifier ensures the uniqueness of the connection. The three together constitute the core of the connection status, providing efficient and accurate data support for subsequent processing.
[0055] S1-4, Generate binary hash fingerprints:
[0056] The extracted core status elements (keep-alive parameters, subscription paths, session identifiers) are concatenated into a byte stream in a fixed order. The concatenation order is as follows: the byte representation of the keep-alive parameter, the byte representation of the subscription path, and the byte representation of the session identifier. All fields are converted to byte form through UTF-8 encoding. Then, the SHA-256 hash algorithm is applied to the concatenated byte stream to generate a 256-bit hash value, which is used to ensure the uniqueness and integrity of the status elements. Before the hash value, a logical timestamp is appended. The timestamp uses the Lamport timestamp and is represented as a 64-bit integer, which is used to record the logical sequence of status changes. Finally, the logical timestamp and the hash value are concatenated to form a binary hash fingerprint with a total length of 320 bits, where the logical timestamp occupies 64 bits and the hash value occupies 256 bits.
[0057] Generating the binary hash fingerprint compresses the complex core status elements into compact binary data, facilitating storage and transmission. The hash value guarantees the uniqueness and integrity of the status, preventing tampering; the logical timestamp provides the timing information of status changes, which helps to avoid synchronization conflicts in a distributed environment. The 320-bit fingerprint length takes into account both security and transmission efficiency.
[0058] S1-5, Fingerprint Storage and Management:
[0059] The generated binary hash fingerprint is stored in the connection status table in memory. The connection status table uses a key-value pair structure, where the key is the connection ID, generated by protocol parsing, such as the ClientID of the MQTT protocol or the Sec-WebSocket-Key of the WebSocket protocol; the value is the corresponding binary hash fingerprint. The system checks the connection status table every 5 seconds. By comparing the keep-alive parameter and the last active time of the connection, it determines whether there is a connection with a keep-alive timeout and removes its corresponding binary hash fingerprint to release resources.
[0060] By parsing the header fields and payload structures of heterogeneous communication protocols such as WebSocket and MQTT, core status elements such as keep-alive parameters, subscription paths, and session identifiers are extracted, and a binary hash fingerprint carrying a logical timestamp is generated. The binary hash fingerprint, as the minimum synchronization unit of the connection status, has a compact structure and the ability to trace the timing sequence.
[0061] Identify the protocol type by detecting the header fields of the connection request, and classify the protocols into those with high real-time requirements and those with low real-time requirements; for the WebSocket protocol, parse the Sec-WebSocket-Key and Sec-WebSocket-Version to obtain the connection identifier and version information; for the MQTT protocol, parse the ClientID, KeepAlive, and TopicFilter in the CONNECT message to extract the client identifier, keep-alive period, and subscription path; the system extracts the core state elements, including the keep-alive parameter, subscription path, and session identifier; the system concatenates the core state elements into a byte stream in a fixed order, generates a hash value using the SHA-256 hash algorithm, and appends a logical timestamp to form a binary hash fingerprint; the system stores the binary hash fingerprint in the connection status table in memory and periodically removes the connection fingerprints with keep-alive timeouts.
[0062] Step S1 has completed the parsing of the header fields and payload structures of heterogeneous communication protocols, extracted the keep-alive parameter and subscription path, and generated a binary hash fingerprint carrying a logical timestamp as the minimum synchronization unit for the connection status. However, relying solely on the binary hash fingerprint cannot fully meet the differentiated requirements of different protocols in terms of real-time and consistency. Therefore, in step S2, the fingerprints need to be grouped according to the protocol semantic characteristics and a differentiated synchronization strategy needs to be developed to provide the grouped fingerprints and the basis of the synchronization strategy for the serialization and transmission in the subsequent step S3.
[0063] Step S2 includes the following:
[0064] S2-1. Analyze the semantic characteristics of the protocol type corresponding to the binary hash fingerprint. The protocol types include WebSocket and MQTT. Among them, the WebSocket protocol is suitable for financial instruction transmission scenarios with high real-time requirements and has the characteristic of low latency; the MQTT protocol is suitable for log data push scenarios and has the characteristics of high throughput and a publish-subscribe model. The system analyzes the protocol type, quantifies its real-time requirements and throughput requirements, where the real-time requirements are expressed in milliseconds as the latency tolerance, and the throughput requirements are expressed in messages per second as the transmission capacity.
[0065] Among them, feature engineering mainly extracts the connection pulsation entropy index reflecting the dynamic complexity of message interaction and the state transition trend index reflecting the dynamic importance of state changes.
[0066] S2-2. Calculate the connection pulsation entropy index :
[0067] Purpose: To measure the dynamic complexity of message interaction of the connection corresponding to the binary hash fingerprint.
[0068] Input: Message interval sequence, active duration, and burst peak within the recent rated time, identified by binary hash fingerprints.
[0069] Processing: Collect the message interval sequence and calculate its distribution probability (Discretized by histogram).
[0070] Calculate the message interaction entropy 。
[0071] Combine the active duration and the burst peak , and adjust the entropy value.
[0072] Calculation formula:
[0073] ;
[0074] The entropy of the message interval sequence reflects the randomness of the interaction.
[0075] : The total duration of time periods with at least 1 message within the recent rated time.
[0076] : The maximum number of messages per second within the recent rated time.
[0077] Output: The connection pulsation entropy index value. A higher value indicates more complex message interaction of the connection.
[0078] The connection pulsation entropy index quantifies the randomness of the interaction through message interaction entropy and is adjusted by combining the active duration and burst peak to ensure a comprehensive assessment of the connection dynamic complexity. Message interaction entropy captures the disorder of the interaction, active duration reflects the continuous activity degree of the connection, and burst peak reflects the peak load capacity. This comprehensive calculation method can accurately identify connections that require high consistency guarantee and improve the pertinence of the synchronization strategy.
[0079] S2-3, Calculate the state transition trend index :
[0080] Purpose: To measure the dynamic importance of state changes of the connection corresponding to binary hash fingerprints.
[0081] Input: Number of state changes of the connection identified by binary hash fingerprints within the recent fixed time Connection duration , State change amplitude sequence , Change interval sequence 。
[0082] Processing:
[0083] Calculate the state change frequency 。
[0084] Time-weighted summation of the state change amplitude , is the change time point.
[0085] Calculate the average deviation of the change interval 。
[0086] Calculation formula:
[0087] ;
[0088] : State change frequency.
[0089] : Weighted sum of the state change amplitude, reflecting the cumulative impact of changes.
[0090] : Average deviation of the change interval, reflecting the regularity of changes.
[0091] Output: State transition trend index value. The higher the value, the more important the connection state change is.
[0092] S2-4, Calculate the comprehensive coefficient to comprehensively evaluate the complexity and importance of the connection corresponding to the binary hash fingerprint. The calculation of the comprehensive coefficient is obtained by weighted summation of the connection pulsation entropy index and the state transition trend index. The weight setting is based on business experience, highlighting the impact of message interaction complexity on synchronization requirements, while taking into account the importance of state changes. The higher the comprehensive coefficient value, the stricter the synchronization requirements for the connection.
[0093] S2-4, Make a grouping decision according to the comprehensive coefficient and the preset threshold. The preset threshold is determined by historical data analysis, for example, set to 5.0. If the comprehensive coefficient is greater than the preset threshold, the binary hash fingerprint is classified into the strong consistency group; if the comprehensive coefficient is less than or equal to the preset threshold, it is classified into the weak consistency group. The grouping result is attached to the binary hash fingerprint in the form of a group label for subsequent execution of the synchronization policy.
[0094] The grouping decision is achieved by comparing the comprehensive coefficient with the preset threshold. The method is simple and efficient, facilitating the system to quickly determine the synchronization requirements of the connection. The division of the strong consistency group and the weak consistency group ensures that different connections adopt differentiated synchronization strategies, improving resource utilization efficiency and system synchronization performance, and providing a clear classification basis for subsequent steps.
[0095] S2-5, Synchronization policy execution:
[0096] Execute differentiated synchronization strategies according to the grouping results. For the binary hash fingerprints of strongly consistent groups, use the Raft consensus algorithm to submit the fingerprint change logs to the majority of nodes for confirmation, ensuring that state changes are highly consistent among multiple nodes. For the binary hash fingerprints of weakly consistent groups, generate incremental broadcast packets carrying version vectors, transmit the differential states of the fingerprints to the target nodes, and trigger asynchronous conflict detection to achieve state synchronization.
[0097] The differentiated synchronization strategies optimize resource utilization and synchronization efficiency according to the grouping results. The Raft consensus algorithm provides strict state consistency guarantees for strongly consistent groups and is suitable for connections with high real-time requirements; incremental broadcast packets and asynchronous conflict detection provide an efficient synchronization mechanism for weakly consistent groups and are suitable for connections with low real-time requirements. The processing of differentiated synchronization strategies is illustrated as follows:
[0098] 1), Suppose the calculated comprehensive coefficient is 7.2, exceeding the preset threshold of 5.0, and the binary hash fingerprint of this connection is classified into the strongly consistent group. To ensure high consistency of states among multiple nodes, use the Raft consensus algorithm to process fingerprint changes. The specific process is as follows:
[0099] Write change logs: When the connection state changes (such as subscription path update), record the change as a log entry and write it to the currently elected leader node.
[0100] Log replication: The leader node replicates the log entry to all follower nodes.
[0101] Majority confirmation: When more than half of the follower nodes confirm the receipt and storage of this log entry, the leader node considers that the change has reached a consensus.
[0102] Commit the change: The leader node commits this change, updates the local fingerprint state, and notifies all follower nodes to apply this change.
[0103] Client notification: The leader node notifies the client through the WebSocket channel to confirm that the state change has been completed.
[0104] Finally, the binary hash fingerprints of the connection are strongly consistent among multiple nodes, ensuring the real-time and accuracy of financial instruction transmission. For example, when a user subscribes to a new financial data stream, all nodes can immediately synchronize the latest subscription path to avoid instruction loss or delay.
[0105] 2), Suppose the calculated comprehensive coefficient is 3.8, lower than the preset threshold of 5.0, so the binary hash fingerprint of this connection is classified into the weakly consistent group. To meet the requirements of high throughput, use incremental broadcast packets to transmit differential states. The specific steps are as follows:
[0106] Difference State Generation: When the connection state changes (such as adjustment of keep-alive parameters), an incremental broadcast packet is generated, which contains only the differential data of the changed part (such as the updated keep-alive interval), and is accompanied by a version vector to track the state version.
[0107] Broadcast Delivery: The incremental broadcast packet is broadcast to all target nodes without waiting for real-time confirmation.
[0108] State Update: After receiving the broadcast packet, the target node updates the state of the local binary hash fingerprint according to the differential data.
[0109] Asynchronous Conflict Detection: After the update, the node triggers an asynchronous process to check whether there are conflicts in the version vector. For example, if the version vector received by a node shows that the state is behind, a conflict resolution process is initiated (such as pulling the latest state or merging the differences).
[0110] Finally, the connection state achieves eventual consistency among multiple nodes. For example, when the subscription path of log pushing changes, the states of each node may not be completely consistent in a short period of time. However, through incremental broadcast and conflict detection, all nodes are finally synchronized to the latest state, meeting the requirements of high efficiency and throughput for log data pushing.
[0111] Step S2 has completed grouping according to the comprehensive coefficient of the binary hash fingerprint, output the grouped binary hash fingerprint and its group label (strong consistency group or weak consistency group), and determined the synchronization strategy. The grouped binary hash fingerprint only contains the logical timestamp and the hash value of the protocol features, lacking the complete context information of the connection, such as the session token and the subscription tree topology, and cannot directly support the state migration between multiple nodes. However, to achieve seamless migration of the connection state and the reconstruction of Step S4, Step S3 needs to integrate the grouped binary hash fingerprint and its associated information into a self-contained data block and write it into the memory of the target node using an efficient transmission mechanism.
[0112] Step S3 includes the following:
[0113] S3-1, Extract Associated Information:
[0114] Extract the session token and subscription tree topology related to the connection state from the grouped binary hash fingerprint and its group label output by Step S2. The grouped binary hash fingerprint has a group label, which is divided into a strong consistency group and a weak consistency group, and is used to identify the data consistency requirements.
[0115] The session token is a unique string used to identify the connection identity. For example, it is Sec-WebSocket-Key in the WebSocket protocol and ClientID in the MQTT protocol.
[0116] The subscription tree topology describes the hierarchical structure of connected subscription relationships, such as the TopicFilter tree in the MQTT protocol and the set of subscription paths in the WebSocket protocol. By querying the connection status table, the session token and the subscription tree topology bound to the grouped binary hash fingerprints are found, and this information is associated with the grouped binary hash fingerprints and their group labels to form a complete data basis for subsequent processing.
[0117] The purpose of extracting the session token and the subscription tree topology is to provide complete context information for the connection status, ensuring that the necessary data for authentication and subscription relationships is available in subsequent steps when reconstructing the connection. Binding this information to the grouped binary hash fingerprints can maintain the integrity and consistency of the data when migrating the connection status between multiple nodes.
[0118] S3-2, Serialize into self - contained data blocks:
[0119] The grouped binary hash fingerprints, session tokens, and subscription tree topologies are serialized into self - contained data blocks in the native format of the protocol. The native format of the protocol refers to the message structure defined in accordance with the specific communication protocol, such as the frame format of the WebSocket protocol or the control message structure of the MQTT protocol.
[0120] The construction of self - contained data blocks ensures that the data blocks contain complete information of the grouped binary hash fingerprints, session tokens, and subscription tree topologies, and can be parsed without relying on external data sources.
[0121] During the serialization process, the field boundaries of the data blocks are aligned, and the range of each field is marked using a fixed - length or pre - length identifier method to ensure that the structure of the data blocks is clear and easy to parse.
[0122] Serializing in the native format of the protocol can ensure that the self - contained data blocks are compatible with the communication protocol, enabling the target node to directly parse and use the data blocks, reducing the computational overhead during the parsing process. The design of self - contained data blocks makes the migration process of the connection status independent of external data sources, enhancing the independence and reliability of the system. The use of field boundary alignment and length identifiers improves the efficiency and accuracy of data block parsing and reduces the likelihood of errors.
[0123] S3-3, Append metadata headers:
[0124] Append a metadata header before the self - contained data block. The metadata header contains the protocol type and the protocol version number. The protocol type is a string that identifies the communication protocol. For example, "WS" represents the WebSocket protocol, and "MQTT" represents the MQTT protocol. The protocol version number is a number or a string that identifies the protocol version. For example, "13" represents WebSocket version 13. The metadata header is encoded with a fixed length. For example, a total of 8 bytes, where the first 4 bytes store the protocol type and the last 4 bytes store the protocol version number. This fixed - length structure ensures that the target node can quickly identify and parse the content of the self - contained data block based on the metadata header.
[0125] S3 - 4, Write through the RDMA memory window:
[0126] Use the Remote Direct Memory Access (RDMA) technology to write the self - contained data block with the metadata header to the physical memory address of the target node. The RDMA technology realizes data transmission through pre - registered memory areas. The memory window address of the target node is a memory - mapped area specifically used to receive remotely written data. Through the write operation of RDMA, the self - contained data block with the metadata header is transferred to the memory - mapped area of the target node. After the transmission is completed, the system sends a completion signal to the target node to confirm the successful data transmission.
[0127] The technical logic of step S3 is based on the grouped binary hash fingerprints output by step S2. By extracting the session token and subscription tree topology, serializing them into a self - contained data block, appending the metadata header, and writing to the memory - mapped area of the target node through the RDMA technology, the complete processing and efficient transmission of the connection state are completed. This process ensures the integrity of the connection state and protocol compatibility, and realizes low - latency and high - throughput data transmission using the RDMA technology. The output of step S3 provides a directly available data basis for step S4 to extract data from the memory - mapped area and reconstruct the connection handle, supports the efficient migration of the connection state between multiple nodes, and meets the technical requirements of enterprise - level dynamic information aggregation and multi - terminal real - time push scenarios.
[0128] In the enterprise - level dynamic information aggregation and multi - terminal real - time push scenarios, the efficient synchronization and seamless migration of the connection state are the core requirements to ensure business continuity and real - time performance. The previous steps S1 to S3 have completed the parsing, grouping, serialization, and transmission of heterogeneous communication protocols. The target node receives the self - contained data block with the metadata header. However, only realizing data transmission is not enough to guarantee the continuity of the session. The migration of the connection state also needs to reconstruct a connection handle consistent with the source node on the target node to maintain the integrity of the TCP / UDP session state. Step S4 focuses on this, by extracting key information and reconstructing the connection handle in the user - mode protocol stack, laying a foundation for the subsequent step S5 to process the keep - alive message.
[0129] Step S4 includes the following:
[0130] S4-1, Extract the self-contained data block from the memory mapping area:
[0131] The target node extracts the self-contained data block from the memory mapping area. The memory mapping area address of the target node is pre-registered and written with data by step S3 through the Remote Direct Memory Access technology. The target node reads the data according to the physical address of the memory mapping area and performs boundary verification on the read memory data to ensure the integrity and accuracy of the data. Specifically, the target node checks whether the start position and end position of the memory data conform to the expected length and discards the part of the data that does not meet the requirements when an anomaly is found. By locating and extracting the self-contained data block with the metadata header, the target node provides the necessary data basis for the subsequent parsing and reconstruction processes.
[0132] S4-2, Parse the metadata header:
[0133] Parse the metadata header in the self-contained data block. The metadata header contains the protocol type and the protocol version number, which are located in the first 8 bytes of the self-contained data block. The first 4 bytes represent the protocol type, and the last 4 bytes represent the protocol version number. The target node reads the first 8 bytes of the self-contained data block, compares the first 4 bytes with the predefined protocol type list to determine the protocol type, and compares the last 4 bytes with the supported version number range to verify the validity of the version number. If the protocol type or version number does not meet the expectations, the self-contained data block is discarded to avoid subsequent processing errors. The parsed protocol type and version number are used to select the correct protocol parser to further parse the content of the self-contained data block.
[0134] By comparing and validating the protocol type and version number with predefined values, parsing failures caused by protocol mismatches or version incompatibilities can be prevented, thereby enhancing the stability and reliability of the system. The fixed-length metadata header design simplifies the parsing logic, reduces the computational resource consumption caused by dynamic length parsing, and makes the parsing process more efficient.
[0135] S4-3, Parse the self-contained data block:
[0136] Parse the self - contained data block to extract key information. The target node selects a matching protocol parser based on the protocol type and version number obtained from parsing the metadata header. The protocol parser reads the data content in the self - contained data block in sequence according to the field order and length defined by the protocol type and version number, and extracts the grouped binary hash fingerprint, session token, subscription tree topology, protocol identifier, and quintuple information. The protocol identifier is used to identify the protocol type, such as a specific key field for WebSocket or a client identifier field for MQTT; the quintuple information includes the source IP address, source port, destination IP address, destination port, and protocol number, which are used to describe the network parameters of the connection. After extraction, the target node stores this information in a temporary memory area for use in subsequent steps.
[0137] S4 - 4, Reconstruct the connection handle in the user - mode protocol stack:
[0138] Reconstruct the connection handle in the user - mode protocol stack. The target node allocates a new connection handle in the user - mode protocol stack and initializes the network parameters of the connection handle using the parsed quintuple information. Specifically, the target node assigns the source IP address, source port, destination IP address, destination port, and protocol number in the quintuple information to the corresponding fields of the connection handle. At the same time, the target node binds the protocol identifier to the connection handle to ensure the uniqueness of the protocol context. In addition, the target node extracts the parameters of the Transmission Control Protocol or User Datagram Protocol, such as sequence number, acknowledgment number, and window size, from the session state synchronized from the source node and assigns these parameters to the new connection handle to maintain the continuity of the session.
[0139] Reconstructing the connection handle in the user - mode protocol stack can avoid the processing overhead of the operating system kernel - mode protocol stack. By directly completing parameter assignment and initialization in the user - mode, it improves the efficiency and performance of connection migration. Using the quintuple information and protocol identifier ensures that the new connection handle is consistent with the source node, maintaining the accuracy of network parameters and protocol context. Synchronizing the parameters of the Transmission Control Protocol or User Datagram Protocol through assignment operations realizes the continuity of the session state, prevents data loss or duplication, and improves the user experience in the multi - device push scenario.
[0140] S4 - 5, Maintain the continuity of the Transmission Control Protocol or User Datagram Protocol session state:
[0141] Maintain the continuity of the Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) session state. The target node registers the reconstructed connection handle to the session state table of the user-space protocol stack, and associates the parsed session token and subscription tree topology with the connection handle to maintain the identity identification and subscription relationship of the connection. The target node synchronizes the send buffer and receive buffer of the connection, and copies the buffer data of the source node to the corresponding buffer of the target node to ensure the continuity and integrity of the data stream. Meanwhile, the target node configures the keep-alive timer of the connection according to the keep-alive parameters extracted in step S1, and regularly checks the active state of the connection by setting the time interval of heartbeat detection to prevent the disconnection of the connection caused by the lack of data interaction for a long time.
[0142] Maintaining the continuity of the session state ensures that the connection migration is imperceptible to the user by associating the session token and subscription tree topology and synchronizing the buffer data. The user does not need to re-establish the connection or authenticate, thus improving the system availability and user satisfaction. Synchronizing the send buffer and receive buffer prevents data loss or duplication through data copying operations, ensuring the integrity of the data stream. Configuring the keep-alive timer automatically manages the active state of the connection through a regular detection mechanism, reducing the risk of connection interruption caused by heartbeat timeout, and is suitable for the long-term session requirements in the dynamic information aggregation scenario.
[0143] The technical logic of step S4 is based on the self-contained data block extracted by the target node from the memory mapping area. By parsing the metadata header and the self-contained data block, the protocol identifier and five-tuple information are extracted, and the connection handle is reconstructed in the user-space protocol stack to maintain the continuity of the TCP or UDP session state. This process realizes the imperceptibility of connection migration and the integrity of the session through low-latency data access, accurate protocol parsing, and efficient connection reconstruction, providing a reliable protocol stack context for step S5 to use the reconstructed connection handle to parse the keep-alive message in real time and generate a response frame, meeting the technical requirements of enterprise-level dynamic information aggregation and multi-terminal real-time push scenarios.
[0144] Step S4 has extracted the protocol identifier and five-tuple information from the self-contained data block in the memory mapping area of S3, reconstructed a connection handle consistent with the source node in the user-space protocol stack, and maintained the continuity of the TCP / UDP session state. However, relying solely on the reconstructed connection handle is not sufficient to completely avoid the heartbeat timeout disconnection problem during the migration process. Especially during the short migration time, the client may interrupt the session due to not receiving the keep-alive response. Step S5 undertakes this requirement, uses the protocol stack context reconstructed in step S4 to parse the keep-alive message of the input traffic in real time, generates a response frame that conforms to the protocol specification, and returns it to the client through the connection handle to shield the risk of heartbeat timeout disconnection.
[0145] Step S5 includes the following:
[0146] S5-1, Obtain the reconstructed protocol stack context:
[0147] Retrieve the connection handle reconstructed in step S4 from the session state table of the user-space protocol stack, and extract the protocol stack context associated with the connection handle. The protocol stack context contains key information such as protocol type, version number, session token, and subscription tree topology, which are provided by the self-contained data block in step S3. The target node locates the protocol stack context bound to the connection handle by querying the session state table, ensuring that the necessary protocol and session information is available when parsing the keep-alive messages in the incoming traffic. The specific processing procedure is as follows: The target node searches for the corresponding entry in the session state table based on the unique identifier of the connection handle, and then reads the protocol type, version number, session token, and subscription tree topology stored in the entry to form a complete protocol stack context.
[0148] Obtaining the reconstructed protocol stack context provides the protocol type, version number, and session information for parsing the keep-alive messages, ensuring the accuracy and consistency of the parsing process. By retrieving the context from the session state table, the target node can quickly access the required data, reducing the computational overhead caused by repeated parsing or querying and improving the response speed. This design supports the flexible handling of multiple protocols because the clearly defined protocol type and version number allow the target node to adapt to different protocol specifications, enhancing the adaptability and scalability of the system.
[0149] S5-2, Parse the keep-alive messages in the incoming traffic in real time:
[0150] Parse the keep-alive messages in the incoming traffic in real time. The target node selects the corresponding protocol parser according to the protocol type and version number in the protocol stack context. The protocol parser analyzes the incoming traffic data packets to identify the type of keep-alive message: for the WebSocket protocol, the keep-alive message appears as a Ping frame; for the MQTT protocol, the keep-alive message appears as a PINGREQ control message.
[0151] The protocol parser extracts the key fields of the keep-alive message, such as the payload data of the WebSocket Ping frame or the message identifier of the MQTT PINGREQ message. The specific processing procedure is as follows: The target node reads the header information of the incoming traffic data packet, matches it with the protocol type and version number in the protocol stack context, determines the type of the keep-alive message in the data packet, and then parses and stores the key fields for use when generating the response frame.
[0152] The keep-alive message that parses the input traffic in real time can promptly identify the heartbeat requests of the client, ensuring that the active state of the connection is maintained. By selecting a protocol parser that matches the protocol type and version number, the parsing process has protocol compatibility, avoiding parsing errors caused by protocol mismatches. Extracting the key fields provides the necessary information for generating the response frame, ensuring the consistency between the response frame and the keep-alive message, thereby enhancing the stability and reliability of the system.
[0153] S5-3, Generate a response frame that complies with the protocol specification:
[0154] Generate a response frame that complies with the protocol specification. The target node generates the corresponding response frame according to the type of the keep-alive message: for the WebSocketPing frame, generate a Pong frame and copy the payload data of the Ping frame intact to the payload field of the Pong frame; for the MQTTPINGREQ message, generate a PINGRESP control message and keep the message identifier the same as the identifier in the PINGREQ message. The specific processing process is as follows: The target node constructs the frame header field of the response frame according to the type of the keep-alive message identified by the protocol parser, fills the key fields extracted from the keep-alive message as the payload content, and adds a check field according to the protocol definition to ensure the integrity of the response frame.
[0155] Generating a response frame that complies with the protocol specification can ensure that the client receives the correct keep-alive response, maintain the active state of the connection, and prevent connection interruption caused by heartbeat timeout. By copying the payload data of the Ping frame or keeping the message identifier consistent, the response frame is associated with the keep-alive message, enhancing the consistency of protocol interaction. The response frame generation process that follows the protocol specification reduces protocol layer exceptions caused by incorrect response frame formats, thereby enhancing the robustness and compatibility of the system.
[0156] S5-4, Return the response frame to the client through the connection handle:
[0157] Return the response frame to the client through the connection handle. The target node writes the generated response frame into the send buffer of the connection handle and transfers the data in the send buffer to the client through the network interface of the user-mode protocol stack. After the transfer is completed, the target node updates the keep-alive timer of the connection handle and records the send timestamp of the response frame to monitor the timeliness of the heartbeat response. The specific processing process is as follows: The target node writes the data content of the response frame into the send buffer in sequence, calls the network interface of the user-mode protocol stack to complete the data sending, and then records the current timestamp in the keep-alive timer for subsequent heartbeat interval calculation.
[0158] Returning the response frame through the connection handle can ensure that the response frame is transmitted to the client through the correct network channel and maintain the session state of the connection. Using the network interface of the user-mode protocol stack for data transmission and directly operating on the send buffer reduces the latency caused by the intervention of the kernel mode and improves the response speed. Updating the keep-alive timer records the send timestamp to ensure the timeliness of the heartbeat response, prevent connection interruption caused by response latency, and thus improve the stability of the system and the user experience.
[0159] S5-5, Shield the disconnection due to heartbeat timeout during the migration process:
[0160] Shield the disconnection due to heartbeat timeout during the migration process. The target node monitors the keep-alive timer to ensure that the response frame is sent within the heartbeat interval defined by the protocol. If the connection migration process causes a delay in sending the response frame, the target node introduces a preset grace period, such as extending the heartbeat timeout threshold to the original threshold plus 2 seconds, and temporarily adjusts the timeout judgment condition to prevent the client from misjudging the connection interruption due to a short delay. After the migration is completed, the target node restores the normal heartbeat timeout threshold defined by the protocol to ensure the continuity of the session.
[0161] When the target node detects the migration state, it dynamically adjusts the timeout threshold of the keep-alive timer and resets the threshold according to the protocol specification after the migration ends.
[0162] Shielding the disconnection due to heartbeat timeout during the migration process introduces a preset grace period and temporarily adjusts the heartbeat timeout threshold to prevent the client from interrupting the connection due to not receiving the response frame during the short migration time, improving the imperceptibility of the connection migration. Restoring the normal heartbeat timeout threshold by resetting the threshold after the migration is completed ensures that the connection operates according to the protocol specification in a stable state, maintaining the long-term stability and performance of the system. This design supports the business continuity in the multi-terminal real-time push scenario and enhances the reliability of the system.
[0163] The technical logic of step S5 is based on the protocol stack context reconstructed in step S4. By obtaining the protocol stack context, real-time parsing of the keep-alive message, generating the response frame, returning the response frame through the connection handle, and shielding the heartbeat timeout disconnection, the session continuity during the connection migration process is achieved. This process ensures the active state of the connection by real-time processing of the keep-alive message and timely returning of the response frame, prevents the heartbeat timeout disconnection caused by migration, and enhances the business reliability and user experience in the enterprise-level dynamic information aggregation and multi-terminal real-time push scenario. Each sub-step is closely connected, and the output of the previous step is the input of the next step, jointly ensuring the efficient operation of the system.
[0164] Embodiment 2: Figure 2 The enterprise-level dynamic information aggregation and multi-terminal real-time push system of the present invention is given, including: a protocol parsing module, a feature evaluation module, a data sequence module, a connection reconstruction module, and a keep-alive response module;
[0165] Protocol parsing module: Parse the header fields and payload structures of heterogeneous communication protocols, extract keep-alive parameters and subscription paths, generate binary hash fingerprints carrying logical timestamps, which serve as the minimum synchronization unit for connection status, and pass the binary hash fingerprints to the feature evaluation module.
[0166] Feature evaluation module: Conduct semantic feature analysis on the protocol types corresponding to the binary hash fingerprints, perform feature engineering and in-depth analysis, divide the fingerprints into strong and weak consistency groups according to the evaluation results, and perform differential synchronization strategy processing, then pass the grouped fingerprints to the data sequence module;
[0167] Data sequence module: Serialize the grouped fingerprints and their associated session tokens and subscription tree topologies into self - contained data blocks in the native format of the protocol, append metadata headers of the protocol type and version number, write them to the physical memory address of the target node through the RDMA memory window, and pass the self - contained data blocks to the connection reconstruction module;
[0168] Connection reconstruction module: The target node extracts the protocol identifier and five - tuple information from the self - contained data block in the memory mapped area, reconstructs a connection handle consistent with the source node in the user - state protocol stack, and passes the reconstructed connection handle to the keep - alive response module.
[0169] Keep - alive response module: Utilize the reconstructed protocol stack context to parse the keep - alive messages of the input traffic in real - time, generate response frames that conform to the protocol specifications, return them to the client through the connection handle, and shield the disconnection due to heartbeat timeout during the migration process.
[0170] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the real situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0171] It should be noted that the system of the present invention can be deployed on the device itself to achieve embedded applications, or can also run on a PC or other terminals with a user interface, so as to meet various hardware environments and usage requirements.
[0172] Only some exemplary embodiments of the present invention are described by way of illustration above. Without doubt, for those of ordinary skill in the art, the described embodiments can be modified in various different ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the protection scope of the claims of the present invention.
[0173] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0174] As described above, the above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. Enterprise-level dynamic information aggregation and multi-terminal real-time push method, characterized in that, Including the steps: S1. Analyze the header fields and payload structure of the heterogeneous communication protocol, extract the keep-alive parameters, subscription paths, and session identifiers, generate a binary hash fingerprint carrying a logical timestamp, and use it as the minimum synchronization unit for the connection status; S2. Conduct semantic feature analysis on the protocol type corresponding to the binary hash fingerprint, perform feature engineering and in-depth analysis, divide the fingerprints into strong and weak consistency groups according to the evaluation results, and perform differential synchronization strategy processing; S3. Serialize the grouped fingerprints and their associated session tokens and subscription tree topologies into self-contained data blocks in the native protocol format, append a metadata header containing the protocol type and version number before the self-contained data block, and write it to the physical memory address of the target node through the RDMA memory window; S4. The target node extracts the protocol identifier and five-tuple information from the self-contained data block in the memory mapping area and reconstructs a connection handle consistent with the source node in the user-state protocol stack; S5. Utilize the reconstructed protocol stack context to parse the keep-alive messages of the input traffic in real time, generate response frames compliant with the protocol specifications, and return them to the client through the connection handle, masking the heartbeat timeout disconnection during the migration process.
2. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 1, wherein Step S1 includes the following: Identify the type of the communication protocol, analyze the header fields and payload structure of the communication protocol, extract the keep-alive parameters, subscription paths, and session identifiers from it, splice the keep-alive parameters, subscription paths, and session identifiers into a byte stream as the core state elements, apply a hash algorithm to process the byte stream to generate a hash value, then append the logical timestamp to the hash value to form a binary hash fingerprint, and finally store and manage the binary hash fingerprint as the minimum synchronization unit for the connection status for subsequent processing.
3. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 2, wherein Step S2 includes the following: Conduct semantic feature analysis on the protocol type corresponding to the binary hash fingerprint, determine the real-time requirements and throughput requirements of the protocol, perform feature engineering and in-depth analysis; the task of feature engineering is to extract the connection pulsation entropy index reflecting the dynamic complexity of message interaction and the state migration trend index reflecting the dynamic importance of state changes.
4. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 3, characterized in that, Step S2 also includes the following: Calculate the connection pulsation entropy index based on the dynamic complexity of message interaction of the connection; Calculate the state migration trend index based on the dynamic importance of state changes of the connection.
5. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 4, characterized in that, Step S2 also includes the following: Obtain a comprehensive coefficient by weighted summation of the connection pulsation entropy index and the state migration trend index; then divide the binary hash fingerprint into a strong consistency group or a weak consistency group according to the comparison between the comprehensive coefficient and a preset threshold.
6. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 5, wherein Step S2 also includes the following: Submit changes to the majority of nodes for the binary hash fingerprints in the strong consistency group using the Raft consensus algorithm; use incremental broadcast packets to transmit the differential state and trigger asynchronous conflict detection for the binary hash fingerprints in the weak consistency group.
7. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 6, wherein Step S3 includes the following: Extract the session token and subscription tree topology related to the connection status from the grouped binary hash fingerprints and their group labels in the output. Serialize the grouped binary hash fingerprints, session tokens, and subscription tree topologies into self - contained data blocks in the native format of the protocol. Append a metadata header containing the protocol type and protocol version number before the self - contained data block. Use remote direct memory access technology to write the self - contained data block with the metadata header to the physical memory address of the target node.
8. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 7, wherein, Step S4 includes the following: The target node extracts the self - contained data block from the memory - mapped area, obtains the protocol type and version number by parsing the protocol type and version number fields of the metadata header, selects the corresponding protocol parser according to the protocol type and version number, parses the self - contained data block to extract the protocol identifier and five - tuple information, allocates a new connection handle in the user - state protocol stack and initializes the network parameters and protocol context of the connection handle with the five - tuple information and protocol identifier, synchronizes the session state parameters from the source node and assigns them to the new connection handle, registers the initialized connection handle to the session state table of the user - state protocol stack and associates the session token and subscription tree topology, synchronizes the data in the send buffer and receive buffer of the self - contained data block, and configures a keep - alive timer to maintain the active state of the connection handle.
9. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 8, characterized in that Step S5 includes the following: The target node retrieves the connection handle from the session state table of the user - state protocol stack, extracts the protocol stack context associated with the connection handle, selects the corresponding protocol parser according to the protocol type and version number in the protocol stack context, parses the input traffic packet to identify the keep - alive message type and extract the key fields, generates a corresponding response frame according to the keep - alive message type and copies the key fields to the payload field of the response frame, writes the response frame to the send buffer of the connection handle and transmits it to the client through the network interface of the user - state protocol stack, updates the keep - alive timer of the connection handle and introduces a preset grace period during migration to adjust the heartbeat timeout threshold to shield the risk of disconnection due to heartbeat timeout.
10. An enterprise-level dynamic information aggregation and multi-terminal real-time push system for implementing the enterprise-level dynamic information aggregation and multi-terminal real-time push method according to any one of claims 1-9, characterized in that, Include: A protocol parsing module, a feature evaluation module, a data serialization module, a connection reconstruction module, and a keep - alive response module; Protocol parsing module: Parse the header fields and payload structure of heterogeneous communication protocols, extract the keep - alive parameters, subscription paths, and session identifiers, generate binary hash fingerprints carrying logical timestamps as the minimum synchronization unit of the connection status, and pass the binary hash fingerprints to the feature evaluation module; Feature evaluation module: Conduct semantic feature analysis on the protocol type corresponding to the binary hash fingerprints, perform feature engineering and in - depth analysis, divide the fingerprints into strong and weak consistency groups according to the evaluation results, and perform differential synchronization strategy processing, and pass the grouped fingerprints to the data serialization module; Data serialization module: Serialize the grouped fingerprints and their associated session tokens and subscription tree topologies into self - contained data blocks in the native format of the protocol, append a metadata header containing the protocol type and version number before the self - contained data block, write it to the physical memory address of the target node through the RDMA memory window, and pass the self - contained data block to the connection reconstruction module; Connection Reconstruction Module: The target node extracts the protocol identifier and five-tuple information from the self-contained data block in the memory mapping area, reconstructs a connection handle in the user-mode protocol stack that is consistent with the source node, and passes the reconstructed connection handle to the Keep-Alive Response Module; Keep-Alive Response Module: Using the reconstructed protocol stack context, it parses the keep-alive packets of the input traffic in real time, generates response frames that conform to the protocol specifications, returns them to the client through the connection handle, and shields the disconnection due to heartbeat timeout during the migration process.
Citation Information
Patent Citations
Large-scale cloud storage copy server consistency processing method and system
CN106603645A
Distributed real-time simulation system data interaction strategy taking data as center
CN111147284A