Operation data storage method, device and equipment and computer readable storage medium

By determining the cache page in the memory device and writing the running data to the cache page corresponding to the target module collection, the problem of inconvenience in running data storage in the prior art is solved, and the convenience of data usage and analysis efficiency are improved.

CN120029931APending Publication Date: 2025-05-23SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510239627.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

There is a lack of a mature operating data storage method in the prior art, which leads to relatively inconvenient operation of operating data and poor analysis efficiency.

Method used

Several cache pages are determined in the memory device, and the running data is written to the cache page corresponding to the target module collection, realizing the collection division and independent cache of the central processor functional submodules, eliminating the steps of manual classification.

Benefits of technology

It improves the convenience of operating data and analysis efficiency, so that the operating data in memory devices can be used in units of module collections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029931A_ABST
    Figure CN120029931A_ABST
Patent Text Reader

Abstract

The invention discloses an operation data storage method, device and equipment and a computer readable storage medium, belongs to the field of data storage, and considers that'operation data generated by a central processing unit 'needs to be classified when being used, so that a plurality of cache pages can be determined in memory equipment, and the operation data are stored in the cache pages. When the running data is written into the memory device, the running data can be written into the cache page corresponding to the target module set (the module set where the function sub-module to which the running data to be cached belongs is located), namely, the function sub-modules in the central processing unit are subjected to set division; according to the method, the operation data generated by the functional sub-modules in each module set are cached independently, so that the operation data in the memory device are used by taking the module set as a unit, the step of manual classification is omitted, and the use convenience and analysis efficiency of the operation data are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage, and in particular to a method, device, equipment and computer-readable storage medium for running data storage. Background Art

[0002] With the development of computer technology, various types of data processing devices have emerged. The central processing unit in the data processing device will generate a large amount of operation data (such as logs, alarms and events, etc.) during operation. These operation data have great analytical value and can be used for fault analysis and event tracing. However, the related technology lacks a mature operation data storage method, which makes the operation data inconvenient to use and the analysis efficiency of the operation data is poor.

[0003] Therefore, how to provide a solution to the above technical problems is a problem that those skilled in the art need to solve at present. Summary of the invention

[0004] The purpose of the present invention is to provide a method, device, equipment and computer-readable storage medium for storing operation data, which can determine a number of cache pages in a memory device, and then when writing the operation data to the memory device, the operation data can be written into the cache page corresponding to the target module set (the module set to which the functional sub-module to which the operation data to be cached belongs is located). That is, in the present invention, the functional sub-modules in the central processing unit are divided into sets, and the operation data generated by the functional sub-modules in each module set are independently cached, so that the operation data in the memory device can be used in units of module sets, eliminating the step of manual classification and improving the convenience of use and analysis efficiency of the operation data.

[0005] In order to solve the above technical problems, the present invention provides a method for storing running data, which is applied to a central processing unit of a data processing device, comprising:

[0006] In the memory device, a plurality of cache pages for storing the running data are determined;

[0007] Determine a cache page corresponding to a target module set from cache pages of a memory device and use the cache page as a target cache page, wherein the target module set is: a module set where a functional submodule to which the running data to be cached belongs is located;

[0008] The operating data to be cached is written into the target cache page, so that the operating data in the memory device is used in units of module sets.

[0009] On the other hand, from the cache pages of the memory device, determining the cache page corresponding to the target module set and using it as the target cache page includes:

[0010] Determine whether there is a cache page that meets a first preset condition in the memory device, wherein the first preset condition is: corresponding to the target module set and having remaining storage space;

[0011] If it does not exist, select a free cache page as the cache page corresponding to the target module set, and use the selected cache page as the target cache page;

[0012] If so, the cache page meeting the first preset condition is used as the target cache page.

[0013] On the other hand, determining whether there is a cache page in the memory device that meets the first preset condition includes:

[0014] Obtain the correspondence table between the module set and the cache page from the cache page of the specified sequence number;

[0015] Determine whether there is a cache page corresponding to the target module set in the correspondence table;

[0016] If it exists, determine whether there is remaining storage space in the cache page corresponding to the target module set;

