A data management method and management system based on label management

By adopting a data management method based on tag management, the problem of frequent schema modifications in existing technologies is solved, and efficient data management is achieved. In particular, under the conditions of large data volume and high concurrency, storage resource requirements and modification time are reduced.

CN116501811BActive Publication Date: 2026-05-01CHANGSHA MILITARY & CIVIL ADVANCED TECH RES CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGSHA MILITARY & CIVIL ADVANCED TECH RES CO LTD
Filing Date
2023-04-27
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing data management systems require frequent schema modifications when changing data types or attributes, resulting in time-consuming and resource-intensive modifications, especially under conditions of large data volumes and high concurrency, leading to low efficiency.

Method used

A tag-based data management approach is adopted, which establishes tag tables, tag fixed attribute tables, tag-tag relationship tables, data tables, data-data relationship tables, tag-data relationship tables, and data attribute tables. Users can customize and add attributes of data types without modifying the table schema. The tag management module and the data management module are used to realize the creation, deletion, querying and modification of data.

Benefits of technology

It reduces the workload when modifying data types, saves time, and improves the efficiency of data management, especially in the case of large data volumes and high concurrency, reducing the demand for storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116501811B_ABST
    Figure CN116501811B_ABST
Patent Text Reader

Abstract

The application discloses a data management method and management system based on label management, establishes multiple tables, adds a label and perfects label information, selects a parent label for the label, establishes a relationship between the label and the parent label, stores label information and the relationship between the label and the parent label into a corresponding table, adds data and perfects data information, selects a parent data for the data, establishes a relationship between the data and the parent data, stores data information and the relationship between the data and the parent data into a corresponding table, selects a parent label of the data, stores the parent label into a corresponding table, inputs an attribute value of a corresponding attribute of the data, and stores the attribute value into a corresponding table; the data type and the data are added, deleted, inquired and modified by adding, deleting, inquiring and modifying the data in related tables, so that data management is realized. When the data type is modified by using the method, only the label needs to be modified, and each table schema does not need to be modified, so that the change is small, and time is saved.
Need to check novelty before this filing date? Find Prior Art

Description

A data management method and system based on tag management Technical Field

[0001] This invention relates to the field of information data management technology, and in particular to a data management method and system based on tag management. Background Technology

[0002] With the development of the internet, most enterprises manage their data through data management systems. These systems rely on multiple underlying software components for data storage, such as relational databases with caching, document databases with caching, and other similar solutions. Relational databases with caching require a fixed schema (a schema represents the columns of a table in a database; data types correspond to database tables, and data attributes correspond to table columns). This approach necessitates determining the columns of each table during initial table creation. When a new data type is added or the attributes of an existing data type are significantly modified, the schema needs frequent modification, resulting in substantial and time-consuming changes. Document databases with caching require memory and disk operations to store documents. However, document databases have limited read / write capabilities, and storing large amounts of data in memory consumes significant memory. Furthermore, data needs persistent storage, with most data stored on disk. Disk read / write speeds are also limited, leading to lengthy storage times when there are many users and large datasets. To address the issue of the significant time-consuming modifications associated with the aforementioned solutions, this invention employs tags for data storage based on a relational database and caching approach. Tags correspond to data types, and tag attributes correspond to data attributes. When modifying data types, only the tags need to be modified, eliminating the need to modify the schema of each table. This minimizes the changes and saves considerable time. Summary of the Invention

[0003] This invention is based on a relational database and caching scheme, using tags to achieve customized data storage. Users can add data type attributes by definition without modifying the table schema. Based on this, this invention provides a tag-based data management method, including the following steps:

[0004] S1. Create a label table, a label fixed attribute table, a label-label relationship table, a data table, a data-data relationship table, a label-data relationship table, and a data attribute table;

[0005] S2. The user adds a tag through the graphical interface, including the tag name, the fixed attribute Chinese name, and the fixed attribute English name. The tag name is stored in the tag table, and the fixed attribute Chinese name and fixed attribute English name are stored in the tag fixed attribute table. The user selects the parent tag of the tag from the existing tags, establishes a relationship between the tag and the parent tag, and stores the relationship between the tag and the parent tag in the tag-tag relationship table.

[0006] S3. The user adds data through the graphical interface, including data name and creation time. The data name and creation time are saved in the data table. The user selects the parent data of the data from the existing data, establishes a relationship between the data and the parent data, and stores the relationship between the data and the parent data in the data-data relationship table.

