A data storage method, device and electronic equipment

By splitting and reusing addresses of the extremely large integer array, the problem of increased storage space in the word association system was solved, thus optimizing storage space and improving processing efficiency.

CN117271836BActive Publication Date: 2026-04-21QIZHI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QIZHI TECH CO LTD
Filing Date
2023-07-14
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

As the amount of data in the word association system increases, the use of extremely large integer arrays leads to a continuous increase in storage space requirements, necessitating an effective data storage method to reduce storage space consumption.

Method used

The very large integer array is processed by splitting it into a first array and a second array, and it is determined whether the first array is consistent with the preset array. If they are consistent, the storage address is reused. The second array is stored at another address. The processing is carried out by the average splitting rule and binary comparison.

Benefits of technology

It effectively reduces the storage space occupied by data, improves processing efficiency and computing speed, and ensures data format consistency and fast reading capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117271836B_ABST
    Figure CN117271836B_ABST
Patent Text Reader

Abstract

This application provides a data storage method, apparatus, and electronic device, relating to the field of data processing. The method, applied to a server, includes: obtaining a first integer array, wherein the first integer array is an ordered integer array; processing the first integer array to determine a first array and a second array; determining whether the first array is consistent with a preset array; if the first array is consistent with the preset array, storing the first array to a preset first storage address; and storing the second array to a preset second storage address. Implementing the technical solution provided in this application facilitates the reduction of data storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, specifically to a data storage method, apparatus, and electronic device. Background Technology

[0002] With the continuous development of storage technology, various storage technologies have emerged. In the word association system, the underlying data storage structure uses a very large integer array for storage.

[0003] Very large integer arrays can be used to store extremely large integers to meet specific needs. For example, in big data processing fields like word association systems, it's often necessary to process very large integers, and very large integer arrays can be used to store and manipulate these integers. However, as the amount of enterprise and patent data in the system continues to increase, the volume of word association data required by the word association system also becomes larger. This means that more and more very large integer arrays will be used to store word association data, resulting in an ever-increasing amount of storage space occupied by the data.

[0004] Therefore, there is an urgent need for a data storage method, device, and electronic equipment. Summary of the Invention

[0005] This application provides a data storage method, apparatus, and electronic device that facilitates reducing the storage space occupied by data.

[0006] A first aspect of this application provides a data storage method applied to a server. The method includes: obtaining a first integer array, wherein the first integer array is an ordered integer array; processing the first integer array to determine a first array and a second array; determining whether the first array is consistent with a preset array; if the first array is consistent with the preset array, storing the first array to a preset first storage address; and storing the second array to a preset second storage address.

[0007] By adopting the above technical solution, the server first obtains a first integer array, then processes it to determine the first and second arrays. Next, the server checks if the first array matches a preset array. If they match, the server stores the first array at a preset first storage address and the second array at a preset second storage address. Thus, by processing a very large integer array, transforming it into a first and a second array, and then checking if the first array matches the preset array, the server reuses the preset first storage address when they match, while the second array is stored at the preset second storage address. By reusing storage addresses for duplicate arrays, the storage space occupied by the data is significantly reduced.

[0008] Optionally, the step of processing the first integer array to determine the first array and the second array specifically includes: obtaining the number of bits in the first integer array; and dividing the first integer array according to the number of bits using an average partitioning rule to obtain the first array and the second array.

[0009] By adopting the above technical solution, the server determines the first and second arrays as follows: First, the server obtains the number of bits in the first integer array. Then, based on the number of bits, the server divides the first integer array using an average partitioning rule, thus obtaining the first and second arrays. Therefore, by obtaining the number of bits, the server can understand the size and length of the arrays, thereby better understanding and analyzing the data. For large-scale datasets, evenly dividing the array into two arrays allows for parallel processing on multiple processing units or threads, improving processing efficiency and computation speed.

