Data packet transmission control method and device, computer readable medium and equipment

By calculating the hash value of the data packet at the receiving end and looking for duplicate data packets in the hash value storage space, the memory usage and bandwidth waste caused by repeated packet transmission in multi-network aggregation or multiple-transmission selection and reception technology is solved, and more efficient data transmission is achieved.

CN119652987APending Publication Date: 2025-03-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311200175.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Although multi-network aggregation or multiple-transmission selection and collection technology can improve the stability of network transmission in cloud gaming scenarios, the same data packet needs to be divided into multiple transmissions, resulting in the storage of data packet information occupying a large memory space, affecting the performance of network equipment.

Method used

By receiving packets sent by the data source through multiple transmission paths, the hash value of the data packet is calculated and duplicate packets are found in the hash value storage space. If duplicate packets are found, they will be discarded; if not found, the hash value is stored and the data packet is transmitted to reduce the stored and transmitted duplicate packets.

Benefits of technology

The memory space occupied by storing received data packet information is reduced, the bandwidth occupied by network transmission is reduced, network congestion is reduced, and data transmission efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652987A_ABST
    Figure CN119652987A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data packet transmission control method and device, a computer readable medium and equipment. The transmission control method comprises the following steps: receiving data packets respectively sent by a data source through a plurality of transmission paths; calculating a hash value corresponding to the data packet according to the packet information of the received data packet; if the Hash value corresponding to the data packet is found in a Hash value storage space, the data packet is discarded, and the Hash value storage space is used for storing the Hash value corresponding to the received data packet; and if the hash value corresponding to the data packet is not found in the hash value storage space, storing the hash value corresponding to the data packet in the hash value storage space, and transmitting the data packet to a downstream service. According to the technical scheme provided by the embodiment of the invention, on the premise of discarding repeated data packets and reducing bandwidth occupied by network transmission, the memory space occupied by storing the information of the received data packets can be reduced, and the data transmission efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer and communication technology, and in particular to a method, device, computer-readable medium and equipment for controlling the transmission of data packets. Background Art

[0002] In related technologies, multi-network aggregation or multi-transmission selective reception technology can be used to improve the stability of network transmission. For example, in cloud gaming scenarios, multi-network aggregation or multi-transmission selective reception technology can be used to achieve optimal packet loss, optimal latency, or optimal jitter to ensure the stable operation of cloud gaming services. However, since multi-network aggregation or multi-transmission selective reception technology will divide the same data packet into multiple transmissions, this will occupy a large amount of memory space due to the storage of data packet information, affecting the performance of network devices (such as switches, gateway devices, etc.). Summary of the invention

[0003] The embodiments of the present application provide a data packet transmission control method, apparatus, computer-readable medium and device, which can reduce the memory space occupied by storing information of received data packets while discarding duplicate data packets to reduce the bandwidth occupied by network transmission, thereby improving data transmission efficiency.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0005] In a first aspect, an embodiment of the present application provides a method for controlling the transmission of a data packet, comprising: receiving data packets sent by a data source respectively through multiple transmission paths; calculating a hash value corresponding to the data packet based on packet information of the received data packet; if the hash value corresponding to the data packet is found in a hash value storage space, discarding the data packet, the hash value storage space being used to store the hash value corresponding to the received data packet; if the hash value corresponding to the data packet is not found in the hash value storage space, storing the hash value corresponding to the data packet in the hash value storage space, and transmitting the data packet to a downstream service.

[0006] In a second aspect, an embodiment of the present application provides a data packet transmission control device, comprising: a receiving unit, configured to receive data packets sent by a data source through multiple transmission paths respectively; a calculating unit, configured to calculate a hash value corresponding to the data packet based on packet information of the received data packet; a processing unit, configured to discard the data packet if the hash value corresponding to the data packet is found in a hash value storage space, the hash value storage space being used to store the hash value corresponding to the received data packet; if the hash value corresponding to the data packet is not found in the hash value storage space, the hash value corresponding to the data packet is stored in the hash value storage space, and the data packet is transmitted to a downstream service.

[0007] In a third aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for controlling transmission of data packets as described in the above embodiments is implemented.

[0008] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the data packet transmission control method as described in the above embodiments.

