Data transmission method, data analysis method and related devices

By tracking and analyzing transmission time and hop counts in P2P networks, the method optimizes network structure to reduce CDN bandwidth costs and enhance data sharing efficiency in live streaming.

CN120321426APending Publication Date: 2025-07-15HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510640359.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In P2P networks, it is difficult for the prior art to effectively count data transmission conditions, resulting in difficulty in optimizing network structure and affecting data transmission efficiency.

Method used

By recording the initial time and hops during the data block transmission process, the time spent and updated hops of the target node are calculated, and this information is output to the data processing device, so as to achieve statistics and optimization of the data transmission situation of the P2P network.

Benefits of technology

Accurate statistics on the data transmission situation of P2P network are realized, network structure is optimized, data transmission efficiency is improved, and CDN bandwidth costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120321426A_ABST
    Figure CN120321426A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method, a data analysis method and a related device, and relates to the field of communication. In the application, when the first node transmits the data block to the second node, the initial time and the hop count of the data block are transmitted, so that after the target node receives the data block, the consumed time of the target node and the updated hop count of the data block are calculated; and subsequently outputting the initial time, the updated hop count and the data block to the second node. According to the method and the device, in the transmission process of the data block according to the transmission link, each node counts the consumed time of each node and the hop count of the data block, so that the purpose of counting the data transmission condition of the P2P network in the data block transmission process is achieved, the P2P network structure can be better optimized, and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more specifically, to a data transmission method, a data analysis method, and related devices. Background Art

[0002] In recent years, scenarios involving data transmission such as live streaming and videos can use a CDN (Content Delivery Network) to perform data transmission.

[0003] In order to reduce the cost during data transmission, the P2P (peer to peer) network technology can be used to reduce the CDN bandwidth to save costs.

[0004] When using the P2P network for data transmission, it is necessary to count the data transmission situation of the P2P network to better optimize the P2P network structure. Summary of the Invention

[0005] In view of this, this application provides a data transmission method, a data analysis method, and related devices to solve the problem of urgently needing to count the data transmission situation of the P2P network.

[0006] To solve the above technical problems, this application adopts the following technical solutions:

[0007] A data transmission method is applied to a target node, where the target node is any node in a peer-to-peer network. In the peer-to-peer network, the previous node of the target node is the first node, and the next node of the target node is the second node. The data transmission method includes:

[0008] Receiving the data to be transmitted sent by the first node; the data to be transmitted includes the data block to be transmitted, the initial time, and the hop count of the data block; the initial time is the start time when the seed node corresponding to the first node downloads the data block from the content delivery network, and the hop count is the number of intermediate nodes that the data block passes through from the content delivery network to a node;

[0009] Obtaining the end time when successfully receiving the data block;

[0010] Calculating the time consumption of the target node according to the initial time and the end time; the time consumption is the time for the data block to be transmitted from the content delivery network to the target node;

[0011] Based on the hop count of the data block, determining the updated hop count after the data block is transmitted to the target node;

[0012] Output the initial time, the updated hop count of the data block, and the data block to the second node.

[0013] Optionally, calculate the time taken by the target node according to the initial time and the end time, including:

[0014] Calculate the time difference between the end time and the initial time, and use the time difference as the time taken by the target node.

[0015] Optionally, based on the hop count of the data block, determine the updated hop count of the data block after being transmitted to the target node, including:

[0016] Use the value obtained by adding one to the hop count of the data block as the updated hop count of the data block after being transmitted to the target node.

[0017] Optionally, after determining the updated hop count of the data block after being transmitted to the target node based on the hop count of the data block, further include:

[0018] Output the time taken by the target node and the updated hop count of the data block to the data processing device.

[0019] A data analysis method applied to a data processing device, the data analysis method includes:

[0020] Receive the time taken and the hop count of the data block sent by each node; the node is used to execute the above data transmission method;

[0021] Perform statistical analysis on the time taken and the hop count of each node to adjust the proportion of seed nodes in the peer-to-peer network.

[0022] Optionally, performing statistical analysis on the time taken and the hop count of each node to adjust the proportion of seed nodes in the peer-to-peer network includes:

[0023] Calculate the average value of the time taken and calculate the average value of the hop count;

[0024] According to the average value of the time taken and the average value of the hop count, determine the data download total bandwidth formula; the data download total bandwidth formula is a functional relationship among the data download total bandwidth, the target formula, the proportion of seed nodes, the total number of users, and the bandwidth consumed by each user; the target formula is a functional relationship among the target ratio, the proportion of seed nodes, the average value of the time taken, and the average value of the hop count; the target ratio is the ratio of the sum of the sizes of data blocks downloaded by all ordinary nodes from the content distribution network to the sum of the sizes of all data blocks downloaded by all ordinary nodes in the peer-to-peer network;

[0025] Take the proportion of the seed nodes as the parameter to be solved, and perform a solving operation on the total data download bandwidth formula to obtain the target value of the proportion of the seed nodes;

[0026] Adjust the proportion of the seed nodes in the peer-to-peer network according to the target value of the proportion of the seed nodes.

[0027] Optionally, determining the total data download bandwidth formula according to the average value of the time consumption and the average value of the number of hops includes:

[0028] Determine a first formula and a second formula according to the average value of the time consumption and the average value of the number of hops; the first formula is a functional relationship between the proportion of the seed nodes and the average value of the time consumption, and the second formula is a functional relationship between the proportion of the seed nodes and the average value of the number of hops;

[0029] Determine the target formula according to the first formula and the second formula;

[0030] Use the target formula, the proportion of the seed nodes, the total number of users, and the bandwidth consumed by each user to determine the total data download bandwidth formula.

[0031] Optionally, taking the proportion of the seed nodes as the parameter to be solved, and performing a solving operation on the total data download bandwidth formula to obtain the target value of the proportion of the seed nodes includes:

[0032] Obtain the value of the total number of users and the value of the bandwidth consumed by each user;

[0033] According to the value of the total number of users and the value of the bandwidth consumed by each user, take the proportion of the seed nodes as the parameter to be solved, and perform a numerical optimization solution on the total data download bandwidth formula to obtain the target value of the proportion of the seed nodes; wherein, when the value of the proportion of the seed nodes is the target value, the value of the total data download bandwidth is the smallest.

[0034] A data transmission device is applied to a target node, the target node is any node in a peer-to-peer network, in the peer-to-peer network, the previous node of the target node is the first node, and the next node of the target node is the second node. The data transmission device includes:

