Method for transmitting data in network, apparatus, device and storage medium

Notifying its decompression capabilities through the data decompression device solves the problem of loss caused by the data compression device sending compressed data and improves the reliability and efficiency of data transmission.

WO2024174667A1PCT designated stage expired Publication Date: 2024-08-29HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/136557
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-24
Filing Date
2023-12-05
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

In data compression transmission, the failure of the data decompression equipment results in the inability to decompress, resulting in data loss.

Method used

The data decompression device notifies the data compression device of its decompression capabilities, ensuring that the data compression device knows whether the decompression device has the decompression capability, so as to decide whether to send compressed data, adopt a redundant backup mechanism to improve the decompression capability, and use BGP Flowspec Messages are compatible with existing protocols.

Benefits of technology

This avoids data loss caused by sending compressed data due to the inability of the decompression device, and improves the reliability and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023136557_29082024_PF_FP_ABST
    Figure CN2023136557_29082024_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of communications. Disclosed are a method for transmitting data in a network, an apparatus, a device and a storage medium. The network comprises a data decompression system, the data decompression system comprising a first data decompression device and a second data decompression device. The method is applied to the first data decompression device, and the method comprises: determining data decompression capability of the data decompression system; and sending a first message to a data compression device, the first message being used for indicating the decompression capability of the data decompression system. Using the present application can solve the problem of data loss caused by data compression devices still sending compressed data to data decompression devices which lack data decompression capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, equipment and storage medium for data transmission in network

[0001] This application claims priority to Chinese patent application No. 202310206238.9 filed on February 24, 2023, entitled “Method, device, equipment and storage medium for data transmission in a network”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a method, apparatus, device, and storage medium for data transmission in a network. Background Art

[0003] Currently, networks need to transmit large amounts of data in various scenarios, such as data backup between data centers and data push from the bank's head office to its branches. To conserve network bandwidth, data compression transmission technology has been introduced.

[0004] In data compression transmission, the data compression device on the data sending side compresses the original data and sends the compressed data to the data decompression device on the data receiving side. The data decompression device decompresses the compressed data to obtain the original data and forwards the original data to the destination device on the data receiving side.

[0005] However, the data decompression device may be unable to decompress the compressed data due to a failure of the decompression business board. In this case, if the data compression device still sends compressed data to the decompression device, the decompression device will discard the compressed data due to the inability to decompress it, resulting in data loss.

[0006] Summary of the Invention

[0007] The present invention provides a method, apparatus, device, and storage medium for transmitting data in a network, which can solve the problem of data loss caused by a data compression device still sending compressed data to a data decompression device that does not have the data decompression capability. The technical solution is as follows:

[0008] In a first aspect, a method for data transmission in a network is provided, wherein the network includes a data decompression system, the data decompression system includes a first data decompression device and a second data decompression device, and the method is applied to the first data decompression device. The method includes: the first data decompression device determines the data decompression capability of the data decompression system and sends a first message to the data compression device, wherein the first message is used to indicate the decompression capability of the data decompression system.

[0009] In the solution provided by this application, the data decompression device notifies the data compression device of the data decompression system's data decompression capabilities. Thus, the data compression device can decide whether to compress the data and send it to the data decompression device based on whether the data decompression system has the data decompression capabilities. This avoids data loss caused by the data compression device still sending compressed data to the data decompression system despite the system not having the data decompression capabilities.

[0010] In addition, in the solution provided in the present application, the data decompression system includes a first data decompression device and a second data decompression device. In this way, the data decompression capability of the data decompression system can be improved through redundant backup of the data decompression devices.

[0011] In one possible implementation, in the case of redundant backup of data decompression devices, when the first data decompression device determines the data decompression capability of the data decompression system, it can determine the data decompression capability of the data decompression system based on the data decompression capability of the device itself, the data decompression capability of the second data decompression device, and the status of the path between the first data decompression device and the second data decompression device.

[0012] In one possible implementation, if the path between the first data decompression device and the second decompression device is reachable, then as long as one of the two data decompression devices has data decompression capabilities, the data decompression system has data decompression capabilities. Specifically, the following situations may occur:

[0013] The first data decompression device and the second data decompression device both have data decompression capabilities. In this case, each data decompression device in the data decompression system has data decompression capabilities, and the data decompression system also has data decompression capabilities.

[0014] One of the first and second data decompression devices has data decompression capabilities, and the path between the first and second data decompression devices is reachable. In this case, one data decompression device may not have data decompression capabilities, while the other data decompression device does, and the path between the two devices is reachable. Even if one data decompression device determines it does not have data decompression capabilities after receiving compressed data, it can forward the data to the other device that does have data decompression capabilities for decompression. In this way, the data decompression system can still perform data decompression normally.

[0015] In one possible scenario, if the path between the first data decompression device and the second decompression device is unreachable, as long as one of the data decompression devices does not necessarily have the data decompression capability, the data decompression system will be deemed to have no data decompression capability. Specifically, the following scenarios may occur:

[0016] Neither the first data decompression device nor the second data decompression device has data decompression capabilities. One of the first and second data decompression devices has data decompression capabilities, and the path between the first and second data decompression devices is unreachable. The first data decompression device has data decompression capabilities, the data decompression capabilities of the second data decompression device are unknown, and the path between the first and second data decompression devices is unreachable. The first data decompression device has no data decompression capabilities, the data decompression capabilities of the second data decompression device are unknown, and the path between the first and second data decompression devices is reachable.

[0017] In a possible implementation, the first data decompression device may determine the data decompression capability of the second data decompression device through remote backup service (RBS) perception.

[0018] An RBS connection can be established between a first data decompression device and a second data decompression device. The first data decompression device sends a first RBS message to the second data decompression device to notify it of its data decompression capabilities. In response, the second data decompression device also sends a second RBS message to the first data decompression device, where the second RBS message notifies the second data decompression device of its data decompression capabilities.

[0019] In a possible implementation, in order to be compatible with existing protocols, a Border Gateway Protocol Flow Specification (BGP Flowspec) routing publication message may be reused to indicate that the data decompression system has decompression capability.

[0020] In a possible implementation, to be compatible with existing protocols, a BGP Flowspec route withdrawal message may be reused to indicate that the data decompression system does not have the decompression capability.

[0021] In one possible implementation, after receiving first data sent by a data compression device, if the first data is determined to be compressed data and the first data decompression device is determined to have data decompression capabilities, the first data is decompressed. If the first data is determined to be compressed data and the first data decompression device is determined to not have data decompression capabilities, the first data is forwarded to a second data decompression device. In this way, data decompression can be achieved if any data decompression device in the data decompression system has data decompression capabilities and a path is reachable, fully utilizing the data decompression capabilities of the entire data decompression system. Furthermore, the first data herein can be a data packet, message, etc.

[0022] In a second aspect, a method for data transmission in a network is provided. The network includes a data decompression system, the data decompression system including a first data decompression device and a second data decompression device. The method is applied to the first data decompression device and includes: the first data decompression device determining its own data decompression capability and sending a first message to the data compression device to notify the data compression device of its own data decompression capability. Each data decompression device in the data decompression system can perform this operation to notify the data compression device of its own data decompression capability.

[0023] In the solution provided by this application, a data decompression device notifies the data compression device of its own data decompression capabilities, allowing the data compression device to learn the data decompression capabilities of each data decompression device in the data decompression system. Consequently, the data compression device can decide whether to compress data and send it to the data decompression device based on the data decompression capabilities of each data decompression device in the data decompression system. This avoids data loss caused by a data compression device sending compressed data to a data decompression system that lacks data decompression capabilities.

[0024] In one possible implementation, the first message carries the address of the first data compression device, so that the data decompression device can know the address of the data decompression device with data decompression capability and can directly send the compressed data to the data decompression device with data decompression capability.

[0025] In a possible implementation, to be compatible with existing protocols, if the data decompression device has decompression capability, the first message may reuse a BGP Flowspec route publishing message to indicate the data decompression capability of the device.