[0007] S4. Select the parent label of the data, store the parent label in the label-data relationship table, display the attributes of the parent label in the graphical interface, if the attributes of the parent label can meet the attribute requirements of the data, the data directly inherits the attributes of the parent label, input the attribute value corresponding to the inherited attribute of the data, and store the attribute value in the data attribute table.

[0008] S5. Data management is achieved by adding, deleting, querying, and modifying the tag table and the tag attribute table, and by adding, deleting, querying, and modifying the data table and the data attribute table.

[0009] Preferably, the fields of the tag table in S1 include tag_id, tag_name, create_time, and update_time, where tag_id represents the primary key of the table and is the tag ID, tag_name is the tag name, create_time is the creation time, and update_time is the modification time.

[0010] Preferably, the fields of the tag fixed attribute table in S1 include property_id, tag_id, property_name, and code, where property_id represents the primary key of the table and is the tag fixed attribute id, tag_id is the tag id, property_name is the Chinese name of the fixed attribute, and code is the English name of the fixed attribute.

[0011] Preferably, the fields of the data table in S1 include entity_id, entity_name, create_time, and update_time, where entity_id represents the primary key of the table and is the data ID, entity_name is the data name, create_time is the creation time, and update_time is the modification time.

[0012] Preferably, the fields of the tag-data relationship table in S1 include tag_entity_id, entity_id, and tag_id, where tag_entity_id represents the primary key of the table and is the tag data relationship ID, entity_id is the data ID, and tag_id is the tag ID.

[0013] Preferably, the fields of the data attribute table in S1 include property_id, entity_id, tag_id, property_name, property_value, fix, and property_type, where property_id represents the primary key of the table and is the attribute ID, entity_id is the data ID, tag_id is the tag ID, property_name is the attribute name, property_value is the attribute value, fix indicates whether it is a fixed attribute, and property_type is the attribute type.

[0014] Preferably, in step S4, the data directly inherits the attributes of the parent tag. The attribute values ​​corresponding to the inherited attributes are input, and the attribute values ​​are stored in the data attribute table. Specifically, this includes:

[0015] S41. Enter the attribute value corresponding to the data in the attribute field of the parent tag;

[0016] S42. Find the corresponding tag based on the tag_id field in the data attribute table, find the corresponding data based on the entity_id field in the data attribute table, and store the attribute value in the data attribute table.

[0017] Preferably, in step S4, the attributes of the parent tag are displayed in a graphical interface. If the attributes of the parent tag cannot meet the attribute requirements of the data, a custom attribute is defined for the data, and the attribute value of the custom attribute of the data is stored in the data attribute table.

[0018] Preferably, the custom attributes include text attributes, image attributes, and file attributes. If the custom attribute is a text attribute, the text attribute name and attribute value are entered; if the custom attribute is an image attribute, the image attribute name is entered and an image is uploaded; if the custom attribute is a file attribute, the file attribute name is entered and a file is uploaded. The type of the custom attribute is stored in the property_type field of the data attribute table.

[0019] A data management system based on tag management is provided, which uses a tag-based data management method for data management. The system includes a tag management module and a data management module. The tag management module is used to add, delete, query, and modify tags, and the data management module is used to add, delete, query, and modify data.

[0020] The aforementioned data management method and system based on tag management uses tags to store data on a relational database + caching-based solution. Tags correspond to data types, and tag attributes correspond to data attributes. When modifying data types, only the tags need to be modified, without needing to modify the schema of each table. This results in minimal changes and saves time. Attached Figure Description

[0021] Figure 1 is a flowchart of a data management method based on tag management in an embodiment of the present invention;

[0022] Figure 2 is a schematic diagram of storing attribute values ​​of custom attributes in one embodiment of the present invention. Detailed Implementation

[0023] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0024] A data management method based on tag management, which specifically includes the following steps:

[0025] S1. Create a label table, a label fixed attribute table, a label-label relationship table, a data table, a data-data relationship table, a label-data relationship table, and a data attribute table;

[0026] S2. The user adds a tag through the graphical interface, including the tag name, the fixed attribute Chinese name, and the fixed attribute English name. The tag name is stored in the tag table, and the fixed attribute Chinese name and fixed attribute English name are stored in the tag fixed attribute table. The user selects the parent tag of the tag from the existing tags, establishes a relationship between the tag and the parent tag, and stores the relationship between the tag and the parent tag in the tag-tag relationship table.