[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the transmission control method of a data packet provided in the above-mentioned various optional embodiments.

[0010] In the technical solutions provided by some embodiments of the present application, when receiving a data packet sent by a data source through multiple transmission paths, the hash value corresponding to the data packet is calculated according to the packet information of the received data packet, and then the hash value corresponding to the data packet is searched in the hash value storage space for storing the hash value corresponding to the received data packet based on the hash value corresponding to the data packet, so that when the hash value corresponding to the data packet is found in the hash value storage space, the received data packet is discarded, so that the memory space occupied by the information storing the received data packet can be reduced by the hash value, and the bandwidth occupied by the network transmission can be reduced by discarding the duplicate data packets, which is conducive to reducing network congestion and improving data transmission efficiency. When the hash value corresponding to the data packet is not found in the hash value storage space, the hash value corresponding to the data packet is stored in the hash value storage space, and the data packet is transmitted to the downstream service, so that the hash value corresponding to the received data packet can be stored in the hash value storage space, so as to facilitate the subsequent duplication judgment of the data packet, and the non-duplicate data packet can be transmitted to the downstream service, so as to ensure that the data packets received by the downstream service are all non-duplicate data packets, reducing the burden of the downstream service to process duplicate data packets.

[0011] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram showing the processing method of the multiple transmission and selective reception technology is shown;

[0013] Figure 2 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;

[0014] Figure 3 A flow chart showing a method for controlling transmission of a data packet according to an embodiment of the present application is shown;

[0015] Figure 4 A flow chart showing a method for controlling transmission of a data packet according to an embodiment of the present application is shown;

[0016] Figure 5 A flowchart of removing duplicate packets by a multi-network aggregation gateway according to an embodiment of the present application is shown;

[0017] Figure 6 A block diagram of a data packet transmission control device according to an embodiment of the present application is shown;

[0018] Figure 7 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0019] The exemplary embodiments are now described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be understood as being limited to these examples; on the contrary, the purpose of providing these embodiments is to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.

[0020] In addition, the features, structures or characteristics described in the present application may be combined in one or more embodiments in any suitable manner. In the following description, there are many specific details so that the embodiments of the present application can be fully understood. However, those skilled in the art will appreciate that when implementing the technical scheme of the present application, all the detailed features in the embodiments may not be needed, one or more specific details may be omitted, or other methods, elements, devices, steps, etc. may be adopted.

[0021] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0022] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0023] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0024] It is understandable that this application can display a prompt interface or pop-up window before collecting relevant data (such as data packets sent by the data source) and during the process of collecting relevant data. The prompt interface or pop-up window is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window, otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data are terminated, that is, the relevant data is not obtained. In other words, all data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions.

[0025] In cloud computing network scenarios, multi-network aggregation technology or multi-transmit selective reception technology can be used to improve the stability of network transmission. Among them, multi-network aggregation technology is to use multi-channel network aggregation technology to intelligently aggregate multiple network lines and treat them as a large network channel to provide more stable, fast, and bandwidth-intensive network services. Multi-transmit selective reception technology is an anti-packet loss technology, such as Figure 1 As shown in the figure, the sending end CPE (Customer Premise Equipment) copies the data packet from the sending end and sends the original packet and the copied packet together through two links. If there is packet loss on one link, the receiving end CPE restores the original packet through the redundant packet received on the other link, without the need for the sending end to retransmit, thereby reducing latency and jitter.

[0026] Whether it is multi-network aggregation technology or multi-transmission selective reception technology, it is necessary to copy the same data packet multiple times and send it from multiple paths. Therefore, one of the core technical requirements is to filter out duplicate data packets and discard them. In related technologies, a bitmap is recorded for each data packet to mark whether the data packet with the corresponding sequence number has been received. If it has been received, the duplicate data packet needs to be discarded. However, this solution will occupy a large memory overhead and is not feasible on programmable switches with limited memory resources.

[0027] Based on this, in one embodiment of the present application, Figure 2 As shown, the receiving CPE maintains a hash value storage space, which is used to store the hash value corresponding to the received data packet. The sending CPE sends the data packet to the receiving CPE through multiple transmission paths, such as the sending CPE sends the data packet to the receiving CPE through multi-network aggregation technology or multi-transmission selective reception technology.

[0028] After receiving the data packets sent by the data source (i.e., the transmitting CPE) through multiple transmission paths, the receiving CPE will calculate the hash value corresponding to the data packet based on the packet information of the received data packet (such as the source address of the data packet, the destination address of the data packet, the source port of the data packet, the destination port of the data packet, the protocol information used by the data packet, the packet sequence number of the data packet, and one or more of the business flow identifiers of the data packet), and then search the hash value corresponding to the data packet in the hash value storage space based on the calculated hash value. If the corresponding hash value is found, it means that the data packet is received repeatedly, and the received data packet can be discarded. If the hash value corresponding to the data packet is not found in the hash value storage space, it means that the data packet has not been received, so the data packet can be transmitted to the downstream service (such as the receiving device), and the hash value corresponding to the data packet is stored in the hash value storage space.

