A data transmission method, apparatus, device, and storage medium

CN122554444APending Publication Date: 2026-08-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

在实际应用中发现,由于部分数据可能没有缓存在节点本地,需要通过回源服务获取,且不同请求对应的数据的情况差异较大,目前的传输策略容易出现数据间断的问题,难以适应不同的业务需求

Benefits of technology

[0058]The embodiments of this application include at least the following beneficial effects: This application provides a data transmission method, apparatus, device, and storage medium. This application receives a request message sent by a client, queries the target data in the server's local cache based on the request message, and determines a cache state parameter indicating whether the target data is cached locally on the server. Furthermore, it determines the data volume of the target data based on the request message, and determines the corresponding business requirement parameters based on the data volume. Combining the cache state parameter and the business requirement parameter, it determines the target transmission parameters corresponding to the target data. The target transmission parameters are used to set the transmission window and transmission rate used when transmitting the target data to the client. Transmitting the target data to the client according to the target transmission parameters can adapt to different data acquisition needs and reduce the probability of data interruption. The technical solution of this application can effectively improve the data transmission performance of the server in a content delivery network, improve the stability and efficiency of data transmission, and help optimize the client's business experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554444A_ABST
    Figure CN122554444A_ABST
Patent Text Reader

Abstract

This application discloses a data transmission method, apparatus, device, and storage medium. It receives a request message from a client, queries the server's local cache for target data based on the request message, and determines cache status parameters indicating whether the target data is cached locally on the server. Furthermore, it determines the data volume of the target data based on the request message and determines the corresponding business requirement parameters based on the data volume. Combining the cache status parameters and business requirement parameters, it determines the target transmission parameters corresponding to the target data. These target transmission parameters are used to set the transmission window and transmission rate used when transmitting the target data to the client. Transmitting the target data to the client according to these target transmission parameters can adapt to different data acquisition needs and reduce the probability of data interruptions. This application can effectively improve the data transmission performance of the server in a content delivery network. The technical solution of this application can be widely applied in the field of data transmission technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission technology, and in particular to a data transmission method, apparatus, device, and storage medium. Background Technology

[0002] Currently, with the rapid development of information technology, related applications have gradually integrated into people's lives, providing a variety of services. Among them, a Content Delivery Network (CDN) is a distributed network architecture designed to provide efficient content transmission and delivery services. A CDN typically includes multiple nodes, which can cache data resources on nodes closer to the requesting object (such as the client), thereby achieving fast data transmission and a low-latency access experience.

[0003] In related technologies, content delivery networks (CDNs) typically transmit requested data to clients based on fixed transmission parameters. However, in practical applications, it has been found that because some data may not be cached locally on the nodes and needs to be retrieved from the origin server, and the data for different requests varies significantly, current transmission strategies are prone to data interruptions and are ill-suited to diverse business needs. Summary of the Invention

[0004] This application provides a data transmission method, apparatus, device, and storage medium, which can effectively improve the data transmission performance of the server in a content delivery network, enhance the stability and efficiency of data transmission, and help optimize the client's business experience.

[0005] One aspect of this application provides a data transmission method applied to a server, the method comprising:

[0006] Receive a request message sent by the client, the request message being used to obtain specified target data;

[0007] Based on the request message, the target data is queried in the local cache of the server to determine the cache status parameter corresponding to the target data; wherein, the cache status parameter is used to indicate whether the target data is cached locally on the server or the target data is not cached locally on the server.

[0008] Based on the request message, determine the data volume of the target data, and based on the data volume, determine the business requirement parameters corresponding to the target data;

[0009] Based on the cache status parameters and the service requirement parameters, the target transmission parameters corresponding to the target data are determined; wherein, the target transmission parameters include transmission window parameters and transmission rate parameters;

[0010] The target data is transmitted to the client according to the target transmission parameters.

[0011] On the other hand, embodiments of this application provide a data transmission apparatus applied to a server, the apparatus comprising:

[0012] A receiving unit is used to receive a request message sent by a client, the request message being used to obtain specified target data;

[0013] A query unit is configured to query the target data in the local cache of the server based on the request message, and determine the cache status parameter corresponding to the target data; wherein, the cache status parameter is used to indicate whether the target data is cached locally on the server or whether the target data is not cached locally on the server.

[0014] The processing unit is configured to determine the data volume of the target data based on the request message, and determine the business requirement parameters corresponding to the target data based on the data volume;

[0015] The integration unit is used to determine the target transmission parameters corresponding to the target data based on the cache status parameters and the service requirement parameters; wherein, the target transmission parameters include transmission window parameters and transmission rate parameters;

[0016] An execution unit is configured to transmit the target data to the client according to the target transmission parameters.

[0017] Optionally, in some embodiments, the query unit is specifically used for:

[0018] The request message is parsed to extract the data resource identifier from the request message;

[0019] Based on the data resource identifier, the target data is queried in the local cache on the server to determine the cache status parameters corresponding to the target data.

[0020] Optionally, in some embodiments, the data resource identifier includes a target data identifier and a target data range corresponding to the target data; the query unit is specifically used for:

[0021] Obtain the cache information table recorded by the server; wherein, the cache information table includes the cache data identifier and cache data range corresponding to each cached data locally on the server;

[0022] Detect a first data identifier in the cached data identifier; wherein the first data identifier is a cached data identifier that matches the target data identifier;

[0023] If the first data identifier is not present in the cached data identifier, the cache status parameter corresponding to the target data is determined as the first parameter value; wherein, the first parameter value is used to indicate that the target data is not cached locally on the server.

[0024] Optionally, in some embodiments, the query unit is further used for:

[0025] If the first data identifier exists in the cached data identifier, compare the first data range with the target data range; wherein, the first data range is the cached data range corresponding to the first data identifier;

[0026] If none of the first data ranges contain the target data range, the cache state parameter corresponding to the target data is determined as the first parameter value;

[0027] If any of the first data ranges contains the target data range, the cache status parameter corresponding to the target data is determined as the second parameter value; wherein, the second parameter value is used to indicate that the target data is cached locally on the server side.

[0028] Optionally, in some embodiments, the processing unit is specifically used for:

[0029] Based on the target data range, determine the start byte sequence number and end byte sequence number of the target data;

[0030] Calculate the difference between the end byte sequence number and the start byte sequence number, and determine the data volume of the target data based on the difference.

[0031] Optionally, in some embodiments, the business requirement parameter is used to characterize the type of business requirement corresponding to the target data, and the type of business requirement includes small file transfer and large file transfer; the processing unit is specifically used for:

[0032] Compare the data volume with a preset data volume threshold;

[0033] If the data volume is less than or equal to the data volume threshold, the business requirement parameter is determined as the third parameter value; wherein, the third parameter value is used to characterize the type of business requirement corresponding to the target data as small file transfer;

[0034] If the data volume is greater than the data volume threshold, the business requirement parameter is determined as the fourth parameter value; wherein, the fourth parameter value is used to characterize the type of business requirement corresponding to the target data as large file transfer.

[0035] Optionally, in some embodiments, the execution unit is specifically used for:

[0036] If the cache status parameter is the first parameter value, the target data is obtained by returning to the origin service;

[0037] According to the target transmission parameters, the target data is transmitted to the client, and the target data is cached locally on the server.

[0038] Optionally, in some embodiments, the integration unit is specifically used for:

[0039] If the business requirement parameter is the fourth parameter value, the preset transmission window parameter and transmission rate parameter are obtained according to the cache status parameter and used as the target transmission parameter corresponding to the target data;

[0040] If the business requirement parameter is a third parameter value, obtain the preset window gain value and rate gain value according to the cache status parameter, and determine the target transmission parameter corresponding to the target data according to the window gain value and the rate gain value;

[0041] The fourth parameter value is used to characterize the type of business requirement corresponding to the target data as large file transfer, and the third parameter value is used to characterize the type of business requirement corresponding to the target data as small file transfer.

[0042] Optionally, in some embodiments, the integration unit is specifically used for:

[0043] If the cache status parameter is the first parameter value, obtain the preset first transmission window parameter and first transmission rate parameter as the target transmission parameter corresponding to the target data;

[0044] If the cache status parameter is the second parameter value, obtain the preset second transmission window parameter and second transmission rate parameter as the target transmission parameter corresponding to the target data;

[0045] Wherein, the first parameter value is used to indicate that the target data is not cached locally on the server side, and the second parameter value is used to indicate that the target data is cached locally on the server side; the first transmission window parameter is smaller than the second transmission window parameter and the first transmission rate parameter is smaller than the second transmission rate parameter.

[0046] Optionally, in some embodiments, the integration unit is specifically used for:

[0047] Detect the minimum latency and maximum available bandwidth of the communication network between the client and the client;

[0048] The third transmission window parameters corresponding to the target data are determined based on the product of the window gain value, the minimum delay, and the maximum available bandwidth.

[0049] The third transmission rate parameter corresponding to the target data is determined based on the product of the rate gain value and the maximum available bandwidth.

[0050] Optionally, in some embodiments, the apparatus further includes an updating unit, which is specifically used for:

[0051] If the cache status parameter is the first parameter value, the target data is obtained through the origin service, and the origin transmission rate parameter when obtaining the target data is determined;

[0052] The smaller of the two values ​​is determined as the new maximum available bandwidth, by comparing the back-to-source transmission rate parameter and the maximum available bandwidth.

[0053] On the other hand, embodiments of this application provide an electronic device, including a processor and a memory;

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

[0055] The processor executes the computer program to implement the aforementioned data transmission method.

[0056] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program, which is executed by a processor to implement the aforementioned data transmission method.

[0057] On the other hand, embodiments of this application also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned data transmission method.