[0027] S3. The user adds data through the graphical interface, including data name and creation time. The data name and creation time are saved in the data table. The user selects the parent data of the data from the existing data, establishes a relationship between the data and the parent data, and stores the relationship between the data and the parent data in the data-data relationship table.

[0028] S4. Select the parent label of the data, store the parent label in the label-data relationship table, display the attributes of the parent label in the graphical interface, if the attributes of the parent label can meet the attribute requirements of the data, the data directly inherits the attributes of the parent label, input the attribute value corresponding to the inherited attribute of the data, and store the attribute value in the data attribute table.

[0029] S5. Data management is achieved by adding, deleting, querying, and modifying the tag table and the tag attribute table, and by adding, deleting, querying, and modifying the data table and the data attribute table.

[0030] Specifically, see Figure 1, which is a flowchart of a data management method based on tag management in an embodiment of the present invention.

[0031] First, create the relevant tables, including a tag table, a tag fixed attribute table, a tag-tag relationship table, a data table, a data-data relationship table, a tag-data relationship table, and a data attribute table. Then, add tags; multiple tags can be added. Each tag includes a tag name, a Chinese name for a fixed attribute, and an English name for a fixed attribute. Store the tag name in the tag table, and store the Chinese and English names for the fixed attributes in the tag fixed attribute table. You can select parent tags for tags, establishing a "tag-parent tag" relationship between multiple tags, and store this relationship in the tag-tag relationship table. Next, add data; multiple data entries can be added. Each data entry includes a data name and a creation time. Store the data name and creation time in the data table. You can also select parent data for multiple data entries, establishing a "data-data relationship table." Based on the relationship with parent data, the relationship between the data and its parent data is stored in the data-data relationship table. Next, parent tags are selected for the data; one or more parent tags can be selected for the data. The selected parent tags are stored in the tag-data relationship table. After completion, the attributes of the parent tags are displayed, and it is determined whether the attributes of the parent tags meet the attribute requirements of the data. If the attributes of the parent tags meet the attribute requirements of the data, the data directly inherits the attributes of the parent tags. The attribute values ​​corresponding to the inherited attributes are entered and stored in the data attribute table. Data management is achieved by performing CRUD operations (add, delete, query, and modify) on the tag table and the tag fixed attribute table, and by performing CRUD operations on the data table and the data attribute table.

[0032] In one embodiment, the fields of the tag table in S1 include tag_id, tag_name, create_time, and update_time, where tag_id represents the primary key of the table and is the tag ID, tag_name is the tag name, create_time is the creation time, and update_time is the modification time.

[0033] Specifically, see Table 1, which is the label table.

[0034] Table 1 Label List

[0035] Serial Number Name Type Length Primary Key Description 1 tag_id varchar 20 Yes Tag ID 2 tag_name varchar 20 No Tag Name 3 create_time datetime 0 No Creation Time 4 update_time datetime 0 No Modification Time surface

[0036] The fields in Table 1 include: tag_id, tag_name, create_time, and update_time. Here, tag_id is the tag ID, tag_name is the tag name, create_time is the creation time, and update_time is the modification time. tag_id is the primary key of Table 1, which is used to identify the uniqueness of each record. The data type of each field is varchar, and the length of each field is 20.

[0037] Data types correspond to tags. Adding a new tag is actually adding a new data type. In the tag table, performing CRUD operations on tags is equivalent to performing CRUD operations on data types.

[0038] In one embodiment, the fields of the tag fixed attribute table in S1 include property_id, tag_id, property_name, and code, where property_id represents the primary key of the table and is the tag fixed attribute id, tag_id is the tag id, property_name is the Chinese name of the fixed attribute, and code is the English name of the fixed attribute.

[0039] Specifically, see Table 2, which is a table of fixed attributes for tags.

[0040] The fields in Table 2 include: property_id, tag_id, property_name, and code. Property_id is the fixed attribute ID of the tag, tag_id is the tag ID, property_name is the Chinese name of the fixed attribute, and code is the English name of the fixed attribute. Property_id is the primary key of Table 2. The data type of each field is varchar, and the length of each field is 20.

