Bandwidth acquisition methods, devices, computing equipment, storage media and products

By setting markers between CDN nodes, clients, and origin nodes, and collecting traffic based on service type and streaming media protocol, the problem of existing bandwidth collection methods being unable to distinguish streaming media protocols is solved, achieving precise bandwidth control and reasonable traffic allocation.

CN119865641BActive Publication Date: 2026-01-06SHANGHAI BILIBILI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510032981.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2026-01-06
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

Existing bandwidth acquisition methods cannot distinguish between streaming media protocols, resulting in inaccurate bandwidth control during scheduling and unreasonable traffic allocation.

Method used

By establishing links between CDN nodes and clients as well as origin nodes, and setting tags according to service type and streaming media protocol, the traffic corresponding to each tag is collected, and the bandwidth of each service is calculated.

Benefits of technology

It enables fine-grained bandwidth acquisition for different service types and streaming media protocols, precise bandwidth control, reasonable traffic allocation, avoidance of bandwidth waste, cost reduction, and rapid location of abnormal traffic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865641B_ABST
    Figure CN119865641B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a bandwidth collection method and device, computing equipment, storage medium and product, wherein the method comprises the following steps: step 1, establishing a first link between a CDN node and a client according to a data acquisition request of video data of any service; step 2, judging whether the CDN node stores the video data; if yes, executing step 4; if no, executing step 3; step 3, establishing a second link between the CDN node and a source node, acquiring the video data from the source node, setting a mark of the second link according to scene related information of the second link, and then executing step 4; step 4, sending the video data to the client, and setting a mark of the first link according to scene related information of the first link; step 5, collecting the traffic corresponding to each mark, and calculating the bandwidth of each service according to the traffic. The application can accurately calculate the bandwidth of each service based on the mark, and realizes fine bandwidth collection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, specifically to a bandwidth acquisition method, apparatus, computing device, storage medium, and product. Background Technology

[0002] In scenarios involving video-on-demand (VOD) and live streaming, bandwidth resources are typically deployed using either a standalone or hybrid approach. A hybrid deployment prioritizes bandwidth resources for live streaming, with any remaining bandwidth used for VOD, reducing bandwidth waste. To minimize playback stuttering and improve the user experience, real-time bandwidth data from the data center or network interface card (NIC) needs to be collected, and whether the data center or NIC is overloaded must be considered in the scheduling decisions. CDN services utilize various streaming media protocols, each representing different scenarios. However, in hybrid deployments, current bandwidth collection methods cannot differentiate between streaming media protocols, leading to inaccurate bandwidth control during scheduling and resulting in inefficient traffic allocation. Summary of the Invention

[0003] In view of the above problems, this application proposes a bandwidth acquisition method, apparatus, computing device, storage medium and product to solve the following problems: the bandwidth acquisition methods in the prior art cannot distinguish streaming media protocols, resulting in the inability to accurately control bandwidth during scheduling.

[0004] According to one aspect of the embodiments of this application, a bandwidth acquisition method is provided, comprising:

[0005] Step 1: Based on the data acquisition request for video data for any service, establish the first connection between the CDN node and the client;

[0006] Step 2: Determine whether video data is stored in the CDN node; if yes, proceed to step 4; if no, proceed to step 3.

[0007] Step 3: Establish a second link between the CDN node and the origin node, obtain video data from the origin node, and set the tag of the second link according to the scene-related information of the second link, and then execute step 4; where the scene-related information includes the service type and streaming media protocol;

[0008] Step 4: Send video data to the client and set the tag for the first link based on the scene-related information of the first link;

[0009] Step 5: Collect the traffic corresponding to each marker, and calculate the bandwidth of each service based on the traffic corresponding to each marker.

[0010] Furthermore, scene-related information also includes: data transmission direction.

[0011] Furthermore, both the first and second links are socket links;

[0012] Setting the marker of the first link based on the scenario-related information of the first link further includes: determining the marker of the first link based on the scenario-related information of the first link, and setting the marker of the first link in the socket options of the first link;

[0013] Setting the marker for the second link based on the scenario-related information of the second link further includes: determining the marker for the second link based on the scenario-related information of the second link, and setting the marker for the second link in the socket options of the second link.

[0014] Furthermore, it also includes:

[0015] Store the first and second links in the link tracking module.