[0035] A data receiving module, configured to receive the data to be transmitted sent by the first node; the data to be transmitted includes a data block to be transmitted, an initial time, and the number of hops of the data block; the initial time is the start time when the seed node corresponding to the first node downloads the data block from the content distribution network, and the number of hops is the number of intermediate nodes passed by the data block from the content distribution network to a node;

[0036] An acquisition module, configured to acquire the end time when the data block is successfully received;

[0037] A calculation module, configured to calculate the time consumption of the target node according to the initial time and the end time; the time consumption is the time for the data block to be transmitted from the content delivery network to the target node;

[0038] A determination module, configured to determine an updated hop count of the data block after the data block is transmitted to the target node based on the hop count of the data block;

[0039] An output module, configured to output the initial time, the updated hop count of the data block, and the data block to the second node.

[0040] A data analysis device is applied to a data processing device, and the data analysis device includes:

[0041] An information receiving module, configured to receive the time consumption and the hop count of the data block sent by each node; the node is configured to execute the above data transmission method;

[0042] An analysis module, configured to perform statistical analysis on the time consumption and the hop count of each node to adjust the proportion of seed nodes in the peer-to-peer network.

[0043] An electronic device includes at least one processor and a memory connected to the processor, wherein:

[0044] The memory is used to store a computer program;

[0045] The processor is configured to execute the computer program so that the electronic device can implement the above data transmission method or implement the above data analysis method.

[0046] The present application provides a data transmission method, a data analysis method and related devices. In the present application, when a first node transmits a data block to a second node, an initial time and the hop count of the data block are also transmitted, so that after the target node receives the data block, the time consumption of the target node and the updated hop count of the data block are calculated, and then the initial time, the updated hop count, and the data block are output to the second node. That is, in the present application, during the transmission of the data block along the transmission link, each node counts the time consumption and the hop count of each node, achieving the purpose of counting the data transmission situation of the P2P network during the data block transmission process, and further being able to better optimize the P2P network structure and improve the data transmission efficiency. Description of the Drawings

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0048] Figure 1 A schematic diagram of a CDN network combined with a P2P network provided in an embodiment of the present application;

[0049] Figure 2 A flowchart of a data transmission method provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of transmission of a data block in a P2P network provided in an embodiment of the present application;

[0051] Figure 4 A flowchart of a data analysis method provided in an embodiment of the present application;

[0052] Figure 5 A flowchart of a method for determining a proportion provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;

[0054] Figure 7 A schematic diagram of the structure of a data analysis device provided in an embodiment of the present application;

[0055] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0057] In recent years, live broadcast, video and other scenarios involving data transmission have been widely used. Taking live broadcast as an example, the live broadcast industry has developed rapidly, extending from entertainment to e-commerce, education, social networking and other fields. The popularization of smart phones and 5G technology has further promoted the wave of live broadcast for all people.

[0058] Data transmission scenarios can use a CDN network for data transmission. The basic idea of a CDN network is to avoid bottlenecks and links on the Internet that may affect data transmission speed and stability as much as possible, so that content can be transmitted faster and more stably. By forming an intelligent virtual network on top of the existing Internet with node servers placed everywhere on the network, the CDN system can redirect users' requests to the service node closest to the user in real time based on comprehensive information such as network traffic, connections and load conditions of each node, distance to the user, and response time. Its purpose is to enable users to obtain the required content nearby, avoid network congestion, and improve the response speed of users accessing websites.

[0059] Taking the live broadcast scenario as an example, with the increasing requirements for real-time and clarity of live broadcasts, major live content providers and live platforms are facing the problem of high bandwidth costs. Therefore, using P2P network technology to reduce the use of CDN bandwidth has become a common technique for saving CDN bandwidth costs.

[0060] Taking the data transmission scenario as the live broadcast scenario as an example, when using the P2P network for data transmission, the real-time requirement of the live broadcast poses a great challenge to the sharing of P2P data. Users entering the live broadcast room are almost simultaneously watching the same content. Even considering the network differences of each user, the delay between users generally does not exceed the duration of 1 TS (TransportStream) slice (usually 3 seconds or 5 seconds). In such a short time window, the seed node needs to download data from the CDN network and quickly spread it to other ordinary nodes across the network, reducing the probability of ordinary nodes downloading data from the CDN. This requires very high requirements for the selection of seed nodes and the overall data diffusion efficiency. Therefore, on the premise that the P2P network has the above-mentioned naturally existing heterogeneity, a method is needed to statistically analyze the data transmission situation of the P2P network (also known as data diffusion efficiency or resource diffusion efficiency) to better optimize the P2P network structure and improve data transmission speed.

[0061] Therefore, this application provides a data analysis method and related device. In this application, when the first node transmits a data block (which can also be called a data chunk) to the second node, the initial time and the number of hops of the data block are also transmitted. Thus, after the target node receives the data block, the time consumed by the target node and the updated number of hops of the data block are calculated, and then the initial time, the updated number of hops, and the data block are output to the second node. That is, in this application, during the transmission of the data block along the transmission link, each node statistically analyzes the time consumed by each node and the number of hops of the data block, achieving the purpose of statistically analyzing the data transmission situation of the P2P network during the data block transmission process, and further being able to better optimize the P2P network structure and improve data transmission efficiency.

[0062] In an embodiment of the present application, a data analysis method is disclosed, and the target node is used to execute the data analysis method. The schematic diagram of the combination of the P2P network and the CDN network can be referred to Figure 1 as shown. The number of nodes in the P2P network can be configured according to the actual situation, such as Figure 1 shown. Taking the P2P network including nodes a-j as an example for introduction. According to the role division of the nodes in the P2P network, the nodes in the P2P network are divided into seed nodes and ordinary nodes, such as Figure 1 shown, where a is the seed node and b-j are ordinary nodes.

[0063] In one implementation, a batch of seed nodes can be selected from a large number of P2P nodes according to information such as the network status and hardware capabilities of the nodes, and the remaining nodes are ordinary nodes. In the P2P network, the seed nodes are responsible for directly pulling data from the CDN network and then sharing the data with other ordinary nodes through the P2P protocol. The ordinary nodes connect the seed nodes and other ordinary nodes. When downloading data, the ordinary nodes prefer to download through the P2P protocol from the connected seed nodes or ordinary nodes. If they really cannot download, they will go to the CDN network to download the missing data. At the same time, this node will also share the data it has downloaded with other nodes through the P2P protocol.

[0064] The roles between the seed nodes and the ordinary nodes can be converted with each other, that is, a node can degenerate from a seed node to an ordinary node, or evolve from an ordinary node to a seed node. The principle of conversion is that higher sharing rate can be brought after conversion.

