A method, device and computer equipment for writing knowledge graph data

By introducing a rule system into the data writing path of the knowledge graph system, checksum and standardizes the written data, data exception problem is solved, data accuracy is improved, and method reusability and flexibility are improved.

CN119025686BActive Publication Date: 2025-02-07SUZHOU LANGDONG NET TEC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411533710.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-07
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect and avoid data abnormalities during the data writing process of the knowledge graph system, resulting in the impact of data accuracy.

Method used

By introducing a rule system, preset public rules and custom rules are checked for the data to be written, the first verification label and the second verification label are generated, and data is standardized based on these labels, and the standardized data is finally written. Enter the knowledge graph system.

Benefits of technology

It effectively avoids abnormal data entering the knowledge graph system, improves the accuracy of the data, and improves the reusability and flexibility of the data writing method through the combination of public rules and custom rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025686B_ABST
    Figure CN119025686B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and computer equipment for writing knowledge graph data. The method includes: obtaining the data to be written in the knowledge graph system, inputting the data to be written into the rule system; verifying the data to be written using a preset public rule through the rule system, and obtaining a first verification tag corresponding to the data to be written; verifying the data to be written using a custom rule that matches the current business needs, and obtaining a second verification tag corresponding to the data to be written; in response to the first verification tag and the second verification tag satisfying the standardization conditions, performing data standardization processing on the data to be written, and obtaining corresponding standardized data; and writing the standardized data into the knowledge graph system. This method can verify and standardize the data to be written into the knowledge graph, thereby avoiding the influence of abnormal data or abnormal data writing operations on the knowledge graph system, and improving the data accuracy of the knowledge graph system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a method, apparatus and computer equipment for writing knowledge graph data. Background Art

[0002] In the knowledge graph system, high-frequency data writing operations usually occur nearly 10 million times a day. In the prior art, the received knowledge graph data is generally directly written into the knowledge graph system in real time. However, once there is a possible data anomaly in the process of writing the knowledge graph data, it is easy to cause abnormal data values ​​to enter the knowledge graph system. At the same time, due to the huge amount of data storage in the knowledge graph system, it is difficult to find abnormal data values, which affects the data accuracy of the knowledge graph system. Summary of the invention

[0003] Based on this, it is necessary to provide a knowledge graph data writing method, device and computer equipment with high data accuracy to address the above technical problems.

[0004] In a first aspect, the present application provides a method for writing knowledge graph data, comprising:

[0005] Obtaining data to be written into the knowledge graph system, and inputting the data to be written into the rule system;

[0006] Verifying the data to be written by using a preset common rule through the rule system to obtain a first verification tag corresponding to the data to be written;

[0007] Verifying the data to be written by using a custom rule matching the current business requirements through the rule system to obtain a second verification tag corresponding to the data to be written;

[0008] In response to the first verification tag and the second verification tag satisfying a standardization condition, the rule system performs data standardization processing on the data to be written to obtain corresponding standardized data;

[0009] The standardized data is written into the knowledge graph system through the rule system.

[0010] In one embodiment, the method of verifying the data to be written by the rule system using a custom rule matching the current business requirement to obtain a second verification tag corresponding to the data to be written includes:

[0011] The rule system converts the data to be written according to the data type matched by the custom rule to obtain the data content of the data to be written under the data type;

[0012] The data content is verified by the rule system using the custom rule to obtain a second verification tag corresponding to the data to be written.

[0013] In one embodiment, in response to the first verification tag and the second verification tag satisfying the standardization condition, performing data standardization processing on the data to be written by the rule system to obtain corresponding standardized data includes:

[0014] In the case where both the first verification label and the second verification label are standardizable labels, determining that the first verification label and the second verification label meet the standardization condition;

[0015] In response to the first verification tag and the second verification tag satisfying the standardization condition, the rule system performs data standardization processing on the data to be written in a standardized manner corresponding to the first verification tag and the second verification tag to obtain the standardized data.

[0016] In one embodiment, the method further comprises:

[0017] In response to the first verification tag and the second verification tag not satisfying the standardized condition, the to-be-written data is pushed to an alarm system by the rule system;