[0017] If not, determining that there is no cache page meeting the first preset condition in the memory device;

[0018] If there is remaining storage space, determining that there is a cache page meeting the first preset condition in the memory device;

[0019] If there is no remaining storage space, determining that there is no cache page meeting the first preset condition in the memory device;

[0020] If not, after selecting an idle cache page as the cache page corresponding to the target module set, the running data storage method further includes:

[0021] In the corresponding relationship table, a mapping relationship between the target module set and the newly selected free cache page is added.

[0022] On the other hand, selecting a free cache page as a cache page corresponding to the target module set includes:

[0023] According to each array element in a preset integer array, selecting an idle cache page as a cache page corresponding to the target module set, wherein the array element is used to represent the idle state of each cache page in the corresponding cache page set, and the idle state includes idle and non-idle;

[0024] If not, after selecting an idle cache page as the cache page corresponding to the target module set, the running data storage method further includes:

[0025] An array element corresponding to a target cache page set is updated so as to indicate through the array element that the selected idle cache page is in a non-idle state, wherein the target cache page set is: a cache page set where the selected idle cache page is located.

[0026] On the other hand, selecting an idle cache page as a cache page corresponding to the target module set and using the selected cache page as a target cache page includes:

[0027] Determine whether the number of cache pages currently corresponding to the target module set reaches a preset cache page limit of the target module set;

[0028] If not reached, a free cache page is selected as the cache page corresponding to the target module set, and the selected cache page is used as the target cache page;

[0029] If reached, it ends.

[0030] On the other hand, each module set includes a single functional sub-module.

[0031] On the other hand, a data processing device is an expansion device of a computer;

[0032] In the memory device, a plurality of cache pages for storing the running data are determined to include:

[0033] Determine, from the memory device of the host computer, a dedicated memory area allocated by the host computer for the expansion device;

[0034] The dedicated memory area is divided into a plurality of cache pages and numbered.

[0035] In order to solve the above technical problems, the present invention further provides an operation data storage device, which is applied to a central processor of a data processing device, comprising:

[0036] A first determination module is used to determine a number of cache pages for storing operation data in a memory device;

[0037] A second determination module is used to determine a cache page corresponding to a target module set from cache pages of a memory device and use the cache page as a target cache page, wherein the target module set is a module set where a functional submodule to which the running data to be cached belongs is located;

[0038] The first action module is used to write the running data to be cached into the target cache page, so that the running data in the memory device is used in units of module sets.

[0039] In order to solve the above technical problems, the present invention further provides a running data storage device, comprising:

[0040] Memory for storing computer programs;

[0041] A processor is used to implement the steps of running the data storage method as described above when executing the computer program.

[0042] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of running the data storage method as described above are implemented.

[0043] Beneficial effect: The present invention provides a method for storing operation data. Considering that the "operation data generated by the central processing unit" needs to be classified when it is used, the present invention can determine a number of cache pages in the memory device, and then when the operation data is written to the memory device, the operation data can be written to the cache page corresponding to the target module set (the module set where the functional sub-module to which the operation data to be cached belongs is located). That is, the present invention divides the functional sub-modules in the central processing unit into sets, and independently caches the operation data generated by the functional sub-modules in each module set, so that the operation data in the memory device can be used in units of module sets, eliminating the step of manual classification and improving the convenience of using the operation data and the analysis efficiency.

[0044] The present invention also provides an operation data storage device and a computer-readable storage medium, which have the same beneficial effects as the above operation data storage method. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the relevant technologies and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 A schematic diagram of a flow chart of a method for running data storage provided by the present invention;

[0047] Figure 2 A schematic diagram of a structure of a running data storage path provided by the present invention;

[0048] Figure 3 A structural schematic diagram of another operation data storage path provided by the present invention;

[0049] Figure 4 A schematic diagram of the correspondence between a module set and a cache page provided by the present invention;

[0050] Figure 5A schematic diagram of the correspondence between another module set and cache pages provided by the present invention;

[0051] Figure 6 A schematic diagram of the structure of a running data storage device provided by the present invention;