[0010] Optionally, determining whether the first array is consistent with the preset array specifically includes: determining the array value of the first array, wherein the first array is binary; determining the array value of the preset array, wherein the preset array is any array in the preset array library, wherein the preset array is binary; and comparing the array value of the first array with the array value of the preset array to determine whether the first array is consistent with the preset array.

[0011] By employing the above technical solution, the server first determines the array values ​​of the first array and simultaneously determines the array values ​​of the preset array. Next, the server compares the array values ​​of the first array and the preset array to determine if they are consistent. Therefore, by comparing and judging the array values, the server can quickly match the preset array, thereby improving server processing efficiency.

[0012] Optionally, before obtaining the first integer array, the method further includes: receiving a data storage request sent by a user equipment, the data storage request including first data; converting the first data into an integer array to obtain a second integer array; and preprocessing the second integer array to obtain the first integer array.

[0013] By adopting the above technical solution, the server receives a data storage request sent by the user device before obtaining the first integer array. Next, the server converts the first data into an integer array to obtain the second integer array. Finally, the server preprocesses the second integer array to obtain the first integer array. Therefore, by converting the first data into an integer array, data format consistency can be ensured, avoiding type mismatches or data format errors in subsequent processing, thereby improving the efficiency and accuracy of subsequent processing.

[0014] Optionally, converting the first data into an integer array to obtain a second integer array specifically includes: converting the first data into decimal to obtain decimal integer data; and converting the decimal integer data into an array to obtain the second integer array.

[0015] By adopting the above technical solution, the specific process by which the server obtains the second integer array from the first data is as follows: The server first converts the first data to decimal to obtain decimal integer data. Next, the server converts the decimal integer data into an array to obtain the second integer array. Thus, converting decimal to integer data removes the decimal part, making the data more accurate. Converting the integer data into an array allows for accessing and modifying data by index, enabling better data management and manipulation, thereby better meeting specific data processing needs.

[0016] Optionally, the step of preprocessing the second integer array to obtain the first integer array specifically includes: sorting the elements in the second integer array according to a preset method to obtain the first integer array, wherein the preset method is a monotonically increasing method.

[0017] By adopting the above technical solution, the server preprocesses the second integer array to obtain the first integer array in the following way: the server sorts the elements in the second integer array in a monotonically increasing order, thus obtaining the first integer array. Therefore, sorting the array allows for faster search operations, improving search efficiency, facilitating data analysis and algorithm optimization, and simplifying subsequent operations.

[0018] Optionally, a data read request sent by the user equipment is received, the data read request being a read request for the first data, the data read request including an index bit; based on the index bit, the first array and the second array are determined from a preset storage address, the preset storage address including the preset first storage address and the preset second storage address; the first array and the second array are added in binary to obtain the first data.

[0019] By employing the above technical solution, after storing the first data, the server will receive read requests for that first data from the user device. Next, based on the index bits in the read request, the server can determine the first and second arrays from a preset storage address. Finally, the server performs a binary addition operation on the first and second arrays to obtain the first data. Therefore, the server can quickly retrieve the first data by performing a binary addition operation on the two arrays, without traversing the entire array or performing other complex calculations, thus greatly improving the speed and efficiency of data reading.

[0020] A second aspect of this application provides a data storage device, which is a server. The server includes an acquisition module and a processing module. The acquisition module is used to acquire a first integer array, which is an ordered integer array. The processing module is used to process the first integer array to determine a first array and a second array. The processing module is also used to determine whether the first array is consistent with a preset array. If the first array is consistent with the preset array, the processing module is also used to store the first array to a preset first storage address. The processing module is also used to store the second array to a preset second storage address.

[0021] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface. The memory is used to store instructions, and both the user interface and the network interface are used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method described above.

[0022] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed, perform the method described above.