[0026] In a possible implementation, to be compatible with existing protocols, when the data decompression device does not have the decompression capability, the first message may reuse a BGP Flowspec route withdrawal message to indicate that the device does not have the decompression capability.

[0027] In one possible implementation, the update message can be extended, and the attribute identifier (Attr.Flags) field in the update message carries the data decompression capability identifier, and the attribute value (Attr.Type Code) field in the update message carries the data decompression capability indication information, and the data decompression capability indication information is used to indicate the data decompression capability of the first data decompression device. The network layer reachability information (Network Layer Reachability Information, NLRI) field in the update message is used to carry the address of the first data compression device.

[0028] In a third aspect, a method for data transmission in a network is provided. The network includes a data compression system and a data decompression system. The data compression system includes at least one data compression device, and the data decompression system includes multiple data decompression devices. The method is applicable to any data compression device and includes: the data compression device receiving a first message sent by a data decompression device in the data decompression system, wherein the first message indicates whether the data decompression system has decompression capability. Furthermore, based on the data decompression capability of the data decompression system, the data compression device may transmit first data to the data decompression device in the data decompression system.

[0029] In the solution provided by this application, the data decompression device notifies the data compression device of the data decompression system's data decompression capabilities. Thus, the data compression device can decide whether to compress the data and send it to the data decompression device based on whether the data decompression system has the data decompression capabilities. This avoids data loss caused by the data compression device still sending compressed data to the data decompression system despite the system not having the data decompression capabilities.

[0030] In a possible implementation, if the data decompression system has a decompression capability, the data compression device compresses the first data to be sent and sends the compressed first data to the data decompression system.

[0031] In one possible implementation, if the data decompression system does not have decompression capabilities, the first data to be transmitted is not compressed and is sent to the data decompression system. This avoids data loss caused by the data compression device sending compressed data when the data decompression system does not have decompression capabilities.

[0032] In a fourth aspect, a method for data transmission in a network is provided. The network includes a data compression system and a data decompression system. The data compression system includes at least one data compression device, and the data decompression system includes multiple data decompression devices. The method is applicable to any data compression device and includes: the data compression device receiving a first message sent by each data decompression device in the data decompression system, wherein the first message indicates the decompression capability of the corresponding data decompression device. Furthermore, first data may be sent to the data decompression system based on the data decompression capability of each data decompression device in the data decompression system.

[0033] In the solution provided by this application, a data decompression device notifies the data compression device of its own data decompression capabilities, allowing the data compression device to learn the data decompression capabilities of each data decompression device in the data decompression system. Consequently, the data compression device can decide whether to compress data and send it to the data decompression device based on the data decompression capabilities of each data decompression device in the data decompression system. This avoids data loss caused by a data compression device sending compressed data to a data decompression system that lacks data decompression capabilities.

[0034] In one possible implementation, the first message carries the address of the corresponding data decompression device. In this way, the data decompression device can know the address of the data decompression device with data decompression capability and can thus directly send the compressed data to the data decompression device with data decompression capability.

[0035] In one possible implementation, in order to send compressed data to a data decompression device capable of decompressing data, the data compression device may perform the following processing:

[0036] For the first message sent by each data decompression device, if it is determined that the first message indicates that the data decompression device has decompression capabilities, the address of the data decompression device is used as the address of the next hop of the target route. The target route is the route corresponding to the destination address of the first data. Furthermore, when sending the first data, if it is determined that the target route has multiple next hop addresses, the address of the first next hop is selected from the multiple next hop addresses based on load balancing, wherein the first next hop is any next hop among the multiple next hops. Then, the first data is compressed and the compressed first data is sent to the data decompression device corresponding to the address of the first next hop. In this way, compressed data can be sent to a data decompression device with data decompression capabilities.

[0037] In one possible implementation, in order to send compressed data to a data decompression device capable of decompressing data, the data compression device may perform the following processing:

[0038] For each first message sent by a data decompression device, if it is determined that the first message indicates that the data decompression device has decompression capabilities, a compressed data transmission path is determined with the address of the data decompression device as the destination address. Furthermore, when sending the first data, if multiple compressed data transmission paths are determined to exist, the first compressed data transmission path with the highest priority among the multiple compressed data transmission paths is selected, the first data is compressed, and the compressed first data is transmitted via the first compressed data transmission path. In this way, compressed data can be transmitted to a data decompression device with data decompression capabilities.

[0039] In a fifth aspect, a device for transmitting data in a network is provided, which is provided in the first data decompression device in the first aspect or any optional embodiment of the first aspect, and the device includes at least one module, and the at least one module is used to implement the method provided by the first aspect or any optional embodiment of the first aspect. In some embodiments, the modules in the device provided by the fifth aspect are implemented by software. In other embodiments, the modules in the device provided by the fifth aspect are implemented by hardware or firmware. The specific details of the device provided by the fifth aspect can be found in the first aspect or any optional embodiment of the first aspect, and will not be repeated here.

[0040] In a sixth aspect, a device for transmitting data in a network is provided, the device being arranged in the first data decompression device in the second aspect or any optional embodiment of the second aspect, and the device comprising at least one module, the at least one module being used to implement the method provided in the second aspect or any optional embodiment of the second aspect. In some embodiments, the module in the device provided in the sixth aspect is implemented by software. In other embodiments, the module in the device provided in the sixth aspect is implemented by hardware or firmware. For specific details of the device provided in the fifth aspect, please refer to the second aspect or any optional embodiment of the second aspect, and no further details will be given here.

[0041] In the seventh aspect, a device for transmitting data in a network is provided, which is provided in the data compression device of the third aspect or any optional embodiment of the third aspect, and the device includes at least one module, and the at least one module is used to implement the method provided by the third aspect or any optional embodiment of the third aspect. In some embodiments, the module in the device provided by the seventh aspect is implemented by software. In other embodiments, the module in the device provided by the seventh aspect is implemented by hardware or firmware. The specific details of the device provided by the fifth aspect can be found in the third aspect or any optional embodiment of the third aspect, and will not be repeated here.

[0042] In an eighth aspect, a device for transmitting data in a network is provided, the device being arranged in the data compression device of the fourth aspect or any optional embodiment of the fourth aspect, the device comprising at least one module, and the at least one module being used to implement the method provided in the fourth aspect or any optional embodiment of the fourth aspect. In some embodiments, the module in the device provided in the eighth aspect is implemented by software. In other embodiments, the module in the device provided in the eighth aspect is implemented by hardware or firmware. For specific details of the device provided in the fifth aspect, please refer to the fourth aspect or any optional embodiment of the fourth aspect, and no further details will be given here.

[0043] In a ninth aspect, a data decompression device is provided, the data decompression device comprising a processor and a memory;

[0044] The processor is used to execute instructions stored in the memory so that the data decompression device performs the method provided by the first aspect or any optional manner of the first aspect or the second aspect or any optional manner of the second aspect.

[0045] In a tenth aspect, a data compression device is provided, the data compression device comprising a processor and a memory;

[0046] The processor is used to execute instructions stored in the memory so that the data compression device performs the method provided by the third aspect or any optional manner of the third aspect or the fourth aspect or any optional manner of the fourth aspect.

[0047] In an eleventh aspect, a network is provided, comprising the data decompression device provided in the ninth aspect and the data decompression device provided in the tenth aspect.

[0048] In the twelfth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a data decompression device, the data decompression device executes the method provided in the above-mentioned first aspect or any optional manner of the first aspect or the second aspect or any optional manner of the second aspect.

[0049] In a thirteenth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a data compression device, the data compression device executes the method for transmitting data in a network as described in any one of claims 14 to 20.

[0050] In the fourteenth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and run by a data decompression device, the data decompression device executes the method provided in the first aspect or any optional manner of the first aspect or the second aspect or any optional manner of the second aspect.