[0052] Figure 7 A schematic diagram of the structure of a running data storage device provided by the present invention;

[0053] Figure 8 A schematic diagram of the structure of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0054] The core of the present invention is to provide a method, device, equipment and computer-readable storage medium for storing operation data, which can determine several cache pages in the memory device, and then when writing the operation data to the memory device, the operation data can be written into the cache page corresponding to the target module set (the module set where the functional sub-module to which the operation data to be cached belongs is located). That is, in the present invention, the functional sub-modules in the central processing unit are divided into sets, and the operation data generated by the functional sub-modules in each module set are independently cached, so that the operation data in the memory device can be used in units of module sets, eliminating the steps of manual classification and improving the convenience of using the operation data and the analysis efficiency.

[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] Please refer to Figure 1 , Figure 1 A schematic flow chart of a method for storing running data provided by the present invention, wherein the method for storing running data is applied to a central processing unit of a data processing device, comprising:

[0057] S101: In a memory device, determining a plurality of cache pages for storing operating data;

[0058] Specifically, taking into account the technical problems in the above background technology, and considering the need to classify the "operation data generated by the central processing unit" when using it, that is, when faced with multiple types of operation data that are mixed together, these operation data need to be classified before they can be processed, and considering that if these operation data are automatically classified and cached in the caching stage, then it will be beneficial to directly use the classified cached operation data without classification, thereby improving work efficiency. Therefore, in an embodiment of the present invention, classified caching is intended to be performed in the caching stage of the operation data, and in an embodiment of the present invention, various types of operation data are distinguished and cached through multiple cache pages. Therefore, in this step, for the central processing unit, a number of cache pages for storing operation data can be determined in the memory device, so that the operation data can be classified and cached later.

[0059] The total number of cache pages may be set independently, and the embodiment of the present invention does not limit this.

[0060] S102: determining a cache page corresponding to a target module set from cache pages of a memory device, and using the cache page as a target cache page, wherein the target module set is: a module set where a functional submodule to which the running data to be cached belongs is located;

[0061] Specifically, considering that the operating data generated by the set (module set) formed by certain functional sub-modules running in the central processing unit is suitable for caching as a category, in an embodiment of the present invention, the functional sub-modules in the central processing unit are pre-formed into multiple module sets, each module set includes at least one functional sub-module, and then the operating data generated by the functional sub-modules in a single module set are cached in the corresponding cache page, so that the "classification of operating data according to the module set" can be realized. Therefore, when the operating data to be cached is generated, the "module set to which the functional sub-module to which the operating data to be cached belongs" can be first determined, that is, the target module set is determined, and then the cache page corresponding to the target module set can be determined from the cache page of the memory device, and it is used as the target cache page, so that in the subsequent steps, the operating data to be cached can be cached to the target cache page, thereby realizing the classified caching of the operating data.

[0062] S103: writing the running data to be cached into the target cache page, so that the running data in the memory device can be used in units of module sets.

[0063] Specifically, after determining the target cache page, the running data to be cached can be written into the target cache page, thereby realizing the classified caching of the running data. Then, when the running data is used subsequently, it can be directly utilized based on the classified cached running data without classification, which is conducive to improving the use efficiency of the running data.

[0064] The present invention provides a method for storing operation data. Considering that the "operation data generated by a central processing unit" needs to be classified when it is used, the present invention can determine a plurality of cache pages in a memory device. Then, when the operation data is written to the memory device, the operation data can be written to the cache page corresponding to the target module set (the module set to which the functional sub-module to which the operation data to be cached belongs is located). That is, the present invention divides the functional sub-modules in the central processing unit into sets, and independently caches the operation data generated by the functional sub-modules in each module set, so that the operation data in the memory device can be used in units of module sets, eliminating the step of manual classification and improving the convenience of using the operation data and the analysis efficiency.

[0065] Based on the above embodiments:

[0066] As an optional embodiment, determining a cache page corresponding to the target module set from the cache pages of the memory device and using it as the target cache page includes:

[0067] Determine whether there is a cache page that meets a first preset condition in the memory device, wherein the first preset condition is: corresponding to the target module set and having remaining storage space;

