Data processing method, device, electronic device and storage medium

By monitoring capacity in the server's target cache space and querying the binding relationship between the data to be replaced and the key processes, the problem of server performance limitation after data elimination is solved, and more efficient data replacement and access efficiency is achieved.

CN114564365BActive Publication Date: 2025-03-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210220590.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-08
Publication Date
2025-03-18
Estimated Expiration
2042-03-08

AI Technical Summary

Technical Problem

During the data elimination process, although the eliminated data meets the elimination conditions, the elimination will lead to limited service performance of the server and affect access efficiency.

Method used

By monitoring the target cache space of the target server, when its capacity reaches the preset capacity, a data replacement task is generated, the operation data to be replaced is obtained, and the binding relationship between it and the key process is queried, and the data replacement operation is determined based on the query results.

Benefits of technology

Ensure the access requirements of key processes for running data, avoid the impact of server service performance and access efficiency, and improve the efficiency and effectiveness of data elimination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114564365B_ABST
    Figure CN114564365B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, device, electronic device and storage medium. The method includes: monitoring the target cache space of the target server in the current detection cycle; generating a data replacement task when the capacity of the target cache space reaches a preset threshold; obtaining the first operating data to be replaced in the target cache space based on the data replacement task, and querying the binding relationship between the first operating data and the key process to obtain the query result; performing the data replacement operation corresponding to the query result on the first operating data. When the capacity of the target cache space reaches the preset capacity, the method provided by the present application will automatically determine the operating data to be replaced, and at the same time determine whether the operating data has a binding relationship with the key process. If there is a binding relationship, the operating data to be replaced is re-determined, thereby ensuring the access needs of the key process to the operating data, solving the problem of limited service performance of the server and affecting access efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0002] BMC supports the industry standard IPMI specification. This specification describes the management functions that have been built into the server motherboard. Functions include local and remote diagnosis, console support, configuration management, hardware management and troubleshooting. In the process of managing the server, it is necessary to monitor the use of fans, memory hard disks and other key components. Monitoring of key server information is essential for monitoring and analyzing the operating status of the entire server. This key information may include: key voltage information, key temperature information, and power consumption information. By monitoring this key information, a better analysis basis and data support can be provided for server maintenance and troubleshooting.

[0003] However, BMC memory resources are limited after all, and the cache cannot be increased indefinitely. There must be a limit on the cache space, which requires that some data with no cache value or data with low access frequency be eliminated to make room for new cache data. However, during the current data elimination process, although some eliminated data meets the elimination conditions, after being eliminated, the server's service performance will be limited, affecting access efficiency. Summary of the invention

[0004] In order to solve the technical problem that during the data elimination process, although some eliminated data meets the elimination conditions, after being eliminated, the service performance of the server will be limited, affecting the access efficiency, the present application provides a data processing method, device, electronic device and storage medium.