[0029] It is understandable that the CPE device in the embodiment of the present application can be a switch, a router, a hub, a network interface card (NIC), a wireless access point (WAP), a modem, an optical terminal, an optical transceiver, a bridge, a server, a terminal device, etc. The server can be a server that provides various services, which can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud technology services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), big data and artificial intelligence platforms, etc. The terminal device can be, for example, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, an aircraft, etc., but is not limited to this.

[0030] It can be seen that the technical solution of the embodiment of the present application can reduce the memory space occupied by storing the information of the received data packet through the hash value, and can reduce the bandwidth occupied by the network transmission by discarding the duplicate data packets, which is conducive to reducing network congestion and improving data transmission efficiency. When the hash value corresponding to the data packet is not found in the hash value storage space, the hash value corresponding to the data packet is stored in the hash value storage space, and the data packet is transmitted to the downstream service, so that the hash value corresponding to the received data packet can be stored in the hash value storage space, so as to facilitate the subsequent duplication judgment of the data packet, and the non-duplicate data packet can be transmitted to the downstream service, ensuring that the data packets received by the downstream service are all non-duplicate data packets, reducing the burden of the downstream service to process duplicate data packets.

[0031] The implementation details of the technical solution of the embodiment of the present application are described in detail below:

[0032] Figure 3 A flow chart of a data packet transmission control method according to an embodiment of the present application is shown. The data packet transmission control method can be executed by a data receiving end device, which can be, for example, a receiving end CPE device in the above embodiment. Figure 3 As shown, the data packet transmission control method at least includes S310 to S340, which are described in detail as follows:

[0033] In S310, data packets are received that are respectively sent by a data source through a plurality of transmission paths.

[0034] In some optional embodiments, the data source can send data packets to the receiving CPE through multi-network aggregation technology or multi-transmission and selective reception technology. For example, the data source can copy one or more copies of the data packet to be sent, and then send them separately through other transmission paths, one of which can transmit one data packet.

[0035] In S320, a hash value corresponding to the data packet is calculated according to the packet information of the received data packet.

[0036] In some optional embodiments, a hash value of at least one of the following information can be calculated as the hash value corresponding to the data packet: the source address of the data packet, the destination address of the data packet, the source port of the data packet, the destination port of the data packet, the protocol information used by the data packet, the packet sequence number of the data packet, and the service flow identifier of the data packet.

[0037] In S330, if the hash value corresponding to the data packet is found in the hash value storage space, the data packet is discarded. The hash value storage space is used to store the hash value corresponding to the received data packet.

[0038] In some optional embodiments, since the hash value storage space is used to store hash values ​​corresponding to received data packets, if the hash value corresponding to the data packet is found in the hash value storage space, it means that the same data packet has been received once. In order to avoid receiving duplicate data packets and network congestion caused by transmitting duplicate data packets, the data packet needs to be discarded.

[0039] In S340, if the hash value corresponding to the data packet is not found in the hash value storage space, the hash value corresponding to the data packet is stored in the hash value storage space, and the data packet is transmitted to the downstream service.

[0040] In some optional embodiments, if the hash value corresponding to the data packet is not found in the hash value storage space, it means that the data packet has not been received before, that is, the data packet is the first received data packet, so the hash value corresponding to the data packet can be stored in the hash value storage space, so as to judge whether the subsequently received data packet is a duplicate data packet according to the hash value stored in the hash value storage space. Optionally, the downstream service can be a device or application for consuming data packets, for example, in a cloud gaming scenario, the downstream service can be a cloud gaming application.

[0041] Figure 3 The technical solution of the illustrated embodiment can reduce the memory space occupied by storing the information of the received data packets through hash values, and can reduce the bandwidth occupied by network transmission by discarding duplicate data packets, which is conducive to reducing network congestion and improving data transmission efficiency. When the hash value corresponding to the data packet is not found in the hash value storage space, the hash value corresponding to the data packet is stored in the hash value storage space, and the data packet is transmitted to the downstream service, so that the hash value corresponding to the received data packet can be stored in the hash value storage space to facilitate the subsequent duplication judgment of the data packet, and the non-duplicate data packets can be transmitted to the downstream service, ensuring that the data packets received by the downstream service are all non-duplicate data packets, reducing the burden of the downstream service in processing duplicate data packets.