[0068] If it does not exist, select a free cache page as the cache page corresponding to the target module set, and use the selected cache page as the target cache page;

[0069] If so, the cache page meeting the first preset condition is used as the target cache page.

[0070] Specifically, in order to more efficiently utilize the existing cache pages, in the embodiment of the present invention, free cache pages can be selected as needed and a corresponding relationship between the selected cache pages and the target module set can be established. That is to say, the target module set may or may not currently have corresponding cache pages. Even if corresponding cache pages exist, it is unknown whether there is remaining storage space. The premise for successfully caching data is that "the target module set has corresponding cache pages and has remaining storage space". Therefore, the embodiment of the present invention pre-sets a first preset condition for the cache page, that is, "corresponding to the target module set and having remaining storage space", and can determine whether there is a cache page that meets the first preset condition in the memory device. If so, it means that there is currently a cache page that can cache data, and the cache page that meets the first preset condition can be used as the target cache page. If not, it means that there is currently no cache page that can cache data. In this case, a free cache page can be selected as the cache page corresponding to the target module set, and the selected cache page can be used as the target cache page, that is, the cache page corresponding to the target module set is expanded.

[0071] Among them, based on the above method of dynamically adding corresponding cache pages, a module set with a large demand for running data cache can use more cache pages, thereby improving the utilization rate of the cache pages.

[0072] As an optional embodiment, determining whether there is a cache page meeting the first preset condition in the memory device includes:

[0073] Obtain the correspondence table between the module set and the cache page from the cache page of the specified sequence number;

[0074] Determine whether there is a cache page corresponding to the target module set in the correspondence table;

[0075] If it exists, determine whether there is remaining storage space in the cache page corresponding to the target module set;

[0076] If not, determining that there is no cache page meeting the first preset condition in the memory device;

[0077] If there is remaining storage space, determining that there is a cache page meeting the first preset condition in the memory device;

[0078] If there is no remaining storage space, determining that there is no cache page meeting the first preset condition in the memory device;

[0079] If not, after selecting an idle cache page as the cache page corresponding to the target module set, the data storage method further includes:

[0080] In the correspondence table, a mapping relationship between the target module set and the newly selected free cache page is added.

[0081] Specifically, in order to efficiently manage the correspondence between module sets and cache pages, in an embodiment of the present invention, a "correspondence table between module sets and cache pages" can be maintained in a cache page of a specified serial number. Then, when determining whether there is a cache page that meets the first preset condition in the memory device, the correspondence table between module sets and cache pages can be first obtained from the cache page of the specified serial number, and then it can be determined whether there is a cache page corresponding to the target module set in the correspondence table. If not, a free cache page can be directly selected. If so, it can be further determined whether there is remaining storage space in the cache page corresponding to the target module set. If not, a free cache page can be directly selected. If so, it can be determined that there is a cache page that meets the first preset condition in the memory device. Since the correspondence changes dynamically, in an embodiment of the present invention, after selecting an idle cache page as the cache page corresponding to the target module set, the mapping relationship between the target module set and the newly selected idle cache page can be added to the correspondence table, that is, the correspondence table is updated in a timely manner.

[0082] The specific form of the correspondence table may be various, for example, a hash table, etc., which is not limited in the embodiment of the present invention.

[0083] As an optional embodiment, selecting an idle cache page as a cache page corresponding to the target module set includes:

[0084] According to each array element in a preset integer array, selecting an idle cache page as a cache page corresponding to the target module set, wherein the array element is used to represent the idle state of each cache page in the corresponding cache page set, and the idle state includes idle and non-idle;

[0085] If not, after selecting an idle cache page as the cache page corresponding to the target module set, the data storage method further includes:

[0086] An array element corresponding to a target cache page set is updated so as to indicate through the array element that the selected idle cache page is in a non-idle state, wherein the target cache page set is: a cache page set where the selected idle cache page is located.