[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, including:

[0006] Monitoring a target cache space of a target server in a current detection cycle, wherein the target cache space stores operation data of key components in the target server;

[0007] When the current capacity of the target cache space reaches a preset capacity, generating a data replacement task;

[0008] Acquire the first running data to be replaced in the target cache space based on the data replacement task, and query the binding relationship between the first running data and the key process to obtain a query result;

[0009] A data replacement operation corresponding to the query result is performed on the first running data.

[0010] Further, the obtaining the first running data to be replaced in the target cache space based on the data replacement task includes:

[0011] Calling a data replacement interface based on the data replacement task;

[0012] Acquire a data storage linked list through the data replacement interface, wherein the data storage linked list stores first candidate operation data arranged according to access time and second candidate operation data arranged according to access count;

[0013] Acquire third candidate operation data whose access time does not satisfy a preset time from the first candidate operation data, and acquire fourth candidate operation data whose access times do not satisfy a preset times from the second candidate operation data;

[0014] The operation data that overlaps between the third candidate operation data and the fourth candidate operation data is determined as the first operation data.

[0015] Furthermore, the method further comprises:

[0016] Dividing the operation data in the target cache space according to the logical addresses, and writing the operation data belonging to the same logical address into the same cache data block;

[0017] Extracting a weight value corresponding to each logical address from the preset configuration information, wherein the weight value is used to indicate the importance of the component corresponding to the logical address;

[0018] Determine the logical address whose weight value is higher than the preset threshold as the target logical address, and obtain the key process and the target cache data block corresponding to the target logical address;

[0019] A binding relationship between the key process and the target cache data block is established.

[0020] Further, the querying of the binding relationship between the first operation data and the key process to obtain the query result includes:

[0021] Acquire a first cache data block where the first running data is located;

[0022] It is queried from the binding relationship whether there is a key process corresponding to the first cache data block, and the query result is obtained.

[0023] Further, performing the data replacement operation corresponding to the query result on the first operation data includes:

[0024] When the query result indicates that there is a binding relationship between the first running data and the key process, obtaining the second running data to be replaced from the target cache space;

[0025] In the case that there is no binding relationship between the second operating data and the key process, a data replacement operation is performed on the second operating data.

[0026] Further, performing the data replacement operation corresponding to the query result on the first operation data includes:

[0027] When the query result indicates that there is no binding relationship between the first operating data and the key process, a replacement operation is performed on the first operating data.

[0028] Furthermore, the method further comprises:

[0029] When the current capacity of the target cache space does not reach the preset capacity, obtaining a capacity difference between the current capacity and the preset capacity;

[0030] When the capacity difference falls within a preset range, obtaining third operation data to be replaced in the target cache space;

[0031] Add identification information to the third operating data, and when the current capacity reaches the preset capacity, perform a replacement operation on the third operating data carrying the identification information.

[0032] According to another aspect of the embodiment of the present application, there is further provided a data processing device, including:

[0033] A monitoring module, used to monitor a target cache space of a target server in a current detection cycle, wherein the target cache space stores operation data of key components in the target server;

[0034] A generating module, configured to generate a data replacement task when the capacity of the target cache space reaches a preset threshold;

[0035] A query module, configured to obtain the first running data to be replaced in the target cache space based on the data replacement task, and query the binding relationship between the first running data and the key process to obtain a query result;

[0036] An execution module is used to execute a data replacement operation corresponding to the query result on the first operation data.

[0037] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.

[0038] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.

[0039] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.

[0040] The above-mentioned technical solution provided by the embodiment of the present application has the following advantages over the prior art: when the capacity of the target cache space reaches the preset capacity, the method provided by the embodiment of the present application will automatically determine the running data to be replaced, and at the same time determine whether the running data has a binding relationship with the key process. If there is a binding relationship, the running data to be replaced is re-determined, thereby ensuring the key process's access needs to the running data, and solving the problem of limited service performance of the server and affecting access efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0043] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;

[0044] Figure 2 A flowchart of a data processing method provided in another embodiment of the present application;

[0045] Figure 3 A flowchart of a data processing method provided in another embodiment of the present application;

[0046] Figure 4 A block diagram of a data processing device provided in an embodiment of the present application;

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

[0048] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0049] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another similar entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0050] The embodiments of the present application provide a data processing method, device, electronic device and storage medium. The method provided in the embodiments of the present invention can be applied to any required electronic device, for example, it can be an electronic device such as a server, a terminal, etc., which is not specifically limited here. For the convenience of description, it is referred to as an electronic device in the following.

[0051] According to one aspect of the embodiments of the present application, a method embodiment of a data processing method is provided. Figure 1 A flowchart of a data processing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0052] Step S11, monitoring a target cache space of the target server in a current detection cycle, wherein the target cache space stores operating data of key components in the target server.

[0053] In the embodiment of the present application, by periodically controlling the sensors deployed on each key component to collect the key component, the operation data of each key component of the target server can be obtained, such as: the power consumption, voltage and temperature value of the CPU, the power consumption, voltage and temperature value of the hard disk, the power consumption, voltage and temperature value of the mainboard. After obtaining the operation data of each key component, the operation data will be stored in the target cache space of the target server according to the detection time.

