A mimetic bracket component and mimetic system for heterogeneous networks
By setting the identification for the data packet and using the cache list and counting the number of packets received, the problems of high packet-by-packet comparison verification resource consumption and slow abnormal detection in heterogeneous networks are solved, and efficient data flow mimicry processing and security improvement are achieved.
Patent Information
- Application Number
- CN202310526817.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-05-11
AI Technical Summary
In heterogeneous networks, the prior art consumes too much resources during packet-by-packet comparison verification and is susceptible to network delays and attacks, resulting in low verification efficiency and inability to detect abnormal situations in time.
The mimicry bracket component is adopted to add and delete identifiers to the data packets, use the data cache list and count the number of packets received, and realize packet-by-packet detection of the data packets on the adjudicator side, avoid waiting for other data packets to conduct traditional rulings, and detect abnormalities in a timely manner based on the identifier.
Without affecting the original tcp/udp traffic transmission, processing resources are saved, packet-by-packet comparison verification efficiency is improved, abnormal situations are detected and handled in a timely manner, and the security of heterogeneous networks and the efficiency of data flow mimicking is improved.
Smart Images

Figure CN116668531B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mimicry defense, and in particular to a mimicry bracket component and a mimicry system for heterogeneous networks. Background Art
[0002] Subnet heterogeneity is an application scenario of mimicry defense technology. Under the action of the mimicry distributor, the data stream constructs multiple groups of identical data packets and sends them to local area networks with different topologies for transmission, and finally converges. After being forwarded by local area networks with different topologies, the converged data packets should theoretically remain consistent. In this way, when a certain path is attacked, data is tampered with, or other abnormal behaviors occur, the arbiter can detect the anomaly by comparing and analyzing the received data stream packet by packet.
[0003] However, because heterogeneous subnets are not virtual switching networks built in a purely virtual space, but rather a mimetic transformation of a physical network (local area network), each device within the LAN has its own unique IP address and MAC address and is likely to be concurrently performing other non-mimetic tasks. Therefore, packets sent by each device within the LAN must use the standard IP packet format, whose header includes the source address, destination address, and header checksum. This results in packets distributed by the mimetic distributor to different LANs being different; at least the source IP address on the sender must be different. Therefore, when using traditional data comparison and arbitration methods, the arbiter must first strip the header from the packet before arbitrating the clean data blocks, consuming more processing resources. Furthermore, due to the common asynchrony caused by network latency during actual transmission, packets may arrive at the arbiter out of the order in which they were sent. Consequently, the arbiter also consumes a large amount of memory to store unarbitrated packets. Therefore, improving the efficiency of packet-by-packet comparison and verification to ensure timely data forwarding without impacting existing TCP / UDP traffic is crucial.
[0004] Furthermore, during actual transmission, packet loss can easily occur due to network conditions. This can result in only some LAN packets reaching the aggregation side, while the aggregation side waits for packets from other LANs, impacting the efficiency of packet-by-packet verification. Furthermore, during actual transmission, individual LANs can be vulnerable to man-in-the-middle attacks, forging data and sending it to the aggregation side. In this case, the aggregation side also wastes significant time waiting for packets from other LANs. Therefore, timely detection of line transmission anomalies is crucial for improving the efficiency of packet-by-packet verification.
[0005] In order to solve the above problems, people have been seeking an ideal technical solution. Summary of the Invention
[0006] The purpose of the present invention is to address the deficiencies of the prior art and thus provide a mimetic bracket component and a mimetic system for heterogeneous networks.
[0007] In order to achieve the above-mentioned object, the technical solution adopted by the present invention is to provide a mimetic bracket component for heterogeneous networks, including an input agent and a arbitrator;
[0008] The input agent includes:
[0009] A first identification strategy selection module is used to select an identification adding strategy according to the service type of the data packet;
[0010] a data packet replication module, configured to perform identification adding processing on the data packet according to the identification adding strategy selected by the first identification strategy selection module, and to replicate the processed data packet into multiple copies and send the copies to the arbitrator via different heterogeneous networks;
[0011] The arbiter comprises:
[0012] A second identification strategy selection module is used to select an identification deletion strategy according to the service type of the data packet;
[0013] a data caching module, configured to perform identification deletion processing on data packets according to the identification deletion policy selected by the second identification policy selection module, and cache the processed data packets; and further comprising a built-in data cache list, wherein each list element stores a data processing status indexed by the data packet identification, the data processing status including: the time of last receiving a data packet with the identification and a count of the number of packet receptions across all heterogeneous networks;
[0014] The data comparison module is used to use the identifier of the data packet as a keyword to check whether there is a list element containing the identifier in the data cache list; if not, a new list element is created to record the identifier of the data packet, the reception time of the data packet and the number of packet reception times of the heterogeneous network receiving the data packet, and discard the data packet; if it exists, the number of packet reception times of all heterogeneous networks in the list element is checked, and according to the number of packet reception times of all heterogeneous networks, the data packet is discarded or forwarded through the data forwarding module.
[0015] In one embodiment of the present invention, selecting an identifier adding strategy according to a service type of a data packet includes: when the service type of the data packet is an http service, selecting an identifier adding strategy as adding a unique identifier to a data field of the data packet;
[0016] Selecting the identifier deletion strategy according to the service type of the data packet includes: when the service type of the data packet is http service, the selected identifier deletion strategy is to delete the unique identifier from the data field of the data packet.
[0017] Specifically, processing the data packet according to the identifier adding strategy selected by the first identifier strategy selection module includes: generating a unique identifier according to the current time, and adding the unique identifier as an identifier field to the data field of the TCP / UDP data packet;
[0018] Processing the data packet according to the identification deletion policy selected by the second identification policy selection module includes: reading the data field of the data packet to obtain a unique identifier as the identification field, and deleting the identification field in the data field of the TCP / UDP data packet.
[0019] In one embodiment of the present invention, when there are three heterogeneous networks, when the data comparison module discards the data packet or forwards the data packet through the data forwarding module based on the packet reception count of all heterogeneous networks, the following steps are executed:
[0020] Determine whether there are at least two heterogeneous networks with non-zero packet reception counts;
[0021] If not, the number of times the heterogeneous network receives the current data packet is counted plus 1, and it is determined again whether the number of times the heterogeneous network receives the current data packet is non-zero. If the number of times the heterogeneous network receives the current data packet is non-zero, the data packet is forwarded through the data forwarding module; otherwise, the data packet is discarded.
[0022] If so, further determine whether the packet reception counts of the two heterogeneous networks are non-zero;
[0023] If the packet reception counts of the two heterogeneous networks are non-zero, then determine whether the packet reception count of the heterogeneous network receiving the current data packet is non-zero. If the packet reception count of the heterogeneous network of the current data packet is zero, then decrement the packet reception counts of the remaining lines by 1 and then determine whether the packet reception counts of the three lines are all zero. If they are all zero, release the element and discard the data packet. If the packet reception count of the heterogeneous network of the current data packet is non-zero, then determine whether the packet reception count belongs to the middle value of the packet reception counts of the three heterogeneous networks. If it is the middle value, forward the data packet through the data forwarding module and increase the packet reception count of the heterogeneous network by 1. Otherwise, discard the data packet.
[0024] If the packet reception counts of more than two heterogeneous networks are non-zero, the packet reception count of the heterogeneous network that receives the current data packet is increased by 1, and the packet reception counts of the three heterogeneous networks are all reduced by 1, and then the data packet is discarded.
[0025] In one embodiment of the present invention, the arbiter is further provided with an error filtering module and a system message notification module;
[0026] The error filtering module is configured to periodically check the elements in the data cache list, and when the current time minus the time of the last received data packet with the identifier is greater than the time threshold T1, check whether the packet reception counts of all heterogeneous networks are non-zero; if the packet reception port count of one heterogeneous network is non-zero, it is determined that the heterogeneous network has received an error packet; if the packet reception port counts of two heterogeneous networks are non-zero, it is determined that the third heterogeneous network has packet loss;
[0027] The system message notification module is configured to actively send error log messages using the UDP connectionless protocol, and send them to the receiving terminal for processing according to the IP and port configured by the user.
[0028] The present invention also provides a mimicry system for heterogeneous networks, comprising:
[0029] The client is connected to the mimetic bracket component 1 and is used to send request data packets and receive response data packets through the mimetic bracket component;
[0030] A server, connected to the mimetic bracket component II, configured to receive the request data packet and send the response data packet through the mimetic bracket component II, wherein the response data packet is generated by the server according to the request data packet;
[0031] The mimetic bracket component I is the aforementioned mimetic bracket component, connected to multiple heterogeneous networks, and is used to add an identifier I to the request data packet sent by the client, and copy the request data packet with the identifier I added to multiple copies and send them to different heterogeneous networks; and after receiving the response data packet transmitted by each heterogeneous network, perform a discard or forwarding operation on the response data packet according to the identifier II of the response data packet and the information of the built-in data cache list, and update the count status of the unforwarded data packets in the data cache list;
[0032] The mimetic bracket component II is the aforementioned mimetic bracket component, which is connected to multiple heterogeneous networks and servers respectively, and is used to, after receiving the request data packet transmitted by each heterogeneous network, perform a discard or forwarding operation on the request data packet according to the identifier I of the request data packet and the information of the built-in data cache list, and update the counting status of the unforwarded data packets in the data cache list; and add the identifier II to the response data packet sent by the server, and copy the response data packet with the identifier II added to multiple copies and send them to different heterogeneous networks.
[0033] The present invention has outstanding substantive features and significant progress. Specifically, without affecting the original TCP / UDP traffic transmission, the present invention copies a data packet by setting an identifier for the data packet. After forwarding through multiple heterogeneous networks, the arbiter performs packet-by-packet detection and determines whether to discard the data packet or forward the data packet through a data forwarding module by checking the packet reception counts of all heterogeneous networks. There is no need to wait for other data packets to perform traditional arbitration, so there is no need to consume a large amount of memory to store unarbitrated data packets. In addition, since there is no need to first strip the first packet portion of the data packet and then adjudicate the pure data block, processing resources are further saved. In this way, even if an abnormal situation such as packet loss or data tampering occurs on a certain line, the arbiter can restore multiple identical data packets into one data packet based on the identifier and forward the data in a timely manner, expanding the specific implementation methods of distribution and arbitration in the data flow mimicry process.
[0034] In addition, the arbiter can also detect line transmission anomalies in a timely manner based on the packet reception counts of all heterogeneous networks, and provide prompt information required to eliminate security risks, thereby improving the security of heterogeneous networks and further improving the efficiency of packet-by-packet comparison and verification.
[0035] The present invention is applied in a data transmission line using a heterogeneous network, and also adopts a DPDK high-speed packet receiving and sending mode, dividing the mimic bracket component into a control plane and a data plane for separate implementation, so that the line has a certain service access bandwidth. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 2 is a schematic diagram of the structure of the mimetic bracket component in Example 1 of the present invention.
[0037] Figure 2 3 is a flow chart of the data comparison module in Example 3 of the present invention.
[0038] Figure 3 Schematic diagram of the structure of the mimetic bracket component in Example 4 of the present invention.
[0039] Figure 4 It is a structural diagram of the mimetic system for heterogeneous networks in Example 5 of the present invention. DETAILED DESCRIPTION
[0040] The technical solution of the present invention is further described in detail below through specific implementation methods.
[0041] Example 1
[0042] This embodiment provides a mimetic bracket component for heterogeneous networks, including an input agent and a arbitrator.
[0043] Such as Figure 1 As shown, the input agent includes:
[0044] A first identification strategy selection module is used to select an identification adding strategy according to the service type of the data packet;
[0045] a data packet replication module, configured to perform identification adding processing on the data packet according to the identification adding strategy selected by the first identification strategy selection module, and to replicate the processed data packet into multiple copies and send the copies to the arbitrator via different heterogeneous networks;
[0046] The arbiter comprises:
[0047] A second identification strategy selection module is used to select an identification deletion strategy according to the service type of the data packet;
[0048] a data caching module, configured to perform identification deletion processing on data packets according to the identification deletion policy selected by the second identification policy selection module, and cache the processed data packets; and further comprising a built-in data cache list, wherein each list element stores a data processing status indexed by the data packet identification, the data processing status including: the time of last receiving a data packet with the identification and a count of the number of packet receptions across all heterogeneous networks;
[0049] The data comparison module is used to use the identifier of the data packet as a keyword to check whether there is a list element containing the identifier in the data cache list; if not, a new list element is created to record the identifier of the data packet, the reception time of the data packet and the number of packet reception times of the heterogeneous network receiving the data packet, and discard the data packet; if it exists, the number of packet reception times of all heterogeneous networks in the list element is checked, and according to the number of packet reception times of all heterogeneous networks, the data packet is discarded or forwarded through the data forwarding module.
[0050] It can be seen that the present invention, without affecting the original TCP / UDP traffic transmission, copies a data packet by setting an identifier for the data packet. After forwarding through multiple heterogeneous networks, packet-by-packet detection is performed on the arbiter side. By checking the packet reception counts of all heterogeneous networks, it is determined whether to discard the data packet or forward the data packet through the data forwarding module. There is no need to wait for other data packets to perform traditional arbitration, so there is no need to consume a large amount of memory to store unarbitrated data packets; and since there is no need to first strip off the first packet part of the data packet and then adjudicate the pure data block, processing resources are further saved; in this way, even if an abnormal situation occurs in a certain line, such as packet loss or data tampering, the arbiter can restore multiple identical data packets into one data packet according to the identifier, and forward the data in time, expanding the specific implementation path of distribution and arbitration in the data flow mimicry process.
[0051] Furthermore, in this embodiment, the input agent includes a control plane and a data plane, the first identification strategy selection module is located in the control plane of the input agent, and the data packet replication module is located in the data plane of the input agent. Similarly, the arbiter includes a control plane and a data plane, the second identification strategy selection module is located in the control plane of the arbiter, and the data cache module, the data comparison module, and the data forwarding module are all located in the data plane of the arbiter. By separating the mimetic bracket component into a control plane and a data plane, a certain service access bandwidth is achieved in different heterogeneous networks.
[0052] Example 2
[0053] This embodiment provides a specific implementation method, in which the first identification strategy selection module selects an identification adding strategy according to the service type of the data packet, including: when the service type of the data packet is http service, the selected identification adding strategy is to add a unique identifier to the data field of the data packet; the second identification strategy selection module selects an identification deletion strategy according to the service type of the data packet, including: when the service type of the data packet is http service, the selected identification deletion strategy is to delete the unique identifier from the data field of the data packet.
[0054] It's understandable that without a unique identifier, if packets with the same checksum appear within a certain time period, only the first packet in that time period will be forwarded, and the remaining packets will be discarded. Adding a unique identifier prevents packets with the same checksum from appearing within a certain time period, but the downside is reduced system efficiency. Therefore, whether or not to add a unique identifier can be manually set.
[0055] In specific implementation, when the business type of the data packet is not HTTP business, the selected identification adding strategy is not to add the unique identifier; correspondingly, the selected identification deletion strategy is not to delete the unique identifier. When performing comparison, the TCP / UDP checksum checkum field in the data packet is used as the identification field.
[0056] Furthermore, the data packet replication module processes the data packet according to the identifier adding strategy selected by the first identifier strategy selection module, including: generating a unique identifier according to the current time, and adding the unique identifier as an identifier field to the data field of the TCP / UDP data packet.
[0057] It is understandable that generating an identifier based on the current time can ensure the uniqueness and non-replicability of the identifier, thereby ensuring that data packets with the same identifier are identified as the same data packet before the ruling, which facilitates the ruling;
[0058] Because the purpose of the unique identifier is to facilitate comparison and adjudication by the arbitrator, the unique identifier must be deleted after the arbitrator completes the comparison and adjudication. Specifically, the data cache module performs the identifier deletion operation. Specifically, the data cache module processes the data packet according to the identifier deletion policy selected by the second identifier policy selection module, including: reading the data field of the data packet to obtain the unique identifier as the identification field, and deleting the identification field in the data field of the TCP / UDP packet.
[0059] Example 3
[0060] This embodiment takes three heterogeneous networks as an example. Figure 3 As shown, specific steps are given for the data comparison module to discard the data packet or forward the data packet through the data forwarding module according to the number of packet reception times of all heterogeneous networks.
[0061] Specifically, when a list element containing the unique identifier exists in the data cache list, the packet reception counts of all heterogeneous networks in the list element are checked to determine whether the packet reception counts of at least two heterogeneous networks are non-zero; wherein the list element is expressed in the form of: {key_value, time, [fir_net, sec_net, thr_net]}, wherein key_value is an identifier, time represents the time of the last reception of a data packet with the keyword being key_value, and [fir_net, sec_net, thr_net] represents the port count of each line;
[0062] If not, the number of times the heterogeneous network receives the current data packet is counted by 1, and it is determined again whether the number of times the heterogeneous network receives the current data packet is non-zero. If the number of times the heterogeneous network receives the current data packet is non-zero, it is determined that the current data packet is the second data packet in the same group of data packets with a unique identifier. At this time, the data packet is forwarded through the data forwarding module. Otherwise, it is determined that the network is abnormal and the data packet is discarded.
[0063] If so, further determine whether the packet reception counts of the two heterogeneous networks are non-zero;
[0064] If the packet reception counts of the two heterogeneous networks are non-zero, then determine whether the packet reception count of the heterogeneous network that receives the current data packet is non-zero. If the packet reception count of the heterogeneous network of the current data packet is zero, then decrement the packet reception counts of the remaining lines by 1 and then determine whether the packet reception counts of the three lines are all zero. If they are all zero, then determine that the current data packet is the third data packet in the same group of data packets with a unique identifier. At this time, release the element and discard the data packet. If the packet reception count of the heterogeneous network of the current data packet is non-zero, then determine whether the packet reception count belongs to the middle value of the packet reception counts of the three heterogeneous networks. If it is the middle value, then determine that the current data packet is the second data packet in the same group of data packets with a unique identifier, forward the data packet through the data forwarding module, and increase the packet reception count of the heterogeneous network by 1. Otherwise, discard the data packet.
[0065] If the packet reception counts of more than two heterogeneous networks are non-zero, the packet reception count of the heterogeneous network that receives the current data packet is increased by 1, and the packet reception counts of the three heterogeneous networks are all reduced by 1, and then the data packet is discarded.
[0066] The above steps given in this embodiment can quickly restore multiple identical data packets into one data packet without stripping the first packet part of the data packet, forward the data in a timely manner, and expand the specific implementation methods of distribution and arbitration in the data stream mimicry process.
[0067] Example 4
[0068] The difference between this embodiment and embodiment 1 is that:
[0069] like Figure 3 As shown, the arbiter is also provided with an error filtering module and a system message notification module;
[0070] The error filtering module is configured to periodically check the elements in the data cache list, and when the current time minus the time of the last received data packet with the identifier is greater than the time threshold T1, check whether the packet reception counts of all heterogeneous networks are non-zero; if the packet reception port count of one heterogeneous network is non-zero, it is determined that the heterogeneous network has received an error packet; if the packet reception port counts of two heterogeneous networks are non-zero, it is determined that the third heterogeneous network has packet loss;
[0071] The system message notification module is configured to actively send error log messages using the UDP connectionless protocol, and send them to the receiving terminal for processing according to the IP and port configured by the user.
[0072] Specifically, the error types that occur on each line include packet loss and received error packets, wherein received error packets refer to receiving a data packet sent by a non-input agent, and packet loss refers to not receiving a data packet sent by an input agent within a set time.
[0073] Therefore, for three lines, a total of six error counts are defined. Specifically, based on the principle that simultaneous problems on multiple lines are a low-probability event, if the port count of a line is non-zero, it is determined that the line has received an error packet. For example, if line 1 receives a packet with a certain identifier, and lines 2 and 3 do not receive packets with the same identifier within a set time, line 1 is considered to have received an error packet. If the port counts of two lines are non-zero, packet loss is determined to have occurred on the third line. For example, if lines 2 and 3 receive packets with the same identifier within a set time, and line 1 times out and fails to receive the packet with the same identifier, line 1 is considered to have experienced packet loss.
[0074] Furthermore, in order to improve the accuracy of detection, the error filtering module is also used to accumulate the number of times packet loss or error packets are received in each heterogeneous network, and issue an alarm when the count of an error exceeds the threshold N1 within the time threshold T2.
[0075] It can be seen that in this implementation, the arbiter can also detect line transmission anomalies such as packet loss and third-party injection of data packets in a timely manner based on the packet reception counts of all heterogeneous networks, and provide prompt information required to eliminate security risks, thereby improving the security of heterogeneous networks and further improving the efficiency of packet-by-packet comparison and verification.
[0076] Example 5
[0077] This embodiment provides a mimicry system for heterogeneous networks, such as Figure 4 Shown, including:
[0078] The client is connected to the mimetic bracket component 1 and is used to send request data packets and receive response data packets through the mimetic bracket component;
[0079] A server, connected to the mimetic bracket component II, configured to receive the request data packet and send the response data packet through the mimetic bracket component II, wherein the response data packet is generated by the server according to the request data packet;
[0080] The mimetic bracket component I is the mimetic bracket component described in any one of Examples 1-4, connected to multiple heterogeneous networks, and configured to add an identifier I to the request data packet sent by the client, and copy the request data packet with the identifier I added to multiple copies and send them to different heterogeneous networks; and after receiving the response data packet transmitted by each heterogeneous network, perform a discard or forwarding operation on the response data packet according to the identifier II of the response data packet and the information of the built-in data cache list, and update the count status of the unforwarded data packets in the data cache list;
[0081] The mimetic bracket component II is the mimetic bracket component described in any one of Examples 1-4, which is connected to multiple heterogeneous networks and servers respectively, and is used to, after receiving the request data packet transmitted by each heterogeneous network, perform a discard or forwarding operation on the request data packet according to the identifier I of the request data packet and the information of the built-in data cache list, and update the counting status of the unforwarded data packets in the data cache list; and add the identifier II to the response data packet sent by the server, and copy the response data packet with the identifier II added to multiple copies and send them to different heterogeneous networks.
[0082] Furthermore, after the mimetic bracket component I performs a discard or forwarding operation on the request data packet, it updates the count status of the unforwarded request data packets in the data cache list; and periodically checks and ages the data in the built-in data cache list, and issues an alarm message when the number of timed-out and unforwarded data packets in a certain heterogeneous network exceeds a threshold;
[0083] After performing the discard or forwarding operation on the response data packet, the mimetic bracket component II updates the count status of the unforwarded response data packets in the data cache list; and periodically checks and ages the data in the built-in data cache list, and issues an alarm message when the number of timed-out and unforwarded data packets in a certain heterogeneous network exceeds a threshold.
[0084] Furthermore, both the simulated bracket component I and the simulated bracket component II use the DPDK high-speed packet transceiver mode. DPDK is a packet transceiver driver that can reach line speeds compared to the operating system's libpcap packet transceiver mode. When applied to HTTP transmission, using DPDK does not affect the opening of web pages.
[0085] Example 6
[0086] This embodiment takes TCP access from a client to a server as an example to describe in detail the workflow of the heterogeneous network-oriented mimicry system described in Example 5. In this workflow, data packets go through distribution, subnet forwarding, and arbitration processes in sequence to complete the link establishment process and data access on the server. The specific description is as follows:
[0087] The client initiates a TCP link establishment request TCP SYN packet;
[0088] The mimetic bracket component I generates an identifier I, adds the identifier I to the TCP SYN packet, and copies the TCP SYN packet to different heterogeneous networks;
[0089] The mimetic bracket component II, after receiving a TCP SYN packet transmitted over a heterogeneous network, determines whether to discard or forward the TCP SYN packet according to an identifier of the TCP SYN packet and information in a built-in data cache list, and updates a count of unforwarded data packets in the data cache list;
[0090] The server responds after receiving the TCP SYN packet forwarded by the mimetic bracket component II, generates a SYN+ACK packet and returns it to the mimetic bracket component II;
[0091] The mimetic bracket component II generates an identifier II, adds the identifier II to the syn+ack packet, and copies multiple copies to send to different heterogeneous networks;
[0092] The mimetic bracket component I, after receiving the syn+ack packet transmitted by the heterogeneous network, determines whether to discard or forward the syn+ack packet according to the information of the syn+ack packet and the built-in data cache list, and updates the count status of the unforwarded data in the data cache list;
[0093] The client receives the syn+ack packet forwarded by the mimetic bracket component 1;
[0094] At this point, a two-way communication process has been completed. Similarly, the client and the server establish a TCP link and subsequently access data resources.
[0095] It can be understood that this method, without affecting the original TCP / UDP traffic transmission, copies the data packet into multiple copies by setting an identifier for the data packet. After forwarding through multiple subnets, packet-by-packet detection is performed on the aggregation side. At this time, data packets with the same identifier are identified as the same data packet. Therefore, when an abnormality occurs on a certain line, such as packet loss or data tampering, the aggregation side can detect the line transmission abnormality in time according to the identifier, and provide the prompt information required to eliminate security risks, thereby improving the security of heterogeneous networks.
[0096] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A mimetic bracket component for heterogeneous networks, characterized in that: Includes input agent and arbitrator; The input agent includes: A first identification strategy selection module is used to select an identification adding strategy according to the service type of the data packet; a data packet replication module, configured to perform identification adding processing on the data packet according to the identification adding strategy selected by the first identification strategy selection module, and to replicate the processed data packet into multiple copies and send the copies to the arbitrator via different heterogeneous networks; The arbiter comprises: A second identification strategy selection module is used to select an identification deletion strategy according to the service type of the data packet; a data caching module, configured to perform identification deletion processing on data packets according to the identification deletion policy selected by the second identification policy selection module, and cache the processed data packets; and further comprising a built-in data cache list, wherein each list element stores a data processing status indexed by the data packet identification, the data processing status including: the time of last receiving a data packet with the identification and a count of the number of packet receptions across all heterogeneous networks; The data comparison module is used to use the identifier of the data packet as a keyword to check whether there is a list element containing the identifier in the data cache list; if not, a new list element is created to record the identifier of the data packet, the reception time of the data packet and the number of packet reception times of the heterogeneous network receiving the data packet, and discard the data packet; if it exists, the number of packet reception times of all heterogeneous networks in the list element is checked, and according to the number of packet reception times of all heterogeneous networks, the data packet is discarded or forwarded through the data forwarding module.
2. The heterogeneous network-oriented mimetic bracket component according to claim 1, characterized in that: Selecting an identifier adding strategy according to the service type of the data packet includes: when the service type of the data packet is HTTP service, the selected identifier adding strategy is to add a unique identifier to the data field of the data packet; Selecting the identifier deletion strategy according to the service type of the data packet includes: when the service type of the data packet is http service, the selected identifier deletion strategy is to delete the unique identifier from the data field of the data packet.
3. The heterogeneous network-oriented mimetic bracket component according to claim 2, characterized in that: Processing the data packet according to the identifier adding strategy selected by the first identifier strategy selection module, including: generating a unique identifier according to the current time, and adding the unique identifier as an identifier field to the data field of the TCP / UDP data packet; Processing the data packet according to the identification deletion policy selected by the second identification policy selection module includes: reading the data field of the data packet to obtain a unique identifier as the identification field, and deleting the identification field in the data field of the TCP / UDP data packet.
4. The heterogeneous network-oriented mimetic bracket component according to claim 1, characterized in that: When there are three heterogeneous networks, the data comparison module discards the data packet or forwards the data packet through the data forwarding module according to the packet reception times counted for all heterogeneous networks, and executes: Determine whether there are at least two heterogeneous networks with non-zero packet reception counts; If not, the number of times the heterogeneous network receives the current data packet is counted plus 1, and it is determined again whether the number of times the heterogeneous network receives the current data packet is non-zero. If the number of times the heterogeneous network receives the current data packet is non-zero, the data packet is forwarded through the data forwarding module; otherwise, the data packet is discarded. If so, further determine whether the packet reception counts of the two heterogeneous networks are non-zero; If the packet reception counts of the two heterogeneous networks are non-zero, then determine whether the packet reception count of the heterogeneous network receiving the current data packet is non-zero. If the packet reception count of the heterogeneous network of the current data packet is zero, then decrement the packet reception counts of the remaining lines by 1 and then determine whether the packet reception counts of the three lines are all zero. If they are all zero, release the element and discard the data packet. If the packet reception count of the heterogeneous network of the current data packet is non-zero, then determine whether the packet reception count belongs to the middle value of the packet reception counts of the three heterogeneous networks. If it is the middle value, forward the data packet through the data forwarding module and increase the packet reception count of the heterogeneous network by 1. Otherwise, discard the data packet. If the packet reception counts of more than two heterogeneous networks are non-zero, the packet reception count of the heterogeneous network that receives the current data packet is increased by 1, and the packet reception counts of the three heterogeneous networks are all reduced by 1, and then the data packet is discarded.
5. The heterogeneous network-oriented mimetic bracket component according to claim 1, characterized in that: The arbiter is also provided with an error filtering module and a system message notification module; The error filtering module is configured to periodically check the elements in the data cache list, and when the current time minus the time of the last received data packet with the identifier is greater than the time threshold T1, check whether the packet reception counts of all heterogeneous networks are non-zero; if the packet reception port count of a heterogeneous network is non-zero, it is determined that the heterogeneous network has received an error packet; If the packet receiving port counts of two heterogeneous networks are non-zero, it is determined that packet loss occurs in the third heterogeneous network; The system message notification module is configured to actively send error log messages using the UDP connectionless protocol, and send them to the receiving terminal for processing according to the IP and port configured by the user.
6. The heterogeneous network-oriented mimetic bracket component according to claim 5, characterized in that: The error filtering module is further configured to accumulate the number of times packets are lost or received in each heterogeneous network, and issue an alarm when the count of a certain error exceeds a threshold N1 within a time threshold T2.
7. The heterogeneous network-oriented mimetic bracket component according to claim 1, characterized in that: The input agent includes a control plane and a data plane, the first identification strategy selection module is located in the control plane of the input agent, and the data packet replication module is located in the data plane of the input agent; The arbiter includes a control plane and a data plane. The second identification strategy selection module is located in the control plane of the arbiter. The data cache module, the data comparison module and the data forwarding module are all located in the data plane of the arbiter.
8. A mimicry system for heterogeneous networks, characterized in that: include: The client is connected to the mimetic bracket component 1 and is used to send request data packets and receive response data packets through the mimetic bracket component; A server, connected to the mimetic bracket component II, configured to receive the request data packet and send the response data packet through the mimetic bracket component II, wherein the response data packet is generated by the server according to the request data packet; The mimetic bracket component I is the mimetic bracket component according to any one of claims 1 to 7, connected to multiple heterogeneous networks, and configured to add an identifier I to the request data packet sent by the client, and to copy the request data packet with the identifier I added thereto into multiple copies and send them to different heterogeneous networks; After receiving the response data packet transmitted by each heterogeneous network, the system discards or forwards the response data packet according to the identifier II of the response data packet and the information of the built-in data cache list, and updates the count status of the unforwarded data packets in the data cache list; A mimetic bracket component II, which is the mimetic bracket component according to any one of claims 1 to 7, is respectively connected to multiple heterogeneous networks and a server, and is configured to, after receiving the request data packet transmitted by each heterogeneous network, discard or forward the request data packet according to the identifier I of the request data packet and the information of the built-in data cache list, and update the count status of the unforwarded data packets in the data cache list; And add an identifier II to the response data packet sent by the server, and copy the response data packet with the identifier II added into multiple copies and send them to different heterogeneous networks.
9. The heterogeneous network-oriented mimicry system according to claim 8, characterized in that: After performing a discard or forwarding operation on the request data packet, the mimetic bracket component I updates the count status of the unforwarded request data packets in the data cache list; and periodically checks and ages the data in the built-in data cache list, and issues an alarm message when the number of timed-out and unforwarded data packets in a certain heterogeneous network exceeds a threshold; After performing the discard or forwarding operation on the response data packet, the mimetic bracket component II updates the count status of the unforwarded response data packets in the data cache list; and periodically checks and ages the data in the built-in data cache list, and issues an alarm message when the number of timed-out and unforwarded data packets in a certain heterogeneous network exceeds a threshold.
10. The heterogeneous network-oriented mimicry system according to claim 8 or 9, characterized in that: The mimetic bracket component I and the mimetic bracket component II both adopt the dpdk high-speed packet receiving and sending mode.
Citation Information
Patent Citations
Service system simulation method and device
CN110580225A
Distributed decision method, distributed decision system and mimicry construction architecture
CN111800385A