[0016] Furthermore, collecting the traffic corresponding to each marker and calculating the bandwidth of each service based on the traffic corresponding to each marker further includes:

[0017] The proxy service collects the traffic corresponding to each tag through a preset command-line tool;

[0018] Based on scenario-related information, the traffic corresponding to each tag is classified and statistically analyzed to obtain the bandwidth of each service under each category.

[0019] Furthermore, after calculating the bandwidth of each service based on the traffic corresponding to each tag, the method also includes:

[0020] The bandwidth of each service is provided to the scheduling service of that service for use.

[0021] According to another aspect of the embodiments of this application, a bandwidth acquisition device is provided, including: an establishment module, a judgment module, a source return module, a transmission module, and a calculation module;

[0022] The module is suitable for: establishing the first connection between the CDN node and the client based on a data acquisition request for video data for any service;

[0023] The judgment module is suitable for: determining whether video data is stored in the CDN node; if yes, triggering the sending module; if no, triggering the origin return module.

[0024] The origin-following module is suitable for: establishing a second link between the CDN node and the origin-following node, obtaining video data from the origin-following node, setting the marker of the second link according to the scene-related information of the second link, and then triggering the sending module; wherein, the scene-related information includes the service type and streaming media protocol;

[0025] The sending module is adapted to: send video data to the client and set the marker of the first link according to the scene-related information of the first link;

[0026] The calculation module is suitable for: collecting the traffic corresponding to each marker, and calculating the bandwidth of each service based on the traffic corresponding to each marker.

[0027] According to another aspect of the embodiments of this application, a computing device is provided, including: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;

[0028] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the bandwidth acquisition method described above.

[0029] According to another aspect of the embodiments of this application, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, which causes a processor to perform an operation corresponding to the bandwidth acquisition method described above.

[0030] According to another aspect of the embodiments of this application, a computer program product is provided, including at least one executable instruction that causes a processor to perform an operation corresponding to the bandwidth acquisition method described above.

[0031] According to the technical solution provided in the embodiments of this application, in the process of processing data acquisition requests, a link is established between the CDN node and the client. If no video data is stored in the CDN node, a link also needs to be established between the CDN node and the origin node. Based on scenario-related information such as service type and streaming media protocol, corresponding tags are set for the links, and the traffic corresponding to each tag is collected. Based on the traffic corresponding to each tag, the bandwidth of each service can be accurately calculated. This allows bandwidth collection to not only distinguish different service types but also different streaming media protocols, achieving refined bandwidth collection. Consequently, bandwidth can be precisely controlled during scheduling, and reasonable traffic allocation is achieved.

[0032] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of the embodiments of this application are described below. Attached Figure Description

[0033] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0034] Figure 1 A schematic flowchart of a bandwidth acquisition method according to an embodiment of this application is shown;

[0035] Figure 2a A flowchart illustrating a bandwidth acquisition method according to another embodiment of this application is shown;

[0036] Figure 2b A schematic diagram of the framework of a bandwidth acquisition method is shown;

[0037] Figure 3 A structural block diagram of a bandwidth acquisition device according to an embodiment of this application is shown;

[0038] Figure 4 A schematic diagram of the structure of a computing device according to an embodiment of this application is shown. Detailed Implementation

[0039] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0040] First, the terms and concepts involved in one or more embodiments of this application will be explained.

[0041] Independent deployment: This means that the bandwidth resources of the data center are used to serve only one type of service, such as video-on-demand or live streaming.

[0042] Hybrid deployment: This refers to using the bandwidth resources of the data center to serve multiple services, such as video-on-demand and live streaming services.

[0043] iptables is a command-line tool in Linux systems used to configure IPv4 packet filtering and NAT (Network Address Translation). It allows system administrators to define rules to control network traffic entering and leaving the system, thereby enabling firewall functions, routing, and other advanced network operations.

[0044] Conntrack (Connection Tracking) is an important module in the Linux kernel used to track and maintain the state of network connections, building a database of connection information based on the connection status. It is primarily used to implement stateful firewalls, NAT (Network Address Translation), and load balancing. Through Conntrack, the system can record and manage all active network connections, thus allowing for the application of more complex network management and security policies.