[0054] In the embodiment of the present application, since the running data is stored periodically in the target cache space and the resources of the target cache space are limited, in order to ensure that the target cache space is always available, it is necessary to periodically monitor the capacity of the target cache space to prevent the situation where the capacity of the target cache space is insufficient.

[0055] Step S12: when the current capacity of the target cache space reaches a preset capacity, a data replacement task is generated.

[0056] In the embodiment of the present application, the target cache space is monitored during the current detection cycle, the current capacity of the target cache space during the current detection cycle is obtained in real time, and the current capacity is compared with the preset capacity. If the current capacity reaches the preset capacity, a data replacement task is automatically generated. The data replacement task is used to obtain the running data to be replaced in the target cache space and eliminate the running data to be replaced.

[0057] Step S13, based on the data replacement task, the first running data to be replaced in the target cache space is obtained, and the binding relationship between the first running data and the key process is queried to obtain a query result.

[0058] In an embodiment of the present application, obtaining first running data to be replaced in a target cache space based on a data replacement task includes the following steps A1-A4:

[0059] Step A1: calling a data replacement interface based on a data replacement task.

[0060] In the embodiment of the present application, a data replacement interface is called according to a data replacement task. A least recently used (Least Recently Used, abbreviated: LRU) algorithm is defined in the data replacement interface. The LRU algorithm eliminates data according to the historical access records of the data.

[0061] Step A2, obtaining a data storage linked list through a data replacement interface, wherein the data storage linked list stores first candidate operation data arranged according to access time and second candidate operation data arranged according to access count.

[0062] In the embodiment of the present application, a data storage linked list is obtained through a data replacement interface, and the first candidate operation data arranged according to access time is obtained in the data storage linked list, for example: access time T1—operation data H1, access time T2—operation data H2, access time T3—operation data H3, access time T4—operation data H4, T1>T2>T3>T4. And the second candidate operation data arranged according to the number of accesses, for example: access number N1—operation data H4, access number N2—operation data H3, access number N3—operation data H1, access number N4—operation data H2, N1>N2>N3>N4.

[0063] It should be noted that the operation data are arranged according to the access time and the access count, respectively, so as to facilitate the subsequent rapid screening of the operation data to be replaced from the candidate operation data.

[0064] Step A3, obtaining third candidate operation data whose access time does not meet the preset time from the first candidate operation data, and obtaining third candidate operation data whose access time does not meet the preset time from the first candidate operation data.

[0065] Step A4: determine the overlapping operation data between the third candidate operation data and the fourth candidate operation data as the first operation data.

[0066] In the embodiment of the present application, the access time of the first candidate operation data is compared with the preset time. If the access time is less than or equal to the preset time, it is determined that the access time does not meet the preset time. At this time, the operation data whose access time does not meet the preset time is determined as the third candidate operation data. At the same time, the access times of the second candidate operation data are compared with the preset times. If the access times are less than or equal to the preset times, it is determined that the access times do not meet the preset times. At this time, the operation data whose access times do not meet the preset times is determined as the fourth candidate operation data. Finally, the operation data that overlaps between the third candidate operation data and the fourth candidate operation data is determined as the first operation data.

[0067] In the embodiment of the present application, querying the binding relationship between the first operation data and the key process to obtain the query result includes the following steps B1-B2:

[0068] Step B1, obtaining a first cache data block where the first running data is located.

[0069] Step B2: query from the binding relationship whether there is a key process corresponding to the first cache data block, and obtain a query result.

[0070] In an embodiment of the present application, the logical address corresponding to the first running data is first queried, and the first cache data block corresponding to the logical address is determined, and then a query is made as to whether there is a key process corresponding to the first cache data block in the pre-established binding relationship, thereby obtaining a query result.

[0071] Step S14: performing a data replacement operation corresponding to the query result on the first operation data.

[0072] In an embodiment of the present application, step S14, performing a data replacement operation corresponding to the query result on the first running data, includes: when the query result is that there is a binding relationship between the first running data and the key process, obtaining the second running data to be replaced from the target cache space; when there is no binding relationship between the second running data and the key process, performing a data replacement operation on the second running data.