[0051] In the fifteenth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and run by a data compression device, the data compression device executes the method provided by the third aspect or any optional method of the third aspect or the fourth aspect or any optional method of the fourth aspect.

[0052] In the sixteenth aspect, a chip is provided, comprising a memory and a processor, the memory being used to store computer instructions, and the processor being used to call and run the computer instructions from the memory to execute the method provided by the above-mentioned first aspect or any optional manner of the first aspect or the second aspect or any optional manner of the second aspect or the third aspect or any optional manner of the third aspect or the fourth aspect or any optional manner of the fourth aspect.

[0053] In a seventeenth aspect, a method for transmitting data in a network is provided, the method comprising:

[0054] The first network device generates a notification message, where the notification message is used to indicate the data decompression capability of the first network device, and the notification message is a BGP F1owspec message;

[0055] The first network device sends the notification message to the second network device.

[0056] In the solution provided in this application, the first network device and the second network device can be any network device in the network, such as a switch, a router, etc. Exemplarily, the network device can be a provider edge device (PE), a customer edge device (CE), etc.

[0057] Regarding the possible implementation of using the BGP Flowspec message to indicate the data decompression capability of the first network device, illustratively, a BGP Flowspec route release message can be used to indicate that the first network device has the data decompression capability, and a BGP Flowspec route withdrawal message can be used to indicate that the first network device does not have the data decompression capability.

[0058] In a possible implementation, the second network device may be a data compression device.

[0059] In an eighteenth aspect, a method for transmitting data in a network is provided, the method comprising:

[0060] The second network device receives a notification message sent by the first network device, where the notification message is used to indicate the data decompression capability of the first network device, and the notification message is a BGP F1owspec message;

[0061] The second network device determines the data decompression capability of the first network device according to the notification message.

[0062] In the nineteenth aspect, a network is provided, comprising a first network device and a second network device, wherein the first network device is used to execute the method provided in the seventeenth aspect, and the second network device is used to execute the method provided in the eighteenth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] FIG1 is a schematic diagram of a network architecture provided by an embodiment of the present application;

[0064] FIG2 is a flow chart of a method for data transmission in a network provided by an embodiment of the present application;

[0065] FIG3 is a flow chart of a method for data transmission in a network provided by an embodiment of the present application;

[0066] FIG4 is a flow chart of a method for data transmission in a network provided by an embodiment of the present application;

[0067] FIG5 is a flow chart of a method for data transmission in a network provided by an embodiment of the present application;

[0068] FIG6 is a schematic diagram of a device structure for data transmission in a network provided by an embodiment of the present application;

[0069] FIG7 is a schematic diagram of a device structure for data transmission in a network provided by an embodiment of the present application;

[0070] FIG8 is a schematic structural diagram of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0072] This application provides a method for transmitting data in a network. The method can be applied to a network, which can be a dedicated line network built on a wide area network. The dedicated line network can be a dedicated line network for data backup between data centers, a dedicated line network for business data transmission between corporate headquarters and branches, and so on.

[0073] The above network includes a data compression system and a data decompression system. The data compression system includes at least one data compression device, and the data decompression system includes at least two data decompression devices. Both the data compression device and the data decompression device can be network-side Provider Edge (PE) devices, specifically routers, switches, and the like.

[0074] The data compression system can be deployed on the side of the network that requires data compression and transmission. Correspondingly, the data decompression system can be deployed on the side of the network that requires data decompression. For example, for data backup between data centers, the data compression system can be deployed on the primary data center side, while the data decompression system can be deployed on the backup data center side. The method for data transmission within a network provided in this application can be implemented using the data compression device in the data compression system and the data decompression device in the data decompression system.

[0075] To facilitate understanding of this application, the following uses a dedicated line network for data backup between data centers as an example to illustrate the implementation scenario of this application. Referring to Figure 1, the network architecture can be as follows:

[0076] The dedicated line network shown in Figure 1 may include data center A and data center B. Data center A can be the primary data center, and data center B can be the backup data center. Data center A can send data to data center B, allowing data center B to back up and store the data. At least one customer edge device (CE) can be deployed on the data center A side, such as CE11 and CE12 in Figure 1. Furthermore, a data compression system can be deployed on the data center A side, and the data compression system can include at least one data compression device. As shown in Figure 1, the data compression system includes two data compression devices, PE11 and PE12. One of the two data compression devices can be used as the primary data compression device, and the other as the backup data compression device. This redundant backup of the data compression devices ensures that even if one fails, the other can still perform data compression, improving the data compression capability of the data compression system. The network may also include core providers (P), such as P1, P2, P3, and P4 in Figure 1. At least one CE can be deployed on the data center B side, such as CE21 and CE22 in Figure 1. In addition, a data decompression system can be deployed on the Data Center B side. The data decompression system can include at least two data decompression devices. For example, the data decompression system in Figure 1 includes two data decompression devices, namely PE21 and PE22. Of the two data decompression devices, one can be used as the primary data decompression device and the other as the backup data decompression device. In this way, through the redundant backup of the data decompression devices, even if one of the data decompression devices fails, the other data decompression device can still perform data decompression, thereby improving the data compression capability of the data decompression system.

[0077] The following describes a method for transmitting data in a network provided by this application, with reference to the accompanying drawings. In this method, a data decompression device reports the data decompression capabilities of a data decompression system to a data compression device. Thus, the data compression device can determine whether to compress and transmit the data based on the data decompression capabilities of the data decompression system. Referring to FIG2 , the processing flow of this method may include the following steps:

[0078] Step 201: The data decompression device determines the data decompression capability of the data decompression system.

[0079] In practice, for any data decompression device in the data decompression system, the data decompression device may determine the data decompression capability of the data decompression system based on the data decompression capability of the device itself, the data decompression capabilities of other data decompression devices in the data decompression system, and the status of the paths between the device itself and the other data decompression devices. In one possible implementation, the data decompression device may periodically determine the data decompression capability of the data decompression system.

[0080] Taking a data decompression system including a first data decompression device and a second data decompression device as an example, determining the data decompression capability of the data decompression system is described. In the scenario shown in Figure 1, the first data decompression device and the second data decompression device can be PE21 and PE22 in Figure 1, respectively.

[0081] 3 , the method for the first data decompression device to determine the data decompression capability of the data decompression system may include the following steps:

[0082] S2011. The first data decompression device determines the data decompression capability of the device.

[0083] Each data decompression device may be configured with at least one decompression service board, and each decompression service board may have at least one processor for performing data decompression and other processing.

[0084] For each decompression business board, the first data decompression device detects whether each processor on the decompression business board can perform data decompression normally. If it is determined that at least one processor on the decompression business board can perform data decompression normally, it is determined that the decompression business board has data decompression capability. Conversely, if it is determined that all processors on the decompression business board cannot perform data decompression, it is determined that the decompression business board does not have data decompression capability.

[0085] If the first data decompression device determines that at least one decompression business board in the device has data decompression capability, it can be determined that the device has data decompression capability. Conversely, if it is determined that all decompression business boards in the device do not have data decompression capability, it can be determined that the device does not have data decompression capability.

[0086] In one possible implementation, a Border Gateway Protocol Flow Peer (BGP Flow Peer) and a decompression instance can be configured in the first data decompression device. The first data decompression device can track the status of the decompression instance through the BGP Flow Peer. If the status of the decompression instance is enabled (up), it is determined that the data decompression system has data decompression capability; if the status of the decompression instance is disabled (down), it is determined that the data decompression system does not have data decompression capability.

[0087] Regarding the status of the decompression instance, if the first data compression device determines that at least one decompression business board in the device has the data decompression capability, the status of the decompression instance is set to the up state; if it is determined that all decompression business boards in the device do not have the data decompression capability, the status of the decompression instance is set to the down state.

[0088] S2012. The first data decompression device determines the data decompression capability of the second data decompression device.

[0089] The second data decompression device may notify the first data decompression device of the data decompression capability of the second data decompression device.