[0018] The alarm system performs alarm processing on the data to be written to obtain an alarm processing result of the data to be written.

[0019] In one embodiment, the step of obtaining the data to be written in the knowledge graph system and inputting the data to be written into the rule system includes:

[0020] Obtaining the data to be written into the knowledge graph system from the real-time data stream through a preset stream tool;

[0021] The data to be written is input into the rule system through the stream tool.

[0022] In one embodiment, the step of obtaining the data to be written in the knowledge graph system and inputting the data to be written into the rule system includes:

[0023] When the knowledge graph system is cold started, the data to be written is obtained from the full offline data, and the data to be written is input into the rule system.

[0024] In a second aspect, the present application also provides a knowledge graph data writing device, comprising:

[0025] A data acquisition module is used to acquire the data to be written into the knowledge graph system and input the data to be written into the rule system;

[0026] A first verification module, configured to verify the data to be written by using a preset common rule through the rule system to obtain a first verification tag corresponding to the data to be written;

[0027] A second verification module, used to verify the data to be written by using a custom rule matching the current business requirements through the rule system, and obtain a second verification tag corresponding to the data to be written;

[0028] A standardization module, configured to perform data standardization processing on the data to be written in response to the first verification tag and the second verification tag satisfying a standardization condition through the rule system to obtain corresponding standardized data;

[0029] A data writing module is used to write the standardized data into the knowledge graph system through the rule system.

[0030] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the knowledge graph data writing method described in any embodiment of the first aspect when executing the computer program.

[0031] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for writing knowledge graph data as described in any one of the embodiments of the first aspect above is implemented.

[0032] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the method for writing knowledge graph data described in any one of the embodiments of the first aspect above is implemented.

[0033] The above-mentioned knowledge graph data writing method, device, computer equipment, computer-readable storage medium and computer program product obtain the data to be written in the knowledge graph system, input the data to be written into the rule system, use the preset public rules to verify the data to be written through the rule system, and obtain a first verification tag corresponding to the data to be written, and use the custom rules matching the current business needs to verify the data to be written through the rule system to obtain a second verification tag corresponding to the data to be written, and the rule system responds to the first verification tag and the second verification tag satisfying the standardization conditions to perform data standardization processing on the data to be written to obtain the corresponding standardized data, and writes the standardized data into the knowledge graph system through the rule system. Starting from the data writing path of the knowledge graph, the data to be written into the knowledge graph can be verified and standardized, thereby avoiding the influence of abnormal data or abnormal data writing operations on the knowledge graph system, and improving the data accuracy of the knowledge graph system.

[0034] In addition, by adopting the above-mentioned knowledge graph data writing method, not only can highly abstract public rules be used to ensure the reusability of the knowledge graph data writing method for any data to be written, but also custom rules that meet current business needs can be used to improve the flexibility of the knowledge graph data writing method for any data writing scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0036] FIG1 is an application environment diagram of a method for writing knowledge graph data in one embodiment;

[0037] FIG2 is a schematic diagram of a flow chart of a method for writing knowledge graph data in one embodiment;

[0038] Figure 3 A schematic diagram of a flow chart of a method for writing knowledge graph data in another embodiment;

[0039] Figure 4 It is an application environment diagram of the method for writing knowledge graph data in another embodiment;

[0040] Figure 5 It is a structural block diagram of a knowledge graph data writing device 500 in one embodiment;

[0041] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0044] The knowledge graph data writing method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. Among them, the server 100 can be, but is not limited to, an independent physical server, a server cluster or distributed system composed of multiple servers, or a cloud server providing cloud services, etc. The rule system 130 and the knowledge graph system 150 can be deployed in the server 100, and the rule system 130 and the knowledge graph system 150 can communicate through a data interface.

[0045] Specifically, the server 100 can obtain the data to be written 10 of the knowledge graph system 150, and input the data to be written 10 into the rule system 130. The data to be written 10 is input into the public rule verification module 132 through the rule system 130, and the public rule verification module 132 verifies the data to be written 10 using the preset public rules to obtain the first verification tag corresponding to the data to be written 10.

