Parameter server node recovery method and recovery system
By using non-volatile memory and multi-level storage sub-module structure on the parameter server node, the high cost and recovery time problems of traditional parameter servers are solved, and low cost and fast recovery are achieved.
Patent Information
- Application Number
- CN202011187099.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-10-29
AI Technical Summary
During the deployment process of traditional DRAM-based parameter servers, there are problems such as the increase in hardware costs caused by huge memory consumption and the time-consuming recovery process after node failure.
A parameter server node based on non-volatile memory is used to achieve fast recovery by logically dividing the model parameters into multi-level storage sub-modules and dividing them into a two-layer storage structure in the non-volatile memory.
It reduces hardware costs and achieves millisecond-level recovery time after node failure, meeting high concurrency and high availability requirements.
Smart Images

Figure CN112181732B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to a recovery method and a recovery system for a parameter server node. Background Art
[0002] The industry has deployed machine learning models online. Because online services require very high real-time performance, model parameters need to be stored in high-speed DRAM (Dynamic Random Access Memory). The total amount of industrial-grade machine learning model parameters is huge, exceeding the storage capacity of a single machine, so it is often necessary to deploy a DRAM-based parameter server cluster to provide high-concurrency parameter query support for online prediction services. Parameter Server is a programming framework that facilitates the writing of distributed parallel programs, with the focus on distributed storage and collaborative support for large-scale parameters. Online parameter servers are mainly used to store trained ultra-large-scale parameters and provide high-concurrency and high-availability model parameter query services for online services. However, traditional DRAM-based parameter servers have two problems during deployment. The first is the increase in overall hardware costs caused by huge memory consumption, and the second is that when any node in the parameter server cluster fails and goes offline, the recovery process is very time-consuming. Summary of the invention
[0003] Exemplary embodiments of the present disclosure may at least partially solve the above problems.
[0004] According to one aspect of the present disclosure, a method for recovering a parameter server node is provided, wherein the parameter server node is a node in a parameter server cluster, and the parameter server node is a parameter server node based on a non-volatile memory, and the model parameters of each model stored in the non-volatile memory of the parameter server node are logically divided into at least one level of storage submodules, and the recovery method comprises: after the parameter server node is restarted, obtaining the first layer of data stored in the non-volatile memory of the parameter server node, wherein the first layer of data includes parameter server node header information, which is used to query the node information and the first level of storage submodule information of the parameter server node ; Based on the first layer of data, obtain each first-level storage submodule header information in the stored second layer of data from the non-volatile memory of the parameter server node, wherein the second layer of data includes M first-level storage submodule header information and M first-level storage submodule hash mapping information, and the second layer of data is used to query the model parameters stored in each first-level storage submodule of the parameter server node, wherein M is the number of first-level storage submodules stored on the parameter server node; based on each first-level storage submodule header information, traverse each first-level storage submodule hash mapping information in the second layer of data to restore the model parameters stored on the parameter server node.
[0005] Optionally, the first layer data may be stored at a fixed location in the non-volatile memory of the parameter server node; wherein obtaining the stored first layer data from the non-volatile memory of the parameter server node may include: reading the first layer data from the fixed location in the non-volatile memory of the parameter server node.
[0006] Optionally, the parameter server node header information may include a parameter server node ID and a first-level storage sub-module ID list; the first-level storage sub-module header information may include the first-level storage sub-module ID, version information of the model parameters stored in the first-level storage sub-module, and a pointer of the first-level storage sub-module to the next-level hash map.
[0007] Optionally, the first-level storage submodule ID included in the first-level storage submodule ID list may consist of a model ID and a first-level storage submodule ID in a corresponding model.
[0008] Optionally, based on the first layer of data, obtaining each first-level storage submodule header information in the stored second layer of data from the non-volatile memory of the parameter server node may include: determining all first-level storage submodule IDs of the parameter server node based on the first-level storage submodule ID list; and obtaining first-level storage submodule header information with a corresponding first-level storage submodule ID based on each first-level storage submodule ID among all the first-level storage submodule IDs of the parameter server node.
[0009] Optionally, the first-level storage submodule hash mapping information may include hash mappings of each level of storage submodules from the second level to the Nth level storage submodules under the first-level storage submodule, and model parameter hash mappings under each Nth level storage submodule under the first-level storage submodule, wherein N is the number of levels of storage submodules into which the model parameters are divided; wherein the key of the hash mapping of each level of storage submodule may be the ID of the storage submodule at that level, and the value may be a pointer to the next level hash mapping, the key of the model parameter hash mapping may be the parameter name, and the value may be the parameter value, and the hash mapping of each level of storage submodule and the model parameter hash mapping may point to the link to the next level hash mapping through the corresponding pointer of the storage submodule at that level or the previous level storage submodule of the model parameter.
[0010] Optionally, based on the header information of each first-level storage submodule, traversing the hash mapping information of each first-level storage submodule in the second-layer data to restore the model parameters stored on the parameter server node may include: performing the following operations for each first-level storage submodule: searching the next-level hash mapping through the pointer pointing to the next-level hash mapping corresponding to the previous-level storage submodule until the model parameter hash mapping is searched; and restoring the model parameters based on the model parameter hash mapping.
[0011] Optionally, in the case where the model parameters are divided into first-level storage sub-modules: each first-level storage sub-module hash mapping information may include the model parameter hash mapping under the first-level storage sub-module, wherein the pointer to the next-level hash mapping in the first-level storage sub-module header information may be a pointer to the model parameter hash mapping; wherein, searching the next-level hash mapping through the corresponding pointer to the next-level hash mapping of the previous-level storage sub-module until the model parameter hash mapping is searched may include: searching the model parameter hash mapping through the pointer to the model parameter hash mapping in the first-level storage sub-module header information.
[0012] Optionally, in the case where the model parameters are divided into two levels of storage submodules: the hash mapping information of each first-level storage submodule may include the hash mappings of each second-level storage submodule under the first-level storage submodule and the model parameter hash mappings of each second-level storage submodule under the first-level storage submodule, wherein the pointer to the next-level hash mapping in the header information of the first-level storage submodule may be a pointer to the hash mapping of the second-level storage submodule, the key of the hash mapping of each second-level storage submodule may be the second-level storage submodule ID, and the value is a pointer to the model parameter hash mapping under the second-level storage submodule; wherein, searching the next-level hash mapping through the corresponding pointer to the next-level hash mapping of the previous-level storage submodule until the model parameter hash mapping is searched may include: searching the hash mapping of the second-level storage submodule through the pointer to the second-level storage submodule hash mapping in the header information of the first-level storage submodule; searching the model parameter hash mapping through the pointer to the model parameter hash mapping in the hash mapping of the second-level storage submodule.
[0013] Optionally, the recovery method may also include: when the model parameter version information in the first-level storage submodule header information is consistent with the model parameter version information stored on the metadata node of the parameter server cluster, executing the recovery step; when the model parameter version information in the first-level storage submodule header information is inconsistent with the model parameter version information stored on the metadata node of the parameter server cluster, not executing the recovery step, but pulling the latest version of the model parameters from the backend storage system and inserting them into the parameter server node; wherein the metadata node of the parameter server cluster stores the latest version number of the model parameters, and the backend storage system stores the latest version of the model parameters.
[0014] Optionally, the non-volatile memory may include at least one of STT-RAM, PCM, ReRAM and 3DxPoint.
[0015] According to another aspect of the present disclosure, a recovery system for a parameter server node is provided, wherein the parameter server node is a node in a parameter server cluster, and the parameter server node is a parameter server node based on a non-volatile memory, and the model parameters of each model stored in the non-volatile memory of the parameter server node are logically divided into at least one level of storage submodule, and the recovery device comprises: a first acquisition device, configured to: after the parameter server node is restarted, acquire the stored first layer data from the non-volatile memory of the parameter server node, wherein the first layer data includes parameter server node header information, which is used to query the node information and the first level storage submodule information of the parameter server node; a second acquisition device, configured to: acquire the first layer data stored from the non-volatile memory of the parameter server node after the parameter server node is restarted, wherein the first layer data includes parameter server node header information, which is used to query the node information and the first level storage submodule information of the parameter server node; The acquisition device is configured to: based on the first layer of data, obtain each first-level storage submodule header information in the stored second layer data from the non-volatile memory of the parameter server node, wherein the second layer of data includes M first-level storage submodule header information and M first-level storage submodule hash mapping information, and the second layer of data is used to query the model parameters stored in each first-level storage submodule of the parameter server node, wherein M is the number of first-level storage submodules stored on the parameter server node; the recovery device is configured to: based on each first-level storage submodule header information, traverse each first-level storage submodule hash mapping information in the second layer of data to recover the model parameters stored on the parameter server node.
[0016] Optionally, the first layer data may be stored at a fixed location in the non-volatile memory of the parameter server node; wherein the first acquisition device may be configured to: read the first layer data from the fixed location in the non-volatile memory of the parameter server node.
[0017] Optionally, the parameter server node header information may include a parameter server node ID and a first-level storage sub-module ID list; the first-level storage sub-module header information may include the first-level storage sub-module ID, version information of the model parameters stored in the first-level storage sub-module, and a pointer of the first-level storage sub-module to the next-level hash map.
[0018] Optionally, the first-level storage submodule ID included in the first-level storage submodule ID list consists of a model ID and a first-level storage submodule ID in a corresponding model.
[0019] Optionally, the second acquisition device can be configured to: determine all first-level storage sub-module IDs of the parameter server node based on the first-level storage sub-module ID list; and acquire first-level storage sub-module header information with the corresponding first-level storage sub-module ID based on each first-level storage sub-module ID among all the first-level storage sub-module IDs of the parameter server node.
[0020] Optionally, the first-level storage submodule hash mapping information may include hash mappings of each level of storage submodules from the second level to the Nth level storage submodules under the first-level storage submodule, and model parameter hash mappings under each Nth level storage submodule under the first-level storage submodule, wherein N is the number of levels of storage submodules into which the model parameters are divided; wherein the key of the hash mapping of each level of storage submodule may be the ID of the storage submodule at that level, and the value may be a pointer to the hash mapping of the next level, the key of the model parameter hash mapping may be the parameter name, and the value may be the parameter value, and the hash mapping of each level of storage submodule and the model parameter hash mapping may be linked through the corresponding pointer to the hash mapping of the next level of the storage submodule at that level or the previous level storage submodule of the model parameter.
[0021] Optionally, the recovery device can be configured to: perform the following operations for each first-level storage submodule: search the next-level hash map through the pointer pointing to the next-level hash map corresponding to the previous-level storage submodule until the model parameter hash map is found; and restore the model parameters based on the model parameter hash map.
[0022] Optionally, in the case where the model parameters are divided into first-level storage sub-modules: each first-level storage sub-module hash mapping information may include the model parameter hash mapping under the first-level storage sub-module, wherein the pointer to the next-level hash mapping in the first-level storage sub-module header information is a pointer to the model parameter hash mapping; wherein the recovery device may be configured to: search the model parameter hash mapping through the pointer to the model parameter hash mapping in the first-level storage sub-module header information.
[0023] Optionally, in the case where the model parameters are divided into two levels of storage submodules: the hash mapping information of each first-level storage submodule may include the hash mappings of each second-level storage submodule under the first-level storage submodule and the model parameter hash mappings of each second-level storage submodule under the first-level storage submodule, wherein the pointer to the next-level hash mapping in the first-level storage submodule header information may be a pointer to the hash mapping of the second-level storage submodule, the key of the hash mapping of each second-level storage submodule may be the second-level storage submodule ID, and the value may be a pointer to the model parameter hash mapping under the second-level storage submodule; wherein the recovery device may be configured to: search the hash mapping of the second-level storage submodule through the pointer to the hash mapping of the second-level storage submodule in the first-level storage submodule header information; and search the model parameter hash mapping through the pointer to the model parameter hash mapping in the hash mapping of the second-level storage submodule.
[0024] Optionally, the recovery device can also be configured as follows: when the model parameter version information in the first-level storage submodule header information is consistent with the model parameter version information stored on the metadata node of the parameter server cluster, the recovery step is performed; when the model parameter version information in the first-level storage submodule header information is inconsistent with the model parameter version information stored on the metadata node of the parameter server cluster, the recovery step is not performed, and the latest version of the model parameters are pulled from the backend storage system and inserted into the parameter server node; wherein the metadata node of the parameter server cluster stores the latest version number of the model parameters, and the backend storage system stores the latest version of the model parameters.
[0025] Optionally, the non-volatile memory may include at least one of STT-RAM, PCM, ReRAM and 3DxPoint.
[0026] According to another aspect of the present disclosure, a computer-readable storage medium storing instructions is provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is prompted to perform the parameter server node recovery method according to the present disclosure.
[0027] According to another aspect of the present disclosure, a system is provided, comprising at least one computing device and at least one storage device storing instructions, wherein when the instructions are executed by the at least one computing device, the at least one computing device is prompted to perform the recovery method of the parameter server node according to the present disclosure.
[0028] According to the parameter server node recovery method and system disclosed in the present invention, the model parameters are stored on the parameter server based on non-volatile memory to replace the parameter server based on DRAM, which greatly reduces the hardware cost. In addition, for the parameter server based on non-volatile memory, a model parameter logical storage structure and a data physical storage structure are designed, the model parameters are logically stored in a hierarchical manner, and the data is divided into two layers of storage on the non-volatile memory to meet the high concurrency and high availability requirements of the parameter server. And a fast recovery process after restart is designed. According to the two-layer storage data structure, all parameters stored on the parameter server node can be easily and quickly queried and restored, achieving the effect of millisecond-level recovery. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] These and / or other aspects and advantages of the present disclosure will become clear and more easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0030] Figure 1 is a schematic diagram showing an existing parameter server cluster architecture.
[0031] Figure 2is a schematic diagram illustrating a node failure of an existing parameter server cluster.
[0032] Figure 3 is a flowchart illustrating a storage method of model parameters according to an exemplary embodiment of the present disclosure.
[0033] Figure 4 is a schematic diagram illustrating a model parameter logical storage structure according to an exemplary embodiment of the present disclosure.
[0034] Figure 5 is a schematic diagram showing a physical data storage structure of a parameter server node according to an exemplary embodiment of the present disclosure.
[0035] Figure 6 FIG. 4 is a schematic diagram showing a physical data storage structure of a parameter server node according to another exemplary embodiment of the present disclosure.
[0036] Figure 7 FIG. 4 is a schematic diagram showing a physical data storage structure of a parameter server node according to another exemplary embodiment of the present disclosure.
[0037] Figure 8 is a flowchart illustrating a recovery method of a parameter server node according to an exemplary embodiment of the present disclosure.
[0038] Fig. 9 is a flowchart illustrating a recovery method of a parameter server node according to an exemplary embodiment of the present disclosure.
[0039] Fig.10 is a block diagram illustrating a storage system of model parameters according to an exemplary embodiment of the present disclosure.
[0040] Fig.11 is a block diagram illustrating a recovery system of a parameter server node according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of the embodiments of the present disclosure as defined by the claims and their equivalents. Various specific details are included to assist in understanding, but these details are considered to be exemplary only. Therefore, one of ordinary skill in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. In addition, descriptions of well-known functions and structures are omitted for clarity and brevity.
[0042] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.
[0043] The era of big data and AI has brought unprecedented challenges and opportunities to many applications, such as recommendation systems and credit card anti-fraud. This type of AI application has two characteristics. The first characteristic is the ultra-high dimensionality of the model. Each dimension of the model corresponds to a parameter. A model that can process massive amounts of data can have dimensions of hundreds of millions or even billions. This also means that we need to store hundreds of millions or even billions of parameters for each model. So we need to use an online parameter server to store these parameters. The second characteristic is real-time performance. Taking anti-fraud as an example, it often takes only a few milliseconds for the user to swipe the card and the model to give the prediction result. The high real-time requirement also means that we need to store a large number of model parameters in high-speed DRAM memory. In addition, since a single machine in the parameter server cluster may have a single point of failure, and the online service requires 7*24 hours of uninterrupted service, we need to make multiple copies of the same data to ensure data security. Figure 1 is a schematic diagram showing the existing parameter server cluster architecture, such as Figure 1 As shown in the figure, the storage submodule Storage3 of Model 1 can prepare three copies of the same content and store them on three server nodes (PS Node1, PS Node 2, PS Node 3). This can ensure that online services can still be carried out after one or two servers fail and go offline. Another benefit of multiple copies is that multiple online copies can share the access pressure, thereby improving the access bandwidth of the overall parameter server.
[0044] However, traditional DRAM-based parameter servers have two pain points during deployment. The first is the increase in overall hardware costs caused by huge memory consumption. The capacity of a single DRAM is limited, generally 16G or 32G, which means that parameter servers need a cluster of multiple machines to store model parameters to meet memory requirements. At the same time, the multi-copy mechanism mentioned above further increases memory overhead and costs. The second pain point is also the pain point of all DRAM-based memory systems. When any node in the parameter server cluster fails and goes offline, the node needs to be restarted, and the parameter data needs to be extracted from HDFS (Hadoop Distributed File System) and re-stored in the DRAM of the new node. This recovery process is very time-consuming. Specifically, in traditional DRAM-based parameter servers, all parameters are stored in DRAM and data is backed up in the backend slow storage system (such as HDFS). When a DRAM-based parameter server crashes and restarts, all data in DRAM will be lost. The DRAM-based parameter server node recovery requires: 1. Reading all parameters from the slow storage HDFS disk, 2. Transmitting these parameters to the restarted parameter server node through the network, 3. Rebuilding the data structure of all parameters in DRAM and inserting these parameters into the HashMap data structure in DRAM. Especially when the parameter dimensions are hundreds of millions or even trillions, each of the above steps is very time-consuming. However, the long recovery time has a clear disadvantage for the parameter server cluster. Figure 2 is a schematic diagram showing a node failure of an existing parameter server cluster. Figure 2 As shown in the figure, the parameter server uses multiple copies to share the access pressure of the system. This also means that when a node (PS Node 2) goes offline and recovers, the overall throughput of the system will also decrease. The longer the system recovery time is, the longer the overall throughput of the system will decrease.
[0045] In order to solve the problems existing in the above-mentioned existing parameter server clusters, the present disclosure proposes a novel model parameter storage method and an innovative parameter server node recovery method. Specifically, the present disclosure proposes that non-volatile memory (NVM) can be used instead of DRAM to implement a method for storing model parameters on parameter server nodes based on non-volatile memory, and non-volatility brings the possibility of rapid recovery of parameter server nodes. This is because, for parameter server nodes based on non-volatile memory, all parameters will not be lost after restart and will still be stored in non-volatile memory. Therefore, the above three-step recovery process can be omitted. In addition, when writing data based on non-volatile memory, CPU instructions are used to ensure that the parameters will not be lost in the non-volatile memory. Therefore, during the recovery process, only a simple data structure check and / or version check is required on the non-volatile memory to immediately recover and provide services online. Here, NVM refers to a memory that can store data when power is off. A new generation of NVM (e.g., STT-RAM, PCM, ReRAM, 3D xPoint, etc.) can be used. Compared with the first generation of NVM (e.g., Flash Memory), the advantages of the new generation of NVM are: (1) the performance is greatly improved, closer to DRAM used for computer main memory; (2) it is free from the physical limitation that access must be addressed in multiples of a fixed size of bytes (e.g., Flash is usually 4KB (4*1024 bytes) and can be addressed as a single byte (Byte-addressable). For example, a persistent memory device (PMEM) is a 3D xPoint product. Compared with traditional DRAM, PMEM has a larger capacity and lower price cost, which can just meet the high memory usage requirements of the parameter server cluster. Therefore, one implementation method may be to store the model parameters in a distributed manner in a parameter server cluster composed of PMEM-based parameter server nodes.
[0046] In order to implement the above method, the present disclosure proposes a storage structure of model parameters in a non-volatile memory in a parameter server node based on non-volatile memory. Specifically, the model parameters corresponding to each model stored on each parameter server node can be logically divided into at least one level of storage submodule. When the model parameters are logically divided into two or more levels of storage submodules, the adjacent upper level storage submodule includes at least one lower level storage submodule. The hierarchical storage of model parameters is conducive to the management and query of model parameters, meets the requirements of high concurrent access, and is more conducive to the traversal query of model parameters when the parameter server node is restored. In addition, the present disclosure also proposes a new data organization form. Specifically, in the non-volatile memory in the parameter server node based on non-volatile memory, the data is divided into two layers of storage, and the first layer of data can record the ID information of a single parameter server node and the ID information of all the first-level storage submodules on the parameter server node. The second layer of data can use a hash map (HashMap) to store specific model parameters for each first-level storage submodule. In addition, the second-layer data also includes the header information of the first-layer storage submodule for query during fast recovery. In addition, the present disclosure also proposes a new recovery process. When the parameter server node is restarted, the first-layer data and the second-layer data stored in the non-volatile memory can be used to quickly traverse the storage submodules at all levels stored in the parameter server node, thereby quickly restoring all model parameters stored in the parameter server node, and realizing millisecond-level recovery of the parameter server node based on non-volatile memory. Figures 3 to 11 The model parameter storage method and system and the parameter server node recovery method and system according to the present disclosure are described in detail.
[0047] Figure 3 is a flowchart illustrating a storage method of model parameters according to an exemplary embodiment of the present disclosure.
[0048] Reference Figure 3 In step 301, model parameters of at least one model may be obtained. The model may be an AI model with high dimensions, such as a recommendation model, a credit card anti-fraud model, etc. A large amount of historical data may be put into an offline training system to train the AI model, and the trained AI model may be deployed to an online reasoning system for use. Each dimension of the AI model corresponds to a parameter. An AI model that can process massive amounts of data may have dimensions of hundreds of millions or even billions of dimensions, so each model may store hundreds of millions or even billions of parameters. The model parameters here may refer to parameters before or during training, or to parameters after training is completed.
[0049] In step 302, the model parameters of the at least one model may be stored in a parameter server cluster, wherein the parameter server cluster includes a plurality of parameter server nodes based on non-volatile memory. Here, the parameter server cluster may be an offline parameter server cluster for training, or an online parameter server cluster for inference.
[0050] According to an exemplary embodiment of the present disclosure, the model parameters of each model in the at least one model can be distributedly stored in the non-volatile memory of the multiple non-volatile memory-based parameter server nodes; for each non-volatile memory-based parameter server node, the model parameters corresponding to each model stored on the parameter server node are logically divided into at least one level of storage submodules for storage. For example, the model parameters of each model in the at least one model can be logically divided into multiple storage modules (for example, the first level storage submodule described below), and the divided storage modules are distributedly stored in the non-volatile memory of the multiple non-volatile memory-based parameter server nodes. In addition, in the non-volatile memory of each non-volatile memory-based parameter server node, each storage module can be further divided into at least one level of storage submodule (for example, the second level storage submodule, the third level storage submodule, etc. described below).
[0051] Figure 4 Schematic diagram showing a model parameter logical storage structure according to an exemplary embodiment of the present disclosure. Figure 4 The figure only shows the model parameter storage structure on one parameter server node (i.e., PS Node X) in the parameter server cluster. Other parameter server nodes can store model parameters in the same or similar manner. Each model can be logically divided into multiple storage submodules (e.g., Storage), which can be hashed to multiple parameter server nodes. Multiple storage submodules stored in one parameter server node can belong to different models, for example, Figure 4 Storage 1 and Storage 3 belong to Model 1, and Storage 24 belongs to Model 2. A Storage submodule can be divided into multiple lower-level storage submodules (for example, Shard). Each Shard is responsible for storing specific model parameters. Model parameters are stored in Shards as key-value pairs of "parameter name" + "parameter value", and each Shard only stores part of the model parameters to share the load. Figure 4It is only shown that the model parameters are logically divided into two levels of storage submodules (Storage and Shard) for storage, but the present disclosure is not limited to this. According to the present disclosure, the model parameters are logically divided into storage submodules of any level. For example, the model parameters can be logically divided into only one level of storage submodules (such as Storage), and specific model parameters are stored under each Storage, or the model parameters can be logically divided into three levels of storage submodules, that is, after Storage and Shard, each Shard can also be divided into multiple third-level storage submodules, and specific model parameters are stored in each third-level storage submodule, and so on.
[0052] Return to reference Figure 3 According to an exemplary embodiment of the present disclosure, the first layer data and the second layer data may be stored in a non-volatile memory of each non-volatile memory-based parameter server node.
[0053] For example, Figure 5 Schematic diagram showing a physical data storage structure of a parameter server node according to an exemplary embodiment of the present disclosure. Figure 5 ,In the non-volatile memory of the parameter server node, two layers of data storage are, Figure 5 For a parameter server node, there may be one storage in the first layer of data for storing information of the current node, and M storages in the second layer of data for storing specific information of M first-level storage submodules. The first layer of data and the second layer of data according to an exemplary embodiment of the present disclosure will be described in detail below.
[0054] According to an exemplary embodiment of the present disclosure, in the first layer of data, parameter server node header information may be stored for querying node information of the parameter server node and first-level storage submodule information.
[0055] The node information may be the ID information (Node ID) of the parameter server node. Each parameter server is assigned an ID within the parameter server cluster, and the ID is unique. Therefore, by obtaining the ID information of the parameter server node, it is possible to determine which parameter server node it is in the parameter server cluster.
[0056] In addition, the first-level storage submodule information may be a list of ID information (Storage ID List) of all first-level storage submodules (Storage) stored on the parameter server node. According to an exemplary embodiment of the present disclosure, the ID (e.g., Storage ID, Shard ID) of the storage submodule is numbered for each model. For example, for model 1, there will be S1R1 (Storage 1, Shard 1), S1R2, S2R1, S2R2... of model 1, and there will also be S1R1, S1R2, S2R1, S2R2... of model 2. Therefore, in order to distinguish the storage submodules between models, the first-level storage submodule ID included in the first-level storage submodule ID list may be composed of the model ID and the first-level storage submodule ID in the corresponding model. For example, the first-level storage submodule ID list may include Model 1Storage 0, Model 1Storage 3, Model 2Storage 1... In addition, the first-level storage submodule ID list can be stored in the first layer of data in the form of a persistent list, which can ensure that the model parameters can be inserted into the non-volatile memory.
[0057] According to an exemplary embodiment of the present disclosure, the first layer of data (i.e., parameter server node header information) as the root of the storage of the entire non-volatile memory-based parameter server node can be stored in a fixed location in the non-volatile memory of the parameter server node to facilitate querying when the parameter server node performs fast recovery.
[0058] According to an exemplary embodiment of the present disclosure, in the second layer of data, M first-level storage submodule header information and M first-level storage submodule hash map (HashMap) information can be stored. The second layer of data can be used to query the model parameters stored in each first-level storage submodule of the parameter server node. For example, for each first-level storage submodule, a corresponding non-volatile memory storage pool can be newly created in the second layer of data storage for separate storage.
[0059] According to an exemplary embodiment of the present disclosure, the first-level storage submodule header information (Storage Head) can allocate three spaces, which are respectively used to store the first-level storage submodule ID (Storage ID), the version information (Version) of the model parameters stored in the first-level storage submodule, and the pointer (Shard HashMap Pointer) of the first-level storage submodule to the next-level hash map. Figure 5As shown, the next level of the first-level storage submodule (Storage) is the second-level storage submodule (Shard), so the pointer to the next-level hash map in the header information of the first-level storage submodule can be a Shard HashMap Pointer, but the present disclosure is not limited to this. For example, when the next level of the first-level storage submodule (Storage) is the model parameter itself, the pointer to the next-level hash map in the header information of the first-level storage submodule can be a pointer to the model parameter hash map (for example, Para HashMap Point).
[0060] According to an exemplary embodiment of the present disclosure, the hash mapping information of the first-level storage submodule may include the hash mapping of each level of storage submodules from the second level to the N-th level storage submodules under the first-level storage submodule, and the model parameter hash mapping of each N-th level storage submodule under the first-level storage submodule, wherein N is the number of levels of storage submodules into which the model parameters are divided. Among them, the key of the hash mapping of each level of storage submodule is the ID of the storage submodule of that level, and the value is a pointer to the hash mapping of the next level, the key of the model parameter hash mapping is the parameter name, and the value is the parameter value, and the hash mapping of each level of storage submodule and the model parameter hash mapping are linked through the pointer pointing to the hash mapping of the next level corresponding to the storage submodule of that level or the upper level storage submodule of the model parameter.
[0061] like Figure 5 As shown, the model parameters are divided into two-level storage submodules (Storage and Shard) for storage. Therefore, the first-level storage submodule hash map information may include the hash map (ShardHashMap) of the second-level storage submodule and the model parameter hash map (Para HashMap) under each second-level storage submodule. In the hash map (Shard HashMap) of the second-level storage submodule, the key is the second-level storage submodule ID (Shard ID), and the value is the pointer (Para HashMap Point) pointing to the hash map of the model parameters. In the hash map (Para HashMap) of the model parameters, the key is the parameter name (Para ID), and the value is the parameter value (Value). Between the first-level storage submodule header information, the hash map of the second-level storage submodule, and the hash map of the model parameters, each level is linked by the pointer to the next-level hash map of the previous level, that is, the pointer to the next-level hash map in the first-level storage submodule header information points to the second-level storage submodule hash map, and the pointer to the next-level hash map in the second-level storage submodule hash map points to the hash map of the model parameters. In addition, Figure 5Only one model parameter hash mapping under the second-level storage submodule (Shard 0) is shown as an example, but other second-level storage submodules also have model parameter hash mappings. Of course, the present disclosure is not limited to Figure 5 Example shown.
[0062] For example, Figure 6 FIG. 2 is a schematic diagram showing a physical data storage structure of a parameter server node according to another exemplary embodiment of the present disclosure. Figure 6 As shown, when the model parameters are divided into a first-level storage submodule (Storage), each first-level storage submodule hash map information includes a model parameter hash map (ParaHashMap) under the first-level storage submodule, and the pointer to the next-level hash map in the first-level storage submodule header information is a pointer to the model parameter hash map (Para HashMap Point). The first-level storage submodule header information and the model parameter hash map are linked by a pointer to the model parameter hash map.
[0063] For example, Figure 7 FIG. 2 is a schematic diagram showing a physical data storage structure of a parameter server node according to another exemplary embodiment of the present disclosure. Figure 7As shown, when the model parameters are divided into three levels of storage submodules (Storage, Shard, Slice), each first-level storage submodule hash mapping information includes the hash mapping (Shard HashMap) of each second-level storage submodule under the first-level storage submodule, the hash mapping (Slice HashMap) of each third-level storage submodule under each second-level storage submodule, and the model parameter hash mapping (Para HashMap) under each third-level storage submodule. The pointer to the next level hash mapping in the first-level storage submodule header information is the pointer to the second-level storage submodule hash mapping (Shard HashMap Point), the pointer to the next level hash mapping in the second-level storage submodule hash mapping is the pointer to the third-level storage submodule hash mapping (Slice HashMapPoint), and the pointer to the next level hash mapping in the third-level storage submodule hash mapping is the pointer to the model parameter hash mapping (Para HashMap Point). Each level is linked to the first-level storage submodule header information, the second-level storage submodule hash map, the third-level storage submodule hash map, and the model parameter hash map through the pointer to the next-level hash map of the previous level, that is, the pointer to the next-level hash map in the first-level storage submodule header information points to the second-level storage submodule hash map, the pointer to the next-level hash map in the second-level storage submodule hash map points to the third-level storage submodule hash map, and the pointer to the next-level hash map in the third-level storage submodule hash map points to the model parameter hash map. In addition, Figure 7 Only the hash mapping of the third-level storage submodule under a second-level storage submodule (Shard 0) and the hash mapping of the model parameters under a third-level storage submodule (Slice0) are shown as examples, but other second-level storage submodules also have hash mappings of third-level storage submodules, and other third-level storage submodules also have hash mappings of model parameters.
[0064] Of course, the present disclosure is not limited to the above examples, and the model parameters may be divided into storage sub-modules of any level. When the model parameters are divided into storage sub-modules of any level, the first layer data and the second layer data are stored and constructed by analogy according to the logic of the above examples.
[0065] According to an exemplary embodiment of the present disclosure, the parameters of the specified model in the at least one model can be queried from the parameter server cluster based on the non-volatile memory, and the corresponding model estimation service can be provided based on the queried parameters of the specified model. According to the parameter name of the parameter of the specified model, the parameter server node ID and the storage submodule IDs of each level can be determined for parameter storage, and the parameter server node can be found according to the determined parameter server node ID, and the parameter value corresponding to the parameter name can be found based on the second-level data on the found parameter server node according to the storage submodule IDs of each level.
[0066] For example, when querying the parameters under model X, the parameter query process is that the user provides the parameter name (for example, Para0 of the last layer), and the parameter server node returns the corresponding value of Para0. Specifically, first, the hash can be calculated based on the parameter name (Para0) to obtain the Storage ID and Shard ID where this parameter is located. For example, assuming Para0 = '12345', model X has a total of 5 storages, each storage has 8 shards, and the Storage ID corresponding to Para0 is 0 (12345mod 5), Shard ID = 1 (12345mod 8). After calculating the Storage ID, the remainder can be used to divide the Storage ID by the total number of parameter server nodes in the current parameter server cluster to obtain the node ID where the Storage ID is located (for example, there are 3 servers in total, and the Storage ID corresponding to Para0 is 0, then Storage0 is stored on Node 0 (0mod 3 = 0)). At this point, through the parameter name Para0 provided by the user, the Node ID, Storage ID and Shard ID of this parameter storage are obtained through three calculations. Subsequently, the corresponding parameter data server node can be found according to the Node ID, and then the corresponding storage in the corresponding second-layer data can be found according to the Storage ID. The corresponding Shard hash map is found according to the pointer to the Shard hash map in the first-level storage sub-module header signal in the corresponding storage. In the corresponding Shard hash map, the corresponding pointer to the model parameter hash map is found according to the Shard ID. The corresponding model parameter hash map is found according to the pointer to the model parameter hash map. In the model parameter hash map, the corresponding parameter value value is found according to the parameter name Para0.
[0067] According to an exemplary embodiment of the present disclosure, writing parameters only occurs when a new model is launched. The process of writing parameters is similar to the process of querying parameters, with only two differences. First, in order to ensure that the old model parameters can still be accessed during the process of uploading new model parameters, all new model parameters will be inserted into a brand new storage pool. For example, Figure 5 The second-tier storage in will recreate an empty model 1, Storage 0new. When writing the new value of Para0, the parameters of Para0 will be inserted into the HashMap under Shard 1 under the new Storage 0new. When all parameters of the new model are uploaded to the parameter server cluster, the parameter query service will be switched to the new parameters. At the same time, the backend thread begins to slowly reclaim the space of the old model parameters. The second point is that when the new Para0 is written to the HashMap under Storage 0new, CPU instructions (such as clflushopt+mfence) can be used to ensure that each written parameter data is written to NVM instead of in the volatile CPU cache.
[0068] Figure 8 1 is a flowchart showing a method for recovering a parameter server node according to an exemplary embodiment of the present disclosure. The method for recovering a parameter server node according to an exemplary embodiment of the present disclosure is adapted to the above-mentioned reference Figure 3 The parameter server node needs to be restarted due to failure or other reasons.
[0069] Reference Figure 8 In step 801, after the parameter server node is restarted, the first layer of data stored in the non-volatile memory of the parameter server node may be obtained. As described above, the first layer of data may be parameter server node header information, which is used to query the node information and first-level storage submodule information of the parameter server node. The parameter server node header information may include a parameter server node ID and a first-level storage submodule ID list. Therefore, it is possible to determine which parameter server node in the parameter server cluster the restarted parameter server node is based on the parameter server node ID in the parameter server node header, and it is possible to determine all first-level storage submodules included in the restarted parameter server node based on the first-level storage submodule ID list in the parameter server node header.
[0070] According to an exemplary embodiment of the present disclosure, the first layer of data may be stored at a fixed location in the non-volatile memory of the parameter server node. Therefore, the first layer of data may be read from the fixed location in the non-volatile memory of the parameter server node. This is advantageous in that after the parameter server node is restarted, the storage information of the parameter server node can be quickly queried from the parameter server node.
[0071] According to an exemplary embodiment of the present disclosure, the first-level storage sub-module IDs included in the first-level storage sub-module ID list may consist of a model ID and a first-level storage sub-module ID in a corresponding model.
[0072] In step 802, each first-level storage submodule header information in the stored second-level data may be obtained from the non-volatile memory of the parameter server node based on the first-level data. As described above, the second-level data may include M first-level storage submodule header information and M first-level storage submodule hash mapping information, and the second-level data is used to query the model parameters stored in each first-level storage submodule of the parameter server node, where M is the number of first-level storage submodules stored on the parameter server node.
[0073] According to an exemplary embodiment of the present disclosure, the first-level storage submodule header information may include the first-level storage submodule ID, the version information of the model parameters stored in the first-level storage submodule, and the pointer of the first-level storage submodule to the next-level hash map. Therefore, after acquiring the first data, all the first-level storage submodule IDs of the parameter server node can be determined based on the first-level storage submodule ID list, and then based on each first-level storage submodule ID in all the first-level storage submodule IDs of the parameter server node, the first-level storage submodule header information with the corresponding first-level storage submodule ID is acquired. Therefore, the respective first-level storage submodule header information of all (M) first-level storage submodules stored on the parameter server node can be obtained.
[0074] According to an exemplary embodiment of the present disclosure, all (M) first-level storage submodules also have their own first-level storage submodule hash mapping information. Each first-level storage submodule can be associated with its first-level storage submodule hash mapping information based on a pointer to the next-level hash mapping in its first-level storage submodule header information. Each first-level storage submodule hash mapping information may include hash mappings of each level of storage submodules from the second level to the Nth level storage submodules under the first-level storage submodule, and model parameter hash mappings under each Nth level storage submodule under the first-level storage submodule, where N is the number of levels of storage submodules into which the model parameters are divided. The key of the hash mapping of each level of storage submodule is the ID of the storage submodule at that level, and the value is a pointer to the next-level hash mapping. The key of the model parameter hash mapping is the parameter name, and the value is the parameter value. The hash mapping of each level of storage submodule and the model parameter hash mapping are linked through the pointer to the next-level hash mapping corresponding to the storage submodule at that level or the previous level storage submodule of the model parameter, for example, Figures 5 to 7 shown.
[0075] In step 803, based on the header information of each first-level storage submodule, each first-level storage submodule hash mapping information in the second-layer data can be traversed to restore the model parameters stored on the parameter server node.
[0076] According to an exemplary embodiment of the present disclosure, the following operations may be performed for each first-level storage submodule: searching the next-level hash map through the pointer pointing to the next-level hash map corresponding to the previous-level storage submodule until the model parameter hash map is found; and restoring the model parameters based on the model parameter hash map.
[0077] For example, Figure 5 As shown, in the case where the model parameters are divided into two levels of storage submodules, each first-level storage submodule hash map information includes the hash maps (Shard HashMap) of each second-level storage submodule under the first-level storage submodule and the model parameter hash maps (Para HashMap) of each second-level storage submodule under the first-level storage submodule, wherein the pointer to the next-level hash map in the header information of the first-level storage submodule is the pointer (Shard HashMap Point) pointing to the hash map of the second-level storage submodule, the key of the hash map of each second-level storage submodule is the ID (Shard ID) of the second-level storage submodule, and the value is the pointer (Para HashMap Point) pointing to the model parameter hash map under the second-level storage submodule. When performing recovery, for each first-level storage submodule, the hash map (Shard HashMap) of the second-level storage submodule can be searched through the pointer (Shard HashMap Point) pointing to the hash map of the second-level storage submodule in the header information of the first-level storage submodule. In this regard, it is possible to check whether the hash map data of the second-level storage submodule is complete, and restore all the data of the hash map of the second-level storage submodule. Subsequently, the model parameter hash maps under all second-level storage submodules can be searched according to the pointers pointing to the model parameter hash maps of all second-level storage submodules in the hash map of the second-level storage submodule, thereby restoring the model parameters under all second-level storage submodules.
[0078] For example, Figure 6As shown, in the case where the model parameters are divided into first-level storage submodules, each first-level storage submodule hash map information includes the model parameter hash map (ParaHashMap) under the first-level storage submodule, wherein the pointer to the next-level hash map in the first-level storage submodule header information is the pointer to the model parameter hash map (Para HashMap Point). When performing recovery, for each first-level storage submodule, the model parameter hash map (Para HashMap) can be searched through the pointer to the model parameter hash map (Para HashMap Point) in the first-level storage submodule header information, thereby recovering the model parameters under each first-level storage submodule.
[0079] For example, Figure 7As shown, in the case where the model parameters are divided into three levels of storage submodules, each first-level storage submodule hash mapping information includes hash mappings (Shard HashMap) of each second-level storage submodule under the first-level storage submodule, hash mappings (SliceHashMap) of each third-level storage submodule under each second-level storage submodule, and model parameter hash mappings (Para HashMap) under each third-level storage submodule. The pointer to the next-level hash mapping in the first-level storage submodule header information is a pointer to the second-level storage submodule hash mapping (Shard HashMap Point), the pointer to the next-level hash mapping in the second-level storage submodule hash mapping is a pointer to the third-level storage submodule hash mapping (Slice HashMap Point), and the pointer to the next-level hash mapping in the third-level storage submodule hash mapping is a pointer to the model parameter hash mapping (Para HashMapPoint). When performing recovery, for each first-level storage submodule, the hash map (Shard HashMap) of the second-level storage submodule can be searched through the pointer (Shard HashMap Point) pointing to the hash map of the second-level storage submodule in the header information of the first-level storage submodule. In this regard, it is possible to check whether the hash map data of the second-level storage submodule is complete, and restore all the data of the hash map of the second-level storage submodule. Subsequently, the hash maps of each third-level storage submodule under all second-level storage submodules can be searched according to the pointer (Slice HashMapPoint) pointing to the hash map of the third-level storage submodule of all second-level storage submodules of the hash map of the second-level storage submodule. In this regard, it is possible to check whether the hash map data of all third-level storage submodules is complete, and restore all the data of the hash map of all third-level storage submodules. Subsequently, the model parameter hash map can be searched according to the pointer pointing to the model parameter hash map in the hash map of each third-level storage submodule, thereby restoring the model parameters under all third-level storage submodules.
[0080] Of course, the present disclosure is not limited to the above examples, and the model parameters may be divided into storage sub-modules of any level. In the case where the model parameters are divided into storage sub-modules of any level, the recovery process may perform the recovery of the model parameters by analogy according to the logic of the above examples.
[0081] In addition, according to another exemplary embodiment of the present disclosure, when the parameter server node is severely damaged and the repair time is long, after the parameter server node is restarted, the model parameters stored in the parameter server node may be outdated. Therefore, when the model parameter version information in the first-level storage submodule header information in the second-layer data is obtained, it can be determined based on the model parameter version information whether the model parameters stored in the parameter server node are the latest version, and whether to perform recovery is determined based on the determination result.
[0082] For example, Fig. 9 is a flowchart illustrating a recovery method of a parameter server node according to an exemplary embodiment of the present disclosure.
[0083] Reference Fig. 9 , Fig. 9 Steps 901 and 902 in Figure 8 801 and 802 in the embodiment perform the same operation, so they are not described again here.
[0084] After obtaining the header information of each first-level storage submodule in the second-layer data in step 902, the version information in the first-level storage submodule header information can be compared with the latest version information of the first-level storage submodule stored on the parameter server cluster metadata node. Here, the parameter server cluster metadata node is a server that stores global metadata information of the parameter server cluster, such as zoomkeeper. In the parameter server cluster, the latest version number corresponding to all first-level storage submodules of each model can be recorded in the metadata node. When the model parameters of the first-level storage submodule are updated, the version of the first-level storage submodule will be added by 1 on the metadata node. Every time a parameter server node is restarted, the latest version of the current first-level storage submodule can be checked. When the version number stored on the metadata node is newer than the version number on the restarted parameter server node, it means that the model parameters on the restarted parameter server node are outdated and there is no need to restore. When the version number stored on the metadata node is consistent with the version number on the restarted parameter server node, it means that the model parameters on the restarted parameter server node are the latest version and can be restored.
[0085] Therefore, in step 903, when the model parameter version information in the first-level storage submodule header information is consistent with the model parameter version information stored on the metadata node of the parameter server cluster, recovery is performed, that is, reference can be made to Figure 8 Step 803 described above will not be repeated here.
[0086] In step 904, if the model parameter version information in the first-level storage submodule header information is inconsistent with the model parameter version information stored on the metadata node of the parameter server cluster, no recovery is performed, but the latest version of the model parameters is pulled from the backend storage system (e.g., HDFS) and inserted into the parameter server node. Here, the backend storage system can store the latest version of the model parameters.
[0087] Fig.10 is a block diagram illustrating a storage system of model parameters according to an exemplary embodiment of the present disclosure.
[0088] Reference Fig.10 According to an exemplary embodiment of the present disclosure, a storage system 1000 for model parameters includes an acquisition device 1001 and a storage device 1002 .
[0089] The acquisition device 1001 can acquire model parameters of at least one model. The model can be an AI model with high dimensions, such as a recommendation model, a credit card anti-fraud model, etc. A large amount of historical data can be put into an offline training system to train the AI model, and the trained AI model can be deployed to an online reasoning system for use. Each dimension of the AI model corresponds to a parameter. An AI model that can process massive data can have dimensions of hundreds of millions or even billions of dimensions, so each model may store hundreds of millions or even billions of parameters. The model parameters here can refer to parameters before or during training, or parameters after training is completed.
[0090] The storage device 1002 may store the model parameters of the at least one model in a parameter server cluster, wherein the parameter server cluster includes a plurality of parameter server nodes based on non-volatile memory. Here, the parameter server cluster may be an offline parameter server cluster for training or an online parameter server cluster for inference.
[0091] According to an exemplary embodiment of the present disclosure, the storage device 1002 may store the model parameters of each model in the at least one model in a distributed manner in the non-volatile memory of the plurality of parameter server nodes based on non-volatile memory; for each parameter server node based on non-volatile memory, the model parameters corresponding to each model stored on the parameter server node are logically divided into at least one level of storage submodules for storage. For example, the storage device 1002 may logically divide the model parameters of each model in the at least one model into a plurality of storage modules (e.g., the first level storage submodule described below), and store the divided storage modules in a distributed manner in the non-volatile memory of the plurality of parameter server nodes based on non-volatile memory. In addition, in the non-volatile memory of each parameter server node based on non-volatile memory, each storage module may be further divided into at least one level of storage submodules (e.g., the second level storage submodule, the third level storage submodule, etc. described below).
[0092] According to an exemplary embodiment of the present disclosure, the storage device 1002 may store the first layer of data and the second layer of data in the non-volatile memory of each parameter server node based on the non-volatile memory. In the non-volatile memory of the parameter server node, two layers of data are stored, such as Figure 5 For a parameter server node, there may be one storage in the first layer of data for storing information of the current node, and M storages in the second layer of data for storing specific information of M first-level storage submodules. The first layer of data and the second layer of data according to an exemplary embodiment of the present disclosure will be described in detail below.
[0093] According to an exemplary embodiment of the present disclosure, in the first layer of data, parameter server node header information may be stored for querying node information of the parameter server node and first-level storage submodule information.
[0094] The node information may be the ID information of the parameter server node. Each parameter server is assigned an ID within the parameter server cluster, and the ID is unique. Therefore, by obtaining the ID information of the parameter server node, it is possible to determine which parameter server node it is in the parameter server cluster.
[0095] In addition, the first-level storage submodule information may be a list of ID information of all first-level storage submodules stored on the parameter server node. According to an exemplary embodiment of the present disclosure, the ID of the storage submodule (e.g., Storage ID, Shard ID) is numbered for each model, for example, for model 1, there will be S1R1 (Storage 1, Shard1), S1R2, S2R1, S2R2... of model 1, and there will be S1R1, S1R2, S2R1, S2R2... of model 2. Therefore, in order to distinguish the storage submodules between models, the first-level storage submodule ID included in the first-level storage submodule ID list may be composed of the model ID and the first-level storage submodule ID in the corresponding model, for example, the first-level storage submodule ID list may include Model1Storage 0, Model 1Storage 3, Model 2Storage 1... In addition, the first-level storage submodule ID list may be stored in the first layer of data in the form of a persistent list, so that the model parameters can be inserted into the non-volatile memory.
[0096] According to an exemplary embodiment of the present disclosure, the first layer of data (i.e., parameter server node header information) serves as the root of the storage of the entire parameter server node based on non-volatile memory. The storage device 1002 may store the first layer of data in a fixed location in the non-volatile memory of the parameter server node to facilitate querying when the parameter server node performs fast recovery.
[0097] According to an exemplary embodiment of the present disclosure, in the second layer of data, M first-level storage submodule header information and M first-level storage submodule hash map (HashMap) information may be stored. The second layer of data may be used to query the model parameters stored in each first-level storage submodule of the parameter server node. For example, for each first-level storage submodule, the storage device 1002 may newly create a corresponding non-volatile memory storage pool in the second layer of data storage for separate storage.
[0098] According to an exemplary embodiment of the present disclosure, Figure 5As shown, the first-level storage submodule header information (StorageHead) can allocate three spaces, which are respectively used to store the first-level storage submodule ID (Storage ID), the version information (Version) of the model parameters stored in the first-level storage submodule, and the pointer (Shard HashMap Pointer) of the first-level storage submodule pointing to the next-level hash map. The next level of the first-level storage submodule (Storage) is the second-level storage submodule (Shard), so the pointer pointing to the next-level hash map in the first-level storage submodule header information can be a Shard HashMap Pointer, but the present disclosure is not limited to this. For example, when the next level of the first-level storage submodule (Storage) is the model parameter itself, the pointer pointing to the next-level hash map in the first-level storage submodule header information can be a pointer to the model parameter hash map (for example, Para HashMap Point).
[0099] According to an exemplary embodiment of the present disclosure, the hash mapping information of the first-level storage submodule may include the hash mapping of each level of storage submodules from the second level to the N-th level storage submodules under the first-level storage submodule, and the model parameter hash mapping of each N-th level storage submodule under the first-level storage submodule, wherein N is the number of levels of storage submodules into which the model parameters are divided. Among them, the key of the hash mapping of each level of storage submodule is the ID of the storage submodule of that level, and the value is a pointer to the hash mapping of the next level, the key of the model parameter hash mapping is the parameter name, and the value is the parameter value, and the hash mapping of each level of storage submodule and the model parameter hash mapping are linked through the pointer pointing to the hash mapping of the next level corresponding to the storage submodule of that level or the upper level storage submodule of the model parameter.
[0100] According to an exemplary embodiment of the present disclosure, the storage system 1000 may further include a service device (not shown), which may query the parameters of the specified model in the at least one model from the parameter server cluster based on the non-volatile memory, and provide corresponding model estimation services based on the parameters of the specified model queried. For example, the service device may determine the parameter server node ID and the storage submodule IDs of each level of the parameter storage according to the parameter name of the parameter of the specified model, find the parameter server node according to the determined parameter server node ID, and find the parameter value corresponding to the parameter name based on the second-level data on the found parameter server node according to the storage submodule IDs of each level.
[0101] According to an exemplary embodiment of the present disclosure, writing parameters will only occur when a new model is launched. The process of writing parameters is similar to the process of querying parameters, with only two differences. First: In order to ensure that the old model parameters can still be accessed during the process of uploading new model parameters, the storage device 1002 can insert all new model parameters into a brand new storage pool. When all parameters of the new model are uploaded to the parameter server cluster, the parameter query service will be switched to the new parameters. At the same time, the backend thread begins to slowly reclaim the space of the old model parameters. The second point is that when the new Para0 is written to the HashMap under Storage 0new, the storage device 1002 can use CPU instructions (such as clflushopt+mfence) to ensure that each written parameter data is written to NVM instead of in the volatile CPU cache.
[0102] Fig.11 1 is a block diagram showing a recovery system of a parameter server node according to an exemplary embodiment of the present disclosure. The recovery system of a parameter server node according to an exemplary embodiment of the present disclosure is adapted to the above-mentioned reference Figure 3 The parameter server node needs to be restarted due to failure or other reasons.
[0103] Reference Fig.11 According to an exemplary embodiment of the present disclosure, a parameter server node recovery system 1100 may include a first acquisition device 1101 , a second acquisition device 1102 , and a recovery device 1103 .
[0104] After the parameter server node is restarted, the first acquisition device 1101 may acquire the first layer of data stored in the non-volatile memory of the parameter server node. As described above, the first layer of data may be the parameter server node header information, which is used to query the node information and the first-level storage submodule information of the parameter server node. The parameter server node header information may include the parameter server node ID and the first-level storage submodule ID list. Therefore, the first acquisition device 1101 may determine which parameter server node in the parameter server cluster the restarted parameter server node is based on the parameter server node ID in the parameter server node header, and may determine all the first-level storage submodules included in the restarted parameter server node based on the first-level storage submodule ID list in the parameter server node header.
[0105] According to an exemplary embodiment of the present disclosure, the first layer of data may be stored at a fixed location in the non-volatile memory of the parameter server node. Therefore, the first acquisition device 1101 may read the first layer of data from a fixed location in the non-volatile memory of the parameter server node. This is conducive to quickly querying the storage information of the parameter server node from the parameter server node after the parameter server node is restarted.
[0106] According to an exemplary embodiment of the present disclosure, the first-level storage sub-module IDs included in the first-level storage sub-module ID list may consist of a model ID and a first-level storage sub-module ID in a corresponding model.
[0107] The second acquisition means 1102 may acquire each first-level storage submodule header information in the second-level data stored in the non-volatile memory of the parameter server node based on the first-level data. As described above, the second-level data may include M first-level storage submodule header information and M first-level storage submodule hash mapping information, and the second-level data is used to query the model parameters stored in each first-level storage submodule of the parameter server node, where M is the number of first-level storage submodules stored on the parameter server node.
[0108] According to an exemplary embodiment of the present disclosure, the first-level storage submodule header information may include the first-level storage submodule ID, the version information of the model parameters stored in the first-level storage submodule, and the pointer of the first-level storage submodule to the next-level hash map. Therefore, after acquiring the first data, the second acquisition device 1102 may determine all the first-level storage submodule IDs of the parameter server node based on the first-level storage submodule ID list, and then acquire the first-level storage submodule header information with the corresponding first-level storage submodule ID based on each first-level storage submodule ID in all the first-level storage submodule IDs of the parameter server node. Therefore, the second acquisition device 1102 can obtain the respective first-level storage submodule header information of all (M) first-level storage submodules stored on the parameter server node.
[0109] According to an exemplary embodiment of the present disclosure, all (M) first-level storage submodules also have their own first-level storage submodule hash mapping information. Each first-level storage submodule can be associated with its first-level storage submodule hash mapping information based on a pointer to the next-level hash mapping in its first-level storage submodule header information. Each first-level storage submodule hash mapping information may include hash mappings of each level of storage submodules from the second level to the Nth level storage submodules under the first-level storage submodule, and model parameter hash mappings under each Nth level storage submodule under the first-level storage submodule, where N is the number of levels of storage submodules into which the model parameters are divided. The key of the hash mapping of each level of storage submodule is the ID of the storage submodule at that level, and the value is a pointer to the next-level hash mapping. The key of the model parameter hash mapping is the parameter name, and the value is the parameter value. The hash mapping of each level of storage submodule and the model parameter hash mapping are linked through the pointer to the next-level hash mapping corresponding to the storage submodule at that level or the previous level storage submodule of the model parameter, for example, Figures 5 to 7 shown.
[0110] The recovery device 1103 can traverse the hash mapping information of each first-level storage submodule in the second-layer data based on the header information of each first-level storage submodule to recover the model parameters stored on the parameter server node.
[0111] According to an exemplary embodiment of the present disclosure, the recovery device 1103 may perform the following operations for each first-level storage submodule: search the next-level hash map through the pointer pointing to the next-level hash map corresponding to the previous-level storage submodule until the model parameter hash map is found; and restore the model parameters based on the model parameter hash map.
[0112] For example, Figure 5 As shown, in the case where the model parameters are divided into two levels of storage submodules, each first-level storage submodule hash map information includes the hash maps (Shard HashMap) of each second-level storage submodule under the first-level storage submodule and the model parameter hash maps (Para HashMap) of each second-level storage submodule under the first-level storage submodule, wherein the pointer to the next-level hash map in the header information of the first-level storage submodule is the pointer (Shard HashMap Point) pointing to the hash map of the second-level storage submodule, the key of the hash map of each second-level storage submodule is the ID (Shard ID) of the second-level storage submodule, and the value is the pointer (Para HashMap Point) pointing to the model parameter hash map under the second-level storage submodule. When the recovery device 1103 performs recovery, for each first-level storage submodule, the hash map (Shard HashMap) of the second-level storage submodule can be searched through the pointer (Shard HashMap Point) pointing to the hash map of the second-level storage submodule in the header information of the first-level storage submodule. In this regard, the recovery device 1103 can check whether the hash map data of the second-level storage submodule is complete, and recover all the data of the hash map of the second-level storage submodule. Subsequently, the recovery device 1103 can search the model parameter hash maps under all second-level storage submodules according to the pointers pointing to the model parameter hash maps of all second-level storage submodules in the hash map of the second-level storage submodule, thereby recovering the model parameters under all second-level storage submodules.
[0113] For example, Figure 6As shown, in the case where the model parameters are divided into first-level storage submodules, each first-level storage submodule hash map information includes the model parameter hash map (ParaHashMap) under the first-level storage submodule, wherein the pointer to the next-level hash map in the first-level storage submodule header information is the pointer to the model parameter hash map (Para HashMap Point). When the recovery device 1103 performs recovery, for each first-level storage submodule, the model parameter hash map (Para HashMap) can be searched through the pointer to the model parameter hash map (ParaHashMap Point) in the first-level storage submodule header information, thereby recovering the model parameters under each first-level storage submodule.
[0114] For example, Figure 7As shown, in the case where the model parameters are divided into three levels of storage submodules, each first-level storage submodule hash mapping information includes hash mappings (Shard HashMap) of each second-level storage submodule under the first-level storage submodule, hash mappings (SliceHashMap) of each third-level storage submodule under each second-level storage submodule, and model parameter hash mappings (Para HashMap) under each third-level storage submodule. The pointer to the next-level hash mapping in the first-level storage submodule header information is a pointer to the second-level storage submodule hash mapping (Shard HashMap Point), the pointer to the next-level hash mapping in the second-level storage submodule hash mapping is a pointer to the third-level storage submodule hash mapping (Slice HashMap Point), and the pointer to the next-level hash mapping in the third-level storage submodule hash mapping is a pointer to the model parameter hash mapping (Para HashMapPoint). When the recovery device 1103 performs recovery, for each first-level storage submodule, the hash map (Shard HashMap) of the second-level storage submodule can be searched through the pointer (Shard HashMap Point) pointing to the hash map of the second-level storage submodule in the header information of the first-level storage submodule. In this regard, the recovery device 1103 can check whether the hash map data of the second-level storage submodule is complete, and restore all the data of the hash map of the second-level storage submodule. Subsequently, the recovery device 1103 can search the hash maps of each third-level storage submodule under all second-level storage submodules according to the pointer (Slice HashMap Point) pointing to the hash map of the third-level storage submodule of all second-level storage submodules of the hash map of the second-level storage submodule. In this regard, the recovery device 1103 can check whether the hash map data of all third-level storage submodules are complete, and restore all the data of the hash maps of all third-level storage submodules. Subsequently, the recovery device 1103 may search the model parameter hash map according to the pointer pointing to the model parameter hash map in the hash map of each third-level storage submodule, thereby recovering the model parameters under all third-level storage submodules.
[0115] Of course, the present disclosure is not limited to the above examples, and the model parameters may be divided into storage sub-modules of any level. In the case where the model parameters are divided into storage sub-modules of any level, the recovery process may perform the recovery of the model parameters by analogy according to the logic of the above examples.
[0116] In addition, according to another exemplary embodiment of the present disclosure, when the parameter server node is severely damaged and the repair time is long, after the parameter server node is restarted, the model parameters stored in the parameter server node are outdated. Therefore, when the second acquisition device 1102 acquires the model parameter version information in the first-level storage submodule header information in the second-layer data, the recovery device 1103 can determine whether the model parameters stored in the parameter server node are the latest version based on the model parameter version information, and decide whether to perform recovery according to the determination result.
[0117] For example, after the second acquisition device 1102 acquires the header information of each first-level storage submodule in the second-layer data, the recovery device 1103 can compare the version information in the first-level storage submodule header information with the latest version information of the first-level storage submodule stored on the parameter server cluster metadata node. Here, the parameter server cluster metadata node is a server that stores global metadata information of the parameter server cluster, such as zoomkeeper. In the parameter server cluster, the latest version number corresponding to all first-level storage submodules of each model can be recorded in the metadata node. When the model parameters of the first-level storage submodule are updated, the version of the first-level storage submodule will be added by 1 on the metadata node. Every time a parameter server node is restarted, the latest version of the current first-level storage submodule can be checked. When the version number stored on the metadata node is newer than the version number on the restarted parameter server node, it means that the model parameters on the restarted parameter server node are outdated and there is no need to recover. When the version number stored on the metadata node is consistent with the version number on the restarted parameter server node, it means that the model parameters on the restarted parameter server node are the latest version and recovery can be performed.
[0118] When the model parameter version information in the first-level storage submodule header information is consistent with the model parameter version information stored on the metadata node of the parameter server cluster, the recovery device 1103 can perform recovery.
[0119] In the case where the model parameter version information in the first-level storage submodule header information is inconsistent with the model parameter version information stored on the metadata node of the parameter server cluster, the recovery device 1103 does not perform recovery, but pulls the latest version of the model parameters from the backend storage system (e.g., HDFS) and inserts them into the parameter server node. Here, the backend storage system can store the latest version of the model parameters.
[0120] According to an exemplary embodiment of the present disclosure, a parameter server cluster is provided, the parameter server cluster including a plurality of parameter server nodes based on non-volatile memory, the parameter server cluster being used to store model parameters of at least one model in a distributed manner. Each parameter server node based on non-volatile memory included in the parameter server cluster may have the above reference Figure 4 The model parameter logical storage structure described above may have Figure 5-7 In addition, each non-volatile memory-based parameter server node included in the parameter server cluster can be restarted as follows: Figure 8 or Fig. 9 The described recovery method is used for recovery.
[0121] According to an exemplary embodiment of the present disclosure, the non-volatile memory may include at least one of STT-RAM, PCM, ReRAM, and 3DxPoint, wherein PMEM (3DxPoint product) may be used to implement a PMEM-based parameter server node.
[0122] According to the storage method and system of model parameters, the recovery method and system of parameter server nodes, and the parameter server cluster disclosed in the present invention, the model parameters are stored on the parameter server based on non-volatile memory to replace the parameter server based on DRAM, which greatly reduces the hardware cost. In addition, for the parameter server based on non-volatile memory, a model parameter logical storage structure and a data physical storage structure are designed to store the model parameters logically in a hierarchical manner, and divide the data into two layers of storage on the non-volatile memory to meet the high concurrency and high availability requirements of the parameter server. And a fast recovery process after restart is designed. According to the data structure of the two-layer storage, all parameters stored on the parameter server node can be easily and quickly queried and restored, achieving the effect of millisecond-level recovery.
[0123] The above has been referred to Figures 3 to 11 A method and system for storing model parameters, a method and system for recovering parameter server nodes, and a parameter server cluster according to exemplary embodiments of the present disclosure are described.
[0124] Fig.10 The storage system of the model parameters shown and Fig.11 Each device in the recovery system of the parameter server node shown may be configured as software, hardware, firmware, or any combination of the above items to perform a specific function. For example, each device may correspond to a dedicated integrated circuit, or may correspond to a pure software code, or may correspond to a module that combines software and hardware. In addition, one or more functions implemented by each device may also be uniformly executed by components in a physical entity device (e.g., a processor, a client, or a server, etc.).
[0125] In addition, refer to Figure 3 Storage method and reference of model parameters described Figure 8 and 9 The described parameter server node recovery method can be implemented by a program (or instruction) recorded on a computer-readable storage medium. For example, according to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions can be provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is prompted to perform the model parameter storage method or parameter server node recovery method according to the present disclosure.
[0126] The computer program in the computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. It should be noted that the computer program can also be used to perform additional steps in addition to the above steps or perform more specific processing when performing the above steps. The contents of these additional steps and further processing have been described in reference to Figure 3 , 8 , 9 are mentioned in the description of the related methods, so they will not be repeated here to avoid repetition.
[0127] It should be noted that each device in the storage system of model parameters and the recovery system of parameter server nodes according to the exemplary embodiment of the present disclosure can completely rely on the operation of computer programs to realize corresponding functions, that is, the functional architecture of the computer program in each device corresponds to each step, so that the entire system is called through a special software package (for example, lib library) to realize the corresponding function.
[0128] on the other hand, Fig.10 and Fig.11 Each device in the embodiment may also be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. When implemented by software, firmware, middleware, or microcode, the program code or code segment for performing the corresponding operation may be stored in a computer-readable medium such as a storage medium, so that the processor may perform the corresponding operation by reading and running the corresponding program code or code segment.
[0129] For example, an exemplary embodiment of the present disclosure may also be implemented as a computing device, which includes a storage component and a processor, wherein a set of computer-executable instructions is stored in the storage component. When the set of computer-executable instructions is executed by the processor, a storage method for model parameters or a recovery method for parameter server nodes according to an exemplary embodiment of the present disclosure is executed.
[0130] Specifically, the computing device can be deployed in a server or client, or can be deployed on a node device in a distributed network environment. In addition, the computing device can be a PC, a tablet device, a personal digital assistant, a smart phone, a web application, or other device capable of executing the above instruction set.
[0131] Here, the computing device is not necessarily a single computing device, but may also be any device or circuit collection that can execute the above instructions (or instruction sets) individually or jointly. The computing device may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that is interconnected with a local or remote (e.g., via wireless transmission) interface.
[0132] In a computing device, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, a processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0133] According to the exemplary embodiments of the present disclosure, some operations described in the storage method of model parameters or the recovery method of parameter server nodes can be implemented by software, some operations can be implemented by hardware, and in addition, these operations can also be implemented by a combination of software and hardware.
[0134] The processor may execute instructions or codes stored in one of the storage components, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transmission protocol.
[0135] The storage component may be integrated with the processor, for example, RAM or flash memory is arranged within an integrated circuit microprocessor, etc. In addition, the storage component may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The storage component and the processor may be operatively coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor can read files stored in the storage component.
[0136] In addition, the computing device may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the computing device may be connected to each other via a bus and / or a network.
[0137] The storage method of the model parameters or the recovery method of the parameter server node according to the exemplary embodiment of the present disclosure can be described as various interconnected or coupled functional blocks or functional diagrams. However, these functional blocks or functional diagrams can be equally integrated into a single logical device or operated according to non-exact boundaries.
[0138] Therefore, refer to Figure 3 The storage method or reference to the model parameters described Figure 8 The parameter server node recovery method described in or 9 may be implemented by a system including at least one computing device and at least one storage device storing instructions.
[0139] According to an exemplary embodiment of the present disclosure, at least one computing device is a computing device for executing the storage method of model parameters or the recovery method of parameter server nodes according to the exemplary embodiment of the present disclosure, and a computer executable instruction set is stored in the storage device. When the computer executable instruction set is executed by the at least one computing device, the storage method of model parameters or the recovery method of parameter server nodes according to the present disclosure is executed.
[0140] The above describes various exemplary embodiments of the present disclosure, and it should be understood that the above description is only exemplary and not exhaustive, and the present disclosure is not limited to the disclosed exemplary embodiments. Without departing from the scope and spirit of the present disclosure, many modifications and changes are obvious to those of ordinary skill in the art. Therefore, the scope of protection of the present disclosure should be based on the scope of the claims.
Claims
1. A method for recovering a parameter server node, wherein: The parameter server node is a node in a parameter server cluster, and the parameter server node is a parameter server node based on a non-volatile memory, and the model parameters of each model stored in the non-volatile memory of the parameter server node are logically divided into at least one level of storage submodules, and the recovery method includes: After the parameter server node is restarted, obtaining the first layer data stored in the non-volatile memory of the parameter server node, wherein the first layer data includes parameter server node header information, which is used to query node information and first-level storage submodule information of the parameter server node; Based on the first layer of data, obtaining header information of each first-level storage submodule in the second layer of data stored in the non-volatile memory of the parameter server node, wherein the second layer of data includes M first-level storage submodule header information and M first-level storage submodule hash mapping information, and the second layer of data is used to query the model parameters stored in each first-level storage submodule of the parameter server node, wherein M is the number of first-level storage submodules stored on the parameter server node; Based on each first-level storage submodule header information, traverse each first-level storage submodule hash mapping information in the second layer data to restore the model parameters stored on the parameter server node; The first-level storage submodule header information includes a pointer of the first-level storage submodule pointing to the next-level hash mapping, so as to be associated with the first-level storage submodule hash mapping information.
2. The recovery method according to claim 1, wherein: The first layer of data is stored at a fixed location in a non-volatile memory of the parameter server node; Wherein, obtaining the stored first layer data from the non-volatile memory of the parameter server node includes: The first layer of data is read from a fixed location in the non-volatile memory of the parameter server node.
3. The recovery method according to claim 1, wherein: The parameter server node header information includes a parameter server node ID and a first-level storage submodule ID list; The first-level storage submodule header information also includes the first-level storage submodule ID and version information of the model parameters stored in the first-level storage submodule.
4. The recovery method according to claim 3, wherein: The first-level storage submodule IDs included in the first-level storage submodule ID list are composed of a model ID and a first-level storage submodule ID in a corresponding model.
5. The recovery method according to claim 3, wherein: Based on the first layer of data, obtaining header information of each first-level storage submodule in the stored second layer of data from the non-volatile memory of the parameter server node, including: Based on the first-level storage submodule ID list, determine all first-level storage submodule IDs of the parameter server node; Based on each first-level storage submodule ID of all the first-level storage submodule IDs of the parameter server node, first-level storage submodule header information having the corresponding first-level storage submodule ID is acquired.
6. The recovery method according to claim 3, wherein: The first-level storage submodule hash mapping information includes hash mappings of each storage submodule from the second level to the Nth level storage submodule under the first-level storage submodule, and hash mappings of model parameters under each Nth level storage submodule under the first-level storage submodule, wherein N is the number of levels of storage submodules into which the model parameters are divided; The key of the hash map of each level of storage submodule is the ID of the storage submodule at that level, and the value is a pointer to the hash map of the next level. The key of the model parameter hash map is the parameter name, and the value is the parameter value. The hash map of each level of storage submodule and the hash map of model parameters are linked through the pointer pointing to the hash map of the next level corresponding to the storage submodule of the level or the previous level storage submodule of the model parameter.
7. The recovery method according to claim 6, wherein: The step of traversing hash mapping information of each first-level storage submodule in the second-layer data based on header information of each first-level storage submodule to restore the model parameters stored on the parameter server node includes: Perform the following operations for each first-level storage submodule: Search the next level hash map through the pointer pointing to the next level hash map corresponding to the previous level storage submodule until the model parameter hash map is found; Restore model parameters based on model parameter hash map.
8. The recovery method according to claim 7, wherein: In the case where the model parameters are divided into first-level storage submodules: each first-level storage submodule hash mapping information includes a model parameter hash mapping under the first-level storage submodule, wherein the pointer to the next-level hash mapping in the first-level storage submodule header information is a pointer to the model parameter hash mapping; The step of searching the next level hash map through the pointer pointing to the next level hash map corresponding to the previous level storage submodule until the model parameter hash map is found includes: The model parameter hash map is searched through the pointer pointing to the model parameter hash map in the first-level storage submodule header information.
9. The recovery method according to claim 7, wherein: In the case where the model parameters are divided into two levels of storage submodules: each first-level storage submodule hash mapping information includes hash mappings of each second-level storage submodule under the first-level storage submodule and model parameter hash mappings of each second-level storage submodule under the first-level storage submodule, wherein the pointer to the next-level hash mapping in the first-level storage submodule header information is a pointer to the hash mapping of the second-level storage submodule, the key of the hash mapping of each second-level storage submodule is the second-level storage submodule ID, and the value is a pointer to the model parameter hash mapping under the second-level storage submodule; The step of searching the hash map of the next level through the corresponding pointer of the upper level storage submodule until the model parameter hash map is found includes: Searching the hash map of the second-level storage submodule through the pointer pointing to the hash map of the second-level storage submodule in the header information of the first-level storage submodule; The model parameter hash map is searched through a pointer pointing to the model parameter hash map in the hash map of the second-level storage submodule.
10. The recovery method according to claim 3, further comprising: When the model parameter version information in the header information of the first-level storage submodule is consistent with the model parameter version information stored on the metadata node of the parameter server cluster, performing the recovery step; In the case where the model parameter version information in the first-level storage submodule header information is inconsistent with the model parameter version information stored on the metadata node of the parameter server cluster, the recovery step is not performed, and the latest version of the model parameters is pulled from the backend storage system and inserted into the parameter server node; The metadata node of the parameter server cluster stores the latest version number of the model parameters, and the backend storage system stores the latest version of the model parameters.
11. The recovery method according to claim 1, wherein: The non-volatile memory includes at least one of STT-RAM, PCM, ReRAM and 3DxPoint.
12. A parameter server node recovery system, wherein: The parameter server node is a node in a parameter server cluster, and the parameter server node is a parameter server node based on a non-volatile memory, and the model parameters of each model stored in the non-volatile memory of the parameter server node are logically divided into at least one level of storage submodules, and the recovery device includes: A first acquisition device is configured to: after the parameter server node is restarted, acquire the first layer data stored in the non-volatile memory of the parameter server node, wherein the first layer data includes parameter server node header information, which is used to query the node information and the first level storage submodule information of the parameter server node; The second acquisition device is configured to: based on the first layer of data, acquire each first-level storage submodule header information in the stored second layer of data from the non-volatile memory of the parameter server node, wherein the second layer of data includes M first-level storage submodule header information and M first-level storage submodule hash mapping information, and the second layer of data is used to query the model parameters stored in each first-level storage submodule of the parameter server node, wherein M is the number of first-level storage submodules stored on the parameter server node; A recovery device is configured to: based on each first-level storage submodule header information, traverse each first-level storage submodule hash mapping information in the second layer data to recover the model parameters stored on the parameter server node; The first-level storage submodule header information includes a pointer of the first-level storage submodule pointing to the next-level hash mapping, so as to be associated with the first-level storage submodule hash mapping information.
13. The recovery system according to claim 12, wherein: The first layer of data is stored at a fixed location in a non-volatile memory of the parameter server node; Wherein, the first acquisition device is configured to: read the first layer data from a fixed position in the non-volatile memory of the parameter server node.
14. The recovery system according to claim 12, wherein: The parameter server node header information includes a parameter server node ID and a first-level storage submodule ID list; The first-level storage submodule header information also includes the first-level storage submodule ID and version information of the model parameters stored in the first-level storage submodule.
15. The recovery system according to claim 14, wherein: The first-level storage submodule IDs included in the first-level storage submodule ID list are composed of a model ID and a first-level storage submodule ID in a corresponding model.
16. The recovery system according to claim 14, wherein: The second acquisition device is configured to: Based on the first-level storage submodule ID list, determine all first-level storage submodule IDs of the parameter server node; Based on each first-level storage submodule ID of all the first-level storage submodule IDs of the parameter server node, first-level storage submodule header information having the corresponding first-level storage submodule ID is acquired.
17. The recovery system according to claim 14, wherein: The first-level storage submodule hash mapping information includes hash mappings of each storage submodule from the second level to the Nth level storage submodule under the first-level storage submodule, and hash mappings of model parameters under each Nth level storage submodule under the first-level storage submodule, wherein N is the number of levels of storage submodules into which the model parameters are divided; The key of the hash map of each level of storage submodule is the ID of the storage submodule at that level, and the value is a pointer to the hash map of the next level. The key of the model parameter hash map is the parameter name, and the value is the parameter value. The hash map of each level of storage submodule and the hash map of model parameters are linked through the pointer pointing to the hash map of the next level corresponding to the storage submodule of the level or the previous level storage submodule of the model parameter.
18. The recovery system according to claim 17, wherein: The recovery device is configured as: Perform the following operations for each first-level storage submodule: Search the next level hash map through the pointer pointing to the next level hash map corresponding to the previous level storage submodule until the model parameter hash map is found; Restore model parameters based on model parameter hash map.
19. The recovery system of claim 18, wherein: In the case where the model parameters are divided into first-level storage submodules: each first-level storage submodule hash mapping information includes a model parameter hash mapping under the first-level storage submodule, wherein the pointer to the next-level hash mapping in the first-level storage submodule header information is a pointer to the model parameter hash mapping; The recovery device is configured to search the model parameter hash map through the pointer pointing to the model parameter hash map in the header information of the first-level storage submodule.
20. The recovery system of claim 18, wherein: In the case where the model parameters are divided into two levels of storage submodules: each first-level storage submodule hash mapping information includes hash mappings of each second-level storage submodule under the first-level storage submodule and model parameter hash mappings of each second-level storage submodule under the first-level storage submodule, wherein the pointer to the next-level hash mapping in the first-level storage submodule header information is a pointer to the hash mapping of the second-level storage submodule, the key of the hash mapping of each second-level storage submodule is the second-level storage submodule ID, and the value is a pointer to the model parameter hash mapping under the second-level storage submodule; Among them, the recovery device is configured to: search the hash map of the second-level storage submodule through the pointer pointing to the hash map of the second-level storage submodule in the header information of the first-level storage submodule; search the model parameter hash map through the pointer pointing to the model parameter hash map in the hash map of the second-level storage submodule.
21. The recovery system of claim 14, wherein: The recovery device is also configured to: When the model parameter version information in the header information of the first-level storage submodule is consistent with the model parameter version information stored on the metadata node of the parameter server cluster, performing the recovery step; In the case where the model parameter version information in the first-level storage submodule header information is inconsistent with the model parameter version information stored on the metadata node of the parameter server cluster, the recovery step is not performed, and the latest version of the model parameters is pulled from the backend storage system and inserted into the parameter server node; The metadata node of the parameter server cluster stores the latest version number of the model parameters, and the backend storage system stores the latest version of the model parameters.
22. The recovery system of claim 12, wherein: The non-volatile memory includes at least one of STT-RAM, PCM, ReRAM and 3DxPoint.
23. A computer-readable storage medium storing instructions, wherein: When the instructions are executed by at least one computing device, the at least one computing device is prompted to perform the parameter server node recovery method according to any one of claims 1 to 11.
24. A system comprising at least one computing device and at least one storage device storing instructions, wherein: When the instructions are executed by the at least one computing device, the at least one computing device is prompted to perform the parameter server node recovery method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Memory access method of flow data
CN102779097A
Management method and device for nonvolatile memory (NVM)
CN103456360A
Orthogonal multilateral Hash mapping indexing method for improving massive data inquiring performance
CN105608224A
Storage control device, storage control method and recording medium
CN110134618A
Graph training system, data access method and device, electronic equipment and storage medium
CN110751275A
