A data distribution method, apparatus, electronic device, and storage medium
By establishing multi-path connections between PCDN service nodes and user terminals, prioritizing data distribution using inexpensive PCDN service nodes, and switching to CDN service nodes when service quality conditions are not met, the problem of unstable data transmission and high costs caused by the instability of PCDN service nodes is solved, achieving efficient and stable data distribution.
Patent Information
- Application Number
- CN202211131654.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-15
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-09-15
AI Technical Summary
Existing technologies in point-to-point content delivery networks suffer from unstable data transmission and high costs, especially when PCDN service nodes are unstable or offline, which can easily lead to data lag and discontinuity.
By establishing multi-path connections between PCDN service nodes and user terminals, including primary and backup sub-streams, data is preferentially distributed using inexpensive PCDN service nodes, and service quality is monitored in real time. When the service quality does not meet preset conditions, the system switches to a backup sub-stream with CDN service nodes as relays to continue distributing data.
This approach achieves cost reduction while ensuring data distribution quality, without affecting the user experience, avoiding data lag and discontinuity issues, and improving the stability and efficiency of data distribution.
Smart Images

Figure CN115499450B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of artificial intelligence, in particular to cloud computing technology, cloud storage and distributed storage technology, and specifically to a data distribution method and device, electronic equipment, storage medium and computer program product. BACKGROUND
[0002] A content delivery network (CDN) is a strategically deployed overall system. It is intended to avoid as much as possible the bottlenecks and links on the Internet that may affect the speed and stability of data transmission, so that content transmission is faster and more stable. By placing node servers at various places in the network to form an intelligent virtual network on the basis of the existing Internet, the CDN system can redirect user requests to the nearest service node according to the network traffic, connection, load, distance to the user and response time of each node, etc. Comprehensive information in real time. So that users can get the required content nearby, solve the network congestion situation, and improve the response speed of user access to the website.
[0003] A point-to-point content delivery network (P2PCDN, referred to as PCDN) is a technology that combines P2P (peer-to-peer) and CDN. It is based on P2P technology and uses the vast amount of fragmented idle resources in the edge network to build a low-cost, high-quality content delivery network service. SUMMARY
[0004] The present disclosure provides a data distribution method, device, electronic equipment, storage medium and computer program product.
[0005] According to an aspect of the present disclosure, a data distribution method is provided, comprising:
[0006] In response to a connection request of a user terminal, a first sub-flow and a second sub-flow of a multi-path connection are established between a PCDN service node in a point-to-point content delivery network (PCDN) and the user terminal; wherein the second sub-flow uses a target CDN service node in a content delivery network (CDN) as a transit;
[0007] The PCDN service node distributes target data requested by the user to the user terminal through the first sub-flow, and determines the quality of service of the first sub-flow in real time;
[0008] If the quality of service of the first sub-flow does not meet the preset condition, switch to the second sub-flow, and instruct the target CDN service node to continue distributing the target data to the user terminal through the second sub-flow.
[0009] According to an aspect of the present disclosure, a data distribution device is provided, comprising:
[0010] The connection establishing module is configured to, in response to a connection request of the user terminal, establish a first sub-flow and a second sub-flow of a multi-path connection between a PCDN service node in a point-to-point content distribution network (PCDN) and the user terminal, wherein the second sub-flow is transferred through a target content distribution network (CDN) service node in a CDN.
[0011] The distribution module is configured to distribute, by the PCDN service node, target data requested by the user terminal to the user terminal through the first sub-flow, and determine a quality of service of the first sub-flow in real time.
[0012] The sub-flow switching module is configured to, in a case where the quality of service of the first sub-flow does not satisfy a preset condition, switch to the second sub-flow, and instruct the target CDN service node to continue distributing the target data to the user terminal through the second sub-flow.
[0013] According to another aspect of the present disclosure, an electronic device is provided, comprising:
[0014] at least one processor; and
[0015] a memory connected to the at least one processor in communication; wherein,
[0016] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data distribution method of any embodiment of the present disclosure.
[0017] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, and the computer instructions are used to enable a computer to perform the data distribution method of any embodiment of the present disclosure.
[0018] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, and the computer program, when executed by a processor, implements the data distribution method of any embodiment of the present disclosure.
[0019] According to the technology of the present disclosure, a low-cost PCDN service node is preferentially used to distribute data for the user terminal, which can achieve the effect of reducing data distribution cost; when the quality of service of one sub-flow is low, the sub-flow is switched and the CDN service node is used to continue distributing data for the user, which not only can guarantee the quality of data distribution service, but also is not perceived by the user layer, avoiding the problems of lag or discontinuous data.
[0020] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0021] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0022] Figure 1 is a flow diagram of a data distribution method provided by an embodiment of the present disclosure;
[0023] Figure 2 is a flow diagram of another data distribution method provided by an embodiment of the present disclosure;
[0024] Figure 3 is a flow diagram of another data distribution method provided by an embodiment of the present disclosure;
[0025] Figure 4 is a logic flow diagram of a data distribution method provided by an embodiment of the present disclosure;
[0026] Figure 5 is a structural diagram of a data distribution apparatus provided by an embodiment of the present disclosure;
[0027] Figure 6 is a block diagram of an electronic device for implementing a data distribution method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are provided to assist in a comprehensive understanding of the present disclosure by those of ordinary skill in the art, and they are considered merely to be exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, in the following description, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
[0029] Figure 1 is a flow diagram of a data distribution method according to an embodiment of the present disclosure. The present embodiment can be applied to a case where PCDN resources and CDN resources are used cooperatively to distribute data to users, typically, a case where live data or on-demand data is distributed to users by using PCDN resources and CDN resources cooperatively. The method can be performed by a data distribution apparatus, which is implemented in software and / or hardware and integrated on an electronic device.
[0030] Specifically, referring to Figure 1 , the data distribution method is as follows:
[0031] S101, in response to a connection request of a user terminal, a first sub-flow and a second sub-flow of a multi-path connection are established between a PCDN service node in a point-to-point content distribution network (PCDN) and the user terminal; wherein the second sub-flow is transferred through a target CDN service node in a content distribution network (CDN).
[0032] The embodiment takes the distribution of live data to a user end as an example for illustration. The user end wants to obtain live data, and needs to access a website of the live data first, wherein the website can be represented by a URL (Universal Resource Locator). Then, the connection address (for example, an IP address and a port number) of a PCDN service node providing the required live data for the user end in a point-to-point content distribution network is obtained through domain name resolution. Then, a connection request is sent to the PCDN service node according to the connection address of the PCDN service node. In the embodiment, the user end is an electronic device such as a smart phone or a tablet computer supporting the MPTCP (Multiple Path Transmission Control Protocol) service. In response to the connection request of the user end, a first subflow and a second subflow of a multi-path connection can be established between the PCDN service node and the user end through the multi-path transmission technology, wherein the first subflow and the second subflow each correspond to a communication path between the user end and the PCDN service node. The communication path refers to a link between the user end and the PCDN service node, and the communication path can be identified by a four-tuple or a five-tuple. For example, the five-tuple includes a source IP address, a source port number, a destination IP address, a destination port number, and a transport layer protocol name. It should be noted that the second subflow in the embodiment is transferred through the target CDN service node in the content distribution network, that is, the user end is connected to the target CDN service node first, and then connected to the PCDN service node through the target CDN service node. Thus, by establishing the second subflow, the user end and the target CDN service node are connected, which provides an implementation basis for continuously distributing data to the user through the target CDN service node when the PCDN service node is offline or unstable.
[0033] In the embodiment, the first subflow is a main subflow, and the PCDN service node preferentially uses the first subflow to distribute data to the user end. The second subflow is a backup subflow, and the PCDN service node does not distribute data to the user end through the second subflow when the first subflow normally transmits data. In an optional implementation, a high priority is set for the first subflow, and a low priority is set for the second subflow. When distributing data, the PCDN service node only sends data through the subflow with high priority. Subsequently, when subflow switching is required, for example, when data is required to be sent through the second subflow, the priority of the second subflow can be adjusted to be high.
[0034] It should be noted that the reason why the multi-path transmission technology is used to establish a multi-path connection between the PCDN service node and the user terminal, instead of using the PCDN SDK (Software Development Kit) deployed at the user terminal to establish a connection between the user terminal and the PCDN service node, is that deploying the PCDN SDK at the user terminal invades the user's application, is complex and brings instability, and is not accepted by the user.
[0035] S102, the PCDN service node distributes the target data requested by the user to the user terminal through the first sub-flow, and determines the quality of service of the first sub-flow in real time.
[0036] In this embodiment, the target data can be live data or on-demand data. After the connection between the user terminal and the PCDN service node is established, the PCDN service node can be reversely proxied to the live or on-demand service. In this way, the corresponding live data or on-demand data can be distributed to the user terminal through the first sub-flow for the user to view. It should be noted that preferentially using the cheap PCDN service node to distribute data to the user terminal can reduce the cost of data distribution.
[0037] In this embodiment, when distributing data to the user terminal through the first sub-flow, the quality of service of the first sub-flow needs to be determined in real time, so as to determine whether the sub-flow needs to be switched for transmission according to the quality of service. The quality of service of the first sub-flow is used to determine whether the first sub-flow can normally output data, and the quality of service can be measured by any of the following indicators: whether there is data transmission congestion, whether there is data loss, and whether the sub-flow is disconnected. For example, if there is data transmission congestion, the quality of service is low; if there is no data transmission congestion, the quality of service is high.
[0038] S103, in the case where the quality of service of the first sub-flow does not meet the preset condition, switching to the second sub-flow, and instructing the target CDN service node to continue distributing the target data to the user terminal through the second sub-flow.
[0039] In this embodiment, the preset condition can include at least one of the following: no data transmission congestion, no data loss, and no disconnection of the subflow. Therefore, the service quality of the first subflow not meeting the preset condition means that there is data congestion, data loss, or disconnection of the first subflow, at this time, the first subflow cannot normally transmit data, that is, the service quality of the first subflow is low, at this time, if the first subflow is still used to transmit data, it will cause the user end to not receive data or receive discontinuous data, and then the data will appear to be stuck on the user end. Therefore, in the case where the service quality of the first subflow does not meet the preset condition, the second subflow is switched to. Through analysis and determination, the low service quality of the first subflow is usually caused by instability or disconnection of the PCDN service node. Therefore, when the service quality of the first subflow is low, the second subflow is switched to, and the data distribution to the user end through the PCDN service node is also stopped, and the target data is continuously distributed to the user end through the target CDN service node, so as to ensure the quality of the data distribution service.
[0040] In the embodiments of the present disclosure, the low-cost PCDN service node is preferentially used to distribute data to the user end, which can reduce the cost of data distribution; when the service quality of a subflow is low, the subflow is switched and the CDN service node is used to continue distributing data to the user, which can not only ensure the quality of the data distribution service, but also avoid the problem of user perception, such as data discontinuity or sticking.
[0041] Figure 2 FIG. 2 is a flow diagram of another data distribution method according to an embodiment of the present disclosure. Referring to FIG. 2, the data distribution method is specifically as follows: Figure 2
[0042] S201, in response to a connection request of a user end, a PCDN service node establishes a first subflow with the user end by handshake communication with the user end.
[0043] In this embodiment, the user end can first obtain the connection address (such as the IP address) of the PCDN service node through domain name resolution, and then use the default IP address corresponding to the current default network interface to establish a main subflow, that is, the first subflow, with the PCDN service node IP address. During the connection process, the user end and the PCDN service node perform three-way handshake, and the whole interaction process is as follows: the user end actively opens the connection, sends a connection request message to the PCDN service node; after receiving the connection request message, the PCDN service node agrees to establish the connection, and sends a confirmation to the user end; after receiving the confirmation, the user end also gives a confirmation to the PCDN service node. At this time, the establishment of the first subflow is completed. It should be noted that during the handshake communication process, the user keyword and the service keyword are informed to each other, wherein the service keyword and the user keyword can be used for establishment of other subflows.
[0044] S202, acquire the connection information of the first sub-flow and write the connection information into a preset storage unit.
[0045] In this embodiment, the acquired connection information of the first sub-flow at least includes keyword information (for example, user keyword information and service keyword information) and communication path information (for example, source IP address, source port number, destination IP address, destination port number and transmission layer protocol name), and the connection information is written into the preset storage unit. It should be noted that by recording the connection information of the first sub-flow, the establishment of the second sub-flow can be completed based on the connection information of the first sub-flow, thereby ensuring the efficiency of the sub-flow establishment. In addition, the target web page address requested by the user terminal to acquire data can also be written into the preset storage unit. In the specific implementation, a link collaboration service can be set first, and the connection information can be written into the link collaboration service, and when the connection information is needed to be used, the link collaboration service can be accessed.
[0046] S203, determine the target CDN service node corresponding to the user terminal and the service address of the target CDN service node.
[0047] Optionally, the first link collaboration plug-in is arranged in the PCDN service node, and the first link collaboration plug-in is used to send an allocation request to the CDN resource scheduling service, so that the CDN resource scheduling service determines the target CDN service node for providing content distribution service for the user terminal and the service address (for example, IP address) of the CDN service node according to the user terminal address and load balancing, and feeds back to the first link collaboration plug-in of the PCDN service node.
[0048] S204, send the service address to the user terminal, and instruct the user terminal to perform the following: establish a connection with the target CDN service node according to the service address, and instruct the target CDN service to establish a connection with the PCDN service node, so as to obtain the second sub-flow between the PCDN service node and the user terminal.
[0049] In this embodiment, the first link collaboration plug-in is used to send the service address of the target CDN service node to the user terminal in the form of a message, so that the user terminal establishes a connection between the user terminal and the target CDN service node in the form of a multi-path connection sub-flow according to the service address of the target CDN service node and the standby address of the user terminal; and then the target CDN service node acquires the connection information of the first sub-flow from the preset storage unit, and initiates a sub-path connection to the PCDN service node in combination with the connection information, so as to obtain the second sub-flow with the target CDN service node as the transit after the connection is successful.
[0050] S205, the PCDN service node distributes the target data requested by the user terminal to the user terminal through the first sub-flow, and determines the service quality of the first sub-flow in real time.
[0051] S206, in the case that the quality of service of the first sub-flow does not meet the preset condition, switching to the second sub-flow, and instructing the target CDN service node to continue to distribute the target data to the user terminal through the second sub-flow.
[0052] In the embodiments of the present disclosure, the connection information of the first sub-flow is recorded, so that the establishment of the second sub-flow can be completed based on the connection information of the first sub-flow, thereby ensuring the efficiency of the sub-flow establishment. Moreover, the second sub-flow is established through the target CDN service node as a relay, so that when the PCDN service node is unstable or offline, the data can continue to be distributed to the user through the target CDN service node and the second sub-flow, thereby ensuring the continuity of the data and avoiding the problem of lag.
[0053] Figure 3 is a flow diagram of another data distribution method according to an embodiment of the present disclosure. Referring to Figure 3 , the data distribution method is as follows:
[0054] S301, in response to a connection request of a user terminal, a PCDN service node establishes a first sub-flow with the user terminal through handshake communication with the user terminal.
[0055] S302, obtaining the connection information of the first sub-flow, and writing the connection information into a preset storage unit.
[0056] In the present embodiment, the connection information of the first sub-flow is recorded, so that the target CDN service node can quickly establish a connection with the PCDN service node according to the stored connection information when establishing a second sub-flow subsequently. In addition, the target web page address requested by the user terminal to obtain data can also be written into the preset storage unit.
[0057] S303, determining the target CDN service node corresponding to the user terminal and the service address of the target CDN service node.
[0058] S304, sending the service address to the user terminal, instructing the user terminal to perform the following: establishing a connection with the target CDN service node according to the service address, and instructing the target CDN service node to establish a connection with the PCDN service node to obtain a second sub-flow between the PCDN service node and the user terminal.
[0059] S305, the PCDN service node distributes the target data requested by the user terminal to the user terminal through the first sub-flow, and determines the quality of service of the first sub-flow in real time.
[0060] In an alternative embodiment, the quality of service of the first substream is determined in real time, including: determining the quality of service of the first substream by detecting in real time whether the first substream is disconnected or whether there is data transmission congestion in the first substream. It should be noted that if the first substream is disconnected, it indicates that the PCDN service node is offline; if there is data transmission congestion in the first substream, it indicates that the PCDN service node is unstable. Thus, the quality of service of the first substream can be quickly determined through the above two analyses. In the case of low service quality, the target CDN service node and the second substream can be used to continue to distribute data to the user according to the steps of S306.
[0061] S306, in the case that the quality of service of the first substream does not meet the preset condition, switching to the second substream, sending target data to the target CDN service node, and instructing the target CDN node to perform the following: disconnecting the connection between the target CDN node and the PCDN service node, and determining the data sequence number corresponding to the target data; according to the data sequence number and the target web page address requested by the user end to obtain data, continuing to distribute the target data to the user end.
[0062] In this embodiment, there is a global mapping relationship between the target data and the data sequence number, and the target CDN service node determines the data sequence number corresponding to the target data according to the global mapping relationship after obtaining the target data. It should be noted that the data sequence number is determined to enable the target CDN service node to continue to distribute data to the user end according to the data sequence number, thereby ensuring the continuity of the distributed data. At the same time, the connection between the target CDN service node and the PCDN service node is disconnected. Further, the target CDN service node can read the target web page address requested by the user end to obtain data through the second link of the target CDN service node. Then, according to the data sequence number and the target web page address requested by the user end to obtain data, the target CDN service node continues to distribute the target data to the user end. Specifically, the target CDN service node simulates user requests according to the target web page address (such as a live broadcast or on-demand website address) to provide corresponding data for live broadcast or on-demand services, and then distributes the corresponding target data to the user end according to the data sequence number.
[0063] In this embodiment, the cheap PCDN service node is preferentially used to distribute data to the user end, which can reduce the cost of data distribution; when the quality of service of a substream is low, the substream is switched and the CDN service node is used to continue to distribute data to the user, which can not only ensure the quality of data distribution service, but also be transparent to the user; in addition, the target CDN service node distributes corresponding data according to the data sequence number, which can ensure the continuity of the distributed data.
[0064] Further, after switching to the second substream, a disconnection instruction is sent to the user end to disconnect the first substream and release the network interface of the user end.
[0065] Figure 4 is a logical flowchart of a data distribution method according to an embodiment of the present disclosure. Referring to Figure 4 , the data distribution method logic is as follows:
[0066] For the user end, it is an electronic device supporting a multi-path connection service (i.e., an MPTCP service), which can be, for example, a smart phone supporting a multi-path connection service. The user end can first obtain the connection address (e.g., IP address) of the PCDN service node through domain name resolution; then generate a connection request according to its own default IP address and the IP address of the PCDN service node, and perform handshaking with the PCDN service node to establish a first sub-flow.
[0067] Further, for the PCDN service node (which can be an NGINX server), a first link coordination plug-in is arranged thereon. After the first sub-flow is established between the PCDN service node and the user end, the first link coordination plug-in writes the connection information of the first sub-flow and the user request into the link coordination service. Then, the reverse proxy is performed to the live or on-demand service, so that the live or on-demand service can normally provide live or on-demand data, and the live or on-demand data is distributed to the user end through the first sub-flow.
[0068] Further, the first link coordination plug-in is also used to proxy the request of the user end to the CDN resource scheduling service, request the target CDN service node closest to the user end, and feed back the service address (e.g., IP address and port number) of the target CDN service node to the first link plug-in; the first link plug-in sends the service address to the user end through an MPTCP ADD ADDR message. Then, the user end establishes a sub-path between itself and the target CDN service node in the form of an MPTCP sub-flow according to its own standby address and the service address of the target CDN service node; further, the target CDN service node reads the connection information of the first sub-flow from the link coordination service through the second link coordination plug-in thereon, so as to establish a sub-path connection with the PCDN service node according to the connection information, thereby obtaining a second sub-flow with the target CDN service node as the transit.
[0069] Further, the first link coordination plug-in is also used to detect the quality of service of the first sub-flow. In the case of low quality of service, the first sub-flow is switched to the second sub-flow, and data is sent to the target CDN service node through the second sub-flow, so that the target CDN service node determines the corresponding data sequence number by analyzing the data; then, the user request (e.g., the requested website of the user end) is read from the link coordination service through the second link coordination plug-in, and a request is simulated to be generated, so as to distribute the corresponding data of the request to the user end according to the data sequence number. In addition, in the case of low quality of service, the first sub-flow is disconnected, and after the data is sent to the target CDN service node, the connection between the target CDN service node and the PCDN service node is disconnected.
[0070] By the above logic, the use of cheap PCDN service nodes to distribute data can reduce the cost of data distribution; when the PCDN service node is unstable or offline, the CDN service node is used to continue distributing data, thereby ensuring the quality of data distribution service.
[0071] Figure 5 is a structural schematic diagram of a data distribution apparatus according to an embodiment of the present disclosure. The embodiment can be applied to a case of distributing data for a user by cooperatively using PCDN resources and CDN resources. Typically, the embodiment can be applied to a scenario of distributing live data or on-demand data for a user by cooperatively using PCDN resources and CDN resources. Referring to Figure 5 , the apparatus comprises:
[0072] The connection module 501 is configured to, in response to a connection request of a user terminal, establish a first sub-flow and a second sub-flow of a multi-path connection between a PCDN service node in a point-to-point content distribution network (PCDN) and the user terminal; wherein the second sub-flow is transferred through a target CDN service node in a content distribution network (CDN).
[0073] The distribution module 502 is configured to distribute target data requested by the user terminal through the first sub-flow by the PCDN service node to the user terminal, and determine the quality of service of the first sub-flow in real time.
[0074] The sub-flow switching module 503 is configured to, in a case where the quality of service of the first sub-flow does not meet a preset condition, switch to the second sub-flow, and instruct the target CDN service node to continue distributing the target data to the user terminal through the second sub-flow.
[0075] On the basis of the above embodiment, optionally, the connection module is further configured to:
[0076] In response to the connection request of the user terminal, the PCDN service node establishes the first sub-flow with the user terminal by performing handshake communication with the user terminal.
[0077] Determine the target CDN service node corresponding to the user terminal and the service address of the target CDN service node.
[0078] Send the service address to the user terminal, instruct the user terminal to perform the following: establish a connection with the target CDN service node according to the service address, and instruct the target CDN service node to establish a connection with the PCDN service node to obtain the second sub-flow between the PCDN service node and the user terminal.
[0079] On the basis of the above embodiment, optionally, the apparatus further comprises:
[0080] The information recording module is configured to acquire connection information of the first substream and write the connection information into a preset storage unit, so that the target CDN service node establishes a connection with the PCDN service node according to the stored connection information.
[0081] On the basis of the above-mentioned embodiments, optionally, the substream switching module is further configured to:
[0082] switch to the second substream, send target data to the target CDN service node, and instruct the target CDN node to perform the following: disconnect the connection with the PCDN service node, and determine a data sequence number corresponding to the target data; and continue to distribute the target data to the user terminal according to the data sequence number and a target web page address from which the user terminal requests to acquire data.
[0083] On the basis of the above-mentioned embodiments, optionally, the distribution module comprises:
[0084] The quality of service detection unit is configured to determine the quality of service of the first substream by real-time detection of whether the first substream is disconnected or real-time detection of whether the first substream has data transmission congestion.
[0085] On the basis of the above-mentioned embodiments, optionally, the distribution module comprises:
[0086] The disconnection module is configured to send a disconnection instruction to the user terminal to disconnect the first substream after switching to the second substream.
[0087] The data distribution apparatus provided by the embodiments of the present disclosure can execute the data distribution method provided by any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of the execution method. The contents not described in detail in the present embodiment can refer to the description in any of the method embodiments of the present disclosure.
[0088] In the technical solutions of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0089] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0090] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0091] As shown in Figure 6 The device 600 includes a computing unit 601 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 602 or a computer program loaded into a random access memory (RAM) 603 from a storage unit 608. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0092] Various components in the device 600 are connected to the I / O interface 605, including an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, a magneto-optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0093] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, and the like. The computing unit 601 performs various methods and processes described above, such as the data distribution method. For example, in some embodiments, the data distribution method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded onto the RAM 603 and executed by the computing unit 601, one or more steps of the data distribution method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the data distribution method by any other suitable means, such as by means of firmware.
[0094] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0095] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0096] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0097] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0098] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0099] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0100] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technology disclosed in the present disclosure are achieved, which is not limited herein.
[0101] The specific implementation described above does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data distribution method, comprising: establishing, by a PCDN service node, a first sub-flow with a user terminal in response to a connection request from the user terminal through handshake communication with the user terminal; acquiring connection information of the first sub-flow and writing the connection information into a link coordination service; determining a target CDN service node corresponding to the user terminal and a service address of the target CDN service node; sending the service address to the user terminal to instruct the user terminal to establish a connection with the target CDN service node according to the service address of the target CDN service node and instruct the target CDN service node to establish a connection with the PCDN service node according to the connection information acquired from the link coordination service to obtain a second sub-flow between the PCDN service node and the user terminal; distributing, by the PCDN service node, target data requested by the user terminal to the user terminal through the first sub-flow and determining a quality of service of the first sub-flow in real time by detecting whether the first sub-flow is disconnected in real time; in a case where the quality of service of the first sub-flow does not meet a preset condition, switching to the second sub-flow, sending the target data to the target CDN service node, and instructing the target CDN node to disconnect the connection with the PCDN service node and determine a data sequence number corresponding to the target data, simulate a user request according to a target web page address from which the user terminal requests to acquire data, and distribute corresponding data of the request to the user terminal according to the data sequence number to achieve a cooperative distribution of data for the user by using the PCDN and the CDN.
2. The method of claim 1, wherein, The real-time determination of the quality of service of the first sub-flow comprises: determining the quality of service of the first sub-flow by detecting whether there is data transmission congestion in the first sub-flow in real time. 3.The method of claim 1, further comprising: sending a disconnection instruction to the user terminal to disconnect the first sub-flow after switching to the second sub-flow. 4.A data distribution apparatus, comprising: a connection module configured to establish a first sub-flow with a user terminal in response to a connection request from the user terminal through handshake communication with the user terminal by a PCDN service node; acquire connection information of the first sub-flow and write the connection information into a link coordination service; determine a target CDN service node corresponding to the user terminal and a service address of the target CDN service node; and send the service address to the user terminal to instruct the user terminal to establish a connection with the target CDN service node according to the service address of the target CDN service node and instruct the target CDN service node to establish a connection with the PCDN service node according to the connection information acquired from the link coordination service to obtain a second sub-flow between the PCDN service node and the user terminal; a distribution module configured to distribute, by the PCDN service node, target data requested by the user terminal to the user terminal through the first sub-flow and determine a quality of service of the first sub-flow in real time by detecting whether the first sub-flow is disconnected in real time. The substream switching module is configured to, in a case where the quality of service of the first substream does not meet a preset condition, switch to the second substream, send the target data to the target CDN service node, and instruct the target CDN node to: disconnect the connection with the PCDN service node, and determine a data sequence number corresponding to the target data; simulate a user request according to a target web page address from which the user end requests to obtain data, and distribute the requested corresponding data to the user end according to the data sequence number, so as to realize the cooperative use of the PCDN and the CDN to distribute data for the user.
5. The apparatus of claim 4, wherein, The distribution module comprises: The quality of service detection unit is configured to determine the quality of service of the first substream by real-time detection of whether the first substream is disconnected or real-time detection of whether the first substream has data transmission congestion.
6. The apparatus of claim 4, further comprising: The disconnection module is configured to, after switching to the second substream, send a disconnection instruction to the user end to disconnect the first substream.
7. An electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data distribution method of any one of claims 1-3. The computer instructions are used to enable the computer to perform the data distribution method of any one of claims 1-3.
8. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, 9. A computer program product comprising a computer program which, when executed by a processor, implements the data distribution method of any one of claims 1-3.
Citation Information
Patent Citations
Content data transmission method and device
CN109150576A
Scheduling judgment method and device for content distribution network and computer readable storage medium
CN112788373A