[0046] The server 100 can input the data to be written 10 into the custom rule verification module 134 through the rule system 130, and the custom rule verification module 134 uses custom rules matching the current business needs to verify the data to be written 10 to obtain a second verification tag corresponding to the data to be written 10.

[0047] The server 100 can input the data to be written 10 and the first verification tag and the second verification tag corresponding to the data to be written 10 to the standardization inference engine module 136 through the rule system 130. In response to the first verification tag and the second verification tag satisfying the standardization condition, the standardization inference engine module 136 performs data standardization processing on the data to be written 10 to obtain the corresponding standardized data 11. The standardized data 11 is input into the knowledge graph system 150 through the rule system 130.

[0048] In this embodiment, before the data to be written is input into the knowledge graph system, the rule system is referenced to perform a secondary check on the data to be written using public rules and custom rules, and whether the data to be written can be directly standardized is determined based on the first check tag and the second check tag, and finally the standardized data corresponding to the data to be written is written into the knowledge graph system 150, which can avoid the operation behavior that may contain abnormal data in the data writing path of the knowledge graph system and ensure the data accuracy of the knowledge graph system. In addition, since the rule system provided in this embodiment can be connected to the knowledge graph system in a decoupled manner, it has strong flexibility and scalability and can be applied to most application scenarios that require data writing.

[0049] In an exemplary embodiment, as shown in FIG2 , a method for writing knowledge graph data is provided, which is described by taking the method applied to the server 100 in FIG1 as an example, and includes the following steps S202 to S208. Among them:

[0050] Step S202, obtain the data to be written into the knowledge graph system, and input the data to be written into the rule system.

[0051] The knowledge graph system can be used to store the standardized graph data relationship network. Optionally, in some embodiments, the knowledge graph system can adopt a distributed system to provide higher data throughput and data capacity.

[0052] The data to be written may include but is not limited to structured data and unstructured data.

[0053] A rule-based system can be used to characterize a software system that runs according to established program rules.

[0054] Exemplarily, the server can obtain the data to be written to the knowledge graph system from a local database or a data communication network. Alternatively, the server can also receive the data to be written input or uploaded by the user through the front-end interactive component. Alternatively, the server can also access the rule system before the data writing node of the knowledge graph system to intercept the data to be written to the knowledge graph system. Input the data to be written into the rule system. Optionally, in some embodiments, the server can also perform pre-processing such as data cleaning, denoising, and stop word removal on the data to be written, and then input the pre-processed data to be written into the rule system.

[0055] Step S204: verifying the data to be written by the rule system using a preset common rule to obtain a first verification tag corresponding to the data to be written.

[0056] Common rules may be used to represent common rules applicable to all data to be written. For example, common rules may include but are not limited to rules for the length of the primary key in the data to be written, rules for the primary key data type, or rules for whether there are numeric characters.

[0057] The first verification tag may include but is not limited to tags indicating that the data to be written can be standardized, that the data to be written needs manual review to determine whether it can be standardized, or that the data to be written cannot be standardized.

[0058] Exemplarily, common rules for all data to be written may be stored in the rule system. The server may execute a verification instruction program corresponding to the preset common rules through the rule system to verify the data to be written using the preset common rules. Optionally, in some embodiments, when the data to be written does not trigger the alarm condition in the common rules, a first verification tag that can be standardized and corresponds to the data to be written may be generated. In other embodiments, when the data to be written triggers the alarm condition in the common rules, a first verification tag that needs manual review or cannot be standardized and corresponds to the data to be written may be generated.

[0059] Step S206: The data to be written is verified by the rule system using a custom rule that matches the current business requirement to obtain a second verification tag corresponding to the data to be written.

[0060] Among them, custom rules can be used to represent the rules customized by business personnel according to the requirements of different business scenarios. For example, when a business scenario needs to filter out data exceeding a preset percentage, a custom rule can be customized to convert the data type of the data to be written to obtain the data to be written under the percentage. When a business requirement includes that a preset special character cannot appear, a custom rule can be customized to replace the special character in the data to be written.

[0061] The second verification tag, similar to the first verification tag mentioned above, may also include but is not limited to tags indicating that the data to be written can be standardized, that the data to be written needs manual review to determine whether it can be standardized, or that the data to be written cannot be standardized.