[0045] A socket is an abstraction of an endpoint for bidirectional communication between application processes on different hosts on a network. A socket represents one end of a communication link on the network, providing a mechanism for application-layer processes to exchange data using network protocols. A socket can be viewed as an endpoint of a communication link through which programs can send and receive data, thus enabling network communication.

[0046] HTTP-FLV (Flash Video) protocol: This is a streaming media protocol. Because it produces extremely small files and loads very quickly, it makes it possible to watch video files online. Its emergence effectively solved the problem that importing video files into Flash resulted in large SWF files that could not be used well on the Internet.

[0047] The HLSV3 protocol is a streaming media protocol that breaks down the entire stream into multiple small HTTP-based file fragments, which are then distributed through standard web servers.

[0048] HLSv7 protocol: A streaming media protocol based on HLS and FMP4; it divides the stream into small HTTP-based file segments, each containing short, playable content, and the client only needs to download a portion of the segment at a time. The advantages of this protocol are that it uses the standard HTTP protocol for data transmission and achieves adaptive bitrate control.

[0049] RTMP protocol: It is a protocol designed for transmitting audio, video and data over the Internet. It is mainly used for real-time streaming, especially in live streaming services, because it provides low-latency data transmission and can handle multimedia content well.

[0050] So_mark: A socket option that Linux sockets can set.

[0051] Figure 1 A schematic flowchart of a bandwidth acquisition method according to an embodiment of this application is shown, as follows: Figure 1 As shown, the method includes the following steps:

[0052] Step S101: Based on the data acquisition request for video data for any service, establish the first connection between the CDN node and the client.

[0053] The various services may include live streaming and video-on-demand services. When a user wants to watch video data from any of these services, they can send a data retrieval request for that video data through the client. In step S101, based on the data retrieval request, a first connection is established between the CDN node and the client to retrieve the requested video data from the CDN node. Here, the CDN node refers to the node currently used for the data retrieval request.

[0054] Step S102: Determine whether video data is stored in the CDN node; if yes, proceed to step S104; if no, proceed to step S103.

[0055] Determine whether the video data is stored in the CDN node; if the video data is stored, it means that there is no need to retrieve the data from the origin, so execute step S104 to return the video data to the client; if the video data is not stored, it means that there is a need to retrieve the data from the origin, so execute step S103 to retrieve the video data from the origin.

[0056] Step S103: Establish a second link between the CDN node and the origin node, obtain video data from the origin node, and set the tag of the second link according to the scene-related information of the second link; then execute step S104.

[0057] If, in step S102, it is determined that the CDN node does not store video data, the CDN node needs to request the video data from the origin node. Specifically, a second link is established between the CDN node and the origin node; through the second link, the video data is obtained from the origin node, and this video data will be included in the statistics of the second link.

[0058] To achieve refined bandwidth acquisition that differentiates between service types and streaming media protocols, in this embodiment, a mark is set for the second link based on scenario-related information. Scenario-related information includes service type and streaming media protocol. Additionally, scenario-related information may also include data transmission direction. Specifically, service types include live streaming and video-on-demand (VOD) services; streaming media protocols include various protocols present in live streaming and VOD services; and data transmission direction refers to the direction of video data transmission relative to the CDN node.

[0059] Step S104: Send video data to the client and set the marker for the first link according to the scene-related information of the first link.

[0060] If it is determined in step S102 that video data is stored in the CDN node and in step S103 that video data is obtained from the origin node, the video data can be sent to the client through the first link established in step S101. The video data will also be counted in the first link. In order to achieve fine-grained bandwidth collection, it is also necessary to set the tag of the first link according to the scenario-related information of the first link.

[0061] Step S105: Collect the traffic corresponding to each marker, and calculate the bandwidth of each service based on the traffic corresponding to each marker.

[0062] In practical applications, traffic corresponding to each tag can be collected using pre-defined command-line tools such as iptables. Since the tags are set according to scenario-related information such as service type and streaming media protocol, the tags can effectively identify which service and streaming media protocol the traffic belongs to. Thus, the bandwidth of each service can be accurately calculated based on the traffic corresponding to each tag, achieving refined bandwidth collection. This enables precise bandwidth control during scheduling and achieves reasonable traffic allocation.