[0090] Specifically, a remote backup service (RBS) connection can be established between the first data decompression device and the second data decompression device. The second data decompression device can send a first RBS message to the first data decompression device, and the first RBS message can carry information indicating the data decompression capabilities of the second data decompression device. Similarly, the first data decompression device can send a second RBS message to the second data decompression device, and the second RBS message can be used to indicate the data decompression capabilities of the first data decompression device.

[0091] After receiving the first RBS message, the first data decompression device parses the first RBS message and obtains the indication information of the data decompression capability of the second data decompression device carried in the first RBS message. Based on the indication information, the first data decompression device can determine the data decompression capability of the second data decompression device.

[0092] Exemplarily, if the second data decompression device has data decompression capabilities, the indication information is a first value; if the second data decompression device does not have data decompression capabilities, the indication information is a second value. Accordingly, after receiving the first RBS message, the first data decompression device parses the first RBS message and obtains the indication information of the second data decompression device's data decompression capabilities carried in the first RBS message. If the indication information is the first value, it is determined that the second data decompression device has data decompression capabilities; if the indication information is the second value, it is determined that the second data decompression device does not have data decompression capabilities. The first value and the second value are different, for example, the first value is 1 and the second value is 0.

[0093] Furthermore, the data decompression capability of the second data decompression device may be in an unknown state, in addition to being capable of data decompression or not capable of data decompression. Specifically, if the first data decompression device determines that the RBS connection between the first and second data decompression devices is disconnected, in which case the second data decompression device cannot send the first RBS message to the first data decompression device. Therefore, the first data decompression device cannot learn the data decompression capability of the second data decompression device. Therefore, the first data decompression device may determine that the data decompression capability of the second data decompression device is unknown.

[0094] S2013: The first data decompression device determines the status of the path between the first data decompression device and the second data decompression device.

[0095] The first data compression device may determine the status of the path between the first data decompression device and the second data decompression device in various ways.

[0096] Exemplarily, the first data decompression device may detect the status of the path between the first data decompression device and the second data decompression device using an Internet packet groper (ping). If the path between the first data decompression device and the second data decompression device can be pinged, the status of the path between the first data decompression device and the second data decompression device is determined to be reachable; if the path between the first data decompression device and the second data decompression device cannot be pinged, the status of the path between the first data decompression device and the second data decompression device is determined to be unreachable.

[0097] S2014. The first data decompression device determines the data decompression capability of the data decompression system according to the data decompression capability of the first data decompression device, the data decompression capability of the second data decompression device, and the status of the above-mentioned path.

[0098] In the following situations, the first data decompression device may determine that the data decompression system has data decompression capability.

[0099] Case 1:

[0100] The first data decompression device has data decompression capability, the second data decompression device has data decompression capability, and a status of a path between the first data decompression device and the second data decompression device is reachable.

[0101] Case 2:

[0102] The first data decompression device has data decompression capability, the second data decompression device has data decompression capability, and the status of the path between the first data decompression device and the second data decompression device is unreachable.

[0103] Case 3:

[0104] The first data decompression device has data decompression capability, the second data decompression device does not have data decompression capability, and the status of the path between the first data decompression device and the second data decompression device is reachable.

[0105] Case 4:

[0106] The first data decompression device has data decompression capability, the data decompression capability of the second data decompression device is unknown, and the path between the first data decompression device and the second data decompression device is reachable.

[0107] Case 5:

[0108] The first data decompression device does not have data decompression capability, the second data decompression device has data decompression capability, and the status of the path between the first data decompression device and the second data decompression device is reachable.

[0109] In the following situations, the first data decompression device may determine that the data decompression system does not have the data decompression capability.

[0110] Case 6:

[0111] The first data decompression device has data decompression capability, the second data decompression device does not have data decompression capability, and the status of the path between the first data decompression device and the second data decompression device is unreachable.

[0112] Situation 7:

[0113] The first data decompression device has data decompression capability, the data decompression capability of the second data decompression device is unknown, and the path between the first data decompression device and the second data decompression device is unreachable.

[0114] Situation 8:

[0115] The first data decompression device does not have data decompression capability, the second data decompression device has data decompression capability, and the status of the path between the first data decompression device and the second data decompression device is unreachable.

[0116] Case 9:

[0117] The first data decompression device does not have data decompression capability, the second data decompression device does not have data decompression capability, and the status of the path between the first data decompression device and the second data decompression device is reachable.

[0118] Situation 10:

[0119] The first data decompression device does not have data decompression capability, the second data decompression device does not have data decompression capability, and the status of the path between the first data decompression device and the second data decompression device is unreachable.

[0120] Situation 11:

[0121] The first data decompression device does not have data decompression capability, the data decompression capability of the second data decompression device is unknown, and the path between the first data decompression device and the second data decompression device is unreachable.

[0122] Situation 12:

[0123] The first data decompression device does not have data decompression capability, the data decompression capability of the second data decompression device is unknown, and the path between the first data decompression device and the second data decompression device is reachable.

[0124] Similarly, the second data decompression device may also determine the data decompression capability of the data decompression system according to the method shown in FIG3 . The specific process will not be described in detail here.

[0125] Step 202: The data decompression device sends a first message to the data compression device, where the first message is used to indicate the decompression capability of the data decompression system.

[0126] In an implementation, at least one data decompression device in the data decompression system sends a first message to the data compression device to indicate the data decompression capability of the data decompression system.

[0127] In one possible implementation, the data decompression device may reuse Border Gateway Protocol Flow Specification (BGP Flowspec) route publish messages and BGP Flowspec route revoke messages to indicate the decompression capabilities of the data decompression system. The BGP Flowspec route publish message may also be a BGP Flowspec route publish message, and the BGP Flowspec route revoke message may be a BGP Flowspec route revoke message. BGP Flowspec route publish messages and BGP Flowspec route revoke messages may be collectively referred to as BGP Flowspec messages.

[0128] When the data decompression device determines that the data decompression system has data decompression capability, the first message may be a BGP Flowspec route publication message. The BGP Flowspec route publication message may carry an access control list (ACL), which may be pre-configured in the data decompression device. The ACL includes a target quintuple, which is a quintuple of a data flow requiring data compression, and includes a source address, a destination address, a source port number, a destination port number, and a protocol number.

[0129] When the data decompression device determines that the data decompression system does not have the data decompression capability, the first message may be a BGP Flowspec route withdrawal message, and the BGP Flowspec route withdrawal message may also carry the above-mentioned ACL.

[0130] When the data compression system includes multiple data compression devices, the data decompression device may send the first message to one of the data compression devices, or may send the first message to each of the data decompression devices separately. When the first message is sent to one of the data compression devices, the data compression device that receives the first message may synchronously forward the first message to other data compression devices in the data compression system.

[0131] Taking the scenario shown in FIG. 1 as an example, there may be multiple situations in which the data decompression device sends the first message to the data compression device. Two situations are exemplified below.

[0132] Case 1:

[0133] PE21 sends the first message to PE11, and PE22 sends the first message to PE12.

[0134] Case 2:

[0135] PE21 and PE22 both send the first message to PE11, and PE11 synchronously forwards the first message to PE12.

[0136] Step 203: The data compression device sends a first message to the data decompression device according to the data decompression capability of the data decompression system.

[0137] In implementation, after receiving the first message sent by the data decompression device, if the data compression device determines that the first message is used to indicate that the data decompression system has data decompression capability, it obtains the ACL carried therein and stores it locally.

[0138] Exemplarily, if the data compression device receives a BGP Flowspec route publishing message sent by the data decompression device, it can determine that the data decompression system has data decompression capability, and then obtain the ACL carried in the BGP Flowspec route publishing message and store it locally.

[0139] After receiving a first message to be sent through the interface board, the data compression device forwards the first message to be sent to the compression service board if it determines that the quintuple in the first message to be sent matches the target quintuple in the ACL. The compression service board compresses the first message to be sent to generate a compressed first message. The compressed first message is then sent to any data decompression device in the data decompression system via the interface board.