[0023] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0024] 1. The server processes the extremely large integer array, dividing it into a first array and a second array. It then checks if the first array matches a preset array. If they match, the server reuses the preset first storage address, while the second array is stored at the preset second storage address. By reusing storage addresses for duplicate arrays, the server significantly reduces the storage space occupied by the data.

[0025] 2. The specific process by which the server obtains the second integer array from the first data is as follows: First, the server converts the first data to decimal to obtain decimal integer data. Next, the server converts the decimal integer data into an array to obtain the second integer array. Thus, converting decimal to integer data removes the decimal part, making the data more accurate. Converting the integer data into an array allows for accessing and modifying data by index, enabling better data management and manipulation, thereby better meeting specific data processing needs.

[0026] 3. After storing the first data, the server will receive read requests for that first data from the user device. Next, based on the index bits in the read request, the server can determine the first and second arrays from a preset storage address. Finally, the server performs a binary addition operation on the first and second arrays to obtain the first data. Therefore, by quickly retrieving the first data through binary addition of the two arrays, the server can significantly improve the speed and efficiency of data retrieval without traversing the entire array or performing other complex calculations. Attached Figure Description

[0027] Figure 1 A flowchart illustrating a data storage method provided in an embodiment of this application;

[0028] Figure 2 This is a schematic diagram illustrating an example of a data storage method provided in an embodiment of this application;

[0029] Figure 3 A schematic diagram of a data storage device provided in an embodiment of this application;

[0030] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0031] Explanation of reference numerals in the attached figures: 31. Acquisition module; 32. Processing module; 41. Processor; 42. Communication bus; 43. User interface; 44. Network interface; 45. Memory. Detailed Implementation

[0032] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0033] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0034] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0035] Before introducing the embodiments of this application, some terms involved in the embodiments of this application will be defined and explained.

[0036] Integer data: This is a numeric type containing 4 bytes and 32 bits for representation. The unsigned maximum and minimum values ​​range from [0, 2]. 32 -1].

[0037] Integer array: is a linked storage method for integer data.

[0038] Binary array: is a linked storage method for binary data.

[0039] An array is an ordered sequence of elements. If a collection of a finite number of values ​​of the same type is named, then that name is the array name. The individual values ​​that make up an array are called array components, also known as array elements, and sometimes as index variables. The numerical identifier used to distinguish each element of the array is called its index. In programming, an array is a way to organize several elements of the same type in an ordered manner for ease of processing. This collection of ordered, similar data elements is called an ordered array.

[0040] For example, given a string of data to be stored as 123456, converting the data into an integer array yields the elements of array a[i]: {a[0]=1, a[1]=2, a[2]=3, a[3]=4, a[4]=5, a[5]=6}. Here, array a[i] represents the i-th element of the array, and i also represents the index of array a[i]. For instance, a[0] represents the element at index 0 of array a[i]. Array a[0]=1 means that the value of the 0th element of array a[i] is 1.

[0041] In word association systems, the underlying data structure typically uses extremely large integer arrays to represent extremely large integers. An extremely large integer array refers to an array whose elements are of extremely large integer type (usually integers whose range exceeds the limits of regular integer types). Extremely large integers generally refer to integers that cannot be represented using standard integer data types (such as int or long), for example, integers exceeding 32 or 64 bits.

[0042] Currently, with the continuous increase in patent data and enterprise data, the number of ultra-large integer arrays used by the keyword association system is also increasing. This means that more and more ultra-large integer arrays will be used to store keyword association data, resulting in an ever-growing amount of storage space occupied by the data.

[0043] To address the aforementioned technical problems, this application provides a data storage method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a data storage method provided in an embodiment of this application. The data storage method is applied to a server and includes steps S110 to S150, as follows:

[0044] S110. Obtain the first integer array, which is an ordered integer array.