[0063] According to the bandwidth acquisition method provided in this application embodiment, during the processing of data acquisition requests, a link is established between the CDN node and the client. If no video data is stored in the CDN node, a link also needs to be established between the CDN node and the origin node. Based on scenario-related information such as service type and streaming media protocol, corresponding tags are set for the links, and the traffic corresponding to each tag is collected. Based on the traffic corresponding to each tag, the bandwidth of each service can be accurately calculated. This allows bandwidth acquisition to distinguish not only different service types but also different streaming media protocols, achieving refined bandwidth acquisition. Consequently, bandwidth can be precisely controlled during scheduling, and reasonable traffic allocation is achieved.

[0064] Figure 2a A flowchart illustrating a bandwidth acquisition method according to another embodiment of this application is shown, as follows: Figure 2a As shown, the method includes the following steps:

[0065] Step S201: Based on the data acquisition request for video data for any service, establish a first link between the CDN node and the client, and store the first link in the link tracking module.

[0066] These services may include live streaming and video-on-demand (VOD) services. When a user wants to watch video data from any of these services, they can send a data retrieval request for that video data through the client. Based on this request, an initial connection is established between the CDN node and the client, and this initial connection is stored in the connection tracking module. The connection tracking module tracks and manages each connection. Specifically, the connection tracking module may be a Conntrack module, and the initial connection may be a socket connection.

[0067] Step S202: Determine whether video data is stored in the CDN node; if yes, proceed to step S204; if no, proceed to step S203.

[0068] The data retrieval request includes information such as user identifier, video identifier of video data, and request time. The CDN node is queried to see if it stores the video data corresponding to the video identifier. If the video data is stored, it means no origin server access is required, and step S204 is executed; if the video data is not stored, it means an origin server access is required, and step S203 is executed.

[0069] Step S203: Establish a second link between the CDN node and the origin node, store the second link in the link tracking module, obtain video data from the origin node, and set the tag of the second link according to the scene-related information of the second link; then execute step S204.

[0070] If, in step S202, it is determined that no video data is stored in the CDN node, the CDN node needs to request the video data from the upstream origin node, so a connection is established upstream. Specifically, a second connection is established between the CDN node and the origin node, which can be a socket connection. After the second connection is successfully established, it is stored in the connection tracking module for management. Through the second connection, the video data returned by the origin node is obtained. This video data is included in the statistics of the second connection, and the second connection is marked according to the scene-related information of the second connection.

[0071] The scenario-related information includes service type, streaming media protocol, and data transmission direction. Specifically, service type includes live streaming and video-on-demand; streaming media protocol includes HTTP-FLV, HLSV3, HLSV7, RTMP, etc.; data transmission direction can include data input direction (referred to as "in") and data output direction (referred to as "out"). In this embodiment, the data input direction reflects the input of video data from the origin node to the CDN node, and the data output direction reflects the output of video data from the CDN node to the client.

[0072] Step S204: Send video data to the client and set the marker for the first link according to the scene-related information of the first link.

[0073] If, in step S202, it is determined that video data is stored in the CDN node, and in step S203, video data is obtained from the origin node, the video data can be sent to the client through the first link established in step S201. This video data will also be included in the statistics of the first link, and a tag for the first link will be set according to the scenario-related information of the first link. The method for setting the tag for the first link is the same as the method for setting the tag for the second link.

[0074] In the embodiments of this application, there is a correspondence between the relevant information of each scenario and the marker, and different combinations of relevant information of different scenarios correspond to different markers. Table 1 shows the correspondence between the relevant information of each scenario and the marker. As shown in Table 1, when the service type is live streaming, the data transmission direction is out, and the streaming media protocol is RTMP, the marker is set to 0x0001; when the service type is live streaming, the data transmission direction is in, and the streaming media protocol is RTMP, the marker is set to 0x0002; and so on, setting corresponding markers for various combinations of service type, data transmission direction, and streaming media protocol; in addition, considering that there may be cases where the service type is unknown and the data transmission direction is out, the marker is set to 0x0000.

[0075] Table 1 shows the correspondence between relevant information and tags for each scenario.

[0076] Business type Data transmission direction Streaming protocols mark Live streaming business out RTMP protocol 0x0001 Live streaming business in RTMP protocol 0x0002 Live streaming business out http-FLV protocol 0x0003 Live streaming business in http-FLV protocol 0x0004 Live streaming business out HLSv3 protocol 0x0005 Live streaming business in HLSv3 protocol 0x0006 Live streaming business out HLSv7 protocol 0x0007 Live streaming business in HLSv7 protocol 0x0008 On-demand service out HTTP protocol 0x1001 On-demand service in HTTP protocol 0x1002 On-demand service out QUIC protocol 0x1003 On-demand service in QUIC protocol 0x1004 unknown out 0x0000