[0062] Exemplarily, the rule system may also store custom rules that match current business needs. Alternatively, the rule system may also receive custom rules input by business personnel for current business needs in real time through the front-end interactive component. The server may execute the instruction program corresponding to the custom rules through the rule system to verify the data to be written using the custom rules. Referring to the generation operation of the first verification tag provided in the above embodiment, a second verification tag corresponding to the data to be written is generated according to the verification result of the data to be written and the custom rules.

[0063] Step S208: In response to the first verification tag and the second verification tag satisfying the standardization condition, the rule system performs data standardization processing on the data to be written to obtain corresponding standardized data.

[0064] Among them, the standardization conditions may include but are not limited to any of the following conditions: the first verification tag and the second verification tag are both tags that can be standardized for the data to be written, the first verification tag is a tag that can be standardized for the data to be written, the first verification tag and the second verification tag do not carry tags that cannot be standardized, etc.

[0065] Exemplarily, an inference engine may also be deployed in the rule system, and the inference engine may be used to perform data standardization processing on the data to be written. The server may input the first verification tag and the second verification tag of the data to be written into the inference engine through the rule system. The inference engine uses the standardized condition to compare the first verification tag and the second verification tag. In response to the first verification tag and the second verification tag satisfying the standardized condition, the data to be written is subjected to data standardization processing according to a preset instruction program to obtain corresponding standardized data.

[0066] Step S210, write the standardized data into the knowledge graph system through the rule system.

[0067] Exemplarily, the server can connect the standardized data export in the rule system with the data writing import of the knowledge graph system, and write the standardized data into the knowledge graph system through the rule system. The knowledge graph system can then perform named entity recognition on the standardized data to determine the entity type to which the standardized data belongs or the relationship type in the standardized data. Furthermore, the graph data corresponding to the standardized data is generated and the corresponding graph data is stored.

[0068] In the above-mentioned knowledge graph data writing method, by obtaining the data to be written from the knowledge graph system, the data to be written is input into the rule system, the rule system uses preset public rules to verify the data to be written, and obtains a first verification tag corresponding to the data to be written, and the rule system uses custom rules matching current business needs to verify the data to be written, and obtains a second verification tag corresponding to the data to be written, and the rule system responds to the first verification tag and the second verification tag satisfying the standardization conditions, performs data standardization processing on the data to be written, and obtains corresponding standardized data, and writes the standardized data into the knowledge graph system through the rule system. Starting from the data writing path of the knowledge graph, the data to be written into the knowledge graph can be verified and standardized, thereby avoiding the influence of abnormal data or abnormal data writing operations on the knowledge graph system, and improving the data accuracy of the knowledge graph system.

[0069] In addition, by adopting the above-mentioned knowledge graph data writing method, not only can highly abstract public rules be used to ensure the reusability of the knowledge graph data writing method for any data to be written, but also custom rules that meet current business needs can be used to improve the flexibility of the knowledge graph data writing method for any data writing scenario.

[0070] In an exemplary embodiment, the above step S206 may also be implemented in the following manner:

[0071] The rule system converts the data to be written according to the data type matched by the custom rule to obtain the data content of the data to be written under the data type; the rule system uses the custom rule to verify the data content to obtain a second verification tag corresponding to the data to be written.

[0072] The data type may include but is not limited to any one or more of various types such as percentage, decimal, character, etc.

[0073] Exemplarily, the custom rules may include data types that match current business requirements and rules related to data under the data type. The server may convert the data to be written according to the data type corresponding to the custom rules that match current business requirements through the rule system to obtain the data content of the data to be written under the data type. The rule system uses the rules related to the data under the data type in the custom rules to verify the data content and obtain a second verification tag corresponding to the data to be written.

[0074] For example, in some embodiments, when the custom rule includes filtering out data with a business ratio exceeding 80%, the server can convert the data to be written according to the percentage data type matched by the custom rule through the rule system to obtain the percentage data corresponding to the data to be written. The percentage data corresponding to the data to be written is verified using the custom rule through the rule system. When the percentage data is less than 80%, a second verification tag that cannot be standardized is generated corresponding to the data to be written. When the percentage data is greater than 80%, a second verification tag that can be standardized is generated corresponding to the data to be written.

