Data processing method and related products

By evaluating and deleting low-priority data within the cache area, the problem of insufficient cache area storage space was solved, achieving high data storage hit rate and server load optimization in a microservice architecture.

CN114579481BActive Publication Date: 2026-02-03CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210213358.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2026-02-03
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

In a microservice architecture, when the remaining storage space in the cache area is insufficient, existing technologies struggle to effectively guarantee the data storage hit rate, leading to increased server pressure.

Method used

By assessing the importance level of each piece of data within the cache area, data with lower importance levels is deleted, and target data is stored in the cache area according to preset rules, ensuring that storage space meets the requirements while improving the hit rate.

Benefits of technology

With limited storage space, it effectively improves the data storage hit rate, reduces server pressure, and optimizes storage resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579481B_ABST
    Figure CN114579481B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data processing method and related products, the method comprising: obtaining target data; detecting that a remaining storage space of a preset storage area cannot meet a storage requirement of the target data; determining an importance level of each data in the preset storage area according to a preset rule, the importance level being used to indicate a possibility of reuse of the data; deleting first data in the preset storage area, the remaining storage space of the preset storage area meeting the storage requirement of the target data after the first data is deleted, the importance level of the first data being lower than importance levels of other data in the preset storage area; and storing the target data in the preset storage area. The present application is beneficial to meeting the storage requirement of the target data while ensuring a hit rate of stored data in the storage area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to a data processing method and related products. Background Technology

[0002] Microservices are a system architecture design that breaks down a system into multiple smaller services, each running in its own independent process and communicating and collaborating with each other based on specific protocols. When microservices call each other, request data is stored and forwarded through caching. If a large number of related requests occur, cache replacement is needed to alleviate server load; therefore, cache replacement strategy is a key aspect of caching strategies. Summary of the Invention

[0003] This application provides a data processing method and related products to ensure the hit rate of stored data within the storage area while meeting the target data storage requirements.

[0004] In a first aspect, embodiments of this application provide a data processing method, including:

[0005] Obtain the target data;

[0006] The remaining storage space in the preset storage area is insufficient to meet the storage requirements of the target data.

[0007] The importance level of each data in the preset storage area is determined according to preset rules, and the importance level is used to indicate the likelihood of data being reused.

[0008] Delete the first data in the preset storage area. After deleting the first data, the remaining storage space in the preset storage area meets the storage requirements of the target data. The importance level of the first data is lower than the importance level of other data in the preset storage area.

[0009] The target data is stored in the preset storage area.

[0010] Secondly, embodiments of this application provide a data processing apparatus, including:

[0011] The acquisition unit is used to acquire target data;

[0012] The detection unit is used to detect that the remaining storage space in the preset storage area cannot meet the storage requirements of the target data;

[0013] A determining unit is configured to determine the importance level of each data in the preset storage area according to preset rules, wherein the importance level is used to indicate the likelihood of data being reused.

[0014] The deletion unit is used to delete the first data in the preset storage area. After deleting the first data, the remaining storage space in the preset storage area meets the storage requirements of the target data. The importance level of the first data is lower than the importance level of other data in the preset storage area.

[0015] A storage unit is used to store the target data in the preset storage area.

[0016] Thirdly, embodiments of this application provide a server including a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the first aspect of embodiments of this application.

[0017] Fourthly, embodiments of this application provide a computer storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the first aspect of this embodiment.

[0018] As can be seen in this embodiment, after acquiring the target data, if it is detected that the remaining storage space in the preset storage area cannot meet the storage requirements of the target data, the importance level of each data in the preset storage area is determined according to preset rules, and the first data in the preset storage area is deleted. Then, the target data is stored in the preset storage area. The possibility of data with high importance levels being reused is considered. The importance level of the first data is lower than that of other data in the preset storage area. After deleting the first data, the remaining storage space in the preset storage area meets the storage requirements of the target data. Therefore, when the remaining storage space in the preset storage area cannot store the target data, by evaluating the importance level of each data in the preset storage space, deleting data with lower importance levels, and then storing the target data, it is beneficial to meet the target data storage requirements while ensuring the hit rate of stored data in the storage area. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1A This is a schematic diagram of the architecture of an example data processing system provided in an embodiment of this application;