[0045] Specifically, when the server performs a storage task, it first obtains a first integer array. The server can obtain this array in several ways: First, the client can encapsulate the data to be stored into a message and send it to a message queue. The server can listen to the message queue and receive the message, thus obtaining the integer array. Alternatively, the client can write the integer array to a file and upload the file to the server. The server can then retrieve the integer array by reading the file. Another option is for the client to send a request using the HTTP protocol, passing the integer array as a parameter to the server. The server can then parse the request parameters to obtain the integer array. The server manages the data to be stored and retrieved, providing backend services. This server can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. Secondly, the data to be stored can be related keyword data, such as patent data or enterprise data; no specific limitations are specified here.

[0046] S120. Process the first integer array to determine the first array and the second array.

[0047] Specifically, after the server obtains the first integer array, it will process the first integer array to determine the first array and the second array. The position of the first array is the high-order bit, and the position of the second array is the low-order bit.

[0048] In one possible implementation, the first integer array is processed to determine the first array and the second array, specifically including: obtaining the number of bits in the first integer array; and dividing the first integer array according to the number of bits using an average partitioning rule to obtain the first array and the second array.

[0049] Specifically, the server determines the first and second arrays as follows: First, the server obtains the number of bits in the first integer array. Then, based on the number of bits, the server uses an average partitioning rule to divide the first integer array, thus obtaining the first and second arrays. The average partitioning rule refers to binary partitioning, that is, converting the first integer array into a binary array and then partitioning it equally, resulting in a first and second array, both of which are binary arrays. For example, the first integer array after binary processing is [0000000000000001 0000000000000000], which is a binary, 4-byte, 32-bit integer array. After average partitioning, the first array becomes [0000000000000001], and the second array becomes [00000000000000000]. That is, both the first and second arrays are now binary, 2-byte, 16-bit integer arrays. It should be noted that this technical solution is also applicable to integer arrays of 64 bits and above, which will not be elaborated here.

[0050] S130. Determine whether the first array is consistent with the preset array.

[0051] Specifically, after obtaining the first array and the second array, the server compares the first array with a preset array to determine if they are completely identical. The preset array is any one of multiple arrays already stored at a corresponding storage address. The reason for checking the first array is that, in very large integer arrays, the probability of the high-order byte arrays represented by the first array being the same is relatively high. Therefore, by comparing the consistency of the first array with the stored arrays, it can be determined whether their high-order byte arrays are consistent, so that the high-order byte array can be reused subsequently if they are consistent.

[0052] In one possible implementation, determining whether the first array is consistent with the preset array specifically includes: determining the array value of the first array, wherein the first array is binary; determining the array value of the preset array, wherein the preset array is any array in the preset array library, and the preset array is binary; and comparing the array value of the first array with the array value of the preset array to determine whether the first array is consistent with the preset array.

[0053] Specifically, the essence of the server's determination of whether the first array is consistent with the preset array is to determine whether the array value corresponding to the first array is consistent with the array value corresponding to the preset array. Here, the array value refers to the integer value represented by the binary integer array.

[0054] For example, the integer corresponding to the array [0000000000000001 0000000000000000] is 65535. After being divided into equal parts, the first array [0000000000000001] is obtained, and the value of the first array is 1. The second array [00000000000000000] is obtained after being divided into equal parts, and the value of the second array is 0.

[0055] S140. If the first array is the same as the preset array, then the first array is stored in the preset first storage address.

[0056] S150. Store the second array to the preset second storage address.

[0057] Specifically, when the server confirms that the first array matches the preset array, it stores the first array at a preset first storage address. At this point, the storage address corresponding to the preset array is the preset first storage address. This achieves the reuse of high-order bytes, thus saving half the storage space. Finally, the server stores the second array at a preset second storage address. In summary, the server significantly reduces the storage space occupied by the data while ensuring complete data storage.