[0140] When the data compression device compresses the first message to be sent, the compression service board compresses the payload in the first message to be sent, and adds a payload compression protocol (IP payload compression protocol, IPPCP) header between the compressed payload and the Internet Protocol (IP) header to generate a compressed first message.

[0141] In one possible implementation, the compressed first message may be further encapsulated before being sent, depending on actual needs. For example, a Segment Routing IPv6 (SRv6) header or a Multi-Protocol Label Switching (MPLS) header may be encapsulated.

[0142] After receiving the first message sent by the data decompression device, if the data compression device determines that the first message indicates that the data decompression system does not have data decompression capabilities, the data compression device may directly send the first message to be sent to any data decompression device in the data decompression system. Alternatively, the first message to be sent may be encapsulated before being sent. For example, an SRv6 header or an MPLS header may be encapsulated.

[0143] Exemplarily, if the data compression device receives a BGP Flowspec route withdrawal message sent by the data decompression device, it may determine that the data decompression system does not have the data decompression capability.

[0144] Step 204: The data decompression device processes the first message according to the data decompression capability of the data decompression system.

[0145] In implementation, after receiving a first message, the interface board of the data decompression device removes the SRv6 header or MPLS header if it is encapsulated in the first message. If it determines that the first message contains an IP header, it determines that the first message is compressed. Furthermore, it matches the quintuple in the IP header of the first message with the target quintuple in the ACL. If a match is found, the message is forwarded to the decompression service board.

[0146] If the device does not have data decompression capabilities, the decompression service board cannot decompress the first message. In this case, the data decompression device can redirect and forward the first message to a data decompression device in the data decompression system that has data decompression capabilities, and the data decompression device with data decompression capabilities decompresses the first message.

[0147] For example, taking the data decompression system including a first data decompression device and a second data decompression device as an example, the first data decompression device receives a first message, and the first data decompression device does not have the data decompression capability, and the second data decompression device has the data decompression capability, then the first data decompression device redirects the first message forwarding to the second data decompression device.

[0148] If the device has data decompression capability, the decompression service board decompresses the first message and forwards the decompressed message to the interface board, which completes subsequent forwarding.

[0149] The present application provides a method for transmitting data over a network. A data decompression device notifies a data compression device of the data decompression system's data decompression capabilities. Thus, the data compression device can decide whether to compress the data and send it to the data decompression device based on whether the data decompression system has the data decompression capabilities. This avoids data loss caused by the data compression device still sending compressed data to a data decompression system that lacks the data decompression capabilities.

[0150] This application also provides a method for transmitting data in a network. In this method, each data decompression device in a data decompression system reports its data decompression capabilities to a data compression device. Thus, the data compression device can learn the data decompression capabilities of each data decompression device in the data decompression system and, based on this, decide whether to compress and transmit the data. Referring to FIG4 , the processing flow of this method may include the following steps:

[0151] Step 401: The data decompression device determines the data decompression capability of the device.

[0152] In practice, the specific processing of step 401 is the same as that of the first data decompression device determining the data decompression capability of the device in step S2011 above, and will not be described in detail here.

[0153] Step 402: The data decompression device sends a second message to the data compression device, wherein the second message is used to indicate the data decompression capability of the data decompression device and carries the address of the data decompression device.

[0154] In implementation, each data decompression device in the data decompression system needs to send a second message to the data compression device to indicate the data decompression capability of the device, and the second message carries the address of the device.

[0155] In a possible implementation, the data decompression device may multiplex the BGP Flowspec route publish message and the BGP Flowspec route withdraw message to indicate the data decompression capability of the device.

[0156] When the data decompression device determines that the device has data decompression capability, the second message may be a BGP Flowspec route publication message. The BGP Flowspec route publication message may carry an access control list (ACL) and the address of the device. The ACL may be pre-configured in the data decompression device. The ACL includes a target quintuple, which is a quintuple of the data flow that needs to be compressed. The quintuple includes a source address, a destination address, a source port number, a destination port number, and a protocol number.

[0157] When the data decompression device determines that the device does not have the data decompression capability, the second message may be a BGP Flowspec route withdrawal message, which may also carry the ACL and the address of the device.

[0158] When the data compression system includes multiple data compression devices, the data decompression device may send the second message to one of the data compression devices, or may send the second message to each of the data decompression devices separately. When the second message is sent to one of the data compression devices, the data compression device that receives the second message may synchronously forward the second message to other data compression devices in the data compression system.

[0159] In another possible implementation, the BGP update message may be extended as the second message to indicate the data decompression capability of the device and carry the address of the device.

[0160] Specifically, the attribute identifier (Attr.Flags) field in the update message carries the decompression capability identifier, the attribute value (Attr.Type Code) field in the update message carries the data decompression capability indication information, the data decompression capability indication information indicates whether the first data decompression device has the decompression capability, and the network layer reachability information (Network Layer Reachability Information, NLRI) field in the update message carries the address of the data compression device.

[0161] Exemplarily, the Attr.Flags field may carry the decompression capability identifier by setting the second bit and the third bit of the Attr.Flags field to 1.

[0162] Step 403: The data compression device sends a first message to the data decompression device according to the data decompression capability of each data decompression device in the data decompression system.

[0163] In practice, through the above steps, the data compression device can obtain the data decompression capabilities and addresses of each data decompression device in the data decompression system. This allows the data compression device to specify a data decompression device in the data decompression system that has data decompression capabilities to send compressed messages. This process can be implemented in a variety of ways, two of which are exemplified below.

[0164] Method 1:

[0165] After receiving the second message sent by each data decompression device, if the data compression device determines that the second message indicates that the data decompression device has data decompression capabilities, it uses the address of the data decompression device carried in the second message as the address of the next hop of the target route. The target route is the route corresponding to the destination address of the first message, and the first message is a message used to carry data that needs to be sent to the backup data center for backup. If it is determined that the second message indicates that the data decompression device does not have data decompression capabilities, the address of the data decompression device carried in the second message is removed from the addresses of each next hop of the target route.

[0166] After receiving the first message to be sent through the interface board, if the data compression device determines that the quintuple in the first message to be sent matches the target quintuple in the ACL, and if a data decompression device with data decompression capability exists in the data decompression system, the first message to be sent is forwarded to the compression service board. The compression service board compresses the first message to be sent to generate a compressed first message. The compressed first message is then forwarded. When forwarding the compressed first message, if the data compression device finds that the target route has multiple next-hop addresses and the costs corresponding to these multiple next-hop addresses are the same, the address of the first next-hop can be selected from the multiple next-hop addresses based on load sharing, where the first next-hop is any next-hop among the multiple next-hop addresses. The data compression device then sends the compressed first message to the data decompression device corresponding to the first next-hop address through the interface board.

[0167] Method 2:

[0168] After receiving the second message sent by each data decompression device, the data compression device calculates a compressed data transmission path with the address of the data decompression device as the destination address if the second message indicates that the data decompression device has data decompression capability. If the second message indicates that the data decompression device does not have data decompression capability, the compressed data transmission path with the address of the data decompression device as the destination address is cancelled.

[0169] After receiving the first message to be sent through the interface board, the data compression device forwards the first message to be sent to the compression service board if it determines that the quintuple in the first message to be sent matches the target quintuple in the ACL, and there is a data decompression device with data decompression capability in the data decompression system. The compression service board compresses the first message to be sent to generate a compressed first message. The compressed first message is then forwarded. When forwarding the compressed first message, if the data compression device determines that there are multiple compressed data transmission paths, the target compressed data transmission path with the highest priority is selected from the multiple compressed data transmission paths, and the compressed first message is sent through the target compressed data transmission path. In this method, the data compression device can additionally add an IP header with the destination address being the address of the target data decompression device to the compressed first message, and the target data decompression device is the tail node of the target compressed data transmission path.