[0021] Figure 1BThis is a schematic diagram of the architecture of another example data processing system provided in the embodiments of this application;

[0022] Figure 1C This is a schematic diagram illustrating the composition of a server provided in an embodiment of this application;

[0023] Figure 2A This is a flowchart illustrating a data processing method provided in an embodiment of this application;

[0024] Figure 2B This is a data inheritance relationship topology diagram provided in an embodiment of this application;

[0025] Figure 2C This is a data link representation example provided in an embodiment of this application;

[0026] Figure 3A This is a functional unit block diagram of a data processing device provided in an embodiment of this application;

[0027] Figure 3B This is a block diagram of the functional units of another data processing device provided in the embodiments of this application. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0029] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0030] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0031] The embodiments of this application will now be described with reference to the accompanying drawings.

[0032] The technical solution of this application can be applied to, for example... Figure 1A or Figure 1B The example data processing system 10 shown includes a server and electronic devices. The server includes cache nodes and service nodes, and a preset storage area is set up on the server side for caching data from the service nodes. Specifically, the cache nodes manage the data in the preset storage area. Users can communicate with the cache nodes on the server side through electronic devices to request data. The cache nodes can send the target data corresponding to their data request to the electronic devices. If the target data is not stored in the preset storage area, the cache node can communicate with X service nodes to obtain the target data from the service nodes and store it in the preset storage area, and also send the target data to the electronic devices. When storing target data in the preset storage area, if the remaining storage space in the preset storage area cannot meet the storage requirements of the target data, the cache node deletes some data with lower importance levels in the preset storage area to ensure that the remaining storage space in the preset storage area is sufficient to store the target data, and then stores the target data in the preset storage area. This helps to meet the data storage requirements of the target data while ensuring the hit rate of the stored data in the storage area.

[0033] In specific implementation, such as Figure 1A As shown, the cache node and X service nodes can be deployed on the same server. All data requests from the electronic device 200 are sent to the server 100. The server 100 calls the cache node to perform the steps described above to send the target data to the electronic device 200. Where the cache node is involved in obtaining the target data from the service node, the server can call the cache node to send a data request to the corresponding service node, and then the service node sends the target data to the cache node.

[0034] Or, such as Figure 1B As shown, the cache node and X service nodes can be deployed in different services. Electronic device 200 communicates with server 100 and sends data requests. Server 100, acting as a cache node, performs the step of sending target data to electronic device 200. In the part involving the cache node retrieving target data from the server node, [the process is similar to...]. Figure 1A For servers with different architectures, server 100 sends a data request to server 300, and server 300 sends the target data to server 100.

[0035] It should be noted that, Figure 1A and Figure 1BThe example only shows one electronic device 200 and three servers 300. In actual applications, the number of electronic devices 200 and servers 300 can be more or less. X can be any positive integer, and there is no specific limitation here.

[0036] The structure of server 100 in this application can be as follows: Figure 1C As shown, server 100 may include processor 110, memory 120, communication interface 130, and one or more programs 121. The one or more programs 121 are stored in the memory 120 and configured to be executed by the processor 110. Each program 121 includes instructions for performing any step in the above method embodiments. The communication interface 130 supports communication between server 100 and other devices. In specific implementations, processor 110 is used to perform any step executed by an electronic device in the following method embodiments, and when performing data transmission such as sending, it may selectively invoke the communication interface 130 to complete the corresponding operation. It should be noted that the above schematic diagram of server 100 is only an example; the actual components included may be more or fewer, and this is not a unique limitation.