[0058] Reference Figure 2 , Figure 2 This is an example diagram illustrating a data storage method provided in an embodiment of this application. Each small cell to the left of the dividing line represents a different array value, i.e., the array value of the first array; each small cell to the right of the dividing line also represents a different array value, i.e., the array value of the second array. It should be noted that when the first array is [0000000000000001], it will be stored in the cell numbered 1; when the second array is [00000000000000000], it will be stored in the cell numbered 0. * Within the grid. The asterisk (*) serves only as a dividing line to distinguish the values ​​to the left and right. Furthermore, the first array is a one-dimensional array, and the second array is a two-dimensional array, i.e., in... Figure 2 In the example diagram shown, the first array will be stored from number 0 to number X from top to bottom. The second array will be stored starting with number 0 in the first row. * Up to number X * Store it, then use the number 0 in the second row. * Up to number X * Store it. Secondly, X and X...* The corresponding value is less than or equal to 65535.

[0059] In one possible implementation, before obtaining the first integer array, the method further includes: receiving a data storage request sent by a user equipment, the data storage request including first data; converting the first data into an integer array to obtain a second integer array; and preprocessing the second integer array to obtain the first integer array.

[0060] Specifically, before obtaining the first integer array, the server first receives a data storage request sent by the user device. Then, it converts the first data in the data storage request into an integer array by chaining multiple sub-data items within the first data to obtain the second integer array. Finally, the server preprocesses the second integer array to obtain the first integer array. The user corresponding to the user device can be either a server administrator or a client user. The server can communicate with the user device via wired or wireless networks. Types of user devices include, but are not limited to: Android devices, Apple's iOS devices, personal computers (PCs), World Wide Web (WWW) devices, Virtual Reality (VR) devices, and Augmented Reality (AR) devices.

[0061] In one possible implementation, the first data is converted into an integer array to obtain a second integer array, specifically including: converting the first data into decimal to obtain decimal integer data; and converting the decimal integer data into an array to obtain a second integer array.

[0062] Specifically, the server determines the second integer array as follows: First, the first data is converted to decimal. This is because the data to be stored on the server is not always decimal integers; it can also include string data, binary data, or octal data. However, an array can only store data of the same type, so all data to be stored must be uniformly converted to one type, for example, converting all data to decimal integers. Alternatively, the data to be stored can be converted to other types, such as binary data. The specific data type converted to the stored data is not specifically limited in this embodiment. The second integer array can be either an unordered integer array or an ordered integer array. In this embodiment, "unordered" can be understood as meaning that the elements in the array do not have a fixed ascending or descending order.

[0063] In one possible implementation, the second integer array is preprocessed to obtain the first integer array, specifically including: sorting the elements in the second integer array according to a preset method to obtain the first integer array, wherein the preset method is a monotonically increasing method.

[0064] Specifically, the server sorts the elements in the second integer array in a monotonically increasing order, resulting in a sorted integer array for the first integer array. For example, given an integer array [2,1,8,6], after sorting the elements in a monotonically increasing order, the sorted integer array becomes [1,1,6,8].

[0065] In one possible implementation, a data read request sent by a user equipment is received. The data read request is a read request for first data and includes an index bit. Based on the index bit, a first array and a second array are determined from a preset storage address. The preset storage address includes a preset first storage address and a preset second storage address. The first array and the second array are added together in binary to obtain the first data.

[0066] Specifically, after storing the first data, the server needs to use it. At this time, the server will receive a data read request from the user device. Based on the index bit in the data read request, the server reads the first array from a preset first storage address and the second array from a preset second storage address. Next, the server performs a binary addition operation between the array values ​​of the first array and the second array. For example, if the array value corresponding to the first array is 'a' and the array value corresponding to the second array is 'b', the specific operation is as follows: the server performs a binary operation on 'a', that is, right-shifts it by 16 bits to obtain 'c', where 'c' is the array value after the right shift. Then, it adds 'b' and 'c' to obtain the first data. In the array, each element is assigned a unique index value, starting from zero and incrementing sequentially to correspond to the position of each element. For example, the index bit of the first element is 0, the index bit of the second element is 1, and so on. By using the index bits, the server can quickly access the elements in the array and read or modify their values. In this embodiment, the index bit is determined by the input parameters.