[0042] based on Figure 3 In the technical solution of the embodiment shown, the hash value storage space may include a hash value storage list. On this basis, Figure 4 As shown, according to a data packet transmission control method according to an embodiment of the present application, in the Figure 3 In addition to S310 to S340 shown in FIG, it also includes S410 and S420, which are described in detail as follows:

[0043] In S410, after the hash value corresponding to the data packet is calculated in S320, the hash value index corresponding to the data packet is calculated according to the length of the hash value storage list and the hash value corresponding to the data packet.

[0044] In some optional embodiments, the remainder of the hash value corresponding to the data packet with respect to the length of the hash value storage list may be calculated, and the calculated remainder may be used as the hash value index corresponding to the data packet.

[0045] In S420, the hash value corresponding to the data packet is queried according to the corresponding position of the hash value index in the hash value storage list to determine whether the hash value corresponding to the data packet can be found in the hash value storage space.

[0046] In some optional embodiments, if the hash value storage space includes a hash value storage list, data at a corresponding position can be found in the hash value storage list according to the calculated hash value index.

[0047] If the hash value storage space contains multiple hash value storage lists, then the data at the corresponding positions can be searched in the multiple hash value storage lists in turn according to the calculated hash value index. Specifically, the hash value corresponding to the data packet can be searched in the positions corresponding to the hash value indexes in the multiple hash value storage lists in turn according to the arrangement order of the multiple hash value storage lists. If the hash value corresponding to the data packet is found at the position corresponding to the hash value index in one of the hash value storage lists, it is determined that the hash value corresponding to the data packet can be found in the hash value storage space. Optionally, if the hash value corresponding to the data packet is found at the position corresponding to the hash value index in one of the hash value storage lists, there is no need to search from other hash value storage lists.

[0048] In some optional embodiments, if the hash value corresponding to the data packet is not found in any position corresponding to the hash value index in multiple hash value storage lists, it is determined that the hash value corresponding to the data packet is not found in the hash value storage space.

[0049] In some optional embodiments, in the above Figure 3 and Figure 4 In S340 shown, the process of storing the hash value corresponding to the data packet in the hash value storage space may specifically include: calculating the hash value index corresponding to the data packet based on the length of the hash value storage list and the hash value corresponding to the data packet, and then searching the hash value storage list in the hash value storage space for the position corresponding to the hash value index based on the hash value index; if the position corresponding to the hash value index in the hash value storage list is empty, storing the hash value corresponding to the data packet in the hash value storage list for the position corresponding to the hash value index.

[0050] Optionally, if the hash value storage space includes multiple hash value storage lists, when searching for a position corresponding to the hash value index in the hash value storage list in the hash value storage space according to the hash value index, the multiple hash value storage lists can be sequentially checked in the order in which the multiple hash value storage lists are arranged. If it is detected that the position corresponding to the hash value index in one of the hash value storage lists is empty, the hash value corresponding to the data packet can be stored in the position corresponding to the hash value index in the hash value storage list. In other words, if the position corresponding to the hash value index in one of the hash value storage lists is empty, there is no need to search from other hash value storage lists.

[0051] In some optional embodiments, if the positions corresponding to the hash value index in the multiple hash value storage lists contained in the hash value storage space are not empty, then the data corresponding to the hash value index in the front hash value storage list can be moved to the position corresponding to the hash value index in the back hash value storage list in the order of arrangement of the multiple hash value storage lists, and the hash value corresponding to the data packet is stored in the position corresponding to the hash value index in the first hash value storage list. In this embodiment, since the transmission of data packets is time-sequential, when the data source transmits data packets through multiple transmission paths, the transmission time of the same data packet in different transmission paths is the same or similar. Therefore, by storing the hash value corresponding to the data packet in the position corresponding to the hash value index in the first hash value storage list, the hash value of the latest received data packet can be stored in the hash value storage list with the first arrangement order, so that when the same data packet is received, it can be ensured that whether there is a duplicate hash value in the hash value storage list with the first arrangement order can be queried as soon as possible to improve the processing efficiency of the data packet.