[0087] Specifically, in order to more efficiently maintain the idle state of the cache page, an integer array is used in the embodiment of the present invention to dynamically maintain the idle state of the cache page. The integer array is composed of a number of array elements, and any array element can be used to represent the idle state of each cache page in the corresponding cache page set. Therefore, when selecting an idle cache page, an idle cache page can be selected as the cache page corresponding to the target module set according to each array element in the preset integer array. Accordingly, after selecting an idle cache page as the cache page corresponding to the target module set, the array element corresponding to the target cache page set can be updated so that the array element can represent that the selected idle cache page is in a non-idle state.

[0088] A specific integer array is expressed as: int page_mmap

[256] , where 256 represents the total number of array elements, and a single array element can represent the idle state of each cache page in the corresponding "cache page set including 32 cache pages", with 0 representing the idle state and 1 representing the occupied state (non-idle state). For example, the array element can be expressed as page_mmap[0]= 0x80000001, where 0 represents the serial number of the array element. The serial numbers of the 256 array elements can range from 0 to 255, and the right side of the equal sign is the specific value of the array element. Assuming that the 0th array element corresponds to the idle state of the "cache page set of cache pages with serial numbers 0 to 31", this specific value can indicate that the 0th and 31st cache pages are occupied, and pages 1 to 30 are idle; then by analogy, the second array element represents the idle state of the next group of 32 cache pages..., then assuming page_mmap

[10] = 0x000000FF, that is, the value of the 10th array element is 0x000000FF, which is used to indicate that pages 320 to 327 are occupied, and pages 328 to 351 are idle.

[0089] Of course, in addition to the above method, other methods may be used to “select an idle cache page as the cache page corresponding to the target module set”, which is not limited in the embodiment of the present invention.

[0090] As an optional embodiment, selecting an idle cache page as a cache page corresponding to the target module set, and using the selected cache page as a target cache page includes:

[0091] Determine whether the number of cache pages currently corresponding to the target module set reaches a preset cache page limit of the target module set;

[0092] If not reached, a free cache page is selected as the cache page corresponding to the target module set, and the selected cache page is used as the target cache page;

[0093] If reached, it ends.

[0094] Specifically, considering the importance of the functional sub-modules involved in different module sets and the differences in the amount of running data generated, it is possible to set corresponding cache page limits for different module sets, so as to more efficiently utilize the cache pages in the memory device and control the total amount of running data that can be cached by the module set. Therefore, before selecting a free cache page, the embodiment of the present invention can determine whether the number of cache pages currently corresponding to the target module set has reached the preset cache page limit of the target module set. If it has not reached the limit, it can "select a free cache page as the cache page corresponding to the target module set, and use the selected cache page as the target cache page". If it has reached the limit, it can end, that is, the selection of the free cache page and subsequent operations will not be performed, thereby achieving the purpose of limiting the total number of cache pages that can correspond to the module set.

[0095] The preset cache page limit corresponding to each module set can be independently set and modified, which is not limited in the embodiment of the present invention.

[0096] In addition, considering that if the user does not extract the cached running data for a long time, the cache page may be full, which will cause the cache work to stagnate, and considering that the longer running data generated by the functional sub-modules in some module sets have low utilization value, it is possible to set the validity period of the running data for the specified module set, and periodically check the running data located in the cache page of the specified module set. When the running data in the cache page exceeds the validity period, the expired running data will be automatically cleaned up and the corresponding cache page will be released, so that the released cache page has free cache space.

[0097] As an optional embodiment, each module set includes a single functional sub-module.

[0098] Specifically, in order to classify the operation data in a more detailed manner and to facilitate the use of the operation data, each module set in the embodiment of the present invention includes only a single functional sub-module, that is, each functional sub-module corresponds to its own cache page, that is, the operation data is divided into as many categories for caching as there are functional sub-modules.

[0099] Of course, in addition to this, the module set may also be divided in other forms, which are not limited in the embodiments of the present invention.

[0100] As an optional embodiment, the data processing device is an expansion device of a computer;

[0101] In the memory device, a plurality of cache pages for storing the running data are determined to include:

[0102] Determine, from the memory device of the host computer, a dedicated memory area allocated by the host computer for the expansion device;

