Data caching method and apparatus, computer device, and storage medium

By detecting terminal device performance and initiating collaborative caching requests and caching server data, it solves the problems of packet loss and excessive communication resource consumption caused by poor device performance, and improves communication fluency and response speed.

WO2024187966A1PCT designated stage expired Publication Date: 2024-09-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/073685
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-10
Filing Date
2024-01-23
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

In communication technology, terminals with poor equipment performance can easily lead to data packet loss and excessive consumption of communication resources, affecting communication fluency and response speed.

Method used

By detecting the device performance indicators of the terminal, it determines whether it meets the preset conditions for collaborative caching, and when the conditions are met, it sends a collaborative caching request to the network collaboration node to assist in caching the data sent by the server, thereby reducing packet loss and retransmission rates.

Benefits of technology

It effectively reduces the packet loss and data retransmission rate caused by poor equipment performance, reduces the processing load of the terminal, improves the business experience, and improves communication fluency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024073685_19092024_PF_FP_ABST
    Figure CN2024073685_19092024_PF_FP_ABST
Patent Text Reader

Abstract

A data caching method, executed by a terminal and comprising: acquiring a measurement result for a device performance index of the terminal (201); analyzing the measurement result to determine whether the measurement result satisfies a preset condition for initiating collaborative caching (203); in response to the measurement result satisfying the preset condition, determining a network collaboration node through which data transmitted between the terminal and a server needs to pass, and generating a collaborative caching request (205); sending the collaborative caching request to the network collaboration node, the collaborative caching request being used for instructing the network collaboration node to cache target traffic data, and the target traffic data comprising traffic data, which is indicated by the collaborative caching request, in data sent by the server to the terminal (207); in response to the network data caching capacity of the terminal satisfying a preset storage condition, sending a data acquisition request to the network collaboration node (209); and receiving cached target traffic data sent by the network collaboration node in response to the data acquisition request (211).
Need to check novelty before this filing date? Find Prior Art

Description

Data caching method, device, computer equipment and storage medium

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 2023102587480, filed on March 10, 2023, entitled “Data Caching Method, Apparatus, Computer Equipment and Storage Medium,” the entire text of which is incorporated herein by reference. Technical Field

[0003] The present application relates to the field of communication technology, and in particular to a data caching method, apparatus, computer equipment, storage medium, and computer program product. Background Art

[0004] With the development of communication technology, the speed of data transmission is getting faster and faster, so that the terminal can quickly obtain the data requested by the user from the server, which greatly optimizes the timeliness of response and the smoothness of communication.

[0005] In traditional technology, the server sends the data requested by the user to the terminal, which processes the received data accordingly and presents it to the user. However, the device performance of the terminal varies. For terminals with poor device performance, the above method will cause serious packet loss, increase the data packet retransmission rate, and consume a lot of communication resources.

[0006] Summary of the Invention

[0007] Based on this, it is necessary to provide a data caching method, apparatus, computer equipment, computer-readable storage medium and computer program product that can reduce packet loss in response to the above technical problems.

[0008] In a first aspect, the present application provides a data caching method, executed by a terminal, the method comprising:

[0009] Obtaining a test result of a device performance indicator for the terminal;

[0010] Analyzing the detection result to determine whether the detection result meets the preset conditions for initiating collaborative caching;

[0011] In response to the detection result meeting the preset condition, determining a network cooperation node through which data needs to be transmitted between the terminal and the server, and generating a cooperation cache request;

[0012] Sending the collaborative cache request to the network collaboration node, where the collaborative cache request is used to instruct the network collaboration node to cache target traffic data, where the target traffic data includes traffic data indicated by the collaborative cache request in the data sent by the server to the terminal;

[0013] In response to the network data cache capacity of the terminal meeting a preset storage condition, sending a data acquisition request to the network cooperation node;

[0014] The cached target traffic data is received, which is sent by the network cooperation node in response to the data acquisition request.

[0015] In a second aspect, the present application provides a data caching device, comprising:

[0016] A detection module, configured to obtain a detection result of a device performance indicator of the terminal; and analyze the detection result to determine whether the detection result meets a preset condition for initiating collaborative caching;

[0017] A transmission module is used to determine, in response to the detection result meeting the preset conditions, a network collaboration node through which data needs to be transmitted between the terminal and the server, and generate a collaborative cache request; send the collaborative cache request to the network collaboration node, wherein the collaborative cache request is used to instruct the network collaboration node to cache target traffic data, wherein the target traffic data includes the traffic data indicated by the collaborative cache request in the data sent by the server to the terminal; send a data acquisition request to the network collaboration node in response to the network data cache capacity of the terminal meeting the preset storage conditions; and receive the cached target traffic data sent by the network collaboration node in response to the data acquisition request.

[0018] In a third aspect, the present application provides a data caching method, which is performed by a network collaboration node, wherein the network collaboration node is an intermediate node through which data needs to be transmitted between a terminal and a server, and the method includes:

[0019] Receiving a collaborative caching request sent by a terminal, where the collaborative caching request is generated by the terminal when a detection result of a performance indicator of the terminal's own device meets a preset condition for initiating collaborative caching; and

[0020] caching target traffic data, the target traffic data comprising: traffic data indicated by the collaborative cache request in the data sent by the server to the terminal;

[0021] When receiving a data acquisition request sent by the terminal, the cached traffic data is sent to the terminal. The data acquisition request is sent by the terminal when the network data cache capacity of the terminal meets the preset storage condition.

[0022] In a fourth aspect, the present application further provides a data caching device, comprising:

[0023] An interface module, configured to receive a collaborative caching request sent by a terminal, wherein the collaborative caching request is generated by the terminal when a detection result of a performance indicator of the terminal's own device meets a preset condition for initiating collaborative caching;

[0024] a cache module, configured to cache target traffic data, the target traffic data comprising: traffic data indicated by the collaborative cache request in the data sent by the server to the terminal;

[0025] The interface module is also used to send the cached target traffic data to the terminal when receiving a data acquisition request sent by the terminal. The data acquisition request is sent by the terminal when the network data cache capacity of the terminal meets the preset storage conditions.

[0026] In a fifth aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the above method when executing the computer-readable instructions.

[0027] In a sixth aspect, the present application further provides a computer-readable storage medium having computer-readable instructions stored thereon, which implement the above-mentioned solution when executed by a processor.

[0028] In a seventh aspect, the present application further provides a computer program product, comprising computer-readable instructions, which implement the above method when executed by a processor.

[0029] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.

[0031] FIG1 is a diagram illustrating an application environment of a data caching method according to an embodiment;

[0032] FIG2 is a schematic diagram of a flow chart of a data caching method in one embodiment;

[0033] FIG3 is a schematic flow chart of a data caching method in another embodiment;

[0034] FIG4 is a schematic diagram of storing data into a first data cache queue in one embodiment;

[0035] FIG5 is a schematic diagram of storing data into a second data cache queue in one embodiment;

[0036] FIG6 is a schematic diagram of a network collaboration node sending data to a terminal in one embodiment;

[0037] FIG7 is a schematic flow chart of a data caching method in another embodiment;

[0038] FIG8 is a schematic flow chart of a data caching method in another embodiment;

[0039] FIG9 is a block diagram of a data cache device according to an embodiment;

[0040] FIG10 is a block diagram of a data cache device according to another embodiment;

[0041] FIG11 is a diagram showing the internal structure of a computer device in one embodiment.

[0042] FIG12 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0044] The data caching method provided in the embodiments of the present application can be applied in the application environment shown in Figure 1 . Terminal 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process. The data storage system can be integrated with server 104, or it can be located in the cloud or on another server. At least one network node is located between terminal 102 and server 104. Terminal 102 transmits data to server 104 via forwarding by at least one network node. Server 104 transmits data to terminal 102 via forwarding by at least one network node. For example, as shown in Figure 1 , network nodes 1, 2, and 3 are deployed in sequence from terminal 102 to server 104. Data transmitted from terminal 102 to server 104 passes through network nodes 1, 2, and 3 in sequence, ultimately reaching server 104. Data transmitted from server 104 to terminal 102 passes through network nodes 3, 2, and 1 in sequence, ultimately reaching terminal 102. Any of the at least one network node can be used as a network collaboration node. For example, as shown in Figure 1, the previous hop node of terminal 102 can be used as a network cooperation node, that is, network node 1 can be used as a network cooperation node. Figure 1 only illustrates three network nodes, and the embodiment of the present application does not limit the number of network nodes.

[0045] Among them, the terminal 102 can detect its own device performance indicators, and when the detection results meet the preset conditions for initiating collaborative caching, it sends a collaborative caching request to the network collaborative node. After receiving the collaborative caching request, the network collaborative node caches the traffic data indicated by the collaborative caching request in the data sent by the server 104 to the terminal, and after receiving the data acquisition request sent by the terminal 102, it sends the cached traffic data to the terminal 102.

[0046] Terminal 102 may be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices may include smart watches, smart bracelets, head-mounted devices, etc. Terminal 102 may also be a camera with network communication capabilities, a printer, a microphone, a robotic arm in an industrial network, or various terminal devices in and within a car. Server 104 may be a standalone physical server, a server cluster or distributed system consisting 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 communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminals may be, but are not limited to, smartphones, tablets, laptops, desktop computers, smart speakers, smart watches, etc. Terminals and servers may be connected directly or indirectly via wired or wireless communication, which is not limited in this application. The network node can be, but is not limited to, a home router, a home switch, a home firewall, a router in an operator network, a switch in an operator network, a firewall in an operator network, a server in an operator network, or other network devices with network storage and forwarding functions.

[0047] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to enable data computing, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool that can be used on demand with flexibility and convenience. Cloud computing technology will become a crucial support. Backend services for technical network systems, such as video websites, image websites, and more portals, require extensive computing and storage resources. With the rapid development and application of the internet industry, every item will likely have its own unique identification mark and will need to be transmitted to backend systems for logical processing. Data of different levels will be processed separately, and data from all industries will require a strong system backend, which can only be achieved through cloud computing.

[0048] Cloud storage can be used to store data requested by users. Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) is a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (also known as storage nodes) on a network through application software or application interfaces to work together and provide data storage and service access. Currently, storage systems use the following storage method: creating logical volumes. When creating a logical volume, physical storage space is allocated for each logical volume. This physical storage space may consist of disks on a single storage device or several storage devices. When a client stores data on a logical volume, it stores the data on a file system. The file system divides the data into multiple parts, each of which is an object. An object contains not only the data but also additional information such as the data identifier (ID). The file system writes each object to the physical storage space of the logical volume and records the storage location information of each object. When a client requests access to data, the file system can provide access to the data based on the storage location information of each object. The storage system allocates physical storage space to logical volumes by pre-dividing the physical storage space into stripes based on the estimated capacity of the objects to be stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the Redundant Array of Independent Disks (RAID) groupings. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0049] In some embodiments, as shown in FIG2 , a data caching method is provided, which is described by taking the method applied to the terminal in FIG1 as an example, including the following steps:

[0050] Step 201: Obtain a test result of a device performance indicator of a terminal.

[0051] Step 203: Analyze the detection result to determine whether the detection result meets the preset conditions for initiating collaborative caching.

[0052] Step 205 : In response to the detection result meeting the preset condition, determining the network cooperation node through which the data needs to be transmitted between the terminal and the server, and generating a cooperation cache request.

[0053] Step 207: Send a collaborative cache request to the network collaboration node. The collaborative cache request is used to instruct the network collaboration node to cache target traffic data. The target traffic data includes traffic data indicated by the collaborative cache request in the data sent by the server to the terminal.

[0054] Step 209 : In response to the network data cache capacity of the terminal meeting the preset storage condition, a data acquisition request is sent to the network cooperation node.

[0055] Step 211: Receive cached target traffic data sent by the network cooperation node in response to a data acquisition request.

[0056] The terminal can detect the device performance indicators of the terminal and obtain the detection results. When the detection results meet the preset conditions for initiating collaborative caching, a collaborative caching request is generated based on the detection results.

[0057] The terminal device performance indicator may be information that can reflect device performance, and may include at least one of the terminal's device configuration or terminal performance. The terminal device configuration may include at least one of the processor model, memory configuration, or storage configuration used by the terminal. The terminal performance may include at least one of processor utilization, remaining memory, or remaining storage space.

[0058] In some embodiments, the device performance indicator of the terminal may be tested to obtain a test result. When the detected device performance indicator indicates that the terminal performance is poor, it is determined that the test result meets the preset conditions for initiating collaborative caching, and a collaborative caching request is generated.

[0059] The detection of equipment performance indicators can be real-time detection, regular detection, periodic detection, or detection according to preset detection rules. The embodiments of the present application are not limited to this. Regular detection can refer to detection at a specific date or time point, and periodic detection refers to detection at regular intervals. Preset detection rules refer to detection according to pre-set rules in addition to regular and periodic detection, for example, detection is performed when certain specified events occur, such as when the terminal load reaches a preset load level.