[0052] In some optional embodiments, if the number of times the same target hash value is found in the hash value storage space according to the received data packets reaches a set number, then the target hash value can be deleted from the hash value storage space, and the set number is the number of multiple transmission paths minus 1. This is because if the number of times the same target hash value is found in the hash value storage space reaches a set number, it means that all the data packets transmitted through multiple transmission paths have been received, so the target hash value can be deleted from the hash value storage space to avoid occupying the hash value storage space.

[0053] In some optional embodiments, if the data source transmits a data packet via two transmission paths, then if a hash value corresponding to the data packet is found in the hash value storage space, the found hash value is deleted from the hash value storage space. This is because if a hash value corresponding to the data packet is found in the hash value storage space, it means that the same data packet has been transmitted via another transmission path, so the hash value can be directly deleted from the hash value storage space to avoid occupying the hash value storage space.

[0054] The following combination Figure 5 The implementation details of the technical solution of the embodiment of the present application are elaborated in detail:

[0055] In one application scenario of the present application, for a multi-network aggregation gateway in a cloud computing scenario, it mainly includes a white-box programmable switch for implementing a stateful gateway, which has the ability to modify the packet forwarding logic on demand, such as Intel's Tofino switch, etc., and can support secondary development capabilities, such as programmable packet forwarding processes. Specifically, the switch can receive packets sent from different devices (such as servers and other switches, etc.), and can also forward packets according to business orchestration logic requirements.

[0056] In one embodiment of the present application, the multi-network aggregation gateway is mainly used to receive data packets sent from multiple transmission paths. These data packets arrive in a certain order, and the multi-network aggregation gateway is used to collect these data packets and send the first arrived data packets to the receiving end (such as the target server) first, and the same data packets that arrive later need to be identified and discarded. Otherwise, direct forwarding will cause the bandwidth required by the receiving end to receive the data packets to double, causing huge bandwidth pressure. If the corresponding data packet is directly recorded whether it has been received by means of the 5-tuple of the data packet + the sequence number of the data packet (i.e., the sequence number), a large amount of memory space will be occupied. In order to reduce the memory occupied when storing data packet information while accurately identifying duplicate data packets, a new duplicate packet screening technology is proposed in an embodiment of the present application. Specifically, if Figure 5 As shown, the core steps of removing duplicate packets by the multi-network aggregation gateway are divided into two main steps: detecting duplicate data packets and inserting data packet hash values.

[0057] In one embodiment of the present application, the process of detecting duplicate data packets is mainly to first perform a hash calculation on the five-tuple of the data packet and the data packet sequence number (i.e., sequence number) after receiving the data packet, and then calculate the index based on the hash value. Then, the hash value corresponding to the index position in the register list (i.e., hash value storage list) in each stage is queried in turn according to the index. If the queried hash value is the same as the hash value calculated for the data packet, it means that the currently received data packet is a duplicate data packet, and then the hash value recorded in the register list can be deleted (assuming that the data packet is transmitted through two transmission links), and the current data packet is marked as discarded, and the pipeline process is directly terminated; otherwise, the next stage is continued to be queried; if the hash value queried in all stages is different from the hash value calculated for the data packet, the hash value insertion step is entered.

[0058] Specifically, after the port of the white-box programmable switch receives a data packet, it extracts the field information of the data packet header, such as the 5-tuple information of the data packet (source IP address src_ip, destination IP address dst_ip, source port src_port, destination port dst_port, protocol protocol), and the data packet sequence number sequence_number. The white-box programmable switch then inputs the above 5-tuple information and the data packet sequence number sequence_number into the hash function for calculation (for example, the hash function can use CRC32, CRC64, etc.). Assuming that the hash function is CRC32, the hash calculation result H_i of the i-th data packet will be obtained, where:

[0059] H_i=CRC32(src_ip,dst_ip,src_port,dst_port,protocol,sequence_number)

[0060] After calculating the hash calculation result H_i of the i-th data packet, the index idx=H_i%L of the register list R_j[L] stored in the j-th stage can be calculated, where L is the length of the register list.

[0061] Then set the index j of stage = 0, and determine whether the data in H_i and R_j[idx] are equal. If they are equal, jump to the following step a); otherwise, jump to the following step c);

[0062] Step a), determine that the current data packet is a duplicate data packet, delete the element with the corresponding index in the register list in the current stage, that is, delete R_j[idx];

[0063] Step b), discard the currently received data packet and end the pipeline process;

[0064] Step c), j = j + 1; if j < J, continue to determine whether the data in H_i and R_j[idx] is equal; otherwise, it is determined that no duplicate packet is found, then return to the start stage of the pipeline, enter the process of inserting the hash value, and put the hash calculation result H_i into the data packet header. Where J is the maximum number of stages.