[0103] The private memory area is divided into cache pages and numbered.

[0104] To better illustrate the embodiments of the present invention, please refer to Figures 2 to 5 , Figure 2 A schematic diagram of a structure of a running data storage path provided by the present invention, Figure 3 A structural diagram of another operation data storage path provided by the present invention, Figure 4 A schematic diagram of the corresponding relationship between a module set and a cache page provided by the present invention, Figure 5 A schematic diagram of the correspondence between another module set and cache pages provided by the present invention.

[0105] Specifically, in Figure 2 In the process, the operation data generated by the CPU of the expansion device can be directly cached to the cache page in the memory device of the host through the expansion interface and the expansion interface protocol, and then transferred to the hard disk by the host at regular intervals (when transferring to the hard disk, the operation data can also be partitioned and stored in units of module sets for easy distinction and use), without using the memory device, flash memory, peripheral interface and external debugging machine in the expansion device; and Figure 3 In the process, the data processing device (which can also be an expansion device) can cache the operation data through its own memory device, and then one way can be: sending the cached operation data to an external debugging machine through the peripheral interface and the serial port line, and another way is: regularly moving the cached operation data to a non-volatile memory for storage, and the non-volatile memory can be Figure 3 The flash memory in the data processing device may also be a hard disk external to the data processing device, etc., which is not limited in the embodiment of the present invention.

[0106] Specifically, considering that the memory space inside the expansion device of the computer is limited and expensive, if the expansion device supports HMB (Host Memory Buffer, host memory buffer) feature, then the host can allocate a piece of memory from its own memory space for use by the expansion device, thereby reducing the cost of the expansion device and improving the cache efficiency. Therefore, the data processing device in the embodiment of the present invention is an expansion device of the computer, then in the memory device, determining a number of cache pages for storing running data can include: from the memory device of the host of the computer, determining the dedicated memory area allocated by the host to the expansion device. This requires the host to allocate a memory area for the expansion device after identifying that the expansion device supports the HMB feature. The expansion device can obtain the starting address and size of the allocated memory area through communication with the host, and use the memory area as the running data cache area. Then, the running data cache area can be divided into several cache pages. For example, the starting address of the memory area can be 0x20000000, and the size is 32MB. The expansion device can divide the memory area into 8192 cache pages with a cache page size of 4KB and number them, and the number range is 0 to 8191.

[0107] Among them, the HMB feature is used to store the running data in the host memory device, which has higher security. During the hot plugging of expansion devices, the integrity of the running data is ensured and the risk of data loss is avoided.

[0108] Among them, Figure 4 It can be seen that there are a total of 8192 cache pages 0-8191, and the first to Nth module sets correspond to several cache pages. Since the cache page sets corresponding to a single module set are selected and used one by one, the "cache pages corresponding to the module set" can be associated in the corresponding relationship table in the form of a bidirectional linked list. Figure 4 In the figure, each cache page connected by a solid line of a bidirectional arrow corresponds to the same module set, that is, the cache pages numbered 1, 2, 5, and 8 correspond to one module set, and each cache page connected by a dotted line of a bidirectional arrow corresponds to the same module set, that is, the cache pages numbered 3 and 6 correspond to one module set; Figure 4 The cache page No. 0 in is used as the designated cache page for storing the corresponding relationship table. Figure 5 The correspondence between each module set and the cache page is also shown in the form of a hash table. Figure 5In the example, the first module set corresponds to cache pages numbered 1, 2, 5, and 8, the second module set corresponds to cache pages numbered 3 and 6, the third module set corresponds to cache page numbered 4, the fourth module set corresponds to cache pages numbered 7, 11, and 20, and the Nth module set corresponds to cache pages numbered 10, 15, 16, 22, and 23.

[0109] Specifically, the starting address of the memory area, the size of the memory area, and the size of the cache page can all be set independently, and the embodiment of the present invention does not limit this.

[0110] The expansion device may be of various types, such as a RAID (Redundant Array of Independent Disks) card, etc., which is not limited in the embodiment of the present invention.