[0060] A device performance threshold for a device performance indicator may be pre-determined, and a performance range corresponding to poor performance may be determined based on the performance threshold. When the detected device performance indicator is within the performance range corresponding to poor performance, the terminal is determined to have poor performance, and the detection result is determined to meet the preset conditions for initiating collaborative caching, and a collaborative caching request is further generated based on the detection result.

[0061] Exemplarily, when the device performance indicator of the terminal is the device configuration of the terminal, and the device configuration of the terminal includes the processor model, memory configuration and storage configuration used by the terminal, the processor model used by the terminal is compared with the preset model, the memory configuration of the terminal is compared with the preset memory configuration, and the storage configuration of the terminal is compared with the preset storage configuration. If the processor model used by the terminal is worse than the preset model, or the memory configuration of the terminal is worse than the preset memory configuration, or the storage configuration of the terminal is worse than the preset storage configuration, it is determined that the performance of the terminal is poor.

[0062] Exemplarily, when the device performance indicator of the terminal is the performance of the terminal, and the performance of the terminal includes processor utilization, remaining memory, and remaining storage space, the detection result of the processor utilization of the terminal is compared with a preset utilization threshold, the remaining memory of the terminal is compared with a preset memory threshold, and the remaining storage space of the terminal is compared with a preset space threshold. If the processor utilization of the terminal is greater than the preset utilization threshold, or the remaining memory of the terminal is less than the preset memory threshold, or the remaining storage space of the terminal is less than the preset space threshold, it is determined that the performance of the terminal is poor.

[0063] In some embodiments, when the detection result meets the preset conditions for initiating collaborative caching, the collaborative caching type may be determined based on the detection result; and a collaborative caching request may be generated based on the collaborative caching type.

[0064] Among them, when the performance of the terminal is poor, the terminal may be operating at a high load or an overload. When the detection result indicates that the terminal is operating at an overload, the full flow cache is used as the collaborative cache type, and a collaborative cache request is generated based on the collaborative cache type field value corresponding to the full flow cache and the network configuration information of the terminal. When the detection result indicates that the terminal is operating at a high load, the partial flow cache is used as the collaborative cache type, and the flow identifier of the media data currently being processed by the terminal is obtained; based on the collaborative cache type field value corresponding to the partial flow cache, the flow identifier, and the network configuration information of the terminal, a collaborative cache request is generated.

[0065] The network configuration information of the terminal may include an Internet Protocol address (IP address) and may also include a port number, etc. This embodiment of the present application does not limit this.

[0066] The network collaboration node is an intermediate node through which data must be transmitted between the terminal and the server. The target traffic data includes traffic data indicated by the collaborative cache request within the data sent by the server to the terminal. The traffic data cached by the network collaboration node is used to send the cached traffic data to the terminal after the network collaboration node receives a data retrieval request from the terminal. The data retrieval request is sent by the terminal when it detects that the terminal's network data cache capacity meets a preset storage condition.

[0067] Network collaboration nodes can be pre-configured, and the terminal can determine the network collaboration nodes through which data transmission between the terminal and the server must pass based on this pre-configured information. Network collaboration nodes can be selected from multiple network collaboration nodes, and can be selected randomly, based on the lowest load, the fastest network speed, or based on other selection criteria. Traffic data is the data collected by a terminal through a specific communication network. This specific communication network can count the amount of data communicated by the terminal through the network and impose constraints on this amount, such as limiting the total amount of data communicated through the specific communication network. The operator of the specific communication network can also charge fees based on the amount of data actually used by the terminal user through the specific communication network.

[0068] After generating a collaborative caching request, the terminal sends it to the network collaboration node. After receiving the collaborative caching request, the network collaboration node detects its own device performance indicators and determines whether to participate in the collaborative caching initiated by the terminal based on the detection results.

[0069] If it is determined that the terminal participates in the collaborative caching initiated by the terminal, a collaborative request confirmation message is generated based on the field value corresponding to the participation in the collaborative caching and sent to the terminal. If it is determined that the terminal refuses to participate in the collaborative caching initiated by the terminal, a collaborative request confirmation message is generated based on the field value corresponding to the refusal to participate in the collaborative caching and sent to the terminal.

[0070] A performance threshold corresponding to whether to participate in collaborative caching can be pre-set, and based on this performance threshold, a performance range within which a network collaborative node can participate in collaborative caching and a performance range within which it cannot participate are determined. When the device performance indicator of the network collaborative node is within the performance range within which it can participate in collaborative caching, the node is determined to participate in collaborative caching initiated by the terminal. When the device performance indicator of the network collaborative node is within the performance range within which it cannot participate in collaborative caching, the node is determined to refuse to participate in collaborative caching initiated by the terminal.

[0071] When the network cooperation node determines to participate in the cooperative caching initiated by the terminal, it can store the information carried in the cooperative caching request as a set of data locally and create a corresponding data cache queue for the cooperative caching request.

[0072] In some embodiments, when the collaborative cache request carries the collaborative cache type field value corresponding to the full traffic cache and the network configuration information of the terminal, a corresponding data cache queue is created for the network configuration information of the terminal.

[0073] In some embodiments, when the collaborative cache request carries the collaborative cache type field value corresponding to the partial traffic cache, the traffic identifier, and the network configuration information of the terminal, a corresponding data cache queue is created for the traffic identifier.

[0074] In some embodiments, after the network collaboration node receives the pending traffic message from the server, it extracts the destination address in the pending traffic message and matches the IP address in each set of locally stored data with the destination address. If the match is successful, it is determined that the terminal corresponding to the target address has initiated collaborative caching. If the match fails, it is determined that the terminal corresponding to the target address has not initiated collaborative caching, and the pending traffic message is directly forwarded to the terminal.

[0075] Among them, when the terminal corresponding to the target address of the network collaboration node initiates collaborative caching, the traffic data in the traffic message to be processed is used as the target traffic data, and the collaborative cache type is searched in a group of successfully matched data, and the target traffic data is cached based on the found collaborative cache type.

[0076] In some embodiments, when the collaborative cache type found is a full traffic cache, the target traffic data is cached in a first data cache queue, which is a queue created by the network collaboration node for the network configuration information in the group of data. When the collaborative cache type found is a partial traffic cache, a traffic identifier to be matched is determined based on the network configuration information in the traffic message to be processed. If the traffic identifier to be matched matches the traffic identifier in the group of data, the target traffic data is cached in a second data cache queue, which is a queue created by the network collaboration node for the traffic identifier in the group of data.

[0077] The network data cache capacity is the available space on the terminal that can be used to cache network data. The preset storage conditions are the preset conditions that the network data cache capacity must meet. Specifically, they may be the preset conditions that the network data cache capacity must meet for caching traffic data when the terminal is able to process traffic data in normal operation.

[0078] The terminal can detect its own network data cache capacity in real time. When it detects that its own network data cache capacity meets the preset storage conditions, it determines the amount of traffic data to be obtained based on the network data cache capacity, generates a data acquisition request based on the data amount, and sends it to the network collaboration node.

[0079] In some embodiments, when the collaborative caching type is full-flow caching, the terminal may generate a data acquisition request based on the terminal's network configuration information and the aforementioned data volume. When the collaborative caching type is partial-flow caching, the terminal may generate a data acquisition request based on the flow identifier in the collaborative caching request and the aforementioned data volume.

[0080] The data volume may be the number of data packets of the traffic data to be obtained, or the size of the space occupied by the traffic data to be obtained. For example, the data volume of the traffic data to be obtained may be 100 packets or 100 MB.

[0081] Among them, after receiving the data acquisition request, the network collaboration node can parse the data acquisition request, extract the traffic data that matches the data volume obtained by parsing from the target data cache queue, and send the extracted traffic data to the terminal, wherein the target data cache queue is a data cache queue created in advance for the collaborative cache request.

[0082] In the above embodiment, the terminal can detect its own device performance indicators, and when the detection result meets the preset conditions for initiating collaborative caching, it sends a collaborative caching request to the network collaborative node. After receiving the collaborative caching request, the network collaborative node caches the traffic data indicated by the collaborative caching request in the data sent by the server to the terminal, and after receiving the data acquisition request sent by the terminal, it sends the cached traffic data to the terminal. Terminals with poor device performance suffer from severe packet loss when receiving data returned from the server, causing the server to retransmit the lost data packets. The above-mentioned network collaborative node assists terminals with poor device performance in caching data, which can reduce packet loss caused by poor terminal device performance, reduce the server's data retransmission rate, and avoid problems such as freezing and screen distortion caused by excessive processing load on terminals with poor device performance.

[0083] In some embodiments, the device performance indicator includes: the device performance indicator includes: at least one of processor utilization or remaining memory, and the method further includes: when at least one of the first preset condition or the second preset condition is met, determining that the detection result meets the preset condition for initiating collaborative caching. The first preset condition is: the detection result of the processor utilization and the first preset utilization threshold have a first preset relationship, and the duration exceeds the first duration threshold. The second preset condition is: the detection result of the remaining memory and the first preset memory threshold have a second preset relationship, and the duration exceeds the second duration threshold.

[0084] The first preset utilization threshold can be flexibly set according to actual conditions. For example, the first preset utilization threshold can be set to 90%. The first preset relationship can be that the processor utilization is greater than or equal to the first preset utilization threshold. The first duration threshold can also be flexibly set according to actual conditions. The first duration threshold can be recorded in the terminal's instruction manual for the terminal owner to review. For example, the first duration threshold can be set to 5 seconds, 10 seconds, 30 seconds, 1 minute, 2 minutes, etc.

[0085] The first preset memory threshold can be flexibly set according to actual conditions. For example, the first preset memory threshold can be set to 2GB. The second preset relationship can be that the remaining memory is less than or equal to the first preset memory threshold. The second duration threshold can also be flexibly set according to actual conditions. The second duration threshold can also be recorded in the terminal's instruction manual for the terminal owner to review. For example, the second duration threshold can be set to 5s, 10s, 30s, 1 minute, 2 minutes, etc.

[0086] In some embodiments, when the duration that the processor utilization is greater than or equal to the first preset utilization threshold exceeds a first duration threshold, it indicates that the performance of the terminal is poor, and it can be determined that the detection result meets the preset conditions for initiating collaborative caching.

[0087] In some embodiments, when the remaining memory is less than or equal to a first preset memory threshold, it indicates that the terminal's performance is poor, and the detection result can be determined to meet the preset conditions for initiating collaborative caching. Alternatively, when the duration during which the remaining memory is less than or equal to the first preset memory threshold exceeds a second duration threshold, it indicates that the terminal's performance is poor, and the detection result can be determined to meet the preset conditions for initiating collaborative caching.

[0088] In some embodiments, when the duration that the processor utilization is greater than or equal to the first preset utilization threshold exceeds the first duration threshold, and the duration that the remaining memory is less than or equal to the first preset memory threshold exceeds the second duration threshold, it indicates that the performance of the terminal is poor, and it can be determined that the detection result meets the preset conditions for initiating collaborative caching.

[0089] In the above embodiment, when it is detected that the duration of the first preset relationship between the detection result of the processor utilization and the first preset utilization threshold exceeds the first duration threshold; and / or, when the duration of the second preset relationship between the remaining memory and the first preset memory threshold exceeds the second duration threshold, it is determined that the current performance of the terminal is poor and meets the preset conditions for initiating collaborative caching, so that the network collaboration node can collaborate with the terminal to cache data, avoiding problems such as freezes and screen distortion due to poor device performance.

[0090] In some embodiments, generating the collaborative cache request includes: determining a collaborative cache type based on the detection result; and generating the collaborative cache request based on the collaborative cache type.

[0091] In some embodiments, when the detection result meets the preset conditions for initiating collaborative caching, the load level of the terminal's processing load can be determined based on the detection result, the collaborative caching type can be determined based on the load level, and finally a collaborative caching request can be generated based on the collaborative caching type.

[0092] A load threshold may be pre-set, and a performance range corresponding to overload and a performance range corresponding to high load may be determined based on the load threshold. When the detected device performance indicator is within the performance range corresponding to overload, the terminal's processing load is determined to be overloaded; when the detected device performance indicator is within the performance range corresponding to high load, the terminal's processing load is determined to be high load.

[0093] Exemplarily, the pre-set load thresholds include a first load threshold set for processor utilization, a second load threshold set for remaining memory, and a third load threshold set for remaining storage space. The detection result of the terminal's processor utilization is compared with the first load threshold, the terminal's remaining memory is compared with the second load threshold, and the terminal's remaining storage space is compared with the third load threshold. When the terminal's processor utilization is greater than the first load threshold, and the terminal's remaining memory is less than the second load threshold, and the terminal's remaining storage space is less than the third load threshold, it is determined that the terminal's processing load is overloaded; when the terminal's processor utilization is greater than the first preset utilization threshold and less than the first load threshold, or the terminal's remaining memory is greater than the second load threshold and less than the first preset memory threshold, or the terminal's remaining storage space is greater than the third load threshold and less than the preset space threshold, it is determined that the terminal's processing load is high load.