[0077] Considering that a socket supports setting a socket option, specifically So_mark, this embodiment utilizes this socket option to set the mark. Specifically, based on the scenario-related information of the first link, the mark of the first link is determined and set in the socket option of the first link; based on the scenario-related information of the second link, the mark of the second link is determined and set in the socket option of the second link.

[0078] In step S205, the proxy service collects the traffic corresponding to each tag through a preset command-line tool, classifies and statistically analyzes the traffic corresponding to each tag based on scenario-related information, and obtains the bandwidth of each service under each category.

[0079] The CDN node may include a proxy service and pre-defined command-line tools such as iptables. iptables can be used to count incoming and outgoing traffic. Therefore, in step S205, the proxy service can collect the traffic corresponding to each tag through iptables. After collecting the traffic corresponding to each tag, since there is a correspondence between the relevant information of each scenario and the tag, for each service type, classification can be set according to different streaming media protocols under different data transmission directions. According to the classification, the traffic corresponding to each tag is classified and counted, thereby obtaining the bandwidth of each service under each category. This allows bandwidth collection to not only distinguish different service types, but also to distinguish different streaming media protocols and the bandwidth of these protocols in different data transmission directions for each service type, achieving more refined bandwidth collection.

[0080] Step S206: Provide the bandwidth of each service to the scheduling service of each service for use.

[0081] Specifically, CDN nodes can report the bandwidth of each service under each category, based on statistical data, to the central node. The central node then provides the reported bandwidth of each service under each category to the corresponding scheduling service. For example, the bandwidth of different streaming media protocols for live streaming services under different data transmission directions can be provided to the live streaming scheduling service, and the bandwidth of different streaming media protocols for video-on-demand services under different data transmission directions can be provided to the video-on-demand scheduling service.

[0082] Figure 2b A schematic diagram of the framework of a bandwidth acquisition method is shown, such as... Figure 2b As shown, a CDN node includes proxy services, video-on-demand services, live streaming services, a Conntrack module, iptables, and a network interface card (NIC). The following example, using a user's desired live video stream, illustrates this bandwidth collection method:

[0083] 1. The user requests the live streaming service from the CDN node, establishing the first connection between the CDN node and the client, and storing the first connection in the Conntrack module;

[0084] 2. When the live streaming service needs to request video data from the upstream origin node, a second link is established between the CDN node and the origin node. The second link is stored in the Conntrack module, video data is obtained from the origin node, and the tag of the second link is set according to the scene-related information of the second link, for example, the tag of the second link is 0x0002.

[0085] 3. Send video data to the user's client and set the first link's tag according to the scene-related information of the first link. The tag of the first link is different from the tag of the second link to distinguish the traffic of the data transmission direction. For example, the tag of the first link is 0x0001.

[0086] 4. The proxy service collects traffic corresponding to each tag through iptables;

[0087] 5. The proxy service classifies and statistically analyzes the traffic corresponding to each tag based on scenario-related information, obtains the bandwidth of each service under each category, and reports the bandwidth of each service under each category to the central node.

[0088] 6. The central node will provide the corresponding bandwidth of the reported live streaming services under each category to the live streaming scheduling service for processing, and will provide the corresponding bandwidth of the reported video-on-demand services under each category to the video-on-demand scheduling service for processing.

[0089] According to the bandwidth acquisition method provided in this application embodiment, during the processing of data acquisition requests, a link is established between the CDN node and the client. If no video data is stored in the CDN node, a link also needs to be established between the CDN node and the origin node. Based on the service type, streaming media protocol, and data transmission direction corresponding to the established link, the link marker is determined and the marker is conveniently set using socket options. This facilitates differentiation and statistics through the marker, enabling bandwidth acquisition to not only distinguish different service types but also to differentiate different streaming media protocols and the bandwidth of these protocols in different data transmission directions for each service type, achieving more refined bandwidth acquisition. Through refined bandwidth acquisition, scheduling has the ability to perform mixed scheduling on a single CDN node. During scheduling, bandwidth can be precisely controlled, achieving reasonable traffic allocation. While ensuring service quality, bandwidth waste can be effectively avoided, bandwidth costs can be reduced, and the service to which the traffic belongs can be quickly and accurately located, facilitating the investigation of the cause of abnormal traffic.