[0170] In one possible implementation, based on actual needs, the compression device may further encapsulate the compressed first message data before sending it. For example, it may encapsulate an IPv6 Segment Routing IPv6 (SRv6) header or a Multi-Protocol Label Switching (MPLS) header.

[0171] Step 404: The data decompression device processes the first message according to the data decompression capability of the device.

[0172] In implementation, after receiving a first message, the interface board of the data decompression device removes the encapsulated SRv6 header or MPLS header if the first message is encapsulated with one. Then, if the first message contains an IP PPP header, the first message is determined to be compressed. Furthermore, the quintuple in the IP header of the first message is matched against the target quintuple in the ACL. If a match is found, the message is forwarded to the decompression service board, which decompresses the first message and forwards the decompressed message to the interface board, which then performs subsequent forwarding.

[0173] The present application provides a method for transmitting data in a network. A data decompression device notifies a data compression device of its own data decompression capabilities, allowing the data compression device to learn the data decompression capabilities of each data decompression device in the data decompression system. Consequently, the data compression device can decide whether to compress data and send it to the data decompression device based on the data decompression capabilities of each data decompression device in the data decompression system. This avoids data loss caused by a data compression device sending compressed data to a data decompression system that lacks data decompression capabilities.

[0174] The present application also provides a method for data transmission in a network, as shown in FIG5 , wherein the processing of the method may include the following steps:

[0175] Step 501: A first network device generates a notification message, where the notification message is used to indicate the data decompression capability of the first network device. The notification message is a BGP Flowspec message.

[0176] Here, the first network device may be a switch, a router, etc. For example, the first network device may be a PE, a CE, etc. As shown in FIG1 , the first network device may be a PE21, a PE22, etc.

[0177] In an implementation, the first network device may determine the data decompression capability of the device.

[0178] Exemplarily, the first network device may be configured with at least one decompression service board, and each decompression service board may have at least one processor, which may be used to perform data decompression and other processing. For each decompression service board, the first network device detects whether each processor on the decompression service board can normally perform data decompression. If it is determined that at least one processor on the decompression service board can normally perform data decompression, it is determined that the decompression service board has data decompression capability. Conversely, if it is determined that all processors on the decompression service board cannot perform data decompression, it is determined that the decompression service board does not have data decompression capability. If the first network device determines that at least one decompression service board in the device has data decompression capability, it may be determined that the device has data decompression capability. Conversely, if it is determined that all decompression service boards in the device do not have data decompression capability, it may be determined that the device does not have data decompression capability.

[0179] After determining the data decompression capability of the device, the first network device may generate a notification message to notify the second network device of the data decompression capability of the device.

[0180] Exemplarily, the notification message is a BGP Flowspec message. If the first network device determines that the device has data decompression capability, it generates a first BGP Flowspec message, and the first BGP Flowspec message is used to indicate that the first network device has data decompression capability. If the first network device determines that the device does not have data decompression capability, it generates a second BGP Flowspec message, and the second BGP Flowspec message is used to indicate that the first network device does not have data decompression capability. In one possible implementation, the first BGP Flowspec message can be a BGP Flowspec route publication message, and the second BGP Flowspec message can be a BGP Flowspec route withdrawal message.

[0181] Step 502: The first network device sends a notification message to the second network device.

[0182] The second network device may be a switch, a router, etc. For example, the second network device may be a PE, a CE, etc. As shown in FIG1 , the first network device may be a PE11, a PE12, etc.

[0183] In a possible implementation, the second network device may be a data compression device.

[0184] Step 503: The second network device determines the data decompression capability of the first network device according to the notification message.

[0185] In implementation, after receiving the notification message sent by the first network device, the second network device may determine the data decompression capability of the first network device according to the notification message.

[0186] Illustratively, if the second network device receives a BGP Flowspec route publish message sent by the first network device, it determines that the first network device has data decompression capability. If the second network device receives a BGP Flowspec route withdraw message sent by the first network device, it determines that the first network device does not have data decompression capability.

[0187] After determining the data decompression capability of the first network device, the second network device may send data to the first network device according to the data decompression capability of the first network device.

[0188] Based on the same technical concept, an embodiment of the present application further provides a device for transmitting data in a network. The device 500 can be applied to a data decompression device, such as PE21 or PE22 shown in FIG. 1 . As shown in FIG. 6 , the device 500 includes:

[0189] A determination module 510 is configured to determine the data decompression capability of the data decompression system;

[0190] The sending module 520 is configured to send a first message to the data compression device, wherein the first message is used to indicate the decompression capability of the data decompression system.

[0191] In a possible implementation, the determining module 510 is configured to:

[0192] The data decompression capability of the data decompression system is determined based on the data decompression capability of the first data decompression device, the data decompression capability of the second data decompression device, and the status of the path between the first data decompression device and the second data decompression device.

[0193] In a possible implementation, the determining module 510 is configured to:

[0194] If it is determined that both the first data decompression device and the second data decompression device have data decompression capabilities, or,

[0195] It is determined that one of the first data decompression device and the second data decompression device has data decompression capability and the other device does not have decompression capability, and the path between the first data decompression device and the second data decompression device is reachable, then it is determined that the data decompression system has data decompression capability.

[0196] In a possible implementation, the determining module 510 is configured to:

[0197] If it is determined that both the first data decompression device and the second data decompression device do not have data decompression capabilities, or,

[0198] It is determined that one of the first data decompression device and the second data decompression device does not have data decompression capability, and a path between the first data decompression device and the second data decompression device is unreachable, or,

[0199] It is determined that the first data decompression device has data decompression capability, the data decompression capability of the second data decompression device is unknown, and the path between the first data decompression device and the second data decompression device is unreachable, or,

[0200] If it is determined that the first data decompression device does not have the data decompression capability, the data decompression capability of the second data decompression device is unknown, and the path between the first data decompression device and the second data decompression device is reachable, then it is determined that the data decompression system does not have the decompression capability.

[0201] In a possible implementation, the determining module 510 is further configured to:

[0202] Determine the data decompression capabilities of this device;

[0203] The sending module 520 is further configured to:

[0204] Sending a first remote backup service (RBS) message to the second data decompression device, wherein the first RBS message is used to indicate a data decompression capability of the first data decompression device;

[0205] The device further includes a receiving module, configured to:

[0206] A second RBS message is received from the second data decompression device, wherein the second RBS message is used to indicate the data decompression capability of the second data decompression device.

[0207] In a possible implementation, when the data decompression system has data decompression capability, the first message is a Border Gateway Protocol Flow Rule BGP Flowspec routing publication message, and the first message is used to indicate that the data decompression system has decompression capability.

[0208] In a possible implementation, when the data decompression system does not have a decompression capability, the first message is a BGP Flowspec route withdrawal message, and the first message is used to indicate that the data decompression system does not have a decompression capability.

[0209] In a possible implementation, the apparatus further includes a receiving module, configured to:

[0210] receiving first data sent by the data compression device;

[0211] If it is determined that the first data is compressed data and it is determined that the first data decompression device has data decompression capability, decompressing the first data;

[0212] If it is determined that the first data is compressed data, and it is determined that the first data decompression device does not have data decompression capability, the first data is forwarded to the second data decompression device.

[0213] In addition, the apparatus 500 may further perform the following processing:

[0214] The determination module 510 is further configured to determine the data decompression capability of the first data decompression device;

[0215] The sending module 520 is further configured to send a first message to the data compression device, wherein the first message is used to indicate the data decompression capability of the first data decompression device.

[0216] In a possible implementation manner, the first message carries the address of the first data compression device.

[0217] In a possible implementation, when the data decompression device has a decompression capability, the first message is a BGP Flowspec route publishing message, and the first message is used to indicate that the data decompression device has a decompression capability.

[0218] In a possible implementation, when the data decompression device does not have a decompression capability, the first message is a BGP Flowspec route withdrawal message, and the first message is used to indicate that the data decompression device does not have a decompression capability.