[0094] In some embodiments, when it is determined that the processing load of the terminal is overloaded, the full flow cache is used as the collaborative cache type, and a collaborative cache request is generated based on the collaborative cache type field value corresponding to the full flow cache and the network configuration information of the terminal.

[0095] In some embodiments, when it is determined that the processing load of the terminal is under high load, part of the traffic cache is used as a collaborative cache type to obtain the traffic identifier of the media data currently being processed by the terminal; based on the collaborative cache type field value corresponding to the partial traffic cache, the traffic identifier and the network configuration information of the terminal, a collaborative cache request is generated.

[0096] In the above embodiment, the collaborative cache type is determined based on the detection result; and a collaborative cache request is generated based on the collaborative cache type. When the device performance of the terminal is very poor (overloaded), the network collaborative node can assist the terminal in caching all data to be received. When the device performance of the terminal is generally poor (high load), the network collaborative node can assist the terminal in caching part of the data to be received. The provision of a flexible caching mechanism allows the terminal to select the most suitable caching mechanism to cache its own data based on its own device performance, thereby improving the adaptability of the caching method and its own device performance, and improving the terminal's service experience problems such as freezes and screen distortion caused by poor device performance.

[0097] In some embodiments, generating a collaborative cache request based on the collaborative cache type includes: when the collaborative cache type is full flow cache, generating a collaborative cache request based on the collaborative cache type field value corresponding to the full flow cache and the network configuration information of the terminal.

[0098] The collaborative cache type field can occupy 2 bits, and the collaborative cache type field value corresponding to full-flow caching can be binary 00. The collaborative cache type field can be represented by Type_coll. That is, when the value of Type_coll is 00, it indicates that the collaborative cache type is full-flow caching. Full-flow caching can be understood as the terminal requesting the network assistance node to assist the terminal in caching all data to be received.

[0099] The network configuration information of the terminal may include the IP address of the terminal and may also include a port number, etc. This embodiment of the present application does not limit this.

[0100] In some embodiments, the collaborative cache request may be expressed by the following formula: Pkt_coll={Type_coll, Info_client}

[0101] Pkt_coll indicates a collaborative cache request, Type_coll indicates the collaborative cache type, and Info_client indicates the terminal's network configuration information. If the collaborative cache type is full traffic cache, the value of Type_coll is 00.

[0102] In the above embodiment, when the collaborative cache type is full-flow cache, a collaborative cache request is generated based on the collaborative cache type field value corresponding to full-flow cache and the terminal's network configuration information. The terminal can send this collaborative cache request to the network collaboration node. Based on this collaborative cache request, the network collaboration node can cache all data to be received by the terminal, thereby improving the terminal's service experience issues such as lag and screen distortion caused by poor device performance.

[0103] In some embodiments, the data caching method provided by the embodiments of the present application also includes: when it is detected that the network data cache capacity of the terminal meets the preset storage conditions, determining the data volume of the traffic data to be obtained based on the network data cache capacity; generating a data acquisition request based on the network configuration information and data volume of the terminal; sending the data acquisition request to the network collaboration node, the data acquisition request is used to instruct the network collaboration node to parse the received data acquisition request, search the data cache queue corresponding to the network configuration information obtained by the analysis, and extract the traffic data that matches the data volume obtained by the analysis from the found data cache queue; and receiving the traffic data returned by the network collaboration node.

[0104] The conditions for triggering the terminal to obtain data from the network cooperation node may be preset. For example, the conditions may be preset storage conditions, which may include a storage space threshold.

[0105] The terminal can detect its own network data cache capacity. When the network data cache capacity is greater than the aforementioned storage space threshold, it is determined that the network data cache capacity meets the preset storage condition. The terminal can detect the network data cache capacity in real time, regularly, periodically, or according to preset detection rules. This is not limited in the present embodiment.

[0106] The data volume of the traffic data to be obtained may be the number of data packets of the traffic data to be obtained, or may be the size of the space occupied by the traffic data to be obtained.

[0107] In some embodiments, the terminal can determine the size of the available cache space based on the network data cache capacity, and based on the size of the available cache space, determine the number of data packets that can be placed in the available cache space, and use this number as the amount of traffic data to be obtained.

[0108] In some embodiments, the terminal may determine the size of the available cache space based on the network data cache capacity, and use the size of the available cache space as the data volume of the traffic data to be obtained.

[0109] Among them, the data acquisition request carries the network configuration information and data volume of the terminal. The network collaboration node parses the received data acquisition request, searches for the data cache queue corresponding to the parsed network configuration information, extracts the traffic data that matches the parsed data volume from the found data cache queue, and sends the extracted traffic data to the terminal.

[0110] In some embodiments, when the amount of data carried in the data acquisition request is the number of data packets, the network cooperation node extracts traffic data matching the number of data packets from the found data cache queue; and sends the extracted traffic data to the terminal.

[0111] For example, the amount of data carried in the data acquisition request is 100. The network collaboration node extracts 100 data packets from the found data cache queue and sends the extracted traffic data to the terminal.

[0112] In some embodiments, when the amount of data carried in the data acquisition request is the size of the occupied space, the network cooperation node extracts traffic data matching the size of the occupied space from the found data cache queue; and sends the extracted traffic data to the terminal.

[0113] Exemplarily, the data acquisition request carries 100 MB of data. The network collaboration node extracts 100 MB of traffic data from the found data cache queue and sends the extracted traffic data to the terminal.

[0114] In the above embodiment, when the collaborative cache type is full traffic cache, after the terminal sends a collaborative cache request to the network collaboration node, it detects its own network data cache capacity. When the network data cache capacity meets the preset storage condition, it determines the amount of traffic data to be acquired based on the network data cache capacity and generates a data acquisition request based on the terminal's network configuration information and the data volume. The data acquisition request is then sent to the network collaboration node. After receiving the data acquisition request, the network collaboration node parses the received data acquisition request, searches for the data cache queue corresponding to the parsed network configuration information, extracts traffic data that matches the parsed data volume from the found data cache queue, and sends the extracted traffic data to the terminal. This allows the network collaboration node to assist the terminal in caching all data to be received when the terminal's device performance is very poor. When the terminal's network data cache capacity can accommodate new traffic data, it requests the network collaboration node to send data, alleviating the terminal's processing pressure and improving service experience issues such as lag, screen distortion, and mosaics.

[0115] In some embodiments, the data caching method provided by the embodiments of the present application also includes: when it is detected that the device performance indicators of the terminal meet the conditions for canceling the collaborative cache, generating a collaborative cancellation request based on the collaborative cache type field value corresponding to the cancellation of the collaborative cache and the network configuration information of the terminal; sending the collaborative cancellation request to the network collaborative node, the collaborative cancellation request is used to instruct the network collaborative node to parse the received collaborative cancellation request and delete the data cache queue corresponding to the network configuration information obtained by the parsing; receiving the collaborative cache cancellation message sent by the network collaborative node.

[0116] Among them, a corresponding device performance threshold can be set in advance for the scenario of canceling collaborative caching, and the device performance range can be determined based on the device performance threshold. When the detected device performance indicator is within the device performance range, it is determined that the device performance indicator meets the conditions for canceling collaborative caching. Alternatively, when the terminal detects that the media data currently being processed is closed, it can also be determined that the device performance indicator meets the conditions for canceling collaborative caching. For example, if the terminal is currently playing a video and the viewer closes the video, it can be determined that the device performance indicator meets the conditions for canceling collaborative caching.

[0117] The collaborative cache type field value corresponding to canceling the collaborative cache may be 11. The network configuration information of the terminal may include the IP address of the terminal and may also include a port number and the like.

[0118] In some embodiments, the collaboration cancellation request may be expressed by the following formula: Pkt_coll_cancle={Type_coll, Info_client}

[0119] Pkt_coll indicates a collaboration cancellation request, Type_coll indicates the collaboration cache type, Info_client indicates the network configuration information of the terminal, and the collaboration cache type field value can be 11.

[0120] In some embodiments, after receiving the cooperation cancellation request, the network cooperation node parses the received cooperation cancellation request, searches for the data cache queue corresponding to the network configuration information obtained by the parsing, and deletes the data cache queue.

[0121] In some embodiments, after deleting the data cache queue, the network collaboration node may send a collaboration cache cancellation message to the terminal, and the network collaboration node will no longer cache traffic data for the terminal. The collaboration cache cancellation message may be represented by Pkt_coll_cancle_ack.

[0122] In the above embodiment, when a terminal detects that device performance indicators meet the conditions for canceling collaborative caching, it generates a collaborative cancellation request based on the collaborative cache type field value corresponding to the cancellation and the terminal's network configuration information. The request is then sent to the network collaboration node, which parses the received request and deletes the data cache queue corresponding to the parsed network configuration information. Subsequently, the network collaboration node will no longer cache traffic data for the terminal. This allows the terminal with improved device performance to exit the collaborative caching mechanism, reducing the cache pressure on the network collaboration node.

[0123] In some embodiments, a collaborative cache request is generated based on the collaborative cache type, including: when the collaborative cache type is partial traffic cache, obtaining the traffic identifier of the media data currently being processed by the terminal; generating a collaborative cache request based on the collaborative cache type field value corresponding to the partial traffic cache, the traffic identifier, and the network configuration information of the terminal.

[0124] The Collaborative Cache Type field can occupy 2 bits, and the Collaborative Cache Type field value corresponding to partial traffic caching can be binary 01. The Collaborative Cache Type field can be represented by Type_coll. That is, when the value of Type_coll is 01, the collaborative cache type is partial traffic caching. Partial traffic caching can be understood as the terminal requesting the network assistance node to assist the terminal in caching the media data currently being processed.

[0125] Among them, the media data currently being processed by the terminal can be text, pictures, videos, audio, etc., which is not limited in this embodiment of the present application. For the convenience of explanation, the media data currently being processed by the terminal is referred to as target media data.

[0126] In some embodiments, when the network protocol between the terminal and the server is the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP), the terminal can obtain the IP address of the terminal, the port number of the port on the terminal used to process the target media data, the IP address of the server, and the port number of the port on the server used to process the target media data; and generate a traffic identifier of the target media data based on the IP address of the terminal, the port number of the port on the terminal used to process the target media data, the IP address of the server, the port number of the port on the server used to process the target media data, and the network protocol between the terminal and the server.

[0127] In some embodiments, when the network protocol between the terminal and the server is quick UDP internet connection (QUIK), the flow identifier of the target media data can be determined based on the connection identifier for transmitting the target media data determined by negotiation between the terminal and the server.

[0128] In some embodiments, the collaborative cache request may be expressed by the following formula: Pkt_coll={Type_coll, flowID, Info_client}

[0129] Pkt_coll indicates a collaborative cache request, Type_coll indicates the collaborative cache type, flowID indicates the flow ID of the media data currently being processed by the terminal, and Info_client indicates the terminal's network configuration information. If the collaborative cache type is full flow cache, the value of Type_coll is 01.

[0130] In the above embodiment, when the collaborative cache type is partial traffic cache, the traffic identifier of the media data currently being processed by the terminal is obtained; based on the collaborative cache type field value corresponding to the partial traffic cache, the traffic identifier, and the terminal's network configuration information, a collaborative cache request is generated. The terminal can send this collaborative cache request to the network collaboration node, which can cache the traffic data corresponding to the traffic identifier carried in the collaborative cache request, thereby improving the terminal's service experience issues such as lag and screen distortion caused by poor device performance.

[0131] In some embodiments, obtaining the traffic identifier of the media data currently being processed by the terminal includes: obtaining the network configuration information of the terminal, the network configuration information of the server, and the network protocol for communication between the terminal and the server; splicing the network configuration information of the terminal, the network configuration information of the server, and the network protocol to obtain a splicing result; encrypting the splicing result, and using the encrypted result as the traffic identifier of the media data currently being processed by the terminal.

[0132] For ease of explanation, the media data currently being processed by the terminal is referred to as target media data. The terminal's network configuration information includes the terminal's IP address and the port number of the port on the terminal used to process the target media data. The server's network configuration information includes the server's IP address and the port number of the port on the server used to process the target media data.

[0133] The network protocol may be the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP), which is not limited in the embodiment of the present application.

[0134] A hash operation may be performed on the splicing result to encrypt the splicing result, and the hash operation result may be used as a flow identifier of the media data currently being processed by the terminal.

[0135] In some implementations, the flow ID of the target media data may be determined by the following formula: FlowID = Hash(src||dst||sport||dport||prot)