[0073] In the embodiment of the present application, when the query result shows that there is a binding relationship between the first operation data and the key process, the second operation data to be replaced is obtained from the target cache space, and the second operation data can be the operation data with the smallest access times, or the operation data with the earliest access time. At the same time, the logical address of the second operation data is obtained, and the second cache data block corresponding to the logical address is searched, and it is queried whether there is a key process corresponding to the second cache data block in the pre-established binding relationship. If there is no binding relationship between the second operation data and the key process, a data replacement operation is performed on the second operation data.

[0074] In an embodiment of the present application, step S14, performing a data replacement operation corresponding to the query result on the first operation data, includes: when the query result is that there is no binding relationship between the first operation data and the key process, performing a replacement operation on the first operation data.

[0075] The method provided in the embodiment of the present application will automatically determine the running data to be replaced when the capacity of the target cache space reaches the preset capacity, and at the same time determine whether the running data has a binding relationship with the key process. If there is a binding relationship, the running data to be replaced will be re-determined, thereby ensuring the key process's access needs to the running data, solving the problem of limited service performance of the server and affecting access efficiency.

[0076] The present application also provides a data processing method. Figure 2 A flowchart of a data processing method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method also includes:

[0077] Step S21 , dividing the running data in the target cache space according to the logical addresses, and writing the running data belonging to the same logical address into the same cache data block.

[0078] In the embodiment of the present application, the logical address consists of two parts, a segment identifier and an offset within the segment. The segment identifier is composed of a 16-bit field, called a segment selector. The first 13 bits are an index number. The last 3 bits contain relevant server component information. When the running data in the target cache space is divided according to the logical address, it can be divided according to the last three bits of the logical address, so that the running data belonging to the same component can be written into the same cache data block.

[0079] Step S22: extracting a weight value corresponding to each logical address from the preset configuration information, wherein the weight value is used to indicate the importance of the component corresponding to the logical address.

[0080] In an embodiment of the present application, the preset configuration information can be set by the user. Since the logical address carries an identifier for representing the server component, the user can set the weight value corresponding to each logical address in the preset configuration information in advance according to the importance of each component of the server.

[0081] Step S23: determine the logical address with a weight value higher than a preset threshold as the target logical address, and obtain the key process and the target cache data block corresponding to the target logical address.

[0082] In the embodiment of the present application, the weight values ​​corresponding to the logical addresses are compared with the preset thresholds, and the logical addresses with weight values ​​higher than the preset thresholds are screened out, and the screened out weight values ​​are determined as the target logical addresses. Then, the target cache data block corresponding to the target logical address is obtained from the target cache space, and the process corresponding to the target logical address is obtained from the server, and the process is determined as the key process.

[0083] Step S24, establishing a binding relationship between the key process and the target cache data block.

[0084] In an embodiment of the present application, after obtaining the target cache data block and the key process, a binding relationship is established between the key process and the target cache data block, so that when the data is subsequently replaced, it is possible to quickly determine whether the replaced data belongs to the target cache data block, thereby determining whether the replaced data has a relationship with the key process, and effectively ensuring the key process's access to the data.

[0085] The present application also provides a data processing method. Figure 3 A flowchart of a data processing method provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the method also includes:

[0086] Step S31, when the current capacity of the target cache space does not reach the preset capacity, obtain the capacity difference between the current capacity and the preset capacity.

[0087] Step S32: when the capacity difference falls within a preset range, obtaining the third running data to be replaced in the target cache space.

[0088] Step S33, adding identification information to the third operating data, and performing a replacement operation on the third operating data carrying the identification information when the current capacity reaches the preset capacity.

[0089] In the embodiment of the present application, when the current capacity of the target cache space does not reach the preset capacity, the capacity difference between the current capacity and the preset capacity will be automatically calculated. When the capacity difference falls within the preset range, the third operation data to be replaced will be obtained from the target cache space in advance. The process of obtaining the third operation data is as follows: the operation data with the smallest number of accesses or the operation data with the earliest access time is obtained from the data storage linked list as the third operation data.