[0065] In one implementation, the target node is any node in the P2P network, such as Figure 1 shown. The target node can be any node among nodes a-j. In the actual scenario, the target node can be devices such as the user's mobile phone, tablet, laptop, etc. When these devices watch live broadcasts, videos and other content, they need to obtain the content and perform corresponding display operations.

[0066] In one implementation, the previous node of the target node in the P2P network is the first node, and the next node of the target node is the second node. Taking the target node as node b as an example, at this time, the previous node of node b is node a, and the next nodes of node b are nodes d and e. At this time, node a is the first node, and nodes d and e are the second nodes. If the target node is node e, at this time, the previous node of node e is node b, and the next nodes of node e are nodes f and g. The previous and next nodes of other nodes can be referred to Figure 1 shown. It should be noted that if the target node is node a, since node a is a seed node, that is, the first node in the P2P network, then this node has no previous node and only has a next node. Similarly, nodes c, d, g, i, and j only have a previous node and no next node.

[0067] Referring to Figure 2 , a data transmission method may include:

[0068] S11. Receiving the data to be transmitted sent by the first node.

[0069] Among them, the data to be transmitted includes the initial time, the hop count of the first node, and the data block to be transmitted. The initial time is the start time when the seed node corresponding to the first node downloads the data block from the content distribution network. The hop count is the number of intermediate nodes that the data block passes through from the content distribution network to a node.

[0070] In an actual scenario, as Figure 1 shown, although the P2P network is a mesh structure, when it comes to the transmission of a specific data block, the diffusion process of this data block is a tree structure, and for any node in the tree to obtain the path of this data block, it is a chain structure. For example Figure 2 , the chain structure for transmitting the data block S can be CDN network - a - b - e - f - h - j. The links for transmitting to different nodes are different. For example, the link for transmitting to node j is a - b - e - f - h - j, and the link for transmitting to node g is CDN network - a - b - e - g.

[0071] Taking the target node as node b as an example, at this time, the previous node of node b is node a, and the subsequent nodes of node b are node d and e. For the data block S to be transmitted, the seed node a downloads the data block S from the CDN network. Among them, when starting to download the data block S from the CDN network, the timestamp T is recorded. After successfully downloading the data block S to node a, the timestamp doneTa when the data block S is downloaded completely, the difference between doneTa and T is the time consumption T_a for node a to download the data block S from the CDN network. Since node a is the seed node in the P2P network and does not need to pass through other nodes in the P2P network, that is, there is no intermediate node at this time. When node a downloads the data block S from the CDN network, the hop count X_a of this data block S is recorded as 0.

[0072] Subsequently, the seed node a transmits the data block S to node b. In addition to transmitting the data block S to node b, the seed node a also transmits the initial time and the hop count of the data block. Among them, the initial time is the above - mentioned timestamp T, and the hop count of the data block is the above - mentioned X_a.

[0073] It should be noted that the data block to be transmitted, the initial time, and the hop count of the data block can be configured in the data to be transmitted at the same time, so that the first node transmits the data to be transmitted to the target node. In addition, the data block to be transmitted, the initial time, and the hop count of the data block can also be transmitted to the target node separately. Specifically how to perform data transmission can be based on the actual configuration.

[0074] In addition, the seed node a will also upload the hop count of the data block and the time consumption Ta to the data processing device, enabling the data processing device to perform statistical analysis on the hop count and the time consumption and optimize the P2P network architecture.

[0075] S12. Obtain the end time when the data block is successfully received.

[0076] In this embodiment, when the target node successfully receives, that is, successfully downloads the data block S, record the timestamp doneTb of successfully downloading the data block S. The timestamp doneTb is the end time when the target node successfully receives the data block.

[0077] S13. Calculate the time consumption of the target node according to the initial time and the end time.

[0078] Among them, the time consumption is the time for the data block to be transmitted from the content delivery network to the target node.

[0079] It should be noted that the concept of the time consumption in this embodiment is different from the conventional concept of time consumption. The conventional concept of time consumption refers to the time consumption required for downloading the data block. Taking the time consumption of the target node as an example, the conventional time consumption is the time required for the target node to download the data block S at the first node. The time consumption in this embodiment refers to the time for the data block to be transmitted from the CDN network to the target node, which includes both the transmission time consumption and the download time consumption of each node passed through from the CDN network to the target node. Taking the target node as b as an example, the time consumption includes the time for the seed node a to download the data block S from the CDN network, the time for the seed node a to transmit the data block to the target node b, and the time for the target node b to successfully receive the data block S. That is, the time consumption in the embodiments of the present application includes not only the conventional time consumption but also some other time consumption data.

[0080] In one implementation, the time difference between the end time and the initial time can be calculated, and the time difference is used as the time consumption of the target node. Taking the target node as b as an example, the time consumption of the target node b is doneTb - T, and this time consumption is represented by T_b.

[0081] S14. Based on the hop count of the data block, determine the updated hop count after the data block is transmitted to the target node.

[0082] In this embodiment, after the data block S is transmitted to the first node, such as node a, the hop count of the data block S is X_a at this time. Subsequently, the node a transmits the data block S to the target node, such as node b. At this time, the data block S passes through one more node (that is, node a, and node a is the intermediate node at this time). In one implementation, the value obtained by adding 1 to the hop count of the data block is used as the updated hop count after the data block is transmitted to the target node. At this time, the hop count is updated to X_b, and X_b = X_a + 1.

[0083] In one implementation, after obtaining the updated hop count of the data block after it is transmitted to the target node, the time consumption of the target node and the updated hop count of the data block can be output to the data processing device, and the data processing device can optimize the P2P network architecture based on the time consumption of each node and the hop count of the data block.

[0084] S15. Output the initial time, the updated hop count of the data block, and the data block to the second node.

[0085] In this step, the second node is the next node after the target node. Similar to the interaction between the first node and the target node, the target node will output the initial time, the updated hop count of the data block, and the data block to the second node. Among them, the initial time, the updated hop count of the data block, and the data block can be transmitted to the second node separately, or aggregated into the data to be transmitted and transmitted to the second node together.

[0086] Taking the target node as node b and the second node as node e as an example, node b will send the initial time, the updated hop count of the data block, and the data block to node e.

[0087] In this embodiment, when the first node transmits the data block to the second node, the initial time and the hop count of the data block will also be transmitted, so that after the target node receives the data block, the time consumption of the target node and the updated hop count of the data block can be calculated, and then the initial time, the updated hop count, and the data block are output to the second node. That is, in this application, during the transmission of the data block along the transmission link, each node counts the time consumption of each node and the hop count of the data block, achieving the purpose of counting the data transmission situation of the P2P network during the data block transmission process, and thus being able to better optimize the P2P network structure and improve the data transmission efficiency.