[0075] Alternatively, in other embodiments, when the custom rule includes replacing the special character X with Y, the server can convert the special character in the data to be written according to the character data type matched by the custom rule through the rule system to obtain the data content of the data to be written under the character data type. The rule system uses the custom rule to verify the data content, and when it is determined that the character Y exists in the data content, a second verification tag can be generated for standardizing the data to be written.

[0076] Alternatively, in other embodiments, when a custom rule includes that a certain business value needs to be a decimal, the server can convert the data to be written according to the floating-point type matched by the custom rule (that is, the data type corresponding to the decimal in the computer language) to obtain the data content of the data to be written under the floating-point type. The data content is verified using the custom rules through the rule system. When it is found that the data to be written cannot be converted to a floating-point type, a second verification tag that cannot be standardized can be generated corresponding to the data to be written. When it is determined that the data to be written carries data content of the floating-point type, a second verification tag that can be standardized can be generated corresponding to the data to be written.

[0077] In this embodiment, the data to be written is converted according to the data type matched by the custom rule, and the data content of the converted data to be written under the data type is verified using the custom rule to obtain a second verification label corresponding to the data to be written. This can improve the verification flexibility of the data to be written and improve the generation accuracy of the second verification label.

[0078] In an exemplary embodiment, the above step S208 can be implemented in the following manner:

[0079] When both the first verification tag and the second verification tag are standardizable tags, determine that the first verification tag and the second verification tag satisfy the standardization condition; in response to the first verification tag and the second verification tag satisfying the standardization condition, the rule system performs data standardization processing on the data to be written using the standardized method corresponding to the first verification tag and the second verification tag to obtain standardized data.

[0080] Exemplarily, the rule system may store a standardization condition that both the first verification tag and the second verification tag are standardizable tags that can be standardized. The inference engine may be configured to perform data standardization operations according to the standardized method corresponding to the verification tag. The server may determine through the rule system that the first verification tag and the second verification tag meet the standardization condition when both the first verification tag and the second verification tag are standardizable tags. In response to the case where both the first verification tag and the second verification tag are standardizable tags, the inference engine in the rule system performs data standardization processing on the data to be written using the standardized method corresponding to the first verification tag and the second verification tag to obtain standardized data corresponding to the data to be written.

[0081] For example, in some embodiments, when the standardized method corresponding to the first verification tag is that the primary key length is within the preset length threshold, the server can execute the standardized method corresponding to the first verification tag through the inference engine, and obtain the data content within the preset length threshold from the data to be written as the standardized data corresponding to the data to be written. Alternatively, in other embodiments, when the standardized method corresponding to the second verification tag is to extract the data content under the preset data type, the server can execute the standardized method corresponding to the second verification tag through the inference engine, perform data conversion processing on the data to be written, and obtain the data content of the data to be written under the preset data type as the corresponding standardized data.

[0082] In this embodiment, by performing data standardization processing on the data to be written according to the standardization method corresponding to the first verification tag and the second verification tag to obtain corresponding standardized data, the efficiency of data standardization processing and the data accuracy of the standardized data can be improved.

[0083] In an exemplary embodiment, the knowledge graph data writing method provided in this application may also include the following steps:

[0084] In response to the first verification tag and the second verification tag not satisfying the standardized condition, the data to be written is pushed to the alarm system through the rule system; the alarm system performs alarm processing on the data to be written to obtain an alarm processing result related to the data to be written.

[0085] Exemplarily, an alarm system may also be run in the server. In the case where the first check tag and the second check tag do not meet the standardization conditions, the data to be written may be regarded as data that cannot be standardized. Therefore, the server may push the data to be written to the alarm system in response to the first check tag and the second check tag of the data to be written not meeting the standardization conditions through a rule system. The alarm system performs alarm processing on the data to be written based on a preset instruction program, for example, sending abnormal data to business personnel to inform the business personnel to manually review the abnormal data, or the data to be written may be written to an abnormal database for persistent storage, or the data to be written may be directly discarded to obtain an alarm processing result corresponding to the data to be written.