[0065] In an embodiment of the present application, the hash value insertion step is specifically: if there is data at the position corresponding to this index in the register lists of all stages, then the hash value calculated for the current data packet can be inserted into the position corresponding to this index in the register list of the first stage, and the hash value at the position corresponding to this index in the original register list of the first stage is inserted into the corresponding position in the second stage, and so on. 2. If there is no data (i.e., there is a vacancy) at the position corresponding to this index in the register list of a certain stage, then the hash value calculated for the current data packet can be inserted into the register list of the stage with a vacancy.

[0066] Specifically, when entering the pipeline stage of inserting the hash value, continue to use the foregoing H_i result to calculate the index idx = H_i % L, then set current_v = H_i, and perform the following insertion operation;

[0067] Set j = 0, then determine whether there is an element stored in R_j[idx]. If there is, jump to the following step a); otherwise, jump to step e);

[0068] Step a), extract the element in R_j[idx] and temporarily store it in tmp = R_j[idx];

[0069] Step b), set R_j[idx] = current_v;

[0070] Step c), set current_v = tmp;

[0071] Step d), j = j + 1; if j < J, continue to determine whether there is an element stored in R_j[idx]; otherwise, end the current pipeline process. Where J is the maximum number of stages.

[0072] Step e), R_j[idx] = current_v.

[0073] The technical solution of the embodiment of the present application can reduce the data flow in the network by screening and discarding duplicate data packets, and can save network bandwidth, thereby reducing network congestion; and removing duplicate data packets can reduce invalid data transmission, thereby improving the efficiency of data transmission; at the same time, the final recipient of the data packet, such as the target server, does not need to process duplicate data packets, which can reduce the load on the server. In addition, the mechanism of screening data packets in the embodiment of the present application can also ensure the orderly transmission of data packets, thereby improving the reliability of data transmission.

[0074] The following describes an apparatus embodiment of the present application, which can be used to execute the data packet transmission control method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the embodiment of the data packet transmission control method in the above-mentioned embodiment of the present application.

[0075] Figure 6 A block diagram of a data packet transmission control device according to an embodiment of the present application is shown. The data packet transmission control device can be applied to a data receiving end device, which can be, for example, a receiving end CPE device in the above embodiment.

[0076] Reference Figure 6 As shown, a data packet transmission control device 600 according to an embodiment of the present application includes: a receiving unit 602 , a calculating unit 604 and a processing unit 606 .

[0077] Among them, the receiving unit 602 is configured to receive data packets sent by the data source through multiple transmission paths respectively; the calculating unit 604 is configured to calculate the hash value corresponding to the data packet according to the packet information of the received data packet; the processing unit 606 is configured to discard the data packet if the hash value corresponding to the data packet is found in the hash value storage space, and the hash value storage space is used to store the hash value corresponding to the received data packet; if the hash value corresponding to the data packet is not found in the hash value storage space, the hash value corresponding to the data packet is stored in the hash value storage space, and the data packet is transmitted to the downstream service.

[0078] In some embodiments of the present application, based on the aforementioned scheme, the hash value storage space includes a hash value storage list; the calculation unit 604 is also configured to: calculate the hash value index corresponding to the data packet according to the length of the hash value storage list and the hash value corresponding to the data packet; the processing unit 606 is also configured to: query the hash value corresponding to the data packet at the corresponding position in the hash value storage list according to the hash value index to determine whether the hash value corresponding to the data packet can be found in the hash value storage space.

[0079] In some embodiments of the present application, based on the aforementioned scheme, the hash value storage space includes multiple hash value storage lists; the processing unit 606 is configured to: according to the arrangement order of the multiple hash value storage lists, query the hash value corresponding to the data packet at the position corresponding to the hash value index in the multiple hash value storage lists in sequence; if the hash value corresponding to the data packet is found at the position corresponding to the hash value index in one of the hash value storage lists, it is determined that the hash value corresponding to the data packet can be found in the hash value storage space.

[0080] In some embodiments of the present application, based on the aforementioned scheme, the processing unit 606 is also configured to: if the hash value corresponding to the data packet is not found at the position corresponding to the hash value index in the multiple hash value storage lists, determine that the hash value corresponding to the data packet is not found in the hash value storage space.