[0058] The embodiments of this application include at least the following beneficial effects: This application provides a data transmission method, apparatus, device, and storage medium. This application receives a request message sent by a client, queries the target data in the server's local cache based on the request message, and determines a cache state parameter indicating whether the target data is cached locally on the server. Furthermore, it determines the data volume of the target data based on the request message, and determines the corresponding business requirement parameters based on the data volume. Combining the cache state parameter and the business requirement parameter, it determines the target transmission parameters corresponding to the target data. The target transmission parameters are used to set the transmission window and transmission rate used when transmitting the target data to the client. Transmitting the target data to the client according to the target transmission parameters can adapt to different data acquisition needs and reduce the probability of data interruption. The technical solution of this application can effectively improve the data transmission performance of the server in a content delivery network, improve the stability and efficiency of data transmission, and help optimize the client's business experience. Attached Figure Description

[0059] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0060] Figure 1 This is a schematic diagram illustrating the working principle of a content delivery network provided in the embodiments of this application;

[0061] Figure 2 This is a schematic diagram illustrating the application of a content delivery network provided in the embodiments of this application;

[0062] Figure 3 This is a schematic diagram illustrating how a server sends data back to a client, as provided in an embodiment of this application.

[0063] Figure 4 This is a system architecture diagram of a data transmission method provided in the embodiments of this application;

[0064] Figure 5 This is a schematic diagram illustrating a method of providing streaming media services via a content delivery network, as provided in an embodiment of this application.

[0065] Figure 6 This is a flowchart illustrating a data transmission method provided in an embodiment of this application;

[0066] Figure 7 This is a flowchart illustrating a process for determining the amount of target data provided in an embodiment of this application.

[0067] Figure 8 This is a schematic diagram of a process for determining target transmission parameters provided in an embodiment of this application;

[0068] Figure 9 This is a schematic diagram of the system used in a data transmission method provided in the embodiments of this application;

[0069] Figure 10 This is a schematic diagram illustrating the implementation process of a data transmission method provided in an embodiment of this application;

[0070] Figure 11 This is a structural block diagram of a data transmission device provided in an embodiment of this application;

[0071] Figure 12 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0073] It is understood that the terms “first,” “second,” etc., used in this application may be used to describe various concepts herein, but unless otherwise stated, these concepts are not limited by these terms. These terms are used only to distinguish one concept from another.

[0074] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0075] Before providing a further detailed description of the embodiments of this application, the nouns and terms used in the embodiments of this application are explained, and the nouns and terms used in the embodiments of this application shall be interpreted as follows:

[0076] 1) A Content Delivery Network (CDN) is a distributed network architecture designed to provide efficient content delivery services. By deploying server nodes globally, a CDN caches content on nodes closer to the requesting user, achieving fast content delivery and a low-latency access experience. The working principle of a CDN is that when a user requests access to a website or application, the corresponding resources are replicated from the origin server to nodes closer to the user, based on the user's geographical location and network conditions. Thus, when a user initiates a request, the CDN delivers the content from the nearest node, reducing transmission distance and network congestion, thereby improving access speed and performance. The advantages of a CDN include accelerated content delivery, reduced bandwidth costs, improved reliability and stability, and support for global distribution. By optimizing content delivery, a CDN provides efficient, reliable, and stable network services, enhancing the user experience and website performance.

[0077] 2) HTTP (Hypertext Transfer Protocol) is a stateless application layer protocol used to transmit hypertext (such as HTML pages) over the Internet. It specifies how clients request resources from servers and how servers respond to these requests.

[0078] 3) HTTPS (HyperText Transfer Protocol Secure) is a secure version of the HTTP protocol enhanced with SSL / TLS (Secure Sockets Layer / Transport Layer Security) encryption technology. It ensures the confidentiality and integrity of data transmission.

[0079] 4) A URL (Uniform Resource Locator) is a string used to identify the location of a resource on the Internet. It provides a standardized way to access specific resources, such as web pages, images, files, or other types of data.

[0080] 5) HTML (HyperText Markup Language), one of the core languages ​​of web pages, defines the content and layout of web pages and is used to build the structure of web pages and applications.

[0081] 6) XML (eXtensible Markup Language) is a markup language used to define the structure and content of documents. XML documents consist of data enclosed in tags, support nested structures, and are well-suited for describing complex hierarchical data.

[0082] 7) JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write, and also easy for machines to parse and generate.

[0083] Currently, with the rapid development of information technology, related applications have gradually integrated into people's lives, providing a variety of services. Among them, a Content Delivery Network (CDN) is a distributed network architecture designed to provide efficient content transmission and delivery services. A CDN typically includes multiple nodes, which can cache data resources on nodes closer to the requesting object (such as the client), thereby achieving fast data transmission and a low-latency access experience.

[0084] For example, please refer to Figure 1 , Figure 1 A schematic diagram illustrating the working principle of a content delivery network provided in an embodiment of this application is shown. Figure 1 As shown, when requesting object 110 wants to obtain a specified network resource, it can initiate a data retrieval request via a domain name. The data retrieval request will be transmitted to the local DNS (LDNS) 120 for domain name resolution. The local DNS 120 checks its cache for an IP address record corresponding to the data retrieval request. If found, it will be directly returned to the terminal device used by requesting object 110. If not, the local DNS 120 will further query the website's authoritative DNS 130. The website's authoritative DNS 130 can perform further domain name resolution on the data retrieval request to obtain the IP address corresponding to the network resource; alternatively, the local DNS 120 can request the DNS scheduling system 140 to allocate a relevant IP address for the data retrieval request, so that the local DNS 120 can return the IP address corresponding to the data retrieval request to requesting object 110 after obtaining it.

[0085] Request object 110 can use the obtained IP address to initiate an access request for specified data. The access request will be transmitted to a node in CDN150, typically the node closest to request object 110, for example... Figure 1The process involves the target node 151. If the corresponding data is already cached in target node 151, it will return the data to the requesting object, completing the entire data retrieval request and response. If the corresponding data is not cached in target node 151, target node 151 will send a request for the data to origin server 160 (also known as the origin server). After obtaining the corresponding data, CDN target node 151 will cache the data in its node according to the configured caching policy and return it to requesting object 110, completing the entire data retrieval request and response.

[0086] In content delivery networks (CDNs), the types of data that can be obtained are very broad, covering static content, dynamic content, metadata, performance metrics, etc., and this application does not impose any limitations on this. For example, taking static content as an example, the data obtained can be webpage data, image data, video and audio file data, text data, etc.

[0087] Understandably, content delivery networks (CDNs) transmit content from nearby nodes to the requesting entity, reducing transmission distance and network congestion, thereby improving access speed and performance. Figure 1 As shown in the process, when a requesting object accesses relevant network resources via an IP address, if the content delivery network (CDN) node does not have cached data, it will request the corresponding data from the origin server. This process is called CDN origin pull. CDN nodes can satisfy the resource acquisition needs of the requesting object through origin pull services, while simultaneously supplementing and improving cached data resources. Thus, when the requesting object accesses the resource again, the CDN node will have the corresponding data cached, enabling faster data feedback.

[0088] Reference Figure 2 , Figure 2 This illustration shows an application diagram of a content delivery network provided in an embodiment of this application. Generally, each node in the content delivery network can act as a server, providing data acquisition services to requesting objects; on the requesting object side, a client corresponding to the content delivery network can be installed on a relevant terminal device, and the client and server can communicate and connect via the Internet. Figure 1 Similarly, a client can send a data retrieval request to the server via a request message. Upon receiving the request message, the server will determine if the requested data is cached locally. If it is, the server will respond with the data according to the cached data and send the corresponding data to the client. If the server determines that the requested data is not cached locally, it will send a request message for the data to the origin server (or an intermediate origin server). Upon receiving the request message, the origin server (or intermediate origin server) can execute the data sending operation and send the corresponding data to the server.

[0089] Specifically, for an intermediate source server, if it does not cache the relevant data, it can further request data from the upper-level origin server, cache it, and then send the corresponding data to the server. In a content delivery network, the number of servers can be one or more, and the number of origin servers (or intermediate source servers) corresponding to each server can also be one or more; this application does not impose any restrictions on this.

[0090] How to quickly respond to client request messages and accurately and efficiently return the corresponding data to the client is a key research focus of content delivery network (CDN) applications. Current related technologies mainly focus on two aspects: one is to improve the server-side cache hit rate, minimizing the need for origin server access for client-requested data resources. This method requires caching a large amount of data resources on the server, resulting in high storage hardware costs. The other method is to improve the server's efficiency in responding to clients in cache miss scenarios, primarily by optimizing the transmission protocol and congestion control algorithm used by the server when sending data to the client. This method is more difficult to implement and has limited application scope.

[0091] Currently, content delivery networks (CDNs) typically transmit requested data to clients based on fixed transmission parameters. However, in practice, it has been found that the data requested by the client may not be cached locally on the node and needs to be retrieved from the origin server. (See reference...) Figure 3 , Figure 3 This illustration shows a schematic diagram of a server feeding back data to a client, as provided in an embodiment of this application. For example... Figure 3 As shown, when the data requested by the client is cached locally on the server, the server can send this data directly. In this case, the data can be obtained and transmitted to the client in a continuous stream mode. However, when the data requested by the client is not cached locally on the server, the server needs to obtain the data from the origin server (or an intermediate origin server). Since the server obtains data at the message level, compared to the case where the data is cached locally on the server, if fixed transmission parameters are used for data transmission, data interruptions are likely to occur.

[0092] Furthermore, it should be noted that the data requested by different clients can vary significantly. For example, some clients may request small amounts of data and want to obtain it as quickly as possible, while others may request relatively large amounts of data, with less stringent speed requirements but a desire to minimize packet loss. Therefore, using fixed transmission parameters is ill-suited to these diverse business needs.