[0088] For those skilled in the art to better understand the implementation of the embodiments of this application, now in combination with Figure 3 , taking the data block S passing through a - b - e - f - h - j in sequence from the CDN network as an example for illustration. The implementation processes of other data links, such as CDN network - a - b - e - f - i, are similar.

[0089] As Figure 3 shown, assuming that a is the seed node and other nodes are ordinary nodes, then when a starts to download the data block S from the CDN, record the timestamp when the data block S starts to be downloaded as T, and the time after downloading is completed is recorded as doneTa. Subtract T from doneTa to obtain the time consumption Ta of node a, and record the hop count Xa of the data block S as 0. When node a shares the data block S with node b, it also transfers T and Xa to node b. In addition, node a reports Ta and Xa to the data processing device.

[0090] After node b downloads data block S from node a, the time after the download is completed is denoted as doneTb. Subtract T from doneTb to obtain the time consumption T_b of node b. At the same time, b increments the hop count of data block S by 1 based on X_a to get the hop count X_b = 1. When node b shares data block S with node e, it passes T and X_b to node e simultaneously. Additionally, node b reports T_b and X_b to the data processing device.

[0091] After node e downloads data block S from node b, the time after the download is completed is denoted as doneTe. Subtract T from doneTe to obtain the time consumption T_e of node e. At the same time, e increments the hop count of data block S by 1 based on X_b to get the hop count X_e = 2. When node e shares data block S with node f, it passes T and X_e to node f simultaneously. Additionally, node e reports T_e and X_e to the data processing device.

[0092] After node f downloads data block S from node e, the time after the download is completed is denoted as doneTf. Subtract T from doneTf to obtain the time consumption T_f of node f. At the same time, f increments the hop count of data block S by 1 based on X_e to get the hop count X_f = 3. When node f shares data block S with node h, it passes T and X_f to node f simultaneously. Additionally, node f reports T_f and X_f to the data processing device.

[0093] After node h downloads data block S from node f, the time after the download is completed is denoted as doneTh. Subtract T from doneTh to obtain the time consumption T_h of node h. At the same time, h increments the hop count of data block S by 1 based on X_f to get the hop count X_h = 4. When node h shares data block S with node j, it passes T and X_h to node j simultaneously. Additionally, node h reports T_h and X_h to the data processing device.

[0094] After node j downloads data block S from node h, the time after the download is completed is denoted as doneTj. Subtract T from doneTj to obtain the time consumption T_j of node j. At the same time, j increments the hop count of data block S by 1 based on X_h to get the hop count X_j = 5. Additionally, node j reports T_j and X_j to the data processing device.

[0095] In this embodiment, when a seed node starts to download a data block S from the CDN, record the timestamp T when the data block S starts to be downloaded, and mark the hop count of this data block as 0. When sharing the data block S with another node, simultaneously pass T and the hop count to this node. After receiving the data block S, this node calculates the transmission time consumption, increments the hop count by 1, and then reports the time consumption and the hop count to the data processing device for cleaning. When this node continues to share the data block S with other nodes, it will continue to pass the timestamp T and the hop count, repeating the above steps to achieve the purpose of counting the time consumption and the hop count during the transmission of the data block S.

[0096] In addition, the resource diffusion efficiency (time consumption and hop count) of the P2P network counted by this application can truly reflect whether the selection and proportion of seed nodes in the entire P2P network are reasonable, and whether the resource diffusion speed reaches the optimal value, providing an important reference basis for the iteration and positive optimization of the P2P system. It can effectively solve problems such as slow data diffusion and difficult improvement of the sharing rate caused by the complexity and real-time nature of the live P2P network, and ultimately achieve the purpose of saving more CDN bandwidth.

[0097] In addition, through the time consumption and hop count counted by this application, it is possible to assist the scheduling service in the P2P live system to reasonably control the proportion of seed nodes, more accurately select seed nodes, and more efficiently complete the diffusion of resources, thereby achieving the purpose of improving the sharing rate of the peer-to-peer live system and saving more CDN bandwidth.

[0098] Based on the above embodiment of the data transmission method, another embodiment of this application provides a data analysis method, which is applied to a data processing device. The data processing device in this embodiment can be a statistical server.

[0099] Refer to Figure 4 , a data analysis method may include:

[0100] S21. Receive the time consumption sent by each node and the hop count of the data block.

[0101] Among them, the node is used to execute the above data transmission method.

[0102] In this embodiment, still taking Figure 1 as an example, the node in this embodiment can be any node in the P2P network in Figure 1 . When each node transmits a data block, there will be corresponding time consumption and hop count. It should be noted that taking the data block S transmitted from node a to node j as an example, the data block S will have multiple hop counts.

[0103] In addition, for other data blocks, such as data blocks W, Y, etc., there are also corresponding data sharing links, and the corresponding time consumption and hop count can also be transmitted to the data processing device in this application.

[0104] The actual P2P network structure is more complex than Figure 1 the P2P network structure shown. Each node in the P2P network will upload the hop count and the time consumption, and then the hop count and time consumption uploaded by all nodes will be analyzed as a whole to obtain the proportion of the optimal seed nodes.

[0105] S22. Statistically analyze the time consumption of each node and the hop count of the data block to adjust the proportion of the seed nodes in the peer-to-peer network.

[0106] In this embodiment, when performing statistical analysis, it is not limited to the time consumption and hop count of the nodes in the transmission process of a certain data block. The time consumption and hop count of the nodes in the transmission process of all data blocks in the P2P network can be analyzed as a whole to optimize the P2P network.

[0107] In addition, for a data block, there are multiple corresponding hop counts. When analyzing its hop count, each hop value of the data block can be analyzed.

[0108] In one implementation, taking the live broadcast scenario as an example, assume that in the case of a live broadcast without using the P2P network for data transmission, the CDN bandwidth consumed by each user is W, and the total number of users is N. Then, for a live broadcast, the total CDN bandwidth to be paid is BW1 = W * N. Assume that in the case of a live broadcast using the P2P network for data transmission, the proportion of the seed nodes is P, and the ordinary nodes are N * (1 - P). Assume that among all the ordinary nodes in the P2P network, the proportion of the sum of the sizes of the data blocks downloaded from the CDN network in the sum of the sizes of all the downloaded data blocks is Y. In the actual scenario, there are two sources for the ordinary nodes to download data blocks. One is to download from the seed nodes or other ordinary nodes in the P2P network, and the other is to directly download the data blocks in the CDN network. The ordinary nodes prefer to download data blocks in the P2P network. When the download of the data blocks in the P2P network fails, the ordinary nodes will choose to download the data blocks from the CDN network.

