Content distribution network data transmission method and device
By acquiring multiple paths in parallel transmission data blocks in the CDN, the problem of data transmission affecting fluctuations in a single path link is solved, and more efficient and reliable data transmission is achieved, which improves user access experience and reduces the pressure on the source station.
Patent Information
- Application Number
- CN202411770674.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-11
AI Technical Summary
When the existing content distribution network (CDN) transmits dynamic resources, the link quality of a single path fluctuates greatly, affecting the reliability and efficiency of data transmission, resulting in poor user access experience.
When the client initiates a data acquisition request, it obtains a collection of multiple paths and transmits data blocks in parallel according to these paths, improving data transmission efficiency. The specific steps include slicing the transmitted data, identifying the characteristic value, and transmitting the characteristic value and data slices in parallel according to the path.
When the quality fluctuates greatly, the parallel transmission of multiple paths is achieved through multiple paths, which improves the reliability and efficiency of data transmission, improves user access experience, and reduces the pressure on the source station.
Smart Images

Figure CN119814649A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of data transmission, and in particular to a content distribution network data transmission method, a content distribution network data transmission device, an electronic device, and a computer-readable storage medium. Background Art
[0002] CDN (Content Delivery Network) is a distributed network architecture that accelerates content transmission and distribution by deploying multiple edge nodes within a specified range and caching content on the node closest to the user. Currently, dynamic resources need to be dynamically obtained from the source station and then transmitted to the client, which puts a lot of pressure on the source station. In addition, if the dynamic resource may be a large file, the large file occupies a lot of bandwidth resources, increases the transmission time, and reduces the acceleration experience effect. Especially during business peak hours, the user access experience is not good.
[0003] Furthermore, the edge node transmits dynamic resources in the CDN network along a path, and the path includes multiple nodes in the CDN network. If the path quality fluctuates greatly, it will seriously affect the reliability and efficiency of data transmission, and further affect the user access experience. Summary of the invention
[0004] In view of the above problems, a content distribution network data transmission method and device are proposed to overcome the above problems or at least partially solve the above problems. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, a method for transmitting data in a content distribution network is provided, wherein the content distribution network includes a node, and the node of the content distribution network is connected to a client and an origin station. The method includes:
[0006] When the client initiates a data acquisition request, a path set is acquired; the path set includes at least one path, and the path is a path for data to be transmitted from the client to the source station through a node, or a path for data to be transmitted from the source station to the client;
[0007] The data blocks are transmitted in parallel according to the paths to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client.
[0008] Optionally, the nodes include edge nodes and back-to-source nodes, the back-to-source nodes are connected to the source station and the transit node, and the path is obtained by comprehensive calculation based on quality data of the nodes and the source station.
[0009] Optionally, before transmitting the data blocks in parallel according to the paths, the method further includes:
[0010] Slicing the transmission data to obtain data slices;
[0011] are eigenvalues corresponding to the data slice identifiers respectively;
[0012] The data slice and the feature value corresponding to the data slice are used as a data block.
[0013] Optionally, transmitting the data blocks in parallel according to the paths includes:
[0014] Transmitting the characteristic value to a sending node in parallel according to the path; the sending node is used to compare the characteristic value with the cached characteristic value;
[0015] If the characteristic value is different from the cached characteristic value, the sending node is used to continue to transmit the characteristic value in parallel according to the path, cache the characteristic value as the cached characteristic value, and cache the data slice as the cached data slice.
[0016] Optionally, the method further comprises:
[0017] If the characteristic value is the same as the cache characteristic value, the sending node is used to obtain the cache data slice corresponding to the cache characteristic value locally, and transmit the cache data slice in parallel to the client according to the path.
[0018] Optionally, the method further comprises:
[0019] The data slices are compressed to obtain compressed data; a compressed identifier is added to the compressed data; the edge node is used to decompress the compressed data with the compressed identifier when receiving it to obtain the corresponding characteristic value and the data slice, and sequentially splice the data slices into transmission data.
[0020] Optionally, the receiving node is used to clear the cache characteristic value according to a preset clearing rule.
[0021] The embodiment of the present invention further discloses a content distribution network data transmission device, wherein the content distribution network includes a node, the node of the content distribution network is connected to a client and a source station, and the device includes:
[0022] A data acquisition module, configured to acquire a path set when the client initiates a data acquisition request; the path set includes at least one path, the path being a path for data to be transmitted from the client to the source station through a node, or a path for data to be transmitted from the source station to the client;
[0023] A data transmission module is used to transmit data blocks in parallel according to the path to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client.
[0024] In another aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes any of the above-mentioned content distribution network data transmission methods.
[0025] In yet another aspect of the present invention, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is enabled to execute any of the above-mentioned methods for transmitting data in a content distribution network.
[0026] Compared with the related art, the embodiments of the present invention have at least the following advantages:
[0027] In an embodiment of the present invention, a content distribution network may include a node, and the node of the content distribution network is connected to a source station and a client. When a client initiates a data acquisition request, a path set is obtained, and the path set includes at least one path, and the path is a path for data to be transmitted from the client to the source station through the node, or a path for data to be transmitted from the source station to the client. Then, data blocks can be transmitted in parallel according to the path to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client. The embodiment of the present invention can obtain multiple paths to transmit data separately, thereby improving the efficiency of data transmission. Even if the quality of a certain path fluctuates greatly, the reliability and efficiency of data transmission can be guaranteed, thereby ensuring the user access experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.
[0029] Figure 1 A flowchart of a method for transmitting data in a content distribution network provided in an embodiment of the present invention;
[0030] Figure 2 A (downlink) parallel transmission principle diagram provided in an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of a (uplink) parallel transmission principle provided in an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of an uplink compression principle provided in an embodiment of the present invention
[0033] Figure 5A schematic diagram of a downlink compression principle provided in an embodiment of the present invention;
[0034] Figure 6 A schematic diagram of an overall process provided in an embodiment of the present invention;
[0035] Figure 7 A byte stream cache timing diagram provided in an embodiment of the present invention;
[0036] Figure 8 A structural block diagram of a content distribution network data transmission device provided in an embodiment of the present invention;
[0037] Fig. 9 The present invention is a block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0039] In the specific implementation, CDN (Content Delivery Network) can achieve dynamic acceleration. Specifically, CDN dynamic acceleration refers to the CDN acceleration service for dynamic interactive content (such as video, text, audio, pictures and other transmission data transmitted in the CDN network). Through core self-developed technologies such as intelligent scheduling and transmission optimization, it effectively solves the slow response problem of the source station caused by public network link jitter and congestion, and significantly improves the access speed and stability of various dynamic instructions and interfaces in office applications, business systems, finance and gaming industries based on TCP / UDP (Transmission Control Protocol) / (User Datagram Protocol), thereby ensuring the access experience of end users.
[0040] Among them, the CDN network may include edge nodes, back-to-source nodes, and transit nodes, and the back-to-source nodes may be connected to the source station (source station server). Specifically, the edge node is the node closest to the user in the CDN network, and is usually deployed in a geographical location close to the user, such as a city, region, or network access point. The back-to-source node is a server or device in the CDN network that is responsible for obtaining the original transmission data from the source station and distributing it to the edge node. The source station is a server responsible for storing the original content, usually a main server, database server, etc. The transit node is an intermediate node (parent node) used for data transmission in the CDN network, and is usually located between the edge node and the back-to-source node.
[0041] After observation, the following problems were found in the CDN network: 1) A single path (link) is used for data transmission. If the link quality fluctuates greatly, the reliability and efficiency of data transmission will be seriously affected; 2) For dynamic interactive content (dynamic resources), they all need to be dynamically obtained from the source station in the CDN network, which puts a lot of pressure on the source station and has some differences in the transmitted data stream. For some identical scenarios, for example, emails sent by customers may have mostly similar content, and only need to make some minor modifications on the original basis, or most of the content of PPT (PowerPoint Presentation) is the same, and only some data has been changed. When such application scenarios pass through the application acceleration network, only the different parts need to be transmitted, and the same parts can be filled in the corresponding positions with the byte stream cached by the node. There is no need to repeatedly transmit the same parts, which can effectively reduce the interaction frequency with the source station and reduce the pressure on the source station; 3) Large files occupy a lot of bandwidth resources, increase the sending time, and reduce the acceleration experience effect, especially during business peak hours, the user access experience is not good.
[0042] In summary, a dynamic acceleration method is needed in the CDN network, which can improve transmission efficiency, reduce the internal transmission bandwidth of the CDN network, and relieve the pressure on the source station. Therefore, an embodiment of the present invention proposes a transmission optimization method for CDN dynamic acceleration, which can greatly save bandwidth resources, improve the transmission speed and efficiency of data in the CDN network, reduce the pressure on the source station, and reduce costs and increase efficiency.
[0043] Reference Figure 1 , is a flowchart of a method for transmitting data in a content distribution network provided in an embodiment of the present invention, such as Figure 1 As shown, the content distribution network includes multiple nodes, and the nodes of the content distribution network are connected to the client and the source station. The method may specifically include the following steps:
[0044] Step 101: when the client initiates a data acquisition request, a path set is acquired; the path set includes at least one path, and the path is a path for data to be transmitted from the client to the source station through a node, or for data to be transmitted from the source station to the client;
[0045] Step 102: Transmit data blocks in parallel according to the path to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client.
[0046] In one embodiment of the present invention, the content distribution network includes nodes, and the nodes include at least transit nodes, edge nodes, and back-to-source nodes. Data is transmitted between edge nodes and back-to-source nodes through transit nodes to feed back data requested by clients to clients. Back-to-source nodes are connected to source stations and can obtain original data from source stations. Edge nodes are connected to clients. For example, referring to Figure 2 , is a (downlink) parallel transmission principle diagram provided in an embodiment of the present invention. When data is transmitted downlink, that is, data is transmitted from the source station to the user end (client / user side), the starting node (receiving node) may be a back-to-source node, and the ending node (sending node) may be an edge node. The back-to-source node may forward the data to the edge node through the transfer node 1, the transfer node 2 or the transfer node 3; refer to Figure 3 , which is a (uplink) parallel transmission principle diagram provided in an embodiment of the present invention. When uplink data is transmitted, that is, data is transmitted from the user end to the source station, the starting node may be an edge node, and the ending node may be a back-to-source node. The edge node may forward the data to the back-to-source node through transit node 1, transit node 2, or transit node 3.
[0047] In the embodiment of the present invention, the path is obtained by comprehensive calculation based on the quality data of the node and the source station. Specifically, the device or component for generating the path is described as follows:
[0048] Application acceleration gateway: Accelerates dynamic resources (such as data transmission between the source station and the user end) according to the customer's configuration, and provides blacklist and whitelist, access control, speed limit, compression and other functions. According to the optimal path calculated by the central computing service, it ensures that the request is forwarded normally within the CDN node, and ultimately achieves the fastest and most stable return to the source. Among them, the application acceleration gateway is deployed in the edge node, transit node and return to the source node, or communicates with the edge node, transit node and return to the source node. The edge node where the application acceleration gateway is deployed can be called an edge gateway node.
[0049] Dynamic path proxy service: responsible for the detection of data link quality between CDN nodes and between nodes and source stations, as well as link quality quantification calculation services. As a bridge between the central computing service and the application acceleration gateway, it is responsible for the distribution and setting of the path.
[0050] Central computing service: responsible for performing comprehensive calculations on the quality data of nodes and source stations uploaded by the dynamic path proxy service to obtain the optimal path back to the source, and sending the optimal path data to the application acceleration gateway through the dynamic path proxy service. In this way, the edge gateway node obtains multiple paths.
[0051] In an embodiment of the present invention, the central computing service performs comprehensive calculations on the quality data of the nodes and source station servers uploaded by the dynamic path proxy service to obtain the optimal path, and sends the optimal path to the edge gateway node through the dynamic path proxy service. The edge gateway node establishes a connection with the next-hop parent node (transit node) based on the topN optimal paths sent by the dynamic path proxy service, and the parent node establishes a connection with the back-to-source node, and transmits the sliced data blocks in parallel to the receiving nodes, such as the back-to-source node or the edge node. The back-to-source node or the edge node then restores the data blocks to the original transmission data in sequence before transmitting them to the source station or the client.
[0052] It can be seen that the embodiment of the present invention can establish multiple paths for parallel transmission from the user side to the source server, and can send fewer packets to the path with poor quality and more packets to the path with good quality, which is conducive to improving data transmission efficiency, especially when the quality of a single path fluctuates greatly. In addition, by transmitting the target data in parallel through multiple paths, the data transmission efficiency can be significantly improved.
[0053] In the above-mentioned content distribution network data transmission method, the content distribution network may include nodes, and the nodes of the content distribution network are connected to the source station and the client. When the client initiates a data acquisition request, a path set is obtained, and the path set includes at least one path, and the path is a path for data to be transmitted from the client to the source station through the node, or the path for data to be transmitted from the source station to the client. Then, data blocks can be transmitted in parallel according to the path to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client. The embodiment of the present invention can obtain multiple paths to transmit data separately, thereby improving the data transmission efficiency. Even if the quality of a certain path fluctuates greatly, the reliability and efficiency of data transmission can be guaranteed, thereby ensuring the user access experience.
[0054] In one embodiment of the present invention, before transmitting the data blocks in parallel according to the paths, the method further includes:
[0055] Slicing the transmission data to obtain data slices;
[0056] are eigenvalues corresponding to the data slice identifiers respectively;
[0057] The data slice and the feature value corresponding to the data slice are used as a data block.
[0058] In an embodiment of the present invention, after the sending node (such as a back-to-source node or an edge node) obtains data (such as dynamic resources of the source station), it splits the transmission data into data slices as transmission data to be transmitted, and marks each data slice with a characteristic value (such as a marking sequence number for identifying the corresponding data slice). Then, the sending node can distribute the forwarding data slices and characteristic values to the receiving node according to the transmission speed of each path, wherein the receiving node can be any node in the network, including a back-to-source node, an edge node, and a transit node. After receiving the characteristic value and data slice, the receiving node converges and splices the data slices to restore them to the transmission data before slicing. For example, for the transmission data data, it can be sliced into k1+k1_data, k2+k2_data, wherein k1 and k2 represent characteristic values, and k1_data and k2_data represent data slices.
[0059] In one embodiment of the present invention, transmitting the data blocks in parallel according to the paths includes:
[0060] Transmitting the characteristic value to a sending node in parallel according to the path; the sending node is used to compare the characteristic value with the cached characteristic value;
[0061] If the characteristic value is different from the cached characteristic value, the sending node is used to continue to transmit the characteristic value in parallel according to the path, cache the characteristic value as the cached characteristic value, and cache the data slice as the cached data slice;
[0062] If the characteristic value is the same as the cache characteristic value, the sending node is used to obtain the cache data slice corresponding to the cache characteristic value locally, and transmit the cache data slice in parallel to the client according to the path.
[0063] In an embodiment of the present invention, a sending node can implement byte stream caching, data slicing and feature value caching, wherein, for ease of distinction, data slices and feature values cached in the sending node are referred to as cached data slices and cached feature values. Specifically, an embodiment of the present invention supports memory and disk caching, by slicing the data and identifying the feature values. When the sending node has cached the feature values and data slices, there is no need to continue to send data acquisition requests (feature values) to the source station or other nodes. The sending node will obtain the locally cached cached data slices to the receiving node, making full use of machine resources, reducing interactions with the source station, and alleviating the pressure on the source station. In addition, in order to avoid excessive use of machine resources due to long-term caching of data slices and feature values by the sending node, data slices and feature values can also be cleared according to preset clearing rules, for example, they can be cleared regularly according to time, data importance, etc.
[0064] Exemplarily, the back-to-source node receives data as transmission data to be transmitted, splits it and marks the serial number. Specifically, the transmission data is divided into blocks to obtain data slices, and each data slice is identified using a characteristic value. Then the client initiates a data acquisition request, and sends the characteristic value corresponding to each data slice to the sending node in parallel along the path. When the sending node receives these characteristic values, it compares them with the cached characteristic values of the cached data slices cached at the sending node. If there are the same cached characteristic values and characteristic values, the sending node does not need to transmit the characteristic values to the next sending node. It only needs to notify the sending node to send the data slices that have not been cached by the receiving node. When the receiving node receives the data slices and characteristic values sent by the sending node, it can cache the data slices and characteristic values as cached data slices and cached characteristic values for subsequent transmission. In this way, if a certain sending node has received the data slices, it can directly send its locally cached data slices to the back-to-source node or edge node to end the data transmission process, further improving the data transmission efficiency.
[0065] For example, assuming a path is [client-edge node 1-transit node 2-back-source node 3-source station], the source station sends data to back-source node 3, node 3 sends it to node 2, and node 2 sends it to node 1. Node 1, node 2, and node 3 will all cache feature values and data slices. In this way, each subsequent node will cache feature values and data slices. If a node itself caches the data requested by the client or source station, it can be directly returned to the client or source station interface, realizing the principle of obtaining the data nearby.
[0066] For example, if edge node 1 has the corresponding data slice cached for the data requested by the client, edge node 1 will directly restore the data block and return it to the client; if edge node 1 does not have the corresponding data slice but transit node 2 does, node 1 will send a request to node 2 to obtain it, and then return it to the client, and so on, until the client obtains the requested data.
[0067] In one embodiment of the present invention, the method further comprises:
[0068] The data slice is compressed to obtain compressed data; a compressed identifier is added to the compressed data; the edge node or the back-to-source node is used to decompress the compressed data with the compressed identifier when receiving it to obtain the corresponding characteristic value and the data slice, and splice the data slices in sequence into transmission data.
[0069] In the embodiment of the present invention, in order to solve the problem of high pressure on the source station server, on the basis of parallel transmission, byte stream caching is implemented to reduce the redundancy of the transmission data and reduce the pressure on the source station. At the same time, the uplink and downlink transmission data between the sending node and the receiving node are bidirectionally compressed, which effectively solves the problem of high bandwidth occupation of transmission data for large files, improves the transmission speed of intermediate nodes, and reduces bandwidth costs. Among them, the bidirectional transmission compression can be based on gzip and broti compression, supports uplink and downlink transmission compression, reduces the amount of data in the transmission process, thereby saving bandwidth and improving transmission speed.
[0070] Among them, the preset compression condition can be a minimum compression requirement. Specifically, the minimum compression requirement refers to the minimum condition or standard that needs to be met when compressing data, usually to ensure that the compressed data can still be correctly decompressed and the compression effect reaches the expected. Exemplarily, during the data transmission process, the sending node (back to the source node) determines whether the data slice meets the minimum compression requirement. If the minimum compression requirement is met, the data slice is compressed to obtain compressed data, the custom protocol header is changed, and a compressed mark is added to the compressed data. If the minimum compression requirement is not met, there is no need to compress the data slice, and it can be directly transmitted. After the receiving node receives the compressed data, it determines whether the custom protocol header has a compressed mark. If so, it needs to be decompressed. Among them, the intermediate node continues to pass through the compressed data after receiving it and does not perform the decompression operation. Finally, after the receiving node decompresses the data to obtain the data slice, it splices the transmission data according to the sequence number when the transmission data is split, and forwards it to the user end or the source station.
[0071] Reference Figure 4 , is a schematic diagram of an uplink compression principle provided in an embodiment of the present invention. The client transmits data to the edge node, the edge node compresses the data and transmits it to the parent node (usually multiple, or one), and then the last parent node (usually the back-to-source node) decompresses the data and transmits it to the source station. Of course, if the data does not meet the compression conditions or has other transmission requirements, it can also be transmitted directly to the source station without compression.
[0072] Reference Figure 5 , is a schematic diagram of a downlink compression principle provided in an embodiment of the present invention, the source station transmits data to the parent node, the parent node compresses the data and transmits it to other parent nodes (usually multiple, or one), and then other parent nodes transmit it to the edge node, the edge node decompresses the data and then transmits it to the client. Of course, if the data does not meet the compression conditions or has other transmission requirements, it can also be transmitted directly to the edge node without compression.
[0073] In order to solve the problem that the quality fluctuation of a single path link affects the transmission efficiency, the embodiment of the present invention can establish multiple links (paths) from the user side to the source station server for parallel transmission, send fewer packets to the path with poor quality, and send more packets to the path with good quality, which is beneficial to improving the efficiency of data transmission and has a significant effect when the quality fluctuation of a single path is large. In addition, in order to solve the problem of high pressure on the source station server, on the basis of parallel transmission, byte stream caching is implemented to eliminate the redundancy of transmission data and reduce the pressure on the source station. At the same time, the upstream and downstream transmission data are bidirectionally compressed to effectively solve the problem of high bandwidth occupation of transmission data such as large files, improve the transmission speed of intermediate nodes, and reduce bandwidth costs.
[0074] In order to enable those skilled in the art to better understand the process of dynamically accelerating data transmission in a CDN network according to an embodiment of the present invention, an example is used below for illustration.
[0075] Take downlink transmission as an example, the same is true for uplink transmission. Figure 6 , is a schematic diagram of an overall process provided in an embodiment of the present invention:
[0076] First, the edge node establishes a connection with the parent node (transit node) based on the topN path (path) issued by the dynamic path proxy service, and the parent node establishes a connection with the back-to-source node.
[0077] Secondly, after receiving the source station data (transmission data / data stream), the back-to-source node splits and marks the sequence number, divides the transmitted data stream into blocks, and uses the characteristic value to identify each data block. Then, during the transmission process, the characteristic value corresponding to each data block is sent first. When the receiving node receives these characteristic values, it compares them with the characteristic values of the data blocks cached at the node. If there are the same, it is directly restored to the corresponding data block without further transmission. It only needs to notify the sending node to send the data blocks that the receiving node has not cached. After receiving these data blocks, they are cached for subsequent transmission. At the same time, during the data transmission process, the back-to-source node determines whether the data block meets the minimum compression requirements. If it does, it compresses it, changes the custom protocol header, and adds a compressed mark, otherwise it does not compress it. The back-to-source node forwards the data to the parent node according to the transmission speed of each path.
[0078] Again, if the receiving node is an edge node, determine whether the custom protocol header has a compression mark. If so, it needs to be decompressed. If the receiving node is an intermediate node, continue to transparently transmit it downward to the edge node.
[0079] Finally, after the edge node decompresses the data, it splices it according to the sequence number when the data was split and forwards it to the client.
[0080] Take the following transmission as an example, refer to Figure 7, is a byte stream cache timing diagram provided in an embodiment of the present invention: Assuming that the path set is [client-edge node-parent node 1-back to source node-source station, client-edge node-parent node 2-back to source node-source station, client-edge node-parent node 3-back to source node-source station], the following is a specific embodiment of the present invention, including 14 steps:
[0081] Step 1: The dynamic path proxy service detects nodes and source stations, and reports the detection data to the central computing service. The central computing service performs comprehensive calculations on the node and source station quality data uploaded by the dynamic path proxy service to obtain the optimal path (link) back to the source, and sends the optimal path data to the application acceleration gateway through the dynamic path proxy service.
[0082] Step 2: The application acceleration gateway edge node establishes connections with parent node 1, parent node 2, and parent node 3 according to the topN optimal paths (N=3 in this example, the same back-to-source nodes) issued by the dynamic path proxy service for parallel transmission.
[0083] Step 3: Parent node 1, parent node 2, and parent node 3 establish connections with the source node.
[0084] Step 4: The source station sends content data for the first time. After receiving the source station data, the back-to-source node splits it and marks the sequence number.
[0085] [Here we select a link [client-edge node-parent node 1-back to source node-source station] for detailed description, and other links are similar]
[0086] Step 5: After receiving the data, the back-to-source node slices the data and converts the content data into feature value + slice data [k1+k1_data, k2+k2_data]. The slice data meets the minimum compression requirements. The back-to-source node performs gzip compression, changes the custom protocol header, adds a compressed flag, and caches all feature values and slice data. Then, the data is forwarded to parent node 1, parent node 2, and parent node 3 according to the transmission speed of each path. When the path quality deteriorates, the node automatically adjusts the amount of data transmitted on each path, sending fewer packets to paths with poor quality and more packets to paths with good quality.
[0087] Step 6: After receiving [k1+k1_data, k2+k2_data] sent by the source node, the parent node 1 caches all feature values and slice data, and sends [k1+k1_data, k2+k2_data] to the edge node; when transmitted within the parent node, it has a compressed mark and does not need any operation, and continues to be transparently transmitted to the edge node.
[0088] Step 7: After receiving [k1+k1_data, k2+k2_data] sent by parent node 1, the edge node caches all feature values and slice data; recognizes that the protocol header has a compression flag, decompresses it, and converts it into original data.
[0089] Step 8: The edge node needs to perform inter-RS scheduling (implemented through LVS) and inter-nginx process scheduling to ensure that multiple connections are aggregated into one process for processing, and the received data is spliced according to the sequence number when the data is split, and forwarded to the client.
[0090] Step 9. The source station sends the content data for the second time. After receiving the data, the back-to-source node slices the data and transforms the content data into feature value + slice data [k1+k1_data, k2+k2_data, k3+k3_data, data]. The slice data meets the minimum compression requirements, and the back-to-source node performs gzip compression, changes the custom protocol header, and adds a compressed flag. Because the back-to-source node has already cached [k1+k1_data, k2+k2_data], it only needs to cache [k3+k3_data] this time, and then transform the content data into [k1, k2, k3+k3_data, data] and send it to parent node 1. It is no longer necessary to send [k1_data, k2_data].
[0091] Step 10, parent node 1 receives [k1, k2, k3+k3_data, data] sent back to the source node. Because [k1+k1_data, k2+k2_data] has been cached and hits the cache, only [k3+k3_data] is cached this time, and [k1, k2, k3+k3_data, data] is sent to the edge node; it is transmitted within the parent node, has a compressed mark, and no operation is required, and it continues to be transparently transmitted to the edge node.
[0092] Step 11, the edge node receives [k1, k2, k3+k3_data, data] sent by parent node 1. Because [k2+k2_data] expires and is cleared, only [k1+k1_data] hits the cache. At this time, the edge node will initiate a retransmission request to parent node 1 and add cache [k3+k3_data].
[0093] Step 12: Parent node 1 will retransmit [k2+k2_data] to the edge node.
[0094] Step 13: The edge node re-caches [k2+k2_data]. It recognizes that the protocol header has a compression flag, decompresses it, and restores [k1, k2, k3+k3_data, data] to the original content data.
[0095] Step 14: The edge node needs to perform inter-RS scheduling (implemented through LVS) and inter-nginx process scheduling to ensure that multiple connections are aggregated into one process for processing, and the received data is spliced according to the sequence number when the data is split, and forwarded to the client.
[0096] In summary, the transmission optimization method for CDN dynamic acceleration provided by the present invention has at least the following advantages: 1) Currently, the transmission layer acceleration products on the market only support a single parallel transmission function, which cannot solve the problem of tight bandwidth resources and high pressure caused by frequent interaction of source station servers during business peak periods. The present invention, based on parallel transmission, utilizes the characteristics of byte stream caching and bidirectional transmission compression to effectively reduce bandwidth costs and solve the problem of high pressure on source station servers while maintaining efficient transmission, thereby improving transmission speed and efficiency. 2) The byte stream cache supports memory and disk cache, which can make more full use of machine resources, improve cache hit rate, greatly reduce dynamic interaction with the source station, and reduce the pressure on the source station server. 3) Traditional CDN products are mostly downstream distribution services, so they only support compression of downstream data and single-link transmission, while CDN dynamic acceleration supports a wide range of applications. Some applications have a large amount of upstream data, and some applications have a large amount of downstream data. The present invention supports data compression of multi-link parallel bidirectional transmission, which greatly improves data transmission efficiency.
[0097] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0098] Reference Figure 8 , is a structural block diagram of a content distribution network data transmission device provided in an embodiment of the present invention, such as Figure 8 As shown, the content distribution network includes nodes, and the nodes of the content distribution network are connected to the client and the source station. The device may specifically include the following modules:
[0099] The data acquisition module 801 is used to acquire a path set when the client initiates a data acquisition request; the path set includes at least one path, and the path is a path for data to be transmitted from the client to the source station through a node, or a path for data to be transmitted from the source station to the client;
[0100] The data transmission module 802 is used to transmit data blocks in parallel according to the path to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client.
[0101] In one embodiment of the present invention, the nodes include edge nodes and back-to-source nodes, the back-to-source nodes are connected to the source station and the transit node, and the path is obtained by comprehensive calculation based on the quality data of the nodes and the source station.
[0102] In one embodiment of the present invention, the device further comprises: a slicing module, configured to:
[0103] Slicing the transmission data to obtain data slices;
[0104] are eigenvalues corresponding to the data slice identifiers respectively;
[0105] The data slice and the feature value corresponding to the data slice are used as a data block.
[0106] In one embodiment of the present invention, the data transmission module 802 is used to:
[0107] Transmitting the characteristic value to a sending node in parallel according to the path; the sending node is used to compare the characteristic value with the cached characteristic value;
[0108] If the characteristic value is different from the cached characteristic value, the sending node is used to continue to transmit the characteristic value in parallel according to the path, cache the characteristic value as the cached characteristic value, and cache the data slice as the cached data slice.
[0109] In an embodiment of the present invention, the device further includes: a data transmission module 802, configured to:
[0110] If the characteristic value is the same as the cache characteristic value, the sending node is used to obtain the cache data slice corresponding to the cache characteristic value locally, and transmit the cache data slice in parallel to the client according to the path.
[0111] In one embodiment of the present invention, the device further comprises a compression module, which is used to:
[0112] The data slice is compressed to obtain compressed data; a compressed identifier is added to the compressed data; the edge node or the back-to-source node is used to decompress the compressed data with the compressed identifier when receiving it to obtain the corresponding characteristic value and the data slice, and splice the data slices in sequence into transmission data.
[0113] In an embodiment of the present invention, the receiving node clears the cache characteristic value according to a preset clearing rule.
[0114] In an embodiment of the present invention, a content distribution network may include a node, and the node of the content distribution network is connected to a source station and a client. When a client initiates a data acquisition request, a path set is obtained, and the path set includes at least one path, and the path is a path for data to be transmitted from the client to the source station through the node, or a path for data to be transmitted from the source station to the client. Then, data blocks can be transmitted in parallel according to the path to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client. The embodiment of the present invention can obtain multiple paths to transmit data separately, thereby improving the efficiency of data transmission. Even if the quality of a certain path fluctuates greatly, the reliability and efficiency of data transmission can be guaranteed, thereby ensuring the user access experience.
[0115] As for the above-mentioned device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0116] It should be noted that the embodiments of the present invention may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0117] The embodiment of the present invention further provides an electronic device, such as Fig. 9 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0118] Memory 503, used for storing computer programs;
[0119] The processor 501 is configured to implement the content distribution network data transmission method described in any one of the above embodiments when executing the program stored in the memory 503.
[0120] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0121] The communication interface is used for communication between the above terminal and other devices.
[0122] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0123] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0124] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the content distribution network data transmission method described in any of the above embodiments.
[0125] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the content distribution network data transmission method described in any one of the above embodiments.
[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0127] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or still includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0128] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0129] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A content distribution network data transmission method, characterized in that: The content distribution network includes nodes, the nodes of the content distribution network are connected to the client and the source station, and the method includes: When the client initiates a data acquisition request, a path set is acquired; the path set includes at least one path, and the path is a path for data to be transmitted from the client to the source station through a node, or a path for data to be transmitted from the source station to the client; The data blocks are transmitted in parallel according to the paths to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client.
2. The method according to claim 1, characterized in that The nodes include edge nodes and back-to-source nodes, the back-to-source nodes are connected to the source station and the transit node, and the path is obtained by comprehensive calculation based on the quality data of the nodes and the source station.
3. The method according to claim 1, characterized in that Before transmitting the data blocks in parallel according to the paths, the method further includes: Slicing the transmission data to obtain data slices; are eigenvalues corresponding to the data slice identifiers respectively; The data slice and the feature value corresponding to the data slice are used as a data block.
4. The method according to claim 3, characterized in that Transmitting the data blocks in parallel according to the paths includes: Transmitting the characteristic value to a sending node in parallel according to the path; the sending node is used to compare the characteristic value with the cached characteristic value; If the characteristic value is different from the cached characteristic value, the sending node is used to continue to transmit the characteristic value in parallel according to the path, cache the characteristic value as the cached characteristic value, and cache the data slice as the cached data slice.
5. The method according to claim 4, characterized in that The method further comprises: If the characteristic value is the same as the cache characteristic value, the sending node is used to obtain the cache data slice corresponding to the cache characteristic value locally, and transmit the cache data slice in parallel to the client according to the path.
6. The method according to claim 3, characterized in that: The method further comprises: The data slices are compressed to obtain compressed data; a compressed identifier is added to the compressed data; the edge node is used to decompress the compressed data with the compressed identifier when receiving it to obtain the corresponding characteristic value and the data slice, and sequentially splice the data slices into transmission data.
7. The method according to claim 6, characterized in that The receiving node is used to clear the cache characteristic value according to a preset clearing rule.
8. A content distribution network data transmission device, characterized in that: The content distribution network includes nodes, the nodes of the content distribution network are connected to the client and the source station, and the device includes: A data acquisition module, configured to acquire a path set when the client initiates a data acquisition request; the path set includes at least one path, the path being a path for data to be transmitted from the client to the source station through a node, or a path for data to be transmitted from the source station to the client; A data transmission module is used to transmit data blocks in parallel according to the path to transmit the data blocks to the client, wherein the data blocks are obtained by slicing the transmission data corresponding to the data acquisition request initiated by the client.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data transmission method, apparatus and system
CN105847139A
Data transmission method and device, equipment and readable storage medium
CN108738078A
Cache-based data processing method, system and storage medium
CN109325054A
Method, device and system for detecting video code stream
CN112449237A
Data transmission method and device for multi-path parallel transmission and electronic equipment
CN119071247A