[0037] Please see Figure 2A , Figure 2A This is a flowchart illustrating a data processing method provided in an embodiment of this application. This method can be applied to, for example... Figure 1A and Figure 1B Server 100 in the data processing system shown, such as Figure 2A As shown, the data processing method includes:

[0038] Step 201: Obtain the target data.

[0039] In a specific implementation, obtaining the target data can be achieved by the server 100 directly calling the service node corresponding to the target data, or by the server 100 sending a data request to the server 300 corresponding to the target data and receiving the target data from the server 300.

[0040] Step 202: It is detected that the remaining storage space in the preset storage area cannot meet the storage requirements of the target data.

[0041] The preset storage area, also known as the cache, can be used to cache data from service nodes. The remaining storage space cannot meet the storage requirements of the target data, meaning that the remaining storage space is less than the storage space required by the target data.

[0042] Step 203: Determine the importance level of each data in the preset storage area according to preset rules.

[0043] The importance level indicates the likelihood of data being reused. Specifically, the higher the likelihood of data being reused, the higher the importance level of the data.

[0044] Step 204: Delete the first data in the preset storage area.

[0045] Wherein, the remaining storage space in the preset storage area after deleting the first data meets the storage requirements of the target data, and the importance level of the first data is lower than the importance level of other data in the preset storage area.

[0046] The remaining storage space meets the storage requirements of the target data, meaning the remaining storage space is not less than the storage space required by the target data. In other words, in step 204, data with a low probability of being reused in the preset storage area is deleted, which helps to ensure the hit rate of data in the preset storage area.

[0047] Step 205: Store the target data in the preset storage area.

[0048] As can be seen, in this embodiment, after the server acquires the target data, if it detects that the remaining storage space in the preset storage area cannot meet the storage requirements of the target data, it determines the importance level of each data in the preset storage area according to preset rules, deletes the first data in the preset storage area, and then stores the target data in the preset storage area. The possibility of important data being reused is considered. The importance level of the first data is lower than that of other data in the preset storage area. After deleting the first data, the remaining storage space in the preset storage area meets the storage requirements of the target data. Therefore, when the remaining storage space in the preset storage area cannot store the target data, by evaluating the importance level of each data in the preset storage space, deleting data with lower importance levels, and then storing the target data, it is beneficial to meet the target data storage requirements while ensuring the hit rate of stored data in the storage area.

[0049] In one possible example, determining the importance level of each data in the preset storage area according to preset rules includes: determining the importance level of each data according to the inheritance relationship between the data.

[0050] In the specific implementation, server 100 can establish an inheritance relationship topology based on the inheritance relationship of each data in the preset storage area. When determining the importance level of each data according to the inheritance relationship between each data, considering that the data of the end node in the inheritance relationship topology inherits the data of one or more other "higher-level" nodes, the usage frequency of the inherited nodes usually changes. Therefore, the importance level of data closer to the end in the inheritance relationship topology can be set to be lower, and the importance level of data closer to the top is higher. That is, when the space in the preset storage area is insufficient, the end node in the inheritance relationship topology is deleted first.

[0051] For example, please refer to Figure 2B , Figure 2B The diagram illustrates an exemplary inheritance topology, specifically including classes 1, 2, 3, 4, 5, and 6. Classes 2 and 3 inherit from class 1, class 4 inherits from classes 2 and 3, class 5 inherits from class 4, and class 6 inherits from class 3. Therefore, class 1 has the highest importance level, while classes 5 and 6 have the lowest importance levels. Figure 2B The importance levels of the six data points, from highest to lowest, can be ordered as follows: Class 1, Class 2, and Class 3 (same importance level); Class 4, Class 5, and Class 6 (same importance level). Furthermore, for data at the same level in the inheritance topology, the more subclasses that inherit from that data, the higher its importance level. Figure 2B The importance level of Class 3 is higher than that of Class 2, and ultimately... Figure 2B The importance levels of the six data points can be ranked as follows: Class 1, Class 3, Class 2, Class 4, Class 5, and Class 6 (all with the same importance level).