[0093] In view of this, embodiments of this application provide a data transmission method, apparatus, device, and storage medium. This application receives a request message sent by a client, queries the target data in the server's local cache based on the request message, and determines a cache status parameter indicating whether the target data is cached locally on the server. Furthermore, it determines the data volume of the target data based on the request message and determines the corresponding business requirement parameters based on the data volume. Combining the cache status parameters and business requirement parameters, it determines the target transmission parameters corresponding to the target data. The target transmission parameters are used to set the transmission window and transmission rate used when transmitting the target data to the client. Transmitting the target data to the client according to the target transmission parameters can adapt to different data acquisition needs and reduce the probability of data interruption. The technical solution of this application can effectively improve the data transmission performance of the server in a content delivery network, improve the stability and efficiency of data transmission, and help optimize the client's business experience.

[0094] System architecture and scenario description used in the embodiments of this application

[0095] Please refer to Figure 4 , Figure 4 The diagram shows a system architecture diagram of a data transmission method provided in an embodiment of this application, which includes a terminal device 440, an Internet 430, a gateway 420, a background service 410, etc.

[0096] In this embodiment, the terminal device 440 may include various forms such as desktop computers, laptops, PDAs (personal digital assistants), mobile phones, in-vehicle terminals, home theater terminals, and dedicated terminals. Furthermore, it can be a single device or a collection of multiple devices. The terminal device 440 can communicate with the Internet 430 via wired or wireless means to exchange data.

[0097] Background service 410 refers to a computer system that can provide certain services to terminal device 440. Compared to ordinary terminal device 440, background service 410 has higher requirements in terms of stability, security, and performance. Background service 410 can be a single high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of a single high-performance computer (e.g., a virtual machine), or a combination of portions of multiple high-performance computers (e.g., virtual machines).

[0098] Gateway 420, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator, enabling network interconnection at the transport layer. It bridges the gap between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal device 440 to backend service 410 are forwarded to the corresponding backend service 410 via gateway 420. Messages sent from backend service 410 to terminal device 440 are also forwarded to the corresponding terminal device 440 via gateway 420.

[0099] The backend service 410 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0100] The data transmission method provided in this application embodiment can be executed on the background service 410 side, where the background service 410 can act as a server and the terminal device 440 can act as a client.

[0101] Of course, it is understood that the implementation environment corresponding to the method in the embodiments of this application is not limited to that of the implementation environment. Figure 4 As shown, those skilled in the art can flexibly select the specific implementation environment according to actual needs, and this application does not impose any restrictions on this.

[0102] The data transmission method provided in this application can be executed in various scenarios, and the following is an exemplary description of it.

[0103] (I) Scenarios for Streaming Media Applications

[0104] The method provided in this application embodiment can be applied to streaming media application scenarios.

[0105] Currently, with the continuous development of information technology, numerous streaming media applications have emerged. Streaming media is a technology that continuously transmits audio and video content over a network, allowing terminal devices to begin playing media files before the data is fully downloaded. Streaming media scenarios typically involve real-time or near-real-time content delivery, which can include online video, live audio broadcasts, IPTV, distance learning courses, live game streaming, video conferencing, and more.

[0106] The data transmission method provided in this application embodiment can be applied in streaming media scenarios. Please refer to... Figure 5 , Figure 5 This application illustrates a schematic diagram of the system architecture of a streaming media service provided in an embodiment of the present application, such as... Figure 5 As shown, streaming media content providers can use a CDN (Content Delivery Network) to distribute streaming media content, which involves caching relevant business data on various nodes of the CDN. When someone wants to access a streaming media resource, the nearest node will respond to the request and send the streaming media resource to the relevant terminal device for playback and display.

[0107] exist Figure 5 In the streaming media application scenarios shown, the data transmission method provided in the embodiments of this application can be used to effectively improve the transmission efficiency and stability of streaming media data.

[0108] (II) Online shopping scenarios

[0109] Currently, online shopping is widely popular. E-commerce websites typically contain a large number of product images, videos, and related documents. Shoppers can log in to these websites to make purchases. A good e-commerce website should have high-performance data transmission capabilities and reliable data storage capabilities.

[0110] The method described in this embodiment can be applied to online shopping scenarios. E-commerce websites typically need to process data from various data sources, such as order systems, payment systems, inventory management, behavioral data, and marketing data. E-commerce websites can store this data in a content delivery network. The method described in this embodiment enables rapid data transmission when various entities require relevant data.

[0111] Of course, it is understood that the methods in the embodiments of this application are not limited to the application scenarios given in the above examples. The methods in the embodiments of this application can also be applied in other scenarios, and this application does not impose any restrictions on them.

[0112] General Description of Embodiments in this Application

[0113] Please refer to Figure 6 , Figure 6 A flowchart illustrating a data transmission method provided in an embodiment of this application is shown. Figure 6 As shown, a data transmission method according to one embodiment of this application includes, but is not limited to, the following steps:

[0114] Step 610: Receive the request message sent by the client. The request message is used to obtain the specified target data.

[0115] Step 620: Based on the request message, query the target data in the server's local cache and determine the cache status parameters corresponding to the target data; wherein, the cache status parameters are used to indicate whether the target data is in the server's local cache or not in the server's local cache.

[0116] Step 630: Determine the data volume of the target data based on the request message, and determine the corresponding business requirement parameters of the target data based on the data volume;

[0117] Step 640: Determine the target transmission parameters corresponding to the target data based on the cache status parameters and business requirement parameters; wherein, the target transmission parameters include transmission window parameters and transmission rate parameters;

[0118] Step 650: Transmit the target data to the client according to the target transmission parameters.

[0119] In this application embodiment, a data transmission method is provided, which can effectively improve the data transmission performance of the server in a content delivery network, improve the stability and efficiency of data transmission, and help optimize the client's business experience.

[0120] The technical solutions provided in this application are mainly used in content delivery networks. For example, any node in a content delivery network can be a server providing data transmission services, and the methods in this application can be applied to that server. Of course, it is understood that the methods in this application can also be applied to multiple nodes in a content delivery network simultaneously, and these nodes can all be servers providing data transmission services. This application does not impose any restrictions on this.

[0121] For any server (node) in a content delivery network, when responding to a client's request, it can execute the method in this application embodiment to realize the transmission of data from the server to the client. In this application embodiment, there are no restrictions on the correspondence between the client and the server.

[0122] In step 610, a request message sent by the client is received. This request message is used to obtain specified data. In this embodiment of the application, the data specified by the request message is denoted as the target data.

[0123] In this embodiment, the request message can be constructed by the client's application and sent to the server via a network communication protocol (such as HTTP, HTTPS, etc.). For example, when there is a need to obtain data, the application's user can interact with the client to trigger a data request. Based on the request, the client can package the relevant data into a message conforming to a specific protocol format; this message is the request message. Then, the client can send the request message to the server's network address via a network communication protocol. Generally, the request message may include information indicating the data to be obtained, as well as parameters such as the server's network address and port number. In this embodiment, the specific content of the request message is not limited.

[0124] For example, in some embodiments, the request message may include a request line, request headers, a request body, query parameters, etc. The request line may record information such as the method (e.g., GET, POST), URL path, and version number; the request headers may provide metadata about the request itself, such as content type, encoding method, language preference, authentication information, etc.; the request body may carry additional data, such as form data or objects in other formats, to convey more complex information; and query parameters may be used to specify filtering conditions, pagination, etc. Of course, it is understood that the content of the request message is not limited to this and can be flexibly adjusted according to actual needs; this application does not impose any restrictions on this.

[0125] When the server receives a request message from the client, it can detect the client's connection request through a specific port to obtain the corresponding request message. This process may include operations related to identity verification and authorization, which are not restricted in this application.

[0126] In this application embodiment, the request message can be used to specify various types of target data. For example, in some embodiments, the target data can be text data; in some embodiments, the target data can be HTML page data, which the client can display in a browser after obtaining it; in some embodiments, the target data can be streaming media data such as images, audio, or video streams, which the client can display or play after obtaining it, and can also store it locally on the client.

[0127] Of course, it is understood that the specific type and content of the target data can be flexibly set according to actual needs. Furthermore, the amount of target data can be arbitrary, for example, it can be a small amount (e.g., in KB) or a large amount (e.g., in MB, GB, etc.), and this application does not impose any restrictions on this.

[0128] In step 620, after receiving the request message from the client, the server can query the target data locally based on the request message to determine the cache status parameters corresponding to the target data. Here, the cache status parameters are used to indicate whether the target data is cached locally on the server or not.

[0129] In this embodiment, the specific data format and meaning of the data content used for the cache status parameter are not limited. For example, in some embodiments, the cache status parameter can be represented by a numerical value, such as 0 or 1. When the cache status parameter is 0, it indicates that the target data is not cached locally on the server; conversely, when the cache status parameter is 1, it indicates that the target data is cached locally on the server. In other embodiments, the cache status parameter can also be represented by a vector, such as (0, 1) or (1, 0). Of course, it is understood that the specific data format of the cache status parameter can be set according to actual needs and is not limited to the types shown above.

[0130] When determining the cache state parameters corresponding to the target data, firstly, the target data that the client wants to obtain can be determined based on the request message. Specifically, query information related to the target data can be extracted from the request message. This query information may be located in the query string or request body of the request message, such as search keywords, filtering conditions, pagination information, or byte sequence numbers, etc., which are not limited in this application. After determining the query information, the target data can be searched in the local cache on the server. There are various specific search methods. For example, in some embodiments, a simple search method can be used to find the target data, that is, directly searching for specific records or fields based on the query information to determine the location of the target data; in some embodiments, a compound search method can be used to find the target data, such as combining multiple query information as filtering conditions to determine the location of the target data.