[0219] In one possible implementation, the first message is an update message, the attribute identifier Attr.Flags field in the update message is used to carry a data decompression capability identifier, the attribute value Attr.Type Code field in the update message is used to carry data decompression capability indication information, the data decompression capability indication information is used to indicate the data decompression capability of the first data decompression device, and the network layer reachability information NLRI field in the update message is used to carry the address of the first data compression device.

[0220] It should be noted that the apparatus for transmitting data over a network provided in the above embodiments only illustrates the division of the aforementioned functional modules when performing data transmission over a network. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the apparatus for transmitting data over a network provided in the above embodiments and the method embodiment for transmitting data over a network are conceptually identical. The specific implementation process is detailed in the method embodiment and will not be further described here.

[0221] Based on the same technical concept, an embodiment of the present application further provides a device for transmitting data in a network. The device 600 can be applied to a data compression device, such as PE11 or PE12 shown in FIG. 1 . As shown in FIG. 7 , the device 600 includes:

[0222] A receiving module 610 is configured to receive a first message sent by a data decompression device in the data decompression system, wherein the first message is used to indicate whether the data decompression system has a decompression capability;

[0223] The sending module 620 is configured to send the first data to the data decompression device in the data decompression system according to the data decompression capability of the data decompression system.

[0224] In a possible implementation, the sending module 620 is configured to:

[0225] If the data decompression system has decompression capability, compressing the first data;

[0226] The compressed first data is sent to the data decompression system.

[0227] In a possible implementation, the sending module 620 is configured to:

[0228] If the data decompression system does not have decompression capability, the first data is not compressed and is sent to the data decompression system.

[0229] In addition, the apparatus 600 may further perform the following processing:

[0230] The receiving module 600 is further configured to receive first messages respectively sent by the plurality of data decompression devices, wherein the first messages are used to indicate the decompression capability of the corresponding data decompression device;

[0231] The sending module 610 is further configured to send the first data to the data decompression system according to the data decompression capabilities of the multiple data decompression devices.

[0232] In a possible implementation, the first message carries an address of a corresponding data decompression device.

[0233] In a possible implementation, the receiving module 610 is further configured to:

[0234] For the first message sent by each data decompression device, if the first message indicates that the data decompression device has decompression capability, use the address of the data decompression device as the next hop address of a target route, wherein the target route is a route corresponding to the destination address of the first data;

[0235] The sending module 620 is further configured to:

[0236] If the target route has multiple next-hop addresses, select the first next-hop address from the multiple next-hop addresses based on load balancing;

[0237] The first data is compressed, and the compressed first data is sent to a data decompression device corresponding to the address of the first next hop.

[0238] In a possible implementation, the receiving module 610 is further configured to:

[0239] For a first message sent by each data decompression device, if the first message indicates that the data decompression device has decompression capability, determining a compressed data transmission path with the address of the data decompression device as the destination address;

[0240] The sending module 620 is further configured to:

[0241] If there are multiple compressed data transmission paths, selecting a first compressed data transmission path with the highest priority among the multiple compressed data transmission paths;

[0242] The first data is compressed, and the compressed first data is sent through the first compressed data transmission path.

[0243] It should be noted that the apparatus for transmitting data over a network provided in the above embodiments only illustrates the division of the aforementioned functional modules when performing data transmission over a network. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the apparatus for transmitting data over a network provided in the above embodiments and the method embodiment for transmitting data over a network are conceptually identical. The specific implementation process is detailed in the method embodiment and will not be further described here.

[0244] FIG8 is a schematic diagram of the structure of a network device provided in an embodiment of the present application. The network device may be a data decompression device, such as PE21 or PE22 shown in FIG1 . The network device may also be a data compression device, such as PE11 and PE12 shown in FIG1 . The network device may also be the first network device or the second network device in FIG5 .

[0245] The network device 700 includes at least one processor 701 , a memory 702 , and at least one network interface 703 .

[0246] The processor 701 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 701 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0247] The memory 702 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Optionally, the memory 702 exists independently and is connected to the processor 701 via an internal connection 704. Alternatively, the memory 702 and the processor 701 are optionally integrated together.

[0248] The network interface 703 uses any transceiver-like device for communicating with other devices or communication networks. For example, the network interface 703 includes at least one of a wired network interface and a wireless network interface. For example, the wired network interface is an Ethernet interface. For example, the Ethernet interface is an optical interface, an electrical interface, or a combination thereof. For example, the wireless network interface is a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.

[0249] In some embodiments, the processor 701 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG. 8 .

[0250] In some embodiments, network device 700 optionally includes multiple processors, such as processor 701 and processor 705 shown in Appendix 8. Each of these processors is, for example, a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein optionally refers to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0251] In some embodiments, network device 700 further includes internal connections 704. Processor 701, memory 702, and at least one network interface 703 are connected via internal connections 704. Internal connections 704 include pathways for transmitting information between the aforementioned components. Optionally, internal connections 704 are boards or buses. Optionally, internal connections 704 are divided into address buses, data buses, control buses, and the like.

[0252] In some embodiments, network device 700 further includes an input / output interface 706 , which is connected to internal connection 704 .

[0253] Optionally, the processor 701 implements the method in the above embodiment by reading the program code 710 stored in the memory 702, or the processor 701 implements the method in the above embodiment by internally stored program code. In the case where the processor 701 implements the method in the above embodiment by reading the program code 710 stored in the memory 702, the memory 702 stores the program code that implements the method provided in the embodiment of the present application.

[0254] For more details on how the processor 701 implements the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.

[0255] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same role and function. It should be understood that there is no logical or temporal dependency between "first" and "second", nor is there a limit on quantity and execution order. It should also be understood that although the above description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the various examples, a first network device can be referred to as a second network device, and similarly, a second network device can be referred to as a first network device. The first network device and the second network device can both be network devices, and in some cases, can be separate and different network devices.

[0256] Those skilled in the art will appreciate that the various method steps and units described in the embodiments disclosed in this application can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0257] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for data transmission in a network, It is characterized in that The network includes a data decompression system, the data decompression system includes a first data decompression device and a second data decompression device, the method is applied to the first data decompression device, and the method includes: determining a data decompression capability of the data decompression system; A first message is sent to a data compression device, wherein the first message is used to indicate a decompression capability of the data decompression system.

2. The method according to claim 1, It is characterized in that The determining the data decompression capability of the data decompression system comprises: The data decompression capability of the data decompression system is determined according to the data decompression capability of the first data decompression device, the data decompression capability of the second data decompression device, and the state of the path between the first data decompression device and the second data decompression device.

3. The method according to claim 2, It is characterized in that The data decompression capability of the first data decompression device, the data decompression capability of the second data decompression device, and the state of the path between the first data decompression device and the second data decompression device include: If it is determined that both the first data decompression device and the second data decompression device have data decompression capabilities, or, It is determined that one of the first data decompression device and the second data decompression device has data decompression capability, and a path between the first data decompression device and the second data decompression device is reachable, then it is determined that the data decompression system has data decompression capability.

4. The method according to claim 2, It is characterized in that The data decompression capability of the first data decompression device, the data decompression capability of the second data decompression device, and the state of the path between the first data decompression device and the second data decompression device include: If it is determined that both the first data decompression device and the second data decompression device do not have data decompression capabilities, or, It is determined that one of the first data decompression device and the second data decompression device does not have data decompression capability, and a path between the first data decompression device and the second data decompression device is unreachable, or, It is determined that the first data decompression device has data decompression capability, the data decompression capability of the second data decompression device is unknown, and the path between the first data decompression device and the second data decompression device is unreachable, or, It is determined that the first data decompression device does not have the data decompression capability, the data decompression capability of the second data decompression device is unknown, and the path between the first data decompression device and the second data decompression device is reachable, then it is determined that the data decompression system does not have the decompression capability.