[0052] As can be seen, in this example, determining the importance level of each data based on the inheritance relationship between data in the preset storage area helps improve the accuracy of the determined importance level and further ensures the hit rate of data in the preset storage area.

[0053] In one possible example, determining the importance level of each piece of data in the preset storage area according to preset rules includes: determining the importance level of the second data based on the storage duration of the second data in the preset storage area and the number of times the second data request is received, wherein the second data request corresponds to the second data, and the second data is any one of the data.

[0054] The second data request corresponds to the second data, meaning the second data is the data requested by the second data request.

[0055] The number of times a second data request is received can be the number of historical second data requests received by server 100 within a first preset time period. That is, the importance level of the data is determined based on the actual data requests received by the server in the past, which improves the data hit rate. Since historical data can be accurately determined through statistics, the determined importance level is relatively accurate. Alternatively, it can be the number of times a second request may be received within a second preset time period determined according to preset request count determination rules. The second preset time period can be a period of time after the current moment, that is, predicting the number of times a second data request may be received in the future. The importance level of the data is determined based on the possible data requests in the future, so that the data remaining in the preset storage area is as compatible as possible with the future data request requirements, thereby improving the data hit rate.

[0056] In practice, the importance level of the second data can be determined according to the following formula:

[0057] f(α,E,t)=α×E+(1-α)×t;

[0058] In this context, f(α,E,t) represents the importance level of the second data. α can be set by the user to adjust the influence of data storage duration and request frequency on the determination of the data importance level. E represents the number of times the second data request is received, and t represents the storage duration of the second data in the preset storage area. The values ​​of f(α,E,t) and t are directly proportional, as are the values ​​of f(α,E,t) and E. In other words, with a fixed storage duration for the second data, the more times the second request is received, the higher the importance level of the second data. Conversely, with a fixed number of times the second request is received, the longer the storage duration of the second data, the higher the importance level of the second data.

[0059] As can be seen, in this example, the importance level of the second data is determined based on the storage duration of the second data in the preset storage area and the number of times the second data is requested. Combining the storage duration and the number of requests to determine its importance level helps to improve the accuracy of the determined importance level and further ensures the hit rate of data in the preset storage area.

[0060] In one possible example, the number of times the second data request is received is determined by the following steps: inputting a first feature parameter into a pre-trained request count prediction model to obtain a request count prediction result for the second data request, wherein the first feature parameter is determined based on the second data request; and determining the request count prediction result as the number of times the second data request is received.

[0061] In specific implementation, the first feature parameter can be a parameter used to characterize the category of the second data request. Since the requested data are all selections of book content, the request category could be, for example, modern literature, ancient literature, or Western literature. When training the request count prediction model, the training data can be input into a Long Short-Term Memory (LSTM) network for learning, resulting in the trained request count prediction model. Specifically, a single training data point in the training dataset can include: the request category (i.e., the first feature parameter), and annotation information for that request (e.g., the actual number of times the request was received within a specific time period). The training data is input into the LSTM to obtain the prediction result (i.e., the predicted number of requests received within the aforementioned specific time period). Based on the prediction result and standard information, the parameters of the LSTM are adjusted to finally obtain the trained request count prediction model.

[0062] Subsequently, the first feature parameter of the second request is input into the trained request count prediction model to obtain the request count prediction result. This request count prediction result can be used to characterize the number of second requests that may be received within the aforementioned second preset time period. That is, the server can input the first feature parameter of the second request into the model to predict the number of times the second request will be received in the future within the second preset time period, and finally determine the importance level of the second data based on the prediction result.

[0063] As can be seen, in this example, the first feature parameter is input into the pre-trained request count prediction model to obtain the request count prediction result of the second data request. The first feature parameter is determined based on the second data request. The request count prediction result is determined as the number of times the second data request has been received. The model processes the feature parameter of the second request to obtain the request count prediction result and finally determines the number of times the second request has been received, which helps to improve the accuracy of the determined number of times the second request has been received.