[0131] Understandably, if the target data is found in the server's local cache, it can be confirmed that the target data exists in the server's local cache; if the target data is not found in the server's local cache, it can be confirmed that the target data is not cached locally on the server. Therefore, based on the search results, the cache status parameters corresponding to the target data can be determined.

[0132] In this embodiment, if the target data is found in the server's local cache, it can be retrieved. After determining the target transmission parameters, this facilitates the transmission of the target data to the client. Conversely, if the target data is not found in the server's local cache, it can be retrieved via a back-to-origin service. The implementation principle of the back-to-origin service has been described in the previous example and will not be repeated here. After retrieving the target data, it can be cached locally on the server.

[0133] In step 630, the data volume of the target data can also be determined based on the request message. In this embodiment of the application, the business requirement parameters corresponding to the target data can be determined based on the data volume of the target data.

[0134] Specifically, when determining the data volume of the target data, the request message can be parsed to extract information related to the data volume of the target data, such as pagination information and data range information. Then, the data volume of the target data can be statistically calculated based on this information. In this embodiment, the business requirement parameter is a parameter indicator that characterizes the data volume of the target data, that is, it is used to characterize the size of the target data required by the client. In some embodiments, the business requirement parameter can be represented by a numerical value, and this value can be positively correlated with the data volume of the target data; the larger the data volume of the target data, the larger the business requirement parameter can be. In some embodiments, different requirement levels can also be divided, and the business requirement parameter can represent different requirement levels. For example, when the data volume of the target data is small, it is in a lower requirement level and corresponds to one business requirement parameter; when the data volume of the target data is large, it is in a higher requirement level and corresponds to another business requirement parameter. In this embodiment, the data format used for the business requirement parameter is also not limited.

[0135] In step 640, after determining the cache state parameters and business requirement parameters corresponding to the target data, the target transmission parameters corresponding to the target data can be determined based on these two types of parameters. In this embodiment, the target transmission parameters refer to the relevant transmission parameters used by the server when transmitting the target data to the client.

[0136] In this embodiment, the target transmission parameters may include transmission window parameters and transmission rate parameters. The transmission window parameter is used to set indicators related to the transmission window when transmitting target data. Here, the transmission window refers to the maximum amount of data the sender can continuously send without receiving acknowledgment. The transmission rate parameter is used to set the transmission rate when transmitting target data. The transmission rate refers to the amount of data sent per unit time, which can be measured in bits per second (bps) or bytes per second (Bps). The transmission rate determines the speed of data transmission.

[0137] It should be noted that, in the embodiments of this application, the target transmission parameters may include other types of parameters in addition to the transmission window parameters and transmission rate parameters mentioned above, and this application does not impose any restrictions on them.

[0138] In step 650, after determining the target transmission parameters, the target data can be transmitted to the client according to the target transmission parameters.

[0139] Specifically, when transmitting target data to the client, a suitable transmission protocol can be selected based on the application scenario. For example, in some embodiments, the server can use the TCP (Transmission Control Protocol) to transmit target data to the client. This protocol provides ordered, error-free data transmission and has a retransmission mechanism, making it suitable for scenarios requiring reliable transmission, such as file transfer and real-time communication. In some embodiments, the server can use the UDP (User Datagram Protocol) to transmit target data to the client. This protocol is suitable for scenarios with high real-time requirements but low reliability requirements, such as video streaming and online games. It offers fast transmission speeds but does not guarantee the order and integrity of data packets. In some embodiments, the server can use the WebSocket protocol to transmit target data to the client. This protocol is suitable for application scenarios requiring real-time bidirectional communication, such as chat applications and real-time push notifications. Of course, in this application embodiment, the specific protocol type used for data transmission between the server and client is not limited; it can be flexibly selected according to requirements.

[0140] When sending target data to the client, it needs to be processed into a specific data format, such as JSON, XML, or HTML. The specific format can be determined based on the type of target data and the client's requirements, which will not be elaborated upon in this application. During transmission, the target data can be encapsulated, and in some specific embodiments, it can also be encrypted and signed to protect its privacy and improve data transmission security.

[0141] It is understood that the data transmission method provided in this application embodiment receives a request message sent by the client, queries the target data in the server's local cache according to the request message, and determines a cache state parameter indicating whether the target data is cached locally on the server. Furthermore, it determines the data volume of the target data based on the request message and determines the corresponding business requirement parameters based on the data volume. Combining the cache state parameter and the business requirement parameter, it determines the target transmission parameter corresponding to the target data. The target transmission parameter is used to set the transmission window and transmission rate used when transmitting the target data to the client. Transmitting the target data to the client according to the target transmission parameter can adapt to different data acquisition needs and reduce the probability of data interruption. The technical solution of this application can effectively improve the data transmission performance of the server in a content delivery network, improve the stability and efficiency of data transmission, and help optimize the client's business experience.

[0142] Specifically, in some embodiments, based on the request message, the target data is queried in the server's local cache to determine the cache state parameters corresponding to the target data, including:

[0143] Parse the request message and extract the data resource identifier from it;

[0144] Based on the data resource identifier, query the target data in the local cache on the server and determine the cache status parameters corresponding to the target data.

[0145] In this embodiment, when determining the cache status parameters corresponding to the target data, the request message can be parsed to extract the data resource identifier. In this embodiment, the data resource identifier is mainly used to record information related to the target data requested by the client. By extracting the data resource identifier from the request message, the client's specified target data can be determined, thus facilitating the server-side detection of whether the target data is cached, and determining the corresponding cache status parameters.

[0146] Specifically, in this embodiment, the data resource identifier may include a target data identifier and a target data range corresponding to the target data. The target data identifier is information used to identify the original data in which the target data resides, and it may be located in the URL of the request message. The target data range indicates the position of the target data within the original data. For example, based on the target data identifier, the original data in which the target data resides can be determined. The original data may be large, such as 1024MB, and the target data range indicates which part of the original data the target data belongs to. Of course, it is understood that in this embodiment, the target data may be a portion of the original data or may include all of the original data; this application does not impose any limitations on this.

[0147] Specifically, in some embodiments, based on the data resource identifier, the target data is queried in the local cache on the server to determine the cache status parameters corresponding to the target data, including:

[0148] Retrieve the cache information table recorded by the server; the cache information table includes the cache data identifier and cache data range corresponding to each cached data on the server's local side;

[0149] Detect the first data identifier in the cached data identifier; wherein, the first data identifier is the cached data identifier that matches the target data identifier;

[0150] If the first data identifier does not exist in the cached data identifier, the cache status parameter corresponding to the target data is determined as the first parameter value; wherein, the first parameter value is used to represent the target data that is not cached locally on the server.

[0151] In this embodiment, a cache information table can be constructed on the server side. For each cached data, its related information can be recorded in the cache information table. Specifically, the cache information table may include the data identifier corresponding to each cached data on the server side and the data range of the cached data. In this embodiment, the data identifier corresponding to the cached data is denoted as the cache data identifier, and the data range of the cached data is denoted as the cache data range. It can be understood that the cached data on the server side is generally the target data corresponding to the previous request message that has been cached. Therefore, the meaning of the cache data identifier and the cache data range is similar to that of the target data identifier and the target data range corresponding to the target data, and will not be elaborated here.

[0152] In this embodiment, when querying target data in the local cache on the server, a recorded cache information table can be obtained. Then, a cache data identifier that matches the target data identifier can be queried in the cache information table. In this embodiment, the cache data identifier that matches the target data identifier is recorded as the first data identifier. Here, "cache data identifier matches target data identifier" means that the cache data identifier and the target data identifier are completely identical, indicating that the original data corresponding to the cache data and the target data are the same.

[0153] Specifically, there are various implementation methods that can be used to detect the first data identifier in the cached data identifier. For example, in some embodiments, the similarity between the cached data identifier and the target data identifier can be calculated. When the similarity reaches the highest index value, it indicates that they are completely identical, and the cached data identifier can be determined as the first data identifier. In some embodiments, data identifier matching can be based on a hash function, such as calculating the hash values ​​of the cached data identifier and the target data identifier. If the hash values ​​are the same, it indicates that the cached data identifier and the target data identifier match, and the cached data identifier can be determined as the first data identifier. In this application embodiment, the specific method for detecting the first data identifier is not limited, and it can be flexibly selected according to requirements.

[0154] In this embodiment, if the first data identifier is not found among the cached data identifiers during the traversal, it indicates that the target data is not cached locally on the current server. In this case, the cache status parameter corresponding to the target data can be determined as the first parameter value, which can be used to characterize the target data not being cached locally on the server. For example, the first parameter value can be 0, and this application does not impose any restrictions on this. In this embodiment, when the cache status parameter corresponding to the target data is the first parameter value, it can be obtained by returning to the origin service.

[0155] It should be noted that, in this embodiment of the application, when detecting cached data identifiers, the first data identifiers that match the target data identifier may be 0, 1, or multiple. In this embodiment of the application, the number of first data identifiers is not limited.

[0156] Specifically, in some embodiments, querying the target data in the server's local cache based on the data resource identifier to determine the cache state parameters corresponding to the target data further includes:

[0157] If a first data identifier exists in the cached data identifier, compare the first data range with the target data range; wherein, the first data range is the cached data range corresponding to the first data identifier;

[0158] If none of the first data ranges contain the target data range, the cache state parameter corresponding to the target data is determined as the first parameter value;

[0159] If any of the first data ranges contains the target data range, the cache status parameter corresponding to the target data is determined as the second parameter value; wherein, the second parameter value is used to indicate that the target data is in the local cache of the server.

[0160] In this embodiment, if a first data identifier is identified in the cached data identifier, it indicates that there is a situation where cached data and target data belong to the same original data. However, this does not directly determine that the server's local cache contains the target data, because the cached data corresponding to the first data identifier may only be a part of the original data and may not contain the content of the target data, or it may only partially overlap with the target data without containing the entire content of the target data. Therefore, in this embodiment, after identifying the first data identifier, the range of cached data corresponding to the first data identifier can be further determined. In this embodiment, this range is denoted as the first data range.