[0109] The nodes in the P2P network, mainly ordinary nodes, will also report the data block source (P2P network or CDN network) and the data block size when downloading the data block and reporting the time consumption and hop count.

[0110] The data processing device can calculate the sum of the sizes of the data blocks downloaded by all ordinary nodes from the CDN network, and calculate the sum of the sizes of all the data blocks downloaded by all ordinary nodes.

[0111] Y = the sum of the sizes of the data blocks downloaded by all ordinary nodes from the CDN network / the sum of the sizes of all the data blocks downloaded by all ordinary nodes.

[0112] At this time, for a live stream, the total CDN bandwidth to be paid is BW2 = N * P * W + N * (1 - P) * W * Y, where Y is directly related to the average value Xv of the number of hops and the average value Tv of the time consumption, and Y is indirectly related to P. Theoretically, there must be a value Px of P that can minimize BW_2, reduce the CDN bandwidth cost, save costs, and at this time, the P2P network has the highest sharing rate.

[0113] Therefore, in the embodiments of the present application, based on the logical relationship among Y, Xv, Tv, BW_2, and P, the optimal Px is determined, and then the proportion of seed nodes is adjusted based on Px, including degenerating some seed nodes into ordinary nodes or evolving some ordinary nodes into seed nodes. Each adjustment will make the proportion and selection of seed nodes in the entire P2P network closer to the optimal state. Through continuous positive iteration, the proportion and number of seed nodes in the P2P network can be optimized, so that the P2P network structure reaches the optimal state.

[0114] In this embodiment, by statistically analyzing the time consumption of each node and the number of hops of the data block, the proportion of seed nodes in the peer-to-peer network is adjusted, so as to optimize the P2P network structure and make the P2P network structure reach the optimal state.

[0115] In one implementation, referring to Figure 5 , statistically analyzing the time consumption of each node and the number of hops of the data block to adjust the proportion of seed nodes in the peer-to-peer network may include the following steps:

[0116] S31. Calculate the average value of the time consumption and calculate the average value of the number of hops.

[0117] In this embodiment, the average value of the time consumption may be represented by Tv, and the average value of the number of hops may be represented by Xv.

[0118] In one implementation, the average value Xv of the number of hops can reflect the redundancy of seed nodes in the current P2P network. As the proportion of seed nodes ranges from 0 to 1, Xv will show a law of increasing first and then decreasing.

[0119] The average value Tv of the time consumption can reflect the average time consumption of the data block in the current P2P network from the CDN network to each node through the P2P protocol. As the proportion of seed nodes ranges from 0 to 1, Tv will show a law of increasing first and then decreasing.

[0120] It should be noted that the average value Tv of the time consumption in this embodiment refers to the average value of each time consumption uploaded by all nodes in all P2P networks, and the average value Xv of the number of hops represents the average value of each number of hops uploaded by each node.

[0121] S32. Determine the total data download bandwidth formula based on the average value of the time consumption and the average value of the number of hops.

[0122] Among them, the total data download bandwidth formula is a functional relationship of the total data download bandwidth, the target formula, the proportion of seed nodes, the total number of users, and the bandwidth consumed by each user.

[0123] The target formula is a functional relationship of the target ratio, the proportion of seed nodes, the average value of time consumption, and the average value of the number of hops; the target ratio is the ratio of the sum of the sizes of data blocks downloaded by all ordinary nodes from the content distribution network to the sum of the sizes of all data blocks downloaded by all ordinary nodes in the peer-to-peer network.

[0124] In one implementation, the total data download bandwidth formula is determined based on the target formula, and the target formula is determined based on other formulas. In one embodiment, step S32 includes:

[0125] 1) Determine the first formula and the second formula based on the average value of the time consumption and the average value of the number of hops.

[0126] Among them, the first formula is a functional relationship between the proportion of seed nodes and the average value of time consumption, that is, the functional relationship between Tv and P mentioned above. The second formula is a functional relationship between the proportion of seed nodes and the average value of the number of hops, that is, the functional relationship between Xv and P.

[0127] In specific implementation, Px can be solved by establishing a mathematical model. The process of establishing the mathematical model is as follows:

[0128] Variable definition:

[0129] Independent variable: Proportion of seed nodes: P ∈ [0, 1];

[0130] Intermediate variable:

[0131] Data transfer time consumption function: Tv = Tv(P), which first increases and then decreases with P, and is a unimodal function;

[0132] Data transfer hop count function: Xv = Xv(P), which first increases and then decreases with P, and is a unimodal function;

[0133] Target ratio (the specific meaning refers to the above description): Y = Y(Tv, Xv), Y increases with the increase of Tv and Xv, and decreases monotonically with the increase of P.

[0134] The characteristics of the above functions are constrained as follows:

[0135] 1) Characteristics of Tv(P) and Xv(P):

[0136] When P = 0: Tv(0) = Tmin, Xv(0) = Xmin; Tmin is the minimum value of Tv, Xmin is the minimum value of Xv, and Tmin and Xmin are configurable;

[0137] When P = 1: Tv(1) = Tmin, Xv(1) = Xmin; Tmin is the minimum value of Tv, Xmin is the minimum value of Xv; Tmin and Xmin are configurable;

[0138] When P changes from 0 to 1, Tv(P) and Xv(P) first increase and then decrease, and there are unique peak points Pt and Pz respectively (usually Pt = Pz because of their related physical meanings), and their derivatives satisfy:

[0139]

[0140]

[0141] The change rates of Tv'(P) and Xv'(P) are slow first, then fast, and then slow again. The change rates of the second derivative Tv''(P) of Tv(P) and the second derivative Xv''(P) of Xv(P) are positive first and then negative, that is, it changes from a convex function to a concave function.

[0142] 2) Characteristics of Y = Y(Tv, Xv):

[0143] In the actual scenario, the longer the data block transfer time / the longer the path, the more inclined the ordinary nodes are to directly download the data block from the CDN network. Therefore, in the embodiments of the present application, Y increases with the increase of Tv and Xv.

[0144] Boundary conditions: Y(Tmin, Xmin) = 1, that is, when P = 0, all ordinary nodes download from the CDN, and Y(Tmin, Xmin) = 0, that is, when P = 1, all are seed nodes and non-seed nodes do not exist.