[0090] Then, identification information is added to the third operation data. This facilitates the subsequent replacement operation of the third operation data carrying the identification information when the current capacity reaches the preset capacity. This achieves the early screening of the data to be replaced, ensuring that when the capacity of the target cache space reaches the preset capacity, the capacity can be quickly restored to within the preset capacity.

[0091] Figure 4 This is a block diagram of a data processing device provided in an embodiment of the present application. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 4 As shown, the device comprises:

[0092] The monitoring module 41 is used to monitor the target cache space of the target server in the current detection cycle, wherein the target cache space stores the operation data of the key components in the target server.

[0093] The generating module 42 is used to generate a data replacement task when the capacity of the target cache space reaches a preset threshold.

[0094] The query module is used to obtain the first running data to be replaced in the target cache space based on the data replacement task, and query the binding relationship between the first running data and the key process to obtain the query result.

[0095] The execution module 44 is used to execute the data replacement operation corresponding to the query result on the first operation data.

[0096] In an embodiment of the present application, a query module is used to call a data replacement interface based on a data replacement task; obtain a data storage linked list through the data replacement interface, wherein the data storage linked list stores first candidate operation data arranged according to access time, and second candidate operation data arranged according to access count; obtain third candidate operation data whose access time does not meet a preset time from the first candidate operation data, and obtain fourth candidate operation data whose access count does not meet a preset count from the second candidate operation data; and determine the operation data that overlaps between the third candidate operation data and the fourth candidate operation data as the first operation data.

[0097] In an embodiment of the present application, the data processing device also includes: establishing a module for dividing the running data in the target cache space according to the logical address, and writing the running data belonging to the same logical address into the same cache data block; extracting the weight value corresponding to each logical address from the preset configuration information, wherein the weight value is used to indicate the importance of the component corresponding to the logical address; determining the logical address with a weight value higher than the preset threshold as the target logical address, and obtaining the key process and the target cache data block corresponding to the target logical address; and establishing a binding relationship between the key process and the target cache data block.

[0098] In an embodiment of the present application, the query module is used to obtain the first cache data block where the first running data is located; query from the binding relationship whether there is a key process corresponding to the first cache data block, and obtain the query result.

[0099] In an embodiment of the present application, the execution module 44 is used to obtain the second running data to be replaced from the target cache space when the query result shows that there is a binding relationship between the first running data and the key process; and to perform a data replacement operation on the second running data when there is no binding relationship between the second running data and the key process.

[0100] In the embodiment of the present application, the execution module 44 is used to perform a replacement operation on the first operation data when the query result is that there is no binding relationship between the first operation data and the key process.

[0101] In an embodiment of the present application, the data processing device also includes: a processing module, which is used to obtain the capacity difference between the current capacity and the preset capacity when the current capacity of the target cache space does not reach the preset capacity; when the capacity difference falls within a preset range, obtain the third operating data to be replaced in the target cache space; add identification information to the third operating data, and when the current capacity reaches the preset capacity, perform a replacement operation on the third operating data carrying the identification information.

[0102] The present application also provides an electronic device, such as Figure 5As shown, the electronic device may include: a processor 1501 , a communication interface 1502 , a memory 1503 and a communication bus 1504 , wherein the processor 1501 , the communication interface 1502 , and the memory 1503 communicate with each other via the communication bus 1504 .

[0103] Memory 1503, used for storing computer programs;

[0104] The processor 1501 is used to implement the steps of the above embodiment when executing the computer program stored in the memory 1503.

[0105] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0106] The communication interface is used for communication between the above terminal and other devices.

[0107] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0108] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0109] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the data processing method described in any one of the above embodiments.

[0110] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the data processing method described in any one of the above embodiments.

[0111] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk), etc.

[0112] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