[0086] In this embodiment, in response to the first verification tag and the second verification tag of the data to be written not satisfying the standardization conditions, the rule system pushes the data to be written to the alarm information, and the alarm processing is performed on the data to be written that cannot be standardized through the alarm information, which can ensure that the abnormal data to be written can be discovered and processed in time.

[0087] In an exemplary embodiment, the above step S202 may also be implemented in the following manner:

[0088] The data to be written into the knowledge graph system is obtained from the real-time data stream through the preset stream tool; the data to be written is input into the rule system through the stream tool.

[0089] Among them, the stream tool can be used to receive and process real-time data streams.

[0090] Exemplarily, the server can also run or call a preset stream tool (such as Kafka, Pulsar, etc.) to obtain the data to be written into the knowledge graph system from the real-time data stream through the preset stream tool, and input the data to be written into the rule system through the preset stream tool.

[0091] In this embodiment, by introducing a preset stream tool to obtain the data to be written from the real-time data stream, and inputting the data to be written into the rule system for verification and standardization, the real-time performance of writing data in the knowledge graph system can be guaranteed.

[0092] In an exemplary embodiment, the above step S202 may also be implemented in the following manner:

[0093] When the knowledge graph system is cold started, the data to be written is obtained from the offline full data and input into the rule system.

[0094] For example, when the knowledge graph system is cold started, an offline full data synchronization is required. Therefore, when the knowledge graph system is cold started, the server can obtain the data to be written from the offline full data and input the data to be written into the rule system for verification and standardization.

[0095] In this embodiment, when the knowledge graph system is cold started, the data to be written is obtained from the offline full data of the knowledge graph system, and the data to be written is input into the rule system, so as to ensure the accuracy of the data written in the knowledge graph system.

[0096] In an exemplary embodiment, Figure 3 As shown, a method for writing knowledge graph data is also provided, including the following steps S302 to S312. Among them:

[0097] Step S302: Obtain the data to be written into the knowledge graph system from the offline full data and the real-time data stream, and input the data to be written into the rule system.

[0098] For example, Figure 4 As shown, the rule system 130 can be connected to the preset stream tool 400 and the distributed file system 410 (Hadoop Distributed File System, HDFS system for short) respectively. The server can receive the real-time data stream through the preset stream tool 400, obtain the data to be written of the knowledge graph system 150 from the real-time data stream, and input the data to be written into the rule system 130. The server can also read the data to be written of the knowledge graph system 150 from the offline full data stored in the distributed file system 410 when the knowledge graph system 150 is cold started, and input the data to be written into the rule system 130.

[0099] Step S304: verify the data to be written by using a preset common rule through a rule system to obtain a first verification tag corresponding to the data to be written.

[0100] Step S306, the rule system converts the data to be written into data content under the corresponding data type according to the custom rules matching the current business needs, and verifies the data content using the custom rules to obtain a second verification tag corresponding to the data to be written.

[0101] Step S308: Determine whether the standardization condition is met according to the first verification tag and the second verification tag through a rule system.

[0102] Exemplarily, the server can refer to the steps for generating the first verification tag and the second verification tag provided in the above embodiment, and use the preset public rules and the custom rules matching the current business requirements to verify the data to be written through the rule system 130, so as to obtain the first verification tag and the second verification tag of the data to be written. The first verification tag and the second verification tag are input into the inference engine through the rule system 130. The inference engine is used to determine whether the data to be written meets the standardization conditions according to the first verification tag and the second verification tag.

[0103] Step S310, in response to the first verification tag and the second verification tag satisfying the standardization conditions, the data to be written is subjected to data standardization processing using a standardized method corresponding to the first verification tag and the second verification tag to obtain standardized data and write it into the knowledge graph system.

[0104] Exemplarily, the server can use the inference engine in the rule system 130 to respond to the first verification tag and the second verification tag satisfying the standardization condition, and treat the data to be written as data that can be standardized. Referring to the data standardization processing method provided in the above embodiment, the data to be written is processed by the standardization method corresponding to the first verification tag and the second verification tag to obtain standardized data corresponding to the data to be written. The standardized data is written into the knowledge graph system 150 through the rule system 130.