[0145] Change rate: Since Tv(P) and Xv(P) first increase and then decrease, Y(P) = Y(Tv(P), Xv(P)) decreases monotonically with P, and its derivative is:

[0146]

[0147] It can be seen from this that the change rate of Y(P) is slow first, then fast, and then slow again, which is consistent with the change rates of Tv'(P) and Xv'(P).

[0148] After knowing the above content, the construction of the first formula, the second formula and the target formula can be carried out.

[0149] Specifically, from the characteristics of Tv(P) and Xv(P), it can be known that Tv(P) and Xv(P) are symmetric unimodal functions (i.e., they take the minimum value when P = 0 and P = 1), so the first formula is:

[0150]

[0151] The second formula is:

[0152]

[0153] where a and b are parameters to be fitted, and a, b > 0. a is used to control the peak height of Tv, and b is used to control the peak height of Xv.

[0154] In specific implementation, when the proportion P of the seed nodes in the P2P network is known, and at this proportion, the average value Tv of each elapsed time and the average value Xv of the number of hops are known, a large number of P and Tv can be substituted into the above first formula, and the value of a can be obtained through fitting. Among them, a can also be called the first peak height fitting parameter, specifically referring to the peak height fitting parameter of Tv(P). Similarly, a large number of P and Xv can be substituted into the above second formula, and the value of b can be obtained through fitting. Among them, b can also be called the second peak height fitting parameter, specifically referring to the peak height fitting parameter of Xv(P).

[0155] After a and b are known, the first formula and the second formula can be determined.

[0156] 2) Determine the target formula according to the first formula and the second formula.

[0157] Among them, the target formula is a functional relationship of the target ratio, the proportion of seed nodes, the average value of elapsed time, and the average value of the number of hops; the target ratio is the ratio of the sum of the sizes of data blocks downloaded by all ordinary nodes from the content distribution network to the sum of the sizes of all data blocks downloaded by all ordinary nodes in the peer-to-peer network.

[0158] In one implementation, the target ratio is the above-mentioned Y, and the target formula is a functional relationship among Y, P, Tv, and Xv.

[0159] According to the above content, from the characteristics of Y, it can be known that Y shows exponential decay with Xv(P) + Tv(P) - (Xmin + Tmin) and is directly affected by P. So the target formula is:

[0160]

[0161] where k is a parameter to be fitted, and it can also be called the exponential decay rate fitting parameter. The exponential decay rate fitting parameter specifically refers to the exponential decay rate fitting parameter of Y(P) with respect to the dependent term. k > 0, and it satisfies the boundary condition:

[0162] When P = 0, Xv(P)+Tv(P)=Xmin+Tmin, and the exponential term is 0.

[0163] When P = 1, Xv(P)+Tv(P)=Xmin+Tmin, and the exponential term is 0.

[0164] When P increases from 0, Xv(P)+Tv(P) first increases and then decreases (because a, b>0), resulting in the exponential term decreasing first and then increasing, but due to the superposition of the linear attenuation of (1 - P), the overall Y(P) will still decrease monotonically.

[0165] Substitute different Ys in the P2P network, as well as Tv, Xv, and P under this Y, into the target formula, and the value of k can be obtained through fitting calculation. After the value of k is determined, the target formula can be determined.

[0166] Among them, Xv(P) and Tv(P) in the target formula are calculated through the first formula and the second formula respectively.

[0167] Therefore, the complete mathematical model (layering function) in the embodiments of this application is:

[0168]

[0169]

[0170]

[0171] Among them, the meanings of the letters in the formula refer to the corresponding descriptions above.

[0172] 3) Use the target formula, the proportion of seed nodes, the total number of users, and the bandwidth consumed by each user to determine the total data download bandwidth formula.

[0173] Among them, the total data download bandwidth formula is a functional relationship among the total data download bandwidth, the target formula, the proportion of seed nodes, the total number of users, and the bandwidth consumed by each user.

[0174] Specifically, the total data download bandwidth formula specifically refers to the calculation formula of the total data download bandwidth as follows:

[0175]

[0176] This formula is essentially the same as the content of BW_2 = N*P*W + N*(1 - P)*W*Y above. The total data download bandwidth formula includes the target formula, the proportion of seed nodes P, the total number of users N, and the bandwidth consumed by each user W.

[0177] S33. Take the proportion of the seed nodes as the parameter to be solved, and perform a solving operation on the total data download bandwidth formula to obtain the target value of the proportion of the seed nodes.

[0178] Specifically, the proportion of the seed nodes in the P2P network will affect the value of the total data download bandwidth. Therefore, the proportion of the seed nodes in the P2P network can be determined through the calculation formula of the total data download bandwidth.

[0179] In one implementation, obtain the value of the total number of users and the value of the bandwidth consumed by each user. According to the value of the total number of users and the value of the bandwidth consumed by each user, take the proportion of the seed nodes as the parameter to be solved, and perform a numerical optimization solution on the total data download bandwidth formula to obtain the target value of the proportion of the seed nodes. Among them, when the value of the proportion of the seed nodes is the target value, the value of the total data download bandwidth is the smallest.

[0180] Among them, the numerical optimization solution method can be the gradient descent algorithm or the Newton method, etc.

[0181] Specifically, the Px solution formula obtained by using the numerical optimization solution method is:

[0182]

[0183] In practical applications, substitute the obtained value of the total number of users and the value of the bandwidth consumed by each user into the total data download bandwidth formula, then take the proportion of the seed nodes as the parameter to be solved, and use the numerical optimization solution method to perform a solving operation. When the value of the total data download bandwidth is the smallest, the value of Px can be obtained. This Px is the target value of the seed nodes in the P2P network, and the target value is the optimal proportion of the seed nodes in the 2P network.

[0184] S34. Adjust the proportion of the seed nodes in the peer-to-peer network according to the target value of the proportion of the seed nodes.

[0185] In this application, using Px to adjust the proportion of the seed nodes in the P2P network includes degenerating some seed nodes into ordinary nodes, or evolving some ordinary nodes into seed nodes. Each time an adjustment is made, the proportion and selection of the seed nodes in the entire P2P network will get closer and closer to the optimal state. Through continuous positive iteration, the proportion and quantity of the seed nodes in the P2P network can be made optimal, so that the P2P network structure reaches the optimal state.

[0186] In this embodiment, a large number of parameters are used for fitting to construct the total data download bandwidth formula. When the value of the total data download bandwidth is minimized, the proportion and quantity of seed nodes in the P2P network are optimal, so as to achieve lower costs and ensure the optimality of the P2P network architecture.