[0064] In one possible example, the data in the preset storage area is stored according to the inheritance relationship between the data, and the target data includes a data linked list constructed according to the inheritance relationship of at least one sub-data, and different data linked lists do not have the same parent class.

[0065] In specific implementation, when data (e.g., target data) is transmitted between electronic devices and servers, and between cache nodes and service nodes, it may include a data linked list constructed based on the inheritance relationship of at least one sub-data. Specifically, when a cache node obtains target data from a service node, the service node may construct a data linked list based on the inheritance relationship topology graph. When a cache node sends target data to an electronic device, the cache node may establish a data linked list based on the inheritance relationship topology graph.

[0066] For example, taking a data linked list whose target data includes the aforementioned classes 1, 2, 3, 4, 5, and 6 as an example, the specific data linked list structure can be as follows: Figure 2C As shown, the inheritance relationship topology is converted into a collection of data linked lists. When a parent class has multiple subclasses, only one parent class needs to be kept in the collection of data linked lists. The parent class is not repeatedly presented in multiple data linked lists containing different subclasses. That is, when transmitting target data, duplicate parent classes are not transmitted, which helps to reduce the amount of data transmitted when transmitting target data.

[0067] Furthermore, in the specific implementation, when the server stores data in the preset storage area, it can again establish an inheritance relationship topology graph based on the inheritance relationships between the data. That is, it establishes the association relationships between the data based on the inheritance relationships and stores them, still based on the target data including... Figure 2C Taking a linked list as an example, when storing target data in a preset storage area, it can also be done in the following way: Figure 2B The inheritance relationship topology diagram shown stores the target data. Of course, if the sub-data of class 1 to class 6 also have inheritance relationships with the data originally stored in the preset storage area, the inheritance relationship topology diagram can be further improved based on the inheritance relationships.

[0068] As can be seen in this example, the data in the preset storage area is stored according to the inheritance relationship between the data. The target data includes a data linked list constructed according to the inheritance relationship of at least one sub-data. Different data linked lists do not have the same parent class, which helps to reduce the amount of data transmission and improve transmission efficiency.

[0069] In one possible example, the data in the preset storage area is stored according to the inheritance relationship between the data. The data includes a first parent class and a first subclass that inherits from the first parent class. The first subclass does not include third data, which is the same as the first parent class.

[0070] In the actual implementation, considering that subclasses usually inherit some data from the parent class, that is, the subclass includes the same data as the parent class, the data that is the same in the subclass and the parent class is not stored during storage. Instead, the parts that are different in the subclass and the parent class are stored, which can save storage space in the preset storage area.

[0071] As can be seen, in this example, the data in the preset storage area is stored according to the inheritance relationship between the data. Each data includes the first parent class and the first child class that inherits from the first parent class. The first child class does not include the third data. The third data is the same as the data in the first parent class. The data in the child class that is the same as the parent class is not saved repeatedly, which helps to save the storage space of the preset storage area.

[0072] In one possible example, acquiring the target data includes: receiving a target data request from an electronic device; detecting that the target data corresponding to the target request is not stored in the preset storage area; acquiring the target data according to the target request; after storing the target data in the preset storage area, the method further includes: sending the target data to the electronic device.

[0073] In practice, server 100 or cache node can query whether the target data is stored in the preset storage area based on the data request from the electronic device. If the target data is stored in the preset storage area, the target data can be sent directly to the electronic device. If it is not stored, the target data needs to be obtained according to the target request.