[0136] Where FlowID is the flow identifier of the target media data, src is the server's IP address, dst is the terminal's IP address, sport is the port number of the server's port used to process the target media data, dport is the port number of the terminal's port used to process the target media data, and prot is the network protocol between the terminal and the server. The symbol "||" indicates a string concatenation operation. src||dst||sport||dport||prot is the concatenation result of the terminal's network configuration information, the server's network configuration information, and the network protocol. The Hash() function represents a hash operation.

[0137] In the above embodiment, the terminal's network configuration information, the server's network configuration information, and the network protocol used for communication between the terminal and the server are obtained; the terminal's network configuration information, the server's network configuration information, and the network protocol are concatenated to obtain a concatenated result; the concatenated result is encrypted and used as a traffic identifier for the media data currently being processed by the terminal. This traffic identifier can be carried in a collaborative cache request and sent to the network collaboration node, allowing the network collaboration node to cache the traffic data corresponding to the traffic identifier, thereby improving the terminal's service experience, such as lag and screen distortion caused by poor device performance.

[0138] In some embodiments, obtaining the flow identifier of the media data currently being processed by the terminal includes: using the connection identifier negotiated and determined by the terminal and the server for transmitting the media data currently being processed by the terminal as the flow identifier of the media data currently being processed by the terminal.

[0139] After detecting a triggering operation for a piece of media data, the terminal can negotiate with the server to establish a connection for transmitting the media data. The server can then transmit the corresponding media data through this connection. The connection established between the terminal and the server corresponds to the media data one-to-one, and the connection identifier can be used to distinguish the media data.

[0140] In some embodiments, when the collaborative cache type is partial traffic cache, the connection identifier negotiated and determined by the terminal and the server for transmitting the media data currently being processed by the terminal can be queried, and the queried connection identifier can be used as the traffic identifier of the media data currently being processed by the terminal.

[0141] For example, the media data currently being processed by the terminal is video. When the collaborative cache type is partial traffic cache, the connection identifier for transmitting the video determined by negotiation between the terminal and the server can be queried, and the queried connection identifier can be used as the traffic identifier of the video.

[0142] In the above embodiment, the connection identifier negotiated and determined by the terminal and the server for transmitting the media data currently being processed by the terminal is used as the traffic identifier for the media data currently being processed by the terminal. This traffic identifier can be carried in a collaborative cache request sent to the network collaboration node, allowing the network collaboration node to cache the traffic data corresponding to the traffic identifier, thereby improving the terminal's service experience, such as lag and screen distortion caused by poor device performance.

[0143] In some embodiments, the data caching method provided by the embodiments of the present application also includes: when it is detected that the network data cache capacity of the terminal meets the preset storage conditions, determining the data volume of the traffic data to be obtained based on the network data cache capacity; generating a data acquisition request based on the traffic identifier and the data volume; sending the data acquisition request to the network collaboration node, the data acquisition request is used to instruct the network collaboration node to parse the received data acquisition request, search the data cache queue corresponding to the traffic identifier obtained by the analysis, and extract the traffic data that matches the data volume obtained by the analysis from the found data cache queue; and receiving the traffic data returned by the network collaboration node.

[0144] Similar to full-flow caching, a condition for triggering a terminal to obtain data from a network cooperation node can be pre-set. For example, the condition can be a preset storage condition, which can include a storage space threshold.

[0145] Similar to full-flow caching, the terminal can detect its own network data cache capacity. When the network data cache capacity exceeds the aforementioned storage space threshold, it determines that the network data cache capacity meets the preset storage condition. The terminal can detect the network data cache capacity in real time, periodically, periodically, or according to preset detection rules. This is not limited in the present embodiment.

[0146] Similar to the full traffic cache, the data volume of the traffic data to be obtained can be the number of data packets of the traffic data to be obtained, or the size of the space occupied by the traffic to be obtained.

[0147] In some embodiments, the terminal may determine the size of the available cache space based on the network data cache capacity, and based on the size of the available cache space, determine the number of data packets that can be placed in the available cache space, and use this number as the amount of traffic data to be acquired. Alternatively, the terminal may determine the size of the available cache space based on the network data cache capacity, and use the size of the available cache space as the amount of traffic data to be acquired.

[0148] The data acquisition request carries the terminal's network configuration information and data volume. The network collaboration node parses the received data acquisition request, searches the data cache queue corresponding to the resolved traffic identifier, extracts traffic data matching the resolved data volume from the found data cache queue, and sends the extracted traffic data to the terminal. The process by which the network collaboration node extracts data from the found data cache queue is similar to that of the full traffic cache and will not be further described in this embodiment of the present application.

[0149] In the above embodiment, when the collaborative cache type is partial traffic cache, after the terminal sends a collaborative cache request to the network collaboration node, it detects its own network data cache capacity. When the network data cache capacity meets the preset storage condition, it determines the amount of traffic data to be acquired based on the network data cache capacity, and generates a data acquisition request based on the traffic identifier and the data amount. The data acquisition request is then sent to the network collaboration node. After receiving the data acquisition request, the network collaboration node parses the received data acquisition request, searches for the data cache queue corresponding to the parsed traffic identifier, extracts traffic data matching the parsed data amount from the found data cache queue, and sends the extracted traffic data to the terminal. This allows the terminal to cache the data traffic corresponding to the currently processed media data when the terminal's device performance is generally poor. When the terminal's network data cache capacity can accommodate new traffic data, it requests the network collaboration node to send the corresponding data, thereby alleviating the terminal's processing pressure and improving service experience issues such as lag, screen distortion, and mosaics.

[0150] In some embodiments, the data caching method provided by the embodiments of the present application also includes: when it is detected that the device performance indicators of the terminal meet the conditions for canceling the collaborative cache, generating a collaborative cancellation request based on the type field value and traffic identifier corresponding to the cancellation of the collaborative cache; sending the collaborative cancellation request to the network collaborative node, the collaborative cancellation request is used to instruct the network collaborative node to parse the received collaborative cancellation request and delete the data cache queue corresponding to the traffic identifier obtained by the parsing; receiving the collaborative cache cancellation message sent by the network collaborative node.

[0151] Similar to full-flow caching, a corresponding device performance threshold can be set in advance for the scenario of canceling collaborative caching. The device performance range is determined based on the device performance threshold. When the detected device performance indicator is within the device performance range, it is determined that the device performance indicator meets the conditions for canceling collaborative caching. Alternatively, when the terminal detects that the media data currently being processed is closed, it can also be determined that the device performance indicator meets the conditions for canceling collaborative caching. For example, if the terminal is currently playing a video and the viewer closes the video, it can be determined that the device performance indicator meets the conditions for canceling collaborative caching.

[0152] In some embodiments, the collaboration cancellation request may be expressed by the following formula: Pkt_coll_cancle={Type_coll, FlowID, Info_client}

[0153] Pkt_coll indicates a collaboration cancellation request, Type_coll indicates the collaboration cache type, FlowID indicates the flow ID of the media data currently being processed by the terminal, Info_client indicates the network configuration information of the terminal, and the collaboration cache type field value can be 11.

[0154] In some embodiments, after receiving the cooperation cancellation request, the network cooperation node parses the received cooperation cancellation request, searches for a data cache queue corresponding to a traffic identifier obtained by parsing, and deletes the data cache queue.

[0155] In some embodiments, after deleting the data cache queue, the network collaboration node may send a collaboration cache cancellation message to the terminal, and the network collaboration node will no longer cache traffic data for the terminal. The collaboration cache cancellation message may be represented by Pkt_coll_cancle_ack.

[0156] In the above embodiment, when a terminal detects that its device performance indicators meet the conditions for canceling collaborative caching, it generates a collaborative cancellation request based on the collaborative cache type field value corresponding to the cancellation and the traffic identifier of the media data currently being processed by the terminal. The request is then sent to the network collaboration node, which parses the received collaborative cancellation request and deletes the data cache queue corresponding to the traffic identifier obtained by the parsing. Subsequently, the network collaboration node will no longer cache the corresponding traffic data for the terminal. This allows the terminal with improved device performance to exit the collaborative caching mechanism, reducing the cache pressure on the network collaboration node.

[0157] In some embodiments, after sending a collaborative caching request to the network collaboration node, the method also includes: receiving a collaborative request confirmation message sent by the network collaboration node, the collaborative request confirmation message is used to indicate whether the network collaboration node participates in collaborative caching, and the collaborative request confirmation message is generated by the network collaboration node based on its own device performance indicators.

[0158] After receiving the collaborative caching request sent by the terminal, the network collaboration node detects its own device performance indicators and determines whether to participate in the collaborative caching initiated by the terminal based on the detection results.

[0159] In some embodiments, if the network cooperation node determines to participate in the collaborative caching initiated by the terminal, it generates a collaboration request confirmation message based on the field value corresponding to participation in the collaborative caching and sends it to the terminal. If the network cooperation node determines to refuse to participate in the collaborative caching initiated by the terminal, it generates a collaboration request confirmation message based on the field value corresponding to refusal to participate in the collaborative caching and sends it to the terminal.

[0160] In which, a target field for indicating whether the network node participates in collaborative caching can be set in the collaborative request confirmation message. When the network collaborative node determines to participate in the collaborative caching initiated by the terminal, the value of the target field can be determined to be a first preset value. When the network collaborative node determines to refuse to participate in the collaborative caching initiated by the terminal, the value of the target field can be determined to be a second preset value.

[0161] Among them, the target field can be represented by Join_coll, the first preset value can be 1, and the second preset value can be 0, which is not limited in this embodiment of the present application.

[0162] After receiving the collaboration request confirmation message, the terminal may confirm whether the network collaboration node participates in the collaborative caching based on the target field in the collaboration request confirmation message.

[0163] In the above embodiment, after receiving the collaborative caching request sent by the terminal, the network collaborative node detects its own device performance indicators. If its own performance allows, it participates in the collaborative caching initiated by the terminal. If its own performance does not allow, it does not participate in the collaborative caching initiated by the terminal. This negotiation mechanism provides flexible selectivity for whether the network collaborative node participates in the collaborative caching, avoiding the problem of heavy processing load caused by the network collaborative node still participating in the collaborative caching when its own performance is poor.

[0164] In some embodiments, the device performance indicator includes at least one of processor utilization or remaining memory. The data caching method provided in embodiments of the present application further includes: when at least one of a third condition or a fourth condition is met, determining that the detection result meets the conditions for canceling collaborative caching. The third condition is: the detection result of processor utilization and a second preset utilization threshold satisfy a third preset relationship. The fourth condition is: the detection result of remaining memory and the second preset memory threshold satisfy a fourth preset relationship.

[0165] The second preset utilization threshold can be flexibly set according to actual conditions, and for example, the second preset utilization threshold can be set to 70%. The third preset relationship can be that the processor utilization is less than or equal to the second preset utilization threshold.

[0166] The second preset memory threshold can be flexibly set according to actual conditions. For example, the second preset memory threshold can be set to 1G. The fourth preset relationship can be that the remaining memory is greater than or equal to the second preset memory threshold.

[0167] In some embodiments, when the processor utilization is less than or equal to a second preset utilization threshold, it indicates that the performance of the terminal has improved, and it can be determined that the detection result meets the conditions for canceling the collaborative cache.

[0168] In some embodiments, when the remaining memory is greater than or equal to the second preset memory threshold, it indicates that the performance of the terminal has improved, and it can be determined that the detection result meets the conditions for canceling the collaborative cache.

[0169] In some embodiments, when the processor utilization is less than or equal to the second preset utilization threshold and the remaining memory is greater than or equal to the second preset memory threshold, it indicates that the performance of the terminal has improved, and it can be determined that the detection result meets the conditions for canceling the collaborative cache.

[0170] In the above embodiment, the detection result is determined to meet the conditions for canceling collaborative caching when a third preset relationship is satisfied between the processor utilization detection result and the second preset utilization threshold; and / or a fourth preset relationship is satisfied between the remaining memory and the second preset memory threshold. The terminal can send a collaborative cancellation request to the network collaboration node. Upon receiving the collaborative cancellation request, the network collaboration node can delete the corresponding data cache queue; subsequently, the network collaboration node will no longer cache the corresponding traffic data for the terminal. This allows the terminal with improved device performance to exit the collaborative caching mechanism, reducing the cache pressure on the network collaboration node.

[0171] In some embodiments, as shown in FIG3 , a data caching method is provided. This method is described using a network collaboration node as an example. The network collaboration node is an intermediate node through which data is transmitted between a terminal and a server. For example, the network collaboration node may be the previous hop node of the terminal, i.e., network node 1 in FIG1 . The data caching method includes the following steps:

[0172] Step 302: Receive a collaborative caching request sent by a terminal. The collaborative caching request is generated by the terminal when the detection result of the performance indicator of its own device meets the preset conditions for initiating collaborative caching.

[0173] Among them, the process of the terminal detecting its own device performance indicators, obtaining the detection results, generating a collaborative cache request, and sending a collaborative cache request from the terminal to the network collaborative node can be referred to the introduction of the above-mentioned embodiment, and the embodiments of this application will not be repeated here.

