An ES engine-based data storage method, device and electronic equipment
By establishing a mapping between data and enumeration values within the Elasticsearch engine, the problem of low efficiency when storing large-scale data in the Elasticsearch engine is solved, enabling fast storage and efficient querying, and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-22
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies suffer from low storage efficiency when using the Elasticsearch engine to store data, especially for large-scale data storage, mainly due to the excessive time required for full indexing operations.
By constructing a correspondence between the data to be stored and the enumerated values, and storing it in the enumeration relationship table, the full index operation is avoided, and the enumeration relationship table is used for data storage.
It accelerates data storage speed, improves storage efficiency, ensures the stability and security of data processing, simplifies computing operations, and reduces storage costs.
Smart Images

Figure CN116932576B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a data storage method and device based on an ES engine and electronic equipment. BACKGROUND
[0002] With the progress of society and the development of technology, more and more storage technologies are applied to the field of data storage. Elasticsearch (ES, search engine) is a distributed search engine, which is usually used for storing and querying a large amount of data.
[0003] At present, when a user stores data by using an ES engine, for example, stores patent data or enterprise data, the user can input corresponding to-be-stored data information, so as to realize self-defined classification of different patent data or enterprise data. However, because the volume of the to-be-stored data information is large, the ES engine needs to continuously perform full-index operation, which leads to too long storage time and low data storage efficiency.
[0004] Therefore, there is an urgent need for a data storage method and device based on an ES engine and electronic equipment. SUMMARY
[0005] The present application provides a data storage method and device based on an ES engine and electronic equipment, which facilitates to improve the efficiency of data storage.
[0006] In a first aspect of the present application, a data storage method based on an ES engine is provided, applied to a server, and the method comprises the following steps: receiving a data storage request sent by a user equipment, wherein the data storage request comprises to-be-stored data information; constructing a first correspondence relationship between the to-be-stored data information and an enumeration value; storing the first correspondence relationship into an enumeration relationship table, so that the ES engine stores the to-be-stored data information through the enumeration relationship table.
[0007] By adopting the above technical solution, the server first receives a data storage request sent by a user equipment, and then constructs a first correspondence relationship between to-be-stored data information and an enumeration value according to the to-be-stored data information in the data storage request. Finally, the server stores the first correspondence relationship into an enumeration relationship table, so that the ES engine stores the to-be-stored data information through the enumeration relationship table. Thus, the server stores the to-be-stored data information and the correspondence relationship between the to-be-stored data information and the enumeration value through the enumeration relationship table, compared with related technologies, no full-index operation is needed, so as to speed up the data storage and facilitate to improve the efficiency of data storage.
[0008] Optionally, after receiving the data storage request sent by the user equipment, the method further comprises: processing the to-be-stored data information to obtain a first field; obtaining a first array according to the first field, wherein the first field comprises at least one array, and the first array is any one of the at least one array.
[0009] By adopting the above technical solution, after receiving the data storage request sent by the user equipment, the server will process the to-be-stored data information to obtain a first field. Next, the server obtains a first array according to the first field, and the first field comprises at least one array. Thus, by decomposing the to-be-stored data information into fields, the server can more effectively organize and process data, increasing the flexibility and scalability of processing to-be-stored data information. And decomposing data into fields and arrays facilitates more efficient subsequent data retrieval and query.
[0010] Optionally, after obtaining the first array according to the first field, the method further comprises: determining an array type of the first array; obtaining a first element according to the array type, wherein the first array comprises a plurality of elements, and the first element is any one of the plurality of elements.
[0011] By adopting the above technical solution, after obtaining the first array according to the first field, the server will determine the array type of the first array. Next, the server will obtain a first element according to the array type. Thus, by understanding the array type, the server can help ensure that no type errors occur when processing and operating data, thereby improving the stability and security of data storage. And determining the array type and extracting elements according to the type can more efficiently process, access and operate data in the array.
[0012] Optionally, the method of constructing the first correspondence between the to-be-stored data information and the enumeration value comprises: obtaining a first enumeration value, wherein the first enumeration value is any one of the plurality of enumeration values; and constructing a first correspondence between the first element and the first enumeration value.
[0013] By adopting the above technical solution, the specific process of the server constructing the to-be-stored data information is as follows: the server will first obtain a first enumeration value, and then construct a correspondence between the first element and the first enumeration value. Thus, by constructing the correspondence between the first element and the first enumeration value, the server can help ensure the consistency of data during processing and storage, reduce the probability of errors, and improve the efficiency of data storage. Using enumeration values can detect potential errors at compile time, thereby improving the stability and security of data storage. By constructing the correspondence between the element and the enumeration value, it is more convenient to add new functions or maintain in the future.
[0014] Optionally, the plurality of elements further comprises a second element, the second element being any one element in the plurality of elements except the first element, the first element and the second element being the same type of element.
[0015] By adopting the above technical solution, when the first element and the second element are the same type of element, the data processing and operation can be simplified, and the server can uniformly use the same method and logic to process these elements, thereby improving the processing efficiency of the server, reducing the risk of type errors, and improving the stability and security of data storage.
[0016] Optionally, the data update request sent by the user equipment is received, the data update request being a request for updating a target element; the target element is updated according to the data update request to obtain a third element, the third element being an updated element; a target enumeration value corresponding to the target element is determined according to the enumeration relationship table, the enumeration relationship table storing a correspondence between the target element and the target enumeration value; a second correspondence between the third element and the target enumeration value is constructed; and the second correspondence is stored in the enumeration relationship table.
[0017] By adopting the above technical solution, the server first receives the data update request sent by the user equipment, and then updates the target element according to the data update request to obtain the third element. Next, the server determines the target enumeration value corresponding to the target element according to the correspondence in the enumeration relationship table. Finally, the server constructs the second correspondence between the third element and the target enumeration value, and stores the second correspondence in the enumeration relationship table. In this way, the server can receive the data update request sent by the user equipment, ensure that the target element and the correspondence are updated in time, conveniently manage and track the association between different elements, and ensure that the data remains consistent during the update process, so that the user can view and use the latest data. In addition, the user can update the target element in real time by sending a data update request, thereby improving the user experience when using the system.
[0018] Optionally, the plurality of enumeration values are all integer values, and are stored in a monotonically increasing manner.
[0019] By adopting the above technical solution, the server stores the enumeration values as integer values, which can simplify the calculation and comparison operations and improve the processing speed. Moreover, storing the enumeration values in a monotonically increasing order helps to sort and retrieve the data, thereby improving the query efficiency. In addition, integer values usually occupy less storage space than other data types, which helps to reduce the data storage cost and improve the data storage efficiency.
[0020] In a second aspect of the present application, a data storage device based on an ES engine is provided, the data storage device being a server, the server comprising a receiving module and a processing module, wherein the receiving module is configured to receive a data storage request sent by a user equipment, the data storage request comprising to-be-stored data information; the processing module is configured to construct a first correspondence between the to-be-stored data information and an enumeration value; and the processing module is further configured to store the first correspondence into an enumeration relationship table, so that the ES engine stores the to-be-stored data information through the enumeration relationship table.
[0021] In a third aspect of the present application, an electronic device is provided, the electronic device comprising a processor, a memory, a user interface and a network interface, the memory being configured to store instructions, the user interface and the network interface both being configured to communicate with other devices, and the processor being configured to execute the instructions stored in the memory, so that the electronic device performs the method as described above.
[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium storing instructions, when the instructions are executed, performing the method as described above.
[0023] In summary, the one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0024] 1. The server constructs a first correspondence between the to-be-stored data information and an enumeration value according to the to-be-stored data information in the data storage request, and stores the first correspondence into an enumeration relationship table, so that the ES engine stores the to-be-stored data information through the enumeration relationship table. Thus, the server stores the to-be-stored data information and the correspondence between the to-be-stored data information and the enumeration value through the enumeration relationship table, compared with the related art, no full index operation is needed, thereby speeding up the data storage and facilitating to improve the efficiency of data storage.
[0025] 2. The server helps to ensure that no type error occurs when processing and operating data by understanding the array type, thereby improving the stability and security of data storage. And determining the array type and extracting elements according to the type can more efficiently process, access and operate the data in the array.
[0026] 3. The server stores the enumeration value as an integer value, which can simplify the calculation and comparison operations and improve the processing speed. Moreover, storing the enumeration value in a monotonically increasing order helps to sort and retrieve the data, thereby improving the query efficiency. In addition, the integer value usually occupies less storage space than other data types, which helps to reduce the data storage cost and improve the data storage efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 A flowchart of a data storage method based on an ES engine provided by an embodiment of the present application.
[0028] Figure 2 An example schematic diagram of a data storage method based on an ES engine provided by an embodiment of the present application.
[0029] Figure 3 A module schematic diagram of a data storage device based on an ES engine provided by an embodiment of the present application.
[0030] Figure 4 A structural schematic diagram of an electronic device provided by an embodiment of the present application.
[0031] Legend: 31, receiving module; 32, processing module; 41, processor; 42, communication bus; 43, user interface; 44, network interface; 45, memory. DETAILED DESCRIPTION
[0032] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be clearly and completely described below in conjunction with the drawings in the embodiments of the specification. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments.
[0033] In the description of the embodiments of the present application, the words such as "for example" or "for instance" are used to represent an example, illustration or description. Any embodiment or design scheme described as "for example" or "for instance" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words such as "for example" or "for instance" are intended to present the relevant concept in a specific manner.
[0034] In the description of the embodiments of the present application, the term "a plurality of" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first" and "second" are used for description purposes only, and should not be interpreted as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "contain", "have" and their variants mean "include but are not limited to", unless otherwise specifically emphasized.
[0035] Before introducing the embodiments of the present application, first, some terms involved in the embodiments of the present application are defined and explained.
[0036] ES engine: refers to the Elasticsearch engine, which is a distributed search and analysis engine. The Elasticsearch engine is mainly used to process large amounts of data, providing real-time search, analysis, and visualization functions. It is widely used in various scenarios such as log analysis, full-text search, and big data analysis.
[0037] With the progress of society and the development of technology, various new storage technologies have emerged in the field of data storage to meet the needs of data processing in different scenarios. The ES engine, as a distributed search engine, is particularly suitable for processing large amounts of data storage, retrieval, and real-time analysis. Whether it is patent data, enterprise data, or other types of data, efficient management and retrieval can be achieved in the ES engine.
[0038] Currently, when using the ES engine to store data, users can input the corresponding data information according to the characteristics and needs of the data, and realize custom classification and grouping of different types of patent data, enterprise data, etc. For example, when using some patent systems or platforms, users can add patent literature data of interest to their private workspace and perform patent classification operations. For example, users can divide them into communication, mechanical, and biomedical fields according to the technical field of the patent. This helps users quickly find and access the required data in subsequent operations.
[0039] When the user wants to name the classification names of "communication, mechanical, and biomedical fields", the server needs to store the named content. However, in actual application, the volume of data information stored is often very large, especially when full-text indexing operations are involved, the ES engine may need to consume a large amount of time for data processing and index construction. This not only leads to long storage time, but also makes the data storage efficiency low.
[0040] To solve the above technical problems, the present application provides a data storage method based on an ES engine, referring to Figure 1 , Figure 1 A flowchart of a data storage method based on an ES engine provided by an embodiment of the present application. The data storage method is applied to a server and includes steps S110 to S130, as follows:
[0041] S110, receiving a data storage request sent by a user device, the data storage request including to-be-stored data information.
[0042] Specifically, when a user classifies patent data and / or enterprise data through a patent system or platform installed on a user device, and the user customizes the classification name through the user device, the server will receive a data storage request sent by the user device, wherein the data storage request includes to-be-stored data information, and the to-be-stored data information includes a user-defined field of a user name and patent data and / or enterprise data indexed after the user-defined field. For example, the to-be-stored data information can be "interest", and the fields included in "interest" can be "interest A", "interest B", and "interest C".
[0043] The server is a server for managing to-be-stored data information and is configured to provide a background service. The server can be a single server, a server cluster composed of multiple servers, or a cloud computing service center. The user corresponding to the user device can be a server administrator or a user of a corresponding patent system, platform, or client. The server can communicate with the user device through a wired or wireless network. The user device can be, but is not limited to, an Android system device, an iOS device developed by Apple, a personal computer (PC), a World Wide Web (web) device, a Virtual Reality (VR) device, an Augmented Reality (AR) device, and the like. In the embodiments of the present application, the user device is a computer.
[0044] S120, a first correspondence between the to-be-stored data information and the enumerated value is constructed.
[0045] Specifically, after receiving the data storage request sent by the user device, the server constructs a first correspondence between the to-be-stored data information and the enumerated value. The enumerated value refers to a special data type in computer programming, which allows a set of related constants to be assigned meaningful names. For example, the server can set the enumerated value to be numbers 1, 2, and 3, or set the enumerated value to be one, two, and three.
[0046] In a possible implementation, the plurality of enumerated values are all integer values, and are stored in a monotonically increasing manner.
[0047] Specifically, the server stores the enumerated value as an integer value, which can simplify the calculation and comparison operations and improve the processing speed. In addition, storing the enumerated value in a monotonically increasing order helps to sort and retrieve data, thereby improving the query efficiency. Furthermore, integer values usually occupy less storage space than other data types, which helps to reduce data storage costs and improve data storage efficiency. For example, the enumerated value in the embodiments of the present application is "1, 2, and 3".
[0048] S130, store the first correspondence relationship into the enumeration relationship table, so that the ES engine stores the to-be-stored data information through the enumeration relationship table.
[0049] Specifically, the server stores the first correspondence relationship into the enumeration relationship table after constructing the first correspondence relationship, thereby further generating the enumeration relationship table. In this way, the server stores the to-be-stored data information and the correspondence relationship between the to-be-stored data information and the enumeration value through the enumeration relationship table, and does not need to perform full-index operation compared with the related art, thereby accelerating the data storage speed and facilitating the improvement of the data storage efficiency. The enumeration relationship table can be implemented by using the MYSQL database of the ES engine, which will not be described herein.
[0050] In a possible implementation, after receiving the data storage request sent by the user equipment, the method further includes: processing the to-be-stored data information to obtain a first field; obtaining a first array according to the first field, the first field including at least one array, and the first array being any one of the at least one array.
[0051] Specifically, after receiving the data storage request sent by the user equipment, the server processes the received content to obtain a first field. Next, the server obtains a first array according to the first field. The extraction process of the data information to the first field can adopt natural language processing, that is, the feature extraction is obtained, and further, the effective information in the data information input by the user can be obtained through similarity calculation. For example, the first field can be "A file belongs to the communication field; B file belongs to the mechanical field; C file belongs to the biological medicine field", and the multiple arrays are "A file", "B file", "C file", "belongs" and the like, and the first array is "communication field, mechanical field, biological medicine field".
[0052] In a possible implementation, after obtaining the first array according to the first field, the method further includes: determining an array type of the first array; obtaining a first element according to the array type, the first array including multiple elements, and the first element being any one of the multiple elements.
[0053] In a possible implementation, the multiple elements further include a second element, the second element being any one of the multiple elements except the first element, and the first element and the second element being elements of the same type.
[0054] Specifically, after the server obtains the first array according to the first field, the server will determine the array type of the first array, wherein the array type includes a string array, an integer array, a literal array composed of literals, etc., but all elements in an array are of the same type. Next, the server determines the first element and the second element according to the array type, and the first element and the second element are of the same type. For example, the first array is "communication field, mechanical field, biological and pharmaceutical field", the first element can be "communication field", and the second element can be "mechanical field" or "biological and pharmaceutical field".
[0055] In a possible implementation, the first correspondence between the data information to be stored and the enumeration value is constructed, specifically including: obtaining a first enumeration value, the first enumeration value being any one of the plurality of enumeration values; and constructing a first correspondence between the first element and the first enumeration value.
[0056] Specifically, the essence of the server constructing the first correspondence between the data information to be stored and the enumeration value is to construct the correspondence between the element and the enumeration value. The server can receive the data update request sent by the user equipment, ensure timely updating of the target element and the corresponding relationship, can conveniently manage and track the association between different elements, and can also ensure consistency of the data in the updating process, so as to enable the user to view and use the latest data. In addition, the user can update the target element in real time by sending a data update request, thereby improving the user experience when using the system.
[0057] For example, referring to Figure 2 , Figure 2 An example schematic diagram of a data storage method based on an ES engine provided by an embodiment of the present application. As Figure 2 shown, the diagram evolves the data storage process. Wherein the first array is "communication field, mechanical field, biological and pharmaceutical field", the first element of the first array is "communication field", the second element is "mechanical field", and the third element is "biological and pharmaceutical field". After the server constructs the correspondence between the element and the enumeration value, the enumeration value corresponding to the first element is 1, the enumeration value corresponding to the second element is 2, and the enumeration value corresponding to the third element is 3. When storing the above-mentioned data information to be stored, the server only needs to store the corresponding enumeration value, and no longer needs to perform full index operation, thereby speeding up the data storage speed and facilitating the improvement of the data storage efficiency.
[0058] In a possible implementation, the server receives a data update request sent by the user equipment, the data update request being a request for updating a target element; updates the target element according to the data update request to obtain a third element, the third element being an updated element; determines a target enumeration value corresponding to the target element according to an enumeration relationship table, the enumeration relationship table storing a correspondence between the target element and the target enumeration value; constructs a second correspondence between the third element and the target enumeration value; and stores the second correspondence into the enumeration relationship table.
[0059] Specifically, the server first receives a data update request sent by the user equipment, and then updates a target element according to the data update request to obtain a third element. Next, the server determines a target enumeration value corresponding to the target element according to the correspondence in the enumeration relationship table. Finally, the server constructs a second correspondence between the third element and the target enumeration value, and stores the second correspondence into the enumeration relationship table. In this way, the server can receive a data update request sent by the user equipment, ensure that the target element and the correspondence are updated in time, conveniently manage and track the association between different elements, and ensure that the data remains consistent during the updating process, so that the user can view and use the latest data. In addition, the user can update the target element in real time by sending a data update request, thereby improving the user experience when using the system.
[0060] For example, after using the custom classification operation, the user wants to change the classification to the soft communication field. At this time, when the target element is the communication field, the third element generated after modification is the soft communication field, so that only the element needs to be updated, and the ES engine does not need to perform full-index operation, thereby facilitating the user to improve the data storage efficiency.
[0061] The application further provides an ES engine-based data storage device, which refers to Figure 3 , Figure 3 A module schematic diagram of an ES engine-based data storage device provided by the embodiment of the application. The data storage device is a server, and the server includes a receiving module 31 and a processing module 32. The receiving module 31 is configured to receive a data storage request sent by the user equipment, the data storage request including to-be-stored data information. The processing module 32 is configured to construct a first correspondence between the to-be-stored data information and an enumeration value. The processing module 32 is further configured to store the first correspondence into an enumeration relationship table, so that the ES engine stores the to-be-stored data information through the enumeration relationship table.
[0062] In a possible implementation, the receiving module 31, after receiving the data storage request sent by the user equipment, further includes: the processing module 32 processes the to-be-stored data information to obtain a first field; and the processing module 32 obtains a first array according to the first field, the first field including at least one array, and the first array being any one of the at least one array.
[0063] In a possible implementation, the processing module 32, after obtaining the first array according to the first field, further includes: the processing module 32 determines an array type of the first array; and the processing module 32 obtains a first element according to the array type, the first array including a plurality of elements, and the first element being any one of the plurality of elements.
[0064] In a possible implementation, the processing module 32 constructs a first correspondence between the to-be-stored data information and the enumeration value, and specifically includes: the receiving module 31 acquires a first enumeration value, the first enumeration value being any one of a plurality of enumeration values; and the processing module 32 constructs a first correspondence between the first element and the first enumeration value.
[0065] In a possible implementation, the plurality of elements further include a second element, the second element being any one of the plurality of elements other than the first element, and the first element and the second element being elements of the same type.
[0066] In a possible implementation, the receiving module 31 receives a data update request sent by the user equipment, the data update request being a request for updating a target element; the processing module 32 updates the target element according to the data update request to obtain a third element, the third element being an updated element; the processing module 32 determines a target enumeration value corresponding to the target element according to an enumeration relationship table, the enumeration relationship table storing a correspondence between the target element and the target enumeration value; the processing module 32 constructs a second correspondence between the third element and the target enumeration value; and the processing module 32 stores the second correspondence into the enumeration relationship table.
[0067] In a possible implementation, the plurality of enumeration values are all integer values and are stored in a monotonically increasing manner.
[0068] The application further provides an electronic device, which refers to Figure 4 , Figure 4 FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the application. The electronic device can 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.
[0069] The communication bus 42 is configured to realize connection and communication between the components.
[0070] The user interface 43 can include a display, a camera, and optionally a standard wired interface and a wireless interface.
[0071] The network interface 44 can optionally include a standard wired interface and a wireless interface (e.g., a WI-FI interface).
[0072] The processor 41 can include one or more processing cores. The processor 41 connects various parts of the server through various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 45, and calling data stored in the memory 45. Optionally, the processor 41 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 41 can be integrated with a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU is mainly used to process an operating system, a user interface, and an application program. The GPU is used to render and draw the content to be displayed on the display. The modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 41, but can be implemented by a separate chip.
[0073] The memory 45 can include a random access memory (RAM) and a read-only memory (ROM). Optionally, the memory 45 includes a non-transitory computer-readable storage medium. The memory 45 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 45 can include a program storage area and a data storage area. The program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 45 can optionally be at least one storage device located away from the above-mentioned processor 41. Figure 4As shown, the memory 45, as a computer storage medium, can include an operating system, a network communication module, a user interface module, and an application program of the ES engine-based data storage method.
[0074] In Figure 4 In the electronic device as shown, the user interface 43 is mainly used to provide an interface for user input, and obtain data input by the user; and the processor 41 can be used to invoke the application program of the ES engine-based data storage method stored in the memory 45, and when executed by one or more processors, make the electronic device execute the method of one or more of the above embodiments.
[0075] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, some steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0076] The present application also provides a computer readable storage medium, which stores instructions. When executed by one or more processors, make the electronic device execute the method of one or more of the above embodiments.
[0077] In the above embodiments, the description of each embodiment is focused on, and the part not described in detail in a certain embodiment can refer to the related description of other embodiments.
[0078] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, and the division of units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some services, devices or units, and can be electrical or other forms.
[0079] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0080] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0081] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The memory where the computer software product is stored includes: a U disk, a mobile hard disk, a magnetic disk or an optical disk, and various other media that can store program codes.
[0082] The above is only exemplary embodiments of the present disclosure, and cannot limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon considering the specification and the practical true disclosure. The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and examples are only considered as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A data storage method based on the ES engine, characterized in that, Applied to a server, the method includes: Receive a data storage request sent by a user equipment, wherein the data storage request includes data information to be stored; The data to be stored is processed to obtain the first field; Based on the first field, a first array is obtained, wherein the first field includes at least one array, and the first array is any one of the at least one arrays; Determine the array type of the first array; Based on the array type, a first element is obtained, wherein the first array includes multiple elements, and the first element is any one of the multiple elements; Construct a first correspondence between the data to be stored and the enumerated values; The first correspondence is stored in the enumeration relationship table so that the ES engine can store the data information to be stored through the enumeration relationship table; The step of constructing the first correspondence between the data information to be stored and the enumerated values includes: Obtain a first enumeration value, wherein the first enumeration value is any one of the plurality of enumeration values; Construct a first correspondence between the first element and the first enumeration value.
2. The data storage method according to claim 1, characterized in that, The plurality of elements further includes a second element, which is any one of the plurality of elements other than the first element, and the first element and the second element are elements of the same type.
3. The data storage method according to claim 1, characterized in that, The method further includes: Receive a data update request sent by the user equipment, wherein the data update request is a request to update the target element; According to the data update request, the target element is updated to obtain a third element, which is the updated element; Based on the enumeration relationship table, the target enumeration value corresponding to the target element is determined, and the enumeration relationship table stores the correspondence between the target element and the target enumeration value; Construct a second correspondence between the third element and the target enumeration value; Store the second correspondence in the enumeration table.
4. The data storage method according to claim 1, characterized in that, All of the enumerated values are integer values and are stored in a monotonically increasing manner.
5. A data storage device based on the ES engine, characterized in that, The data storage device is a server, which includes a receiving module (31) and a processing module (32), wherein: The receiving module (31) is used to receive a data storage request sent by the user equipment, the data storage request including data information to be stored; The processing module (32) is used to process the data information to be stored to obtain a first field; the processing module (32) is also used to obtain a first array based on the first field, the first field including at least one array, the first array being any one of the at least one array, and to determine the array type of the first array; The processing module (32) is further configured to obtain a first element according to the array type, the first array including multiple elements, the first element being any one of the multiple elements; the processing module (32) is further configured to obtain a first enumeration value, the first enumeration value being any one of the multiple enumeration values, and to construct a first correspondence between the first element and the enumeration value. The processing module (32) is further configured to store the first correspondence relationship in an enumeration relationship table, so that the ES engine can store the data information to be stored through the enumeration relationship table.
6. 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 4.
7. 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 4.
Citation Information
Patent Citations
Metadata management method and device and computer readable medium
CN109739893A
Methods and systems for mapping data items to sparse distributed representations
US20190332619A1