[0111] Please refer to Figure 6 , Figure 6 This is a structural diagram of a running data storage device provided by the present invention, which is applied to a central processing unit of a data processing device, including:

[0112] A first determination module 61 is used to determine a number of cache pages for storing operation data in a memory device;

[0113] A second determining module 62 is used to determine a cache page corresponding to a target module set from the cache pages of the memory device and use it as the target cache page, wherein the target module set is: a module set where the functional submodule to which the running data to be cached belongs is located;

[0114] The first action module 63 is used to write the running data to be cached into the target cache page, so that the running data in the memory device is used in units of module sets.

[0115] Based on the above embodiments:

[0116] As an optional embodiment, the second determining module 62 includes:

[0117] A first judgment module is used to judge whether there is a cache page that meets a first preset condition in the memory device, wherein the first preset condition is: corresponding to the target module set and having remaining storage space; if not, the first selection module is triggered; if so, the first determination submodule is triggered;

[0118] A first selection module is used to select an idle cache page as a cache page corresponding to a target module set, and use the selected cache page as a target cache page;

[0119] The first determining submodule is used to take a cache page that meets a first preset condition as a target cache page.

[0120] As an optional embodiment, the first judgment module includes:

[0121] A first acquisition module is used to acquire a correspondence table between a module set and a cache page from a cache page of a specified sequence number;

[0122] A first judgment submodule is used to judge whether there is a cache page corresponding to the target module set in the correspondence table, and if so, trigger the second judgment submodule; if not, trigger the first judgment module;

[0123] A second determination submodule is used to determine whether there is any remaining storage space in the cache page corresponding to the target module set, and if so, trigger the second determination module; if not, trigger the third determination module;

[0124] A first determination module, used for determining that no cache page meeting a first preset condition exists in the memory device;

[0125] A second determination module, used for determining whether a cache page that meets a first preset condition exists in the memory device;

[0126] A third determination module, used for determining that no cache page meeting the first preset condition exists in the memory device;

[0127] The operating data storage device also includes:

[0128] The first adding module is used to add a mapping relationship between a target module set and a newly selected free cache page in the corresponding relationship table.

[0129] As an optional embodiment, the first selection module includes:

[0130] A first selection submodule, configured to select an idle cache page as a cache page corresponding to a target module set according to each array element in a preset integer array, wherein the array element is used to represent an idle state of each cache page in the corresponding cache page set, and the idle state includes idle and non-idle;

[0131] The operation data storage device also includes:

[0132] The first update module is used to update the array elements corresponding to the target cache page set so as to indicate that the selected idle cache page is in a non-idle state through the array elements, wherein the target cache page set is: the cache page set where the selected idle cache page is located.

[0133] As an optional embodiment, the operation data storage device further includes:

[0134] The second judgment module is used to judge whether the number of cache pages currently corresponding to the target module set reaches the preset cache page limit of the target module set. If not, the first selection module is triggered; if reached, the process ends.

[0135] As an optional embodiment, the first determining module 61 includes:

[0136] A second determining submodule is used to determine, from the memory device of the host computer, a dedicated memory area allocated by the host computer for the expansion device;

[0137] The numbering module is used to divide the dedicated memory area into multiple cache pages and number them.

[0138] For an introduction to the operation data storage device provided in the embodiment of the present invention, please refer to the aforementioned embodiment of the operation data storage method, and the embodiment of the present invention will not be described in detail here.

[0139] Please refer to Figure 7 , Figure 7 A schematic diagram of the structure of an operation data storage device provided by the present invention, the operation data storage device comprises:

[0140] A memory 71, used for storing computer programs;

[0141] The processor 72 is used to implement the steps of running the data storage method in the above-mentioned embodiment when executing the computer program.

[0142] For an introduction to the running data storage device provided in the embodiment of the present invention, please refer to the aforementioned embodiment of the running data storage method, and the embodiment of the present invention will not be described in detail here.

[0143] Please refer to Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. A computer program 82 is stored on the computer-readable storage medium 81. When the computer program 82 is executed by the processor, the steps of running the data storage method in the aforementioned embodiment are implemented.