[0174] Step 304: Cache the target traffic data, where the target traffic data includes: the traffic data indicated by the collaborative cache request in the data sent by the server to the terminal.

[0175] After receiving the collaborative cache request, the network collaboration node may create a corresponding data cache queue for the collaborative cache request.

[0176] After receiving a collaborative cache request, the network collaboration node can parse the collaborative cache request. If the collaborative cache request carries the collaborative cache type field value corresponding to the full traffic cache and the terminal's network configuration information, the network collaboration node can create a corresponding data cache queue based on the terminal's network configuration information. If the collaborative cache request carries the collaborative cache type field value corresponding to the partial traffic cache, a traffic identifier, and the terminal's network configuration information, the network collaboration node can create a corresponding data cache queue based on the traffic identifier.

[0177] Among them, there may be situations where multiple terminals all need collaborative caching. For each collaborative caching request received, the network collaborative node will store the information carried in the collaborative caching request locally as a set of data, if it determines that the performance of its own equipment allows participation in the collaborative caching. Therefore, at least one set of data is stored locally. Each time the network collaborative node receives a traffic message to be processed from the server, it extracts the destination address in the traffic message to be processed, and can match the IP address in each set of data stored locally with the destination address. If the match is successful, it is determined that the terminal corresponding to the target address has initiated collaborative caching. If the match fails, it is determined that the terminal corresponding to the target address has not initiated collaborative caching, and the traffic message to be processed is directly forwarded to the terminal.

[0178] In the case where the terminal corresponding to the target address of the network collaboration node initiates collaborative caching, the traffic data in the traffic message to be processed is used as the target traffic data, and the collaborative cache type can be searched in a group of successfully matched data. If the collaborative cache type found is a full traffic cache, the target traffic data is cached in a data cache queue created by the network collaboration node for the network configuration information in the group of data. If the collaborative cache type found is a partial traffic cache, the traffic identifier to be matched is determined based on the network configuration information in the traffic message to be processed. If the traffic identifier to be matched matches the traffic identifier in the group of data, the target traffic data is cached in a data cache queue created by the network collaboration node for the traffic identifier in the group of data.

[0179] Step 306: upon receiving a data acquisition request sent by the terminal, the cached traffic data is sent to the terminal. The data acquisition request is sent by the terminal when the network data cache capacity of the terminal meets a preset storage condition.

[0180] In some embodiments, upon detecting that its own network data cache capacity meets a preset storage condition, the terminal may determine the volume of traffic data to be retrieved based on the network data cache capacity, generate a data retrieval request based on this volume, and send it to the network collaboration node. The network collaboration node may parse the data retrieval request, extract traffic data matching the parsed volume from a target data cache queue, and send the extracted traffic data to the terminal. The target data cache queue is a data cache queue pre-created for the collaborative cache request.

[0181] In the above-mentioned embodiment, the terminal can test its own device performance indicators. If the test results meet the preset conditions for initiating collaborative caching, the terminal can send a collaborative caching request to the network collaboration node. After receiving the collaborative caching request, the network collaboration node caches the traffic data indicated by the collaborative caching request within the data sent by the server to the terminal. This method of network collaboration nodes assisting terminals with poor device performance in caching data can avoid problems such as lag and screen distortion caused by excessive processing load on terminals with poor device performance. It also reduces packet loss caused by poor terminal device performance and reduces the server's data retransmission rate.

[0182] In some embodiments, the data caching method provided by the embodiments of the present application also includes: detecting the device performance indicators of the network collaboration node; when the detection result indicates that the processing load of the network collaboration node meets the preset conditions, based on the field value corresponding to the participating collaboration cache, generating a collaboration request confirmation message and sending it to the terminal.

[0183] After receiving the collaborative caching request sent by the terminal, the network collaboration node detects its own device performance indicators and determines whether to participate in the collaborative caching initiated by the terminal based on the detection results.

[0184] The device performance indicator of the network collaboration node may be information that can reflect the device performance of the network node. The device performance indicator of the network collaboration node may include at least one of the device configuration of the network collaboration node or the performance of the network collaboration node. The device configuration of the network collaboration node may include at least one of the processor model, memory configuration, or storage configuration used by the network collaboration node. The performance of the network collaboration node may include at least one of processor utilization, remaining memory, or remaining storage space.

[0185] In some embodiments, the device performance indicators of the network collaboration node can be detected. When the detected device performance indicators indicate that the performance of the network collaboration node is poor, it is determined that the processing load of the network collaboration node does not meet the preset conditions; when the detected device performance indicators indicate that the performance of the network collaboration node is good, it is determined that the processing load of the network collaboration node meets the preset conditions.

[0186] Specifically, a device performance threshold for a device performance indicator of the network collaboration node can be pre-determined, and a performance range corresponding to poor performance and a performance range corresponding to good performance can be determined based on the performance threshold. When it is detected that the device performance indicator of the network collaboration node is within the performance range corresponding to poor performance, it is determined that the performance of the network collaboration node is poor, and it is determined that the processing load of the network collaboration node does not meet the preset conditions. When it is detected that the device performance indicator of the network collaboration node is within the performance range corresponding to good performance, it is determined that the performance of the network collaboration node is good, and it is determined that the processing load of the network collaboration node meets the preset conditions.

[0187] Exemplarily, when the device performance indicator of the network collaboration node is the device configuration of the network collaboration node, and the device configuration of the network collaboration node includes the processor model, memory configuration, and storage configuration used by the network collaboration node, the processor model used by the network collaboration node is compared with a preset model, the memory configuration of the network collaboration node is compared with a preset memory configuration, and the storage configuration of the network collaboration node is compared with a preset storage configuration. If the processor model used by the network collaboration node is better than the preset model, the memory configuration of the network collaboration node is better than the preset memory configuration, and the storage configuration of the network collaboration node is better than the preset storage configuration, the performance of the network collaboration node is determined to be good. If the processor model used by the network collaboration node is worse than the preset model, or the memory configuration of the network collaboration node is worse than the preset memory configuration, or the storage configuration of the network collaboration node is worse than the preset storage configuration, the performance of the network collaboration node is determined to be poor.

[0188] Exemplarily, when the device performance indicator of the network collaboration node is the performance of the terminal, and the performance of the network collaboration node includes processor utilization, remaining memory, and remaining storage space, the detection result of the processor utilization of the network collaboration node is compared with a preset utilization threshold, the remaining memory of the network collaboration node is compared with a preset memory threshold, and the remaining storage space of the network collaboration node is compared with a preset space threshold. If the processor utilization of the network collaboration node is less than the preset utilization threshold, and the remaining memory of the network collaboration node is greater than the preset memory threshold, and the remaining storage space of the network collaboration node is greater than the preset space threshold, it is determined that the performance of the network collaboration node is good. If the processor utilization of the network collaboration node is greater than the preset utilization threshold, or the remaining memory of the network collaboration node is less than the preset memory threshold, or the remaining storage space of the network collaboration node is less than the preset space threshold, it is determined that the performance of the network collaboration node is poor.

[0189] When the processing load of the network collaboration node meets the preset conditions, the network collaboration node may determine to participate in the collaborative caching initiated by the terminal. In this case, the network collaboration node may generate a collaboration request confirmation message based on the field value corresponding to participation in the collaborative caching and send it to the terminal. When the processing load of the network collaboration node does not meet the preset conditions, the network collaboration node may determine to refuse to participate in the collaborative caching initiated by the terminal. In this case, the network collaboration node may generate a collaboration request confirmation message based on the field value corresponding to refusal to participate in the collaborative caching and send it to the terminal.

[0190] Among them, a target field for indicating whether the network node participates in the collaborative cache can be set in the collaborative request confirmation message. The target field can be represented by Join_coll. When the network collaborative node determines to participate in the collaborative cache initiated by the terminal, the value of the target field can be set to 1. When the network collaborative node determines to refuse to participate in the collaborative cache initiated by the terminal, the value of the target field can be set to 0.

[0191] After receiving the collaboration request confirmation message, the terminal may confirm whether the network collaboration node participates in the collaborative caching based on the target field in the collaboration request confirmation message.

[0192] In the above embodiment, after receiving the collaborative caching request sent by the terminal, the network collaborative node detects its own device performance indicators. If its own performance allows, it participates in the collaborative caching initiated by the terminal. If its own performance does not allow, it does not participate in the collaborative caching initiated by the terminal. This negotiation mechanism provides flexible selectivity for whether the network collaborative node participates in the collaborative caching, avoiding the problem of heavy processing load caused by the network collaborative node still participating in the collaborative caching when its own performance is poor.

[0193] In some embodiments, target traffic data is cached, including: after receiving a traffic message to be processed from a server, extracting the destination address in the traffic message to be processed, and extracting the network configuration information of the terminal from the collaborative cache request; matching the network address and the destination address in the network configuration information of the terminal; if the match is successful, using the traffic data in the traffic message to be processed as the target traffic data, and caching the target traffic data based on the type field value carried by the collaborative cache request.

[0194] Among them, normal traffic communication operations are performed between the terminal and the server, and the traffic communication operations include the terminal sending a data traffic request to the server, the server responding to the data traffic request, the terminal sending a confirmation message to the server after receiving the data packet, and the data transmission connection being closed.

[0195] Specifically, the terminal sending a data flow request to the server may include: after the terminal detects an opening operation for a certain data, it generates a corresponding quantity flow request and sends the data flow request to the server. Specifically, the server responding to the data flow request may include: based on the received data flow request, the server sends the corresponding data to the terminal in the form of a data packet. Specifically, the terminal sending a confirmation message to the server after receiving the data packet may include: each time the terminal receives a data packet, the terminal returns a corresponding confirmation message to the server to let the server know that the data packet has been sent successfully. Specifically, the closing of the data transmission connection may include: when the terminal detects a closing operation for the above data, it sends a request to close the connection to the service, and after receiving the request, the server closes the connection used to transmit the corresponding data.

[0196] The server may query whether the terminal has not received a certain data packet based on the received confirmation message. When it is determined that the terminal has not received a certain data packet, the server may retransmit the data packet.

[0197] The data packets sent by the server to the terminal can be placed in a traffic message, which can also include the destination address, destination port number, etc. The traffic message needs to be forwarded by various network nodes before reaching the terminal. When the traffic message is transmitted to the network collaboration node, the network collaboration node can use the traffic message as a pending traffic message and extract the destination address from the pending traffic message to determine whether the data packet in the pending traffic message is the target traffic data that needs to be cached.

[0198] In some embodiments, after receiving each collaborative caching request, the network collaboration node can extract the terminal's network configuration information from the collaborative caching request and store the extracted terminal's network configuration information locally if it determines that its own device performance allows it to participate in the collaborative caching. Therefore, the network configuration information of multiple terminals is stored locally. The network collaboration node can match the destination address in the traffic message to be processed with the network address in each locally stored network configuration information; if the match is successful, the data packet in the traffic message to be processed is used as the target traffic data to be cached. If the match fails, the traffic message to be processed is forwarded to the terminal corresponding to the destination address.

[0199] Among them, when the network collaboration node determines that the data packet in the traffic message to be processed is the target traffic data that needs to be cached, it obtains the type field value corresponding to the network configuration information that is successfully matched, that is, the type field value carried by the collaborative cache request corresponding to the network configuration information, and caches the target traffic data based on the type field value.

[0200] In the above embodiment, after receiving the pending traffic message from the server, the network collaboration node extracts the destination address in the pending traffic message, and determines whether the traffic packet in the pending traffic message is the target traffic data that needs to be cached based on the destination address. If the judgment result is yes, the target traffic data continues to be cached. This method of network collaboration nodes assisting terminals with poor device performance in caching data can avoid problems such as freezes and screen distortion caused by excessive processing load on terminals with poor device performance, while reducing packet loss caused by poor terminal device performance and reducing the data retransmission rate of the server.

[0201] In some embodiments, the target traffic data is cached based on the type field value carried by the collaborative cache request, including: when the type field value carried by the collaborative cache request indicates that the collaborative cache type is a full traffic cache, the target traffic data is cached in a first data cache queue, and the first data cache queue is a data cache queue created for the network configuration information in the collaborative cache request.

[0202] After receiving each collaborative cache request, the network collaboration node, if it determines that its own device performance allows participation in collaborative cache, not only stores the information carried in the collaborative cache request locally, but also creates a corresponding data cache queue for the collaborative cache request.

[0203] In some embodiments, if a collaborative cache request carries a collaborative cache type field value corresponding to full traffic caching and the terminal's network configuration information, a corresponding data cache queue is created for the terminal's network configuration information. If a collaborative cache request carries a collaborative cache type field value corresponding to partial traffic caching, a traffic identifier, and the terminal's network configuration information, a corresponding data cache queue is created for the traffic identifier.