[0041] Data attributes correspond to fixed attributes of tags. In the fixed attribute table of tags, adding, deleting, querying, and modifying fixed attributes of tags is the same as adding, deleting, querying, and modifying data attributes.

[0042] Table 2. Label Fixed Attributes Table

[0043] Serial Number Name Type Length Primary Key Description 1 property_id varchar 20 Yes Fixed attribute id of tag 2 tag_id 2 tag_id varchar 20 No Tag id 3 property_name varchar 20 No Fixed attribute Chinese name 4 code varchar 20 No Fixed attribute English name surface

[0044] In one embodiment, the fields of the tag-tag relationship table in S1 include tag_relation_id, father_id, child_id, and ancestors, where tag_relation_id represents the primary key of the table, father_id is the parent tag ID, child_id is the tag ID, and ancestors is the family tree.

[0045] Specifically, see Table 3, which is a label-label relationship table.

[0046] Table 3. Tag-Tag Relationship Table

[0047] Serial Number Name Type Length Primary Key Description 1 tag_relation_id varchar 20 Yes Tag Relation id 2 father_id varchar 20 No Parent Tag id 3 child_id varchar 20 No Tag id 4 ancestors varchar 25 No Family Tree surface

[0048] The fields in Table 3 include: tag_relation_id, father_id, child_id, and ancestors. Among them, tag_relation_id is the tag relationship ID, father_id is the parent tag ID, child_id is the tag ID, and ancestors is the family tree. tag_relation_id is the primary key of Table 3. The data type of each field is varchar. The length of the ancestors field is 255, and the length of the other fields is 20.

[0049] Data types correspond to tags. For each tag, a parent tag can be selected, and that tag inherits all the attributes of the parent tag. This establishes a hierarchical relationship between data types. The relationship between tags and their parent tags is stored in a tag-tag relationship table. Adding, deleting, querying, and modifying these relationships in the tag-tag relationship table allows for the manipulation of these relationships between data types.

[0050] In one embodiment, the fields of the data table in S1 include entity_id, entity_name, create_time, and update_time, where entity_id represents the primary key of the table and is the data ID, entity_name is the data name, create_time is the creation time, and update_time is the modification time.

[0051] Specifically, see Table 4, which is a data table.

[0052] Table 4 Data Table

[0053] Serial Number Name Type Length Primary Key Description 1 entity_id varchar 20 Yes Data ID 2 entity_name varchar 20 No Data Name 3 create_time datetime 0 No Creation Time 4 update_time datetime 0 No Modification Time surface

[0054] The fields in Table 4 include: entity_id, entity_name, create_time, and update_time. entity_id is the data ID, entity_name is the data name, create_time is the creation time, and update_time is the modification time. entity_id is the primary key of Table 5. The data type of fields “entity_id” and “entity_name” is varchar, and the field length is 20. The data type of fields “create_time” and “update_time” is datetime, and the field length is 0.

[0055] Adding new data essentially means adding data to a data type. One or more new data entries can be added, and these entries are stored in a data table. CRUD operations on the data table are then used to modify the data. In this application, by selecting a label for the newly added data, the data acquires a data type attribute. Users can also create their own unique data type attributes.

[0056] In one embodiment, the fields of the data-data relationship table in S1 include entity_relation_id, father_id, child_id, and ancestors, where entity_relation_id represents the primary key of the table and is the data relationship ID, father_id is the parent data ID, child_id is the data ID, and ancestors is the family tree.

[0057] Specifically, see Table 5, which is a data-data relationship table.

[0058] The fields in Table 5 include: entity_relation_id, father_id, child_id, and ancestors. Among them, entity_relation_id is the data relationship ID, father_id is the parent data ID, child_id is the data ID, and ancestors is the family tree. entity_relation_id is the primary key of Table 7. The data type of each field is varchar. The length of the field "ancestors" is 255, and the length of the other fields is 20.

[0059] Table 5 Data - Data Relationship Table

[0060] Serial Number Name Type Length Primary Key Description 1 entity_relation_id varchar 20 Yes Data Relation id 2 father_id varchar 20 No Parent Data id 3 child_id varchar 20 No Data id 4 ancestors varchar 25 No Family Tree surface

[0061] For each data entry, a parent data element can be selected, and that data entry inherits all the attributes of the parent data, thus establishing a hierarchical relationship between the data. The relationship between data and its parent data is stored in a data-data relationship table, and the relationships between data and its parent data can be modified by adding, deleting, querying, and modifying data in the data-data relationship table.

