A configurable and manageable data storage method, device, and medium
By using a configurable management system based on the MongoDB database model, data storage for different management systems is simplified, data storage efficiency is improved, development and maintenance costs are reduced, and the process of modifying and maintaining fields is simplified.
Patent Information
- Application Number
- CN202310422601.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-04-19
AI Technical Summary
Existing data storage systems under different data configuration management systems are difficult to implement in a simple and fast manner. The cost of modifying and maintaining field data is high, and the management of different data is complex, which reduces the efficiency of data storage.
The system adopts a MongoDB-based database model to classify the storage collections of the configurable management system into configuration information storage collections and business data storage collections. A one-to-many relationship is formed through application collections and field collections. Data is stored using the business collection names in the application collections, which simplifies the development and maintenance of the management system.
It improves data storage efficiency, reduces unnecessary development work, makes field modification and maintenance more flexible, and facilitates separate data management and statistics for different management systems.
Smart Images

Figure CN116431643B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data storage, and more particularly to a configurable and manageable data storage method, device, and medium. Background Technology
[0002] In internet systems, management systems are widely used, such as personnel management, product management, and parking management. Since these management systems generally have similar functions—adding, editing, deleting, and list searching—dynamic and configurable management systems reduce unnecessary development work and improve efficiency.
[0003] Because dynamically configured management systems manage different objects with varying field attributes, using relational databases to store data complicates table structure modification and maintenance. For different management systems requiring different fields, it's difficult to achieve convenient and efficient data storage, and the correspondence between modified stored data can easily become inaccurate, reducing data storage efficiency. Summary of the Invention
[0004] This application provides a configurable and manageable data storage method, device, and medium to solve the following technical problems: existing data storage under different data configuration management systems is difficult to achieve simple and fast storage, the cost of modifying and maintaining field data is high, and the management of different data is complex, which reduces the efficiency of data storage.
[0005] The embodiments of this application adopt the following technical solutions:
[0006] On one hand, embodiments of this application provide a configurable and manageable data storage method, including: classifying the storage sets of a configurable management system based on a MongoDB database model to obtain a configuration information storage set and a business data storage set related to data storage; classifying the data storage sets of the configuration information storage set to obtain an application set and a field set; updating the application set according to a newly added management system to obtain application tag information; updating the field set according to the field data in the newly added management system to obtain field key information; generating business data for the newly added management system using the application tag information and the field key information, and storing the business data in the business set; wherein the business set exists in the business data storage set to realize data storage for different management systems.
[0007] This application embodiment divides the configuration and use of data storage in different management systems into configuration information storage sets and business data storage sets, which facilitates data maintenance and management at different levels. Based on the application codes in the application set and field set, a one-to-many relationship is formed between field documents, making field modification and maintenance more flexible. At the same time, by utilizing the business set name in the application set, business data in different management systems is stored in their respective business sets, which facilitates separate management and statistics of data in different management systems. The data storage of the configurable management system based on the MongoDB database model simplifies the development and maintenance of different management systems, reduces unnecessary development work, and improves data storage efficiency.
[0008] In one feasible implementation, based on the MongoDB database model, the configurable management system is classified into storage sets to obtain a configuration information storage set and a business data storage set related to data storage. Specifically, based on the MongoDB database model, the configurable management system is classified into management data related to the management end and the application end to obtain the configuration information storage set and the business data storage set; wherein, the configuration information storage set is used to configure the stored data, and the business data storage set is used to store the business data corresponding to the configuration information storage set.
[0009] In one feasible implementation, the application set is updated with data based on the newly added management system to obtain application tag information. Specifically, this includes: acquiring multiple document data entries from the newly added management system; inserting and modifying data into the multiple document data entries based on the application set to obtain new document data, and determining the application code, application name, and business set name of the new document data; and identifying and labeling the application code, application name, and business set name to obtain the application tag information.
[0010] In one feasible implementation, the application code, the application name, and the service set name are identified and labeled to obtain the application tag information. Specifically, this includes: separately labeling the application code and determining it as code identification information; wherein the code identification information is associated with field information in the field set; combining the code identification information with a preset fixed prefix to determine service identification information corresponding to the service set name; wherein the service identification information guides the storage of service data in the service data storage set; and wherein the application tag information includes: code identification information and the service identification information.
[0011] In one feasible implementation, the field set is updated based on the newly added field data in the management system to obtain key field information. Specifically, this includes: acquiring multiple segments of field information from the newly added management system; adding and / or editing information in the multiple segments of field information based on the field set to obtain new field information; and extracting the application code, field name, field description, field type, and field value contained in the new field information to determine it as the key field information.
[0012] In one feasible implementation, the application code, field name, field description, field type, and field value contained in the newly added field information are extracted and determined as the key information of the field. Specifically, this includes: determining the application code in the newly added field information as the coding key information; wherein the coding key information and the coding identifier information have a corresponding association relationship; determining the field name as the field key value information; wherein the field key value information is used in the business set; analyzing and comparing the field description to obtain the field meaning information; selecting the field type through a preset text box to obtain field selection information; identifying the field attributes in the field value to obtain field attribute information; wherein the key information of the field includes: the coding key information, the field key value information, the field meaning information, the field selection information, and the field attribute information.
[0013] In one feasible implementation, new business data for the management system is generated using the application tag information and the field key information. Specifically, this includes: matching the coded identifier information in the application tag information with the coded key information in the field key information; if the matching is consistent, matching the field key information in the field set to the business field document corresponding to the business set name based on the business identifier information in the application tag information, thereby obtaining the business data.
[0014] In one feasible implementation, storing the business data in a business set specifically includes: classifying the business data corresponding to the name of the business set to obtain sub-business sets; and storing the sub-business sets in the business set.
[0015] Secondly, embodiments of this application also provide a configurable and manageable data storage device, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to execute a configurable and manageable data storage method as described in any of the above embodiments.
[0016] Thirdly, embodiments of this application also provide a non-volatile computer storage medium, characterized in that the storage medium is a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores at least one program, each program including instructions, and when the instructions are executed by a terminal, the terminal executes a configurable and manageable data storage method described in any of the above embodiments.
[0017] This application provides a configurable and manageable data storage method, device, and medium. By configuring and using data storage in different management systems, it divides data storage into configuration information storage sets and business data storage sets, facilitating data maintenance and management at different levels. Based on application codes in application sets and field sets, it establishes a one-to-many relationship between field documents, making field modification and maintenance more flexible. Simultaneously, by utilizing business set names in application sets, it allows business data in different management systems to be stored in their respective business sets, facilitating separate data management and statistics for different management systems. The data storage of the configurable management system based on the MongoDB database model simplifies the development and maintenance of different management systems, reduces unnecessary development work, and improves data storage efficiency. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0019] Figure 1 A flowchart illustrating a configurable and manageable data storage method provided in this application embodiment;
[0020] Figure 2 This is a schematic diagram of the overall structure of a storage collection classification provided in an embodiment of this application;
[0021] Figure 3 This application provides a schematic diagram of a set association structure in a business set according to an embodiment of the present application.
[0022] Figure 4 This is a schematic diagram of the structure of a configurable and manageable data storage device provided in an embodiment of this application. Detailed Implementation
[0023] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application 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. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0024] This application provides a configurable and manageable data storage method, such as... Figure 1 As shown, the configurable and manageable data storage method specifically includes steps S101-S104:
[0025] S101. Based on the MongoDB database model, the configurable management system is classified into storage sets to obtain configuration information storage sets and business data storage sets. The configuration information storage sets are then further classified into application sets and field sets.
[0026] Specifically, based on the MongoDB database model, the configurable management system categorizes management data for both the management and application ends, resulting in a configuration information storage set and a business data storage set. The configuration information storage set is used to configure the stored data, while the business data storage set stores the business data corresponding to the configuration information storage set.
[0027] It should be noted that MongoDB is a document-oriented database model. This document-oriented database model does not need to worry about which fields different management systems need to store, making the storage of dynamic objects more flexible.
[0028] In one embodiment, Figure 2 This is a schematic diagram of the overall structure of a storage collection classification provided in an embodiment of this application, such as... Figure 2 As shown, based on the MongoDB database model, the configurable management system's backend functionality is divided into two parts: one is the management side creating the system and configuring fields, and the other is the application side using the configured system to manage data. Based on these two functionalities, the data storage sets are also divided into configuration information storage sets and business data storage sets.
[0029] As a possible implementation method, such as Figure 2As shown, the configuration information storage collection mainly consists of an application collection and a field collection. The application collection stores basic information about each management system, such as application name and application code. The field collection stores field information for the data maintained in each system, such as field name, field type, and field attributes. The business information storage collection is created when a new management system is identified. It stores the business data of the corresponding management system, and its fields are determined by the field configuration of that system in the field collection.
[0030] S102. Based on the newly added management system, update the application set to obtain application tag information.
[0031] Specifically, the system retrieves multiple document records from the newly added management system. Based on the application set, it inserts and modifies the data from these multiple document records to obtain the new document data, and determines the application code, application name, and business set name of the new document data.
[0032] Furthermore, the application code, application name, and business set name are identified and labeled to obtain application tag information. The application code is separately labeled and designated as the code identifier. This code identifier is associated with the field information in the field set. The code identifier is combined with a preset fixed prefix to determine the business identifier information corresponding to the business set name. This business identifier information guides the storage of business data in the business data storage set. The application tag information includes: code identifier information and business identifier information.
[0033] In one embodiment, an application collection is created for data storage, where each document in the application collection represents a management system. When configuring a management system, a new data entry is inserted into this collection for each newly created system. The application collection is essentially the overall configuration for all management systems. The main fields included in this collection are: application code (appCode), application name (appName), and business collection name (collectName). The application code is a unique identifier for a management system and is unique within the application collection; it serves as the code identification information. The business collection name is generated by combining a fixed prefix with the application code, making it unique within the application collection as well; it serves as the business identification information. When a new management system is added, a corresponding business collection for storing business data can be generated based on the business identification information.
[0034] S103. Based on the newly added field data in the management system, update the field set to obtain key field information.
[0035] Specifically, the system retrieves multiple field information segments from the newly added management system. Based on the field set, it adds and / or modifies information in these multiple field segments to obtain the new field information.
[0036] Furthermore, the application code, field name, field description, field type, and field value contained in the newly added field information are extracted and identified as key field information.
[0037] The application code in the newly added field information is identified as the key coding information. This key coding information and the coding identifier information are associated with each other.
[0038] Optionally, the field name can be defined as the field key value information. This field key value information is used within the business collection.
[0039] Optionally, the field descriptions can be analyzed and compared to obtain the meaning information of the fields.
[0040] Optionally, a text selection box can be used to select the field type to obtain the field selection information.
[0041] Optionally, the field attributes in the field value can be identified to obtain the field attribute information.
[0042] The key information for each field includes: key encoding information, key value information, meaning information, selection information, and attribute information.
[0043] In one embodiment, the field set stores field information for all management systems. Adding or editing a field within a specific management system involves inserting or modifying a segment of field information from the field set. The newly added field information included in the field set includes: application code (appCode), field name (fieldName), field description (fieldDesc), field type (type), and field value (value).
[0044] In one embodiment, the application code in the newly added field information is used to determine the key coding information. Then, it is associated with the same field in the application set, indicating that this field belongs to the corresponding management system. The application set and the field set form multiple documents in the field set corresponding to a single document through mutually matching application codes (appCode). The field name is the key value stored in the business set, i.e., the field key value information. The field description is the meaning of the content represented by this field, i.e., the field meaning information. For example, if a field named "age" is stored, the field name is "age" and the field description is "age". The field type is obtained by selecting the field type using a preset text box. The preset text boxes include: radio buttons, checkboxes, drop-down menus, etc. The field value is some attribute of this field, i.e., field attribute information, such as the default value of the text box, the option value of the radio button, etc.
[0045] S104. By applying tag information and key field information, new business data for the management system is generated, and the business data is stored in a business set. The business set exists within the business data storage set to enable data storage for different management systems.
[0046] Specifically, the coded identifier information in the application tag information is matched with the coded key information in the field key information. If the match is successful, the field key information in the field set is matched to the business field document corresponding to the business set name based on the business identifier information in the application tag information, thus obtaining the business data.
[0047] Furthermore, the business data corresponding to the business set name is categorized into sub-business sets. These sub-business sets are then stored within the business set.
[0048] In one embodiment, Figure 4 A schematic diagram of a configurable and manageable data storage device provided in this application embodiment is shown below. Figure 4 As shown, when using the management system, based on the application codes in the application collection and field collection within the management system, all field information of the system in the field collection is queried. Data editing is completed through object fields. After editing, the field information and data information of the object are obtained. Then, based on the business collection name (collectName) of the business identification information in multiple business collections, and after matching the code identification information in the application tag information with the code key information in the field key information (i.e., the same application code appCode in the application collection and field collection), the field key information in the field collection is matched to the field document corresponding to the business collection name to obtain the business data.
[0049] In addition, embodiments of this application also provide a configurable and manageable data storage device, such as... Figure 3 As shown, the configurable and manageable data storage device 400 specifically includes:
[0050] At least one processor 401. And a memory 402 communicatively connected to the at least one processor 401. The memory 402 stores instructions executable by the at least one processor 401, enabling the at least one processor 401 to execute:
[0051] Based on the MongoDB database model, the configurable management system is classified into storage sets, resulting in configuration information storage sets and business data storage sets. Furthermore, the configuration information storage sets are further classified into application sets and field sets.
[0052] Based on the newly added management system, the application collection is updated to obtain application tag information.
[0053] Based on the newly added field data in the management system, the field set is updated to obtain key field information.
[0054] By applying tag information and key field information, new business data for the management system is generated and stored in a business collection. This business collection exists within the business data storage collection to enable data storage for different management systems.
[0055] This application provides a configurable and manageable data storage method, device, and medium. By configuring and using data storage in different management systems, it divides data storage into configuration information storage sets and business data storage sets, facilitating data maintenance and management at different levels. Based on application codes in application sets and field sets, it establishes a one-to-many relationship between field documents, making field modification and maintenance more flexible. Simultaneously, by utilizing business set names in application sets, it allows business data in different management systems to be stored in their respective business sets, facilitating separate data management and statistics for different management systems. The data storage of the configurable management system based on the MongoDB database model simplifies the development and maintenance of different management systems, reduces unnecessary development work, and improves data storage efficiency.
[0056] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for devices and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0057] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0058] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0059] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0060] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0061] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0062] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0063] The above description is merely an embodiment of this application and is not intended to limit this application. For those skilled in the art, various modifications and variations can be made to the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of this application should be included within the scope of the claims of this application.
Claims
1. A configurable and manageable data storage method, characterized in that, The method includes: Based on the MongoDB database model, the configurable management system is classified into storage sets to obtain configuration information storage sets and business data storage sets related to data storage; and the configuration information storage sets are further classified into application sets and field sets. Based on the newly added management system, the application set is updated to obtain application tag information; Based on the newly added field data in the management system, the field set is updated to obtain key field information, specifically including: Obtain multiple field information segments from the newly added management system; Based on the set of fields, add information and / or edit / modify information in the multiple field information segments to obtain new field information; Extract the application code, field name, field description, field type, and field value contained in the newly added field information to determine the key information of the field, specifically including: The application code in the newly added field information is identified as the key coding information; wherein, the key coding information and the coding identification information are associated with each other. Store business data in a business collection, specifically including: The business data corresponding to the business collection name is categorized into sub-business collections; The sub-service set is stored in the service set; The field name is determined as the field key value information; wherein, the field key value information is used in the business set; The field descriptions are analyzed and compared to obtain the meaning information of the fields; By using a preset text box, the field type is selected to obtain field selection information; Identify the field attributes in the field values to obtain field attribute information; The key information of the field includes: the encoding key information, the field key value information, the field meaning information, the field selection information, and the field attribute information; Using the application tag information and the key field information, new business data for the management system is generated and stored in a business set; wherein, the business set exists in the business data storage set to realize data storage for different management systems.
2. The configurable and manageable data storage method according to claim 1, characterized in that, Based on the MongoDB database model, the configurable management system is classified into storage sets, resulting in configuration information storage sets and business data storage sets, specifically including: Based on the MongoDB database model, the configurable management system is classified into management data related to the management end and the application end to obtain the configuration information storage set and the business data storage set. The configuration information storage set is used to configure the stored data, and the business data storage set is used to store the business data corresponding to the configuration information storage set.
3. The configurable and manageable data storage method according to claim 1, characterized in that, Based on the newly added management system, the application set is updated to obtain application tag information, specifically including: Retrieve multiple document records from the newly added management system; Based on the application set, insert data and modify corresponding data into the multiple document data to obtain new document data, and determine the application code, application name and business set name of the new document data; The application code, the application name, and the service set name are identified and labeled to obtain the application tag information.
4. The configurable and manageable data storage method according to claim 3, characterized in that, The application code, the application name, and the service set name are identified and labeled to obtain the application tag information, which specifically includes: The application code is individually labeled and identified as code identification information; wherein, the code identification information is associated with the field information in the field set; The encoded identification information is combined with a preset fixed prefix to determine the business identification information corresponding to the business set name; wherein, the business identification information guides the storage of business data in the business data storage set; The application tag information includes: encoding identification information and business identification information.
5. The configurable and manageable data storage method according to claim 1, characterized in that, Based on the application tag information and the key field information, new business data for the management system is generated, specifically including: The encoded identifier information in the application tag information is matched and judged with the encoded key information in the field key information; If the matching judgment is consistent, then based on the business identification information in the application tag information, the key information of the fields in the field set is matched to the business field document corresponding to the business set name to obtain the business data.
6. A configurable and manageable data storage device, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform a configurable and manageable data storage method according to any one of claims 1-5.
7. A non-volatile computer storage medium, characterized in that, The storage medium is a non-volatile computer-readable storage medium that stores at least one program, each program including instructions that, when executed by a terminal, cause the terminal to perform a configurable and manageable data storage method according to any one of claims 1-5.
Citation Information
Patent Citations
Metadata management platform and management method
CN113918576A
Intelligent terminal measurement data storage method based on MongoDB library
CN114428830A