[0090] Figure 3 A structural block diagram of a bandwidth acquisition device according to an embodiment of this application is shown, as follows: Figure 3 As shown, the device includes: an establishment module 310, a judgment module 320, a source return module 330, a sending module 340, and a calculation module 350.

[0091] The module 310 is adapted to: establish the first link between the CDN node and the client based on the data acquisition request for video data for any service.

[0092] The judgment module 320 is suitable for: determining whether video data is stored in the CDN node; if yes, it triggers the sending module 340; if no, it triggers the return-to-origin module 330.

[0093] The origin-following module 330 is adapted to: establish a second link between the CDN node and the origin-following node, obtain video data from the origin-following node, set the marker of the second link according to the scene-related information of the second link, and then trigger the sending module 340; wherein, the scene-related information includes the service type and streaming media protocol.

[0094] The sending module 340 is adapted to: send video data to the client and set the marker of the first link according to the scene-related information of the first link.

[0095] The calculation module 350 is suitable for: collecting the traffic corresponding to each marker, and calculating the bandwidth of each service based on the traffic corresponding to each marker.

[0096] Optionally, scenario-related information may also include: data transmission direction.

[0097] Optionally, the first link and the second link are socket links; the sending module 340 is further adapted to: determine the marker of the first link according to the scenario-related information of the first link, and set the marker of the first link in the socket options of the first link; the origin return module 330 is further adapted to: determine the marker of the second link according to the scenario-related information of the second link, and set the marker of the second link in the socket options of the second link.

[0098] Optionally, the device is also adapted to store the first link and the second link in the link tracking module.

[0099] Optionally, the computing module 350 is further adapted to: collect the traffic corresponding to each tag by the proxy service through a preset command line tool; classify and statistically analyze the traffic corresponding to each tag according to the scenario-related information to obtain the bandwidth of each service under each category.

[0100] Optionally, the computing module 350 is further adapted to provide the bandwidth of each service to the scheduling service of each service for use.

[0101] The descriptions of the above modules refer to the corresponding descriptions in the method embodiments, and will not be repeated here.

[0102] According to the bandwidth acquisition device provided in this application embodiment, during the processing of data acquisition requests, a link is established between the CDN node and the client. If no video data is stored in the CDN node, a link also needs to be established between the CDN node and the origin node. Based on the service type, streaming media protocol, and data transmission direction corresponding to the established link, the link marker is determined and the marker is conveniently set using socket options. This facilitates differentiation and statistics through the marker, enabling bandwidth acquisition to not only distinguish different service types but also to differentiate different streaming media protocols and the bandwidth of these protocols in different data transmission directions for each service type, achieving more refined bandwidth acquisition. Through refined bandwidth acquisition, scheduling has the ability to perform mixed scheduling on a single CDN node. During scheduling, bandwidth can be precisely controlled, achieving reasonable traffic allocation. While ensuring service quality, bandwidth waste can be effectively avoided, bandwidth costs can be reduced, and the service to which the traffic belongs can be quickly and accurately located, facilitating the investigation of the cause of abnormal traffic.

[0103] This application provides a non-volatile computer storage medium storing at least one executable instruction or computer program that enables a processor to perform the operation corresponding to the bandwidth acquisition method in any of the above method embodiments.

[0104] This application provides a computer program product, which includes at least one executable instruction or computer program that enables a processor to perform the operation corresponding to the bandwidth acquisition method in any of the above method embodiments.

[0105] Figure 4 The diagram shows a structural schematic of a computing device according to one embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the computing device.

[0106] like Figure 4 As shown, the computing device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.

[0107] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements such as clients or other servers. The processor 402 executes program 410, specifically performing the relevant steps in the above-described embodiment of the bandwidth acquisition method for computing devices.

[0108] Specifically, program 410 may include program code that includes computer operation instructions.

[0109] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The computing device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0110] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0111] Specifically, program 410 can be used to cause processor 402 to execute the bandwidth acquisition method in any of the above method embodiments. The specific implementation of each step in program 410 can be found in the corresponding descriptions of the steps and units in the above bandwidth acquisition embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.