[0062] In one embodiment, the fields of the tag-data relationship table in S1 include tag_entity_id, entity_id, and tag_id, where tag_entity_id represents the primary key of the table and is the tag data relationship ID, entity_id is the data ID, and tag_id is the tag ID.

[0063] Specifically, see Table 6, which is a label-data relationship table.

[0064] Table 6 Label-Data Relationship Table

[0065] Serial Number Name Type Length Primary Key Description 1 tag_entity_id varchar 20 Yes Tag Data Relationship id 2 entity_id varchar 20 No Data id 3 tag_id varchar 20 No Tag id surface

[0066] The fields in Table 6 include: tag_entity_id, entity_id, and tag_id. Among them, tag_entity_id is the tag data relationship ID, entity_id is the data ID, and tag_id is the tag ID. tag_entity_id is the primary key of Table 4. The data type of each field is varchar, and the field length is 20.

[0067] Each data entry can have a parent tag, thus establishing a relationship between the data and its data type. This relationship is stored in a tag-data relationship table, and its creation, deletion, querying, and modification are achieved through CRUD operations on this table. One or more parent tags can be selected for each data entry, giving that data entry attributes from one or more parent tags.

[0068] In one embodiment, the fields of the data attribute table in S1 include property_id, entity_id, tag_id, property_name, property_value, fix, and property_type, where property_id represents the primary key of the table and is the attribute ID, entity_id is the data ID, tag_id is the tag ID, property_name is the attribute name, property_value is the attribute value, fix indicates whether it is a fixed attribute, and property_type is the attribute type.

[0069] Specifically, see Table 7, which is a data attribute table.

[0070] Table 7 Data Attribute Table

[0071] Serial Number Name Type Length Primary Key Description 1 property_id varchar 20 Yes Attribute id 2 entity_id varchar 20 No Data id 3 tag_id varchar 20 No Tag id 4 property_name varchar 25 5 No Attribute name 5 property_value varchar 25 5 No Attribute value 6 fixchar 1 No Whether it is a fixed attribute 7 property_type varchar 20 No Attribute type surface

[0072] The fields in Table 7 include: property_id, entity_id, tag_id, property_name, property_value, fix, and property_type. Here, property_id is the attribute ID, entity_id is the data ID, tag_id is the tag ID, property_name is the attribute name, property_value is the attribute value, fix indicates whether it is a fixed attribute, and property_type is the attribute type. property_id is the primary key of Table 6. The data type of field "fix" is char, and its length is 1. The data types of fields "property_id", "entity_name", "tag_id", and "property_type" are all varchar, and their lengths are all 20. The data types of fields "property_name" and "property_value" are both varchar, and their lengths are all 255.

[0073] In one embodiment, in step S4, the data directly inherits the attributes of the parent tag. The attribute value corresponding to the inherited attribute is input, and the attribute value is stored in the data attribute table. Specifically, this includes:

[0074] S41. Enter the attribute value corresponding to the data in the attribute field of the parent tag;

[0075] S42. Find the corresponding tag based on the tag_id field in the data attribute table, find the corresponding data based on the entity_id field in the data attribute table, and store the attribute value in the data attribute table.

[0076] Specifically, when a parent tag is selected for a piece of data, that piece of data inherits all the attributes of the parent tags. In other words, the attributes of the parent tags are the attributes of that piece of data. You can directly enter the attribute values ​​for that piece of data, and the attribute values ​​will be stored in the data attribute table. Multiple parent tags can be selected for a piece of data, and correspondingly, that piece of data will inherit the attributes of all parent tags. Enter the attribute value corresponding to that piece of data in the attribute field of the parent tag. The system will then look up the corresponding tag using the `tag_id` field in the data attribute table, and then look up the corresponding data using the `entity_id` field in the data attribute table, storing the attribute value in the data attribute table.

[0077] In one embodiment, in step S4, the attributes of the parent tag are displayed in a graphical interface. If the attributes of the parent tag cannot meet the attribute requirements of the data, a custom attribute is defined for the data, and the attribute value of the custom attribute of the data is stored in the data attribute table.

[0078] Specifically, if a data item selects a parent tag and displays the parent tag's attributes, and it is found that the parent tag's attributes cannot meet the data item's attribute requirements, then custom attributes and corresponding attribute values ​​can be defined for that data item, and the attribute values ​​can be stored in the data attribute table. The data attribute table can then be used to add, delete, query, and modify the attributes of that data item.