[0161] For each first data range corresponding to a first data identifier, if none of them contain the target data range, the cache status parameter corresponding to the target data can be determined as the first parameter value. Conversely, if any of the first data ranges contains the target data range, the cache status parameter corresponding to the target data can be determined as the second parameter value. The second parameter value is different from the first parameter value and can be used to indicate that the target data is cached locally on the server side. For example, the second parameter value can be 1, and this application does not limit it.

[0162] Specifically, in some embodiments, reference is made to Figure 7 Based on the request message, determine the amount of target data, including:

[0163] Step 710: Determine the start byte sequence number and end byte sequence number of the target data according to the target data range;

[0164] Step 720: Calculate the difference between the end byte sequence number and the start byte sequence number, and determine the amount of target data based on the difference.

[0165] In this embodiment of the application, the target data range information can also be used when determining the amount of target data. The target data range generally marks the start and end byte sequence numbers of the target data in the original data. For example, the target data range may be {30, 100}, indicating that the target data starts from the 30th byte of the original data and ends at the 100th byte, and the data in between is the target data.

[0166] Therefore, in this embodiment, the start byte sequence number and end byte sequence number of the target data can be determined according to the target data range. Then, the difference between the two can be calculated, that is, by subtracting the start byte sequence number from the end byte sequence number to obtain the corresponding difference. Based on this difference, the data volume of the target data can be determined. For example, the difference can be directly determined as the data volume of the target data, and this application does not impose any restrictions on this.

[0167] Specifically, in some embodiments, the business requirement parameter is used to characterize the type of business requirement corresponding to the target data, including small file transfer and large file transfer; determining the business requirement parameter corresponding to the target data based on the data volume includes:

[0168] Compare the data volume with the preset data volume threshold;

[0169] If the data volume is less than or equal to the data volume threshold, the business requirement parameter is determined as the third parameter value; whereby the third parameter value is used to characterize the type of business requirement corresponding to the target data as small file transfer;

[0170] If the data volume exceeds the data volume threshold, the business requirement parameter will be determined as the fourth parameter value; the fourth parameter value is used to characterize the type of business requirement corresponding to the target data as large file transfer.

[0171] In this embodiment, the business requirement parameter can be used to characterize the type of business requirement corresponding to the target data, such as small file transfer type and large file transfer type, but is not limited to this. In this embodiment, the data format of the business requirement parameter can be numerical. For example, when the business requirement parameter is 1, it indicates that the target data belongs to the large file transfer type; when the business requirement parameter is 0, it indicates that the target data belongs to the small file transfer type. Of course, the specific numerical value and the meaning it represents can be flexibly set according to actual needs.

[0172] In this embodiment, when determining the business requirement parameters corresponding to the target data based on the data volume, a data volume threshold can be preset, for example, 1MB. Then, the data volume of the target data can be compared with the preset data volume threshold. If the data volume of the target data is less than or equal to the data volume threshold, the business requirement parameter corresponding to the target data can be determined as the third parameter value. For example, the third parameter value can be 0, which indicates that the type of business requirement corresponding to the target data is small file transfer. Conversely, if the data volume of the target data is greater than the data volume threshold, the business requirement parameter corresponding to the target data can be determined as the fourth parameter value. The fourth parameter value is different from the third parameter value; for example, the fourth parameter value can be 1, which indicates that the type of business requirement corresponding to the target data is large file transfer.

[0173] Specifically, in some embodiments, the target transmission parameters corresponding to the target data are determined based on cache state parameters and service requirement parameters, including:

[0174] If the business requirement parameter is the fourth parameter value, the preset transmission window parameter and transmission rate parameter are obtained based on the cache status parameter and used as the target transmission parameter corresponding to the target data.

[0175] If the business requirement parameter is the third parameter value, obtain the preset window gain value and rate gain value according to the cache status parameter, and determine the target transmission parameters corresponding to the target data according to the window gain value and rate gain value;

[0176] The fourth parameter value is used to characterize the type of business requirement corresponding to the target data as large file transfer, and the third parameter value is used to characterize the type of business requirement corresponding to the target data as small file transfer.

[0177] In this embodiment, when determining the target transmission parameters corresponding to the target data, if the business requirement parameter is the fourth parameter value, that is, when the type of business requirement corresponding to the target data is large file transmission, traffic cost is generally a key factor in evaluating data transmission performance, and the server needs to mitigate packet loss during data transmission as much as possible. In this embodiment, preset transmission window parameters and transmission rate parameters can be obtained based on the cache status parameters as the target transmission parameters corresponding to the target data.

[0178] Specifically, if the cache status parameter is the first parameter value, meaning the target data is not cached locally on the server, a preset first transmission window parameter and a first transmission rate parameter can be obtained as the target transmission parameters corresponding to the target data. If the cache status parameter is the second parameter value, meaning the target data is cached locally on the server, a preset second transmission window parameter and a second transmission rate parameter can be obtained as the target transmission parameters corresponding to the target data. Here, the first transmission window parameter is smaller than the second transmission window parameter and the first transmission rate parameter is smaller than the second transmission rate parameter because if the target data is not cached locally on the server and a back-to-origin service is required, the data transmission performance is relatively limited. Therefore, a smaller transmission window parameter and transmission rate parameter can be set. If the target data is cached locally on the server, a larger transmission window parameter and transmission rate parameter can be set. This application does not limit the specific sizes of the first transmission window parameter, the second transmission window parameter, the first transmission rate parameter, and the second transmission rate parameter.

[0179] In this embodiment, if the business requirement parameter is a third parameter value, meaning the type of business requirement corresponding to the target data is small file transfer, the response time becomes a key factor in evaluating data transmission performance. In this case, preset window gain and rate gain values ​​can be obtained based on the cache state parameters corresponding to the target data. Based on these values, the target transmission parameters corresponding to the target data can be calculated and determined in real time. This allows for more efficient data transmission, facilitating the rapid and accurate transmission of smaller amounts of data to the client.

[0180] Of course, it should be noted that in the embodiments of this application, when the business requirement corresponding to the target data is large file transmission, the target data can also be transmitted in the initial stage using the acquired transmission window parameters and transmission rate parameters, and then in the subsequent stage, the preset window gain value and rate gain value can be obtained through the cache state parameters, and the target transmission parameters can be calculated and determined in real time. This application does not limit this.

[0181] Specifically, in some embodiments, reference is made to Figure 8 The target transmission parameters corresponding to the target data are determined based on the window gain value and the rate gain value, including:

[0182] Step 810: Detect the minimum latency and maximum available bandwidth of the communication network between the client and the client;

[0183] Step 820: Determine the third transmission window parameters corresponding to the target data based on the product of the window gain value, minimum delay, and maximum available bandwidth;

[0184] Step 830: Determine the third transmission rate parameter corresponding to the target data based on the product of the rate gain value and the maximum available bandwidth.

[0185] In this embodiment, when determining the target transmission parameters corresponding to the target data based on the window gain value and the rate gain value, the minimum latency and maximum available bandwidth of the communication network between the server and the client can be detected. Based on the product of the window gain value, minimum latency, and maximum available bandwidth, the transmission window parameter used when transmitting the target data can be determined; in this embodiment, this is denoted as the third transmission window parameter. Based on the product of the rate gain value and the maximum available bandwidth, the transmission rate parameter corresponding to the target data can be determined; in this embodiment, this is denoted as the third transmission rate parameter.

[0186] It should be noted that, in this embodiment, the window gain and rate gain values ​​may differ for target data with different cache state parameters. Generally, if the cache state parameter corresponding to the target data is the first parameter value, the corresponding window gain and rate gain values ​​can be smaller; if the cache state parameter corresponding to the target data is the second parameter value, the corresponding window gain and rate gain values ​​can be larger. In this embodiment, the specific values ​​of the window gain and rate gain are not limited.

[0187] Specifically, in this embodiment, when the cached state parameter corresponding to the target data is the first parameter value, the transmission performance of the target data is affected by the origin service because it needs to be obtained through the origin service. Therefore, when obtaining the target data through the origin service, the origin transmission rate parameter can be determined. Then, the origin transmission rate parameter and the maximum available bandwidth can be compared, and the smaller value can be determined as the new maximum available bandwidth. In this way, the transmission performance limiting factor of the origin service can be added to the target transmission parameters, facilitating the transmission of the target data to the client.

[0188] The following describes and explains a data transmission method provided in this application embodiment, with reference to specific application examples.

[0189] Please refer to Figure 9 , Figure 9 The diagram illustrates a system schematic of a data transmission method provided in an embodiment of this application. The method in this embodiment can be applied to a server, which can execute differentiated transmission control strategies based on the caching status and data volume of the target data, effectively improving data transmission performance in different scenarios and thus optimizing the client-side business experience.

[0190] Specifically, such as Figure 9 As shown in the embodiments of this application, the server may include a send / receive module, a cache judgment module, a block identification module, a policy control module, and a data acquisition module, but is not limited to these. When executing the method in the embodiments of this application, refer to... Figure 10 , Figure 10 A schematic diagram illustrating the implementation flow of the method in an embodiment of this application is shown, such as... Figure 10 The specific process is as follows:

[0191] After receiving a request message from the client, the server's transceiver module extracts the data resource identifier from the client's request message and passes it to the cache judgment module. The server's cache judgment module determines whether the data resource requested by the client is cached locally and passes the judgment result to the block identification module. The server's block identification module identifies the size (i.e., data volume) of the data resource requested by the client and passes the result to the policy control module. The server's policy control module selects the corresponding transmission control policy (i.e., target transmission parameters) based on whether the data resource is cached locally and the business requirement type corresponding to the data volume, and sends the transmission control policy to the server's transceiver module. The cache judgment module passes the information on whether the data is cached locally to the data acquisition module. The data acquisition module executes the data response and data retrieval and response policies based on the information on whether the data is cached locally, and passes the data to be sent to the transceiver module. The server's transceiver module sends the data to be sent from the data acquisition module according to the transmission control policy defined by the policy control module.

[0192] The server-side sending and receiving module receives a request message from the client, extracts the requested data resource information carried within, and passes it to the cache determination module, as follows:

[0193] In this embodiment of the application, the data resource identifier Data_ID extracted by the server's transceiver module includes the following information:

[0194] 1. Connection Identifier ConnID: This is an identifier that uniquely represents the current communication between the client and the server. It can be the 5-tuple information in the TCP protocol or the connection identifier field in the QUIC protocol.

[0195] 2. Data Identifier URI: An identifier that uniquely identifies the data requested by the client, usually located in the URL of the client's request message;

[0196] 3. Data Range: This indicates the position of the data requested by the client within the original data. For example, if the data corresponding to the data identifier URI is 1024MB in length, and Range = {10, 100}, it means that the data requested by the client is located between the 10th and 100th bytes of the aforementioned 1024MB of data.

[0197] In this embodiment of the application, the data resource identifier Data_ID can be represented by the following formula (1):

[0198] Data_ID = {ConnID, URI, Range} (1)

[0199] In this embodiment, the server-side transceiver module transmits the extracted data resource identifier Data_ID to the cache determination module; the server-side cache determination module determines the cache status parameters of the data resource on the server based on the identifier of the data resource requested by the client, and transmits the result to the block identification module.

[0200] Specifically, the cache determination module determines the cache status of the client's requested data based on the data identifier URI and data range in the data resource identifier Data_ID, and obtains the cache status parameter Result_hit. Its implementation principle is as follows:

[0201] a) If the server caches the data resource corresponding to {URI,Range} locally, then the cache status parameter Result_hit = 1; b) If the server does not cache the data resource corresponding to {URI,Range} locally, then the cache status parameter Result_hit = 0.

[0202] In this embodiment of the application, the information of the cached data resources maintained locally by the server is shown in Table 1:

[0203] Table 1

[0204] serial number URI Range 1 URI_1 Range_1 2 URI_2 Range_2 …… …… ……

[0205] The process for determining the cache status parameter Result_hit includes:

[0206] Step 1) If there is no data identifier URI in the cached data resource identifier Data_ID in Table 1 above, then return the cache status parameter Result_hit = 0;

[0207] Step 2) If the data identifier URI in the data resource identifier Data_ID is cached in Table 1 above, then proceed to step 3) below;

[0208] Step 3) If the Range_i in the table entry corresponding to the cached data identifier URI in Table 1 contains the data range Range in Data_ID, then return the cache status parameter Result_hit = 1; otherwise, return the cache status parameter Result_hit = 0.

[0209] In this embodiment, the cache judgment module passes the cache status parameter Result_hit to the block identification module, specifically through the message pkt_cache, as shown in formula (2):

[0210] Pkt_cache = {Data_ID, Result_hit} (2)

[0211] The server-side block identification module identifies the block size of the current data resource based on the data resource identifier and transmits the result to the policy control module. Specifically, the server-side block identification module determines the business requirement parameters of the current data resource (i.e., the target data) based on the Range in Data_ID. The specific process is as follows:

[0212] Calculate the data block size Data_size of the target data;

[0213] The business requirement parameter Require_type is determined based on the data block size Data_size.

[0214] In this embodiment, the data block size Data_size is calculated using the start and end values ​​of the data range Range, where the data range Range can be represented by Range = {start, end}. In this case, the data block size Data_size can be represented by the following formula (3):

[0215] Data_size = end – start (3)

[0216] In this embodiment, the server identifies the transmission requirements of the current data block based on the data volume threshold (denoted as Data_size_threshold) corresponding to the data block size Data_size. Specifically:

[0217] When the data block size (Data_size) is less than or equal to the data volume threshold (Data_size_threshold), the target data is a small file, and improving "response speed" is the primary business objective; the business requirement parameter (Require_type) = 0. Conversely, when the data block size (Data_size) is greater than the data volume threshold (Data_size_threshold), the target data is a large file, and reducing "traffic costs" is the primary business objective; in this case, Require_type = 1. In this embodiment, the aforementioned data volume threshold (Data_size_threshold) can be configured by the administrator and declared in the configuration file; by default, the data volume threshold (Data_size_threshold) can be 1MB, and this application does not impose any restrictions on this.

[0218] In this embodiment, the block identification module passes the service requirement parameter Require_type to the policy control module, specifically through the message pkt_Require, as shown in formula (4):

[0219] Pkt_Require = {Data_ID, Result_hit, Require_type} (4)

[0220] The server-side policy control module configures a corresponding transmission control policy for the data transmission task of the target data based on the cache status parameters and business requirement parameters of the aforementioned data, and then transmits it to the transceiver module. In this embodiment, the server maintains a corresponding transmission policy table for different cache status parameters and business requirement parameters, as shown in Table 2:

[0221] Table 2

[0222] serial number Cache status parameters Business requirement parameters Transmission control strategy 1 1 1 P1 2 1 0 P2 3 0 1 P3 4 0 0 P4

[0223] In this embodiment, the server-side policy control module queries the corresponding transmission control policy based on the cache status parameter Result_hit and the business requirement parameter Require_type, and transmits the transmission control policy to the transceiver control module through the message pkt_policy, as shown in formula (5):

[0224] Pkt_policy = {Data_ID, Policy} (5)

[0225] In this embodiment of the application, the transmission control policy configured in the server-side policy control module for different cache state parameters and business requirement parameters may include the following parameters:

[0226] Initial parameters (such as initial window init_cwnd and initial rate init_pacing_rate);

[0227] The server can use the gain values ​​of parameters during transmission (such as window gain value cwnd_gain and rate gain value pacing_gain) to calculate the window value cwnd (as shown in formula (6)) and rate value pacing_rate (as shown in formula (7)) during transmission.

[0228] Cwnd = cwnd_gain * minRTT * bw (6)

[0229] Pacing_rate = pacing_gain * bw (7)

[0230] Here, minRTT and bw represent the minimum latency and maximum available bandwidth of the communication network with the current client, respectively, as measured by the server.

[0231] In this embodiment, the transmission control policy set in the server-side policy control module is as follows:

[0232] 1. When the cache status parameter Result_hit = 1 and the service requirement parameter Require_type = 1, the corresponding transmission control policy P1 only configures the initial window init_cwnd (i.e., the second transmission window parameter) and the initial rate init_pacing_rate (i.e., the second transmission rate parameter); the specific values ​​can be configured by the administrator and declared in the configuration file; by default, the initial window init_cwnd = 100; the initial rate init_pacing_rate = 10Mbps.

[0233] 2. When the cache status parameter Result_hit = 1 and the service requirement parameter Require_type = 0, the corresponding transmission control policy P2 only configures the window gain value cwnd_gain and the rate gain value pacing_gain. The specific values ​​can be configured by the administrator and declared in the configuration file. By default, the window gain value cwnd_gain = 1.5 and the rate gain value pacing_gain = 1.15.

[0234] 3. When the cache status parameter Result_hit = 0 and the service requirement parameter Require_type = 1, the corresponding transmission control policy P3 only configures the initial window init_cwnd (i.e., the first transmission window parameter) and the initial rate init_pacing_rate (i.e., the first transmission rate parameter). The specific values ​​can be configured by the administrator and declared in the configuration file. By default, the initial window init_cwnd = 50 and the initial rate init_pacing_rate = 1Mbps.

[0235] 4. When the cache status parameter Result_hit = 0 and the service requirement parameter Require_type = 0, the corresponding transmission control policy P4 only configures the window gain value cwnd_gain and the rate gain value pacing_gain. The specific values ​​can be configured by the administrator and declared in the configuration file. By default, the window gain value cwnd_gain = 1.0 and the rate gain value pacing_gain = 1.0.

[0236] In this embodiment, the server-side measurement and control module transmits the transmission control strategy (i.e., Pi) corresponding to the above-mentioned cache status parameters and business requirement parameters to the transceiver module, and the server-side cache judgment module transmits information such as data resource identifier and whether it is cached to the data acquisition module.

[0237] The server-side data acquisition module obtains the data resources to be sent and transmits the data to the server-side transceiver module. Specifically, the data acquisition module extracts the cache status parameter Result_hit from pkt_cache and performs the following operations: if the cache status parameter Result_hit = 1, the corresponding data resource is obtained and transmitted to the transceiver module; if the cache status parameter Result_hit = 0, the data resource requested by the client is obtained through origin pull and transmitted to the transceiver module. In this embodiment, if the data acquisition module obtains the data to be sent (i.e., the target data) through origin pull, the measured origin pull performance perf_back (such as origin pull rate) is transmitted to the transceiver module during the transmission of the data to be sent. The perf_back includes the following information: the rate at which data is obtained through origin pull perf_rate (i.e., the origin pull transmission rate parameter).

[0238] The server-side send / receive module sends data from the data acquisition module according to the transmission control policy Pi obtained from the policy control module. Specifically:

[0239] If the transmission control policy is P1 or P2, then transmission is performed according to that policy. If the transmission control policy is P3 or P4, then before calculating cwnd (Formula 6) and pacing_rate (Formula 7), the relationship between the current bw and perf_rate is determined, and the following adjustments are made: In transmission control policy P3, bw is the maximum value of the actual bw and the current perf_rate, i.e., bw = {bw, perf_rate}; in transmission control policy P4, bw is the minimum value of the actual bw and the current perf_rate, i.e., bw = {bw, perf_rate}.