[0187] In another implementation, theoretically speaking, the lower the proportion of seed nodes, the less data is downloaded from the CDN. However, this will also bring longer diffusion links, that is, higher hop counts and longer time consumption, which will instead cause more ordinary nodes to need to supplement data from the CDN. Therefore, the proportion of seed nodes is not the lower the better. Therefore, the optimal solution that maintains a relative balance among the number of seed nodes, time consumption, hop counts, and sharing rate can be found through experiments or data derivation. This can optimize the proportion of seed nodes in the P2P network, optimize the architecture of the P2P network, and achieve the purpose of optimizing the entire P2P live broadcast system.

[0188] Based on the embodiment of the above data transmission method, another embodiment of the present application provides a data transmission device, which is applied to a target node. The target node is any node in the peer-to-peer network. In the peer-to-peer network, the previous node of the target node is the first node, and the next node of the target node is the second node. Refer to Figure 6 , the data transmission device includes:

[0189] A data receiving module 11, configured to receive the data to be transmitted sent by the first node; the data to be transmitted includes the data block to be transmitted, the initial time, and the hop count of the data block; the initial time is the start time when the seed node corresponding to the first node downloads the data block from the content delivery network, and the hop count is the number of intermediate nodes passed by the data block from the content delivery network to a node;

[0190] An acquisition module 12, configured to acquire the end time of successfully receiving the data block;

[0191] A calculation module 13, configured to calculate the time consumption of the target node according to the initial time and the end time; the time consumption is the time for the data block to be transmitted from the content delivery network to the target node;

[0192] A determination module 14, configured to determine the updated hop count of the data block after being transmitted to the target node based on the hop count of the data block;

[0193] An output module 15, configured to output the initial time, the updated hop count of the data block, and the data block to the second node.

[0194] In one implementation, the calculation module 13 is specifically configured to:

[0195] Calculate the time difference between the end time and the initial time, and use the time difference as the time consumption of the target node.

[0196] In one implementation, the determination module 14 is specifically configured to:

[0197] Use the value obtained by adding 1 to the hop count of the data block as the updated hop count of the data block after it is transmitted to the target node.

[0198] In one implementation, the output module 15 is further configured to:

[0199] Output the time consumption of the target node and the updated hop count of the data block to the data processing device.

[0200] In this embodiment, when the first node transmits a data block to the second node, the initial time and the hop count of the data block are also transmitted. As a result, after the target node receives the data block, it calculates the time consumption of the target node and the updated hop count of the data block, and then outputs the initial time, the updated hop count, and the data block to the second node. That is, in this application, during the transmission of the data block along the transmission link, each node counts the time consumption of each node and the hop count of the data block, achieving the purpose of counting the data transmission situation in the P2P network during the data block transmission process. Furthermore, it can better optimize the P2P network structure and improve the data transmission efficiency.

[0201] It should be noted that for the working processes of the various modules in this embodiment, please refer to the corresponding descriptions in the above embodiments and will not be elaborated here.

[0202] Based on the above embodiment of the data analysis method, another embodiment of this application provides a data analysis device, which is applied to a data processing device. Refer to Figure 7 , and the data analysis device includes:

[0203] An information receiving module 21, configured to receive the time consumption and the hop count of the data block sent by each node; the node is used to execute the above data transmission method;

[0204] An analysis module 22, configured to perform statistical analysis on the time consumption and the hop count of each node to adjust the proportion of seed nodes in the peer-to-peer network.

[0205] In one implementation, the analysis module 22 includes:

[0206] A calculation sub-module, configured to calculate the average value of the time consumption and calculate the average value of the hop count;

[0207] A formula determination sub-module, configured to determine a total data download bandwidth formula according to the average value of the time consumption and the average value of the number of hops; the total data download bandwidth formula is a functional relationship among the total data download bandwidth, a target formula, the proportion of seed nodes, the total number of users, and the bandwidth consumed by each user; the target formula is a functional relationship among a target ratio, the proportion of seed nodes, the average value of the time consumption, and the average value of the number of hops; the target ratio is the ratio of the sum of the sizes of data blocks downloaded by all ordinary nodes from the content distribution network to the sum of the sizes of all data blocks downloaded by all ordinary nodes in the peer-to-peer network;

[0208] A solution sub-module, configured to use the proportion of seed nodes as a parameter to be solved, and perform a solution operation on the total data download bandwidth formula to obtain a target value of the proportion of seed nodes;

[0209] An adjustment sub-module, configured to adjust the proportion of seed nodes in the peer-to-peer network according to the target value of the proportion of seed nodes.

[0210] In one implementation, the formula determination sub-module includes:

[0211] A first formula determination unit, configured to determine a first formula and a second formula according to the average value of the time consumption and the average value of the number of hops; the first formula is a functional relationship between the proportion of seed nodes and the average value of the time consumption, and the second formula is a functional relationship between the proportion of seed nodes and the average value of the number of hops;

[0212] A second formula determination unit, configured to determine a target formula according to the first formula and the second formula;

[0213] A third formula determination unit, configured to use the target formula, the proportion of seed nodes, the total number of users, and the bandwidth consumed by each user to determine a total data download bandwidth formula.

[0214] In one implementation, the solution sub-module is specifically configured to:

[0215] Obtain the value of the total number of users and the value of the bandwidth consumed by each user, and use the proportion of seed nodes as a parameter to be solved according to the value of the total number of users and the value of the bandwidth consumed by each user, and perform a numerical optimization solution on the total data download bandwidth formula to obtain a target value of the proportion of seed nodes; wherein, when the value of the proportion of seed nodes is the target value, the value of the total data download bandwidth is the smallest.

[0216] In this embodiment, by statistically analyzing the time consumption of each node and the number of hops of data blocks, the proportion of seed nodes in the peer-to-peer network is adjusted, so as to optimize the P2P network structure and make the P2P network structure reach the optimal state.

[0217] It should be noted that for the working processes of each module and sub-module in this embodiment, please refer to the corresponding descriptions in the above embodiments, and details will not be repeated here.

[0218] Another embodiment of the present application provides an electronic device, including at least one processor and a memory connected to the processor, where:

[0219] The memory is used to store computer programs;

[0220] The processor is used to execute the computer program so that the electronic device can implement the above data transmission method or the above data analysis method.

[0221] A structural diagram reference of an electronic device Figure 8 As shown, it shows a schematic structural diagram of an electronic device suitable for implementing the electronic device in the embodiments of the present application. The electronic device in the embodiments of the present application may include, but is not limited to, fixed terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), desktop computers, and the like. Figure 8 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0222] As Figure 8 shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage device 608 into the random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.