[0079] In one embodiment, the custom attribute includes text attribute, image attribute, and file attribute. If the custom attribute is a text attribute, the text attribute name and attribute value are entered; if the custom attribute is an image attribute, the image attribute name is entered and an image is uploaded; if the custom attribute is a file attribute, the file attribute name is entered and a file is uploaded. The type of the custom attribute is stored in the property_type field of the data attribute table.

[0080] Specifically, if a data attribute of a data entry is an attribute of the selected parent tag, then that data entry's data attribute is a fixed attribute; otherwise, it is a non-fixed attribute. The "Is it a fixed attribute?" and "Tag ID" fields can be used to identify which tag the attribute belongs to. Users can add custom attributes (i.e., non-fixed attributes) to the data entry using fields such as "Attribute Name," "Attribute Value," and "Is it a fixed attribute?". An unlimited number of custom attributes can be defined. See Figure 2. By adding a custom attribute, users can add a text attribute by entering the attribute name and value; add an image attribute by entering the attribute name and uploading an image; and add a file attribute by entering the attribute name and uploading a file. The "property_type" field in the data attribute table stores the attribute type of the custom attributes. This allows for image display and file download, storing all attribute data of the custom attributes in the data attribute table.

[0081] Designing the schema of a data attribute table in this way allows users to create custom attributes for the data without modifying the table structure, resulting in minimal changes to the table and saving a significant amount of time.

[0082] A data management system based on tag management is provided, which uses a tag-based data management method for management. The management system includes a tag management module and a data management module. The tag management module is used to add, delete, query, and modify tags, and the data management module is used to add, delete, query, and modify data.

[0083] Specifically, the data management system is divided into two main modules: a tag management module and a data management module, wherein:

[0084] The tag management module is mainly divided into four functions: adding tags, modifying tags, deleting tags, tag data display, and retrieval.

[0085] Adding a new tag involves entering the tag name, the Chinese name of the tag's fixed attributes, the English name of the tag's fixed attributes, and selecting the parent tag. All tag data is then retrieved and displayed in a scrolling list for selection.

[0086] Modifying a tag refers to modifying the tag name, the Chinese name of the tag's fixed attributes, the English name of the tag's fixed attributes, and the parent tag;

[0087] Deleting a tag means deleting the tag's data, its fixed attributes, and its relationship with its parent tags;

[0088] Tag data display refers to displaying tags in a paginated list format, with content including tag name, creation time, etc. Tag data retrieval refers to entering a tag name to retrieve and view information such as the tag name, fixed attribute Chinese name, fixed attribute English name, parent tag, and creation time.

[0089] The data management module is mainly divided into four functions: adding data, modifying data, deleting data, and data display and retrieval.

[0090] Adding new data involves entering a data name, selecting the corresponding tag, retrieving all tag data and creating a scrolling list for selection. Multiple tags can be selected, and after selecting a tag, its fixed attribute Chinese name is displayed. The fixed attribute value of the tag is then entered. Selecting parent data involves retrieving all data and creating a paginated list, which can be used for selection. Parent data can also be filtered by name.

[0091] Modifying data refers to changing the data name, data attributes, its tag, parent data, etc., and you can also add custom attributes.

[0092] Deleting data refers to deleting the data itself, including its relationship with tags, its relationship with parent data, and all its attributes.

[0093] Data display is presented in a paginated list format, showing information including data name and creation time. Data retrieval allows users to enter a data name and retrieve and view information such as the data's name, tags, parent tags, data attributes, and creation time.

[0094] The aforementioned tag-based data management method and system, on top of the existing relational database-based caching solution, uses tags to implement data storage. Tags correspond to data types, and tag attributes correspond to data attributes. Modifying data types only requires modifying the tags, without needing to modify the schema of each table, resulting in minimal changes and saving time.

[0095] The above provides a detailed description of a tag-based data management method and system provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments are merely for the purpose of helping to understand the core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.

Claims