[0074] Specifically, to obtain target data based on a target request, server 100 can either call a cache node to send the target request to the service node corresponding to the target request, or server 100 can send the target request to server 300 corresponding to the target request. The service node or server can then send the target data to server 100 via either the cache node or server 300. The service node or server performs a corresponding data query based on the target request, and then establishes an inheritance relationship topology graph based on the data inheritance relationship. Further, it constructs a data linked list based on the inheritance relationship topology graph and sends it as the target data to the cache node or server 100. Subsequently, after receiving the target data, the cache node or server 100 can again construct the inheritance relationship topology graph based on the inheritance relationship, thereby storing the target data.

[0075] Furthermore, when transmitting target data (e.g., from a service node to a cache node, from server 300 to server 100, or from a cache node or server 100 to an electronic device), the target data can be converted into protobuf (a sequence-based structured data format for user data exchange with cross-platform, cross-language, and extensible characteristics) objects. Specifically, the protobuf protocol can be used to configure utility classes to achieve mutual conversion between Java (an object-oriented programming language for writing cross-platform applications) and protobuf objects. When transmitting target data, protobuf objects are used. Compared to the original transmission method using JSON (a text-based, language-independent lightweight data exchange format), JSON uses strings to bind fields and is in text format, while protobuf uses numbers to bind tags and is in binary bytecode format. Protobuf is significantly superior to JSON in terms of size and type determination, making it more conducive to data transmission.

[0076] As can be seen, in this example, a target data request is received from an electronic device. If the target data corresponding to the target request is not stored in the preset storage area, the target data is obtained according to the target request. After storing the target data in the preset storage area, the target data is sent to the electronic device. The specific data processing method is determined according to the target data request and the storage status of the preset storage area, which helps to ensure the flexibility of processing.

[0077] This application can divide the server into functional units based on the above method examples. For example, each function can be divided into its own functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0078] Figure 3A This is a functional unit block diagram of a data processing apparatus provided in an embodiment of this application. The data processing apparatus 30 can be applied to, for example... Figure 1A or Figure 1B On server 100 of the data processing system shown, the data processing device 30 includes:

[0079] Acquisition unit 301 is used to acquire target data;

[0080] The detection unit 302 is used to detect that the remaining storage space in the preset storage area cannot meet the storage requirements of the target data;

[0081] The determining unit 303 is used to determine the importance level of each data in the preset storage area according to preset rules, wherein the importance level is used to indicate the likelihood of data being reused.

[0082] Deletion unit 304 is used to delete the first data in the preset storage area. After deleting the first data, the remaining storage space in the preset storage area meets the storage requirements of the target data. The importance level of the first data is lower than the importance level of other data in the preset storage area.

[0083] Storage unit 305 is used to store the target data in the preset storage area.

[0084] In one possible example, the determining unit 303 is specifically used to: determine the importance level of each data based on the inheritance relationship between the data.

[0085] In one possible example, the determining unit 303 is specifically used to: determine the importance level of the second data based on the storage duration of the second data in the preset storage area and the number of times the second data request is received, wherein the second data request corresponds to the second data and the second data is any one of the data.

[0086] In one possible example, the number of times the second data request is received is determined by the following steps: inputting a first feature parameter into a pre-trained request count prediction model to obtain a request count prediction result for the second data request, wherein the first feature parameter is determined based on the second data request; and determining the request count prediction result as the number of times the second data request is received.

[0087] In one possible example, the data in the preset storage area is stored according to the inheritance relationship between the data, and the target data includes a data linked list constructed according to the inheritance relationship of at least one sub-data, and different data linked lists do not have the same parent class.

[0088] In one possible example, the data in the preset storage area is stored according to the inheritance relationship between the data. The data includes a first parent class and a first subclass that inherits from the first parent class. The first subclass does not include third data, which is the same as the first parent class.

[0089] In one possible example, the acquisition unit 301 is specifically configured to: receive a target data request from an electronic device; detect that the target data corresponding to the target request is not stored in the preset storage area; acquire the target data according to the target request; after storing the target data in the preset storage area, the method further includes: sending the target data to the electronic device.