[0223] Generally, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 can allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 8 an electronic device with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.

[0224] Another embodiment of the present application provides a data processing system, including a device for executing a data transmission method and a device for executing a data analysis method.

[0225] An embodiment of the present application also provides a computer program product, including computer-readable instructions, which, when running on an electronic device, enable the electronic device to implement any data transmission method or data analysis method provided by the embodiments of the present application.

[0226] An embodiment of the present application also provides a computer-readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, they can enable the electronic device to implement any data transmission method or data analysis method provided by the embodiments of the present application.

[0227] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data transmission method, characterized in that, Applied to a target node, where the target node is any node in a peer-to-peer network. In the peer-to-peer network, the previous node of the target node is the first node, and the next node of the target node is the second node. The data transmission method includes: Receiving the data to be transmitted sent by the first node; the data to be transmitted includes the data block to be transmitted, the initial time, and the hop count of the data block; the initial time is the start time when the seed node corresponding to the first node downloads the data block from the content distribution network, and the hop count is the number of intermediate nodes that the data block passes through from the content distribution network to a node; Obtaining the end time when the data block is successfully received; Calculating the time consumption of the target node according to the initial time and the end time; the time consumption is the time for the data block to be transmitted from the content distribution network to the target node; Determining the updated hop count of the data block after it is transmitted to the target node based on the hop count of the data block; Outputting the initial time, the updated hop count of the data block, and the data block to the second node.

2. The data transmission method according to claim 1, characterized in that Calculating the time consumption of the target node according to the initial time and the end time includes: Calculating the time difference between the end time and the initial time, and taking the time difference as the time consumption of the target node.

3. The data transmission method according to claim 1, wherein Determining the updated hop count of the data block after it is transmitted to the target node based on the hop count of the data block includes: Taking the value obtained by adding 1 to the hop count of the data block as the updated hop count of the data block after it is transmitted to the target node.

4. The data transmission method according to claim 1, wherein After determining the updated hop count of the data block after it is transmitted to the target node based on the hop count of the data block, it further includes: Outputting the time consumption of the target node and the updated hop count of the data block to a data processing device.

5. A data analysis method, characterized in that, Applied to a data processing device, the data analysis method includes: Receiving the time consumption and the hop count of the data block sent by each node; the node is used to execute the data transmission method according to any one of claims 1-4; Performing statistical analysis on the time consumption and the hop count of each node to adjust the proportion of seed nodes in the peer-to-peer network.

6. The data analysis method according to claim 5, wherein Performing statistical analysis on the time consumption and the hop count of each node to adjust the proportion of seed nodes in the peer-to-peer network includes: Calculating the average value of the time consumption and calculating the average value of the hop count; Determining a data download total bandwidth formula according to the average value of the time consumption and the average value of the hop count; the data download total bandwidth formula is a functional relationship among the data download total bandwidth, the target formula, the proportion of seed nodes, the total number of users, and the bandwidth consumed by each user; the target formula is a functional relationship among the target ratio, the proportion of seed nodes, the average value of the time consumption, and the average value of the hop count; the target ratio is the ratio of the sum of the sizes of data blocks downloaded by all ordinary nodes from the content distribution network to the sum of the sizes of all data blocks downloaded by all ordinary nodes in the peer-to-peer network; Take the proportion of the seed nodes as the parameter to be solved, and perform a solution operation on the total data download bandwidth formula to obtain the target value of the proportion of the seed nodes; Adjust the proportion of the seed nodes in the peer-to-peer network according to the target value of the proportion of the seed nodes.

7. The data analysis method according to claim 6, characterized in that Determine the total data download bandwidth formula according to the average value of the time consumption and the average value of the number of hops, including: Determine a first formula and a second formula according to the average value of the time consumption and the average value of the number of hops; the first formula is a functional relationship between the proportion of the seed nodes and the average value of the time consumption, and the second formula is a functional relationship between the proportion of the seed nodes and the average value of the number of hops; Determine the target formula according to the first formula and the second formula; Use the target formula, the proportion of the seed nodes, the total number of users, and the bandwidth consumed by each user to determine the total data download bandwidth formula.

8. The data analysis method according to claim 6, wherein Take the proportion of the seed nodes as the parameter to be solved, and perform a solution operation on the total data download bandwidth formula to obtain the target value of the proportion of the seed nodes, including: Obtain the value of the total number of users and the value of the bandwidth consumed by each user; Take the proportion of the seed nodes as the parameter to be solved, and perform a numerical optimization solution on the total data download bandwidth formula according to the value of the total number of users and the value of the bandwidth consumed by each user to obtain the target value of the proportion of the seed nodes; wherein, when the value of the proportion of the seed nodes is the target value, the value of the total data download bandwidth is the smallest.

9. A data transmission device, characterized in that, Applied to a target node, the target node is any node in the peer-to-peer network. In the peer-to-peer network, the previous node of the target node is the first node, and the next node of the target node is the second node. The data transmission device includes: A data receiving module, configured to receive the data to be transmitted sent by the first node; the data to be transmitted includes the data block to be transmitted, the initial time, and the number of hops of the data block; the initial time is the start time when the seed node corresponding to the first node downloads the data block from the content distribution network, and the number of hops is the number of intermediate nodes passed by the data block from the content distribution network to a node; An obtaining module, configured to obtain the end time when the data block is successfully received; A calculation module, configured to calculate the time consumption of the target node according to the initial time and the end time; the time consumption is the time for the data block to be transmitted from the content distribution network to the target node; A determining module, configured to determine the updated number of hops of the data block after the data block is transmitted to the target node based on the number of hops of the data block; An output module, configured to output the initial time, the updated number of hops of the data block, and the data block to the second node.

10. A data analysis device, characterized in that, Applied to a data processing device, the data analysis device includes: An information receiving module, configured to receive the time consumption and the number of hops of the data block sent by each node; the node is used to execute the data transmission method according to any one of claims 1-4; An analysis module, configured to perform statistical analysis on the time consumption of each of the nodes and the number of hops of the data block, so as to adjust the proportion of seed nodes in the peer-to-peer network.

11. An electronic device, characterized in that, Comprising at least one processor and a memory connected to the processor, wherein: The memory is used for storing computer programs; The processor is used for executing the computer programs, so that the electronic device can implement the data transmission method described in any one of claims 1 to 4, or implement the data analysis method described in any one of claims 5 to 8.