[0204] Among them, when the network collaboration node determines that the traffic data in the traffic message to be processed is the target traffic data, it can obtain the type field value corresponding to the network configuration information that successfully matches the destination address, that is, the type field value carried by the collaborative cache request corresponding to the network configuration information. When the type field value indicates that the collaborative cache type is a full traffic cache, the target traffic data is cached in the first data cache queue, which is a data cache queue created by the network collaboration node for the network configuration information in the collaborative cache request.

[0205] As shown in FIG4 , the first data cache queue follows the first-in-first-out principle. If data packet A is stored in the first data cache queue earlier than data packet B, data packet A will also be transmitted to the terminal earlier than data packet B.

[0206] In the above embodiment, when the type field value carried by the collaborative cache request indicates that the collaborative cache type is full traffic cache, the target traffic data is cached in the first data cache queue, which is a data cache queue created for the network configuration information in the collaborative cache request. This can avoid problems such as freezing and screen distortion caused by excessive processing load on terminals with poor device performance, while reducing packet loss caused by poor device performance of the terminal and lowering the data retransmission rate of the server. In the case of very poor device performance of the terminal, the network collaboration node can assist the terminal in caching all data to be received, alleviating the processing pressure of the terminal and improving service experience problems such as freezing, screen distortion, and mosaics.

[0207] In some embodiments, target traffic data is cached based on the type field value carried by the collaborative cache request, including: when the type field value carried by the collaborative cache request indicates that the collaborative cache type is a partial traffic cache, determining the traffic identifier to be matched based on the network configuration information in the traffic message to be processed; matching the traffic identifier to be matched with the traffic identifier in the collaborative cache request; and if the match is successful, caching the target traffic data into a second data cache queue, which is a data cache queue created for the traffic identifier in the collaborative cache request.

[0208] Among them, when the network collaboration node determines the traffic data in the traffic message to be processed as the target traffic data, it can obtain the type field value corresponding to the network configuration information that successfully matches the destination address, that is, the type field value carried by the collaborative cache request corresponding to the network configuration information. When the type field value carried by the collaborative cache request indicates that the collaborative cache type is a partial traffic cache, the network collaboration node determines the traffic identifier to be matched based on the network configuration information in the traffic message to be processed.

[0209] Where the network protocol is the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP), the network configuration information in the traffic message to be processed includes the destination address, destination port number, server IP address, server port number, and network protocol. The network collaboration node may determine the traffic identifier to be matched based on the destination address, destination port number, server IP address, server port number, and network protocol.

[0210] For example, the flow identifier to be matched can be determined by the following formula: FlowID'=Hash(src'||dst'||sport'||dport'||prot')

[0211] Where FlowID' is the identifier of the traffic to be matched, src is the server's IP address, dst is the destination address, sport is the server's port number, dport is the destination port number, and prot is the network protocol. The "||" symbol represents a string concatenation operation. src'||dst'||sport'||dport'||prot' is the concatenation result of the destination address, destination port number, server's IP address, server's port number, and network protocol. The Hash() function represents a hash operation.

[0212] Among them, when the network protocol between the terminal and the server is quick UDP internet connection (QUIK), the traffic message to be processed carries a connection identifier. The network collaboration node can extract the connection identifier from the traffic message to be processed and use the extracted connection identifier as the traffic identifier to be matched.

[0213] The network collaboration node can obtain the collaborative cache request corresponding to the network configuration information that successfully matches the destination address, match the traffic identifier to be matched with the traffic identifier in the collaborative cache request, and if the match is successful, cache the target traffic data in the second data cache queue, which is a data cache queue created for the traffic identifier in the collaborative cache request. If the match fails, the traffic message to be processed is forwarded to the terminal corresponding to the destination address.

[0214] 5 , the second data cache queue follows the first-in-first-out principle. If data packet A is stored in the second data cache queue earlier than data packet B, data packet A will also be transmitted to the terminal earlier than data packet B.

[0215] In the above embodiment, when the type field value carried in the collaborative cache request indicates that the collaborative cache type is a partial traffic cache, the traffic identifier to be matched is determined based on the network configuration information in the traffic message to be processed; the traffic identifier to be matched is matched with the traffic identifier in the collaborative cache request; and if the match is successful, the target traffic data is cached in the second data cache queue, which is a data cache queue created for the traffic identifier in the collaborative cache request. This allows the network collaboration node to assist the terminal in caching the data traffic corresponding to the media data currently being processed, alleviating the processing pressure on the terminal and improving service experience issues such as freezes, screen distortion, and mosaics, even when the terminal's device performance is generally poor.

[0216] In some embodiments, the data caching method provided by the embodiments of the present application further includes: receiving a data acquisition request sent by a terminal; parsing the data acquisition request, extracting traffic data that matches the data volume obtained by parsing from a target data cache queue, and sending the extracted traffic data to the terminal. The target data cache queue is a data cache queue created in advance for the collaborative cache request.

[0217] The specific manner in which the terminal generates a data acquisition request and sends the data acquisition request to the network cooperation node is described in the aforementioned embodiment, and will not be repeated here in the embodiment of the present application.

[0218] Among them, after receiving the data acquisition request, the network collaboration node parses the data acquisition request, searches the target data cache queue based on the parsing result, extracts the traffic data that matches the data volume obtained by parsing from the target data cache queue, and sends the extracted traffic data to the terminal.

[0219] Among them, after receiving the data acquisition request, the network collaboration node parses the data acquisition request. In the case where the parsing result includes the network configuration information and data volume of the terminal, the data cache queue created in advance for the network configuration information is used as the target data cache queue, and the traffic data matching the data volume is extracted from the target data cache queue, and the extracted traffic data is sent to the terminal. In the case where the parsing result includes the traffic identifier and the data volume, the data cache queue created in advance for the traffic identifier is used as the target data cache queue, and the traffic data matching the data volume is extracted from the target data cache queue, and the extracted traffic data is sent to the terminal. For example, as shown in Figure 6, the network collaboration node can extract the traffic data matching the data volume from the target data cache queue according to the first-in-first-out principle, and send the extracted traffic data to the terminal.

[0220] In the above embodiment, after receiving a data acquisition request from a terminal, the data acquisition request is parsed, traffic data matching the parsed data volume is extracted from a target data cache queue, and the extracted traffic data is sent to the terminal. The target data cache queue is a data cache queue pre-created for the collaborative cache request. This allows the network collaboration node to assist the terminal in caching all pending data in the event of poor terminal performance. When the terminal's network data cache capacity can accommodate new traffic data, it requests the network collaboration node to send the data, alleviating the terminal's processing pressure and improving service experience issues such as lag, screen distortion, and mosaics.

[0221] In some embodiments, the data caching method provided by the embodiments of the present application further includes: receiving a collaborative cancellation request sent by the terminal, the collaborative cancellation request is generated by the terminal when it detects that the device performance indicators of the terminal meet the conditions for canceling the collaborative cache; deleting the data cache queue indicated by the collaborative cancellation request, and sending a collaborative cache cancellation message to the terminal.

[0222] The process of the terminal generating a collaboration cancellation request can be referred to the description of the aforementioned embodiment, and will not be described in detail in the embodiment of the present application.

[0223] Upon receiving a collaboration cancellation request, the network collaboration node can parse the request, locate the data cache queue corresponding to the parsed network configuration information, and delete the data cache queue. After deleting the data cache queue, the network collaboration node can send a collaboration cache cancellation message to the terminal. Subsequently, the network collaboration node will no longer cache traffic data for the terminal. The collaboration cache cancellation message can be represented by Pkt_coll_cancle_ack.

[0224] In the above embodiment, upon receiving a collaboration cancellation request from a terminal, the network collaboration node deletes the data cache queue indicated by the collaboration cancellation request and sends a collaboration cache cancellation message to the terminal. Subsequently, the network collaboration node will no longer cache traffic data for the terminal. This allows the terminal with improved device performance to exit the collaborative caching mechanism, reducing cache pressure on the network collaboration node.

[0225] In some embodiments, the data caching method provided by the embodiments of the present application further includes performing usage detection on the data cache queue created in advance for the collaborative cache request; when the usage rate meets the traffic delivery conditions, a preset amount of traffic data is delivered to the terminal from the data cache queue created in advance for the collaborative cache request.

[0226] In some embodiments, when a collaborative cache request carries a collaborative cache type field value corresponding to a full traffic cache and the network configuration information of a terminal, the network collaboration node may create a corresponding data cache queue for the network configuration information of the terminal and perform a usage check on the data cache queue. If the usage exceeds a preset cache threshold, it is determined that the usage meets the traffic delivery conditions, and a preset amount of traffic data is extracted from the data cache queue and sent to the terminal. The preset cache threshold and the preset amount may be pre-set or agreed upon through a collaborative cache request, and this is not limited in the embodiments of the present application.

[0227] In some embodiments, when a collaborative cache request carries a collaborative cache type field value, a traffic identifier, and the network configuration information of the terminal corresponding to a portion of the traffic cache, the network collaboration node can create a corresponding data cache queue for the traffic identifier and perform a usage rate detection on the data cache queue. When the usage rate exceeds a preset cache threshold, it is determined that the usage rate meets the traffic delivery conditions, and a preset amount of traffic data is extracted from the data cache queue and sent to the terminal.

[0228] The usage rate detection of the data cache queue may be performed in real time, regularly, periodically, or according to a preset detection rule, which is not limited in the present embodiment.

[0229] In the above embodiment, the utilization rate of the data cache queue pre-created for collaborative cache requests is monitored. When the utilization rate meets the traffic delivery conditions, a preset amount of traffic data is delivered to the terminal from the data cache queue pre-created for the collaborative cache request. This method of network collaboration nodes assisting terminals with poor device performance in caching data improves service experience issues such as lag, screen distortion, and pixelation.

[0230] In some embodiments, the data caching method provided by the embodiments of the present application further includes: sending a preset amount of traffic data to the terminal from a data cache queue pre-created for collaborative caching requests according to a preset time rule.

[0231] After receiving the collaborative caching request sent by the terminal, the network collaboration node creates a corresponding data cache queue for the collaborative caching request if it determines to participate in the collaborative caching initiated by the terminal.

[0232] The preset time rule may include a preset time threshold, and the network collaboration node may deliver a preset amount of traffic data from the data cache queue to the terminal every preset time threshold. The preset time threshold and the preset amount may be pre-set or agreed upon via a collaborative cache request, and are not limited in this embodiment of the present application.

[0233] In some embodiments, when the collaborative cache request carries the collaborative cache type field value corresponding to the full traffic cache and the network configuration information of the terminal, the network collaboration node can create a corresponding data cache queue for the network configuration information of the terminal, and the network collaboration node can extract a preset amount of traffic data from the data cache queue every preset time threshold and send it to the terminal.

[0234] In some embodiments, when the collaborative cache request carries the collaborative cache type field value, traffic identifier and network configuration information of the terminal corresponding to part of the traffic cache, the network collaboration node can create a corresponding data cache queue for the traffic identifier, and the network collaboration node can extract a preset amount of traffic data from the data cache queue every preset time threshold and send it to the terminal.

[0235] In the above embodiment, a preset amount of traffic data is delivered to the terminal from a data cache queue pre-created for collaborative caching requests according to a preset time rule. This method of network collaboration nodes assisting terminals with poor device performance in caching data improves the service experience of terminals such as lag, screen distortion, and mosaics.

[0236] In some embodiments, a data caching method is provided, which is described by taking the method executed by a terminal as an example. The method includes:

[0237] When the duration of the first preset relationship between the detection result of the processor utilization detected by the terminal and the first preset utilization threshold exceeds the first duration threshold; and / or when the duration of the second preset relationship between the detection result of the remaining memory detected and the first preset memory threshold exceeds the second duration threshold, the terminal determines that the detection result meets the preset conditions for initiating collaborative caching.

[0238] The terminal determines the collaborative cache type based on the detection result; when the collaborative cache type is full-flow cache, a collaborative cache request is generated based on the collaborative cache type field value corresponding to the full-flow cache and the network configuration information of the terminal. When the collaborative cache type is partial-flow cache, the terminal's network configuration information, the server's network configuration information, and the network protocol for communication between the terminal and the server are obtained; the terminal's network configuration information, the server's network configuration information, and the network protocol are spliced ​​to obtain a splicing result; the splicing result is encrypted, and the encrypted result is used as the traffic identifier of the media data currently being processed by the terminal; or, the connection identifier for transmitting the media data currently being processed by the terminal, which is determined by negotiation between the terminal and the server, is used as the traffic identifier of the media data currently being processed by the terminal; a collaborative cache request is generated based on the collaborative cache type field value corresponding to the partial-flow cache, the traffic identifier, and the network configuration information of the terminal.

[0239] The terminal determines the network collaboration node through which data needs to be transmitted between the terminal and the server, sends a collaboration cache request to the network collaboration node, and the network collaboration node detects the device performance indicators; when the detection result indicates that the processing load of the network collaboration node meets the preset conditions, it generates a collaboration request confirmation message based on the field value corresponding to the participating collaboration cache and sends it to the terminal.

