Enterprise-level dynamic information aggregation and multi-terminal real-time pushing method and system
By adopting lightweight state fingerprint technology, Raft strong consistency and asynchronous incremental broadcasting, RDMA memory direct memory injection and user-state protocol stack reconstruction technology in enterprise-level multi-terminal real-time push systems, the problem of long connection state synchronization delay of heterogeneous protocols is solved, and efficient and reliable multi-protocol connection state synchronization and real-time guarantees are achieved.
Patent Information
- Application Number
- CN202510607400.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-05-13
AI Technical Summary
In enterprise-level multi-end real-time push systems, the life cycle management of heterogeneous protocol long connections faces a structural contradiction between the state synchronization mechanism and the dynamic expansion requirements, resulting in connection state synchronization delays, affecting business continuity and real-time.
The lightweight state fingerprint technology based on the protocol native features is adopted, and the packet synchronization strategy of Raft strong consistency and asynchronous incremental broadcasting is combined with RDMA memory direct memory injection and user-state protocol stack reconstruction technology to achieve efficient extraction of core states of multi-protocol connections and cross-node synchronization, and the dynamic keep-alive answering mechanism blocks the protocol layer differences.
It realizes accurate extraction and efficient synchronization of multi-protocol connection states, ensures financial-level real-time business data integrity, supports high throughput access to massive IoT terminals, breaks through the throughput and delay restrictions of traditional protocol stacks, and significantly reduces the risk of business interruption and operation and maintenance complexity.
Smart Images

