Data element processing method and device, electronic equipment and storage medium
By building data structure model and entity correlation analysis, the problem of low storage efficiency of data elements is solved, and the data storage system is efficiently responded and flexible to business needs is realized.
Patent Information
- Application Number
- CN202411540587.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-31
AI Technical Summary
In the prior art, the organizational efficiency of data elements is low when storing data elements, resulting in slower response speed of data storage systems and inability to flexibly respond to market changes and business needs.
By building a data structure model, define the data labels of entities in the data and the data relationship between entities, identify the entity and data relationship when data is updated, and use text matching and mutual information values to analyze the entities under different labels.
It realizes efficient management of updated data, improves the accuracy and speed of data storage and retrieval responses, can adapt to business needs more flexibly, and reduces the complexity of data management and maintenance costs.
Smart Images

Figure CN119474234A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data element processing method, device, electronic device and storage medium. Background Art
[0002] As a new production factor, data is the foundation of digitalization, networking and intelligence. It has been rapidly integrated into various links such as production, distribution, circulation, consumption and social service management, profoundly changing the mode of production, lifestyle and social governance. Data elements refer to data resources that exist in electronic form, participate in production and operation activities through computing and play an important role.
[0003] In different business scenarios, such as production, distribution, circulation, consumption, and social service management, different types of raw data forms have different business scenarios and contain different information. These data forms may contain some common information, such as the same objects, but also have their own unique information, such as information of different attribute categories related to the same object. In the prior art, the system will establish a separate data table for each data form type. Although this approach is simple and direct, it leads to a lot of duplication of work and complexity of system maintenance when adding new raw data form types or modifying existing types. With the development of business, the increase in raw data forms will lead to a rapid expansion of the number of data tables. Every time the information related to the object is changed in a form, the data in other data forms may not be updated, which will make the data of some interfaces or business calls not up to date.
[0004] Normally, when the data of an object in a form is changed, multiple different data tables involving the object need to be updated one by one, which increases the processing workload of the system. When some non-form data is updated, its data label is different from the label in the stored data, and the management of the updated data is relatively chaotic, and it is impossible to quickly find it based on the data label. In this case, the complexity of the data element structure and the high workload required for modification make the data storage system slow to respond, and it is unable to flexibly respond to market changes and business needs. Summary of the invention
[0005] The present invention provides a data element processing method, device, electronic device and storage medium to solve the defect of low organizational efficiency when storing data elements in the prior art, and to improve the storage and response efficiency of the data storage system.
[0006] The present invention provides a data element processing method, comprising:
[0007] Constructing a data structure model and storing data based on the data structure model; the data structure model is used to define data labels of entities in the data and data relationships between entities;
[0008] When a data update event is detected, identify entities in the updated data, data relationships between entities, and data labels;
[0009] Perform text matching between entities in the updated data and entities under corresponding data labels;
[0010] In the case where no corresponding target entity is matched, determining an entity associated with the entity in the updated data from the stored data based on the mutual information value;
[0011] A target data relationship is established between the entity in the updated data and the associated entity, and the entity in the updated data is stored according to the target data relationship.
[0012] According to a data element processing method provided by the present invention, determining an entity associated with an entity in updated data from stored data based on a mutual information value includes:
[0013] Determining a strong entity and a weak entity corresponding to the strong entity from the stored data;
[0014] respectively determining a first mutual information value between the entity in the updated data and the strong entity and a second mutual information value between the entity in the updated data and the weak entity;
[0015] Based on the first mutual information value between the strong entity and the second mutual information value between each weak entity corresponding to the strong entity, an entity associated with the entity in the updated data is determined from among each strong entity and each weak entity.
[0016] According to a data element processing method provided by the present invention, based on a first mutual information value between a strong entity and a second mutual information value between each weak entity corresponding to the strong entity, determining an entity associated with an entity in updated data from each strong entity and each weak entity, comprises:
[0017] When the first mutual information value between the strong entity and the weak entity is less than a first threshold and the second mutual information value between the weak entity corresponding to the strong entity is greater than a second threshold, the weak entity is determined as an entity associated with the entity in the updated data.
[0018] According to a data element processing method provided by the present invention, the second mutual information value between the entity and the weak entity in the updated data is determined by:
[0019] Based on the data relationship between the weak entity and the corresponding strong entity, generating a text corpus containing the weak entity and the corresponding strong entity according to the corpus;
[0020] Based on the text corpus, a second mutual information value between the entity and the weak entity in the updated data is determined.
[0021] According to a data element processing method provided by the present invention, after text matching of entities in the updated data with entities under corresponding data tags, the method further includes:
[0022] In the case where the entity in the updated data matches the corresponding target entity, the data of the target entity is updated based on the updated data.
[0023] According to a data element processing method provided by the present invention, the monitoring of data update events includes: monitoring at least one of user data modification input, external data update push messages and internal data change tasks.
[0024] According to a data element processing method provided by the present invention, the building of a data structure model includes:
[0025] Define entities and data labels in relational databases;
[0026] Establish data relationships between entities through primary keys and foreign keys;
[0027] The data structure model is constructed based on data relations.
[0028] The present invention also provides a data element processing device, comprising:
[0029] A construction module is used to construct a data structure model and store data based on the data structure model; the data structure model is used to define data labels of entities in the data and data relationships between entities;
[0030] A monitoring module, used to identify entities in the updated data, data relationships between entities, and data labels when a data update event is monitored;
[0031] A matching module, used to perform text matching between entities in the updated data and entities under corresponding data tags;
[0032] A first processing module, configured to determine, from the stored data, an entity associated with the entity in the updated data based on the mutual information value if no corresponding target entity is matched;
[0033] The second processing module is used to establish a target data relationship between the entity in the updated data and the associated entity, and store the entity in the updated data according to the target data relationship.
[0034] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the data element processing methods described above.
[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the data element processing methods described above.
[0036] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the data element processing methods described above.
[0037] The present invention provides a data element processing method, device, electronic device and storage medium, which realize efficient management of updated data by constructing a flexible data structure model, can timely identify and process entities in data elements and their relationships, and can effectively associate entities under different labels through text matching and mutual information value analysis, reducing data recognition confusion caused by inconsistent labels, thereby improving the accuracy and speed of data storage and retrieval responses, being able to more flexibly adapt to business needs, and reducing the complexity of data management and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 It is one of the flowcharts of a data element processing method provided by the present invention;
[0040] Figure 2 This is the second flow chart of a data element processing method provided by the present invention;
[0041] Figure 3 It is a structural schematic diagram of a data element processing device provided by the present invention;
[0042] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Combine the following Figure 1-Figure 4 A data element processing method, device, electronic device and storage medium of the present invention are described.
[0045] like Figure 1 As shown, a data element processing method of an embodiment of the present invention mainly includes step 110, step 120, step 130, step 140 and step 150.
[0046] Step 110: construct a data structure model, and store data based on the data structure model.
[0047] The data structure model is used to define the data labels of entities in the data and the data relationships between entities.
[0048] In this implementation, a data structure model needs to be created to systematically store and manage data. In this model, first, the entities in the data and their attributes (data labels) need to be defined. These entities can be users, products, events, etc., and each entity will have specific characteristics or information. Secondly, the model also needs to describe the relationship between entities, such as "a user buys a product" or "an event occurs at a certain location."
[0049] In this way, the data structure model not only provides a clear framework to make data storage more orderly and efficient, but also enables more complex data query and analysis through clear relationship mapping.
[0050] In some embodiments, constructing a data structure model specifically includes: defining entities and data tags in a relational database; establishing data relationships between entities through primary keys and foreign keys; and constructing a data structure model based on the data relationships.
[0051] First, you need to identify the entities involved in the database, such as "user", "order", "product", etc. Each entity will have corresponding attributes (data labels), for example, "user" may have attributes such as name, email address, registration date, etc.
[0052] On this basis, primary keys and foreign keys are used to define the relationship between entities. A primary key is an attribute that uniquely identifies an entity, such as a user ID in a user table; a foreign key is a primary key that points to another table and is used to represent the association between two entities. For example, in the "Orders" table, a user ID can be used as a foreign key to indicate which user the order belongs to.
[0053] Based on the entities and relationships defined above, build the overall data structure model. This includes determining the table structure, field data types, index settings, etc., to ensure that the database can effectively store and manage data. Through these steps, the integrity and consistency of the data can be ensured, and it is also convenient for future data query and operation.
[0054] Step 120 , when a data update event is monitored, identifying entities in the updated data, data relationships between entities, and data tags.
[0055] An event listener can be set up to receive notifications of data updates in real time. Depending on the implementation of the system, this can be a database trigger, a message queue, or other real-time data streaming service.
[0056] In some embodiments, monitoring a data update event includes: monitoring at least one of a user's data modification input, an external data update push message, and an internal data change task.
[0057] User data modification input refers to the system directly receiving user input, usually in the user interface (UI). When a user modifies a certain data, such as updating personal information, the system will monitor these inputs in real time and process them as data update events.
[0058] External data update push messages This situation involves external systems or services pushing data update notifications to the current system. For example, third-party applications such as payment platforms and management platforms may send data update events through APIs or message queues. When these external data are received, the system will identify and process these updates.
[0059] Internal data change tasks refer to automated tasks or processes within the system, such as periodic data synchronization, batch updates, or background jobs. These tasks may be scheduled tasks, triggers, or data migration processes, in which the system automatically modifies data and generates corresponding update events.
[0060] In this embodiment, by monitoring data update events from different sources, the system can achieve real-time response to data changes, thereby ensuring the accuracy and consistency of data. This mechanism can ensure data synchronization and the accuracy of processing business logic.
[0061] When an event occurs, updated data is extracted, usually transmitted in JSON, XML or other format, containing the updated content.
[0062] According to the structure of the update data, the involved entities are identified. For example, if the update data contains "user ID" and "order ID", it can be determined that "user" and "order" are two related entities.
[0063] Extract the attributes (data tags) of each entity from the updated data. For example, for the "user" entity, you can extract fields such as name and email address; for the "order" entity, you can extract fields such as order amount and status.
[0064] Analyze the relationships between entities, usually based on the existence of foreign keys. For example, check the user ID in the "orders" data to determine which user the order is related to, thus establishing a relationship between "user" and "order".
[0065] Based on the identified entities and relationships, the data structure model is updated. This process involves updating the tables, records or other data storage structures in the database. On this basis, it is also possible to verify whether the update is successful and ensure the consistency and integrity of the data. If there is an error, the data may need to be rolled back or corrected.
[0066] In some embodiments, data tags are also used to indicate business types. In different scenarios such as production, distribution, circulation, consumption, and social service management, the business types of the stored data are also different. For example, in the production scenario, the business types include warehousing, production, quality management, and supply chain management. In the distribution scenario, the business types include marketing management, distribution management, etc. In the consumption scenario, the business types may include dealer management, payment management, bank financial data management, etc.
[0067] Therefore, the data element processing method in the embodiment of the present invention can cover a variety of business types.
[0068] Step 130 , text matching is performed between entities in the updated data and entities under corresponding data tags.
[0069] Relevant entities and their attributes can be extracted from the updated data. Make sure that the extracted entities include fields related to the business type, that is, corresponding to the data label. For example, in a consumption scenario, information such as "dealer ID" and "payment amount" may be extracted.
[0070] According to the entity attributes in the updated data, the corresponding entities in the database or storage system are retrieved. At this time, the relevant data tags are used to filter the data. For example, if the updated data belongs to the "production" scenario, the entities under the relevant tags such as "warehousing" and "production" are queried.
[0071] The extracted entities can be matched with the entities in the stored data in various ways, such as exact matching, direct comparison of IDs, names, etc., and fuzzy matching, using string similarity algorithms for comparison of fields such as names and addresses.
[0072] If a matching entity is found, the stored data is updated. If a matching entity is not found, it can be marked as "pending".
[0073] In some embodiments, after text matching is performed between entities in the updated data and entities under corresponding data tags, a data element processing method of the present invention further includes: when the entity in the updated data matches the corresponding target entity, updating the data of the target entity based on the updated data.
[0074] After completing the text matching between the entity in the updated data and the target entity in the stored data, it has been successfully identified that a certain entity in the updated data, such as a dealer, a product, etc., corresponds to the target entity (an entity of the same type) in the storage system.
[0075] Updated data usually contains some new information or changed content. For example, it may include new sales, inventory quantities, customer information, etc. This information needs to be applied to the target entity.
[0076] Once a match is made, the next step is to apply the information in the updated data to the target entity, which can include field updates and merging data.
[0077] Field update means replacing the corresponding field in the target entity according to the content of the updated data. For example, if there is a new payment amount in the updated data, the system will update the "Payment Amount" field in the target entity.
[0078] Merging data means that in some cases, you may need to merge new data with existing data instead of simply replacing it. For example, when updating inventory, you may need to increase the quantity of new inventory instead of overwriting the original inventory.
[0079] After the update operation is completed, the update operation is recorded for subsequent query and audit. This helps to track the history of data changes and facilitates analysis and troubleshooting. After the update is completed, the update results can be fed back to the user, such as confirming which data has been successfully updated, whether there are errors or unprocessed entities, etc.
[0080] Step 140 : if no corresponding target entity is matched, determine an entity associated with the entity in the updated data from the stored data based on the mutual information value.
[0081] You can analyze the entities in the updated data and all the entities in the stored data and calculate the mutual information value between them. Mutual information measures the degree of dependence between two variables, and a higher value indicates a stronger correlation.
[0082] Based on the calculated mutual information value, candidate entities with high correlation with entities in the updated data are screened out from the stored data. A threshold can be set, and only entities exceeding the threshold are considered to be associated.
[0083] The candidate entities are further validated, possibly using additional features or contextual information, to ensure that the final selected entity is indeed related to the entity in the updated data.
[0084] In this embodiment, identifying potential related entities through mutual information values can help complete data and improve the accuracy and completeness of information. By finding highly relevant entities, false matches can be reduced, ensuring that subsequent data processing is more effective.
[0085] Step 150: Establish a target data relationship between the entity in the updated data and the associated entity, and store the entity in the updated data according to the target data relationship.
[0086] It can be understood that by identifying the relationship between entities in the updated data and the associated entities determined by the mutual information value, a mapping or relationship model can be constructed to represent the target data relationship between these entities.
[0087] Based on this relationship, the entities in the updated data can be organized into a structured format to ensure that the attributes of each entity correspond to its associated target entity. Finally, the organized entity data is stored in the database for subsequent query and analysis. This process ensures the consistency and integrity of the data and improves the efficiency of data management.
[0088] A data element processing method provided in an embodiment of the present invention realizes efficient management of updated data by constructing a flexible data structure model, can timely identify and process entities in data elements and their relationships, and can effectively associate entities under different labels through text matching and mutual information value analysis, thereby reducing data recognition confusion caused by inconsistent labels, thereby improving the accuracy and speed of data storage and retrieval responses, being able to more flexibly adapt to business needs, and reducing the complexity of data management and maintenance costs.
[0089] In some embodiments, Figure 2 As shown, determining an entity associated with an entity in updated data from stored data based on a mutual information value includes steps 210 , 220 , and 230 .
[0090] Step 210, determining a strong entity and a weak entity corresponding to the strong entity from the stored data;
[0091] Step 220, respectively determining a first mutual information value between the entity in the updated data and the strong entity and a second mutual information value between the entity in the updated data and the weak entity;
[0092] Step 230: determining an entity associated with the entity in the updated data from among the strong entities and among the weak entities based on the first mutual information value with the strong entity and the second mutual information value between the weak entities corresponding to the strong entity.
[0093] It is understandable that firstly, it is necessary to identify strong entities from the stored data, which have higher credibility and information content. At the same time, it is necessary to identify weak entities corresponding to strong entities, which have relatively lower credibility and information content.
[0094] Strong entities are entities that can exist independently and have their own primary key, which is used to uniquely identify each entity instance. Its primary key is composed of the attributes of the entity, and the primary key can uniquely identify the entity.
[0095] For example, in a student management system, the "student" entity is a strong entity because each student has a unique student number (primary key) and can exist independently.
[0096] A weak entity is an entity that depends on a strong entity for its existence. It cannot exist alone and does not have its own primary key.
[0097] A weak entity will usually contain a partial key attribute (i.e. the portion of the primary key inherited from the strong entity) and its own attributes.
[0098] For example, in an order management system, an "order item" can be considered a weak entity because it depends on an "order" (a strong entity) to define its existence. An order item typically contains an order number (from the order's primary key) and other attributes such as product name, quantity, etc.
[0099] The first mutual information value is the degree of association between the entity in the update data and the strong entity, reflecting the degree of information association between them.
[0100] The second mutual information value is the degree of association between the entity in the update data and the weak entity, which is used to measure the relationship between these entities.
[0101] Combining the above two mutual information values, we can analyze the relationship between the entities in the updated data and the strong entities and their corresponding weak entities, and then identify their potential associations and determine which entities have a strong association with the entities in the updated data.
[0102] Mutual information (MI) is used to measure the degree of association between two variables. The calculation steps include: defining variables (such as updating entities and strong entities or weak entities), collecting data to build joint probability distributions, calculating marginal and joint probabilities, and then applying the mutual information formula. It can be implemented through programming tools such as Python, and ensure that the data sample is large enough to improve the calculation accuracy. Finally, the potential association between entities is analyzed through the mutual information value.
[0103] In some embodiments, the second mutual information value between the entity and the weak entity in the updated data is determined in the following manner.
[0104] Based on the data relationship between the weak entity and the corresponding strong entity, a text corpus containing the weak entity and the corresponding strong entity can be generated according to the corpus; based on the text corpus, a second mutual information value between the entity and the weak entity in the updated data is determined.
[0105] Based on the known relationship between a weak entity and its corresponding strong entity, the connection between the two in the data structure can be clarified.
[0106] Based on the established relationship, a text corpus containing weak entities and corresponding strong entities is generated using relevant information or data from the corpus. The text corpus can be descriptions, examples, or any relevant content that can capture the semantic relationship between weak entities and strong entities as much as possible.
[0107] In the generated text corpus, statistical or natural language processing methods are used to analyze the relationship between entities and weak entities in the updated data to calculate the frequency of occurrence, co-occurrence pattern, etc., and determine the second mutual information value.
[0108] In other words, in order to generate a text corpus containing weak entities and corresponding strong entities and calculate the second mutual information value, it is first necessary to identify the entities and establish a relationship model. Then, information is extracted from relevant data based on the text corpus to generate descriptive sentences and examples.
[0109] On this basis, the text can be preprocessed, the co-occurrence matrix of weak entities and updated entities can be constructed, and the frequency and probability distribution can be calculated. Finally, the mutual information formula is applied to calculate the second mutual information value and analyze the degree of association between weak entities and updated entities.
[0110] The second mutual information value reflects the degree of information sharing between entities in the updated data and weak entities, thus helping to provide a quantitative basis for correlation analysis. This method can more accurately measure the role of weak entities in the updated data and enhance the system's ability to understand and process complex data relationships.
[0111] In some embodiments, based on the first mutual information value between the strong entity and the second mutual information value between the weak entities corresponding to the strong entity, determining the entity associated with the entity in the updated data from among the strong entities and the weak entities includes the following process.
[0112] When the first mutual information value between the strong entity and the weak entity corresponding to the strong entity is less than a first threshold and the second mutual information value between the weak entity and the strong entity is greater than a second threshold, the weak entity is determined as an entity associated with the entity in the updated data.
[0113] The first threshold is used to determine the relevance between the strong entity and the entity in the updated data. If the first mutual information value is less than the threshold, it means that the entity in the updated data has a weak relationship with the strong entity.
[0114] The second threshold is used to determine the relevance of the weak entity to the entity in the updated data. If the second mutual information value is greater than this threshold, it indicates that there is a strong relationship between the entity in the updated data and the weak entity.
[0115] When conditions are met, such as the first mutual information value is less than the first threshold (weak association) and the second mutual information value is greater than the second threshold (strong association), the weak entity is identified as an entity associated with the entity in the update data.
[0116] In this embodiment, when the strong entity association is weak, it is allowed to find a suitable replacement or associated entity through the strong association of the weak entity, thereby improving the flexibility and accuracy of data processing.
[0117] In some embodiments, when a condition is met, such as the first mutual information value is greater than a first threshold (strong association), the strong entity is directly identified as an entity associated with the entity in the update data.
[0118] When the conditions are met, such as the first mutual information value is less than the first threshold (weak association) and the second mutual information value is less than the second threshold (strong association), the associated entity cannot be found.
[0119] The data element processing device provided by the present invention is described below. The data element processing device described below and the data element processing method described above can be referenced to each other.
[0120] like Figure 3 As shown, a data element processing device according to an embodiment of the present invention mainly includes a construction module 310, a monitoring module 320, a matching module 330, a first processing module 340 and a second processing module 350.
[0121] The construction module 310 is used to construct a data structure model and store data based on the data structure model; the data structure model is used to define data labels of entities in the data and data relationships between entities;
[0122] The monitoring module 320 is used to identify entities in the updated data, data relationships between entities, and data tags when monitoring a data update event;
[0123] The matching module 330 is used to perform text matching between entities in the updated data and entities under corresponding data tags;
[0124] The first processing module 340 is used to determine an entity associated with the entity in the updated data from the stored data based on the mutual information value when no corresponding target entity is matched;
[0125] The second processing module 350 is used to establish a target data relationship between the entity in the updated data and the associated entity, and store the entity in the updated data according to the target data relationship.
[0126] A data element processing device provided in an embodiment of the present invention realizes efficient management of updated data by constructing a flexible data structure model, can timely identify and process entities in data elements and their relationships, and can effectively associate entities under different labels through text matching and mutual information value analysis, thereby reducing data recognition confusion caused by inconsistent labels, thereby improving the accuracy and speed of data storage and retrieval responses, being able to more flexibly adapt to business needs, and reducing the complexity of data management and maintenance costs.
[0127] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the data element processing method, which includes: constructing a data structure model and storing data based on the data structure model; the data structure model is used to define the data tags of entities in the data and the data relationships between entities; in the case of monitoring the data update event, identifying the entities in the updated data, the data relationships between entities and the data tags; performing text matching between the entities in the updated data and the entities under the corresponding data tags; in the case of not matching the corresponding target entity, determining the entity associated with the entity in the updated data from the stored data based on the mutual information value; establishing the target data relationship between the entity in the updated data and the associated entity, and storing the entity in the updated data according to the target data relationship.
[0128] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0129] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data element processing method provided by the above-mentioned methods, which includes: constructing a data structure model and storing data based on the data structure model; the data structure model is used to define data labels of entities in the data and data relationships between entities; when a data update event is monitored, the entities in the updated data, the data relationships between entities, and the data labels are identified; text matching is performed between the entities in the updated data and the entities under the corresponding data labels; when the corresponding target entity is not matched, the entity associated with the entity in the updated data is determined from the stored data based on the mutual information value; a target data relationship is established between the entity in the updated data and the associated entity, and the entity in the updated data is stored according to the target data relationship.
[0130] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the data element processing method provided by the above-mentioned methods, the method comprising: constructing a data structure model, and storing data based on the data structure model; the data structure model is used to define data labels of entities in the data and data relationships between entities; when a data update event is monitored, identifying entities in the updated data, data relationships between entities, and data labels; text matching the entities in the updated data with entities under corresponding data labels; when no corresponding target entity is matched, determining entities associated with the entities in the updated data from the stored data based on mutual information values; establishing a target data relationship between the entities in the updated data and the associated entities, and storing the entities in the updated data according to the target data relationship.
[0131] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data element processing method, characterized in that: include: Constructing a data structure model and storing data based on the data structure model; the data structure model is used to define data labels of entities in the data and data relationships between entities; When a data update event is detected, identify entities in the updated data, data relationships between entities, and data labels; Perform text matching between entities in the updated data and entities under corresponding data labels; In the case where no corresponding target entity is matched, determining an entity associated with the entity in the updated data from the stored data based on the mutual information value; A target data relationship is established between the entity in the updated data and the associated entity, and the entity in the updated data is stored according to the target data relationship.
2. The data element processing method according to claim 1, characterized in that: The determining, from the stored data based on the mutual information value, an entity associated with the entity in the updated data comprises: Determining a strong entity and a weak entity corresponding to the strong entity from the stored data; respectively determining a first mutual information value between the entity in the updated data and the strong entity and a second mutual information value between the entity in the updated data and the weak entity; Based on the first mutual information value between the strong entity and the second mutual information value between the weak entities corresponding to the strong entity, an entity associated with the entity in the updated data is determined from among the strong entities and the weak entities.
3. The data element processing method according to claim 2, characterized in that: The determining, based on the first mutual information value between the strong entity and the second mutual information value between the weak entities corresponding to the strong entity, an entity associated with the entity in the updated data from among the strong entities and the weak entities comprises: When a first mutual information value between the strong entity and the weak entity corresponding to the strong entity is less than a first threshold and a second mutual information value between the weak entity and the strong entity is greater than a second threshold, the weak entity is determined as an entity associated with the entity in the updated data.
4. The data element processing method according to claim 2, characterized in that: The second mutual information value between the entity and the weak entity in the updated data is determined as follows: Based on the data relationship between the weak entity and the corresponding strong entity, generating a text corpus containing the weak entity and the corresponding strong entity according to the corpus; Based on the text corpus, a second mutual information value between the entity and the weak entity in the updated data is determined.
5. The data element processing method according to claim 1, characterized in that: After text matching the entities in the updated data with the entities under the corresponding data tags, the method further includes: In the case where the entity in the updated data matches the corresponding target entity, the data of the target entity is updated based on the updated data.
6. The data element processing method according to claim 1, characterized in that: The monitoring of the data update event includes: monitoring at least one of the user's data modification input, external data update push message and internal data change task.
7. The data element processing method according to claim 1, characterized in that: The constructing of the data structure model comprises: Define entities and data labels in relational databases; Establish data relationships between entities through primary keys and foreign keys; The data structure model is constructed based on data relations.
8. A data element processing device, characterized in that: include: A construction module, used to construct a data structure model and store data based on the data structure model; The data structure model is used to define data labels of entities in the data and data relationships between entities; A monitoring module, used to identify entities in the updated data, data relationships between entities, and data labels when a data update event is monitored; A matching module, used to perform text matching between entities in the updated data and entities under corresponding data tags; A first processing module, configured to determine, from the stored data, an entity associated with the entity in the updated data based on the mutual information value if no corresponding target entity is matched; The second processing module is used to establish a target data relationship between the entity in the updated data and the associated entity, and store the entity in the updated data according to the target data relationship.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor executes the program, it implements the data element processing method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the data element processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Storage method and management system for high-association big data
CN106227800A
Interactive data migration method from relational data to graph data
CN109753537A
Knowledge graph updating method and device
CN113127494A
Interactive knowledge graph data editing computer device and method
CN116090554A
Data management method and system based on identifier analysis and storage medium
CN116991847A