[0240] It is understood that, in this embodiment of the application, by accurately identifying different streaming modes and business needs on the server side and configuring differentiated transmission control strategies, the response rate under small file data streams can be improved, while also taking into account the traffic cost under large file data streams. Through automated configuration of strategies, the response rate under data cache hit scenarios can be improved, while also taking into account the transmission performance and traffic cost under different file sizes in data back-to-origin scenarios, which is beneficial to improving the client's business experience.

[0241] Reference Figure 11 In this embodiment of the application, a data transmission device is also provided, which includes:

[0242] The receiving unit 1110 is used to receive a request message sent by the client, the request message being used to obtain specified target data;

[0243] The query unit 1120 is used to query the target data in the local cache of the server according to the request message and determine the cache status parameter corresponding to the target data; wherein, the cache status parameter is used to indicate whether the target data is in the local cache of the server or the target data is not cached locally on the server.

[0244] The processing unit 1130 is used to determine the data volume of the target data according to the request message, and to determine the business requirement parameters corresponding to the target data according to the data volume;

[0245] The integration unit 1140 is used to determine the target transmission parameters corresponding to the target data based on the cache status parameters and service requirement parameters; wherein, the target transmission parameters include transmission window parameters and transmission rate parameters;

[0246] The execution unit 1150 is used to transmit target data to the client according to the target transmission parameters.

[0247] Optionally, in some embodiments, the query unit is specifically used for:

[0248] Parse the request message and extract the data resource identifier from it;

[0249] Based on the data resource identifier, query the target data in the server's local cache to determine the cache status parameters corresponding to the target data.

[0250] Optionally, in some embodiments, the data resource identifier includes a target data identifier and a target data range corresponding to the target data; the query unit is specifically used for:

[0251] Retrieve the cache information table recorded by the server; the cache information table includes the cache data identifier and cache data range corresponding to each cached data on the server's local side;

[0252] Detect the first data identifier in the cached data identifier; wherein, the first data identifier is the cached data identifier that matches the target data identifier;

[0253] If the first data identifier does not exist in the cached data identifier, the cache status parameter corresponding to the target data is determined as the first parameter value; wherein, the first parameter value is used to represent the target data that is not cached locally on the server.

[0254] Optionally, in some embodiments, the query unit is further used for:

[0255] If a first data identifier exists in the cached data identifier, compare the first data range with the target data range; wherein, the first data range is the cached data range corresponding to the first data identifier;

[0256] If none of the first data ranges contain the target data range, the cache state parameter corresponding to the target data is determined as the first parameter value;

[0257] If any of the first data ranges contains the target data range, the cache status parameter corresponding to the target data is determined as the second parameter value; wherein, the second parameter value is used to indicate that the target data is in the local cache of the server.

[0258] Optionally, in some embodiments, the processing unit is specifically used for:

[0259] Based on the target data range, determine the start byte sequence number and end byte sequence number of the target data;

[0260] Calculate the difference between the end byte sequence number and the start byte sequence number, and determine the amount of target data based on the difference.

[0261] Optionally, in some embodiments, the business requirement parameter is used to characterize the type of business requirement corresponding to the target data, and the type of business requirement includes small file transfer and large file transfer; the processing unit is specifically used for:

[0262] Compare the data volume with the preset data volume threshold;

[0263] If the data volume is less than or equal to the data volume threshold, the business requirement parameter is determined as the third parameter value; whereby the third parameter value is used to characterize the type of business requirement corresponding to the target data as small file transfer;

[0264] If the data volume exceeds the data volume threshold, the business requirement parameter will be determined as the fourth parameter value; the fourth parameter value is used to characterize the type of business requirement corresponding to the target data as large file transfer.

[0265] Optionally, in some embodiments, the execution unit is specifically used for:

[0266] If the cache status parameter is the value of the first parameter, retrieve the target data by going back to the origin service;

[0267] Based on the target transmission parameters, the target data is transmitted to the client and cached locally on the server.

[0268] Optionally, in some embodiments, the integration unit is specifically used for:

[0269] If the business requirement parameter is the fourth parameter value, the preset transmission window parameter and transmission rate parameter are obtained based on the cache status parameter and used as the target transmission parameter corresponding to the target data.

[0270] If the business requirement parameter is the third parameter value, obtain the preset window gain value and rate gain value according to the cache status parameter, and determine the target transmission parameters corresponding to the target data according to the window gain value and rate gain value;

[0271] The fourth parameter value is used to characterize the type of business requirement corresponding to the target data as large file transfer, and the third parameter value is used to characterize the type of business requirement corresponding to the target data as small file transfer.

[0272] Optionally, in some embodiments, the integration unit is specifically used for:

[0273] If the cache status parameter is the first parameter value, obtain the preset first transmission window parameter and first transmission rate parameter as the target transmission parameter corresponding to the target data;

[0274] If the cache status parameter is the second parameter value, obtain the preset second transmission window parameter and second transmission rate parameter as the target transmission parameter corresponding to the target data;

[0275] The first parameter value is used to characterize the target data that is not cached locally on the server, and the second parameter value is used to characterize the target data that is cached locally on the server; the first transmission window parameter is smaller than the second transmission window parameter and the first transmission rate parameter is smaller than the second transmission rate parameter.

[0276] Optionally, in some embodiments, the integration unit is specifically used for:

[0277] Detect the minimum latency and maximum available bandwidth of the communication network between the client and the device.

[0278] The third transmission window parameters corresponding to the target data are determined by multiplying the window gain value, minimum delay, and maximum available bandwidth.

[0279] The third transmission rate parameter corresponding to the target data is determined by multiplying the rate gain value and the maximum available bandwidth.

[0280] Optionally, in some embodiments, the apparatus further includes an updating unit, which is specifically used for:

[0281] If the cache status parameter is the first parameter value, the target data is obtained through the origin service, and the origin transmission rate parameter is determined when obtaining the target data;

[0282] Compare the back-to-source transmission rate parameter and the maximum available bandwidth, and determine the smaller of the two as the new maximum available bandwidth.

[0283] It is understandable that, such as Figure 6The content of the data transmission method embodiments shown is applicable to the data transmission device embodiments, and the specific functions implemented by the data transmission device embodiments are the same as those shown. Figure 6 The data transmission method shown in the embodiment is the same, and the beneficial effects achieved are the same as those described above. Figure 6 The beneficial effects achieved by the data transmission method embodiments shown are also the same.

[0284] This application also discloses an electronic device, including:

[0285] At least one processor;

[0286] At least one memory for storing at least one program;

[0287] When at least one program is executed by at least one processor, such that at least one processor implements as Figure 6 The data transmission method embodiment shown.

[0288] The electronic device in the embodiments of this application may be a terminal device, a computer device, or a server device.

[0289] For example, refer to Figure 12 , Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Taking a terminal device as an example, Figure 12 In this context, the electronic device 1200 may include an RF (Radio Frequency) circuit 1210, a memory 1220 including one or more computer-readable storage media, an input unit 1230, a display unit 1240, a sensor 1250, an audio circuit 1260, a short-range wireless transmission module 1270, a processor 1280 including one or more processing cores, and a power supply 1290, among other components. Those skilled in the art will understand that... Figure 12 The device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0290] RF circuit 1210 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and hands it over to one or more processors 1280 for processing; additionally, it transmits uplink data to the base station. Typically, RF circuit 1210 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a SIM card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, etc. Furthermore, RF circuit 1210 can also communicate wirelessly with networks and other devices. Wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.

[0291] Memory 1220 can be used to store software programs and modules (or units). Processor 1280 executes various functional applications and data processing by running the software programs and modules (or units) stored in memory 1220. Memory 1220 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of electronic device 1200 (such as audio data, telephone directory, etc.). Furthermore, memory 1220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 1220 may also include a memory controller to provide access to memory 1220 for processor 1280 and input unit 1230. Although Figure 12 The RF circuit 1210 is shown, but it is understood that it is not a necessary component of the electronic device 1200 and can be omitted as needed without changing the nature of the invention.

[0292] The input unit 1230 can be used to receive input numerical or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to object settings and function control. Specifically, the input unit 1230 may include a touch-sensitive surface 1231 and other input devices 1232. The touch-sensitive surface 1231, also known as a touch display screen or touchpad, can collect touch operations on or near the object (such as operations performed by the object using a finger, stylus, or any suitable object or accessory on or near the touch-sensitive surface 1231), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 1231 may include two parts: a touch detection device and a touch controller. The touch detection device detects the touch position of the object and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 1280, and can receive and execute instructions from the processor 1280. In addition, the touch-sensitive surface 1231 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides the touch-sensitive surface 1231, the input unit 1230 may also include other input devices 1232. Specifically, other input devices 1232 may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.

[0293] The display unit 1240 can be used to display information input by an object or information provided to an object, as well as various graphical object interfaces for controlling the electronic device 1200. These graphical object interfaces can be composed of graphics, text, icons, video, and any combination thereof. The display unit 1240 may include a display panel 1241, which may optionally be configured as an LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or similar display. Further, a touch-sensitive surface 1231 may cover the display panel 1241. When the touch-sensitive surface 1231 detects a touch operation on or near it, it transmits the information to the processor 1280 to determine the type of touch event. Subsequently, the processor 1280 provides corresponding visual output on the display panel 1241 according to the type of touch event. Although in Figure 12 In this embodiment, the touch-sensitive surface 1231 and the display panel 1241 are implemented as two separate components to realize input and output functions. However, in some embodiments, the touch-sensitive surface 1231 and the display panel 1241 can be integrated to realize input and output functions.