[0067] This application also provides a data storage device, as shown in the reference. Figure 3 , Figure 3This is a schematic diagram of a data storage device provided in an embodiment of this application. The data storage device is a server, which includes an acquisition module 31 and a processing module 32. The acquisition module 31 is used to acquire a first integer array, which is an ordered integer array. The processing module 32 is used to process the first integer array to determine a first array and a second array. The processing module 32 is also used to determine whether the first array is consistent with a preset array. If the first array is consistent with the preset array, the processing module 32 is also used to store the first array to a preset first storage address. The processing module 32 is also used to store the second array to a preset second storage address.

[0068] In one possible implementation, the processing module 32 processes the first integer array to determine the first array and the second array, specifically including: the acquisition module 31 acquiring the number of bits in the first integer array; and the processing module 32 dividing the first integer array according to the number of bits using an average partitioning rule to obtain the first array and the second array.

[0069] In one possible implementation, determining whether the first array is consistent with the preset array specifically includes: the processing module 32 determining the array value of the first array, which is binary; the processing module 32 determining the array value of the preset array, which is any array in the preset array library, and is binary; and the processing module 32 comparing the array value of the first array with the array value of the preset array to determine whether the first array is consistent with the preset array.

[0070] In one possible implementation, before the acquisition module 31 acquires the first integer array, the method further includes: the acquisition module 31 receiving a data storage request sent by the user equipment, the data storage request including first data; the processing module 32 converting the first data into an integer array to obtain a second integer array; and the processing module 32 preprocessing the second integer array to obtain the first integer array.

[0071] In one possible implementation, the first data is converted into an integer array to obtain a second integer array, specifically including: the processing module 32 performs a decimal conversion on the first data to obtain decimal integer data; the processing module 32 performs an array conversion on the decimal integer data to obtain a second integer array.

[0072] In one possible implementation, the processing module 32 preprocesses the second integer array to obtain the first integer array, specifically including: the processing module 32 sorts the elements in the second integer array according to a preset method to obtain the first integer array, the preset method being a monotonically increasing method.

[0073] In one possible implementation, the acquisition module 31 receives a data read request sent by the user equipment. The data read request is a read request for first data and includes an index bit. The processing module 32 determines a first array and a second array from a preset storage address based on the index bit. The preset storage address includes a preset first storage address and a preset second storage address. The processing module 32 performs a binary addition operation on the first array and the second array to obtain the first data.

[0074] This application also provides an electronic device, with reference to... Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: at least one processor 41, at least one network interface 44, a user interface 43, a memory 45, and at least one communication bus 42.

[0075] The communication bus 42 is used to enable communication between these components.

[0076] The user interface 43 may include a display screen and a camera. Optionally, the user interface 43 may also include a standard wired interface and a wireless interface.

[0077] Among them, the network interface 44 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0078] The processor 41 may include one or more processing cores. The processor 41 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 45, and by calling data stored in the memory 45. Optionally, the processor 41 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 41 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 41 and may be implemented as a separate chip.

[0079] The memory 45 may include random access memory (RAM) or read-only memory. Optionally, the memory 45 may include a non-transitory computer-readable storage medium. The memory 45 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 45 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 45 may also be at least one storage device located remotely from the aforementioned processor 41. Figure 4 As shown, the memory 45, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a data storage method.

[0080] exist Figure 4 In the electronic device shown, the user interface 43 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 41 can be used to call an application program that stores a data storage method in the memory 45. When executed by one or more processors, the electronic device executes one or more methods as described in the above embodiments.

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

[0082] This application also provides a computer-readable storage medium storing instructions. When executed by one or more processors, these instructions cause an electronic device to perform one or more of the methods described in the above embodiments.

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

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

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

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

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