[0105] Step S312, in response to the first verification tag and the second verification tag not satisfying the standardized condition, the data to be written is pushed to the alarm system, and the alarm system performs alarm processing on the data to be written to obtain an alarm processing result of the data to be written.

[0106] Exemplarily, the server can respond to the first verification tag and the second verification tag not satisfying the standardization condition through the inference engine in the rule system 130, and treat the data to be written as data that cannot be standardized. The data to be written is pushed to the alarm system 440 through the rule system 130, and the alarm system 440 performs alarm processing on the data to be written, for example, the data to be written is sent to the terminal of the business personnel, and the business personnel conducts review processing. Thus, the alarm processing result of the data to be written is obtained.

[0107] In this embodiment, by introducing a rule system to verify and standardize the data to be written before it enters the knowledge graph system, the accuracy of the data stored in the knowledge graph system can be guaranteed. By using common public rules and custom rules that match current business needs to perform secondary verification on the data to be written, not only can the reusability of public rules be utilized to reduce the number of rules used each time data is written, but also the flexibility of custom rules can be utilized to introduce current business needs in the form of incremental rules during the data verification process, thereby obtaining a data writing verification method suitable for different business scenarios. In addition, in this embodiment, the alarm system is used to perform alarm processing on the data to be written that cannot be standardized, so that abnormal data in the data writing process can be reviewed and summarized in a timely manner.

[0108] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0109] Based on the same inventive concept, the embodiment of the present application also provides a knowledge graph data writing device for implementing the knowledge graph data writing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more knowledge graph data writing device embodiments provided below can refer to the limitations of the knowledge graph data writing method above, and will not be repeated here.

[0110] In an exemplary embodiment, Figure 5 As shown, a knowledge graph data writing device 500 is provided, comprising: a data acquisition module 502, a first verification module 504, a second verification module 506, a standardization module 508 and a data writing module 510, wherein:

[0111] The data acquisition module 502 is used to acquire the data to be written into the knowledge graph system and input the data to be written into the rule system.

[0112] The first verification module 504 is used to verify the data to be written by using a preset common rule through a rule system to obtain a first verification tag corresponding to the data to be written.

[0113] The second verification module 506 is used to verify the data to be written by using a custom rule matching the current business requirements through a rule system to obtain a second verification tag corresponding to the data to be written.

[0114] The standardization module 508 is used to perform data standardization processing on the data to be written in response to the first verification tag and the second verification tag satisfying the standardization condition through a rule system to obtain corresponding standardized data.

[0115] The data writing module 510 is used to write standardized data into the knowledge graph system through a rule system.

[0116] In an exemplary embodiment, the second verification module 506 includes: a type conversion unit, which is used to convert the data to be written according to the data type matched by the custom rule through the rule system, and obtain the data content of the data to be written under the data type; a content verification unit, which is used to verify the data content using the custom rule through the rule system to obtain a second verification tag corresponding to the data to be written.

[0117] In an exemplary embodiment, the standardization module 508 includes: a condition judgment unit, which is used to determine that the first verification tag and the second verification tag meet the standardization condition when both the first verification tag and the second verification tag are standardizable tags; a standardization processing unit, which is used to respond to the first verification tag and the second verification tag meeting the standardization condition through a rule system, and perform data standardization processing on the data to be written using a standardized method corresponding to the first verification tag and the second verification tag to obtain standardized data.

[0118] In an exemplary embodiment, the knowledge graph data writing device 500 also includes: an alarm processing module, which is used to push the data to be written to the alarm system in response to the first verification tag and the second verification tag not satisfying the standardized conditions through a rule system; perform alarm processing on the data to be written through the alarm system to obtain an alarm processing result related to the data to be written.

[0119] In an exemplary embodiment, the data acquisition module 502 is also used to acquire the data to be written into the knowledge graph system from the real-time data stream through a preset stream tool; and input the data to be written into the rule system through the stream tool.