[0112] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of this application are not directed to any particular programming language. It should be understood that the contents of the embodiments of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best implementation of the embodiments of this application.

[0113] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0114] Similarly, it should be understood that, in order to simplify this disclosure and aid in understanding one or more of the various inventive aspects, in the foregoing description of exemplary embodiments of the present application, various features of the present application embodiments are sometimes grouped together into a single embodiment, figure, or description thereof. However, this approach to disclosure should not be construed as reflecting an intention that the claimed embodiments of the present application require more features than expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the present application.

[0115] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0116] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are meant to be within the scope of the embodiments of this application and form different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.

[0117] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of this application. The embodiments of this application can also be implemented as device or apparatus programs (e.g., computer programs and computer program products) for performing part or all of the methods described herein. Such programs implementing the embodiments of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0118] It should be noted that the above embodiments are illustrative of the embodiments of this application and not limiting of the embodiments of this application, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of this application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

Claims

1. A bandwidth collection method, comprising: Step 1, establishing a first link between a CDN node and a client according to a data acquisition request for video data of any service; Step 2, judging whether the video data is stored in the CDN node; if yes, executing Step 4; if no, executing Step 3; Step 3, establishing a second link between the CDN node and a source node, acquiring the video data from the source node, setting a mark of the second link according to scene-related information of the second link, and then executing Step 4; wherein the scene-related information comprises a service type and a streaming media protocol; Step 4, sending the video data to the client and setting a mark of the first link according to scene-related information of the first link; Step 5, collecting traffics corresponding to each mark and calculating bandwidths of each service according to the traffics corresponding to each mark.

2. The method of claim 1, the scene-related information further comprising: Data transmission direction. 3.The method of claim 1, wherein the first link and the second link are socket links; the mark of the first link is determined according to the scene-related information of the first link and is set in socket options of the first link; and the mark of the second link is set in socket options of the second link according to the scene-related information of the second link. The setting the mark of the first link according to the scene-related information of the first link further includes: 4.The method of claim 1, further comprising: storing the first link and the second link into a link tracking module. 5.The method of any one of claims 1-4, wherein the collecting traffics corresponding to each mark and calculating bandwidths of each service according to the traffics corresponding to each mark further comprises: collecting the traffics corresponding to each mark by a proxy service through a preset command line tool; and classifying and counting the traffics corresponding to each mark according to the scene-related information to obtain bandwidths of each service under each classification. 6.The method of any one of claims 1-4, further comprising: providing the bandwidths of each service to a scheduling service of each service for use after the calculating bandwidths of each service according to the traffics corresponding to each mark. establishing, judging, sourcing, sending and calculating modules; the establishing module is adapted to establish a first link between a CDN node and a client according to a data acquisition request for video data of any service; the judging module is adapted to judge whether the video data is stored in the CDN node; if yes, triggering the sending module; if no, triggering the sourcing module; 7. A bandwidth harvesting device comprising: the sourcing module is adapted to establish a second link between the CDN node and a source node, acquire the video data from the source node, set a mark of the second link according to scene-related information of the second link, and then trigger the sending module; wherein the scene-related information comprises a service type and a streaming media protocol. ​ ​ ​ The sending module is adapted to: sending the video data to the client, and setting a mark of the first link according to the scene-related information of the first link; The computing module is adapted to: collecting the traffic corresponding to each mark, and computing the bandwidth of each service according to the traffic corresponding to each mark.

8. A computing device comprising: The processor, the memory, the communication interface and the communication bus, the processor, the memory and the communication interface complete the communication among each other through the communication bus; The memory is used for storing at least one executable instruction, and the executable instruction makes the processor execute the corresponding operation of the bandwidth collection method in any one of claims 1-6.

9. A computer storage medium, the storage medium stores at least one executable instruction, and the executable instruction makes the processor execute the corresponding operation of the bandwidth collection method in any one of claims 1-6.

10. A computer program product, comprising at least one executable instruction, and the executable instruction makes the processor execute the corresponding operation of the bandwidth collection method in any one of claims 1-6.

Citation Information

Patent Citations

  • Method for obtaining service data and converged CDN system

    CN110392094A

  • Multi-source station channel automatic back-to-source method and device

    CN114501056A