[0081] In some embodiments of the present application, based on the aforementioned scheme, the hash value storage space includes a hash value storage list; the calculation unit 604 is also configured to: calculate the hash value index corresponding to the data packet according to the length of the hash value storage list and the hash value corresponding to the data packet; the transmission control device 600 also includes: a storage unit, configured to store the hash value corresponding to the data packet to the position corresponding to the hash value index in the hash value storage list if the position corresponding to the hash value index in the hash value storage list is empty.

[0082] In some embodiments of the present application, based on the aforementioned scheme, the hash value storage space includes multiple hash value storage lists; the storage unit is configured to: detect in the multiple hash value storage lists in sequence according to the arrangement order of the multiple hash value storage lists, and if it is detected that the position corresponding to the hash value index in one of the hash value storage lists is empty, the hash value corresponding to the data packet is stored in the position corresponding to the hash value index in the hash value storage list.

[0083] In some embodiments of the present application, based on the aforementioned scheme, the storage unit is further configured as: if the positions corresponding to the hash value index in the multiple hash value storage lists are not empty, then, in accordance with the arrangement order of the multiple hash value storage lists, the data corresponding to the hash value index in the front hash value storage list is moved to the position corresponding to the hash value index in the rear hash value storage list, and the hash value corresponding to the data packet is stored in the position corresponding to the hash value index in the hash value storage list arranged in the first position.

[0084] In some embodiments of the present application, based on the aforementioned scheme, the calculation unit 604 is configured to: calculate the remainder of the hash value corresponding to the data packet with respect to the length, and use the remainder as the hash value index corresponding to the data packet.

[0085] In some embodiments of the present application, based on the aforementioned scheme, the processing unit 606 is also configured to: if the number of times the same target hash value is found in the hash value storage space according to the received data packet reaches a set number of times, the target hash value is deleted from the hash value storage space, and the set number of times is the number of the multiple transmission paths minus 1.

[0086] In some embodiments of the present application, based on the aforementioned scheme, the multiple transmission paths include two transmission paths, and the processing unit 606 is further configured to: if the hash value corresponding to the data packet is found in the hash value storage space, delete the found hash value from the hash value storage space.

[0087] In some embodiments of the present application, based on the aforementioned scheme, the computing unit 604 is configured to: calculate a hash value of at least one of the following information of the data packet as the hash value corresponding to the data packet: the source address of the data packet, the destination address of the data packet, the source port of the data packet, the destination port of the data packet, the protocol information adopted by the data packet, the packet sequence number of the data packet, and the service flow identifier of the data packet.

[0088] Figure 7 A schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present application is shown, and the electronic device may be the data receiving device in the aforementioned embodiment.

[0089] It should be noted that Figure 7 The computer system 700 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0090] like Figure 7As shown, the computer system 700 may include a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703, such as executing the method described in the above embodiment. In the RAM 703, various programs and data required for system operation are also stored. The CPU 701, the ROM 702 and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0091] The following components can be connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.

[0092] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program is used to perform the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 709, and / or installed from a removable medium 711. When the computer program is executed by a central processing unit (CPU) 701, various functions defined in the system of the present application are executed.

[0093] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a computer program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0094] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.

[0095] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not constitute limitations on the units themselves in some cases.

[0096] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more computer programs, and when the above one or more computer programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0097] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0098] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable an electronic device to execute the method according to the implementation methods of the present application.

[0099] For example, the electronic device may be a data receiving device, and the data receiving device may execute Figure 3 Or the transmission control method of the data packet shown in 4.

[0100] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0101] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A data packet transmission control method, characterized in that: include: Receiving data packets sent by a data source through multiple transmission paths; Calculate a hash value corresponding to the data packet according to the packet information of the received data packet; If the hash value corresponding to the data packet is found in the hash value storage space, the data packet is discarded, and the hash value storage space is used to store the hash value corresponding to the received data packet; If the hash value corresponding to the data packet is not found in the hash value storage space, the hash value corresponding to the data packet is stored in the hash value storage space, and the data packet is transmitted to a downstream service.

2. The data packet transmission control method according to claim 1, characterized in that: The hash value storage space includes a hash value storage list, and the transmission control method further includes: Calculate the hash value index corresponding to the data packet according to the length of the hash value storage list and the hash value corresponding to the data packet; The hash value corresponding to the data packet is queried at a corresponding position in the hash value storage list according to the hash value index to determine whether the hash value corresponding to the data packet can be found in the hash value storage space.