[0113] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A data processing method, characterized in that: include: Monitoring a target cache space of a target server in a current detection cycle, wherein the target cache space stores operation data of key components in the target server; When the current capacity of the target cache space reaches a preset capacity, generating a data replacement task; Acquire the first running data to be replaced in the target cache space based on the data replacement task, and query the binding relationship between the first running data and the key process to obtain a query result; Performing a data replacement operation corresponding to the query result on the first operation data; The method further comprises: Dividing the running data in the target cache space according to the logical address, and writing the running data belonging to the same logical address into the same cache data block, wherein the logical address includes a segment identifier and an offset within the segment, and the segment identifier is composed of a 16-bit field, wherein the first 13 bits are an index number, and the last 3 bits contain related server component information; Extracting a weight value corresponding to each logical address from the preset configuration information, wherein the weight value is used to indicate the importance of the component corresponding to the logical address; Determine the logical address whose weight value is higher than the preset threshold as the target logical address, and obtain the key process and the target cache data block corresponding to the target logical address; A binding relationship between the key process and the target cache data block is established.

2. The method according to claim 1, characterized in that The obtaining the first running data to be replaced in the target cache space based on the data replacement task includes: Calling a data replacement interface based on the data replacement task; Acquire a data storage linked list through the data replacement interface, wherein the data storage linked list stores first candidate operation data arranged according to access time and second candidate operation data arranged according to access count; Acquire third candidate operation data whose access time does not satisfy a preset time from the first candidate operation data, and acquire fourth candidate operation data whose access times do not satisfy a preset times from the second candidate operation data; The operation data that overlaps between the third candidate operation data and the fourth candidate operation data is determined as the first operation data.

3. The method according to claim 1, characterized in that: The querying of the binding relationship between the first running data and the key process to obtain the query result includes: Acquire a first cache data block where the first running data is located; It is queried from the binding relationship whether there is a key process corresponding to the first cache data block, and the query result is obtained.

4. The method according to claim 1, characterized in that The performing the data replacement operation corresponding to the query result on the first operation data includes: When the query result indicates that there is a binding relationship between the first running data and the key process, obtaining the second running data to be replaced from the target cache space; In the case that there is no binding relationship between the second operating data and the key process, a data replacement operation is performed on the second operating data.

5. The method according to claim 1, characterized in that: The performing the data replacement operation corresponding to the query result on the first operation data includes: When the query result indicates that there is no binding relationship between the first operating data and the key process, a replacement operation is performed on the first operating data.

6. The method according to claim 1, characterized in that The method further comprises: When the current capacity of the target cache space does not reach the preset capacity, obtaining a capacity difference between the current capacity and the preset capacity; When the capacity difference falls within a preset range, obtaining third operation data to be replaced in the target cache space; Add identification information to the third operating data, and when the current capacity reaches the preset capacity, perform a replacement operation on the third operating data carrying the identification information.

7. A data processing device, characterized in that: include: A monitoring module, used to monitor a target cache space of a target server in a current detection cycle, wherein the target cache space stores operation data of key components in the target server; A generating module, configured to generate a data replacement task when the capacity of the target cache space reaches a preset threshold; A query module, configured to obtain the first running data to be replaced in the target cache space based on the data replacement task, and query the binding relationship between the first running data and the key process to obtain a query result; An execution module, configured to execute a data replacement operation corresponding to the query result on the first operation data; The data processing device also includes: an establishment module, which is used to divide the running data in the target cache space according to the logical address, and write the running data belonging to the same logical address into the same cache data block, wherein the logical address includes a segment identifier and an offset within the segment, and the segment identifier is composed of a 16-bit field, wherein the first 13 bits are an index number, and the following 3 bits contain related server component information; extracting the weight value corresponding to each logical address from the preset configuration information, wherein the weight value is used to indicate the importance of the component corresponding to the logical address; determining the logical address with a weight value higher than a preset threshold as the target logical address, and obtaining the key process and the target cache data block corresponding to the target logical address; and establishing a binding relationship between the key process and the target cache data block.

8. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the method steps of any one of claims 1 to 6 when running.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: A memory for storing a computer program; a processor for executing the method steps of any one of claims 1 to 6 by running the program stored in the memory.

Citation Information

Patent Citations

  • Cache control method and server

    CN107666509A