[0088] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truth. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A data storage method, characterized in that, Applied to a server, the data storage method includes: S110. Obtain the first integer array, where the first integer array is an ordered integer array; S120. Process the first integer array to determine the first array and the second array; S130. Determine whether the first array is consistent with the preset array, wherein the first array is a high-order array, and the preset array is any one of the multiple arrays that have been stored at the corresponding storage address; S140. If the first array is consistent with the preset array, the first array is stored in a preset first storage address to reuse the high-order array, wherein the first storage address is the storage address corresponding to the preset array. S150. Store the second array to a preset second storage address; Prior to step S110, the data storage method further includes: receiving a data storage request sent by a user equipment, the data storage request including first data; converting the first data into an integer array to obtain a second integer array; and preprocessing the second integer array to obtain the first integer array. Wherein, after step S150, the data storage method further includes: receiving a data read request sent by the user equipment, the data read request being a read request for the first data, the data read request including an index bit; determining the first array and the second array from a preset storage address based on the index bit, the preset storage address including the preset first storage address and the preset second storage address; and performing a binary addition operation on the first array and the second array to obtain the first data.

2. The data storage method according to claim 1, characterized in that, Step S120 includes: Get the number of bits in the first integer array; Based on the number of bits, the first integer array is divided using an average splitting rule to obtain the first array and the second array.

3. The data storage method according to claim 1, characterized in that, Step S130 includes: Determine the array values ​​of the first array, where the first array is in binary; Determine the array value of the preset array, wherein the preset array is any array in the preset array library, and the preset array is binary; The array values ​​of the first array are compared with the array values ​​of the preset array to determine whether the first array and the preset array are consistent.

4. The data storage method according to claim 1, characterized in that, The step of converting the first data into an integer array to obtain a second integer array specifically includes: The first data is converted to decimal to obtain decimal integer data; The decimal integer data is converted into an array to obtain the second integer array.

5. The data storage method according to claim 1, characterized in that, The preprocessing of the second integer array to obtain the first integer array specifically includes: The elements in the second integer array are sorted according to a preset method to obtain the first integer array, wherein the preset method is a monotonically increasing method.

6. A data storage device, characterized in that, The data storage device is a server, which includes an acquisition module (31) and a processing module (32), wherein: The acquisition module (31) is used to acquire a first integer array, wherein the first integer array is an ordered integer array; The acquisition module (31) is further configured to receive a data storage request sent by a user equipment, the data storage request including first data; the processing module (32) is configured to convert the first data into an integer array to obtain a second integer array; the processing module (32) is further configured to preprocess the second integer array to obtain the first integer array; The processing module (32) is used to process the first integer array to determine the first array and the second array; The processing module (32) is also used to determine whether the first array is consistent with the preset array, wherein the first array is a high-order array and the preset array is any one of the multiple arrays that have been stored at the corresponding storage address; The processing module (32) is further configured to store the first array to a preset first storage address if the first array is consistent with the preset array, so as to reuse the high-order array, wherein the first storage address is the storage address corresponding to the preset array; The processing module (32) is also used to store the second array to a preset second storage address; The acquisition module (31) is further configured to receive a data reading request sent by the user equipment, the data reading request being a reading request for the first data, the data reading request including an index bit; the processing module (32) is further configured to determine the first array and the second array from a preset storage address based on the index bit, the preset storage address including the preset first storage address and the preset second storage address; the processing module (32) is further configured to perform a binary addition operation on the first array and the second array to obtain the first data.

7. An electronic device, characterized in that, The electronic device includes a processor (41), a memory (45), a user interface (43), and a network interface (44). The memory (45) is used to store instructions. The user interface (43) and the network interface (44) are both used to communicate with other devices. The processor (41) is used to execute the instructions stored in the memory (45) to cause the electronic device to perform the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Financial named entity identification method and system, storage medium and terminal

    CN113642331A