[0294] The electronic device 1200 may also include at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1241 according to the ambient light level, and the proximity sensor can turn off the display panel 1241 or the backlight when the electronic device 1200 is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometers, taps), etc. Other sensors that the electronic device 1200 may also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0295] Audio circuitry 1260, speaker 1261, and microphone 1262 provide an audio interface between the device and electronic device 1200. Audio circuitry 1260 converts received audio data into electrical signals and transmits them to speaker 1261, where speaker 1261 converts them into sound signals for output. Conversely, microphone 1262 converts collected sound signals into electrical signals, which are then received by audio circuitry 1260, converted back into audio data, processed by processor 1280, and transmitted via RF circuitry 1210 to another electronic device, or output to memory 1220 for further processing. Audio circuitry 1260 may also include an earphone jack to facilitate communication between external headphones and electronic device 1200.

[0296] The short-range wireless transmission module 1270 can be a WIFI (wireless fidelity) module, Bluetooth module, or infrared module, etc. The electronic device 1200 can transmit information with wireless transmission modules on other devices via the short-range wireless transmission module 1270.

[0297] The processor 1280 is the control center of the electronic device 1200. It connects various parts of the device via various interfaces and lines, and performs various functions and processes data of the electronic device 1200 by running or executing software programs or modules stored in the memory 1220 and calling data stored in the memory 1220, thereby providing overall control of the device. Optionally, the processor 1280 may include one or more processing cores; optionally, the processor 1280 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and application programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 1280.

[0298] Electronic device 1200 also includes a power supply 1290 (such as a battery) for supplying power to various components. Optionally, the power supply 1290 can be logically connected to the processor 1280 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 1290 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0299] Although not shown, the electronic device 1200 may also include a camera, Bluetooth module, etc., which will not be described in detail here.

[0300] This application also discloses a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to implement, for example... Figure 6 The data transmission method embodiment shown.

[0301] Understandable, Figure 6 The content of the data transmission method embodiments shown is applicable to the embodiments of this computer-readable storage medium. The specific functions implemented by the embodiments of this computer-readable storage medium are the same as those shown in the embodiments. Figure 6 The data transmission method shown in the embodiment is the same, and the beneficial effects achieved are the same. Figure 6 The beneficial effects achieved by the data transmission method embodiments shown are also the same.

[0302] This application also discloses a computer program product or computer program, which includes computer instructions stored in the aforementioned computer-readable storage medium. Figure 12 The processor of the illustrated electronic device can read the computer instructions from the aforementioned computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform... Figure 6 The data transmission method embodiment shown.

[0303] Understandable, Figure 6 The content of the data transmission method embodiments shown is applicable to this computer program product or computer program embodiment, and the specific functions implemented by this computer program product or computer program embodiment are the same as those shown. Figure 6 The data transmission method shown in the embodiment is the same, and the beneficial effects achieved are the same. Figure 6 The beneficial effects achieved by the data transmission method embodiments shown are also the same.

[0304] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0305] Furthermore, although this application is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding this application. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional technology for an engineer. Therefore, those skilled in the art can implement the application set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of this application, which is determined by the full scope of the appended claims and their equivalents.

[0306] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0307] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0308] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0309] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0310] In the foregoing description of this specification, the references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0311] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

[0312] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A data transmission method, characterized by, Applied to the server side, the method includes: Receive a request message sent by the client, the request message being used to obtain specified target data; Based on the request message, the target data is queried in the local cache of the server to determine the cache status parameter corresponding to the target data; wherein, the cache status parameter is used to indicate whether the target data is cached locally on the server or the target data is not cached locally on the server. Based on the request message, determine the data volume of the target data, and based on the data volume, determine the business requirement parameters corresponding to the target data; Based on the cache status parameters and the service requirement parameters, the target transmission parameters corresponding to the target data are determined; wherein, the target transmission parameters include transmission window parameters and transmission rate parameters; The target data is transmitted to the client according to the target transmission parameters.

2. The data transmission method of claim 1, wherein, The step of querying the target data in the server's local cache according to the request message and determining the cache status parameters corresponding to the target data includes: The request message is parsed to extract the data resource identifier from the request message; Based on the data resource identifier, the target data is queried in the local cache of the server to determine the cache status parameters corresponding to the target data.

3. The data transmission method of claim 2, wherein, The data resource identifier includes a target data identifier and a target data range corresponding to the target data; the step of querying the target data in the local cache of the server based on the data resource identifier to determine the cache status parameters corresponding to the target data includes: Obtain the cache information table recorded by the server; wherein, the cache information table includes the cache data identifier and cache data range corresponding to each cached data locally on the server; Detect a first data identifier in the cached data identifier; wherein the first data identifier is a cached data identifier that matches the target data identifier; If the first data identifier is not present in the cached data identifier, the cache status parameter corresponding to the target data is determined as the first parameter value; wherein, the first parameter value is used to indicate that the target data is not cached locally on the server.

4. The data transmission method of claim 3, wherein, The step of querying the target data in the local cache of the server based on the data resource identifier and determining the cache status parameters corresponding to the target data further includes: If the first data identifier exists in the cached data identifier, compare the first data range with the target data range; wherein, the first data range is the cached data range corresponding to the first data identifier; If none of the first data ranges contain the target data range, the cache state parameter corresponding to the target data is determined as the first parameter value; If any of the first data ranges contains the target data range, the cache status parameter corresponding to the target data is determined as the second parameter value; wherein, the second parameter value is used to indicate that the target data is cached locally on the server side.

5. The data transmission method of claim 3, wherein, Determining the data volume of the target data based on the request message includes: Based on the target data range, determine the start byte sequence number and end byte sequence number of the target data; Calculate the difference between the end byte sequence number and the start byte sequence number, and determine the data volume of the target data based on the difference.

6. The data transmission method of claim 1, wherein, The business requirement parameters are used to characterize the type of business requirement corresponding to the target data, and the type of business requirement includes small file transfer and large file transfer; determining the business requirement parameters corresponding to the target data based on the data volume includes: Compare the data volume with a preset data volume threshold; If the data volume is less than or equal to the data volume threshold, the business requirement parameter is determined as the third parameter value; wherein, the third parameter value is used to characterize the type of business requirement corresponding to the target data as small file transfer; If the data volume is greater than the data volume threshold, the business requirement parameter is determined as the fourth parameter value; wherein, the fourth parameter value is used to characterize the type of business requirement corresponding to the target data as large file transfer.

7. The data transmission method of claim 1, wherein, The step of transmitting the target data to the client according to the target transmission parameters includes: If the cache status parameter is the first parameter value, the target data is obtained by returning to the origin service; According to the target transmission parameters, the target data is transmitted to the client, and the target data is cached locally on the server.

8. The data transmission method of claim 1, wherein, The step of determining the target transmission parameters corresponding to the target data based on the cache state parameters and the service requirement parameters includes: If the business requirement parameter is the fourth parameter value, the preset transmission window parameter and transmission rate parameter are obtained according to the cache status parameter and used as the target transmission parameter corresponding to the target data; If the business requirement parameter is a third parameter value, obtain the preset window gain value and rate gain value according to the cache status parameter, and determine the target transmission parameter corresponding to the target data according to the window gain value and the rate gain value; The fourth parameter value is used to characterize the type of business requirement corresponding to the target data as large file transfer, and the third parameter value is used to characterize the type of business requirement corresponding to the target data as small file transfer.

9. The data transmission method according to claim 8, characterized in that, The step of obtaining preset transmission window parameters and transmission rate parameters based on the cache state parameters, as the target transmission parameters corresponding to the target data, includes: If the cache status parameter is the first parameter value, obtain the preset first transmission window parameter and first transmission rate parameter as the target transmission parameter corresponding to the target data; If the cache status parameter is the second parameter value, obtain the preset second transmission window parameter and second transmission rate parameter as the target transmission parameter corresponding to the target data; Wherein, the first parameter value is used to indicate that the target data is not cached locally on the server side, and the second parameter value is used to indicate that the target data is cached locally on the server side; the first transmission window parameter is smaller than the second transmission window parameter and the first transmission rate parameter is smaller than the second transmission rate parameter.

10. The data transmission method of claim 8, wherein, Determining the target transmission parameters corresponding to the target data based on the window gain value and the rate gain value includes: Detect the minimum latency and maximum available bandwidth of the communication network between the client and the client; The third transmission window parameters corresponding to the target data are determined based on the product of the window gain value, the minimum delay, and the maximum available bandwidth. The third transmission rate parameter corresponding to the target data is determined based on the product of the rate gain value and the maximum available bandwidth.

11. The data transmission method of claim 10, wherein, The method further includes: If the cache status parameter is the first parameter value, the target data is obtained through the origin service, and the origin transmission rate parameter when obtaining the target data is determined; The smaller of the two values ​​is determined as the new maximum available bandwidth, by comparing the back-to-source transmission rate parameter and the maximum available bandwidth.

12. A data transmission apparatus, characterized by comprising: Applied to the server side, the device includes: A receiving unit is used to receive a request message sent by a client, the request message being used to obtain specified target data; A query unit is configured to query the target data in the local cache of the server based on the request message, and determine the cache status parameter corresponding to the target data; wherein, the cache status parameter is used to indicate whether the target data is cached locally on the server or whether the target data is not cached locally on the server. The processing unit is configured to determine the data volume of the target data based on the request message, and determine the business requirement parameters corresponding to the target data based on the data volume; The integration unit is used to determine the target transmission parameters corresponding to the target data based on the cache status parameters and the service requirement parameters; wherein, the target transmission parameters include transmission window parameters and transmission rate parameters; An execution unit is configured to transmit the target data to the client according to the target transmission parameters.

13. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the data transmission method according to any one of claims 1 to 11.

14. A computer readable storage medium, the storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the data transmission method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data transmission method according to any one of claims 1 to 11.