Data storage method, apparatus, and system, data reading method and apparatus, device, and medium
By storing the neural network and adjusting the network parameters to achieve data storage, the problems of large storage space occupation and low reading efficiency in the existing technology are solved, and an efficient data storage method is provided.
Patent Information
- Application Number
- PCT/CN2025/082092
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-18
- Filing Date
- 2025-03-12
- Publication Date
- 2025-09-25
AI Technical Summary
In the prior art, data storage usually requires writing data directly into a storage medium, which takes up a large amount of storage space and has low efficiency when reading data.
A storage neural network is used to realize data storage by adjusting network parameters, converting the data storage process into a calculation process, and using storage tags to conveniently read data.
It reduces the storage space occupied, improves data reading efficiency, and realizes a new method of "computing instead of storage".
Smart Images

Figure CN2025082092_25092025_PF_FP_ABST
Abstract
Description
Data storage method, data reading method, device, system, equipment, medium Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a data storage method, a data reading method, a data storage device, a data reading device, a data storage system, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the related art, when data needs to be stored, the data to be stored is usually directly stored in a storage medium, and then the stored data is read out from the storage medium when needed. Summary of the Invention
[0003] The embodiments of the present disclosure provide a data storage method, a data reading method, a data storage device, a data reading device, a data storage system, an electronic device, a computer-readable storage medium, and a computer program product, which can implement data storage based on the method of "computation replacing storage".
[0004] In a first aspect, an embodiment of the present disclosure provides a data storage method, including: obtaining first data to be stored and a first storage tag corresponding to the first data; adjusting first network parameters of a storage neural network in a first state according to the first data and the first storage tag to obtain second network parameters of a storage neural network in a second state, wherein the second network parameters are used to store the first data.
[0005] In a second aspect, an embodiment of the present disclosure provides a data reading method, comprising: obtaining a second storage tag corresponding to second data to be read; inputting the second storage tag into a preset storage neural network to obtain target reading data corresponding to the second data.
[0006] In a third aspect, an embodiment of the present disclosure provides a data storage device, comprising: a first acquisition module, configured to acquire first data to be stored and a first storage label corresponding to the first data; a storage module, configured to adjust first network parameters of a storage neural network in a first state according to the first data and the first storage label, to obtain second network parameters of a storage neural network in a second state, wherein the second network parameters are used to store the first data.
[0007] In a fourth aspect, an embodiment of the present disclosure provides a data reading device, comprising: a second acquisition module, configured to acquire a second storage tag corresponding to second data to be read; and a reading module, configured to input the second storage tag into a preset storage neural network to obtain target reading data corresponding to the second data.
[0008] In a fifth aspect, an embodiment of the present disclosure provides a data storage system, comprising: an interface module and a storage processing module; the interface module is configured to obtain first data to be stored and a first storage tag corresponding to the first data, and input the first data and the first storage tag into the storage processing module; the storage processing module is configured to adjust the first network parameters of the storage neural network in the first state according to the first data and the first storage tag, obtain the second network parameters of the storage neural network in the second state, and store the second network parameters, wherein the second network parameters are used to store the first data.
[0009] In a sixth aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the computer program, any one of the data storage methods or data reading methods of the embodiments of the present disclosure is implemented.
[0010] In a seventh aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any one of the data storage methods or data reading methods of the embodiments of the present disclosure.
[0011] In an eighth aspect, the present application provides a computer program product, characterized in that it includes a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes any one of the data storage methods or data reading methods of the embodiments of the present disclosure.
[0012] In an embodiment of the present disclosure, the first data to be stored and the first storage tag corresponding to the first data are obtained; according to the first data and the first storage tag, the first network parameters of the storage neural network in the first state are adjusted to obtain the second network parameters of the storage neural network in the second state, and the second network parameters are used to store the first data. It can be seen from this that in the embodiment of the present disclosure, although the data to be stored is the first data, the first data is not actually stored in the storage medium. Instead, with the help of the storage neural network, the data storage process is converted into a data calculation process, and the first network parameters of the storage neural network in the first state are adjusted by the first data to obtain the second network parameters of the storage neural network in the second state, thereby achieving the storage of the first data through the adjustment of the network parameters of the storage neural network; and, when the stored data needs to be read later, the corresponding storage tag can be used, and the stored data can be read out more conveniently through the storage neural network. In summary, the embodiment of the present disclosure provides a new data storage method that uses "computation instead of storage".
[0013] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] FIG1 is a flow chart of a data storage method provided by an embodiment of the present disclosure.
[0015] FIG2 is a schematic diagram of a data storage method provided by an embodiment of the present disclosure.
[0016] FIG3 is a schematic diagram of a data storage method provided by an embodiment of the present disclosure.
[0017] FIG4 is a schematic diagram of a storage neural network provided in an embodiment of the present disclosure.
[0018] FIG5 is a flow chart of a data reading method provided by an embodiment of the present disclosure.
[0019] FIG6 is a block diagram of a data storage device provided by an embodiment of the present disclosure.
[0020] FIG7 is a block diagram of a data reading device provided by an embodiment of the present disclosure.
[0021] FIG8 is a block diagram of a data storage system provided by an embodiment of the present disclosure.
[0022] FIG9 is a block diagram of a data storage system provided by an embodiment of the present disclosure.
[0023] FIG10 is a block diagram of a data storage system provided by an embodiment of the present disclosure.
[0024] FIG11 is a block diagram of a data storage system provided by an embodiment of the present disclosure.
[0025] FIG12 is a block diagram of a data storage system provided by an embodiment of the present disclosure.
[0026] FIG13 is a block diagram of a data storage system provided by an embodiment of the present disclosure.
[0027] FIG14 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
[0028] FIG15 is a block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The present disclosure will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the present disclosure and are not intended to limit the present disclosure. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present disclosure, not all structures.
[0030] In related technologies, if a data storage system wants to store first data, it typically determines the storage space required to store the first data and writes the first data into the corresponding storage space, thereby completing the storage of the first data. When the first data is needed, it is read from the storage space. In this storage method, the data to be stored and the actual stored data are consistent, thus achieving data storage.
[0031] The embodiment of the present disclosure proposes a data storage method, which replaces storage with calculation, that is, uses a storage neural network to convert the data storage process into a calculation process, thereby realizing a new data storage method. In the embodiment of the present disclosure, although the data to be stored is the first data, the first data is not actually stored in the storage medium. Instead, the storage process of the data is converted into a data calculation process with the help of the storage neural network, and the first network parameters of the storage neural network in the first state are adjusted by the first data to obtain the second network parameters of the storage neural network in the second state, thereby realizing the storage of the first data by adjusting the network parameters of the storage neural network; and, when the stored data needs to be read subsequently, the corresponding storage tag can be used, and the stored data can be read out more conveniently through the storage neural network. In summary, the embodiment of the present disclosure provides a new data storage method that replaces storage with calculation.
[0032] The disclosed embodiments also provide a data storage system, comprising an interface module and a storage processing module. The interface module obtains first data to be stored and a first storage tag corresponding to the first data, and inputs the first data and the first storage tag into the storage processing module. The storage processing module is configured to adjust first network parameters of a storage neural network in a first state based on the first data and the first storage tag, obtain second network parameters of the storage neural network in a second state, and store the second network parameters, wherein the second network parameters are used to store the first data. Thus, in the disclosed embodiments, the data storage system utilizes the storage neural network to convert the data storage process into a process of adjusting the network parameters of the storage neural network, thereby implementing a new data storage method based on "computation replacing storage." In this storage system, although the data to be stored is the first data, the first data is not actually stored in the storage medium. Instead, the data storage process is converted into a data calculation process using the storage neural network. The network parameters of the storage neural network are adjusted based on the first data. This adjustment of the network parameters enables the storage of the first data, thereby reducing storage space usage. Furthermore, if the stored data needs to be read later, the read data can be output externally via the interface module.
[0033] A first aspect of an embodiment of the present disclosure provides a data storage method.
[0034] Figure 1 is a flow chart of a data storage method provided by an embodiment of the present disclosure. Referring to Figure 1 , the data storage method may include the following steps.
[0035] Step S11: Acquire first data to be stored and a first storage tag corresponding to the first data.
[0036] Step S12: adjusting the first network parameters of the storage neural network in the first state according to the first data and the first storage tag to obtain the second network parameters of the storage neural network in the second state, where the second network parameters are used to store the first data.
[0037] For example, the first data to be stored can be any one or more data types such as text data, image data, audio data, and video data, and the present disclosure embodiment does not limit this. In other words, the present disclosure embodiment supports storing first data of multiple data types.
[0038] For example, the first data to be stored may include at least one of the following: a table, text, numbers, voice, image, a voltage signal (such as an analog voltage signal, a digital voltage signal), and a power supply signal.
[0039] In some optional implementations, the first data corresponds to at least one storage tag, where the first storage tag is one of the storage tags corresponding to the first data. The storage tag can be considered as summary information, overview information, or feature information extracted from the first data, which can reflect the content of the first data to a certain extent.
[0040] In some optional implementations, the storage neural network is a neural network used to store data and has a data storage function. After determining the network structure of the storage neural network, initial network parameters can be assigned to it (for example, the initial network parameters can be determined by pre-training) to form a storage neural network in its initial state. Each time data is stored using the storage neural network, it can be regarded as a process of updating the network parameters of the storage neural network based on the data to be stored. Moreover, this update of the network parameters can be characterized by the state of the storage neural network. In other words, each time data is stored, the network parameters of the storage neural network are adjusted accordingly, and the state of the storage neural network is also updated accordingly.
[0041] In some optional implementations, based on the first data and the first storage label, the first network parameters of the storage neural network in the first state can be adjusted to obtain the second network parameters of the storage neural network in the second state, thereby realizing the storage of the first data through the second network parameters.
[0042] That is to say, before storing the first data, the storage neural network is in a first state, and its corresponding network parameters are first network parameters. After storing the first data using the storage neural network in the first state, the storage neural network is adjusted to a second state, and its network parameters are also adjusted from the first network parameters to the second network parameters. It is through this adjustment of network parameters that the storage of the first data is achieved.
[0043] It should be noted that the change in state does not affect the network structure of the stored neural network itself; it only represents the data storage process of the stored neural network. For example, if the stored neural network consists of a first convolutional layer, a second convolutional layer, a first connection layer, a first activation layer, and a second activation layer, then the change in state of the stored neural network caused by storing the first data does not affect the structure of the aforementioned network layers; it only changes the values of at least some of the network parameters (for example, changing the values of some or all weights; or, for example, changing the values of some weights and some bias parameters).
[0044] In some optional implementations, the first network parameter and the second network parameter include learnable parameters of the stored neural network, wherein the learnable parameters include parameters whose values can be adjusted in the stored neural network.
[0045] For example, the first network parameter and the second network parameter may include weights of a stored neural network.
[0046] For example, the first network parameter and the second network parameter may include weight and bias parameters of a stored neural network.
[0047] It should be noted that the above first network parameter and the second network parameter are merely examples, and the embodiments of the present disclosure do not limit this.
[0048] It should also be noted that the adjustment of network parameters is essentially achieved through data calculation. This means that the data storage process is converted into a data calculation process, and the storage of the first data is achieved by updating the network parameters of the stored neural network. In other words, the embodiments of the present disclosure implement a data storage method that "replaces storage with calculation."
[0049] In summary, in the embodiment of the present disclosure, although the data to be stored is the first data, the first data is not actually stored in the storage medium (i.e., the physical carrier for storing the data). Instead, with the help of the storage neural network, the data storage process is converted into a data calculation process, and the first network parameters of the storage neural network in the first state are adjusted by the first data to obtain the second network parameters of the storage neural network in the second state, thereby achieving the storage of the first data through the adjustment of the network parameters of the storage neural network; and, when the stored data needs to be read later, the corresponding storage tag can be used, and the stored data can be read out more conveniently through the storage neural network. In summary, the embodiment of the present disclosure provides a new data storage method that uses "computation instead of storage".
[0050] The data storage method according to the embodiment of the present disclosure is described below.
[0051] In some optional implementations, the first data is data to be stored, and the first data may correspond to multiple storage tags.
[0052] Exemplarily, the first data corresponds to multiple levels of storage tags, and as the level of the storage tag increases, the information representation capability of the storage tag also increases accordingly.
[0053] For example, if the first data is text data, it corresponds to three levels of storage tags, where the first level of storage tags is the text title (e.g., a number of words), the second level of storage tags is the text abstract (e.g., a sentence of text), and the third level of storage tags is the text theme (e.g., a paragraph of text). From the text title to the text abstract and then to the text theme, the information representation capability of the storage tags increases in sequence.
[0054] For example, if the first data is image data, it corresponds to three levels of storage tags: the first level of storage tags is the image title (e.g., a few words), the second level of storage tags is the image introduction (e.g., a sentence of text), and the third level of storage tags is the image description (e.g., a paragraph of text). From image title to image introduction to image description, the information representation capability of the storage tags increases in sequence.
[0055] It should be noted that the above storage tags and their levels are merely examples, and the embodiments of the present disclosure do not limit this.
[0056] In some optional implementations, in step S11, obtaining the first data to be stored and the first storage tag corresponding to the first data includes: receiving the first data to be stored and the first storage tag, wherein the first storage tag is selected from a plurality of levels of storage tags corresponding to the first data. In other words, when the first data has multiple storage tags, one of the tags may be selected as the first storage tag.
[0057] After obtaining the first data and the first storage tag, the first data can be stored using the storage neural network in step S12. The storage neural network has a certain network structure and is configured with corresponding network parameters to achieve data storage function.
[0058] In some optional implementations, the storage neural network is pre-trained and has data storage capabilities. Pre-training allows the storage neural network to acquire various background knowledge and hone its logical thinking skills, enabling it to store a variety of different types of data.
[0059] In some optional implementations, adjusting a first network parameter of a storage neural network in a first state based on first data and a first storage tag to obtain a second network parameter of a storage neural network in a second state includes: inputting the first data and the first storage tag into the storage neural network in the first state, performing data calculation using the storage neural network in the first state, adjusting the first network parameter, and obtaining the second network parameter; or inputting the first data and the first storage tag into the storage neural network in the first state, performing data calculation using the storage neural network in the first state, adjusting the first network parameter, and obtaining a changed parameter in the first network parameter; and determining the second network parameter based on the changed parameter. A changed parameter refers to a network parameter whose value changes. For example, for network parameter a1, whose value in the storage neural network in the first state is v1, if the value of a1 changes from v1 to v2 (v1≠v2) after storing the first data, then network parameter a1 can be determined to be a changed parameter.
[0060] Exemplarily, the first data x1 corresponds to the second network parameter W2 (that is, the second network parameter obtained by storing the first data x1 is W2), the first data x2 corresponds to the second network parameter W3, and the first data x3 corresponds to the second network parameter W4, wherein W2, W3 and W4 are all full parameters of the stored neural network.
[0061] Exemplarily, the first data x1 corresponds to the second network parameter W2, the first data x2 corresponds to the second network parameter W3', and the first data x3 corresponds to the second network parameter W4', wherein W2 is the full parameter of the stored neural network, and W3' and W4' are the network parameters that are different from W2 (that is, the network parameters that have changed compared to the corresponding values in W2, which are variable parameters).
[0062] Exemplarily, the initial network parameters of the stored neural network are W1 (i.e., the network parameters before any data is stored), the first data x1 corresponds to the second network parameter W2', the first data x2 corresponds to the second network parameter W3', and the first data x3 corresponds to the second network parameter W4', wherein W1 is the full parameter of the stored neural network, and W2', W3', and W4' are the different network parameters based on W1 (i.e., the changing parameters).
[0063] It can be seen from this that when determining the second network parameters, the full amount of network parameters of the stored neural network can be determined, or only the part of the network parameters that have changed (i.e., the changed parameters) can be determined. The embodiments of the present disclosure do not limit this.
[0064] In summary, the storage neural network learns some general logical processing capabilities and storage capabilities through pre-training, and obtains relatively accurate initial network parameters; when the storage neural network is used to store the first data, the network parameters of the storage neural network will be adjusted accordingly. This adjustment of the network parameters can be regarded as fine-tuning of the network parameters, and the storage of the first data can be achieved through this fine-tuning of the network parameters.
[0065] It should be noted that this method of storing data by fine-tuning the network parameters of the storage neural network is equivalent to storing the data in the network parameters of the storage neural network. As data is continuously stored, the network parameters of the storage neural network are constantly fine-tuned, which may cause the storage neural network to "forget" some general knowledge (for example, general knowledge learned during the pre-training phase). Moreover, when the network parameters of the storage neural network are large, using the storage neural network to store small amounts of data may result in problems such as inability to converge quickly and difficulty in accurate storage.
[0066] Based on this, in some optional implementations, when adjusting the first network parameters to obtain the second network parameters, the following method can be used: for the storage neural network in the initial state, on the one hand, the original full network parameters are kept unchanged, and on the other hand, a part of the network parameters are selected from the full network parameters. Each time data is stored, only the selected network parameters are adjusted, which is equivalent to only making additional fine-tuning to the selected network parameters. Accordingly, when reading the stored data, the original full network parameters and the adjusted network parameters can be used to read the data together. Since the original full network parameters are retained, even if data is continuously stored, the storage neural network will not "forget" general knowledge. In addition, since only part of the network parameters are updated when storing data, when storing small amounts of data, the number of network parameters that need to be updated is small, which is conducive to rapid convergence and can effectively and accurately store small amounts of data.
[0067] Exemplarily, the original full network parameters of the storage neural network are W0 (W0 includes N network parameters), and n network parameters w00 are selected from them as the network parameters that need to be adjusted when storing the first data (i.e., w00∈W0), n and N are both integers greater than or equal to 1, and n<N. When the storage neural network is used to store the first data x1, the network parameter w00 is equivalent to the first network parameter of the storage neural network in the first state. Therefore, the first network parameter w00 is adjusted according to the first data x1 and its first storage label label1 to obtain the second network parameter w01. At this time, the network parameters of the storage neural network include W0 and w01. When the storage neural network is used to store the first data x2, the network parameter w01 is equivalent to the first network parameter of the storage neural network in the first state. Therefore, the first network parameter w01 is adjusted according to the first data x2 and its first storage label label2 to obtain the second network parameter w02. At this time, the network parameters of the storage neural network include W0 and w02. By analogy, the storage neural network can be used to realize multiple data storage.
[0068] Among them, the full network parameters and the adjusted network parameters can be characterized in a variety of ways, either independently or through related information such as the difference in their values, and the embodiments of the present disclosure are not limited to this. For example, the full network parameter W0 is {1, 1, 2, 4, 3}, and the network parameter w00 to be adjusted is {1, 1, 2} (that is, w00 corresponds to the first 3 network parameters of W0). Then, after storing the first data x1, W0 and w01 can be characterized as: W0 = {1, 1, 2, 4, 3}, w01 = {2, 5, 1}. In addition, W0 and w01 can also be characterized as: {1+1, 1+4, 2-1, 4, 3}.
[0069] Generally, a neural network contains many dense network layers that can perform data processing such as matrix multiplication, and the weight matrices in these network layers usually have the full-rank property. Further, considering that a pre-trained model may exhibit a special property when facing some tasks: low "intrinsic dimension", therefore, parameter fine-tuning of the pre-trained model can be achieved through low-rank decomposition. In other words, although these models may contain millions to billions of parameters and have an extremely high-dimensional parameter space, when adapting to a new specific task, only a relatively small subset of parameters is required.
[0070] Returning to the embodiments of the present disclosure, for a storage neural network, which includes multiple full-rank network layers, the full initial network parameters of the storage neural network can be obtained through pre-training. For the first stored data, the full initial network parameters are equivalent to the first network parameters of the storage neural network. Each time the storage neural network performs a data storage process, it is equivalent to performing a specific task. Considering that the storage neural network has the property of low "intrinsic dimension", therefore, when storing data based on the storage neural network, only a relatively small subset of parameters is required, and this subset of parameters can be used to achieve data storage.
[0071] In some optional implementation manners, the network parameters of the storage neural network include a weight matrix. When storing data, the storage neural network can be made to perform the data storage task more effectively by adding a low-rank adaptation layer (for example, a low-rank matrix) to the weight matrix of the storage neural network. When storing the first data, only the low-rank adaptation layer needs to be updated, while keeping the original weights of the storage neural network unchanged, thereby avoiding the storage neural network forgetting the learned general knowledge. Moreover, this storage method focuses the parameter update process on the low-rank adaptation layer, reducing the amount of parameter adjustment. Therefore, the parameter adjustment efficiency can be improved, and the computational and memory overhead can also be reduced.
[0072] Exemplarily, the full initial network parameters of the storage neural network are W0, and W0 ∈ Rd×k, where d and k represent two dimensions of W0. Based on the low-rank decomposition method, it can be obtained that: W0 + ΔW = W0 + BA, where B and A can be regarded as two low-rank matrices, and B ∈ Rd×r, A ∈ Rr×k, and the rank r << min(d, k). Correspondingly, the process of storing the first data x and adjusting the corresponding network parameters can be characterized as: W0x + ΔWx = W0x + BAx. During the storage process, W0 is frozen and does not receive gradient updates, while A and B are adjustable network parameters and their values are adjusted to obtain the corresponding second network parameters.
[0073] It should be noted that the adjustable parameter amount of W0 is d×k. After low-rank decomposition, the actual parameter adjustment amount is d×r+r×k. Since r is much smaller than d and k, the amount of parameters required to adjust to store the first data is effectively reduced.
[0074] In some optional implementations, the process of storing the first data in the storage neural network is as follows: assuming that the first network parameter of the storage neural network in the first state is W1, the first data obtained is x1, and the first storage label corresponding to the first data x1 is label1, the first data x1 and the first storage label label1 are input into the storage neural network in the first state, and the storage neural network in the first state performs data calculation based on the first network parameter W1 and the first storage label label1, outputs the first predicted data x11', and calculates according to the first data x1 and the predicted data x11' through the preset storage evaluation function , obtain the first stored evaluation value ev11. If the stored evaluation value ev11 is greater than or equal to the preset stored evaluation threshold, the first network parameter W1 is adjusted according to the stored evaluation value ev11 to obtain W11', and W11' is used as the second network parameter to update the network parameter of the stored neural network from W1 to W11'. If the stored evaluation value ev11 is less than the preset stored evaluation threshold, the first network parameter W1 is adjusted according to the stored evaluation value ev11 to obtain W11', and then data calculation is performed based on W11' and the first stored label label1 to output the second predicted data x12'.
[0075] According to the first data x1 and the predicted data x12', the storage evaluation function is used for calculation to obtain the second stored evaluation value ev12. If the stored evaluation value ev12 is greater than or equal to the preset stored evaluation threshold, the first network parameter W11' is adjusted according to the stored evaluation value ev12 to obtain W12', and W12' is used as the second network parameter to update the network parameter of the stored neural network from W11' to W12'. If the stored evaluation value ev12 is less than the preset stored evaluation threshold, the first network parameter W11' is adjusted according to the stored evaluation value ev12 to obtain W12', and then data calculation is performed based on W12' and the first stored label label1, the third predicted data x13' is output, and the third stored evaluation value ev13 is calculated.
[0076] The above process is repeated until the storage evaluation value ev1i is greater than or equal to the preset storage evaluation threshold (i ≥ 1), the corresponding W1i' is determined as the second network parameter, and the network parameter of the storage neural network is updated to W1i'. The storage evaluation function is a function used to evaluate the storage effect (e.g., storage accuracy, completeness, etc.) of the storage neural network.
[0077] It should be noted that the above method for adjusting the network parameters of the storage neural network is only an example, and the embodiments of the present disclosure do not limit this.
[0078] It should be noted that when using the storage neural network to store the first data, in addition to storing the first data, the correspondence between the first data and the first storage label can also be stored. Based on this, when using the storage neural network to read data, if the second storage label corresponding to the data to be read is obtained, the accurate data can be read according to the second storage label and the corresponding correspondence.
[0079] In some optional implementations, after obtaining the second network parameters of the storage neural network in the second state, the method may further include: updating the first network parameters stored in the first storage space based on the second network parameters to store the first data and the storage neural network in the second state; wherein the storage neural network in the second state is used to store new data to be stored and / or read already stored data.
[0080] That is, the first network parameters of the storage neural network are pre-stored in the first storage space. After the first data is stored, the network parameters of the storage neural network are updated to the second network parameters. Based on this, the first network parameters in the first storage space can be updated to the second network parameters, which can not only store the first data but also store the storage neural network in the second state. The storage neural network in the second state can also store new data to be stored and / or read already stored data.
[0081] It should be noted that the first state and the second state are relative to the first data to be stored currently. For new data to be stored, the storage neural network in the second state obtained by storing the first data is equivalent to the storage neural network in the new first state, and the second network parameters obtained by storing the first data are equivalent to the new first network parameters.
[0082] Exemplarily, the first network parameter of the storage neural network in the first state can be represented as W1. After obtaining the first data x1 and the corresponding first storage label label1, the first network parameter W1 can be adjusted according to the first data x1 and the first storage label label1 to obtain the second network parameter W2 of the storage neural network in the second state. That is, after storing the first data x1, the current network parameter of the storage neural network is changed to W2.
[0083] Furthermore, if new first data x2 to be stored and the corresponding first storage label label2 are obtained, then for x2, the first network parameter of the storage neural network in the first state is W2. The first network parameter W2 can also be adjusted based on the data x2 to be stored and the first storage label label2, thereby obtaining the second network parameter W3 of the new storage neural network in the second state. At this point, the current network parameter of the storage neural network is changed to W3. Similarly, multiple data storage can be achieved through the storage neural network.
[0084] In some optional implementations, after obtaining the second network parameters of the storage neural network in the second state, the method may further include: storing the second network parameters in a second storage space to store the first data and the storage neural network in the second state. In other words, the second network parameters may be stored in the second storage space for future use (for example, when the corresponding second network parameters may be needed when reading the first data, the corresponding second network parameters may be read from the second storage space).
[0085] For example, if the first network parameter of the storage neural network in the first state is W1, the first data is x1, and the corresponding first storage label is label1, after using the storage neural network in the first state to store the first data x1, the second network parameter of the storage neural network in the second state is W2, and the second network parameter W2 can be stored in the second storage space.
[0086] Furthermore, when the new first data x2 to be stored and the corresponding first storage label label2 are obtained, the original second-state storage neural network is equivalent to the new first-state storage neural network (the corresponding network parameter is W2). After using the new, first-state storage neural network to store the first data x2, the second network parameter of the new, second-state storage neural network is W3, and the new second network parameter W3 can be stored in the second storage space.
[0087] Similarly, each time after the first data is stored, the corresponding second network parameters may be stored in the second storage space for standby use.
[0088] FIG2 is a schematic diagram of a data storage method provided by an embodiment of the present disclosure. Referring to FIG2 , before storing the first data x1, the network parameter of the storage neural network is W1, and W1 is stored in the first storage space. With respect to x1, the current storage neural network is equivalent to the storage neural network in the first state, where the first network parameter is W1.
[0089] After obtaining the first data x1 and the corresponding first storage label label1, x1 and label1 are input into the storage neural network in the first state (the first network parameter is W1). The storage neural network in the first state is used to perform data calculations, and the first network parameter W1 is adjusted to obtain the second network parameter W2 of the storage neural network in the second state. Furthermore, the first network parameter W1 stored in the first storage space can be updated to the second network parameter W2. In addition, W2 can also be stored in the second storage space.
[0090] It should be noted that through the above process, the storage neural network realizes the storage of x1, and its network parameters are updated from W1 to W2. For new data to be stored, the first network parameters of the storage neural network in the first state are updated to W2, and new data can be stored on this basis.
[0091] After obtaining the first data x2 and the corresponding first storage label label2, x2 and label2 are input into the storage neural network in the first state (the first network parameter in this case is W2). The storage neural network in the first state is used to perform data calculations, and the first network parameter W2 is adjusted to obtain the second network parameter W3 of the storage neural network in the second state. Furthermore, the first network parameter W2 stored in the first storage space can be updated to the second network parameter W3. In addition, W3 can also be stored in the second storage space. In this case, the second storage space stores W2 and W3.
[0092] It should be noted that through the above process, the storage neural network realizes the storage of x2, and its network parameters are updated from W2 to W3. For new data to be stored, the first network parameters of the storage neural network in the first state are updated to W3, and new data can be stored on this basis.
[0093] After obtaining the first data x3 and the corresponding first storage label label3, x3 and label3 are input into the storage neural network in the first state (the first network parameter in this case is W3). The storage neural network in the first state is used to perform data calculations, and the first network parameter W3 is adjusted to obtain the second network parameter W4 of the storage neural network in the second state. Furthermore, the first network parameter W3 stored in the first storage space can be updated to the second network parameter W4. In addition, W4 can also be stored in the second storage space. In this case, the second storage space stores W2, W3, and W4.
[0094] It should be noted that through the above process, the storage neural network realizes the storage of x3, and its network parameters are updated from W3 to W4. For new data to be stored, the first network parameters of the storage neural network in the first state are updated to W4, and new data can be stored on this basis.
[0095] By analogy, the storage of each first data to be stored can be achieved.
[0096] In some optional implementations, the first data may correspond to multiple data types. Accordingly, the storage neural network may have multiple storage paths, each storage path being used to store data of a different data type. The data types include at least one of the following: text data, image data, audio data, and video data.
[0097] It should be noted that the above data types are merely examples and are not limited in the embodiments of the present disclosure.
[0098] Exemplarily, the first data includes N data types, N≥1 and N is an integer, the storage neural network has a storage path matching each data type, and each storage path includes at least one storage neural network in a first state; accordingly, before adjusting the first network parameters of the storage neural network in the first state according to the first data and the first storage label to obtain the second network parameters of the storage neural network in the second state, the method may also include: determining the first data type of the first data; obtaining the storage neural network in the first state under the storage path matching the first data type.
[0099] From this, it can be seen that for the first data to be stored, before storage, it is necessary to first determine the storage path that matches the first data type based on the first data type, and then obtain the storage neural network of the first state under the storage path, so as to store the first data of the first data type in the correct storage path.
[0100] It should be noted that if a certain first data to be stored itself includes two or more data types (for example, the first data is an article, which includes both text data and image data), then the data corresponding to each data type in the first data can be determined separately by their respective storage paths and stored separately, or the storage path of the data type corresponding to the data with the largest content ratio can be selected, and all the first data can be stored under this storage path (for example, if the text data of the first data accounts for a large proportion, all the first data will be stored under the storage path corresponding to the text data). Among them, when storing separately, it is necessary to establish an association relationship between the various parts of the first data stored under different paths, so that the accurate and complete first data can be read out later.
[0101] In some optional implementations, obtaining a stored neural network in a first state at a storage path that matches a first data type includes: if the storage path of the read stored neural network does not match the first data type, obtaining second network parameters that match the first data type from a second storage space, and obtaining a matching stored neural network in the first state based on the matched second network parameters, the second storage space being used to store the second network parameters. The read stored neural network can be understood as a stored neural network that has been loaded into a corresponding processing device.
[0102] For example, if the first data stored for the i-th time is of text type, the storage neural network obtained after storing the text data is the storage path of the text data, which is equivalent to the storage path of the read storage neural network being the storage path of the text data. If the first data stored for the i+1-th time is of image type, then it is clear that the current, read storage path of the storage neural network does not match the image type. Therefore, the second network parameters obtained when the image type data was last stored can be obtained from the second storage space, and the second network parameters can be used to obtain the first-state storage neural network that matches the i+1-th first data.
[0103] FIG3 is a schematic diagram of a data storage method provided by an embodiment of the present disclosure. Referring to FIG3 , the first data may include N data types, namely, text data, image data, ..., and audio data; accordingly, the network parameter of the initial storage neural network is W1, and the storage neural network corresponds to N storage paths, namely, a storage path for text data, a storage path for image data, ..., and a storage path for audio data.
[0104] As shown in Figure 3, when the first data is text data (for example, first data t1, first data t2, first data t3, etc.), this part of the first data is stored through the storage path corresponding to the text data, and the first network parameters of the storage neural network in the first state under the storage path are adjusted (for example, W1 is adjusted to W12, and W12 is adjusted to W13); when the first data is image data (for example, first data p1, first data p2, first data p3, etc.), this part of the first data is stored through the storage path corresponding to the image data, and the first network parameters of the storage neural network in the first state under the storage path are adjusted (for example, W1 is adjusted to W22, and W22 is adjusted to W23); ...; when the first data is audio data (for example, first data a1, first data a2, first data a3, etc.), this part of the first data is stored through the storage path corresponding to the audio data, and the first network parameters of the storage neural network in the first state under the storage path are adjusted (for example, W1 is adjusted to WN2, and WN2 is adjusted to WN3). Wherein, N is the serial number identifier of the storage path, N≥1 and N is an integer.
[0105] Exemplarily, in the initial case, the storage neural network that has been read is the initial storage neural network, and its network parameter is W1. After obtaining the first data t1 to be stored and the first storage label labelt1, since the initial storage neural network has not yet stored data, the storage paths corresponding to different data types have not yet been split out. Therefore, there is no need to obtain the storage neural network of the first state under the corresponding storage path, but the initial storage neural network is regarded as the storage neural network of the first state under each storage path. Based on this, t1 and labelt1 are input into the initial storage neural network, and the initial storage neural network is used to perform data calculations, and the initial network parameter W1 is adjusted (the initial network parameter W1 is equivalent to the first network parameter relative to t1), and the second network parameter W12 is obtained, and the storage path for text data is split out. If text data needs to be stored subsequently, it can be processed based on the second network parameter W12.
[0106] Furthermore, if, after storing the first data t1, the first data to be stored is image data p1, the processing method is similar to that of the first data t1, and the storage path of the image data can be split. Similarly, if the first data to be stored is audio data a1, the processing method is similar to that of the first data t1 or p1, and the storage path of the audio data can be split.
[0107] After the storage neural network has stored at least the first data t1 (for example, the first data t1, the first data p1, and the first data a1), if the new first data to be stored is text data t2, the data type of the first data t2 must first be determined. After determining that t2 is text data, it can be determined that t2 should be stored in the storage path corresponding to text data. At this time, it is necessary to determine whether the storage path of the storage neural network that has been read is the storage path of text data.
[0108] If the first data stored last time is t1, then the storage path of the read storage neural network is determined to be the storage path of the text data. Therefore, the storage of t2 can be performed directly based on the read storage neural network. For example, the second network parameter obtained by storing t1 is W12. Therefore, W12 is used as the first network parameter for storing t2. t2 and its first storage label labelt2 are input into the storage neural network with network parameter W12. The storage neural network is used to perform data calculations, and the first network parameter W12 is adjusted to obtain the second network parameter W13, thereby achieving the storage of t2.
[0109] If the first data stored last time is non-text data (for example, the first data p1 or the first data a1, etc.), the storage path of the storage neural network that has been read should also be the storage path of non-text data. Therefore, the second network parameter that matches the data type of t2 can be obtained from the second storage space, and the matching storage neural network of the first state is obtained based on the obtained second network parameter. For example, it is determined that the first data stored last time is p1, the storage path of the storage neural network that has been read is the storage path of the image data, and the text data stored most recently is determined to be t1 through the second storage space, and the corresponding second network parameter is W12. Based on this, W12 is used as the first network parameter for storing t2, W12 is read, and the storage neural network of the first state under the storage path that matches the data type of t2 is obtained. T2 and its first storage label labelt2 are input into the storage neural network with the network parameter W12. The storage neural network is used to perform data calculations, and the first network parameter W12 is adjusted to obtain the second network parameter W13, thereby realizing the storage of t2.
[0110] Similarly, if the first data t3 of the text data to be stored is received, it is determined that it needs to be stored in the storage path of the text data. If the storage path of the currently read storage neural network corresponds to the text data, t3 can be directly stored on the basis of the read storage neural network. If the storage path of the currently read storage neural network does not correspond to the text data, it is determined that the last text data stored by the storage neural network is t2, and the second network parameter obtained by storing t2 is W12. Therefore, W12 is obtained from the second storage space, and W12 is used as the first network parameter for storing t3. T3 and its first storage label labelt3 are input into the storage neural network with the network parameter W12. The storage neural network is used to perform data calculation, and the first network parameter W12 is adjusted to obtain the second network parameter W13, thereby realizing the storage of t2. For new text data to be stored, storage can be performed in a similar manner.
[0111] As for the first data of picture type and audio type, their storage process is similar to that of the first data of text type, and will not be described in detail here.
[0112] In some optional implementations, the storage neural network may include multiple storage sub-networks, each storage sub-network has a specific network structure and is suitable for storing first data of certain specific task types.
[0113] Exemplarily, the first data includes M task types, M≥1 and M is an integer, the storage neural network includes M storage sub-networks corresponding one-to-one to the M task types, and the storage sub-network is used to perform storage of the first data of the corresponding task type.
[0114] For example, the storage neural network includes a convolutional subnetwork, a recurrent subnetwork, a pulse subnetwork, and a graph neural subnetwork. Among them, the convolutional subnetwork includes at least one convolutional layer and is suitable for storing the first data of computer vision tasks (for example, image data in computer vision tasks); the recurrent subnetwork is built based on the recurrent neural network (RNN) and is suitable for storing the first data in tasks such as natural language processing and speech recognition; the pulse subnetwork is built based on the spiking neural network (SNN) and is suitable for storing the first data of time series tasks; the graph neural subnetwork is built based on the graph neural network and is suitable for storing the first data of relational tasks (for example, knowledge graphs).
[0115] In some optional implementations, the task type or task type identifier of the first data can be input into the storage neural network, so that the first data can be stored through the corresponding storage sub-network. The task type can also be used as part of the first storage label, and the storage neural network determines the task type of the first data through the first storage label, and then stores the first data through the corresponding storage sub-network. The embodiments of the present disclosure are not limited to this.
[0116] FIG4 is a schematic diagram of a storage neural network provided by an embodiment of the present disclosure. Referring to FIG4 , the storage neural network is provided with multiple storage subnetworks, including a convolutional subnetwork, a recurrent subnetwork, a pulse subnetwork, and a graph neural subnetwork. Each storage subnetwork is used to store first data of a corresponding task type, thereby utilizing the characteristics of the storage subnetwork to preserve the content of the first data as much as possible.
[0117] It should be noted that the above description of the storage sub-network is merely an example, and the embodiments of the present disclosure do not limit this.
[0118] In some optional implementations, in addition to storing the first data in the storage neural network, the first data already stored in the storage neural network may also be updated.
[0119] In some optional implementations, the storage neural network in the first state has stored third data, and the third data includes multiple data segments, and the first data is data after updating part of the third data; accordingly, according to the first data and the first storage label, the first network parameters of the storage neural network in the first state are adjusted to obtain the second network parameters of the storage neural network in the second state, including: comparing the first data and the third data, determining the first data segment in the first data and the second data segment in the third data, the first data segment and the second data segment have corresponding positions and different data; inputting the first data segment and the first storage label into the storage neural network in the first state, adjusting the first network parameters corresponding to the second data segment in the storage neural network in the first state, and obtaining the second network parameters corresponding to the first data segment, and the second network parameters corresponding to the first data segment are used to update the stored third data to the first data.
[0120] It can be seen from this that when updating data, the corresponding second network parameters can be adjusted only based on the updated data fragment. Compared with updating the full amount of network parameters, the data processing volume is relatively small, which can alleviate data processing pressure.
[0121] For example, the first data includes data segments s11, s12, s13, and s14, and the third data includes data segments s21, s22, s23, and s24. By comparing the first and third data, it can be seen that the content of s11 and s21 is the same, the content of s12 and s22 is the same, the content of s13 and s23 is different, and the content of s14 and s24 is the same. Therefore, it can be seen that the first data segment is s13 and the second data segment is s23. Based on this, s13 and the first storage label are input into the storage neural network in the first state. The storage neural network in the first state is used to perform data calculation, and the first network parameters corresponding to s23 are adjusted to obtain the second network parameters corresponding to s13, thereby updating the third data.
[0122] It should be noted that, whether storing the first data for the first time or updating the already stored first data, the adjustment of the network parameters involved may fall into two situations: in the first situation, the first network parameters are directly adjusted or updated; in the second situation, the first low-rank decomposition matrix corresponding to the first network parameters is adjusted or updated. In either case, the first network parameters can be adjusted to obtain second network parameters corresponding to the first data and used to store the first data.
[0123] In some optional implementations, the first network parameters correspond to multiple first low-rank decomposition matrices, and the second network parameters correspond to multiple second low-rank decomposition matrices; accordingly, according to the first data and the first storage label, the first network parameters of the storage neural network in the first state are adjusted to obtain the second network parameters of the storage neural network in the second state, including: inputting the first data and the first storage label into the storage neural network in the first state, using the storage neural network in the first state to perform data calculation, adjusting the matrix elements of the multiple first low-rank decomposition matrices, and obtaining multiple second low-rank decomposition matrices.
[0124] It should be noted that the reason why the network parameters are updated by adjusting the low-rank decomposition matrix is mainly due to the fact that in some implementations, if the network parameter matrix (for example, the weight matrix) storing the neural network is relatively large, and the amount of data to be stored at a single time for the first data is relatively small, using a small amount of data to adjust the larger network parameter matrix can easily lead to problems such as matrix overfitting and severe forgetting. Since the low-rank decomposition matrix is smaller in scale than the matrix before decomposition, for the above situation, the first network parameter matrix corresponding to the first network parameter can be decomposed into multiple first low-rank decomposition matrices, and by adjusting the matrix elements of the first low-rank decomposition matrix, multiple second low-rank decomposition matrices corresponding to the second network parameters are obtained, thereby effectively alleviating problems such as matrix overfitting and severe forgetting.
[0125] In some optional implementations, the storage neural network can also support different storage modes to achieve different storage accuracies, thereby meeting diverse storage needs.
[0126] In some optional implementations, the storage neural network may further support N storage modes, each corresponding to N storage precisions. For example, the storage neural network supports three storage modes, corresponding to storage precisions of: 32-bit floating point numbers (float32), 16-bit floating point numbers (float16), and 8-bit integers (int8). That is, for the first data to be stored, a storage mode may be selected and stored based on the storage precision corresponding to the storage mode. In addition, the first data may be divided into multiple sub-data, and different storage modes may be used for different sub-data, and each sub-data may be stored separately based on the corresponding storage precision.
[0127] In some optional implementations, the first data includes at least one first sub-data corresponding to the first storage mode and at least one second sub-data corresponding to the second storage mode, and the storage accuracy of the first storage mode is different from the storage accuracy of the second storage mode; the storage neural network in the first state is used to adjust the first sub-network parameters corresponding to the first sub-data based on the first storage mode according to the first sub-data and the first storage label, so as to obtain the second sub-network parameters corresponding to the first sub-data; and the storage neural network in the first state is also used to adjust the third sub-network parameters corresponding to the second sub-data based on the second storage mode according to the second sub-data and the first storage label, so as to obtain the fourth sub-network parameters corresponding to the second sub-data; wherein the first sub-network parameters and the third sub-network parameters constitute the first network parameters, and the second sub-network parameters and the fourth sub-network parameters constitute the second network parameters.
[0128] Exemplarily, the first storage mode is the precise storage mode, and the second storage mode is the approximate storage mode. After obtaining the first data, the first sub-data in the first data using the precise storage mode and the second sub-data in the first data using the approximate storage mode can be determined, and the storage neural network in the first state is used to adjust the first sub-network parameters corresponding to the first sub-data using the precise storage mode according to the first sub-data and the first storage label to obtain the second sub-network parameters corresponding to the first sub-data. At the same time, the storage neural network in the first state is used to adjust the third sub-network parameters corresponding to the second sub-data using the approximate storage mode according to the second sub-data and the first storage label to obtain the fourth sub-network parameters corresponding to the second sub-data.
[0129] It should be noted that there is a certain positive correlation between the storage accuracy corresponding to the storage mode and the amount of computation required for storage. That is, for the same first data, the higher the storage accuracy of the storage mode used, the greater the amount of computation required to store the first data. Conversely, the lower the storage accuracy of the storage mode used, the smaller the amount of computation required to store the first data. The amount of computation required to store the first data primarily includes the amount of computation generated by the neural network adjusting network parameters to store the first data.
[0130] In some optional implementations, for the portion of the first data with lower fault tolerance, a precise storage mode can be used so that when this portion of data is subsequently read, the reading result is more accurate and does not affect further data processing; for the portion of the first data with higher fault tolerance, an approximate storage mode can be used to reduce the amount of calculation generated by storing this portion of data, and when this portion of data is subsequently read, even if there is a certain error between the reading result and the original stored data, it will not affect further data processing.
[0131] For example, the first data to be stored is a company's promotional data (the promotional data can be in at least one of text, voice, and video formats), and the promotional data includes a company profile, company address, company phone number, company website, and company zip code. The company profile can be stored in approximate storage mode, while the company address, company phone number, company website, and company zip code can be stored in precise storage mode.
[0132] It should be noted that the above storage modes are merely examples, and the embodiments of the present disclosure do not limit them.
[0133] It should also be noted that, in the case where the first data volume is larger than the second data volume for storing the network parameters of the neural network, if the related technology is used to store the first data, the required storage space should be equal to or relatively close to the first data volume. However, in the embodiment of the present disclosure, since the storage process is replaced by the calculation process of storing the neural network, the required storage space should be equal to or relatively close to the second data volume. Furthermore, since the second data volume is smaller than the first data volume, the storage space occupied can be reduced.
[0134] In addition, since the storage neural network can store data multiple times, and each data storage can be achieved only by adjusting or updating the network parameters of the storage neural network, in some optional implementations, the storage space required for multiple data storage is always the storage space occupied by the network parameters of the storage neural network. When the amount of data stored multiple times is large, the storage space occupied can be effectively reduced. For example, the storage neural network is used to store data 10 times, and the sum of the first data amount of the above data is 100G (Gigabyte), and the second data amount of the network parameters of the storage neural network is 1G. Therefore, the storage effect of storing 100G data in 1G storage space can be achieved. It can be seen that the data storage method of the embodiment of the present disclosure effectively reduces the amount of storage space occupied.
[0135] A second aspect of the embodiments of the present disclosure provides a data reading method.
[0136] FIG5 is a flow chart of a data reading method provided by an embodiment of the present disclosure. Referring to FIG5 , the data reading method may include the following steps.
[0137] Step S51: Acquire a second storage tag corresponding to the second data to be read.
[0138] Step S52: input the second storage tag into a preset storage neural network to obtain target read data corresponding to the second data.
[0139] In some optional implementations, the storage neural network can be used to store data, and when the stored data needs to be read, the corresponding data can be read from the storage neural network.
[0140] In some optional implementations, considering that the storage neural network can adopt different storage modes when storing data, corresponding to different storage accuracies, the second data may or may not be exactly the same as the corresponding target read data, but there should be a high degree of similarity between the two, which will not affect subsequent data processing or will have little impact on subsequent data processing.
[0141] In some optional implementations, the target read data is identical to the second data, or the similarity between the target read data and the second data is greater than a preset similarity threshold. The preset similarity threshold can be set based on experience, statistical data, and processing requirements, and is not limited in the present embodiment.
[0142] The data reading method of the embodiment of the present disclosure is described below.
[0143] In some optional implementations, in step S51, obtaining the second storage tag corresponding to the second data to be read includes: receiving the second storage tag input by a user, or receiving the second storage tag sent by a preset terminal.
[0144] In some optional implementations, in step S52, the second storage tag is input into a preset storage neural network to obtain target reading data corresponding to the second data, including: inputting the second storage tag into the storage neural network so that the storage neural network performs data calculation based on the first target network parameters and the second storage tag to obtain the target reading data; or, inputting the second storage tag into the storage neural network so that the storage neural network obtains the second target network parameters corresponding to the second data based on the second storage tag, and performs data calculation based on the second target network parameters and the second storage tag to obtain the target reading data; wherein the first target network parameters are the current network parameters of the storage neural network, and the second target network parameters are the network parameters obtained by the storage neural network storing the second data.
[0145] Therefore, it can be seen that when reading the second data based on the second storage tag and the storage neural network, at least two implementation methods can be adopted. In the first implementation method, the second storage tag is input into the storage neural network, and the storage neural network directly uses its current network parameters (i.e., the first target network parameters) and the second storage tag to perform data calculations and output the target read data. In the second implementation method, after the second storage tag is input into the storage neural network, the storage neural network does not directly perform data calculations based on its current network parameters and the second storage tag, but first obtains the network parameters obtained when storing the second data (i.e., the second target network parameters), and uses the second target network parameters and the second storage tag to perform data calculations, and then outputs the target read data.
[0146] Exemplarily, the first target network parameter of the preset storage neural network is W1, and the second storage label corresponding to the second data x1 to be read is label1. When using the storage neural network to read the second data, label1 can be directly input into the storage neural network, and the storage neural network performs data calculation based on the first target network parameter W1 and label1 to obtain the target read data x1'; in addition, label1 can also be input into the storage neural network, and the storage neural network searches the second network parameter W1' generated when x1 was originally stored in the second storage space according to label1 to obtain the second target network parameter W1', and then performs data calculation based on the second target network parameter W1' and label1 to obtain the target read data x1". Among them, the second storage space is used to store the second network parameter.
[0147] It should be noted that if the first target network parameters are used to read data directly, there is no need to obtain the second target network parameters, and the reading speed is faster. If the second target network parameters are used to read data, it may take some time to obtain the second target network parameters, but the accuracy of the target data read may be relatively high. When reading data, any data reading method can be selected according to needs, and the embodiments of the present disclosure are not limited to this.
[0148] In some optional implementations, the second data corresponds to multiple levels of storage tags, and as the level of the storage tag increases, the information representation capability of the storage tag also increases accordingly, and the multi-level storage tags are stored in a third storage space; when the level of the second storage tag is not the highest level, the storage neural network is also used to obtain a new second storage tag from the third storage space according to the second storage tag, and obtain the target reading data according to the new second storage tag; wherein the new second storage tag is a storage tag corresponding to the second data and has a higher level than the second storage tag.
[0149] That is to say, if the second storage label input to the storage neural network is not the highest-level storage label of the second data, a new second storage label with a higher level than the second storage label can be obtained from the third storage space, and the target read data can be obtained using the new second storage label.
[0150] Exemplarily, the second storage tag is input into a preset storage neural network to obtain target reading data corresponding to the second data, including: inputting the second storage tag into the storage neural network, and when the storage neural network recognizes that the level of the second storage tag is not the highest level, reading a new second storage tag with a higher level from the third storage space according to the second storage tag, and performing data calculation based on the first target network parameters and the new second storage tag to obtain the target reading data, wherein the first target network parameters are the current network parameters of the storage neural network.
[0151] For example, the first target network parameter of the preset storage neural network is W1, and the second storage label corresponding to the second data x1 to be read is label11, and the level of label11 is not the highest level. When using the storage neural network to read the second data, label11 can be input into the storage neural network. The storage neural network first identifies whether the level of label11 is the highest level. If it is identified that the level of label11 is not the highest level, it reads the second storage label label12 of a higher level corresponding to the second data x1 from the third storage space, and then performs data calculation based on the first target network parameter W1 and label12 to obtain the target read data x1'.
[0152] Exemplarily, the second storage tag is input into a preset storage neural network to obtain target reading data corresponding to the second data, including: inputting the second storage tag into the storage neural network, and when the storage neural network recognizes that the level of the second storage tag is not the highest level, reading a new second storage tag of a higher level from the third storage space according to the second storage tag, and obtaining a second target network parameter corresponding to the second data according to the second storage tag, performing data calculation according to the second target network parameter and the new second storage tag to obtain the target reading data; wherein, the second target network parameter is the network parameter obtained by storing the second data in the storage neural network.
[0153] For example, the first target network parameter of the preset storage neural network is W1, and the second storage label corresponding to the second data x1 to be read is label11, and the level of label11 is not the highest level. When using the storage neural network to read the second data, label11 can be input into the storage neural network. The storage neural network first identifies whether the level of label11 is the highest level, and when it identifies that the level of label11 is not the highest level, it reads the second storage label label12 of a higher level corresponding to the second data x1 from the third storage space, and searches the second storage space for the second network parameter W1' generated when x1 was originally stored according to label11 to obtain the second target network parameter W1', and then performs data calculation based on the second target network parameter W1' and label12 to obtain the target read data x1".
[0154] It should be noted that the process of reading data using the storage neural network can be understood as the inference process (or prediction process) of the storage neural network. That is, after inputting the second storage tag, the storage neural network performs inference calculations based on the first target network parameters or the second target network parameters and the second storage tag, and the output result is the target read data corresponding to the second data. In other words, the network parameters of the storage neural network are usually not changed during the data reading process, but its network parameters (the first target network parameters or the second target network parameters) are used to perform data calculations.
[0155] In some optional implementations, after the target read data is read out, the target read data may be verified to determine whether complete and accurate data is read out from the storage neural network.
[0156] For example, for the second data stored in the precise storage mode, the target read data corresponding to the second data can be verified using a hard check method; for the second data stored in the approximate storage mode, the target read data corresponding to the second data can be verified using a soft check method. The hard check method includes a check method based on check information such as a check code, and the soft check method includes a check method based on check information such as similarity and spatial distance.
[0157] In some optional implementations, the second data corresponds to the first verification information; accordingly, after the second storage tag is input into a preset storage neural network to obtain the target read data corresponding to the second data, the method may further include: determining the second verification information corresponding to the target read data; and determining a first verification result of the target read data based on the first verification information and the second verification information. The first verification information and the second verification information may be verification codes obtained by processing the second data and the target read data, respectively, based on a preset verification algorithm. The verification algorithm may include parity check, XOR check, cyclic redundancy check, MD5 (message-digest algorithm 5, MD5 information digest algorithm) check, digital signature, Hamming code check, etc., which are not limited in the embodiments of the present disclosure.
[0158] Exemplarily, a first verification code Code1 of the second data is pre-calculated according to a verification algorithm and stored in a preset space for future use. After obtaining target read data corresponding to the second data, a second verification code Code2 of the target read data is calculated according to the verification algorithm, and the first verification code Code1 of the second data is read from the preset space. The first verification code Code1 and the second verification code Code2 are then compared. If the two are consistent, it indicates that the target read data and the second data are exactly the same or relatively similar, and the target read data has passed data verification. Conversely, if the two are inconsistent, it indicates that the target read data and the second data are different and the difference is significant, and the target read data has failed data verification.
[0159] In some optional implementations, after inputting the second storage tag into a preset storage neural network to obtain target read data corresponding to the second data, the method may also include: determining the overall similarity between the second data and the target read data; and determining a second verification result of the target read data based on the overall similarity.
[0160] For example, after obtaining the target read data corresponding to the second data, the overall similarity between the second data and the target read data is calculated according to a similarity algorithm. If the overall similarity is greater than or equal to a preset similarity threshold, it indicates that the target read data and the second data are completely identical or relatively similar, and the target read data has passed data verification. Conversely, if the overall similarity is less than the preset similarity threshold, it indicates that the target read data and the second data are different, and the difference is significant, and the target read data has failed data verification. Similarity algorithms include cosine similarity algorithms, Jaccard similarity coefficient algorithms, Pearson correlation coefficient algorithms, etc., and the embodiments of the present disclosure are not limited thereto.
[0161] For example, after obtaining target read data corresponding to the second data, the spatial distance between the second data and the target read data is calculated according to a distance algorithm. If the spatial distance is less than or equal to a preset distance threshold, it indicates that the target read data is completely identical or relatively similar to the second data, and the target read data has passed data verification. Conversely, if the spatial distance is greater than the preset distance threshold, it indicates that the target read data is different from the second data, and the difference is significant, and the target read data has failed data verification. Distance algorithms include Euclidean distance algorithms, Manhattan distance algorithms, Chebyshev distance algorithms, etc., and the present embodiment is not limited thereto.
[0162] In some optional implementations, the target read data may be verified by using a segmented verification method.
[0163] In some optional implementations, the second data includes at least one third data segment corresponding to the first storage mode and at least one fourth data segment corresponding to the second storage mode, the third data segment corresponds to first data segment check information, the third check result of the target read data includes a first syndrome result corresponding to the first storage mode and a second syndrome result corresponding to the second storage mode, and the storage precision of the first storage mode is different from the storage precision of the second storage mode. Accordingly, after inputting the second storage label into a preset storage neural network to obtain the target read data corresponding to the second data, the method may further include: dividing the target read data into at least one fifth data segment corresponding to the first storage mode and at least one sixth data segment corresponding to the second storage mode; determining second data segment check information corresponding to each fifth data segment; obtaining a first syndrome result for the fifth data segment based on the corresponding first data segment check information and second data segment check information; determining a segment similarity between the corresponding fourth data segment and the sixth data segment; and obtaining a second syndrome result for the sixth data segment based on the segment similarity. The first syndrome result indicates whether the fifth data segment passes data check, and the second syndrome result indicates whether the sixth data segment passes data check.
[0164] Exemplarily, the first storage mode is the precise storage mode, the second storage mode is the approximate storage mode, the second data includes a third data fragment s1 corresponding to the precise storage mode, and two fourth data fragments s2 and s3 corresponding to the approximate storage mode, the third data fragment s1 corresponds to the first data segment check code scode1, and the first data segment check code scode1 is obtained based on a preset check algorithm; the target read data includes a fifth data fragment s4 corresponding to the precise storage mode, and two sixth data fragments s5 and s6 corresponding to the approximate storage mode, wherein s1 has a corresponding relationship with s4, s2 has a corresponding relationship with s5, and s3 has a corresponding relationship with s6.
[0165] Furthermore, the second data segment check code scode2 of the fifth data fragment s4 is calculated according to the preset check algorithm, and the first data segment check code scode1 and the second data segment check code scode2 are compared. If the two are consistent, it means that the fifth data fragment s4 is completely identical or relatively similar to the third data fragment s1, and the fifth data fragment s4 has passed the data check. Otherwise, if the two are inconsistent, it means that the fifth data fragment s4 is different from the third data fragment s1, and the difference is large, and the fifth data fragment s4 has failed the data check.
[0166] The segment similarity between the fourth data segment s2 and the sixth data segment s5, and the segment similarity between the fourth data segment s3 and the sixth data segment s6 are calculated according to a preset similarity algorithm. If both of the segment similarities are greater than or equal to a preset segment similarity threshold, it means that the fourth data segment s2 and the sixth data segment s5 are completely identical or relatively similar, and the fourth data segment s3 and the sixth data segment s6 are completely identical or relatively similar, and both the sixth data segments s5 and s6 have passed data verification. If both of the segment similarities are less than the preset segment similarity threshold, it means that the fourth data segment s2 and the sixth data segment s5 are different and the difference is large, and the fourth data segment s3 and the sixth data segment s6 are different and the difference is large. Therefore, both the sixth data segments s5 and s6 have failed data verification. In addition, if only one of the two segment similarities is less than the preset segment similarity threshold, the sixth data segment that is less than the preset segment similarity threshold has failed data verification, and only the other has passed data verification.
[0167] In some optional implementations, several data can be selected from the second data as the first reference feature points. After obtaining the target read data corresponding to the second data, the data at the corresponding position is selected from the target read data to obtain the second reference feature points. By comparing the first reference feature points with the second reference feature points, the similarity between the second data and the target read data is determined, thereby judging whether the target read data passes the data verification.
[0168] For example, the second data is a piece of binary data 1100001011001011, from which the 3rd to 5th bits 000 are selected as the first first reference feature point, and the 10th to 12th bits 100 are selected as the second first reference feature point. After reading the corresponding target read data, the 3rd to 5th bits are intercepted from the target read data to obtain the first second reference feature point, with a value of 000, and the 10th to 12th bits are intercepted from the target read data to obtain the second second reference feature point, with a value of 101. Since the reference feature points correspond to a total of 6 bits, of which only the corresponding value of the 12th bit is different, it can be approximately obtained that the similarity between the second data and the target read data is (5÷6)×100%=83%. If the preset similarity threshold is 80%, then since the similarity is greater than the similarity threshold, it can be determined that the target read data has passed the data verification.
[0169] It should be noted that the above calculation of reference feature points and their similarities is merely an example, and the embodiments of the present disclosure do not limit this.
[0170] It should also be noted that if the target read data is completely identical to the corresponding second data or has a high degree of similarity, then performing corresponding data processing based on the target read data instead of the second data will have no effect or a small effect on the processing result, so a verification result that passes the verification can be obtained; if the target read data and the corresponding second data have a high degree of difference or a low degree of similarity between the two, then performing corresponding data processing based on the target read data instead of the second data may have a large impact on the processing result, so a verification result that fails the verification can be obtained. After obtaining the verification result, the verification result can be sent to an external device or provided to a corresponding user. For the external device or user, it can refer to the accuracy requirements for data processing, etc., and determine whether to use the target read data to perform corresponding data processing based on the verification result.
[0171] For example, if the target read data is exactly the same as the corresponding second data or has a high similarity, data processing with higher accuracy requirements can be performed based on the target read data. If the target read data has a low similarity with the corresponding second data, data processing with lower accuracy requirements can be performed based on the target read data, or the target read data may not be used for subsequent data processing. The embodiments of the present disclosure do not limit this.
[0172] A third aspect of the embodiments of the present disclosure provides a data storage device.
[0173] Figure 6 is a block diagram of a data storage device provided by an embodiment of the present disclosure. Referring to Figure 6 , the data storage device 600 may include the following modules.
[0174] The first acquisition module 601 is configured to acquire first data to be stored and a first storage tag corresponding to the first data.
[0175] The storage module 602 is used to adjust the first network parameters of the storage neural network in the first state according to the first data and the first storage label to obtain the second network parameters of the storage neural network in the second state, and the second network parameters are used to store the first data.
[0176] In the embodiment provided by the present disclosure, the first data to be stored and the first storage tag corresponding to the first data are obtained through a first acquisition module; the first network parameters of the storage neural network in the first state are adjusted according to the first data and the first storage tag through the storage module to obtain the second network parameters of the storage neural network in the second state, and the second network parameters are used to store the first data. It can be seen that in the embodiment of the present disclosure, although the data to be stored is the first data, the first data is not actually stored in the storage medium. Instead, the storage process of the data is converted into a data calculation process with the help of the storage neural network, and the first network parameters of the storage neural network in the first state are adjusted by the first data to obtain the second network parameters of the storage neural network in the second state, thereby realizing the storage of the first data through the adjustment of the network parameters of the storage neural network; and, when the stored data needs to be read later, the corresponding storage tag can be used, and the stored data can be read out more conveniently through the storage neural network. In summary, the embodiment of the present disclosure provides a new data storage method that uses "computation instead of storage".
[0177] A fourth aspect of the embodiments of the present disclosure provides a data reading device.
[0178] FIG7 is a block diagram of a data reading device provided by an embodiment of the present disclosure. Referring to FIG7 , the data reading device 700 may include the following modules.
[0179] The second acquisition module 701 is configured to acquire a second storage tag corresponding to the second data to be read.
[0180] The reading module 702 is used to input the second storage tag into the preset storage neural network to obtain target reading data corresponding to the second data.
[0181] In the embodiments provided by the present disclosure, a second storage tag corresponding to the second data to be read is obtained through a second acquisition module; and the second storage tag is input into a preset storage neural network through a reading module to obtain target read data corresponding to the second data. It can be seen that in the embodiments of the present disclosure, data can be pre-stored through a storage neural network, and this storage method is achieved by using the data to be stored and its storage tag and adjusting the network parameters of the storage neural network. It is a data storage method that "replaces storage with computation." Correspondingly, when reading the stored data, the corresponding storage tag can be used to more conveniently read the stored data through the storage neural network, realizing a new data reading method.
[0182] A fifth aspect of an embodiment of the present disclosure provides a data storage system.
[0183] FIG8 is a block diagram of a data storage system provided by an embodiment of the present disclosure. Referring to FIG8 , the data storage system 800 may include an interface module 810 and a storage processing module 820 .
[0184] The interface module 810 is configured to obtain first data to be stored and a first storage tag corresponding to the first data, and input the first data and the first storage tag into the storage processing module;
[0185] The storage processing module 820 is configured to adjust the first network parameters of the storage neural network in the first state according to the first data and the first storage label, obtain the second network parameters of the storage neural network in the second state, and store the second network parameters, where the second network parameters are used to store the first data.
[0186] In some optional implementations, the interface module 810 is a functional module for connecting the data storage system 800 with an external device. Through the interface module 810, the data storage system 800 can receive data sent by the external device and can also transmit stored data externally. The external device includes a computing device, a storage device, a storage-computing integrated device, etc., which is not limited in the embodiments of the present disclosure.
[0187] In some optional implementations, a communication connection is established between the interface module 810 and the storage processing module 820. The interface module 810 can transmit received external data to the storage processing module 820 via this communication connection for further processing. The storage processing module 820 can also transmit processing results (e.g., read data) to the interface module 810, so that the interface module 810 can transmit the processing results to an external device. The communication connection between the interface module 810 and the storage processing module 820 can utilize wireless communication (e.g., optical communication, electromagnetic induction communication, and electromagnetic wave communication) and / or wired communication, which is not limited in the present embodiment.
[0188] In some optional embodiments, the data storage system may further include a verification module, wherein the verification module is configured to verify the target read data corresponding to the second data to be read, obtain a verification result, and transmit the verification result to the interface module for the interface module to output the verification result.
[0189] FIG9 is a block diagram of a data storage system provided by an embodiment of the present disclosure. Referring to FIG9 , the data storage system 900 may include an interface module 910 , a storage processing module 920 , and a verification module 930 .
[0190] In some optional implementations, the interface module 910 and the verification module 930 are in communication with each other, and the verification module 930 can verify the target read data and obtain a corresponding verification result, which can reflect the accuracy of the target read data. If the verification result determines that the target read data is completely identical to the corresponding second data or has a high degree of similarity, then performing corresponding data processing based on the target read data instead of the second data has no effect or a small effect on the processing result. Therefore, the verification module 930 can generate a verification result that passes the verification. If the verification result determines that the target read data and the corresponding second data have a high degree of difference or a low degree of similarity between the two, then performing corresponding data processing based on the target read data instead of the second data may have a significant impact on the processing result. Therefore, the verification module 930 can generate a verification result that fails the verification. After generating the verification result, the verification module 930 can send the verification result to the interface module 910 via the communication connection, so that the interface module 910 can send the verification result to an external device or provide it to a corresponding user. For the external device or user, it can refer to the accuracy requirements for data processing and determine whether to use the target read data to perform corresponding data processing based on the verification result. The communication connection between the interface module 910 and the verification module 930 may be wireless communication (eg, optical communication, electromagnetic induction communication, and electromagnetic wave communication) and / or wired communication, which is not limited in the embodiment of the present disclosure.
[0191] In some optional implementations, the storage processing module 820 / 920 may utilize a storage neural network to store the first data, wherein the first data may be any one or more data types such as text data, image data, audio data, video data, etc., which is not limited in the present embodiment.
[0192] In some optional implementations, the first data corresponds to at least one storage tag, where the first storage tag is one of the storage tags corresponding to the first data. The storage tag can be considered as summary information, overview information, or feature information extracted from the first data, which can reflect the content of the first data to a certain extent.
[0193] In some optional implementations, the storage neural network is a neural network used to store data and has a data storage function. After determining the network structure of the storage neural network, initial network parameters can be assigned to it (for example, the initial network parameters can be determined by pre-training) to form a storage neural network in its initial state. Each time data is stored using the storage neural network, it can be regarded as a process of updating the network parameters of the storage neural network based on the data to be stored. Moreover, this update of the network parameters can be characterized by the state of the storage neural network. In other words, each time data is stored, the network parameters of the storage neural network are adjusted accordingly, and the state of the storage neural network is also updated accordingly.
[0194] In some optional implementations, the storage neural network is obtained through pre-training, and the storage neural network has data storage capabilities. Pre-training allows the storage neural network to acquire various background knowledge and improve its logical thinking ability, enabling it to store various types of data. Accordingly, the process of storing data using the storage neural network can be viewed as a process of fine-tuning the network parameters of the storage neural network, and this fine-tuning of the network parameters enables data storage.
[0195] In some optional implementations, the first network parameter and the second network parameter include learnable parameters of the stored neural network, wherein the learnable parameters include parameters whose values can be adjusted in the stored neural network.
[0196] For example, the first network parameter and the second network parameter may include weights of a stored neural network.
[0197] For example, the first network parameter and the second network parameter may include weight and bias parameters of a stored neural network.
[0198] It should be noted that the above first network parameter and the second network parameter are merely examples, and the embodiments of the present disclosure do not limit this.
[0199] It should also be noted that the adjustment of network parameters (including fine-tuning) is essentially achieved through data calculation. That is, the data storage system converts the data storage process into a data calculation process, and the storage of the first data is achieved by updating the network parameters of the stored neural network. In other words, the data storage system of the embodiment of the present disclosure implements a data storage method that "replaces storage with calculation."
[0200] In some optional implementations, the storage processing module 820 / 920 can implement both storage functions and computing functions (i.e., processing functions), wherein the storage function means that the storage processing module 820 / 920 can store relevant data, and the computing function means that the storage processing module 820 / 920 can perform certain data computing operations (for example, adjustment of network parameters).
[0201] In some optional implementations, the storage processing module 820 / 920 may include a network storage submodule and a network computing submodule, wherein the network storage submodule is used to implement a data storage function, and the network computing submodule is used to implement a data computing function.
[0202] Exemplarily, the storage processing module 820 / 920 includes at least one network storage submodule and at least one network computing submodule; wherein, the network storage submodule is used to store the first network parameter and the second network parameter; the network computing submodule is used to adjust the first network parameter according to the first data and the first storage label to obtain the second network parameter.
[0203] In some optional implementations, the data storage system can not only be used to store data based on the storage neural network, but can also read out the stored data when needed. Furthermore, in order to be able to reasonably use the read data to perform corresponding data processing later, a verification module can be provided in the data storage system. After the data is read out, the verification module verifies the read data to obtain a verification result. The verification result can be used to clearly determine whether the read data is consistent with or relatively similar to the corresponding stored data, and to adopt appropriate data processing methods.
[0204] For example, if the data read out is exactly the same as or has a high similarity with the corresponding data stored in advance, data processing with higher accuracy requirements can be performed based on the read data. If the data read out is less similar to the corresponding data stored in advance, data processing with lower accuracy requirements can be performed based on the read data, or the read data may not be used for subsequent data processing.
[0205] In some optional implementations, the verification module may verify the target read data based on a hard check or a soft check to obtain a corresponding verification result. The hard check may be used to determine whether the target read data is completely identical to the second data, while the soft check may be used to determine the similarity between the target read data and the second data.
[0206] It should be noted that the above is an example of the verification method, and the embodiments of the present disclosure do not limit this.
[0207] In summary, in the disclosed embodiments, the data storage system utilizes a storage neural network to convert the data storage process into a process for adjusting the network parameters of the storage neural network, thereby implementing a novel data storage method based on "computation replacing storage." Although the data to be stored is first data, the first data is not actually stored in the storage medium. Instead, the storage neural network is used to convert the data storage process into a data calculation process. The network parameters of the storage neural network are adjusted based on the first data. This adjustment of the network parameters enables the storage of the first data, thereby reducing storage space usage.
[0208] In some optional embodiments, a verification module is provided within the data storage system, such that when the stored data is subsequently read, the verification module can obtain a verification result of the target read data, and the accuracy of the target read data can be determined based on the verification result, thereby performing corresponding data processing. In other words, after a user reads data "date1" from the data storage system, the user can determine the accuracy of "date1" based on the corresponding verification result, thereby determining whether to use "date1" for subsequent data processing.
[0209] The data storage system according to the embodiment of the present disclosure is described below.
[0210] In some optional implementations, considering that the storage device and the computing device can be set up using a system framework that is either Compute-In-Memory (CIM) or a system framework that is separated from storage and computing, in the embodiments of the present disclosure, the network storage sub-module and the network computing sub-module in the storage processing module can use a system framework that is either Compute-In-Memory (CIM) or a system framework that is separated from storage and computing, and the embodiments of the present disclosure do not limit this.
[0211] Among them, the storage and computing integration method refers to the integration of the network storage sub-module that carries the storage function and the network computing sub-module that carries the computing function in the storage processing module. The computing operations of the network computing sub-module can be directly executed in the network storage sub-module. Through this setting method, on the one hand, the system architecture can be simplified, and on the other hand, the frequent data transmission between the network storage sub-module and the network computing sub-module can be reduced, thereby improving data processing efficiency.
[0212] The storage-computing separation method refers to the separation between the network storage submodule that carries the storage function and the network computing submodule that carries the computing function in the storage processing module. The two use a storage-computing separation data processing method to perform data storage and computing respectively, and corresponding data channels are usually set up between the two for data exchange. Under normal circumstances, data needs to be loaded from the network storage submodule to the network computing submodule for processing, and the processing results also need to be loaded from the network computing submodule to the network storage submodule for storage. The use of the storage-computing separation method facilitates the expansion of storage resources and computing resources, realizes the flexible allocation of resources, and improves the flexibility of the system.
[0213] In some optional implementations, the storage processing module includes at least one storage-computing integrated module unit, and each storage-computing integrated module unit includes a network storage sub-module and a network computing sub-module; or, the network storage sub-module and the network computing sub-module in the storage processing module exchange data through a preset data bus.
[0214] It can be seen from this that, in the case of storage and computing integration, the storage processing module can include one or more storage and computing integration module units, and each storage and computing integration module unit is integrated with a network storage sub-module and a network computing sub-module, which respectively undertake the storage function and computing function, and the network storage sub-module and the network computing sub-module are tightly coupled together in a storage and computing integration manner, and the two share data, so there is no need to set up a data bus between the two, nor is there any need for data transmission. In the case of storage and computing separation, the network storage sub-module and the network computing sub-module in the storage processing module are not tightly coupled integrated structures, and data needs to be transmitted between the two through a data bus to achieve data interaction.
[0215] In some optional implementations, the network storage submodule is further configured to transmit the first network parameter to the network computing submodule via a data bus; the network computing submodule is further configured to transmit the second network parameter to the network storage submodule via the data bus. That is, in the case of separation of storage and computing, when the network computing submodule performs data processing, the first network parameter required needs to be transmitted from the network storage submodule to the network computing submodule via the data bus. Similarly, when the network computing submodule adjusts the first network parameter using the first data to obtain the second network parameter, the second network parameter needs to be transmitted to the network storage submodule via the data bus so that the network storage submodule can store the second network parameter for future use.
[0216] It should be noted that in the case of storage and computing separation, due to the need to transmit data between the network storage submodule and the network computing submodule (for example, the transmission of network parameters of the stored neural network), there is a data transmission bottleneck, which may affect the data processing efficiency. In the case of integrated storage, the data stored in the network storage submodule is equivalent to local data for the network computing submodule. Therefore, the network computing submodule can directly use the data stored in the network storage submodule, and the processing results of the network computing submodule can be directly stored by the network storage submodule. There is no need for data interaction between the two, and the data processing efficiency is higher.
[0217] In some optional implementations, the process of the storage processing module using the storage neural network to store the first data is as follows: assuming that the first network parameter of the storage neural network in the first state is W1, the first data obtained is x1, and the first storage label corresponding to the first data x1 is label1, the first data x1 and the first storage label label1 are input into the storage neural network in the first state, and the storage neural network in the first state performs data calculation based on the first network parameter W1 and the first storage label label1, outputs the first predicted data x11', and according to the first data x1 and the predicted data x11', a preset storage evaluation function is used. Perform calculations to obtain a first stored evaluation value ev11. If the stored evaluation value ev11 is greater than or equal to the preset stored evaluation threshold, adjust the first network parameter W1 according to the stored evaluation value ev11 to obtain W11', and use W11' as the second network parameter to update the network parameter of the stored neural network from W1 to W11'. If the stored evaluation value ev11 is less than the preset stored evaluation threshold, adjust the first network parameter W1 according to the stored evaluation value ev11 to obtain W11', and then perform data calculation based on W11' and the first stored label label1 to output the second predicted data x12'.
[0218] According to the first data x1 and the predicted data x12', the storage evaluation function is used for calculation to obtain the second stored evaluation value ev12. If the stored evaluation value ev12 is greater than or equal to the preset stored evaluation threshold, the first network parameter W11' is adjusted according to the stored evaluation value ev12 to obtain W12', and W12' is used as the second network parameter to update the network parameter of the stored neural network from W11' to W12'. If the stored evaluation value ev12 is less than the preset stored evaluation threshold, the first network parameter W11' is adjusted according to the stored evaluation value ev12 to obtain W12', and then data calculation is performed based on W12' and the first stored label label1, the third predicted data x13' is output, and the third stored evaluation value ev13 is calculated.
[0219] The above process is repeated until the storage evaluation value ev1i is greater than or equal to the preset storage evaluation threshold (i ≥ 1), the corresponding W1i' is determined as the second network parameter, and the network parameter of the storage neural network is updated to W1i'. The storage evaluation function is a function used to evaluate the storage effect (e.g., storage accuracy, completeness, etc.) of the storage neural network.
[0220] It should be noted that this method of storing data by fine-tuning the network parameters of the storage neural network is equivalent to storing the data in the network parameters of the storage neural network. As data is continuously stored, the network parameters of the storage neural network are constantly fine-tuned, which may cause the storage neural network to "forget" some general knowledge (for example, general knowledge learned during the pre-training phase). Moreover, when the network parameters of the storage neural network are large, using the storage neural network to store small amounts of data may result in problems such as inability to converge quickly and difficulty in accurate storage.
[0221] Based on this, in some optional implementations, when adjusting the first network parameters to obtain the second network parameters, the following method can be used: for the storage neural network in the initial state, on the one hand, the original full network parameters are kept unchanged, and on the other hand, a part of the network parameters are selected from the full network parameters. Each time data is stored, only the selected network parameters are adjusted, which is equivalent to only making additional fine-tuning to the selected network parameters. Accordingly, when reading the stored data, the original full network parameters and the adjusted network parameters can be used to read the data together. Since the original full network parameters are retained, even if data is continuously stored, the storage neural network will not "forget" general knowledge. In addition, since only part of the network parameters are updated when storing data, when storing small amounts of data, the number of network parameters that need to be updated is small, which is conducive to rapid convergence and can effectively and accurately store small amounts of data.
[0222] Exemplarily, the original right network parameter of the storage neural network is W0 (W0 includes N network parameters), and n network parameters w00 are selected from them as the network parameters that need to be adjusted when storing the first data (i.e., w00∈W0), n and N are both integers greater than or equal to 1, and n<N. When the storage neural network is used to store the first data x1, the network parameter w00 is equivalent to the first network parameter of the storage neural network in the first state. Therefore, the first network parameter w00 is adjusted according to the first data x1 and its first storage label label1 to obtain the second network parameter w01. At this time, the network parameters of the storage neural network include W0 and w01. When the storage neural network is used to store the first data x2, the network parameter w01 is equivalent to the first network parameter of the storage neural network in the first state. Therefore, the first network parameter w01 is adjusted according to the first data x2 and its first storage label label2 to obtain the second network parameter w02. At this time, the network parameters of the storage neural network include W0 and w02. By analogy, the storage neural network can be used to realize multiple data storage.
[0223] Among them, the full network parameters and the adjusted network parameters can be characterized in a variety of ways, either independently or through related information such as the difference in their values, and the embodiments of the present disclosure are not limited to this. For example, the full network parameter W0 is {1, 1, 2, 4, 3}, and the network parameter w00 to be adjusted is {1, 1, 2}. Then, after storing the first data x1, W0 and w01 can be characterized as: W0 = {1, 1, 2, 4, 3}, w01 = {2, 5, 1}. In addition, W0 and w01 can also be characterized as: {1+1, 1+4, 2-1, 4, 3}.
[0224] Typically, neural networks contain many dense layers that can perform data processing such as matrix multiplication, and the weight matrices in these layers usually have full-rank properties. Furthermore, considering that pre-trained models may exhibit a special property when facing some tasks: low "intrinsic dimensionality", it is possible to fine-tune the parameters of pre-trained models through low-rank decomposition. In other words, although these models may contain millions to billions of parameters and have an extremely high-dimensional parameter space, when they are adapted to new specific tasks, only a relatively small subset of parameters is required.
[0225] Returning to the embodiments of the present disclosure, for a storage neural network, which includes multiple full-rank network layers, the full set of initial network parameters of the storage neural network can be obtained through pre-training. For the first stored data, this full set of initial network parameters is equivalent to the first network parameters of the storage neural network. Each time the storage neural network executes the data storage process, it is equivalent to performing a specific task. Considering that the storage neural network has the property of low "intrinsic dimension", therefore, when storing data based on the storage neural network, only a relatively small subset of parameters is required, and this subset of parameters can be used to achieve data storage.
[0226] In some optional implementation manners, the network parameters of the storage neural network include a weight matrix. When storing data, the storage neural network can be made to execute the data storage task more effectively by adding a low-rank adaptation layer (for example, a low-rank matrix) to the weight matrix of the storage neural network. When storing the first data, only the low-rank adaptation layer needs to be updated, while keeping the original weights of the storage neural network unchanged, so as to avoid the storage neural network forgetting the learned general knowledge. Moreover, this storage method focuses the parameter update process on the low-rank adaptation layer, reducing the amount of parameter adjustment. Therefore, the parameter adjustment efficiency can be improved, and the calculation and memory overhead can also be reduced.
[0227] Exemplarily, the full set of initial network parameters of the storage neural network is W0, and W0 ∈ Rd×k, where d and k represent two dimensions of W0. Based on the low-rank decomposition method, it can be obtained that: W0 + ΔW = W0 + BA, where B and A can be regarded as two low-rank matrices, and B ∈ Rd×r, A ∈ Rr×k, and the rank r << min(d, k). Correspondingly, the process of storing the first data x and adjusting the corresponding network parameters can be characterized as: W0x + ΔWx = W0x + BAx. During the storage process, W0 is frozen and does not receive gradient updates, while A and B are adjustable network parameters and their values are adjusted to obtain the corresponding second network parameters.
[0228] It should be noted that the number of adjustable parameters of W0 is d×k. After low-rank decomposition, the actual amount of parameter adjustment is d×r + r×k. Since r is much smaller than d and k, the amount of parameters to be adjusted for storing the first data is effectively reduced.
[0229] It should be noted that the above method for adjusting the network parameters of the storage neural network is only an example, and the embodiments of the present disclosure are not limited thereto.
[0230] In some optional implementations, the network computing submodule in the storage processing module is configured to input the first data and the first storage label into the storage neural network in a first state, perform data computing using the storage neural network in the first state, adjust the first network parameters, and obtain the second network parameters; or the network computing submodule in the storage processing module is configured to input the first data and the first storage label into the storage neural network in the first state, perform data computing using the storage neural network in the first state, adjust the first network parameters, obtain the changed parameters of the first network parameters, and determine the second network parameters based on the changed parameters. In other words, when determining the second network parameters, either all parameters or only the changed parameters can be determined.
[0231] Exemplarily, in the storage-computing integrated module unit, the network computing submodule is used to input the first data and the first storage label into the storage neural network in the first state, and use the storage neural network in the first state in the corresponding network storage submodule to perform data calculation, adjust the first network parameters, and obtain the second network parameters; or, the network computing submodule is used to input the first data and the first storage label into the storage neural network in the first state, and use the storage neural network in the first state in the corresponding network storage submodule to perform data calculation, adjust the first network parameters, obtain the changed parameters in the first network parameters, and determine the second network parameters based on the changed parameters.
[0232] As can be seen from this, in a storage-computing integrated architecture, regardless of the method used to determine the second network parameters, for the network computing submodule, it is equivalent to performing data calculations based on local data (for example, the first network parameters of the stored neural network), without the need for data transmission with the network storage submodule. This implementation method of coupling computing and storage can effectively reduce bandwidth requirements.
[0233] In some optional implementations, the storage-computing integrated module unit can be made of storage-computing integrated materials. In other words, the storage-computing integrated materials can be used as a carrier for storing the neural network.
[0234] Exemplarily, the storage-computing integrated module unit includes a module unit based on phase change memory, or a module unit based on memristor, which is not limited in the embodiments of the present disclosure.
[0235] For example, the storage neural network in the memristor can be expressed as a storage matrix, and the corresponding first network parameter W1 is an m×n weight matrix. The first data can be represented as a 1×m vector. Then, in the storage and computing module unit, the corresponding calculation can be performed directly based on the first data and the first network parameter (for example, directly performing multiplication operations, multiplication and addition operations, etc. on the first data and the weight matrix), and the first network parameter W1 can be updated to obtain the second network parameter W2, which can be an m×n weight matrix.
[0236] It should be noted that in the case of separation of storage and computing, the network computing sub-module usually needs to load the first network parameters from the outside. After completing the loading of the first network parameters, it performs corresponding calculations based on the first data and the first network parameters. After obtaining the second network parameters, it also needs to transfer the second network parameters to the network storage sub-module for storage.
[0237] Exemplarily, in a storage processing module with storage and computation separation, the network computing submodule is used to load the first state storage neural network (which can be understood as loading the first network parameter of the first state storage neural network) from the corresponding network storage submodule via a data bus, input the first data and the first storage tag into the first state storage neural network, and use the first state storage neural network to perform data computing, adjust the first network parameter, and obtain the second network parameter; or, the network computing submodule is used to load the first state storage neural network from the corresponding network storage submodule via a data bus, input the first data and the first storage tag into the first state storage neural network, and use the first state storage neural network to perform data computing, adjust the first network parameter, obtain the change parameter in the first network parameter, and determine the second network parameter based on the change parameter. For example, for network parameter a1, its value in the first state storage neural network is v1. After storing the first data, if the value of a1 changes from v1 to v2, it can be determined that network parameter a1 is a change parameter.
[0238] Exemplarily, the first data x1 corresponds to the second network parameter W2 (that is, the second network parameter obtained by storing the first data x1 is W2), the first data x2 corresponds to the second network parameter W3, and the first data x3 corresponds to the second network parameter W4, wherein W2, W3 and W4 are all full parameters of the stored neural network.
[0239] Exemplarily, the first data x1 corresponds to the second network parameter W2, the first data x2 corresponds to the second network parameter W3', and the first data x3 corresponds to the second network parameter W4', wherein W2 is the full parameter of the stored neural network, and W3' and W4' are different network parameters based on W2 (i.e., parameters that have changed compared to the corresponding values in W2, which are variable parameters).
[0240] Exemplarily, the initial network parameters of the stored neural network are W1 (i.e., the network parameters before any data is stored), the first data x1 corresponds to the second network parameter W2', the first data x2 corresponds to the second network parameter W3', and the first data x3 corresponds to the second network parameter W4', wherein W1 is the full parameter of the stored neural network, and W2', W3', and W4' are different network parameters based on W1 (i.e., variable parameters).
[0241] It can be seen from this that when determining the second network parameters, the full amount of network parameters of the stored neural network can be determined, or only the part of the parameters that have changed (i.e., the changed parameters) can be determined. The embodiments of the present disclosure do not limit this.
[0242] In some optional implementations, after the second network parameter is obtained, the second network parameter may be stored in a corresponding location.
[0243] In some optional implementations, the storage processing module is further used to update the first network parameter stored in the first storage space based on the second network parameter; and / or the storage processing module is further used to store the second network parameter in the second storage space.
[0244] In other words, the storage processing module can store the first network parameters in the first storage space and use the second network parameters to update the first network parameters in the first storage space when needed. In addition, the storage processing module can also store the second network parameters in the second storage space for backup (for example, the corresponding second network parameters may be used when reading the first data, and the corresponding second network parameters can be read from the second storage space at this time).
[0245] In some optional implementations, the first data may be stored in a segmented storage (or block storage) manner, that is, the first data may be split into multiple data segments for storage.
[0246] In some optional implementations, the first data includes multiple data segments; accordingly, there is a first corresponding relationship between the network storage submodule in the storage processing module and the data segments, and the network storage submodule is used to store second network parameters corresponding to the data segments.
[0247] Exemplarily, the first data is text data, which includes multiple text segments, and a first correspondence exists between the text segments and the network storage submodule, where the first correspondence includes at least one of a one-to-one relationship and a many-to-one relationship. Based on this, when the network storage submodule is used to store the text data, the text segments are stored in the network storage submodule having the first correspondence.
[0248] For example, the first data is text data t1, which includes text segments ts11, ts12, ts13, and ts14. The storage and computing separation storage processing module includes a network storage submodule 11, a network storage submodule 12, and a network storage submodule 13, wherein ts11 has a first corresponding relationship with the network storage submodule 11, ts12 and ts14 have a first corresponding relationship with the network storage submodule 12, and ts13 has a first corresponding relationship with the network storage submodule 13. Therefore, ts1 can be stored in the network storage submodule 11, ts12 and ts14 can be stored in the network storage submodule 12, and ts3 can be stored in the network storage submodule 13, thereby realizing segmented storage of the first data t1.
[0249] For example, the first data is text data t2, which includes text segments ts21, ts22, ts23, ts24 and ts25. The storage processing module includes three storage-computing module units, wherein the first storage-computing module unit includes a network storage submodule 21, the second storage-computing module unit includes a network storage submodule 22, and the third storage-computing module unit includes a network storage submodule 23. Moreover, there is a first corresponding relationship between ts21 and the network storage submodule 21, there is a first corresponding relationship between ts22 and ts23 and the network storage submodule 22, and there is a first corresponding relationship between ts24 and ts25 and the network storage submodule 23. Therefore, ts21 can be stored in the network storage submodule 21, ts22 and ts23 can be stored in the network storage submodule 22, and ts24 and ts25 can be stored in the network storage submodule 23, thereby realizing the segmented storage of the first data t2.
[0250] It should be noted that, for other types of first data, when the first data includes multiple data fragments, a similar storage method can also be used for segmented storage (or block storage), which will not be described in detail here.
[0251] In some optional implementations, the first data may be stored according to the data type of the first data, so that different types of first data are stored in different storage paths.
[0252] In some optional implementations, the first data corresponds to multiple data types; accordingly, the network storage submodules in the storage processing module have a second correspondence with the data types, and the network storage submodules are used to store the first data of the corresponding data type. In other words, the network storage submodules have a second correspondence with the data type of the first data, and each network storage submodule is only used to store the first data of the corresponding data type. Accordingly, each network storage submodule can be considered a storage path for the corresponding data type.
[0253] Exemplarily, the first data corresponds to N data types, N ≥ 1 and N is an integer, the storage processing module includes M network storage submodules, M ≥ 1 and M is an integer, and the 1st to n1th data types correspond to the 1st network storage submodule (n1 ≥ 1), the (n1)+1th to n2th data types correspond to the 2nd network storage submodule (n2 ≥ (n1)+1), ..., the nkth to Nth data types correspond to the Mth network storage submodule (1 ≤ nk ≤ N). Based on this, for each first data to be stored, when the first data type corresponding to the first data is determined, the first data can be stored in the network storage submodule that has a second corresponding relationship with the first data type.
[0254] For example, the data types of the first data include text data, image data, audio data, and video data, and the storage processing module with storage and computing separation includes a network storage sub-module 11, a network storage sub-module 12, a network storage sub-module 13, and a network storage sub-module 14, wherein there is a second corresponding relationship between the text data and the network storage sub-module 11, and when the first data is text data, the first data can be stored in the network storage sub-module 11; there is a second corresponding relationship between the image data and the network storage sub-module 12, and when the first data is image data, the first data can be stored in the network storage sub-module 12; there is a second corresponding relationship between the audio data and the network storage sub-module 13, and when the first data is audio data, the first data can be stored in the network storage sub-module 13; there is a second corresponding relationship between the video data and the network storage sub-module 14, and when the first data is video data, the first data can be stored in the network storage sub-module 14.
[0255] For example, the data types of the first data include text data, image data, audio data, and video data, and the storage processing module includes four storage-computing integrated module units, wherein the first storage-computing integrated module unit includes a network storage sub-module 21, the second storage-computing integrated module unit includes a network storage sub-module 22, the third storage-computing integrated module unit includes a network storage sub-module 23, and the fourth storage-computing integrated module unit includes a network storage sub-module 24, wherein there is a second corresponding relationship between the text data and the network storage sub-module 21, and when the first data is text data, the first data can be stored in the network storage sub-module 21; there is a second corresponding relationship between the image data and the network storage sub-module 22, and when the first data is image data, the first data can be stored in the network storage sub-module 22; there is a second corresponding relationship between the audio data and the network storage sub-module 23, and when the first data is audio data, the first data can be stored in the network storage sub-module 23; there is a second corresponding relationship between the video data and the network storage sub-module 24, and when the first data is video data, the first data can be stored in the network storage sub-module 24.
[0256] It should be noted that in some optional implementations, since video data can be split into an audio portion and an image portion, the split audio data can be stored in a network storage submodule having a second corresponding relationship, and the split image data can be stored in a network storage submodule having a second corresponding relationship. Accordingly, to read the video data, the audio data and image data can be read from the corresponding network storage submodules and then merged to obtain the complete video data.
[0257] It should be noted that the above data type of the first data is merely an example, and the embodiments of the present disclosure do not limit this.
[0258] In some optional implementations, the storage neural network may include multiple storage sub-networks, each storage sub-network has a specific network structure and is suitable for storing first data of certain specific task types.
[0259] Exemplarily, the first data includes M task types, M≥1 and M is an integer, the storage neural network includes M storage sub-networks corresponding one-to-one to the M task types, and the storage sub-network is used to perform storage of the first data of the corresponding task type.
[0260] For example, the storage neural network includes a convolutional subnetwork, a recurrent subnetwork, a pulse subnetwork, and a graph neural subnetwork. Among them, the convolutional subnetwork includes at least one convolutional layer and is suitable for storing the first data of computer vision tasks (for example, image data in computer vision tasks); the recurrent subnetwork is built based on the recurrent neural network (RNN) and is suitable for storing the first data in tasks such as natural language processing and speech recognition; the pulse subnetwork is built based on the spiking neural network (SNN) and is suitable for storing the first data of time series tasks; the graph neural subnetwork is built based on the graph neural network and is suitable for storing the first data of relational tasks (for example, knowledge graphs).
[0261] In some optional implementations, the task type or task type identifier of the first data can be input into the interface module, and the storage processing module identifies the task type or task type identifier of the first data, so that the first data can be stored through the corresponding storage subnetwork; in addition, the task type can also be used as part of the first storage label, and the storage processing module or the storage neural network determines the task type of the first data through the first storage label, and then stores the first data through the corresponding storage subnetwork. The embodiments of the present disclosure are not limited to this.
[0262] For example, the storage processing module includes M integrated storage and computing module units, each of which corresponds to a storage subnetwork and is used to store first data of a corresponding task type. After receiving the first data, the storage processing module transmits the first data to the corresponding integrated storage and computing module unit based on the task type to which the first data belongs, and the integrated storage and computing module unit performs the storage of the first data.
[0263] For example, the storage processing module includes M pairs of network storage submodules and network computing submodules with separate storage and computing functions. Each pair of network storage submodules and network computing submodules corresponds to a storage subnetwork and is configured to store first data of a corresponding task type. After receiving the first data, the storage processing module transfers the first data to the corresponding network storage submodule and network computing submodule based on the task type to which the first data belongs. The network storage submodule and network computing submodule then perform storage of the first data.
[0264] In some optional implementations, in a data storage system, storing a neural network can support different storage modes to achieve different storage accuracies, thereby meeting diverse storage needs.
[0265] In some optional implementations, the storage neural network may further support N storage modes, each corresponding to N storage precisions. For example, the storage neural network supports three storage modes, corresponding to storage precisions of: 32-bit floating point numbers (float32), 16-bit floating point numbers (float16), and 8-bit integers (int8). That is, for the first data to be stored, a storage mode may be selected and stored based on the storage precision corresponding to the storage mode. In addition, the first data may be divided into multiple sub-data, and different storage modes may be used for different sub-data, and each sub-data may be stored separately based on the corresponding storage precision.
[0266] In some optional implementations, the first data includes at least one first sub-data corresponding to the first storage mode and at least one second sub-data corresponding to the second storage mode, and the storage accuracy of the first storage mode is different from the storage accuracy of the second storage mode; accordingly, the storage processing module is used to adjust the first sub-network parameter corresponding to the first sub-data based on the first storage mode according to the first sub-data and the first storage tag, to obtain the second sub-network parameter corresponding to the first sub-data; and, adjust the third sub-network parameter corresponding to the second sub-data based on the second storage mode according to the second sub-data and the first storage tag, to obtain the fourth sub-network parameter corresponding to the second sub-data; wherein the first sub-network parameter and the third sub-network parameter constitute the first network parameter, and the second sub-network parameter and the fourth sub-network parameter constitute the second network parameter.
[0267] Exemplarily, the first storage mode is the precise storage mode, and the second storage mode is the approximate storage mode. After obtaining the first data, the storage processing module can determine the first sub-data in the first data that adopts the precise storage mode, and the second sub-data in the first data that adopts the approximate storage mode, and use the storage neural network in the first state to adjust the first sub-network parameters corresponding to the first sub-data according to the first sub-data and the first storage label using the precise storage mode to obtain the second sub-network parameters corresponding to the first sub-data. At the same time, use the storage neural network in the first state to adjust the third sub-network parameters corresponding to the second sub-data according to the second sub-data and the first storage label using the approximate storage mode to obtain the fourth sub-network parameters corresponding to the second sub-data.
[0268] It should be noted that there is a certain positive correlation between the storage accuracy corresponding to the storage mode and the amount of computation required for storage. That is, for the same first data, the higher the storage accuracy of the storage mode used, the greater the amount of computation required to store the first data. Conversely, the lower the storage accuracy of the storage mode used, the smaller the amount of computation required to store the first data. The amount of computation required to store the first data primarily includes the amount of computation generated by the neural network adjusting network parameters to store the first data.
[0269] In some optional implementations, for the portion of the first data with lower fault tolerance, a precise storage mode can be used so that when this portion of data is subsequently read, the reading result is more accurate and does not affect further data processing; for the portion of the first data with higher fault tolerance, an approximate storage mode can be used to reduce the amount of calculation generated by storing this portion of data, and when this portion of data is subsequently read, even if there is a certain error between the reading result and the original stored data, it will not affect further data processing.
[0270] For example, the first data to be stored is a company's promotional data (the promotional data can be in at least one of text, voice, and video formats), and the promotional data includes a company profile, company address, company phone number, company website, and company zip code. The company profile can be stored in approximate storage mode, while the company address, company phone number, company website, and company zip code can be stored in precise storage mode.
[0271] It should be noted that the above storage modes are merely examples, and the embodiments of the present disclosure do not limit them.
[0272] In some optional implementations, the storage neural network in the first state has stored third data, and the third data includes multiple data segments, and the first data is data obtained by updating part of the third data; accordingly, the storage processing module is also used to compare the first data and the third data, determine the first data segment in the first data and the second data segment in the third data, input the first data segment and the first storage label into the storage neural network in the first state, adjust the first network parameters corresponding to the second data segment in the storage neural network in the first state, and obtain the second network parameters corresponding to the first data segment; wherein the first data segment corresponds to the second data segment in position and the data is different, and the second network parameters corresponding to the first data segment are used to update the stored third data to the first data.
[0273] It can be seen from this that when updating data, the corresponding second network parameters can be adjusted only based on the updated data fragment. Compared with updating the full amount of network parameters, the data processing volume is relatively small, which can alleviate data processing pressure.
[0274] For example, the first data includes data segments s11, s12, s13, and s14, and the third data includes data segments s21, s22, s23, and s24. By comparing the first and third data, it can be seen that the content of s11 and s21 is the same, the content of s12 and s22 is the same, the content of s13 and s23 is different, and the content of s14 and s24 is the same. Therefore, it can be seen that the first data segment is s13 and the second data segment is s23. Based on this, s13 and the first storage label are input into the storage neural network in the first state. The storage neural network in the first state is used to perform data calculation, and the first network parameters corresponding to s23 are adjusted to obtain the second network parameters corresponding to s13, thereby updating the third data.
[0275] It should be noted that, whether storing the first data for the first time or updating the already stored first data, the adjustment of the network parameters involved may fall into two situations: in the first situation, the first network parameters are directly adjusted or updated; in the second situation, the first low-rank decomposition matrix corresponding to the first network parameters is adjusted or updated. In either case, the first network parameters can be adjusted to obtain second network parameters corresponding to the first data and used to store the first data.
[0276] In some optional implementations, the first network parameters correspond to multiple first low-rank decomposition matrices, and the second network parameters correspond to multiple second low-rank decomposition matrices; accordingly, according to the first data and the first storage label, the first network parameters of the storage neural network in the first state are adjusted to obtain the second network parameters of the storage neural network in the second state, including: inputting the first data and the first storage label into the storage neural network in the first state, using the storage neural network in the first state to perform data calculation, adjusting the matrix elements of the multiple first low-rank decomposition matrices, and obtaining multiple second low-rank decomposition matrices.
[0277] It should be noted that the reason why the network parameters are updated by adjusting the low-rank decomposition matrix is mainly due to the fact that in some implementations, if the network parameter matrix (for example, the weight matrix) storing the neural network is relatively large, and the amount of data to be stored at a single time for the first data is relatively small, using a small amount of data to adjust the larger network parameter matrix can easily lead to problems such as matrix overfitting and severe forgetting. Since the low-rank decomposition matrix is smaller in scale than the matrix before decomposition, for the above situation, the first network parameter matrix corresponding to the first network parameter can be decomposed into multiple first low-rank decomposition matrices, and by adjusting the matrix elements of the first low-rank decomposition matrix, multiple second low-rank decomposition matrices corresponding to the second network parameters are obtained, thereby effectively alleviating problems such as matrix overfitting and severe forgetting.
[0278] It should be noted that, if the first data volume is larger than the second data volume for storing the network parameters of the neural network, then if the related technology is used to store the first data, the required storage space should be equal to or relatively close to the first data volume. However, in the embodiment of the present disclosure, because the data storage system replaces the storage process with the calculation process of storing the neural network, the required storage space should be equal to or relatively close to the second data volume. Furthermore, because the second data volume is smaller than the first data volume, the storage space occupied can be reduced.
[0279] In addition, since the storage neural network can store data multiple times, and each data storage can be achieved only by adjusting or updating the network parameters of the storage neural network, in some optional implementations, the storage space required for multiple data storage is always the storage space occupied by the network parameters of the storage neural network. When the amount of data stored multiple times is large, the storage space occupied can be effectively reduced. For example, the storage neural network is used to store data 10 times, and the sum of the first data amount of the above data is 100G (Gigabyte), and the second data amount of the network parameters of the storage neural network is 1G. Therefore, the storage effect of storing 100G data in 1G storage space can be achieved. It can be seen that the data storage method of the embodiment of the present disclosure effectively reduces the amount of storage space occupied.
[0280] The data storage system according to the embodiment of the present disclosure will be described below in conjunction with FIG. 10 to FIG. 13 .
[0281] FIG10 is a block diagram of a data storage system provided by an embodiment of the present disclosure, which exemplarily illustrates a data storage system with storage and computing separation. Referring to FIG10 , the data storage system 1000 includes an interface module 1010, a storage processing module 1020, and a verification module 1030. The storage processing module 1020 includes a network storage submodule 1021 and a network computing submodule 1022. The interface module 1010 is communicatively connected to the network computing submodule 1022, and the network storage submodule 1021 and the network computing submodule 1022 are connected via a data bus 1023. The verification module 1030 is communicatively connected to the interface module 1010 and the storage processing module 1020, respectively.
[0282] FIG11 is a block diagram of a data storage system provided by an embodiment of the present disclosure, which exemplarily shows a data storage system with separated storage and computing. 11 , the data storage system 1100 includes an interface module 1110, a storage processing module 1120, and a verification module 1130. The storage processing module 1120 includes q×p (q≥1, p≥1) network storage sub-modules (e.g., network storage sub-module 112111 to network storage sub-module 1121qp) and q×p network computing sub-modules (e.g., network computing sub-module 112211 to network computing sub-module 1122qp). The q×p network storage sub-modules correspond to the q×p network computing sub-modules and are arranged in an array. The corresponding network storage sub-modules and network computing sub-modules are connected via corresponding data buses (e.g., data buses 112311 to 1123qp, respectively used to connect network storage sub-module 112111 to network computing sub-module 112211, ..., network storage sub-module 1121qp to network computing sub-module 1122qp). The interface module 1110 is in communication with each of the above-mentioned network computing sub-modules, and the verification module 1130 is in communication with the interface module 1110 and the storage processing module 1120 respectively.
[0283] In some optional implementations, the network storage submodule is used to store the first network parameter; the network computing submodule is used to obtain the first network parameter from the network storage submodule, and adjust the first network parameter based on the first data and the first storage tag to obtain the second network parameter, and send the second network parameter to the network storage submodule; the network storage submodule is also used to receive the second network parameter sent by the network computing submodule and store the second network parameter.
[0284] That is to say, for the storage and computing separation method, in the storage processing module, the network storage sub-module and the network computing sub-module are separated in storage and computing. Therefore, for the network computing sub-module, the data required for its computing operations (for example, the first network parameters of the stored neural network) need to be loaded from the network storage sub-module through the data bus, and the calculation results of the network computing sub-module (for example, the second network parameters) also need to be loaded into the network storage sub-module through the data bus for storage.
[0285] In some optional implementations, when the first data x1 needs to be stored, the first data x1 and its first storage label label1 are input into the interface module, and the interface module transmits the first data x1 and the first storage label label1 to the network computing submodule. In addition, the network computing submodule can also load the first network parameter W1 of the storage neural network in the first state from the network storage submodule via the data bus, and adjust the first network parameter W1 according to the first data x1 and the first storage label label1 to obtain the second network parameter W2, and then send the second network parameter W2 to the network storage submodule via the data bus. Upon receiving the second network parameter W2 sent by the network computing submodule, the network storage submodule stores the second network parameter W2 for future use.
[0286] Furthermore, in some optional implementations, when there is new first data x2 to be stored, the first data x2 and its first storage label label2 can be input into the interface module, and the interface module transmits the first data x2 and the first storage label label2 to the network computing submodule. Furthermore, since the network parameters of the storage neural network were adjusted from W1 to W2 during the last data storage process, the first network parameters of the storage neural network in the first state for the first data x2 are W2. Therefore, the network computing submodule loads the first network parameters W2 of the storage neural network in the first state from the network storage submodule via the data bus, and adjusts the first network parameters W2 according to the first data x1 and the first storage label label1 to obtain new second network parameters W3, and then sends the new second network parameters W3 to the network storage submodule 121 via the data bus. Upon receiving the new second network parameters W3 sent by the network computing submodule, the network storage submodule stores the new second network parameters W3 for future use.
[0287] By analogy, each time the interface module receives the first data to be stored and the first storage tag thereof, it executes the above operation to implement storage of the first data.
[0288] Furthermore, in some optional implementations, the network computing submodule can also be used to obtain the first network parameter from the network storage submodule, input the first data and the first storage tag into the storage neural network in the first state, perform data calculation using the storage neural network in the first state, adjust the first network parameter to obtain the second network parameter, and send the second network parameter to the network storage submodule; or, the network computing submodule can also be used to obtain the first network parameter from the network storage submodule, input the first data and the first storage tag into the storage neural network in the first state, perform data calculation using the storage neural network in the first state, adjust the first network parameter to obtain the changed parameter in the first network parameter, and determine the second network parameter based on the changed parameter, and send the second network parameter to the network storage submodule.
[0289] That is to say, when generating the second network parameters, the network calculation submodule can determine the new full network parameters of the storage neural network, or only determine the network parameters whose values have changed. The embodiment of the present disclosure does not limit this.
[0290] Figure 12 is a block diagram of a data storage system provided by an embodiment of the present disclosure, which exemplarily shows a data storage system integrating storage and computing. Referring to Figure 12, the data storage system 1200 includes an interface module 1210, a storage processing module 1220, and a verification module 1230. The storage processing module 1220 includes a storage-computing module unit 1224, and the storage-computing module unit 1224 includes a network storage submodule 12241 and a network computing submodule 12242. The interface module 1210 is in communication with the storage-computing module unit 1224, and the verification module 1230 is in communication with the interface module 1210 and the storage processing module 1220, respectively.
[0291] FIG13 is a block diagram of a data storage system provided by an embodiment of the present disclosure, which exemplarily shows a data storage system integrating storage and computing. Referring to FIG13 , the data storage system 1300 includes an interface module 1310, a storage processing module 1320, and a verification module 1330. The storage processing module 1320 includes m×n storage and computing module units (for example, storage and computing module unit 132411, ..., storage and computing module unit 1324m1, storage and computing module unit 13241n, ..., storage and computing module unit 1324mn), wherein each storage and computing module unit includes a network storage submodule and a network computing submodule (for example, storage and computing module unit 132411, ..., storage and computing module unit 1324m1, storage and computing module unit 13241n, ..., storage and computing module unit 1324mn). Block unit 132411 includes a network storage submodule 1324111 and a network computing submodule 1324112, ..., storage-computing integrated module unit 13241n includes a network storage submodule 13241n1 and a network computing submodule 13241n2, ..., storage-computing integrated module unit 1324m1 includes a network storage submodule 1324m11 and a network computing submodule 1324m12, ..., storage-computing integrated module unit 1324mn includes a network storage submodule 1324mn1 and a network computing submodule 1324mn2. Furthermore, each storage-computing integrated module unit is connected to interface module 1310, and the m×n storage-computing integrated module units are interconnected in a mesh manner. Verification module 1330 is in communication with interface module 1310 and storage processing module 1320.
[0292] That is to say, for the storage-in-one mode, the storage processing module may include one or more storage-computing-in-one module units, and each storage-computing-in-one module unit includes a network storage sub-module and a network computing sub-module, and the network storage sub-module and the network computing sub-module are integrated together in a storage-in-one mode. Therefore, for the network storage sub-module and the network computing sub-module, data (for example, the first network parameter and the second network parameter) can be directly processed by the network computing sub-module in the network storage sub-module without going through the traditional storage-computing-storage process, which can reduce processing time and improve data processing efficiency.
[0293] In some optional implementations, storage integration can be achieved by embedding the computing unit into the memory, that is, the network computing sub-module can be embedded into the network storage sub-module, and the corresponding storage and computing integration module unit can be obtained based on this.
[0294] In some optional implementations, when first data x1 needs to be stored, the first data x1 and its first storage label label1 are input into the interface module, and the interface module transmits the first data x1 and the first storage label label1 to the corresponding storage-computing module unit. The network computing submodule in the storage-computing module unit directly uses the first network parameter W1 of the first state of the storage neural network stored in the corresponding network storage submodule, and adjusts the first network parameter W1 according to the first data x1 and the first storage label label1 to obtain the second network parameter W2, and the network storage submodule stores the second network parameter W2 for future use.
[0295] Furthermore, in some optional implementations, when there is new first data x2 to be stored, the first data x2 and its first storage label label2 can be input into the interface module, and the interface module transmits the first data x2 and the first storage label label2 to the corresponding storage-computing module unit. Moreover, if the storage-computing module unit is a module unit for storing the first data, then since the network parameters of its storage neural network were adjusted from W1 to W2 during the last data storage process, for the first data x2, the first network parameters of the storage neural network in the first state are W2. Based on this, the network computing submodule in the storage-computing module unit directly uses the first network parameters W2 of the storage neural network in the first state stored in the corresponding network storage submodule, and adjusts the first network parameters W2 according to the first data x2 and the first storage label label2 to obtain new second network parameters W3, and the network storage submodule stores the new second network parameters W3 for standby use.
[0296] By analogy, each time the interface module receives the first data to be stored and the first storage tag thereof, it executes the above operation to implement storage of the first data.
[0297] Furthermore, in some optional implementations, in the storage and computing integrated module unit, the network storage submodule is used to store the first network parameters of the storage neural network in the first state; the network computing submodule is used to adjust the first network parameters according to the first data and the first storage label to obtain the second network parameters; the network storage submodule is also used to store the second network parameters.
[0298] That is to say, for the storage-computing integrated mode, in the storage-computing integrated module unit, the network storage sub-module and the network computing sub-module are integrated. Therefore, for the network computing sub-module, the data required for its computing operations (for example, the first network parameters of the stored neural network) can be obtained directly from the network storage sub-module without the need for data transmission, and the calculation results of the network computing sub-module (for example, the second network parameters) do not need to be transmitted to the network storage sub-module, but can be directly stored by the network storage sub-module.
[0299] It should be noted that in the embodiments of the present disclosure, whether using a storage-computation separation approach or a storage-integrated approach, the adjustment of network parameters is essentially achieved through data calculation. This means that the data storage process is converted into a data calculation process, and the storage of the first data is achieved by updating the network parameters of the storage neural network. In other words, the embodiments of the present disclosure implement a data storage method that "replaces storage with calculation."
[0300] The above content mainly introduces the implementation method of data storage system to store data. The following describes the process of reading data from the data storage system.
[0301] In some optional implementations, the interface module is further used to obtain a second storage tag corresponding to the second data to be read, and input the second storage tag into the storage processing module; the storage processing module is further used to obtain target reading data corresponding to the second data based on the second storage tag and the storage neural network, and send the target reading data to the interface module; the interface module is also used to output the target reading data.
[0302] As can be seen, when second data is stored in the data storage system and needs to be read from it, the second storage tag corresponding to the second data can be input through the interface module, and the interface module inputs the second storage tag to the storage processing module. After receiving the second storage tag, the storage processing module inputs the second storage tag into the storage neural network. After data processing by the storage neural network, it outputs the target read data corresponding to the second data, transmits the target read data to the interface module, and the interface module outputs the target read data.
[0303] In some optional implementations, considering that the storage neural network can adopt different storage modes when storing data, corresponding to different storage accuracies, the second data may or may not be exactly the same as the corresponding target read data, but there should be a high degree of similarity between the two, which will not affect subsequent data processing or will have little impact on subsequent data processing.
[0304] In some optional implementations, the target read data is identical to the second data, or the similarity between the target read data and the second data is greater than a preset similarity threshold. The preset similarity threshold can be set based on experience, statistical data, and processing requirements, and is not limited in the present embodiment.
[0305] In some optional implementations, the network computing submodule in the storage processing module is further used to input the second storage tag into the storage neural network, so that the storage neural network performs data calculation based on the target network parameters and the second storage tag to obtain target reading data corresponding to the second data; wherein the target network parameters are the current network parameters of the storage neural network, or the network parameters obtained by the storage neural network storing the second data.
[0306] Exemplarily, in the storage-computing integrated module unit, the network computing submodule can also be used to input the second storage tag corresponding to the second data to be read into the storage neural network, so that the storage neural network can perform data calculation according to the target network parameters and the second storage tag to obtain the target reading data corresponding to the second data; wherein the target network parameters are the current network parameters of the storage neural network, or the network parameters obtained by the storage neural network storing the second data.
[0307] Exemplarily, in a storage processing module based on storage and computing separation, the network computing submodule can also be used to obtain target network parameters from the network storage submodule, and input the second storage tag corresponding to the second data to be read into the storage neural network, so that the storage neural network can perform data calculation according to the target network parameters and the second storage tag to obtain the target reading data corresponding to the second data; wherein, the target network parameters are the current network parameters of the storage neural network, or the network parameters obtained by the storage neural network storing the second data.
[0308] In some optional implementations, the network calculation submodule inputs the second storage tag into the storage neural network to obtain target reading data corresponding to the second data, including: inputting the second storage tag into the storage neural network so that the storage neural network performs data calculation based on the first target network parameters and the second storage tag to obtain the target reading data; or, inputting the second storage tag into the storage neural network so that the storage neural network obtains the second target network parameters corresponding to the second data based on the second storage tag, and performs data calculation based on the second target network parameters and the second storage tag to obtain the target reading data; wherein the first target network parameters are the current network parameters of the storage neural network, and the second target network parameters are the network parameters obtained by the storage neural network storing the second data.
[0309] Therefore, it can be seen that the network calculation submodule can adopt at least two implementation methods when reading the second data based on the second storage tag and the storage neural network. In the first implementation method, the second storage tag is input into the storage neural network, and the storage neural network directly uses its current network parameters (i.e., the first target network parameters) and the second storage tag to perform data calculation and output the target read data; in the second implementation method, after the second storage tag is input into the storage neural network, the storage neural network does not directly perform data calculation based on its current network parameters and the second storage tag, but first obtains the network parameters obtained when storing the second data (i.e., the second target network parameters), and uses the second target network parameters and the second storage tag to perform data calculation, and then outputs the target read data.
[0310] Exemplarily, the first target network parameter of the preset storage neural network is W1, and the second storage label corresponding to the second data x1 to be read is label1. When using the storage neural network to read the second data, label1 can be directly input into the storage neural network, and the storage neural network performs data calculation based on the first target network parameter W1 and label1 to obtain the target read data x1'; in addition, label1 can also be input into the storage neural network, and the storage neural network searches the second network parameter W1' generated when x1 was originally stored in the second storage space according to label1 to obtain the second target network parameter W1', and then performs data calculation based on the second target network parameter W1' and label1 to obtain the target read data x1". Among them, the second storage space is used to store the second network parameter.
[0311] It should be noted that if the first target network parameters are used to read data directly, there is no need to obtain the second target network parameters, and the reading speed is faster. If the second target network parameters are used to read data, it may take some time to obtain the second target network parameters, but the accuracy of the target data read may be relatively high. When reading data, any data reading method can be selected according to needs, and the embodiments of the present disclosure are not limited to this.
[0312] In some optional implementations, the second data corresponds to multiple levels of storage tags, and as the level of the storage tag increases, the information representation capability of the storage tag also increases accordingly, and the multi-level storage tags are stored in the third storage space; when the level of the second storage tag is not the highest level, the storage processing module can also be used to: obtain a new second storage tag from the third storage space according to the second storage tag, and obtain the target reading data according to the new second storage tag and the storage neural network; wherein the new second storage tag is a storage tag corresponding to the second data and has a higher level than the second storage tag.
[0313] That is to say, if the second storage label input into the storage neural network by the storage processing module is not the highest-level storage label of the second data, a new second storage label with a higher level than the second storage label can be obtained from the third storage space, and the target read data can be obtained using the new second storage label.
[0314] Exemplarily, the storage processing module inputs the second storage tag into the storage neural network to obtain target reading data corresponding to the second data, including: inputting the second storage tag into the storage neural network, and when the storage neural network recognizes that the level of the second storage tag is not the highest level, reading a new second storage tag with a higher level from the third storage space according to the second storage tag, and performing data calculation based on the first target network parameters and the new second storage tag to obtain the target reading data, wherein the first target network parameters are the current network parameters of the storage neural network.
[0315] For example, the first target network parameter of the storage neural network is W1, and the second storage label corresponding to the second data x1 to be read is label11, and the level of label11 is not the highest level. When reading the second data, the storage processing module can input label11 into the storage neural network. The storage neural network first identifies whether the level of label11 is the highest level. If it is identified that the level of label11 is not the highest level, it reads the second storage label label12 of a higher level corresponding to the second data x1 from the third storage space, and then performs data calculation based on the first target network parameter W1 and label12 to obtain the target read data x1'.
[0316] Exemplarily, the storage processing module inputs the second storage tag into the storage neural network to obtain target read data corresponding to the second data, including: inputting the second storage tag into the storage neural network, and when the storage neural network recognizes that the level of the second storage tag is not the highest level, reading a new second storage tag of a higher level from the third storage space according to the second storage tag, and obtaining a second target network parameter corresponding to the second data according to the second storage tag, performing data calculation according to the second target network parameter and the new second storage tag to obtain the target read data; wherein, the second target network parameter is the network parameter obtained by the storage neural network storing the second data.
[0317] For example, the first target network parameter of the storage neural network is W1, and the second storage label corresponding to the second data x1 to be read is label11, and the level of label11 is not the highest level. When reading the second data, the storage processing module can input label11 into the storage neural network. The storage neural network first identifies whether the level of label11 is the highest level, and when it identifies that the level of label11 is not the highest level, it reads the second storage label label12 of a higher level corresponding to the second data x1 from the third storage space, and searches the second storage space for the second network parameter W1' generated when x1 was originally stored according to label11 to obtain the second target network parameter W1', and then performs data calculation based on the second target network parameter W1' and label12 to obtain the target read data x1".
[0318] It should be noted that the process of the storage processing module using the storage neural network to read data can be understood as the inference process (or prediction process) of the storage neural network. That is, after the second storage tag is input, the storage neural network performs inference calculations based on the first target network parameters or the second target network parameters and the second storage tag, and the output result is the target read data corresponding to the second data. In other words, the network parameters of the storage neural network are usually not changed during the data reading process, but its network parameters (first target network parameters or second target network parameters) are used to perform data calculations.
[0319] In some optional implementations, after the target read data is read out, the target read data can also be verified by a verification module to determine whether complete and accurate data is read out from the storage neural network.
[0320] In some optional implementations, the verification module may be configured to perform data verification on the target read data according to the second data to obtain a verification result of the target read data.
[0321] For example, for the second data using the precise storage mode, the storage processing module may verify the target read data corresponding to the second data using a hard check method; for the second data using the approximate storage mode, the storage processing module may verify the target read data corresponding to the second data using a soft check method. The hard check method includes a check method based on check information such as a check code, and the soft check method includes a check method based on check information such as similarity and spatial distance.
[0322] In some optional implementations, the second data corresponds to the first verification information; accordingly, the verification module can be configured to: determine the second verification information corresponding to the target read data; and determine a first verification result for the target read data based on the first verification information and the second verification information. The first verification information and the second verification information can be verification codes obtained by processing the second data and the target read data, respectively, based on a preset verification algorithm. The verification algorithm may include a parity check, an XOR check, a cyclic redundancy check, a message digest algorithm 5 (MD5), a digital signature, a Hamming code check, and the like, but the present disclosure does not limit this.
[0323] Exemplarily, a first verification code Code1 of the second data is pre-calculated according to a verification algorithm and stored in a preset space for future use. After obtaining target read data corresponding to the second data, a second verification code Code2 of the target read data is calculated according to the verification algorithm, and the first verification code Code1 of the second data is read from the preset space. The first verification code Code1 and the second verification code Code2 are then compared. If the two are consistent, it indicates that the target read data and the second data are exactly the same or relatively similar, and the target read data has passed data verification. Conversely, if the two are inconsistent, it indicates that the target read data and the second data are different and the difference is significant, and the target read data has failed data verification.
[0324] In some optional implementations, the verification module may be configured to: determine an overall similarity between the second data and the target read data; and determine a second verification result of the target read data based on the overall similarity.
[0325] For example, after obtaining the target read data corresponding to the second data, the overall similarity between the second data and the target read data is calculated according to a similarity algorithm. If the overall similarity is greater than or equal to a preset similarity threshold, it indicates that the target read data and the second data are completely identical or relatively similar, and the target read data has passed data verification. Conversely, if the overall similarity is less than the preset similarity threshold, it indicates that the target read data and the second data are different, and the difference is significant, and the target read data has failed data verification. Similarity algorithms include cosine similarity algorithms, Jaccard similarity coefficient algorithms, Pearson correlation coefficient algorithms, etc., and the embodiments of the present disclosure are not limited thereto.
[0326] For example, after obtaining target read data corresponding to the second data, the spatial distance between the second data and the target read data is calculated according to a distance algorithm. If the spatial distance is less than or equal to a preset distance threshold, it indicates that the target read data is completely identical or relatively similar to the second data, and the target read data has passed data verification. Conversely, if the spatial distance is greater than the preset distance threshold, it indicates that the target read data is different from the second data, and the difference is significant, and the target read data has failed data verification. Distance algorithms include Euclidean distance algorithms, Manhattan distance algorithms, Chebyshev distance algorithms, etc., and the present embodiment is not limited thereto.
[0327] In some optional implementations, the verification module may also verify the target read data using a segmented verification method.
[0328] In some optional implementations, the second data includes at least one third data segment corresponding to the first storage mode and at least one fourth data segment corresponding to the second storage mode, the third data segment corresponds to first data segment check information, the third check result of the target read data includes a first syndrome result corresponding to the first storage mode and a second syndrome result corresponding to the second storage mode, and the storage precision of the first storage mode is different from the storage precision of the second storage mode. Accordingly, the check module may further be configured to: divide the target read data into at least one fifth data segment corresponding to the first storage mode and at least one sixth data segment corresponding to the second storage mode; determine second data segment check information corresponding to each fifth data segment; obtain a first syndrome result for the fifth data segment based on the corresponding first data segment check information and second data segment check information; determine a segment similarity between the corresponding fourth data segment and the sixth data segment; and obtain a second syndrome result for the sixth data segment based on the segment similarity. The first syndrome result indicates whether the fifth data segment passes data check, and the second syndrome result indicates whether the sixth data segment passes data check.
[0329] Exemplarily, the first storage mode is the precise storage mode, the second storage mode is the approximate storage mode, the second data includes a third data fragment s1 corresponding to the precise storage mode, and two fourth data fragments s2 and s3 corresponding to the approximate storage mode, the third data fragment s1 corresponds to the first data segment check code scode1, and the first data segment check code scode1 is obtained based on a preset check algorithm; the target read data includes a fifth data fragment s4 corresponding to the precise storage mode, and two sixth data fragments s5 and s6 corresponding to the approximate storage mode, wherein s1 has a corresponding relationship with s4, s2 has a corresponding relationship with s5, and s3 has a corresponding relationship with s6.
[0330] Furthermore, the second data segment check code scode2 of the fifth data fragment s4 is calculated according to the preset check algorithm, and the first data segment check code scode1 and the second data segment check code scode2 are compared. If the two are consistent, it means that the fifth data fragment s4 is completely identical or relatively similar to the third data fragment s1, and the fifth data fragment s4 has passed the data check. Otherwise, if the two are inconsistent, it means that the fifth data fragment s4 is different from the third data fragment s1, and the difference is large, and the fifth data fragment s4 has failed the data check.
[0331] The segment similarity between the fourth data segment s2 and the sixth data segment s5, and the segment similarity between the fourth data segment s3 and the sixth data segment s6 are calculated according to a preset similarity algorithm. If both of the segment similarities are greater than or equal to a preset segment similarity threshold, it means that the fourth data segment s2 and the sixth data segment s5 are completely identical or relatively similar, and the fourth data segment s3 and the sixth data segment s6 are completely identical or relatively similar, and both the sixth data segments s5 and s6 have passed data verification. If both of the segment similarities are less than the preset segment similarity threshold, it means that the fourth data segment s2 and the sixth data segment s5 are different and the difference is large, and the fourth data segment s3 and the sixth data segment s6 are different and the difference is large. Therefore, both the sixth data segments s5 and s6 have failed data verification. In addition, if only one of the two segment similarities is less than the preset segment similarity threshold, the sixth data segment that is less than the preset segment similarity threshold has failed data verification, and only the other has passed data verification.
[0332] In some optional implementations, the verification module may further verify the target read data based on the reference feature points.
[0333] Exemplarily, several data can be selected from the second data as the first reference feature point. After obtaining the target read data corresponding to the second data, the verification module can select the data at the corresponding position from the target read data to obtain the second reference feature point. By comparing the first reference feature point with the second reference feature point, the similarity between the second data and the target read data can be determined, thereby judging whether the target read data passes the data verification.
[0334] For example, the second data is a piece of binary data 1100001011001011, from which the 3rd to 5th bits 000 are selected as the first first reference feature point, and the 10th to 12th bits 100 are selected as the second first reference feature point. After reading the corresponding target read data, the verification module intercepts the 3rd to 5th bits from the target read data to obtain the first second reference feature point, with a value of 000, and intercepts the 10th to 12th bits from the target read data to obtain the second second reference feature point, with a value of 101. Since the reference feature points correspond to a total of 6 bits, of which only the corresponding value of the 12th bit is different, it can be obtained that the similarity between the second data and the target read data is (5÷6)×100%=83%. If the preset similarity threshold is 80%, then since the similarity is greater than the similarity threshold, it can be determined that the target read data has passed the data verification.
[0335] It should be noted that the above calculation of reference feature points and their similarities is merely an example, and the embodiments of the present disclosure do not limit this.
[0336] It should be understood that the above embodiment can also be used in combination with any other embodiment of the present disclosure. The above embodiment is only a specific example of the present disclosure, and is not intended to limit the scope of protection of the present disclosure.
[0337] FIG14 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
[0338] 14 , an embodiment of the present disclosure provides an electronic device, comprising: at least one processor 1401; at least one memory 1402; and one or more I / O interfaces 1403 connected between the processor 1401 and the memory 1402; wherein the memory 1402 stores one or more computer programs that can be executed by the at least one processor 1401, and the one or more computer programs are executed by the at least one processor 1401 so that the at least one processor 1401 can execute the above-mentioned data storage method or data reading method.
[0339] FIG15 is a block diagram of an electronic device provided in an embodiment of the present disclosure.
[0340] 15 , an embodiment of the present disclosure provides an electronic device comprising a plurality of processing cores 1501 and an on-chip network 1502 , wherein the plurality of processing cores 1501 are all connected to the on-chip network 1502 , and the on-chip network 1502 is used to exchange data between the plurality of processing cores and external data.
[0341] One or more instructions are stored in one or more processing cores 1501 , and the one or more instructions are executed by one or more processing cores 1501 , so that one or more processing cores 1501 can execute the above-mentioned data storage method or data reading method.
[0342] In some embodiments, the electronic device may be a brain-inspired chip. Because brain-inspired chips can use vectorized computing and require external memory, such as Double Data Rate (DDR) synchronous dynamic random access memory, to load parameters such as weight information of the neural network model, the disclosed embodiments utilize batch processing for higher computational efficiency.
[0343] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor / processing core, implements the aforementioned data storage method or data reading method. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0344] An embodiment of the present disclosure also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data storage method or data reading method.
[0345] It will be understood by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium).
[0346] As is well known to those skilled in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those skilled in the art, communication media typically contains computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0347] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0348] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0349] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0350] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0351] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0352] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0353] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0354] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A data storage method, wherein: include: Acquire first data to be stored and a first storage tag corresponding to the first data; According to the first data and the first storage label, the first network parameters of the storage neural network in the first state are adjusted to obtain the second network parameters of the storage neural network in the second state, and the second network parameters are used to store the first data.
2. The method according to claim 1, wherein After obtaining the second network parameter of the storage neural network in the second state, the method further includes: Based on the second network parameters, updating the first network parameters stored in the first storage space to store the first data and the storage neural network in the second state; The storage neural network in the second state is used to store new data to be stored and / or read already stored data.
3. The method according to claim 1 or 2, wherein: After obtaining the second network parameter of the storage neural network in the second state, the method further includes: The second network parameters are stored in a second storage space to store the first data and the second state of the storage neural network.
4. The method according to claim 1, wherein The adjusting, based on the first data and the first storage tag, first network parameters of the storage neural network in the first state to obtain second network parameters of the storage neural network in the second state includes: Inputting the first data and the first storage tag into the storage neural network in the first state, performing data calculation using the storage neural network in the first state, adjusting the first network parameters, and obtaining the second network parameters; or The first data and the first storage tag are input into the storage neural network in the first state, the storage neural network in the first state is used to perform data calculation, the first network parameters are adjusted to obtain the change parameters in the first network parameters, and the second network parameters are determined based on the change parameters.
5. The method according to claim 1 or 4, wherein The first data includes N data types, where N≥1 and N is an integer, the storage neural network has a storage path matching each of the data types, and each of the storage paths includes at least one storage neural network in a first state; Before adjusting the first network parameters of the storage neural network in the first state according to the first data and the first storage tag to obtain the second network parameters of the storage neural network in the second state, the method further includes: determining a first data type of the first data; Obtain a storage neural network in a first state under a storage path that matches the first data type.
6. The method according to claim 5, wherein: The obtaining of a storage neural network in a first state under a storage path matching the first data type includes: In the case that the storage path of the read storage neural network does not match the first data type, second network parameters matching the first data type are obtained from the second storage space, and a matching storage neural network in the first state is obtained based on the matching second network parameters, and the second storage space is used to store the second network parameters.
7. The method according to claim 1 or 4, wherein: The first data includes M task types, M≥1 and M is an integer, the storage neural network includes M storage sub-networks corresponding one-to-one to the M task types, and the storage sub-network is used to perform storage of the first data of the corresponding task type.
8. The method according to claim 1, wherein The storage neural network in the first state has stored third data, the third data includes a plurality of data segments, and the first data is data obtained by updating part of the third data; The adjusting, based on the first data and the first storage tag, first network parameters of the storage neural network in the first state to obtain second network parameters of the storage neural network in the second state includes: Comparing the first data and the third data to determine a first data segment in the first data and a second data segment in the third data, where the first data segment and the second data segment have corresponding positions and different data; The first data segment and the first storage tag are input into the storage neural network in the first state, and the first network parameters corresponding to the second data segment in the storage neural network in the first state are adjusted to obtain the second network parameters corresponding to the first data segment. The second network parameters corresponding to the first data segment are used to update the stored third data to the first data.
9. The method according to claim 1, wherein The first network parameters and the second network parameters comprise learnable parameters of the storage neural network.
10. The method according to claim 1, wherein The first network parameters correspond to a plurality of first low-rank decomposition matrices, and the second network parameters correspond to a plurality of second low-rank decomposition matrices; The adjusting, based on the first data and the first storage tag, first network parameters of the storage neural network in the first state to obtain second network parameters of the storage neural network in the second state includes: The first data and the first storage label are input into the storage neural network in the first state, the storage neural network in the first state is used to perform data calculation, and the matrix elements of the multiple first low-rank decomposition matrices are adjusted to obtain the multiple second low-rank decomposition matrices.
11. The method according to claim 1, wherein: The first data includes at least one first sub-data corresponding to a first storage mode and at least one second sub-data corresponding to a second storage mode, and a storage precision of the first storage mode is different from a storage precision of the second storage mode; The storage neural network in the first state is used to adjust the first sub-network parameters corresponding to the first sub-data based on the first storage mode according to the first sub-data and the first storage label to obtain the second sub-network parameters corresponding to the first sub-data; and The storage neural network in the first state is further configured to adjust third sub-network parameters corresponding to the second sub-data based on the second storage mode according to the second sub-data and the first storage label, to obtain fourth sub-network parameters corresponding to the second sub-data; The first sub-network parameter and the third sub-network parameter constitute the first network parameter, and the second sub-network parameter and the fourth sub-network parameter constitute the second network parameter.
12. The method according to claim 1, wherein The first data corresponds to multiple levels of storage tags, and as the level of the storage tag increases, the information representation capability of the storage tag also increases accordingly; The acquiring the first data to be stored and the first storage tag corresponding to the first data includes: The first data to be stored and the first storage tag are received, wherein the first storage tag is selected from a plurality of levels of storage tags corresponding to the first data.
13. The method according to claim 1, wherein The storage neural network is obtained through pre-training, and the storage neural network has data storage capability.
14. A data reading method, wherein: include: Obtaining a second storage tag corresponding to the second data to be read; The second storage tag is input into a preset storage neural network to obtain target reading data corresponding to the second data.
15. The method according to claim 14, wherein Inputting the second storage tag into a preset storage neural network to obtain target read data corresponding to the second data includes: Inputting the second storage tag into the storage neural network so that the storage neural network performs data calculation based on the first target network parameter and the second storage tag to obtain the target read data; or inputting the second storage tag into the storage neural network, so that the storage neural network obtains a second target network parameter corresponding to the second data according to the second storage tag, and performs data calculation according to the second target network parameter and the second storage tag to obtain the target read data; Among them, the first target network parameter is the current network parameter of the storage neural network, and the second target network parameter is the network parameter obtained by the storage neural network storing the second data.
16. The method according to claim 14 or 15, wherein: The second data corresponds to multiple levels of storage tags, and as the level of the storage tag increases, the information representation capability of the storage tag also increases accordingly, and the multiple levels of the storage tags are stored in the third storage space; When the level of the second storage tag is not the highest level, the storage neural network is further used to obtain a new second storage tag from the third storage space according to the second storage tag, and obtain the target read data according to the new second storage tag; The new second storage tag is a storage tag corresponding to the second data and has a higher level than the second storage tag.
17. The method according to claim 14, wherein: The target read data is identical to the second data, or the similarity between the target read data and the second data is greater than a preset similarity threshold.
18. The method according to claim 14 or 17, wherein The second data corresponds to the first verification information; After inputting the second storage tag into a preset storage neural network to obtain target read data corresponding to the second data, the method further includes: Determining second verification information corresponding to the target read data; A first verification result of the target read data is determined according to the first verification information and the second verification information.
19. The method according to claim 14 or 17, wherein: After inputting the second storage tag into a preset storage neural network to obtain target read data corresponding to the second data, the method further includes: determining an overall similarity between the second data and the target read data; A second verification result of the target read data is determined according to the overall similarity.
20. The method according to claim 14 or 17, wherein The second data includes at least one third data segment corresponding to the first storage mode and at least one fourth data segment corresponding to the second storage mode, the third data segment corresponds to first data segment check information, the third check result of the target read data includes a first syndrome result corresponding to the first storage mode and a second syndrome result corresponding to the second storage mode, and the storage precision of the first storage mode is different from the storage precision of the second storage mode; After inputting the second storage tag into a preset storage neural network to obtain target read data corresponding to the second data, the method further includes: dividing the target read data into at least one fifth data segment corresponding to the first storage mode and at least one sixth data segment corresponding to the second storage mode; determining second data segment check information corresponding to the fifth data segment; Obtaining a first syndrome result for the fifth data segment according to the corresponding check information of the first data segment and the check information of the second data segment; determining a segment similarity between the fourth data segment and the sixth data segment having a corresponding relationship; A second syndrome result for the sixth data segment is obtained according to the segment similarity.
21. A data storage device, wherein: include: a first acquisition module, configured to acquire first data to be stored and a first storage tag corresponding to the first data; The storage module is configured to adjust the first network parameters of the storage neural network in the first state according to the first data and the first storage label to obtain the second network parameters of the storage neural network in the second state, and the second network parameters are used to store the first data.
22. A data reading device, wherein: include: A second acquisition module is configured to acquire a second storage tag corresponding to the second data to be read; The reading module is configured to input the second storage tag into a preset storage neural network to obtain target reading data corresponding to the second data.
23. A data storage system, wherein: Includes an interface module and a storage processing module; The interface module is configured to obtain first data to be stored and a first storage tag corresponding to the first data, and input the first data and the first storage tag into the storage processing module; The storage processing module is configured to adjust the first network parameters of the storage neural network in the first state according to the first data and the first storage label, obtain the second network parameters of the storage neural network in the second state, and store the second network parameters, where the second network parameters are used to store the first data.
24. The system of claim 23, wherein: The data storage system further includes a verification module; The verification module is configured to verify the target read data corresponding to the second data to be read, obtain a verification result, and transmit the verification result to the interface module so that the interface module outputs the verification result.
25. The system according to claim 23 or 24, wherein: The storage processing module includes at least one network storage submodule and at least one network computing submodule; The network storage submodule is configured to store the first network parameter and the second network parameter; The network calculation submodule is configured to adjust the first network parameter according to the first data and the first storage tag to obtain the second network parameter.
26. The system of claim 25, wherein: The storage processing module includes at least one storage and computing module unit, and each storage and computing module unit includes a network storage submodule and a network computing submodule; Alternatively, the network storage submodule and the network computing submodule in the storage processing module exchange data via a preset data bus.
27. The system of claim 26, wherein: The network storage submodule is configured to send the first network parameter to the network calculation submodule via the data bus; The network calculation submodule is configured to send the second network parameter to the network storage submodule through the data bus.
28. A system according to any one of claims 23 to 27, wherein: The network computing submodule in the storage processing module is configured to input the first data and the first storage tag into the storage neural network in the first state, perform data computing using the storage neural network in the first state, adjust the first network parameters, and obtain the second network parameters; or The network computing submodule in the storage processing module is configured to input the first data and the first storage tag into the storage neural network in the first state, perform data calculation using the storage neural network in the first state, adjust the first network parameters, obtain the change parameters in the first network parameters, and determine the second network parameters based on the change parameters.
29. A system according to any one of claims 23 to 27, wherein: The first data includes a plurality of data segments; There is a first corresponding relationship between the network storage submodule in the storage processing module and the data segment, and the network storage submodule is configured to store a second network parameter corresponding to the data segment.
30. The system according to any one of claims 23 to 27, wherein: The first data corresponds to multiple data types; The network storage submodule in the storage processing module has a second corresponding relationship with the data type, and the network storage submodule is configured to store first data of the corresponding data type.
31. A system according to any one of claims 23 to 27, wherein: include: The interface module is configured to obtain a second storage tag corresponding to the second data to be read, and input the second storage tag into the storage processing module; The storage processing module is configured to obtain target read data corresponding to the second data according to the second storage tag and the storage neural network, and send the target read data to the verification module; The interface module is configured to output the target read data upon receiving the target read data sent by the verification module.
32. The system of claim 31, wherein: The network calculation submodule in the storage processing module is configured to input the second storage tag into the storage neural network, so that the storage neural network performs data calculation according to the target network parameters and the second storage tag to obtain target read data corresponding to the second data; The target network parameters are current network parameters of the storage neural network, or network parameters obtained by the storage neural network storing the second data.
33. A system according to any one of claims 23 to 27, wherein: The storage neural network in the first state has stored third data, the third data includes a plurality of data segments, and the first data is data obtained by updating part of the third data; The storage processing module is configured to compare the first data and the third data, determine a first data segment in the first data and a second data segment in the third data, input the first data segment and the first storage label into the storage neural network in the first state, adjust a first network parameter corresponding to the second data segment in the storage neural network in the first state, and obtain a second network parameter corresponding to the first data segment; The first data segment corresponds to the second data segment in position and has different data, and the second network parameter corresponding to the first data segment is used to update the stored third data to the first data.
34. A system according to any one of claims 23 to 27, wherein: The first data includes at least one first sub-data corresponding to a first storage mode and at least one second sub-data corresponding to a second storage mode, and a storage precision of the first storage mode is different from a storage precision of the second storage mode; The storage processing module is configured to adjust, based on the first sub-data and the first storage tag and the first storage mode, a first sub-network parameter corresponding to the first sub-data to obtain a second sub-network parameter corresponding to the first sub-data; and, based on the second sub-data and the first storage tag and the second storage mode, adjust a third sub-network parameter corresponding to the second sub-data to obtain a fourth sub-network parameter corresponding to the second sub-data; The first sub-network parameter and the third sub-network parameter constitute the first network parameter, and the second sub-network parameter and the fourth sub-network parameter constitute the second network parameter.
35. The system of claim 24, wherein: The second data corresponds to the first verification information; The verification module is configured to determine second verification information corresponding to the target read data, and determine a first verification result of the target read data according to the first verification information and the second verification information.
36. The system of claim 24, wherein: The verification module is configured to determine an overall similarity between the second data and the target read data, and determine a second verification result of the target read data according to the overall similarity.
37. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the data storage method according to any one of claims 1 to 13 or the data reading method according to any one of claims 14 to 20 is implemented.
38. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the data storage method according to any one of claims 1 to 13, or the data reading method according to any one of claims 14 to 20.
39. A computer program product comprising computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein: When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes a method for implementing the data storage method according to any one of claims 1 to 13, or the data reading method according to any one of claims 14 to 20.
Citation Information
Patent Citations
Data processing method and device, computer equipment and storage medium
CN110647981A
Predictive data storage hierarchical memory system and method
CN111338980A
Data storage method and data acquisition method and device thereof
CN112307230A
Neural network structure searching method, image processing method and device
CN112445823A
Prediction model training method and device, equipment and storage medium
CN113762501A
Cited By
Storage and calculation integrated chip, data access method, electronic equipment and storage medium
CN121301275A