3. The data packet transmission control method according to claim 2, characterized in that: The hash value storage space includes a plurality of hash value storage lists; Querying the hash value corresponding to the data packet according to the corresponding position of the hash value index in the hash value storage list includes: According to the arrangement order of the multiple hash value storage lists, query the hash value corresponding to the data packet in the position corresponding to the hash value index in the multiple hash value storage lists in sequence; If the hash value corresponding to the data packet is found at a position corresponding to the hash value index in one of the hash value storage lists, it is determined that the hash value corresponding to the data packet can be found in the hash value storage space.

4. The data packet transmission control method according to claim 3, characterized in that: The transmission control method further includes: If the hash value corresponding to the data packet is not found in any position corresponding to the hash value index in the multiple hash value storage lists, it is determined that the hash value corresponding to the data packet is not found in the hash value storage space.

5. The data packet transmission control method according to claim 1, characterized in that: The hash value storage space includes a hash value storage list; storing the hash value corresponding to the data packet in the hash value storage space includes: Calculate the hash value index corresponding to the data packet according to the length of the hash value storage list and the hash value corresponding to the data packet; If the position corresponding to the hash value index in the hash value storage list is empty, the hash value corresponding to the data packet is stored in the position corresponding to the hash value index in the hash value storage list.

6. The data packet transmission control method according to claim 5, characterized in that: The hash value storage space includes a plurality of hash value storage lists; If the position corresponding to the hash value index in the hash value storage list is empty, storing the hash value corresponding to the data packet to the position corresponding to the hash value index in the hash value storage list, including: The multiple hash value storage lists are detected in sequence according to the arrangement order of the multiple hash value storage lists. If it is detected that the position corresponding to the hash value index in one of the hash value storage lists is empty, the hash value corresponding to the data packet is stored in the position corresponding to the hash value index in the hash value storage list.

7. The data packet transmission control method according to claim 6, characterized in that: The transmission control method further includes: If the positions corresponding to the hash value index in the multiple hash value storage lists are not empty, then the data corresponding to the hash value index in the front hash value storage list is moved to the position corresponding to the hash value index in the back hash value storage list in the order of arrangement of the multiple hash value storage lists, and the hash value corresponding to the data packet is stored in the position corresponding to the hash value index in the hash value storage list arranged in the first position.

8. The data packet transmission control method according to claim 2 or 5, characterized in that: Calculating a hash value index corresponding to the data packet according to the length of the hash value storage list and the hash value corresponding to the data packet includes: Calculate the remainder of the length of the hash value corresponding to the data packet, and use the remainder as the hash value index corresponding to the data packet.

9. The data packet transmission control method according to claim 1, characterized in that: The transmission control method further includes: If the number of times the same target hash value is found in the hash value storage space according to the received data packet reaches a set number, the target hash value is deleted from the hash value storage space, and the set number is the number of the multiple transmission paths minus 1.

10. The data packet transmission control method according to claim 1, characterized in that: The multiple transmission paths include two transmission paths, and the transmission control method further includes: If the hash value corresponding to the data packet is found in the hash value storage space, the found hash value is deleted from the hash value storage space.

11. The data packet transmission control method according to claim 1, characterized in that: Calculating a hash value corresponding to the data packet according to the packet information of the received data packet, including: Calculate a hash value of at least one of the following information of the data packet as the hash value corresponding to the data packet: the source address of the data packet, the destination address of the data packet, the source port of the data packet, the destination port of the data packet, the protocol information adopted by the data packet, the packet sequence number of the data packet, and the service flow identifier of the data packet.

12. A data packet transmission control device, characterized in that: include: A receiving unit, configured to receive data packets respectively sent by a data source through a plurality of transmission paths; A calculation unit, configured to calculate a hash value corresponding to the data packet according to the packet information of the received data packet; a processing unit configured to discard the data packet if a hash value corresponding to the data packet is found in a hash value storage space, wherein the hash value storage space is used to store hash values ​​corresponding to received data packets; If the hash value corresponding to the data packet is not found in the hash value storage space, the hash value corresponding to the data packet is stored in the hash value storage space, and the data packet is transmitted to a downstream service.

13. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for controlling transmission of a data packet according to any one of claims 1 to 11 is implemented.

14. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more computer programs, which, when executed by the one or more processors, enables the electronic device to implement the data packet transmission control method as described in any one of claims 1 to 11.

Citation Information

Cited By

  • Pathological image multi-user terminal collaborative labeling consultation method and device

    CN120356655A

  • Pathological image multi-user terminal cooperative labeling consultation method and device

    CN120356655B