[0240] After the network collaboration node receives the traffic message to be processed from the server, it extracts the destination address in the traffic message to be processed and extracts the network configuration information of the terminal from the collaborative cache request; matches the network address and the destination address in the network configuration information of the terminal; if the match is successful, the traffic data in the traffic message to be processed is used as the target traffic data, and when the type field value carried by the collaborative cache request indicates that the collaborative cache type is a full traffic cache, the target traffic data is cached in the first data cache queue, which is a data cache queue created for the network configuration information in the collaborative cache request. When the type field value carried by the collaborative cache request indicates that the collaborative cache type is a partial traffic cache, based on the network configuration information in the traffic message to be processed, the traffic identifier to be matched is determined; the traffic identifier to be matched is matched with the traffic identifier in the collaborative cache request; if the match is successful, the target traffic data is cached in the second data cache queue, which is a data cache queue created for the traffic identifier in the collaborative cache request.

[0241] If the collaborative cache type is full traffic cache, when the terminal detects that the network data cache capacity meets the preset storage conditions, it determines the amount of traffic data to be acquired based on the network data cache capacity; generates a data acquisition request based on the terminal's network configuration information and the data volume; and sends the data acquisition request to the network collaboration node. If the collaborative cache type is partial traffic cache, when the terminal detects that the network data cache capacity meets the preset storage conditions, it determines the amount of traffic data to be acquired based on the network data cache capacity; generates a data acquisition request based on the traffic identifier and the data volume; and sends the data acquisition request to the network collaboration node.

[0242] The network collaboration node parses the data acquisition request, extracts traffic data that matches the parsed data volume from the target data cache queue, and sends the extracted traffic data to the terminal. The target data cache queue is a data cache queue pre-created for the collaborative cache request. Alternatively, the utilization rate of the data cache queue pre-created for the collaborative cache request is detected; when the utilization rate meets the traffic delivery conditions, a preset amount of traffic data is delivered to the terminal from the data cache queue pre-created for the collaborative cache request. Alternatively, a preset amount of traffic data is delivered to the terminal from the data cache queue pre-created for the collaborative cache request according to a preset time rule.

[0243] When the terminal detects that the detection result of processor utilization satisfies a third preset relationship with the second preset utilization threshold; and / or, when the detection result of remaining memory satisfies a fourth preset relationship with the second preset memory threshold, the terminal determines that the detection result meets the conditions for canceling the collaborative cache, and generates a collaborative cancellation request based on the collaborative cache type field value corresponding to the cancellation of the collaborative cache and the network configuration information of the terminal; and sends the collaborative cancellation request to the network collaboration node.

[0244] The network cooperation node deletes the data cache queue indicated by the cooperation cancellation request and sends a cooperation cache cancellation message to the terminal.

[0245] In the above-mentioned embodiment, the terminal can test its own device performance indicators. If the test results meet the preset conditions for initiating collaborative caching, the terminal sends a collaborative caching request to the network collaborative node. After receiving the collaborative caching request, the network collaborative node caches the traffic data indicated by the collaborative caching request in the data sent by the server to the terminal, and after receiving the data acquisition request sent by the terminal, it sends the cached traffic data to the terminal. This method of network collaborative nodes assisting terminals with poor device performance in caching data can avoid problems such as lag and screen distortion caused by excessive processing load on terminals with poor device performance. It also reduces packet loss caused by poor terminal device performance and reduces the server's data retransmission rate.

[0246] In some embodiments, as shown in FIG7 , the data caching method provided by the embodiment of the present application may include: ① the terminal periodically detecting its own device performance indicator; ② when the detection result meets the preset conditions for initiating collaborative caching, sending a collaborative caching request to the previous hop network node (network collaboration node); ③ after receiving the collaborative caching request, the network collaboration node replies with a collaborative request confirmation message to the terminal; ④ after receiving the traffic request message from the terminal, the cloud server sends a traffic data message to the terminal; ⑤ after receiving the traffic message from the cloud server to the terminal, the network collaboration node treats the traffic message as a pending traffic message, and when it is determined that the terminal corresponding to the target address in the pending traffic message has initiated collaborative caching, caches the data packets in the pending traffic message; ⑥ the terminal periodically sends a data acquisition request to the network collaboration node; ⑦ the network collaboration node transmits the corresponding traffic data to the terminal according to the received data acquisition request; ⑧ when the device performance indicator of the terminal improves or the media data currently being processed by the terminal is closed, sending a collaborative cancellation request to the network collaboration node; ⑨ the network collaboration node sends a collaborative cache cancellation message to the terminal and no longer performs collaborative caching operations on subsequent related traffic data.

[0247] In some embodiments, as shown in FIG8 , the terminal detects its own device performance indicators and determines whether to initiate collaborative caching based on the detection results. If the judgment result is to initiate collaborative caching, the terminal generates a collaborative caching request based on the detection result and sends the collaborative caching request to the network collaboration node. The network collaboration node detects its own device performance indicators and determines whether to participate in collaborative caching based on its own device performance indicators. If the judgment result is to participate in collaborative caching, the terminal sends a collaborative request confirmation message to the terminal. The network collaboration node receives pending traffic messages from the server and determines whether to cache the traffic packets in the pending traffic messages based on the destination address in the pending traffic messages. If the judgment result is to cache, the traffic packets in the pending traffic messages are stored in the corresponding data cache queue. When the terminal detects that the network data cache capacity meets the preset storage conditions, it sends a data acquisition request to the network collaboration node. The network collaboration node extracts traffic data from the corresponding data cache queue and sends it to the terminal.

[0248] In some possible scenarios, the data that the network collaboration node assists the terminal in caching can be video data. Specifically, when the terminal detects that the performance indicators of its own equipment meet the preset conditions for initiating collaborative caching, it generates a collaborative caching request based on the detection results; sends the collaborative caching request to the network collaboration node; after receiving the video traffic message from the server, the network collaboration node extracts the destination address in the video traffic message, and determines whether to cache the data packets in the video traffic message based on the destination address. If the judgment result is to perform caching, the data packets in the video traffic message are stored in the corresponding data cache queue. When the terminal detects that the network data cache capacity meets the preset storage conditions, it sends a video data acquisition request to the network collaboration node. The network collaboration node extracts the video traffic data from the corresponding data cache queue and sends it to the terminal.

[0249] It should be noted that the application scenarios provided above are only used to illustrate the data caching method of this application. The application of the data caching method provided in this application is not limited to the application scenarios provided above. For example, it can also be applied in audio scenarios, file transfer scenarios, web browsing scenarios, etc. The embodiments of this application are not limited to this.

[0250] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0251] Based on the same inventive concept, embodiments of the present application also provide a data caching device for implementing the aforementioned data caching method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more data caching device embodiments provided below can be found in the above-mentioned limitations of the data caching method and will not be repeated here.

[0252] In one embodiment, as shown in FIG9 , a data cache device is provided, including:

[0253] The detection module 901 is configured to obtain a detection result of a device performance indicator of the terminal; analyze the detection result to determine whether the detection result meets a preset condition for initiating collaborative caching;

[0254] The transmission module 902 is used to determine the network collaboration node through which data needs to be transmitted between the terminal and the server in response to the detection result meeting the preset condition, and generate a collaborative cache request; send the collaborative cache request to the network collaboration node, and the collaborative cache request is used to instruct the network collaboration node to cache target traffic data, and the target traffic data includes the traffic data indicated by the collaborative cache request in the data sent by the server to the terminal; send a data acquisition request to the network collaboration node in response to the network data cache capacity of the terminal meeting the preset storage condition; receive the cached target traffic data sent by the network collaboration node in response to the data acquisition request.

[0255] In some embodiments, the device performance indicators include: processor utilization or at least one of the remaining memory, and the method also includes: the detection module 901 is specifically used to: when at least one of the first preset condition or the second preset condition is established, determine that the detection result meets the preset conditions for initiating collaborative caching; wherein, the first preset condition is: there is a first preset relationship between the detection result of the processor utilization and the first preset utilization threshold, and the duration exceeds the first duration threshold; the second preset condition is: there is a second preset relationship between the detection result of the remaining memory and the first preset memory threshold, and the duration exceeds the second duration threshold.

[0256] In some embodiments, the detection module 901 is specifically configured to: determine a collaborative cache type based on a detection result; and generate a collaborative cache request based on the collaborative cache type.

[0257] In some embodiments, the detection module 901 is specifically configured to: when the collaborative cache type is full flow cache, generate a collaborative cache request based on the collaborative cache type field value corresponding to the full flow cache and the network configuration information of the terminal.

[0258] In some embodiments, the transmission module 902 is also used to: when it is detected that the network data cache capacity of the terminal meets the preset storage conditions, determine the data volume of the traffic data to be obtained based on the network data cache capacity; generate a data acquisition request based on the network configuration information and data volume of the terminal; send the data acquisition request to the network collaboration node, the data acquisition request is used to instruct the network collaboration node to parse the received data acquisition request, search the data cache queue corresponding to the network configuration information obtained by the analysis, and extract the traffic data that matches the data volume obtained by the analysis from the found data cache queue; receive the traffic data returned by the network collaboration node.

[0259] In some embodiments, the transmission module 902 is also used to: generate a collaborative cancellation request based on the collaborative cache type field value corresponding to the cancellation of the collaborative cache and the network configuration information of the terminal when it is detected that the device performance indicators of the terminal meet the conditions for canceling the collaborative cache; send the collaborative cancellation request to the network collaborative node, and the data acquisition request is used to instruct the network collaborative node to parse the received collaborative cancellation request and delete the data cache queue corresponding to the network configuration information obtained by the parsing; receive the collaborative cache cancellation message sent by the network collaborative node.

[0260] In some embodiments, the detection module 901 is specifically used to: when the collaborative cache type is partial traffic cache, obtain the traffic identifier of the media data currently being processed by the terminal; and generate a collaborative cache request based on the collaborative cache type field value, traffic identifier and network configuration information of the terminal corresponding to the partial traffic cache.

[0261] In some embodiments, the detection module 901 is specifically used to: obtain the network configuration information of the terminal, the network configuration information of the server, and the network protocol for communication between the terminal and the server; splice the network configuration information of the terminal, the network configuration information of the server, and the network protocol to obtain a splicing result; encrypt the splicing result, and use the encrypted result as a traffic identifier of the media data currently being processed by the terminal.

[0262] In some embodiments, the detection module 901 is specifically configured to use a connection identifier determined by negotiation between the terminal and the server for transmitting media data currently being processed by the terminal as a flow identifier of the media data currently being processed by the terminal.

[0263] In some embodiments, the transmission module 902 is also used to: when it is detected that the network data cache capacity of the terminal meets the preset storage conditions, determine the data volume of the traffic data to be obtained based on the network data cache capacity; generate a data acquisition request based on the traffic identifier and the data volume; send the data acquisition request to the network collaboration node, the data acquisition request is used to instruct the network collaboration node to parse the received data acquisition request, search the data cache queue corresponding to the traffic identifier obtained by the analysis, and extract the traffic data that matches the data volume obtained by the analysis from the found data cache queue; receive the traffic data returned by the network collaboration node.

[0264] In some embodiments, the transmission module 902 is also used to: generate a collaborative cancellation request based on the type field value and traffic identifier corresponding to the cancellation of the collaborative cache when it is detected that the device performance indicators of the terminal meet the conditions for canceling the collaborative cache; send the collaborative cancellation request to the network collaborative node, and the collaborative cancellation request is used to instruct the network collaborative node to parse the received collaborative cancellation request and delete the data cache queue corresponding to the traffic identifier obtained by the parsing; receive the collaborative cache cancellation message sent by the network collaborative node.

[0265] In some embodiments, the transmission module 902 is also used to: receive a collaboration request confirmation message sent by the network collaboration node, the collaboration request confirmation message is used to indicate whether the network collaboration node participates in collaborative caching, and the collaboration request confirmation message is generated by the network collaboration node based on its own device performance indicators.

[0266] In some embodiments, the transmission module 902 is further configured to determine that the detection result meets the conditions for canceling the collaborative cache when at least one of a third condition or a fourth condition is met. The third condition is that the processor utilization detection result and the second preset utilization threshold satisfy a third preset relationship. The fourth condition is that the remaining memory detection result and the second preset memory threshold satisfy a fourth preset relationship.

[0267] In one embodiment, as shown in FIG10 , a data cache device is provided, including:

[0268] The interface module 1001 is configured to receive a collaborative caching request sent by a terminal. The collaborative caching request is generated by the terminal when a detection result of a performance indicator of its own device meets a preset condition for initiating collaborative caching.

[0269] The cache module 1002 is configured to cache target traffic data, where the target traffic data includes traffic data indicated by the collaborative cache request in the data sent from the server to the terminal.