5. The method according to any one of claims 2 to 4, It is characterized in that The method further comprises: Determine the data decompression capabilities of this device; Sending a first remote backup service RBS message to the second data decompression device, wherein the first RBS message is used to indicate the data decompression capability of the first data decompression device; A second RBS message is received from the second data decompression device, wherein the second RBS message is used to indicate a data decompression capability of the second data decompression device.

6. The method according to any one of claims 2 to 5, It is characterized in that In the case that the data decompression system has the data decompression capability, the first message is a Border Gateway Protocol Flow Rules BGP Flowspec routing publication message, and the first message is used to indicate that the data decompression system has the decompression capability.

7. The method according to claim 6, It is characterized in that In the case that the data decompression system does not have the decompression capability, the first message is a BGP Flowspec route withdrawal message, and the first message is used to indicate that the data decompression system does not have the decompression capability.

8. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: receiving first data sent by the data compression device; If it is determined that the first data is compressed data, and it is determined that the first data decompression device has data decompression capability, decompressing the first data; If it is determined that the first data is compressed data, and it is determined that the first data decompression device does not have data decompression capability, the first data is forwarded to the second data decompression device.

9. A method for data transmission in a network, It is characterized in that The network includes a data decompression system, the data decompression system includes a first data decompression device and a second data decompression device, the method is applied to the first data decompression device, and the method includes: determining a data decompression capability of the first data decompression device; A first message is sent to a data compression device, wherein the first message is used to indicate a data decompression capability of the first data decompression device.

10. The method according to claim 9, It is characterized in that The first message carries the address of the first data compression device.

11. The method according to claim 9 or 10, It is characterized in that In the case that the data decompression device has a decompression capability, the first message is a BGP Flowspec route publishing message, and the first message is used to indicate that the data decompression device has a decompression capability.

12. The method according to claim 11, It is characterized in that In the case that the data decompression device does not have the decompression capability, the first message is a BGP Flowspec route withdrawal message, and the first message is used to indicate that the data decompression device does not have the decompression capability.

13. The method according to claim 10, It is characterized in that The first message is an update message, the attribute identifier Attr.Flags field in the update message is used to carry the data decompression capability identifier, the attribute value Attr.Type Code field in the update message is used to carry the data decompression capability indication information, the data decompression capability indication information is used to indicate the data decompression capability of the first data decompression device, and the network layer reachable information NLRI field in the update message is used to carry the address of the first data compression device.

14. A method for data transmission in a network, It is characterized in that The network includes a data compression system and a data decompression system, the data compression system includes at least one data compression device, the data decompression system includes a plurality of data decompression devices, the method is applied to the data compression device, and the method includes: receiving a first message sent by a data decompression device in the data decompression system, wherein the first message is used to indicate whether the data decompression system has a decompression capability; According to the data decompression capability of the data decompression system, first data is sent to a data decompression device in the data decompression system.

15. The method according to claim 14, It is characterized in that The sending the first data to the data decompression device in the data decompression system according to the data decompression capability of the data decompression system comprises: If the data decompression system has decompression capability, compressing the first data; The compressed first data is sent to the data decompression system.

16. The method according to claim 14, It is characterized in that The sending the first data to the data decompression device in the data decompression system according to the data decompression capability of the data decompression system comprises: If the data decompression system does not have the decompression capability, the first data is not compressed and is sent to the data decompression system.

17. A method for data transmission in a network, It is characterized in that The network includes a data compression system and a data decompression system, the data compression system includes at least one data compression device, the data decompression system includes a plurality of data decompression devices, the method is applied to the data compression device, and the method includes: receiving first messages respectively sent by the plurality of data decompression devices, wherein the first messages are used to indicate the decompression capability of the corresponding data decompression device; The first data is sent to the data decompression system according to the data decompression capabilities of the plurality of data decompression devices.

18. The method according to claim 17, It is characterized in that The first message carries the address of the corresponding data decompression device.

19. The method according to claim 18, It is characterized in that The method further comprises: For the first message sent by each data decompression device, if the first message indicates that the data decompression device has decompression capability, the address of the data decompression device is used as the address of the next hop of the target route, wherein the target route is the route corresponding to the destination address of the first data; The sending the first data to the data decompression system according to the data decompression capabilities of the multiple data decompression devices comprises: If the target route has multiple next-hop addresses, selecting the first next-hop address from the multiple next-hop addresses according to load sharing; The first data is compressed, and the compressed first data is sent to a data decompression device corresponding to the address of the first next hop.

20. The method according to claim 18, It is characterized in that The method further comprises: For a first message sent by each data decompression device, if the first message indicates that the data decompression device has decompression capability, determining a compressed data transmission path with the address of the data decompression device as the destination address; The sending the first data to the data decompression system according to the data decompression capabilities of the multiple data decompression devices comprises: If there are multiple compressed data transmission paths, selecting a first compressed data transmission path with the highest priority among the multiple compressed data transmission paths; The first data is compressed, and the compressed first data is sent through the first compressed data transmission path.

21. A device for transmitting data in a network, It is characterized in that The network includes a data decompression system, the data decompression system includes a first data decompression device and a second data decompression device, the apparatus is applied to the first data decompression device, and the apparatus includes: A determination module, used to determine the data decompression capability of the data decompression system; The sending module is used to send a first message to the data compression device, wherein the first message is used to indicate the decompression capability of the data decompression system.

22. A device for transmitting data in a network, It is characterized in that The network includes a data decompression system, the data decompression system includes a first data decompression device and a second data decompression device, the apparatus is applied to the first data decompression device, and the apparatus includes: a determination module, configured to determine a data decompression capability of the first data decompression device; A sending module is used to send a first message to a data compression device, wherein the first message is used to indicate the data decompression capability of the first data decompression device.

23. A device for transmitting data in a network, It is characterized in that The network includes a data compression system and a data decompression system, the data compression system includes at least one data compression device, the data decompression system includes a plurality of data decompression devices, the apparatus is applied to the data compression device, and the apparatus includes: A receiving module, configured to receive a first message sent by a data decompression device in the data decompression system, wherein the first message is used to indicate whether the data decompression system has a decompression capability; The sending module is used to send the first data to the data decompression device in the data decompression system according to the data decompression capability of the data decompression system.

24. A device for transmitting data in a network, It is characterized in that The network includes a data compression system and a data decompression system, the data compression system includes at least one data compression device, the data decompression system includes a plurality of data decompression devices, the apparatus is applied to the data compression device, and the apparatus includes: A receiving module, configured to receive first messages respectively sent by the plurality of data decompression devices, wherein the first messages are used to indicate the decompression capability of the corresponding data decompression device; A sending module is used to send the first data to the data decompression system according to the data decompression capabilities of the multiple data decompression devices.

25. A data decompression device, It is characterized in that The data decompression device includes a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the data decompression device performs the method for data transmission in a network according to any one of claims 1 to 13.

26. A data compression device, It is characterized in that The data compression device includes a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the data compression device performs the method for data transmission in a network according to any one of claims 14 to 20.

27. A network, It is characterized in that The network includes the data decompression device according to claim 25 and the data decompression device according to claim 26.

28. A computer readable storage medium, It is characterized in that The method comprises computer program instructions. When the computer program instructions are executed by a data decompression device, the data decompression device performs the method for data transmission in a network as claimed in any one of claims 1 to 13.

29. A computer-readable storage medium, It is characterized in that The method comprises computer program instructions, and when the computer program instructions are executed by a data compression device, the data compression device performs the method for data transmission in a network as claimed in any one of claims 14 to 20.

Citation Information

Patent Citations

  • Method for capacity allocation of network equipment, network equipment and system

    CN104601351A

  • System On Chip and Operating Method of System On Chip

    KR1020160142653A

  • Method and Apparatus for Concurrent and Stateful Decompression of Multiple Compressed Data Streams

    US20100020825A1

  • Communication method and apparatus, and device

    WO2023005452A1

  • Computing power release method and apparatus, and computing power update method and apparatus

    WO2023273957A1