[0090] When using integrated units, the functional unit composition block diagram of the data processing apparatus 30 provided in this application embodiment is as follows: Figure 3B As shown. In Figure 3B In this document, the data processing device 30 includes a processing module 310 and a communication module 311. The processing module 310 controls and manages the operations of the data processing device 30, including, for example, the steps performed by the acquisition unit 301, detection unit 302, determination unit 303, deletion unit 304, and storage unit 305, and / or other processes for performing the techniques described herein. The communication module 311 supports interaction between the data processing device 30 and other devices. Figure 3B As shown, the data processing device 30 may further include a storage module 312, which is used to store the program code and data of the data processing device 30.

[0091] The processing module 310 can be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication module 311 can be a transceiver, RF circuitry, or a communication interface, etc. The storage module 312 can be a memory.

[0092] All relevant content in each scenario involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here. All of the above data processing devices can execute the above... Figure 2A The steps performed by the server in the data processing method shown.

[0093] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes a server.

[0094] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0095] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0096] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0097] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0098] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

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

[0100] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0101] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data processing method, characterized in that, include: Obtain the target data; The remaining storage space in the preset storage area is insufficient to meet the storage requirements of the target data. The importance level of each data in the preset storage area is determined according to preset rules. The importance level is used to indicate the likelihood of data being reused. The determination of the importance level of each data in the preset storage area according to preset rules includes: determining the importance level of each data according to the inheritance relationship between the data. Delete the first data in the preset storage area. After deleting the first data, the remaining storage space in the preset storage area meets the storage requirements of the target data. The importance level of the first data is lower than the importance level of other data in the preset storage area. Storing the target data in the preset storage area includes: establishing an inheritance relationship topology graph based on the inheritance relationship between each data to store the target data, wherein the target data includes a data linked list constructed based on the inheritance relationship of at least one sub-data, and different data linked lists do not include the same parent class; In determining the importance level of each data based on the inheritance relationship between them, the data at the end of the inheritance relationship topology graph inherits data from one or more other higher-level nodes. The usage frequency of the inherited nodes will change. The data closer to the end of the inheritance relationship topology graph has a lower importance level, and the data closer to the top has a higher importance level. When the preset storage area space is insufficient, the data of the nodes at the end of the inheritance relationship topology graph is deleted first.

2. The method according to claim 1, characterized in that, The data in the preset storage area is stored according to the inheritance relationship between the data. Each data includes a first parent class and a first subclass that inherits from the first parent class. The first subclass does not include third data, which is the same as the first parent class.

3. The method according to claim 1 or 2, characterized in that, The acquisition of target data includes: Receive target data requests from electronic devices; It was detected that the target data corresponding to the target data request was not stored in the preset storage area; The target data is requested to be obtained according to the target data request; After storing the target data in the preset storage area, the method further includes: The target data is sent to the electronic device.

4. A data processing apparatus, the apparatus being configured to perform the method as described in any one of claims 1-3, characterized in that, include: The acquisition unit is used to acquire target data; The detection unit is used to detect that the remaining storage space in the preset storage area cannot meet the storage requirements of the target data; A determining unit is configured to determine the importance level of each data in the preset storage area according to preset rules, wherein the importance level is used to indicate the likelihood of data being reused. The deletion unit is used to delete the first data in the preset storage area. After deleting the first data, the remaining storage space in the preset storage area meets the storage requirements of the target data. The importance level of the first data is lower than the importance level of other data in the preset storage area. A storage unit is used to store the target data in the preset storage area.

5. A server, characterized in that, The method includes a processor, a memory, a communication interface, and one or more programs, said one or more programs being stored in the memory and configured to be executed by the processor, said programs including instructions for performing the steps of the method as described in any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange is provided, wherein the computer program causes a computer to perform the steps of the method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Data downloading method, data downloading device, terminal and computer-readable storage medium

    CN108063818A

  • Data storage method and device, electronic equipment and computer readable medium

    CN112163176A