[0270] The interface module 1001 is also used to send the cached target traffic data to the terminal when receiving a data acquisition request sent by the terminal. The data acquisition request is sent by the terminal when the network data cache capacity of the terminal meets the preset storage conditions.

[0271] In some embodiments, the interface module 1001 is also used to detect the device performance indicators of the network collaboration node; when the detection result indicates that the processing load of the network collaboration node meets the preset conditions, a collaboration request confirmation message is generated based on the field value corresponding to the participating collaboration cache and sent to the terminal.

[0272] In some embodiments, the cache module 1002 is specifically used to: after receiving the traffic message to be processed from the server, extract the destination address in the traffic message to be processed, and extract the network configuration information of the terminal from the collaborative cache request; match the network address and the destination address in the network configuration information of the terminal; if the match is successful, use the traffic data in the traffic message to be processed as the target traffic data, and cache the target traffic data based on the type field value carried by the collaborative cache request.

[0273] In some embodiments, the cache module 1002 is specifically used to: when the type field value carried by the collaborative cache request indicates that the collaborative cache type is full traffic cache, cache the target traffic data into the first data cache queue, and the first data cache queue is a data cache queue created for the network configuration information in the collaborative cache request.

[0274] In some embodiments, the cache module 1002 is specifically used to: when the type field value carried by the collaborative cache request indicates that the collaborative cache type is a partial traffic cache, determine the traffic identifier to be matched based on the network configuration information in the traffic message to be processed; match the traffic identifier to be matched with the traffic identifier in the collaborative cache request; if the match is successful, cache the target traffic data into a second data cache queue, which is a data cache queue created for the traffic identifier in the collaborative cache request.

[0275] In some embodiments, the interface module 1001 is also used to receive a data acquisition request sent by the terminal; parse the data acquisition request, extract traffic data that matches the data volume obtained by parsing from the target data cache queue, and send the extracted traffic data to the terminal. The target data cache queue is a data cache queue created in advance for the collaborative cache request.

[0276] In some embodiments, the interface module 1001 is also used to receive a collaboration cancellation request sent by the terminal, which is generated by the terminal when it detects that the device performance indicators of the terminal meet the conditions for canceling the collaboration cache; delete the data cache queue indicated by the collaboration cancellation request, and send a collaboration cache cancellation message to the terminal.

[0277] In some embodiments, the interface module 1001 is also used to detect the usage rate of the data cache queue created in advance for the collaborative cache request; when the usage rate meets the traffic delivery condition, a preset amount of traffic data is delivered to the terminal from the data cache queue created in advance for the collaborative cache request.

[0278] In some embodiments, the interface module 1001 is further configured to send a preset amount of traffic data to the terminal from a data cache queue pre-created for the collaborative cache request according to a preset time rule.

[0279] Each module in the above-mentioned data cache device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0280] In one embodiment, a computer device is provided, which may be a network collaboration node, and its internal structure diagram may be shown in Figure 11. The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer device is used to store target traffic data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via a network connection. When the computer-readable instructions are executed by the processor, a data caching method is implemented.

[0281] In one embodiment, a computer device is provided, which may be a terminal. A diagram of its internal structure may be shown in FIG12 . The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and an external device. The communication interface of the computer device is configured to communicate with an external terminal via wired or wireless communication, where the wireless communication may be implemented via Wi-Fi, a mobile cellular network, NFC (near-field communication), or other technologies. When executed by the processor, the computer-readable instructions implement a data caching method. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0282] Those skilled in the art will understand that the structures shown in Figures 11 and 12 are merely block diagrams of partial structures related to the solution of the present application, and do not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figures, or combine certain components, or have a different component arrangement.

[0283] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the above-mentioned method embodiments. The computer device can be a terminal or a network collaboration node.

[0284] In one embodiment, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0285] In one embodiment, a computer program product is provided, comprising computer-readable instructions, which implement the steps in the above-mentioned method embodiments when executed by a processor.

[0286] It should be noted that the network configuration information (including but not limited to IP addresses, port numbers, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the subject or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0287] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0288] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0289] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A data caching method, executed by a terminal, comprising: Obtaining a test result of a device performance indicator for the terminal; Analyzing the detection result to determine whether the detection result meets the preset condition for initiating collaborative caching; In response to the detection result meeting the preset condition, determining a network cooperation node through which data needs to be transmitted between the terminal and the server, and generating a cooperation cache request; Sending the collaborative cache request to the network collaboration node, the collaborative cache request is used to instruct the network collaboration node to cache target traffic data, the target traffic data including the traffic data indicated by the collaborative cache request in the data sent by the server to the terminal; In response to the network data cache capacity of the terminal satisfying a preset storage condition, sending a data acquisition request to the network cooperation node; and The cached target traffic data is received, which is sent by the network cooperation node in response to the data acquisition request.

2. According to the method of claim 1, the equipment performance index comprises: At least one of processor utilization or remaining memory, the method further comprising: When at least one of the first preset condition or the second preset condition is met, determining that the detection result meets the preset condition for initiating collaborative caching; The first preset condition is that: the detection result of the processor utilization and the first preset utilization threshold are in a first preset relationship, and the duration exceeds a first duration threshold; The second preset condition is that there is a second preset relationship between the detection result of the remaining memory and the first preset memory threshold, and the duration exceeds a second duration threshold.

3. The method according to claim 1 or 2, wherein generating a collaborative cache request comprises: Determining a collaborative cache type based on the detection result; A collaborative caching request is generated based on the collaborative caching type.

4. The method according to claim 3, wherein generating a collaborative cache request based on the collaborative cache type comprises: When the collaborative cache type is full-flow cache, a collaborative cache request is generated based on the collaborative cache type field value corresponding to the full-flow cache and the network configuration information of the terminal.

5. The method according to claim 4, further comprising: When it is detected that the network data cache capacity of the terminal meets the preset storage condition, determining the data volume of the traffic data to be acquired based on the network data cache capacity; generating a data acquisition request based on the network configuration information of the terminal and the data volume; Sending the data acquisition request to the network collaboration node, the data acquisition request is used to instruct the network collaboration node to parse the received data acquisition request, search for a data cache queue corresponding to the network configuration information obtained by the parsing, and extract traffic data matching the data volume obtained by the parsing from the found data cache queue; Receive the traffic data returned by the network cooperation node.

6. The method according to claim 4, further comprising: When it is detected that the device performance indicator of the terminal meets the conditions for canceling the collaborative cache, generating a collaborative cancellation request based on the collaborative cache type field value corresponding to canceling the collaborative cache and the network configuration information of the terminal; Sending the cooperation cancellation request to the network cooperation node, where the cooperation cancellation request is used to instruct the network cooperation node to parse the received cooperation cancellation request and delete the data cache queue corresponding to the network configuration information obtained by parsing; A collaborative cache cancellation message sent by the network collaborative node is received.

7. The method according to claim 3, wherein generating a collaborative cache request based on the collaborative cache type comprises: When the collaborative cache type is partial traffic cache, obtaining a traffic identifier of the media data currently being processed by the terminal; Based on the collaborative cache type field value corresponding to the partial traffic cache, the traffic identifier, and the network configuration information of the terminal information and generate collaborative cache requests.

8. The method according to claim 7, wherein obtaining the flow identifier of the media data currently being processed by the terminal comprises: Obtaining the network configuration information of the terminal, the network configuration information of the server, and the network protocol for communication between the terminal and the server; splicing the network configuration information of the terminal, the network configuration information of the server, and the network protocol to obtain a splicing result; The splicing result is encrypted, and the encryption result is used as a flow identifier of the media data currently being processed by the terminal.

9. The method according to claim 7, wherein obtaining the flow identifier of the media data currently being processed by the terminal comprises: The connection identifier for transmitting the media data currently being processed by the terminal, which is determined by negotiation between the terminal and the server, is used as the flow identifier of the media data currently being processed by the terminal.

10. The method according to any one of claims 7 to 9, further comprising: When it is detected that the network data cache capacity of the terminal meets the preset storage condition, determining the data volume of the traffic data to be acquired based on the network data cache capacity; Based on the flow identifier and the data volume, generate a data acquisition request; Sending the data acquisition request to the network collaboration node, the data acquisition request is used to instruct the network collaboration node to parse the received data acquisition request, find the data cache queue corresponding to the traffic identifier obtained by the parsing, and extract the traffic data matching the data volume obtained by the parsing from the found data cache queue; Receive the traffic data returned by the network cooperation node.

11. The method according to any one of claims 7 to 10, further comprising: When it is detected that the device performance indicator of the terminal meets the condition for canceling the collaborative cache, generating a collaborative cancellation request based on the type field value corresponding to canceling the collaborative cache and the traffic identifier; Sending the cooperation cancellation request to the network cooperation node, wherein the cooperation cancellation request is used to instruct the network cooperation node to parse the received cooperation cancellation request and delete the data cache queue corresponding to the traffic identifier obtained by parsing; A collaborative cache cancellation message sent by the network collaborative node is received.

12. A data caching method, executed by a network cooperation node, wherein the network cooperation node is an intermediate node through which data needs to be transmitted between a terminal and a server, the method comprising: Receiving a collaborative caching request sent by a terminal, where the collaborative caching request is generated by the terminal when a detection result of a performance indicator of the terminal's own device meets a preset condition for initiating collaborative caching; and caching target traffic data, the target traffic data comprising: traffic data indicated by the collaborative cache request in the data sent by the server to the terminal; When receiving a data acquisition request sent by the terminal, the cached traffic data is sent to the terminal, wherein the data acquisition request is sent by the terminal when the network data cache capacity of the terminal meets a preset storage condition.

13. The method according to claim 12, further comprising: Testing the equipment performance indicators of the network cooperation nodes; When the detection result indicates that the processing load of the network cooperation node meets the preset condition, a cooperation request confirmation message is generated based on the field value corresponding to the participating cooperation cache and sent to the terminal.

14. The method according to claim 12 or 13, wherein caching the target flow data comprises: After receiving the to-be-processed traffic message from the server, extract the destination address in the to-be-processed traffic message, and extract the network configuration information of the terminal from the collaborative cache request; Matching the network address in the network configuration information of the terminal with the destination address; In the case of a successful match, the traffic data in the to-be-processed traffic message is used as the target traffic data, and the target traffic data is cached based on the type field value carried in the collaborative cache request.

15. The method according to claim 14, wherein caching the target traffic data based on the type field value carried in the collaborative cache request comprises: When the type field value carried in the collaborative cache request indicates that the collaborative cache type is full traffic cache, the target traffic data is cached in a first data cache queue, which is a data cache queue created for the network configuration information in the collaborative cache request.

16. The method according to claim 14, wherein caching the target traffic data based on the type field value carried in the collaborative cache request comprises: When the type field value carried in the collaborative cache request indicates that the collaborative cache type is a partial flow cache, determining the flow identifier to be matched based on the network configuration information in the flow message to be processed; Matching the to-be-matched traffic identifier with the traffic identifier in the collaborative cache request; In the case of a successful match, the target traffic data is cached in a second data cache queue, where the second data cache queue is a data cache queue created for the traffic identifier in the collaborative cache request.

17. A data cache device, the device comprising: A detection module, used to obtain a detection result of a device performance indicator for the terminal; Analyzing the detection result to determine whether the detection result meets the preset condition for initiating collaborative caching; A transmission module, configured to determine, in response to the detection result meeting the preset condition, a network cooperation node through which data needs to be transmitted between the terminal and the server, and generate a cooperation cache request; Sending the collaborative cache request to the network collaboration node, the collaborative cache request is used to instruct the network collaboration node to cache target traffic data, the target traffic data including traffic data indicated by the collaborative cache request in the data sent by the server to the terminal; in response to the network data cache capacity of the terminal meeting the preset storage condition, sending a data acquisition request to the network collaboration node; The cached target traffic data is received, which is sent by the network cooperation node in response to the data acquisition request.

18. A data cache device, comprising: An interface module, configured to receive a collaborative caching request sent by a terminal, wherein the collaborative caching request is generated by the terminal when a detection result of a performance indicator of the terminal's own device meets a preset condition for initiating collaborative caching; A cache module, configured to cache target traffic data, wherein the target traffic data includes: traffic data indicated by the collaborative cache request in the data sent by the server to the terminal; The interface module is also used to send the cached target traffic data to the terminal when receiving a data acquisition request sent by the terminal. The data acquisition request is sent by the terminal when the network data cache capacity of the terminal meets the preset storage condition.

19. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method according to any one of claims 1 to 16 when executing the computer-readable instructions.

20. A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Data packet transmission method, network side device, and user equipment

    CN108370372A

  • Game resource dynamic caching method and device, storage medium and electronic equipment

    CN112817769A

  • Streaming media file intelligent processing method, control panel and computer readable storage medium

    CN112995693A

  • Methods and systems for caching a media asset

    US20170126831A1