1. A data management method based on tag management, characterized in that, The method includes: S1, establishing a tag table, a tag fixed attribute table, a tag-tag relationship table, a data table, a data-data relationship table, a tag-data relationship table, and a data attribute table; S2, the user adds a tag through a graphical interface, including a tag name, a fixed attribute Chinese name, and a fixed attribute English name; the tag name is stored in the tag table, the fixed attribute Chinese name and fixed attribute English name are stored in the tag fixed attribute table, the parent tag of the tag is selected from existing tags, a relationship is established between the tag and the parent tag, and the relationship between the tag and the parent tag is stored in the tag-tag relationship table; S3, the user adds data through a graphical interface, including a data name and a creation time; the data name and creation time are saved in the data table, and the data is added from existing data... S4. Select the parent data of the data, establish a relationship between the data and the parent data, and store the relationship between the data and the parent data in a data-data relationship table; S5. Select the parent label of the data, store the parent label in a label-data relationship table, display the attributes of the parent label in a graphical interface, if the attributes of the parent label meet the attribute requirements of the data, the data directly inherits the attributes of the parent label, input the attribute value corresponding to the inherited attribute of the data, and store the attribute value in a data attribute table; S6. Perform CRUD operations on the label table and the label attribute table to realize the CRUD operations on data types, and perform CRUD operations on the data table and the data attribute table to realize the CRUD operations on data, thereby performing data management.

2. The data management method based on tag management as described in claim 1, characterized in that, The fields of the tag table in S1 include tag_id, tag_name, create_time, and update_time. Here, tag_id represents the primary key of the table and is the tag ID, tag_name is the tag name, create_time is the creation time, and update_time is the modification time.

3. The data management method based on tag management as described in claim 2, characterized in that, The fields of the fixed attribute table in S1 include property_id, tag_id, property_name, and code. Property_id represents the primary key of the table and is the ID of the fixed attribute. Tag_id is the ID of the tag. Property_name is the Chinese name of the fixed attribute. Code is the English name of the fixed attribute.

4. The data management method based on tag management as described in claim 3, characterized in that, The fields of the data table in S1 include entity_id, entity_name, create_time, and update_time. Entity_id represents the primary key of the table and is the data ID. Entity_name is the data name. Create_time is the creation time, and update_time is the modification time.

5. The data management method based on tag management as described in claim 4, characterized in that, The fields of the tag-data relationship table in S1 include tag_entity_id, entity_id, and tag_id, where tag_entity_id represents the primary key of the table and is the tag data relationship ID, entity_id is the data ID, and tag_id is the tag ID.

6. The data management method based on tag management as described in claim 5, characterized in that, The fields of the data attribute table in S1 include property_id, entity_id, tag_id, property_name, property_value, fix, and property_type. Among them, property_id represents the primary key of the table and is the attribute ID; entity_id is the data ID; tag_id is the tag ID; property_name is the attribute name; property_value is the attribute value; fix indicates whether it is a fixed attribute; and property_type is the attribute type.

7. The data management method based on tag management as described in claim 6, characterized in that, In step S4, the data directly inherits the attributes of the parent tag. The attribute value corresponding to the inherited attribute is input, and the attribute value is stored in the data attribute table. Specifically, this includes: S41, filling in the attribute value corresponding to the data in the attribute field of the parent tag; S42, finding the corresponding tag according to the tag_id field in the data attribute table, finding the corresponding data according to the entity_id field in the data attribute table, and storing the attribute value in the data attribute table.

8. The data management method based on tag management as described in claim 1, characterized in that, In step S4, the attributes of the parent tag are displayed in a graphical interface. If the attributes of the parent tag cannot meet the attribute requirements of the data, a custom attribute is defined for the data, and the attribute value of the custom attribute is stored in the data attribute table.

9. The data management method based on tag management as described in claim 8, characterized in that, The custom attributes include text attributes, image attributes, and file attributes. If the custom attribute is a text attribute, enter the text attribute name and attribute value; if the custom attribute is an image attribute, enter the image attribute name and upload the image; if the custom attribute is a file attribute, enter the file attribute name and upload the file. The type of the custom attribute is stored in the property_type field of the data attribute table.

10. A data management system based on tag management, employing the data management method according to any one of claims 1 to 9, characterized in that, The management system includes a tag management module and a data management module. The tag management module is used to add, delete, query, and modify tags, and the data management module is used to add, delete, query, and modify data.

Citation Information

Patent Citations

  • Method, device and device for converting data model into database

    CN109299200A

  • Generating rules for data processing values of data fields from semantic labels of the data fields

    US20210263900A1