[0120] In an exemplary embodiment, the data acquisition module 502 is also used to obtain the data to be written from the offline full data when the knowledge graph system is cold started, and input the data to be written into the rule system.

[0121] Each module in the above-mentioned knowledge graph data writing device 500 can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0122] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data to be written, public rules, custom rules, first verification labels, second verification labels, standardized conditions, standardized data and other data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for writing knowledge graph data is implemented.

[0123] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0124] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0125] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0126] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0127] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0128] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0129] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for writing knowledge graph data, characterized in that: The method comprises: Obtaining data to be written into the knowledge graph system, and inputting the data to be written into the rule system; Verifying the data to be written by using a preset common rule through the rule system to obtain a first verification tag corresponding to the data to be written; Verifying the data to be written by using a custom rule matching the current business requirements through the rule system to obtain a second verification tag corresponding to the data to be written; In response to the first verification tag and the second verification tag satisfying a standardization condition, the rule system performs data standardization processing on the data to be written to obtain corresponding standardized data; Writing the standardized data into the knowledge graph system through the rule system; Wherein, the method further comprises: In response to the first verification tag and the second verification tag not satisfying the standardized condition, the to-be-written data is pushed to an alarm system by the rule system; The alarm system performs alarm processing on the data to be written to obtain an alarm processing result of the data to be written.

2. The method according to claim 1, characterized in that The method of verifying the data to be written by using the rule system using a custom rule matching the current business requirement to obtain a second verification tag corresponding to the data to be written includes: The rule system converts the data to be written according to the data type matched by the custom rule to obtain the data content of the data to be written under the data type; The data content is verified by the rule system using the custom rule to obtain a second verification tag corresponding to the data to be written.

3. The method according to claim 1, characterized in that The step of performing data standardization processing on the data to be written in response to the first verification tag and the second verification tag satisfying the standardization condition by the rule system to obtain corresponding standardized data includes: In the case where both the first verification label and the second verification label are standardizable labels, determining that the first verification label and the second verification label meet the standardization condition; In response to the first verification tag and the second verification tag satisfying the standardization condition, the rule system performs data standardization processing on the data to be written in a standardized manner corresponding to the first verification tag and the second verification tag to obtain the standardized data.

4. The method according to any one of claims 1 to 3, characterized in that The step of obtaining the data to be written into the knowledge graph system and inputting the data to be written into the rule system includes: Obtaining the data to be written into the knowledge graph system from the real-time data stream through a preset stream tool; The data to be written is input into the rule system through the stream tool.

5. The method according to any one of claims 1 to 3, characterized in that The step of obtaining the data to be written into the knowledge graph system and inputting the data to be written into the rule system includes: When the knowledge graph system is cold started, the data to be written is obtained from the full offline data, and the data to be written is input into the rule system.

6. A knowledge graph data writing device, characterized in that: The device comprises: A data acquisition module is used to acquire the data to be written into the knowledge graph system and input the data to be written into the rule system; A first verification module, configured to verify the data to be written by using a preset common rule through the rule system to obtain a first verification tag corresponding to the data to be written; A second verification module, used to verify the data to be written by using a custom rule matching the current business requirements through the rule system, and obtain a second verification tag corresponding to the data to be written; A standardization module, configured to perform data standardization processing on the data to be written in response to the first verification tag and the second verification tag satisfying a standardization condition through the rule system to obtain corresponding standardized data; A data writing module, used for writing the standardized data into the knowledge graph system through the rule system; Wherein, the device further comprises: An alarm processing module is used to push the data to be written to the alarm system in response to the first verification tag and the second verification tag not satisfying the standardized condition through the rule system; perform alarm processing on the data to be written through the alarm system to obtain the alarm processing result of the data to be written.

7. The device according to claim 6, characterized in that The second verification module comprises: A type conversion unit, used to convert the data to be written according to the data type matched by the custom rule through the rule system to obtain the data content of the data to be written under the data type; A content verification unit is used to verify the data content by using the custom rule through the rule system to obtain a second verification tag corresponding to the data to be written.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Graph database data importing method and system

    CN116701717A

  • Abnormal list processing method and device based on rule verification, and medium

    CN117474626A