[0144] For an introduction to the computer-readable storage medium provided in an embodiment of the present invention, please refer to the aforementioned embodiment of the method for storing running data, and the embodiment of the present invention will not be described in detail here.

[0145] The present invention also provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of running the data storage method in the aforementioned embodiment.

[0146] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the aforementioned embodiment of the method for running data storage, and the embodiment of the present invention will not be described in detail here.

[0147] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the element.

[0148] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for storing running data, characterized in that: A central processing unit used in a data processing device, comprising: In the memory device, a plurality of cache pages for storing the running data are determined; Determine a cache page corresponding to a target module set from cache pages of a memory device and use the cache page as a target cache page, wherein the target module set is: a module set where a functional submodule to which the running data to be cached belongs is located; The operating data to be cached is written into the target cache page, so that the operating data in the memory device is used in units of module sets.

2. The operation data storage method according to claim 1, characterized in that: From the cache pages of the memory device, a cache page corresponding to the target module set is determined and used as the target cache page including: Determine whether there is a cache page that meets a first preset condition in the memory device, wherein the first preset condition is: corresponding to the target module set and having remaining storage space; If it does not exist, select a free cache page as the cache page corresponding to the target module set, and use the selected cache page as the target cache page; If so, the cache page meeting the first preset condition is used as the target cache page.

3. The operation data storage method according to claim 2, characterized in that: Determining whether there is a cache page in the memory device that meets the first preset condition includes: Obtain the correspondence table between the module set and the cache page from the cache page of the specified sequence number; Determine whether there is a cache page corresponding to the target module set in the correspondence table; If it exists, determine whether there is remaining storage space in the cache page corresponding to the target module set; If not, determining that there is no cache page meeting the first preset condition in the memory device; If there is remaining storage space, determining that there is a cache page meeting the first preset condition in the memory device; If there is no remaining storage space, determining that there is no cache page meeting the first preset condition in the memory device; If not, after selecting an idle cache page as the cache page corresponding to the target module set, the running data storage method further includes: In the corresponding relationship table, a mapping relationship between the target module set and the newly selected free cache page is added.

4. The operation data storage method according to claim 2, characterized in that: Selecting a free cache page as the cache page corresponding to the target module set includes: According to each array element in a preset integer array, selecting an idle cache page as a cache page corresponding to the target module set, wherein the array element is used to represent the idle state of each cache page in the corresponding cache page set, and the idle state includes idle and non-idle; If not, after selecting an idle cache page as the cache page corresponding to the target module set, the running data storage method further includes: An array element corresponding to a target cache page set is updated so as to indicate through the array element that the selected idle cache page is in a non-idle state, wherein the target cache page set is: a cache page set where the selected idle cache page is located.

5. The operation data storage method according to claim 2, characterized in that: Selecting a free cache page as a cache page corresponding to the target module set, and using the selected cache page as a target cache page includes: Determine whether the number of cache pages currently corresponding to the target module set reaches a preset cache page limit of the target module set; If not reached, a free cache page is selected as the cache page corresponding to the target module set, and the selected cache page is used as the target cache page; If reached, it ends.

6. The operation data storage method according to claim 1, characterized in that: Each module set includes a single functional sub-module.

7. The operation data storage method according to any one of claims 1 to 6, characterized in that: The data processing device is an expansion device of the computer; In the memory device, a plurality of cache pages for storing the running data are determined to include: Determine, from the memory device of the host computer, a dedicated memory area allocated by the host computer for the expansion device; The dedicated memory area is divided into a plurality of cache pages and numbered.

8. A running data storage device, characterized in that: A central processing unit used in a data processing device, comprising: A first determination module is used to determine a number of cache pages for storing operation data in a memory device; A second determination module is used to determine a cache page corresponding to a target module set from cache pages of a memory device and use the cache page as a target cache page, wherein the target module set is a module set where a functional submodule to which the running data to be cached belongs is located; The first action module is used to write the running data to be cached into the target cache page, so that the running data in the memory device is used in units of module sets.

9. A running data storage device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for running data storage as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for running data storage according to any one of claims 1 to 7 are implemented.