Figure CN120128564A_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: The enterprise-level dynamic information aggregation and multi-terminal real-time push method includes the following steps: 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; 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 format of the protocol, append the metadata header of the protocol type and version number, and write them 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-mode 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 that conform to the protocol specifications, and return them to the client through the connection handle, masking the disconnection due to heartbeat timeout during the migration process.
[0006] In a preferred embodiment, 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 them, 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.
[0007] In a preferred embodiment, 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 transition trend index reflecting the dynamic importance of state changes.
[0008] In a preferred embodiment, step S2 further includes the following: Calculate the connection pulsation entropy index based on the dynamic complexity of message interaction of the connection; Calculate the state transition trend index based on the dynamic importance of state changes of the connection.
[0009] In a preferred embodiment, step S2 further includes the following: A comprehensive coefficient is obtained by weighted summation of the connection pulsation entropy index and the state transition trend index; then, according to the comparison between the comprehensive coefficient and a preset threshold, the binary hash fingerprints are divided into a strong consistency group or a weak consistency group.
[0010] In a preferred embodiment, step S2 further includes the following: The binary hash fingerprints in the strong consistency group are submitted for change to a majority of nodes using the Raft consensus algorithm; the binary hash fingerprints in the weak consistency group use incremental broadcast packets to transfer the differential state and trigger asynchronous conflict detection.
[0011] In a preferred embodiment, step S3 includes the following: Extract the session token and subscription tree topology related to the connection state from the output grouped binary hash fingerprints and their group labels, serialize the grouped binary hash fingerprints, session token, and subscription tree topology 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 blocks, and use the Remote Direct Memory Access technology to write the self - contained data blocks with the metadata header to the physical memory address of the target node.
[0012] In a preferred embodiment, 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 - mode 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 - mode 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.
[0013] In a preferred embodiment, step S5 includes the following: 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.
[0014] 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; Protocol parsing module: Parses the header fields and payload structure of heterogeneous communication protocols, extracts keep-alive parameters and subscription paths, generates a binary hash fingerprint carrying a logical timestamp, which serves as the minimum synchronization unit of the connection state, and passes the binary hash fingerprint to the feature evaluation module.
[0015] Feature evaluation module: Conducts semantic feature analysis on the protocol type corresponding to the binary hash fingerprint, performs feature engineering and in-depth analysis, divides the fingerprint into strong and weak consistency groups according to the evaluation results, and performs differential synchronization strategy processing, and passes the grouped fingerprint to the data sequence module; Data sequence module: Serializes 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, attaches a metadata header of the protocol type and version number, and writes it into the physical memory address of the target node through the RDMA memory window, and passes 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 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.
[0016] Keep-alive response module: Utilizes the reconstructed protocol stack context 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 disconnection due to heartbeat timeout during the migration process.
[0017] 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: Through the lightweight state fingerprint technology based on the native features of the protocol, the present invention realizes the accurate extraction of the core states of multi-protocol connections and the efficient cross-node synchronization; combined with the group synchronization strategy of Raft strong consistency and asynchronous incremental broadcast, 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 memory direct injection and user-mode protocol stack reconstruction technology, it breaks through the throughput and latency limitations of the traditional kernel-mode 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 has achieved a breakthrough improvement in three dimensions: protocol compatibility, state synchronization efficiency, and system scalability, solving the problems of real-time, consistency, and reliability of multi-protocol connection state synchronization in a distributed environment, providing a core architecture support with cross-protocol self-adaptive capabilities for high-concurrency and strong-real-time enterprise-level information push systems, significantly reducing the risk of service interruption and the complexity of operation and maintenance, and enabling the upgrade of real-time data services in key fields such as financial transactions and industrial Internet of Things. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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.
[0019] 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
[0020] 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 of 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.
[0021] Embodiment 1: Figure 1 The enterprise-level dynamic information aggregation and multi-terminal real-time push method of the present invention is given, including: 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; 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; S3. Serialize the grouped fingerprints, their associated session tokens, and the subscription tree topology into self - contained data blocks in the native protocol format, 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; 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; 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, masking the disconnection due to heartbeat timeout during the migration process.
[0022] 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, thereby 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. Among them, step S1 focuses on parsing the header fields and payload structures of heterogeneous communication protocols, extracting key state elements and generating binary hash fingerprints, which serve 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.
[0023] Step S1 includes the following contents: S1 - 1, Protocol identification and classification: 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.
[0024] S1 - 2, Header field and payload parsing: 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.
[0025] S1-3, Core status element extraction: Extract the core status elements from the parsing results, including the keep-alive parameter, subscription path, and session identifier. 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.
[0026] Extracting the core status elements can streamline the connection status information and reduce the computational and transmission overhead in the subsequent synchronization process. 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.
[0027] S1-4, Generate binary hash fingerprint: 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. This 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.
[0028] Generating the binary hash fingerprint compresses 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.
[0029] S1-5, Fingerprint Storage and Management: 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 are connections with keep-alive timeouts and removes their corresponding binary hash fingerprints to release resources.
[0030] 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.
[0031] 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.
[0032] 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 of 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 performance 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 formulated to provide the grouped fingerprints and the basis of the synchronization strategy for the serialization and transmission in the subsequent step S3.
[0033] Step S2 includes the following: 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 and 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.
[0034] 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.
[0035] S2-2. Calculate the connection pulsation entropy index : Purpose: Measure the dynamic complexity of message interaction of the connection corresponding to the binary hash fingerprint.
[0036] Input: The message interval sequence, active duration, and burst peak of the connection identified by the binary hash fingerprint within the recent rated time.
[0037] Processing: Collect the message interval sequence and calculate its distribution probability (Discretized by histogram).
[0038] Calculate the message interaction entropy .
[0039] Combine the active duration and the burst peak , and adjust the entropy value.
[0040] Calculation formula: ; The entropy of the message interval sequence reflects the randomness of the interaction.
[0041] : The total sum of the time periods with at least 1 message within the recent rated time.
[0042] : The maximum value of the number of messages per second within the recent rated time.
[0043] Output: The connected pulsation entropy index value. The higher the value, the more complex the connected message interaction.
[0044] The connected pulsation entropy index quantifies the randomness of the interaction through the message interaction entropy, and is adjusted by combining the active duration and the burst peak to ensure a comprehensive assessment of the dynamic complexity of the connection. The message interaction entropy captures the disorder of the interaction, the active duration reflects the continuous activity degree of the connection, and the burst peak reflects the peak load capacity. This comprehensive calculation method can accurately identify the connections that require high consistency guarantee and improve the pertinence of the synchronization strategy.
[0045] S2-3, Calculate the state transition trend index : Purpose: To measure the dynamic importance of the state change of the connection corresponding to the binary hash fingerprint.
[0046] Input: The number of state changes of the connection identified by the binary hash fingerprint within the recent fixed time Connection duration , State change amplitude sequence , Change interval sequence .
[0047] Processing: Calculate the state change frequency .
[0048] Perform a time-weighted summation of the state change amplitudes , is the change time point.
[0049] Calculate the average deviation of change intervals .
[0050] Calculation formula: ; : State change frequency.
[0051] : Weighted sum of state change amplitudes, reflecting the cumulative impact of changes.
[0052] : Average deviation of change intervals, reflecting the regularity of changes.
[0053] Output: State migration trend index value. The higher the value, the more important the connection state change is.
[0054] 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 migration 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 more stringent the synchronization requirements for the connection.
[0055] S2-4, Make a grouping decision based on 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 strategy.
[0056] 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.
[0057] S2-5, Synchronization strategy execution: Execute differentiated synchronization strategies according to the grouping results. For the binary hash fingerprints in the strong consistency group, use the Raft consensus algorithm to submit the fingerprint change log to the majority of nodes for confirmation, ensuring high consistency of state changes among multiple nodes. For the binary hash fingerprints in the weak consistency group, generate an incremental broadcast packet carrying a version vector, transmit the differential state of the fingerprint to the target node, and trigger asynchronous conflict detection to achieve state synchronization.
[0058] The differentiated synchronization strategy optimizes resource utilization and synchronization efficiency based on the grouping results. The Raft consensus algorithm provides strict state consistency guarantees for strongly consistent groups and is applicable to connections with high real-time requirements; the incremental broadcast packets and asynchronous conflict detection provide an efficient synchronization mechanism for weakly consistent groups and are applicable to connections with low real-time requirements. The processing of the differentiated synchronization strategy is exemplified as follows: 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 a high degree of consistency of the state among multiple nodes, the Raft consensus algorithm is used to process fingerprint changes, and the specific process is as follows: Change log writing: When the connection state changes (such as the subscription path is updated), the change is recorded as a log entry and written to the currently elected leader node.
[0059] Log replication: The leader node replicates the log entry to all follower nodes.
[0060] 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.
[0061] Commit the change: The leader node commits this change, updates the local fingerprint state, and notifies all follower nodes to apply this change.
[0062] Client notification: The leader node notifies the client through the WebSocket channel to confirm that the state change has been completed.
[0063] Finally, the binary hash fingerprint of the connection maintains strong consistency 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.
[0064] 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 high-throughput requirements, the incremental broadcast packets are used to transfer the differential state, and the specific steps are as follows: Differential state generation: When the connection state changes (such as the keep-alive parameter is adjusted), an incremental broadcast packet is generated, which only contains 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.
[0065] Broadcast transmission: The incremental broadcast packet is broadcast to all target nodes without waiting for real-time confirmation.
[0066] State update: After the target node receives the broadcast packet, it updates the state of the local binary hash fingerprint according to the differential data.
[0067] Asynchronous Conflict Detection: After an update, a node triggers an asynchronous process to check if there are conflicts in the version vector. For example, if the version vector received by a node indicates a lag in status, a conflict resolution process is initiated (such as pulling the latest status or merging differences).
[0068] Ultimately, the connection state achieves eventual consistency among multiple nodes. For example, when the subscription path for log pushing changes, the nodes may not be in a completely consistent state in a short period. However, through incremental broadcasting and conflict detection, all nodes are finally synchronized to the latest state, meeting the requirements for the efficiency and throughput of log data pushing.
[0069] Step S2 has completed grouping based on the comprehensive coefficient of the binary hash fingerprint, outputting the grouped binary hash fingerprint and its group label (strong consistency group or weak consistency group), and determining 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 the seamless migration of the connection state and the reconstruction in 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.
[0070] Step S3 includes the following:[[]]END] S3 - 1, Extract Associated Information: 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, used to identify the data consistency requirements.
[0071] The session token is a unique string used to identify the connection identity. For example, in the WebSocket protocol, it is Sec - WebSocket - Key, and in the MQTT protocol, it is ClientID.
[0072] The subscription tree topology describes the hierarchical structure of the subscription relationship of the connection. For example, in the MQTT protocol, it is the TopicFilter tree, and in the WebSocket protocol, it is the set of subscription paths. By querying the connection state table, find the session token and subscription tree topology bound to the grouped binary hash fingerprint, and associate this information with the grouped binary hash fingerprint and its group label to form a complete data basis for subsequent processing.
[0073] The purpose of extracting the session token and the subscription tree topology is to provide complete context information for the connection state, ensuring that subsequent steps have the necessary data for authentication and subscription relationships when reconstructing the connection. Binding this information to the grouped binary hash fingerprints can maintain data integrity and consistency when migrating the connection state between multiple nodes.
[0074] S3-2, Serialize into self-contained data blocks: Serialize the grouped binary hash fingerprints, session tokens, and subscription tree topologies into self-contained data blocks according to the native protocol format. The native protocol format refers to the message structure defined by a specific communication protocol, such as the frame format of the WebSocket protocol or the control message structure of the MQTT protocol.
[0075] 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.
[0076] During the serialization process, align the field boundaries of the data blocks, and use fixed-length or prefix length identifiers to mark the range of each field, ensuring that the structure of the data blocks is clear and easy to parse.
[0077] Serializing according to the native protocol format 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 state 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.
[0078] S3-3, Append a metadata header: 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 identifying the communication protocol, such as "WS" for the WebSocket protocol and "MQTT" for the MQTT protocol. The protocol version number is a number or string identifying the protocol version, such as "13" for WebSocket version 13. The metadata header uses fixed-length encoding, 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.
[0079] S3-4, Write through the RDMA memory window: Using Remote Direct Memory Access (RDMA) technology, a self - contained data block with a metadata header is written to the physical memory address of the target node. RDMA technology enables data transfer through pre - registered memory regions, and the memory window address of the target node is a memory - mapped area specifically designed 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 transfer is complete, the system sends a completion signal to the target node to confirm the successful data transfer.
[0080] 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, attaching a metadata header, and writing it to the memory - mapped area of the target node through RDMA technology, the complete processing and efficient transmission of the connection state are achieved. This process ensures the integrity of the connection state and protocol compatibility, and realizes low - latency and high - throughput data transfer using 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, supporting the efficient migration of the connection state between multiple nodes and meeting the technical requirements of enterprise - level dynamic information aggregation and multi - terminal real - time push scenarios.
[0081] In the scenarios of enterprise - level dynamic information aggregation and multi - terminal real - time push, 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, and the target node has received the self - contained data block with the metadata header. However, simply achieving data transfer is not sufficient to guarantee session continuity. The migration of the connection state also requires reconstructing a connection handle on the target node that is consistent with the source node to maintain the integrity of the TCP / UDP session state. Step S4 focuses on this, and by extracting key information and reconstructing the connection handle in the user - space protocol stack, it lays the foundation for the subsequent processing of keep - alive messages in step S5.
[0082] Step S4 includes the following: S4 - 1, Extract the self - contained data block from the memory - mapped area: The target node extracts the self - contained data block from the memory - mapped area. The memory - mapped area address of the target node is pre - registered and written with data by step S3 through RDMA technology. The target node reads the data according to the physical address of the memory - mapped 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 and end positions of the memory data match the expected length, and discards the data part 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 subsequent parsing and reconstruction processes.
[0083] S4-2, Parse Metadata Header: Parse the metadata header in the self - contained data block. The metadata header contains the protocol type and protocol version number, 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 a predefined list of protocol types 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, which then parses the content of the self - contained data block.
[0084] 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.
[0085] S4-3, Parse Self - Contained Data Block: 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 the order and length of the fields defined by the protocol type and version number, and extracts the grouped binary hash fingerprint, session token, subscription tree topology, protocol identifier, and five - tuple 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 five - tuple 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.
[0086] S4-4, Reconstruct Connection Handle in User - Space Protocol Stack: Reconstruct the connection handle in the user - space protocol stack. The target node allocates a new connection handle in the user - space protocol stack and initializes the network parameters of the connection handle using the parsed five - tuple information. Specifically, the target node assigns the source IP address, source port, destination IP address, destination port, and protocol number in the five - tuple 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.
[0087] Reconstructing the connection handle in the user-space protocol stack can avoid the processing overhead of the operating system kernel-space protocol stack. By directly completing parameter assignment and initialization in the user space, the efficiency and performance of connection migration can be improved. Using the five-tuple 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 session state, prevents data loss or duplication, and enhances the user experience in the multi-terminal push scenario.
[0088] S4-5, maintaining the continuity of the Transmission Control Protocol or User Datagram Protocol session state: Maintaining the continuity of the Transmission Control Protocol or User Datagram Protocol 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. At the same time, the target node configures the keep-alive timer of the connection according to the keep-alive parameters extracted in step S1. By setting the time interval of heartbeat detection, it regularly checks the active state of the connection to prevent the connection from being disconnected due to no data interaction for a long time.
[0089] Maintaining the continuity of session state through associating the session token and subscription tree topology and synchronizing buffer data ensures that the connection migration is imperceptible to the user. The user does not need to re-establish the connection or authenticate, thus enhancing the system availability and user satisfaction. Synchronizing the send buffer and receive buffer prevents data loss or duplication through data copy 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.
[0090] 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 Transmission Control Protocol or User Datagram Protocol 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.
[0091] 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 migration. Especially during the short period of migration, the client may interrupt the session due to the lack of a keep-alive response. Step S5 addresses this requirement by using the protocol stack context reconstructed in Step S4 to parse the keep-alive packets 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 risk of heartbeat timeout disconnection.
[0092] Step S5 includes the following: S5-1, Obtain the reconstructed protocol stack context: 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 to ensure that it has the necessary protocol and session information when parsing the keep-alive packets in the input traffic. The specific processing process is as follows: The target node searches for the corresponding table 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 table entry to form a complete protocol stack context.
[0093] Obtaining the reconstructed protocol stack context provides the protocol type, version number, and session information for parsing the keep-alive packets, 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 processing 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.
[0094] S5-2, Parse the keep-alive packets of the input traffic in real time: Parse the keep-alive packets in the input traffic in real time. The target node selects the corresponding protocol parser based on the protocol type and version number in the protocol stack context. The protocol parser analyzes the input traffic packets to identify the type of keep-alive packets: for the WebSocket protocol, the keep-alive packets are manifested as Ping frames; for the MQTT protocol, the keep-alive packets are manifested as PINGREQ control packets.
[0095] The protocol parser extracts the key fields of the keep-alive message, such as the payload data of the WebSocketPing frame or the message identifier of the MQTT PINGREQ message. The specific processing process is as follows: The target node reads the header information of the input traffic data packet, matches it with the protocol type and version number in the protocol stack context. After determining the keep-alive message type of the data packet, it parses out the key fields and stores them for use when generating the response frame.
[0096] Real-time parsing of the keep-alive messages in the input traffic can promptly identify the heartbeat requests from the client and ensure the maintenance of the active state of the connection. By selecting a protocol parser that matches the protocol type and version number, the parsing process has protocol compatibility and avoids 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.
[0097] S5-3, generate a response frame that conforms to the protocol specification: Generate a response frame that conforms to the protocol specification. The target node generates a corresponding response frame according to the type of the keep-alive message: For the WebSocketPing frame, it generates a Pong frame and copies the payload data of the Ping frame intact to the payload field of the Pong frame; for the MQTT PINGREQ message, it generates a PINGRESP control message and keeps the message identifier the same as that 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 keep-alive message type identified by the protocol parser, fills in 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.
[0098] Generating a response frame that conforms to 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 process of generating a response frame that follows the protocol specification reduces protocol layer exceptions caused by incorrect response frame formats, thereby enhancing the robustness and compatibility of the system.
[0099] S5-4, return the response frame to the client through the connection handle: The response frame is returned 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 order, 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 calculation of the heartbeat interval.
[0100] 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 kernel intervention and improves the response speed. Updating the keep-alive timer by recording the send timestamp ensures the timeliness of the heartbeat response, prevents connection interruption caused by response delay, and thus improves the stability of the system and the user experience.
[0101] S5-5, shielding the disconnection due to heartbeat timeout during the migration process: 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.
[0102] 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.
[0103] Shielding the disconnection due to heartbeat timeout during the migration process by introducing a preset grace period and temporarily adjusting the heartbeat timeout threshold can 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-end real-time push scenario and enhances the reliability of the system.
[0104] 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 keep-alive messages, generating response frames, returning response frames through connection handles, and masking heartbeat timeout disconnections, session continuity during the connection migration process is achieved. This process ensures the active state of the connection by processing keep-alive messages in real time and returning response frames in a timely manner, preventing heartbeat timeout disconnections caused by migration, and enhancing business reliability and user experience in enterprise-level dynamic information aggregation and multi-terminal real-time push scenarios. Each sub-step is closely connected, with the output of the previous step serving as the input of the next step, jointly ensuring the efficient operation of the system.
[0105] Embodiment 2: Figure 2 The enterprise-level dynamic information aggregation and multi-terminal real-time push system of the present invention is provided, including: a protocol parsing module, a feature evaluation module, a data sequence module, a connection reconstruction module, and a keep-alive response module; Protocol parsing module: Parse the header fields and payload structures 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.
[0106] Feature evaluation module: Perform semantic feature analysis on the protocol types corresponding to the binary hash fingerprints, conduct 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 sequence module; 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 a metadata header of the protocol type and version number, and 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; 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 a connection handle consistent with the source node in the user-mode protocol stack, and passes the reconstructed connection handle to the keep-alive response module.
[0107] Keep-alive response module: Utilize the reconstructed protocol stack context, real-time parse the keep-alive messages of the input traffic, generate response frames that conform to the protocol specifications, return them to the client through the connection handle, and mask heartbeat timeout disconnections during the migration process.
[0108] 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 obtain a formula that is closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0109] 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.
[0110] Only some exemplary embodiments of the present invention have been 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 description are illustrative in nature and should not be construed as limiting the protection scope of the claims of the present invention.
[0111] It should be noted that in this article, if there are relational terms such as first and second, they are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such 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, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0112] As described above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims described.
Claims
1. Enterprise-level dynamic information aggregation and multi-terminal real-time push method, characterized in that: Includes steps: S1. Parse the header fields and payload structure 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; S2. Perform 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 based on the evaluation results, and perform differentiated synchronization strategy processing; S3. Serialize the grouped fingerprints and their associated session tokens and subscription tree topology into self-contained data blocks in the protocol native format, attach a metadata header of the protocol type and version number, and write them 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 in the self-contained data block from the memory mapping area, and reconstructs the connection handle consistent with the source node in the user-mode protocol stack; S5. Utilize the reconstructed protocol stack context to parse the keep-alive messages of the input traffic in real time, generate a response frame that complies with the protocol specification, and return it to the client through the connection handle, thus shielding 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 is characterized in that: Step S1 includes the following contents: Identify the type of communication protocol, parse the header field and payload structure of the communication protocol, extract the keep-alive parameters, subscription path and session identifier, splice the keep-alive parameters, subscription path and session identifier as core state elements into a byte stream, apply the hash algorithm to process the byte stream to generate a hash value, and then append the logical timestamp to the hash value to form a binary hash fingerprint. Finally, store and manage the binary hash fingerprint as the minimum synchronization unit of the connection state for subsequent processing.
3. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 2 is characterized in that: Step S2 includes the following contents: Perform semantic characteristic analysis on the protocol type corresponding to the binary hash fingerprint, determine the real-time and throughput requirements of the protocol, perform feature engineering and in-depth analysis; the feature engineering task is to extract the connection pulsation entropy index that reflects the dynamic complexity of message interaction, and the state migration dynamic potential index that reflects the dynamic importance of state changes.
4. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 3 is characterized in that: Step S2 also includes the following contents: Calculate the connection pulsation entropy index based on the dynamic complexity of message interaction of the connection; The state transition dynamic potential index is calculated based on the dynamic importance of the state changes of the connection.
5. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 4 is characterized in that: Step S2 also includes the following contents: The comprehensive coefficient is obtained by weighted summation of the connection pulsation entropy index and the state migration dynamic potential index; then, based on the comparison between the comprehensive coefficient and the preset threshold, the binary hash fingerprint is divided into a strong consistency group or a weak consistency group.
6. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 5 is characterized in that: Step S2 also includes the following contents: For the binary hash fingerprint of the strong consistency group, the Raft consensus algorithm is used to submit changes to the majority of nodes; for the binary hash fingerprint of the weak consistency group, incremental broadcast packets are used to transmit the difference status and trigger asynchronous conflict detection.
7. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 6 is characterized in that: Step S3 includes the following contents: The session token and subscription tree topology related to the connection state are extracted from the output grouped binary hash fingerprint and its group label, and the grouped binary hash fingerprint, session token and subscription tree topology are serialized into a self-contained data block according to the protocol native format. A metadata header containing the protocol type and protocol version number is appended to the self-contained data block, and the self-contained data block with the metadata header is written to the physical memory address of the target node using remote direct memory access technology.
8. The enterprise-level dynamic information aggregation and multi-terminal real-time push method according to claim 7 is characterized in that: Step S4 includes the following contents: The target node extracts the self-contained data block from the memory mapping 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-mode protocol stack and uses the five-tuple information and protocol identifier to initialize the network parameters and protocol context of the connection handle, 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-mode protocol stack and associates the session token and subscription tree topology, synchronizes the send buffer data and receive buffer data of the self-contained data block, and configures the 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 is characterized in that: Step S5 includes the following contents: The target node retrieves the connection handle from the session state table of the user-mode 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 extracts the key fields, generates the corresponding response frame based on 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-mode protocol stack, updates the keep-alive timer of the connection handle and introduces a preset grace period to adjust the heartbeat timeout threshold during the migration process to shield the risk of heartbeat timeout disconnection.
10. An enterprise-level dynamic information aggregation and multi-terminal real-time push system, used to implement the enterprise-level dynamic information aggregation and multi-terminal real-time push method according to any one of claims 1 to 9, characterized in that: include: Protocol parsing module, feature evaluation module, data sequence module, connection reconstruction module and keep-alive response module; Protocol parsing module: parses the header fields and payload structures of heterogeneous communication protocols, extracts keep-alive parameters and subscription paths, generates binary hash fingerprints carrying logical timestamps as the minimum synchronization unit of the connection state, and passes the binary hash fingerprints to the feature evaluation module; Feature evaluation module: performs semantic feature analysis on the protocol type corresponding to the binary hash fingerprint, performs feature engineering and in-depth analysis, divides the fingerprint into strong and weak consistency groups based on the evaluation results, performs differentiated synchronization strategy processing, and passes the grouped fingerprint to the data sequence module; Data sequence module: Serializes the grouped fingerprints and their associated session tokens and subscription tree topology into self-contained data blocks in the protocol native format, appends a metadata header of the protocol type and version number, writes them to the physical memory address of the target node through the RDMA memory window, and passes the self-contained data block to the connection reconstruction module; 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-mode protocol stack, and passes the reconstructed connection handle to the keep-alive response module; Keep-alive response module: Utilizes the reconstructed protocol stack context to parse the keep-alive messages of the input traffic in real time, generates response frames that comply with the protocol specifications, and returns them to the client through the connection handle, thus shielding the heartbeat timeout disconnection 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
Internet of Things middleware system design method supporting edge heterogeneous device access
CN118368323A
Decentralized copy control method for distributed database
CN119311769A
Railway office system heterogeneous database integration method based on data conversion technology
CN119357271A
Cited By
Multi-protocol dynamic adaptation and session management method based on TCP / IP
CN121547517A