Knowledge extraction model application method and device

By generating an online service interface for the pre-trained knowledge extraction model, the problem of low resource utilization in the existing technology is solved, the independent application of the knowledge extraction model and the efficient utilization of resources are realized, and the functions of the document processing application are enriched.

CN118569375APending Publication Date: 2024-08-30THE FOURTH PARADIGM BEIJING TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310377954.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing knowledge extraction models have low resource utilization and fail to fully utilize the computing resources consumed in the process of training the model.

Method used

An application method and device for a knowledge extraction model is provided. By generating an online service interface of a pre-trained model, document processing applications are allowed to directly call it to realize knowledge extraction, and correct knowledge information is added and updated during the model training process.

Benefits of technology

It improves resource utilization, realizes the independent application of knowledge extraction models, enriches the functions of document processing applications, and reduces the heavy workload of manual extraction of knowledge information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569375A
    Figure CN118569375A
Patent Text Reader

Abstract

The invention provides a knowledge extraction model application method and device, and the method comprises the steps: responding to an online request of a client for a pre-trained knowledge extraction model, and generating an online service interface of the pre-trained knowledge extraction model for a document processing application program to call; wherein the document processing application program is an application program used for processing a document, and the online service interface can be accessed to the document processing application program; receiving a calling request of the document processing application program for the online service interface; wherein the calling request comprises a to-be-extracted document; in response to the calling request, extracting knowledge information in the to-be-extracted document by using a pre-trained knowledge extraction model to obtain target knowledge information; and feeding back the target knowledge information to the document processing application program, so that the document processing application program outputs the target knowledge information. According to the method, independent application of the knowledge extraction model can be realized, and the resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of natural language processing technology, and more specifically, to an application method of a knowledge extraction model and an application device of a knowledge extraction model. Background Art

[0002] In the field of NLP (Natural Language Processing) technology, the construction and application of knowledge graphs have received widespread attention in the industry. In order to improve the quality of knowledge graph construction, it is often necessary to train an efficient knowledge extraction model. However, currently, knowledge extraction models are often only used as a part of the knowledge graph construction process and have not been fully applied, resulting in the computing resources consumed in the model training process not being fully utilized, and low resource utilization. Summary of the invention

[0003] The present disclosure provides an application method of a knowledge extraction model and an application device of a knowledge extraction model, which are used to solve the problem of low resource utilization of the knowledge extraction model in the prior art.

[0004] According to one aspect of the present disclosure, there is provided an application method of a knowledge extraction model, which is applied to a server, and the application method of the knowledge extraction model comprises: in response to a client's online request for a pre-trained knowledge extraction model, generating an online service interface of the pre-trained knowledge extraction model for a document processing application to call; wherein the document processing application is an application for processing documents, and the online service interface can be connected to the document processing application; receiving a call request from the document processing application for the online service interface; wherein the call request includes a document to be extracted; in response to the call request, extracting knowledge information in the document to be extracted using the pre-trained knowledge extraction model to obtain target knowledge information; and feeding back the target knowledge information to the document processing application so that the document processing application outputs the target knowledge information.

[0005] Optionally, the target knowledge information is in an editable state in the document processing application; after the target knowledge information is fed back to the document processing application so that the document processing application outputs the target knowledge information, the application method further includes: receiving a first model update instruction sent by the document processing application; wherein the first model update instruction includes first revised knowledge information, and the first revised knowledge information is information obtained after the target knowledge information is edited; in response to the first model update instruction, the document to be extracted and the first revised knowledge information are added to the training sample of the pre-trained knowledge extraction model, and the model is re-trained to update the pre-trained knowledge extraction model.

[0006] Optionally, in response to the call request, the pre-trained knowledge extraction model is used to extract the knowledge information in the document to be extracted to obtain the target knowledge information, including: in response to the call request, according to preset extraction rules, extracting first knowledge information from the document to be extracted; running the pre-trained knowledge extraction model to extract second knowledge information from the document to be extracted; merging the first knowledge information and the second knowledge information to obtain the target knowledge information.

[0007] Optionally, before receiving the call request from the document processing application for the online service interface, the application method also includes: receiving a test request from the client; wherein the test request includes a test document; in response to the test request, extracting test knowledge information from the test document using the pre-trained knowledge extraction model; feeding back the test knowledge information to the client, so that the client can output the test knowledge information for the user to determine whether the test passes, and connecting the online service interface to the document processing application if the test passes.

[0008] Optionally, the application method also includes: in response to the client's extraction request for the document set to be extracted, using the pre-trained knowledge extraction model to extract knowledge information of multiple documents in the document set to be extracted to obtain batch knowledge information; and feeding back the batch knowledge information to the client so that the client can output the batch knowledge information.

[0009] Optionally, the batch knowledge information is in an editable state in the client; after the response to the client's extraction request for the document set to be extracted, the knowledge information of multiple documents in the document set to be extracted is extracted using the pre-trained knowledge extraction model to obtain batch knowledge information, the application method also includes: receiving a second model update instruction sent by the client; wherein the second model update instruction includes second revised knowledge information and documents corresponding to the second revised knowledge information, and the second revised knowledge information is information obtained after the batch knowledge information is edited; in response to the second model update instruction, the second revised knowledge information and the documents corresponding to the second revised knowledge information are added to the training samples of the pre-trained knowledge extraction model, and the model is re-trained to update the pre-trained knowledge extraction model.

[0010] Optionally, the feeding back of the batch knowledge information to the client so that the client can output the batch knowledge information includes: feeding back the batch knowledge information to the client so that the client can output the knowledge information of preset documents in the document set to be extracted, and the client is also used to respond to the document switching operation and output the knowledge information of the document corresponding to the document switching operation; or feeding back the knowledge information of the preset documents in the document set to be extracted to the client so that the client can output the knowledge information of the preset documents, and in response to the document switching request of the client, feeding back the knowledge information of the document corresponding to the document switching request to the client, so that the client can switch to output the knowledge information of the document corresponding to the document switching request.

[0011] Optionally, the application method also includes: receiving the knowledge graph format and training samples uploaded by the client; based on the knowledge graph format and the training samples, training the knowledge extraction model to be trained to obtain the pre-trained knowledge extraction model.

[0012] Optionally, the knowledge extraction model to be trained is trained based on the knowledge graph format and the training samples to obtain the pre-trained knowledge extraction model, including: based on the knowledge graph format and the training samples, the knowledge extraction model to be trained is dynamically trained in a manner of gradually increasing the training samples participating in the training to obtain the pre-trained knowledge extraction model that is continuously updated; during the dynamic training process, the current latest evaluation index of the pre-trained knowledge extraction model is determined according to a set period; and the evaluation index is fed back to the client so that the client can output the evaluation index.

[0013] According to another aspect of the present disclosure, there is provided an application method of a knowledge extraction model, which is applied to a client, and the application method of the knowledge extraction model comprises: in response to a user's online operation for a pre-trained knowledge extraction model, sending an online request for the pre-trained knowledge extraction model to a server; wherein the pre-trained knowledge extraction model is used to extract knowledge information in a document; receiving an online service interface of the pre-trained knowledge extraction model fed back by the server; wherein the online service interface is used for being called by a document processing application, so that the server uses the pre-trained knowledge extraction model to extract target knowledge information of a document to be extracted in the document processing application, and feeds back the target knowledge information to the document processing application, and the document processing application is an application for processing documents; in response to a user's operation of obtaining the online service interface, outputting the online service interface so that the user can connect the online service interface to the document processing application.

[0014] Optionally, after receiving the online service interface of the pre-trained knowledge extraction model fed back by the server, the application method further includes: receiving a test document input by a user; sending a test request with the test document to the server; receiving test knowledge information fed back by the server; wherein the test knowledge information is the knowledge information extracted from the test document by the server using the pre-trained knowledge extraction model; outputting the test knowledge information for the user to determine whether the test passes, and executing the operation of obtaining the online service interface if the test passes.

[0015] Optionally, the application method also includes: obtaining a set of documents to be extracted input by a user; wherein the set of documents to be extracted includes multiple documents; sending an extraction request for the set of documents to be extracted to the server; receiving batch knowledge information fed back by the server; wherein the batch knowledge information is knowledge information extracted by the server from multiple documents in the set of documents to be extracted using the pre-trained knowledge extraction model; and outputting the batch knowledge information.

[0016] Optionally, after outputting the batch knowledge information, the application method further includes: obtaining revised knowledge information in response to an editing operation of the user on the batch knowledge information; wherein the revised knowledge information is information obtained after editing the batch knowledge information; generating a model update instruction in response to a model update operation; the model update instruction includes the revised knowledge information and the document corresponding to the revised knowledge information; sending the model update instruction to the server, so that the server adds the revised knowledge information and the document corresponding to the revised knowledge information to the training sample of the pre-trained knowledge extraction model, and re-trains the model to update the pre-trained knowledge extraction model.

[0017] Optionally, the outputting of the batch knowledge information includes: outputting the knowledge information of preset documents in the document set to be extracted, and in response to the user's document switching operation, outputting the knowledge information of the document corresponding to the document switching operation; or the receiving of the batch knowledge information fed back by the server includes: receiving the knowledge information of preset documents in the document set to be extracted fed back by the server, sending a document switching request to the server in response to the user's document switching operation, and receiving the knowledge information of the document corresponding to the document switching request fed back by the server.

[0018] Optionally, the application method also includes: receiving a knowledge graph format and a training sample input by a user; sending the knowledge graph format and the training sample to the server, so that the server can train the knowledge extraction model to be trained based on the knowledge graph format and the training sample to obtain the pre-trained knowledge extraction model.

[0019] Optionally, the server is used to dynamically train the knowledge extraction model to be trained based on the knowledge graph format and the training samples, by gradually increasing the training samples participating in the training, so as to obtain the continuously updated pre-trained knowledge extraction model. The server is also used to determine the latest evaluation indicators of the pre-trained knowledge extraction model according to a set period during the dynamic training process; the application method also includes: receiving the evaluation indicators sent by the server; and outputting the evaluation indicators.

[0020] According to another aspect of the present disclosure, there is provided an application device for a knowledge extraction model, which is applied to a server, and the application device for the knowledge extraction model comprises: a generation unit, configured to generate an online service interface of the pre-trained knowledge extraction model in response to a client's online request for the pre-trained knowledge extraction model, for a document processing application to call; wherein the document processing application is an application for processing documents, and the online service interface can be connected to the document processing application; a receiving unit, configured to receive a call request from the document processing application for the online service interface; wherein the call request includes a document to be extracted; an extraction unit, configured to extract knowledge information from the document to be extracted using the pre-trained knowledge extraction model in response to the call request, and obtain target knowledge information; and a sending unit, configured to feed back the target knowledge information to the document processing application, so that the document processing application outputs the target knowledge information.

[0021] According to another aspect of the present disclosure, there is provided an application device for a knowledge extraction model, which is applied to a client, and the application device for the knowledge extraction model comprises: a sending unit, configured to send an online request for the pre-trained knowledge extraction model to a server in response to a user's online operation for the pre-trained knowledge extraction model; wherein the pre-trained knowledge extraction model is used to extract knowledge information in a document; a receiving unit, configured to receive an online service interface of the pre-trained knowledge extraction model fed back by the server; wherein the online service interface is used for being called by a document processing application, so that the server uses the pre-trained knowledge extraction model to extract target knowledge information of a document to be extracted in the document processing application, and feeds back the target knowledge information to the document processing application, and the document processing application is an application for processing documents; an output unit, configured to output the online service interface in response to a user's operation of obtaining the online service interface, so that the user can connect the online service interface to the document processing application.

[0022] According to another aspect of the present disclosure, a computer-readable storage medium storing instructions is provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is prompted to execute the application method of the knowledge extraction model as described above.

[0023] According to another aspect of the present disclosure, a system is provided, comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, prompt the at least one computing device to execute the application method of the knowledge extraction model as described above.

[0024] According to the application method of the knowledge extraction model and the application device of the knowledge extraction model of the exemplary embodiment of the present disclosure, by configuring the online function, an online service interface of the pre-trained knowledge extraction model can be generated after going online, so that users can directly use the pre-trained knowledge extraction model as an online knowledge extraction service and connect it to the document processing application, so that the knowledge extraction service can be directly called in the document processing application in the form of a plug-in or the like to extract knowledge from the document, which can not only realize the application of the knowledge extraction model independent of the knowledge graph, improve resource utilization, but also enrich the functions of the document processing application.

[0025] Additional aspects and / or advantages of the present general inventive concept will be set forth in part in the following description and in part will be apparent from the description or may be learned through practice of the present general inventive concept. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] These and / or other aspects and advantages of the present disclosure will become clear and more easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0027] Figure 1 is a flow chart showing an application method of a knowledge extraction model applied to a server according to an exemplary embodiment of the present disclosure;

[0028] Figure 2 is a schematic flow chart showing an application method of a knowledge extraction model applied to a server according to an exemplary embodiment of the present disclosure;

[0029] Figure 3 is a flow chart showing an application method of a knowledge extraction model applied to a client according to an exemplary embodiment of the present disclosure;

[0030] Figures 4a to 4f is a schematic diagram showing a client user interface according to an exemplary embodiment of the present disclosure;

[0031] Figure 5 is a block diagram showing an application device of a knowledge extraction model applied to a server according to an exemplary embodiment of the present disclosure;

[0032] Figure 6 is a block diagram illustrating an application device of a knowledge extraction model applied to a client according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of the embodiments of the present invention as defined by the claims and their equivalents. Various specific details are included to assist in understanding, but these details are considered to be exemplary only. Therefore, one of ordinary skill in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. In addition, descriptions of well-known functions and structures are omitted for clarity and brevity.

[0034] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.

[0035] Knowledge Graph is a semantic network used to describe concepts and their connections in the physical world. It contains the following three important factors: 1. Concept. A concept can be an entity, an attribute, or a fact, such as "a person has two hands". Concepts are usually described as nodes. 2. Relationship. A relationship is a semantic connection between two concept nodes, such as an attribute relationship, a possession relationship, etc. 3. Background knowledge of concepts and relationships. Because the same concept and relationship have many different forms of expression, their background knowledge is needed as a dictionary or ontology to provide queries to connect multiple forms of expression. Because the knowledge graph is close to the way the human brain thinks, it is highly interpretable, and can also assist human thinking and provide the ability to analyze problems from the perspective of "relationships", so it has gradually been widely used. In the process of building a knowledge graph, the first thing to do is to extract knowledge information from existing structured or unstructured information, such as node information, relationship information, and event information. Here, a knowledge extraction model is needed. However, knowledge extraction models are often only used as a part of the knowledge graph construction process and have not been fully applied. The training of knowledge extraction models requires a lot of computing resources, resulting in the computing resources consumed in the training process not being fully utilized and low resource utilization.

[0036] According to the application method of the knowledge extraction model and the application device of the knowledge extraction model of the exemplary embodiment of the present disclosure, by configuring the online function, an online service interface of the pre-trained knowledge extraction model can be generated after going online, so that users can directly use the pre-trained knowledge extraction model as an online knowledge extraction service and connect it to the document processing application, so that the knowledge extraction service can be directly called in the document processing application in the form of a plug-in or the like to extract knowledge from the document, which can not only realize the application of the knowledge extraction model independent of the knowledge graph, improve resource utilization, but also enrich the functions of the document processing application.

[0037] It should be noted that in order to realize the application of the knowledge extraction model, the present disclosure can configure a dedicated server and client, the server is used to perform data processing tasks mainly based on model operation, and the client is used for users to perform related operations of model launch. The following text will introduce in detail the application method and device of the knowledge extraction model of the exemplary embodiment of the present disclosure from the perspective of the server and the client.

[0038] In addition, the document processing application also has its client and server. Its client is used to interact with the user, and its server is used to interact with the server of the knowledge extraction service in the present disclosure to call the online service interface of the pre-trained knowledge extraction model to extract knowledge from the document. Since the actions of the client and server of the document processing application are relatively simple and have little impact on the description of the solution of the present disclosure, the following text will no longer emphasize the client and server of the document processing application for the sake of convenience, and will be uniformly referred to as the document processing application.

[0039] Refer to the following Figures 1 to 6 A method for applying a knowledge extraction model and an apparatus for applying a knowledge extraction model according to an exemplary embodiment of the present disclosure are described in detail.

[0040] Server side

[0041] Figure 1 1 is a flow chart showing an application method of a knowledge extraction model applied to a server according to an exemplary embodiment of the present disclosure. The application method of a knowledge extraction model according to an exemplary embodiment of the present disclosure can be implemented in a computing device with sufficient computing power.

[0042] Reference Figure 1 In step S101, in response to the client's online request for the pre-trained knowledge extraction model, an online service interface of the pre-trained knowledge extraction model is generated for the document processing application to call; wherein the document processing application is an application for processing documents, and the online service interface can be connected to the document processing application.

[0043] It should be understood that in order to extract structured node information, relationship information, and event information respectively, a set of knowledge extraction models (here referring to the pre-trained knowledge extraction model, to simplify the description, unless otherwise specified below, the knowledge extraction model refers to the pre-trained knowledge extraction model) may further include three models: node model, relationship model, and event model, and in order to meet the knowledge extraction needs of different business scenarios, different knowledge extraction models can also be configured for different business scenarios. Optionally, when generating an online service interface, different interfaces or unified interfaces can be configured for different scenarios, and the present disclosure does not limit this. As an example, a document processing application may include, but is not limited to, at least one of the following: Microsoft Office Word, Adobe Acrobat, whiteboard application, text document application, etc., without exhaustive enumeration.

[0044] In addition, the server can also respond to the client's offline request for the pre-trained knowledge extraction model and cancel the online service interface of the pre-trained knowledge extraction model, so as to facilitate the offline of the model that is no longer used, thereby providing a complete life cycle closed-loop management for the online application of the model.

[0045] In step S102, a call request for an online service interface from a document processing application is received; wherein the call request includes the document to be extracted. It should be understood that after the online service interface is connected to the document processing application, the corresponding function buttons and interfaces can be displayed in the document processing application, such as an extraction button. When a user processes a document in the document processing application, if the extraction button is triggered, the document processing application can send the above call request to the server of the knowledge extraction service. At this time, the document being processed in the document processing application is used as the document to be extracted. For the case where different knowledge extraction models are configured for different business scenarios, as an example, regardless of whether the knowledge extraction models for different scenarios are configured with different online service interfaces or a unified online service interface, a one-key extraction button can be displayed, and the scenario information can be included in the call request, so that the server can select the model of the corresponding scenario when applying the model; of course, different extraction buttons can also be configured for different scenarios. The present disclosure does not limit this.

[0046] In step S103, in response to the call request, the pre-trained knowledge extraction model is used to extract the knowledge information in the document to be extracted, and the target knowledge information is obtained. As an example, the document to be extracted is a plain text document in txt format, which is convenient for extracting the text therein; for documents in word format or pdf format, pre-processing can be performed first and converted to txt format. During pre-processing, if there is table information in the original document, the original table information can also be retained separately to avoid information loss during the format conversion process.

[0047] In an optional embodiment, step S103 can be implemented through the following steps: in response to a call request, extracting first knowledge information from the document to be extracted according to preset extraction rules; running a pre-trained knowledge extraction model to extract second knowledge information from the document to be extracted; merging the first knowledge information and the second knowledge information to obtain target knowledge information.

[0048] Given that it is difficult to complete all knowledge extraction tasks by relying solely on the knowledge extraction model, by additionally configuring preset extraction rules and extracting the first knowledge information according to the preset extraction rules, and then merging it with the second knowledge information extracted by the model, the rules and models can complement each other, thereby achieving better extraction effects and better supporting the needs of extracting document knowledge information.

[0049] It should be understood that for embodiments involving multiple different business scenarios, preset extraction rules can be configured for each scenario to meet the knowledge extraction requirements of the corresponding scenarios in a targeted manner. As an example, the preset extraction rules can specifically include multiple rules, for example, including but not limited to at least one of the following: dictionary extraction rules, first and last word extraction rules, and regular extraction rules. Among them, the dictionary extraction rule means that the user can manually upload a dictionary file (txt format, different dictionary values ​​are separated by English commas), and specify a target dictionary type for this dictionary file. In the subsequent extraction, if the file in the dictionary is hit, the corresponding target dictionary type is used as the extracted knowledge information. The first and last word extraction rule is a rule for quantitative character extraction based on the first and last words of a paragraph or sentence. The user can define the first word or last word to be extracted, as well as the preset length of the extracted string, etc., that is, a string of a preset length after the first word or a string of a preset length before the last word can be extracted as the extracted knowledge information. Regular extraction rules are based on regular expressions. Regular expressions are rules that describe the common characteristics of a class of strings. They provide a mechanism for searching for specific strings from a character set. Users can write corresponding regular expressions according to their needs, and the server can use them to extract knowledge information.

[0050] In step S104, the target knowledge information is fed back to the document processing application so that the document processing application can output the target knowledge information. As mentioned above, the interface of the knowledge extraction service can be displayed in the document processing application, and the target knowledge information can be output to the interface.

[0051] Optionally, the target knowledge information is in an editable state in the document processing application, and can be used by users to manually review the extracted target knowledge information, thereby achieving human-machine complementarity, which can not only reduce the heavy workload brought by manual extraction of knowledge information, but also ensure the reliability of the final knowledge information with the help of manual review.

[0052] Further, after step S104, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure also includes: receiving a first model update instruction sent by a document processing application; wherein the first model update instruction includes first revised knowledge information, and the first revised knowledge information is information obtained after the target knowledge information is edited; in response to the first model update instruction, adding the document to be extracted and the first revised knowledge information to the training sample of the pre-trained knowledge extraction model, and re-training the model to update the pre-trained knowledge extraction model. By configuring the first model update instruction, the training sample of the model can be updated according to the first revised knowledge information, and then the model can be retrained, so that the model can be gradually updated as the model is used, which helps to improve the knowledge extraction effect of the model.

[0053] As an example, a model update button may be displayed in a document processing application. When the user edits the target knowledge information and triggers the model update button, the document processing application may send a first model update instruction to the server. Optionally, the first revised knowledge information may be only part of the target knowledge information that has been edited, or may be the complete new information after the entire target knowledge information has been edited, and the present disclosure does not limit this.

[0054] Optionally, before step S102, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure further includes: receiving a test request from the client; wherein the test request includes a test document; in response to the test request, extracting test knowledge information in the test document using a pre-trained knowledge extraction model; feeding back the test knowledge information to the client, so that the client can output the test knowledge information, so that the user can determine whether the test is passed, and connect the online service interface to the document processing application when the test is determined to be passed. As mentioned above, the client of the knowledge extraction service is used for the user to perform related operations of the model online. By further configuring the test function on the client, the extraction effect of the model can be tested using the test document before the knowledge extraction service is officially connected to the document processing application, so that the user can connect it only after determining that the test is passed, which helps to ensure the actual use effect of the knowledge extraction service after it is officially put into use on the document processing application. In addition, if the knowledge extraction service has not yet been connected to the document processing application, and the user has a document that urgently needs to extract knowledge information, the test function can also be used to extract knowledge information online, which improves the convenience of using the knowledge extraction service.

[0055] In some embodiments, optionally, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure further includes an offline batch extraction step, which includes: in response to the extraction request of the client for the document set to be extracted, using the pre-trained knowledge extraction model, extracting the knowledge information of multiple documents in the document set to be extracted, and obtaining batch knowledge information; feeding back the batch knowledge information to the client, so that the client can output the batch knowledge information. By configuring the offline batch extraction function, the knowledge extraction operation can be performed directly on the client without relying on the document processing application when the model is not online. It should be noted that the "offline" of this step means that the real-time requirements for information extraction are not high, and the batch knowledge information can be fed back as a whole after the extraction is completed in batches, which does not mean that the client runs the model and extracts information by itself. This function can process multiple documents in batches, can reduce the number of information transmission times, and helps to reduce the consumption of network transmission resources, and does not need to open documents one by one in the document processing application, so that a large number of documents can be processed in batches, which greatly improves the knowledge extraction processing capability and further improves resource utilization. As an example, the client can create different extraction tasks and initiate corresponding extraction requests to the server for each task. Each extraction request uploads the document collection to be extracted in the form of a compressed package, and can be accompanied by the required knowledge extraction model. In addition, the server can also monitor the extraction progress and other information, and feedback to the client, so that users can understand the extraction progress.

[0056] Optionally, the batch knowledge information is in an editable state in the client, and can be used by users to manually review the batch knowledge information extracted offline, so as to achieve human-machine complementarity. The batch extraction function can be used to greatly reduce the heavy workload caused by manually extracting knowledge information, and the reliability of the knowledge information finally obtained can be guaranteed by manual review. After the offline batch extraction step, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure also includes: receiving a second model update instruction sent by the client; wherein the second model update instruction includes the second revised knowledge information and the document corresponding to the second revised knowledge information, and the second revised knowledge information is the information obtained after the batch knowledge information is edited; in response to the second model update instruction, the second revised knowledge information and the document corresponding to the second revised knowledge information are added to the training sample of the pre-trained knowledge extraction model, and the model is retrained to update the pre-trained knowledge extraction model. The extraction amount of offline batch extraction is large, so the possibility of generating the second revised knowledge information is also higher. At the same time, in the early stage of model application, the possibility of editing and modifying the extracted batch knowledge information is greater, and the generated revised content may also be more. By configuring the second model update instruction with the second revised knowledge information and retraining the model accordingly, the model can be centrally adjusted and updated in the early stage of model application, and the model can be updated in a timely manner in the subsequent application process, which helps to improve the knowledge extraction effect of the model. As an example, a data reflow button can be configured on the client. After completing the offline batch extraction, the user can trigger the data reflow button on the client to send the second model update instruction with the second revised knowledge information to the server. Optionally, similar to the first revised knowledge, the second revised knowledge information can be only part of the edited information in the batch knowledge information, or it can be the complete new information after the entire batch knowledge information is edited. The batch knowledge information can also be divided according to documents. For documents with modified extracted knowledge information, the complete knowledge information of these documents after editing is used as the second revised knowledge information. The present disclosure does not limit this.

[0057] It should be understood that since the offline batch extraction function is triggered by the user's operation on the client, and the function of calling the knowledge extraction service to extract knowledge information online is triggered by the user's operation in the document processing application, the two have different information transmission paths, but the operation of the model is executed on the server. Based on this, for the same knowledge extraction model, the model update using the first corrected knowledge information and the model update using the second corrected knowledge information can be independent of each other and not affect each other, or they can be superimposed. For example, after updating the model using the first corrected knowledge information, the updated model is used to execute the offline batch extraction function, and the model is continued to be updated using the obtained second corrected knowledge information. The present disclosure does not limit this.

[0058] Regarding the step of feeding back batch knowledge information to the client in the offline batch extraction step so that the client can output the batch knowledge information, in one example, the step includes: feeding back batch knowledge information to the client so that the client can output the knowledge information of preset documents in the document set to be extracted, and the client is also used to respond to the document switching operation and output the knowledge information of the document corresponding to the document switching operation. By sending all the batch knowledge information to the client at one time, it is possible to respond quickly when it is necessary to switch to display the knowledge information of different documents, thereby improving the response rate of switching display. As an example, if the user needs to download the batch knowledge information at this time, the complete batch knowledge information in the client can be directly saved in the format specified by the user to the location specified by the user.

[0059] In another example, the step includes: feeding back the knowledge information of the preset document in the document set to be extracted to the client, so that the client can output the knowledge information of the preset document, and in response to the document switching request of the client, feeding back the knowledge information of the document corresponding to the document switching request to the client, so that the client can switch and output the knowledge information of the document corresponding to the document switching request. By first feeding back the knowledge information of the preset document, such as the first several documents in the document set to be extracted, the amount of single data transmission can be reduced, and the pressure of data transmission can be reduced. When the user clearly has the need to switch to display the knowledge information of other documents, the knowledge information of the corresponding document is fed back in response to the document switching request. In other words, if the user has no need, it is not necessary to continue to transmit the data of other documents, which can effectively reduce the amount of data transmission. As an example, if the user needs to download batch knowledge information at this time, the server can only send the information in the batch knowledge information that has not been fed back to the client, and then save the complete batch knowledge information in the format specified by the user to the location specified by the user in the client; of course, the server can also directly send the complete batch knowledge information. This disclosure is not limited to this.

[0060] In some embodiments, optionally, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure also includes a model training step, and the model training step includes: receiving the knowledge graph format and training samples uploaded by the client; based on the knowledge graph format and the training samples, training the knowledge extraction model to be trained to obtain a pre-trained knowledge extraction model. Although the present disclosure focuses on the application of the knowledge extraction model, in practice, users with knowledge extraction needs do not necessarily have a trained knowledge extraction model. By configuring the model training function, it is possible to help these users train the required knowledge extraction model, thereby improving the functionality of the application solution.

[0061] It should be noted that the knowledge graph format refers to the knowledge graph schema, which defines the core framework of the knowledge graph. For example, the field names to be extracted can be defined based on the text content to be extracted. This is the preparatory work that needs to be done before building the knowledge graph. After that, the knowledge graph model will extract relevant knowledge according to the knowledge graph format. The training sample includes sample data (usually text data) and knowledge information annotated in the sample data. Users are required to annotate the corresponding knowledge information and upload training samples according to business needs. This is the accurate work of training the knowledge extraction model. The uploading and annotation of sample data can be implemented by users on the client using existing text annotation tools or question-and-answer annotation tools, so as to process the sample data into a format that can be learned by the machine. The specific training process of the model can refer to the existing technology, such as using the automatic training module to complete the training, which will not be elaborated here.

[0062] Optionally, in the model training step, the knowledge extraction model to be trained is trained based on the knowledge graph format and the training samples, and the step of obtaining the pre-trained knowledge extraction model includes: based on the knowledge graph format and the training samples, the knowledge extraction model to be trained is dynamically trained in a manner of gradually increasing the training samples participating in the training, so as to obtain a continuously updated pre-trained knowledge extraction model; in the dynamic training process, the evaluation index of the current latest pre-trained knowledge extraction model is determined according to the set cycle; the evaluation index is fed back to the client so that the client can output the evaluation index. For the model training function, by regularly determining the current evaluation index during the training process and feeding it back to the client, it is convenient for the client to output the evaluation index in time, so that the user can understand the training progress of the model, and it is also convenient for the user to determine whether to apply the current model according to their own accuracy requirements, thereby improving the flexibility of model training. As an example, when the client outputs the evaluation index, it can be in the form of a dynamic curve, the horizontal axis is the number of training samples, the vertical axis is the evaluation index, and as the training samples increase, the horizontal axis value range of the curve keeps changing, for example, the current total number of training samples is used as the maximum value of the horizontal axis, which can intuitively display the change of the evaluation index. For the application of the model, the evaluation index of the current model is very core, but as a user, we should not only pay attention to the evaluation index of the model at a certain moment, but more to the trend of the model evaluation index. If the trend of the evaluation index is relatively flat, it means that the model has basically reached the upper limit and the model can be applied; if the trend of the model is still in a state of substantial rise or fall, it means that there is still room for iteration of the model, and the user can consider whether to continue to iterate the model before starting the model application. Optionally, when measuring the effect of model training, accuracy, recall and F1 score (the harmonic mean of accuracy and recall) are commonly used. The present disclosure can select at least one of the three as an evaluation index, such as selecting F1 score. For the case of selecting more than two evaluation indicators, curves can be drawn for each indicator separately. In addition, as mentioned above, knowledge extraction models often include node models, relationship models, and event models, so curves can be drawn for each model separately.

[0063] Figure 2 is a schematic flow chart showing an application method of a knowledge extraction model applied to a server according to an exemplary embodiment of the present disclosure.

[0064] In general, refer to Figure 2 According to the exemplary embodiment of the present disclosure, the application method of the knowledge extraction model applied to the server may include two major parts: preliminary model training and model application. The model application part may be further divided into two parts: online application and offline application.

[0065] The model training part belongs to the early preparation stage, including knowledge graph format definition, sample data upload and data annotation, automatic model training, and training trend monitoring (i.e., determination and feedback of evaluation indicators). If the user already has a knowledge graph and a corresponding set of knowledge extraction models, this part can be skipped and the model can be applied directly; if the user has not yet started to build a knowledge graph, or has no demand for knowledge graph construction, and only needs to train a set of knowledge extraction models and apply them, this part needs to be executed.

[0066] Model application is the main part of this disclosure.

[0067] The online application part is oriented to the scenario with relatively high real-time requirements, and the model needs to be put online before the model-level application can be started. To this end, the present disclosure provides a quick model online capability. The user triggers the model online with one click on the client, and the server responds to the online request, automatically calls the underlying computing resources, and starts the corresponding online service. After the service is successfully started, the user can directly enter a text to do the online service test. If there is no problem with the test, the online service interface can be directly fed back for the user to connect it to the document processing application for application. In the online knowledge extraction service, in order to better support the needs of document knowledge information extraction in the office process, in addition to the knowledge extraction model, preset extraction rules for different business scenarios can also be attached, such as dictionary extraction rules, first and last word extraction rules, and regular extraction rules, so as to provide a complete set of extraction services, so that the document processing application can flexibly call the knowledge extraction service to meet the knowledge information extraction needs of complex business scenarios. Specifically, in the data preprocessing step, the document in word format or pdf format in the document processing application is converted to txt format. Then, the preset extraction rules and knowledge extraction model are used to extract knowledge information. Finally, the extracted data is spliced ​​and fused to complete the information merging, and the target knowledge information in JSON format is obtained and sent back to the document processing application. Subsequently, the user can view and review the target knowledge information in the document processing application. If there is any modification, the final data modified by the user (i.e., the first corrected knowledge information) is equivalent to a correction of the model. The user can also choose to trigger the reviewed and modified data to the model training part for model update and iteration.

[0068] The offline application part is aimed at scenarios with low real-time requirements. Users can create offline batch extraction tasks on the client and upload a collection of documents to be extracted. The server will automatically trigger the batch extraction task, monitor the extraction progress during the task and feedback to the server. When the task is completed, the user can download the extracted batch knowledge information. At the same time, similar to online applications, it can provide batch knowledge information viewing and review functions for users to customize and modify batch knowledge information and export it. And the final data modified by the user can be used for model updates and iterations. In addition, regarding the batch knowledge information download function, the default export format can be json, but excel data will be used more in many business scenarios, so excel format export can also be provided.

[0069] Client side

[0070] Figure 3 1 is a flowchart showing an application method of a knowledge extraction model applied to a client according to an exemplary embodiment of the present disclosure. The application method of a knowledge extraction model according to an exemplary embodiment of the present disclosure can be implemented in a computing device with sufficient computing power. It should be noted that the application method of a knowledge extraction model applied to a client can be similar to the following. Figure 2 The application method of the knowledge extraction model applied to the server is used in conjunction with the application method. In order to save space, the content introduced previously will not be repeated or will only be briefly introduced.

[0071] Reference Figure 3 In step S301, in response to the user's online operation for the pre-trained knowledge extraction model, an online request for the pre-trained knowledge extraction model is sent to the server; wherein the pre-trained knowledge extraction model is used to extract knowledge information in the document.

[0072] In addition, accordingly, the client can also respond to the user's offline operation on the pre-trained knowledge extraction model by sending an offline request for the pre-trained knowledge extraction model to the server, so as to facilitate the offline of the model that is no longer used, thereby providing a complete life cycle closed-loop management for the online application of the model.

[0073] In step S302, an online service interface of the pre-trained knowledge extraction model fed back by the server is received; wherein the online service interface is used for being called by a document processing application, so that the server uses the pre-trained knowledge extraction model to extract target knowledge information of the document to be extracted in the document processing application, and feeds back the target knowledge information to the document processing application, which is an application used to process documents.

[0074] In step S303, in response to the user's operation of obtaining the online service interface, the online service interface is output so that the user can connect the online service interface to the document processing application.

[0075] According to the application method of the knowledge extraction model applied to the client of the exemplary embodiment of the present disclosure, by requesting the server to launch the knowledge extraction model and outputting the online service interface fed back by the server, the user can access an independent knowledge extraction service for the document processing application based on it, so that the knowledge extraction service can be directly called in the document processing application in the form of a plug-in, etc. to extract knowledge from the document, which can not only realize the application of the knowledge extraction model independent of the knowledge graph, improve resource utilization, but also enrich the functions of the document processing application.

[0076] Optionally, before step S302, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure also includes: receiving a test document input by a user; sending a test request with the test document to the server; receiving test knowledge information fed back by the server; wherein the test knowledge information is the knowledge information extracted from the test document by the server using a pre-trained knowledge extraction model; outputting the test knowledge information for the user to determine whether the test has passed, and executing the operation of obtaining the online service interface when the test has passed. By further configuring the test function on the client, the extraction effect of the test model can be tested using the test document before the online service interface is formally obtained, so that the user can obtain and output the online service interface only after the test has passed, which helps to ensure the actual use effect of the knowledge extraction service after it is formally put into use on the document processing application. In addition, if the knowledge extraction service has not yet been connected to the document processing application, and the user has a document that urgently needs to extract knowledge information, the test function can also be used to extract knowledge information online, which improves the convenience of using the knowledge extraction service.

[0077] In some embodiments, optionally, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure also includes an offline batch extraction step, and the offline batch extraction step includes: obtaining a document set to be extracted input by a user; wherein the document set to be extracted includes multiple documents; sending an extraction request for the document set to be extracted to the server; receiving batch knowledge information fed back by the server; wherein the batch knowledge information is the knowledge information extracted by the server from multiple documents in the document set to be extracted using a pre-trained knowledge extraction model; and outputting the batch knowledge information. By configuring the offline batch extraction function, the knowledge extraction operation can be performed directly on the client without relying on a document processing application when the model is not online. This function can process multiple documents in batches, can reduce the number of times information is sent, helps to reduce the consumption of network transmission resources, and does not need to open documents one by one in the document processing application, thereby enabling batch processing of a large number of documents, greatly improving the knowledge extraction processing capability, and further improving resource utilization. As an example, the client can create different extraction tasks and initiate corresponding extraction requests to the server for each task. Each extraction request uploads the document collection to be extracted in the form of a compressed package, and can be accompanied by the required knowledge extraction model. In addition, the client can also receive and output information such as the extraction progress fed back by the server, so that users can understand the extraction progress.

[0078] Optionally, after the offline batch extraction step, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure further includes: in response to the user's editing operation on the batch knowledge information, obtaining the corrected knowledge information; wherein the corrected knowledge information is the information obtained after the batch knowledge information is edited; in response to the model update operation, generating a model update instruction; the model update instruction includes the corrected knowledge information and the document corresponding to the corrected knowledge information; sending the model update instruction to the server, so that the server can add the corrected knowledge information and the document corresponding to the corrected knowledge information to the training sample of the pre-trained knowledge extraction model, re-train the model, and update the pre-trained knowledge extraction model. The editing function can allow users to manually review the batch knowledge information extracted offline, realize human-machine complementarity, and can use the batch extraction function to greatly reduce the heavy workload brought by manual extraction of knowledge information, and can also use manual review to ensure the reliability of the knowledge information finally obtained. At the same time, the extraction volume of offline batch extraction is large, so the possibility of generating corrected knowledge information is also high, and in the early stage of model application, the possibility of editing and modifying the extracted batch knowledge information is high, and the generated correction content may also be large. By configuring the model update function, the model can be centrally adjusted and updated in the early stage of model application, and the model can be updated in a timely manner during the subsequent application process, which helps to improve the knowledge extraction effect of the model. As an example, a data reflow button can be configured on the client. After completing the offline batch extraction, the user can perform the model update operation by triggering the data reflow button on the client. Optionally, the revised knowledge information can be only part of the edited information in the batch knowledge information, or it can be the complete new information after the entire batch knowledge information is edited. The batch knowledge information can also be divided according to documents. For documents with modified extracted knowledge information, the complete knowledge information of these documents after editing is used as the revised knowledge information. The present disclosure does not limit this.

[0079] Regarding the step of receiving and outputting batch knowledge information in the offline batch extraction step, in one example, the step of outputting batch knowledge information includes: outputting knowledge information of a preset document in the document set to be extracted, and in response to the user's document switching operation, outputting knowledge information of the document corresponding to the document switching operation. By receiving all batch knowledge information at one time, it is possible to respond quickly when it is necessary to switch to display knowledge information of different documents, thereby improving the response rate of switching display. As an example, if the user needs to download batch knowledge information at this time, the complete batch knowledge information in the client can be directly saved in the format specified by the user to the location specified by the user.

[0080] In another example, the step of receiving batch knowledge information fed back by the server includes: receiving knowledge information of preset documents in the document set to be extracted fed back by the server, sending a document switching request to the server in response to the user's document switching operation, and receiving knowledge information of the document corresponding to the document switching request fed back by the server. By first receiving the knowledge information of the preset document, such as the first several documents in the document set to be extracted, the amount of single data transmission can be reduced and the pressure of data transmission can be reduced. When the user clearly has the need to switch to display the knowledge information of other documents, then in response to the document switching operation, a document switching request for the corresponding document is sent to the server to obtain the knowledge information of the corresponding document. In other words, if the user has no need, it is not necessary to continue to receive the data of other documents, which can effectively reduce the amount of data transmission. As an example, if the user needs to download batch knowledge information at this time, only the information that has not been received in the batch knowledge information can be received from the server, and then the complete batch knowledge information can be saved in the format specified by the user to the location specified by the user; of course, the complete batch knowledge information can also be received from the server. This disclosure is not limited to this.

[0081] In some embodiments, optionally, the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure also includes a model training step, and the model training step includes: receiving the knowledge graph format and training samples input by the user; sending the knowledge graph format and training samples to the server, so that the server can train the knowledge extraction model to be trained based on the knowledge graph format and training samples to obtain a pre-trained knowledge extraction model. Although the present disclosure focuses on the application of the knowledge extraction model, in practice, users with knowledge extraction needs do not necessarily have a trained knowledge extraction model. By configuring the model training function, it can help these users train the required knowledge extraction model and improve the function of the application solution. It should be noted that the uploading and annotation of sample data can be implemented by the user on the client using existing text annotation tools or question and answer annotation tools, so as to process the sample data into a format that can be learned by the machine.

[0082] Optionally, the server is used to dynamically train the knowledge extraction model to be trained based on the knowledge graph format and training samples in a manner of gradually increasing the training samples involved in the training, so as to obtain a continuously updated pre-trained knowledge extraction model. The server is also used to determine the evaluation index of the current latest pre-trained knowledge extraction model according to a set period during the dynamic training process; the application method of the knowledge extraction model of the exemplary embodiment of the present disclosure also includes: receiving the evaluation index sent by the server; outputting the evaluation index. For the model training function, by receiving the evaluation index regularly determined by the server and outputting it, the user can understand the training progress of the model, and it can also be convenient for the user to determine whether to apply the current model according to his own accuracy requirements, thereby improving the flexibility of model training. As an example, when outputting the evaluation index, a dynamic curve can be used to intuitively display the changes in the evaluation index, so that the user can consider whether to continue to iterate the model before starting to apply the model. Optionally, accuracy, recall and F1 score are often used to measure the effectiveness of model training. The present disclosure may select at least one of the three as an evaluation indicator. For the case of selecting more than two evaluation indicators, a curve may be drawn for each indicator. In addition, the knowledge extraction model often includes a node model, a relationship model, and an event model, so a curve may be drawn for each model.

[0083] Next, a specific implementation is used to introduce the application method of the knowledge extraction model applied to the client in the exemplary embodiment of the present disclosure in combination with the user interface of the client. Figure 2 The application method of the knowledge extraction model applied to the server is similar to the application method of the knowledge extraction model applied to the client, which also includes two parts: early model training and model application.

[0084] The model training part also includes knowledge graph format definition, sample data upload and data labeling, automatic model training, and training trend monitoring. This part of the operation has mature solutions in this field and belongs to the preliminary preparation stage of model application. Therefore, in order to save space, the knowledge graph format definition, sample data upload and data labeling, and automatic model training user interface will not be introduced in detail. After triggering automatic model training, the server can perform model training, and users can monitor the training trend through the client. Figure 4a The client can display the change curve of the evaluation index fed back by the server to monitor the training trend. Specifically, according to the actual extraction requirements, the knowledge extraction model includes at least one of the node model, the relationship model, and the event model. Figure 4aCurrently displayed is the evaluation index curve of the node model. The three lines correspond to the three evaluation indicators of accuracy, recall rate, and F1 score. Users can switch to display the evaluation index curve of the relationship model by clicking the "Relationship" label above the curve, and can also switch to display the evaluation index curve of the event model by clicking the "Event" label above the curve. Furthermore, the mouse hover display can be configured. When the user hovers the mouse in the curve area, the model name, total number of training samples, model training start time, and model training end time can be displayed; when the user hovers the mouse over a specific curve, the evaluation index corresponding to the current curve can also be displayed.

[0085] At the same time, the page can also display the entrances to the model's online and offline applications, so that when users determine which model to apply based on the training trend, they can directly enter the corresponding application page, shortening the user's operation path. However, if the node model, relationship model, and event model do not exist, the entrances to the online and offline applications are unavailable, and the application page cannot be entered. When the user clicks Figure 4a When you click the "Online Application" button in Figure 4b The online application page is shown.

[0086] Reference Figure 4b, the first step is to launch the knowledge extraction model. In this step, the model column displays the models existing in the current knowledge extraction model, such as node model, relationship model, and event model. The F1 value column displays the current F1 score of each model. Of course, other evaluation indicators can also be placed here. The model status bar is used to display the online status of the model, including online, online success, and offline, where offline means not online yet or online failure. In the operation bar, the "View Trend" button is used to call up a pop-up window to display the evaluation indicator curve of the corresponding model. The "Online" button is used to select the model to be launched and implement the online operation. After the "Online" button is triggered, if there are computing resources, the pop-up window will display "Currently there are GPU resources, and the online xx model is expected to occupy xx resources". If there are no resources, the pop-up window will display "Currently there are no GPU resources, and the online xx model is expected to occupy xx resources. Do you want to launch the model?" If the user clicks the "Confirm Online" button in the pop-up window, the model online task is triggered and queues for GPU resource allocation. After the model is successfully launched, a prompt message can be displayed to prompt the model to be successfully launched and the user to paste the test text. The prompt message can be displayed for a few seconds and then disappear. You can also add a "Download Call Example" to output the online service interface, which can specifically display the IP address and port. The "Offline" button in the operation bar is used to operate the online model offline. In the operation bar, for models that have not yet been launched or failed to be launched, their "Online" button is available, and the "Offline" button is not available; for models that are being launched, their "Online" and "Offline" buttons are both unavailable; for models that have been successfully launched, their "Online" button is unavailable, and the "Offline" button is available.

[0087] After the model is online, the second step is to paste the test text. At this time, the user can paste a single test text into the given text box. The default copy is "Please paste the test text here." The part of the pasted text that exceeds the set number of words will not enter the text box. The number of words is displayed in the lower right corner of the text box. When the number of words is reached, it will be marked in red. The word limit is, for example, 10,000. The pasted text can be swiped up and down to view. After pasting, click the "Start Test" button, the button will turn green, and the online knowledge extraction task will be triggered. Figure 4c The real-time viewing pop-up window shown.

[0088] Reference Figure 4c , the test text is displayed in the left area of ​​the pop-up window, and the extracted test knowledge information is displayed in the right area according to the different types of model extraction information (such as node type, relationship type, event type). The corresponding type of knowledge information can be displayed by switching the information type. Its display logic is to only display the extraction results of the user's online model. If the corresponding information is not extracted after going online, "No extraction results" will be displayed. The "Finish" button in the lower right corner is used to return to Figure 4b The page, at this time Figure 4bThe test text in the text box is not clear. The "Download" button on the lower right is used to export the test knowledge information in json format.

[0089] When the user clicks Figure 4a When you click the "Offline Application" button in Figure 4d The offline application page shown in the figure realizes offline batch extraction. The main part of the page is the task list. The table shows the task name, upload status, model status, review progress, and operation in columns. The number of entries (referring to the number of documents processed in batches), upload time, and uploading user are displayed at the bottom of the table. The "Add Task" button in the upper right corner of the table is used for users to upload a compressed package (i.e., the collection of documents to be extracted. The number of entries at the bottom of the table is the number of documents in the compressed package).

[0090] After the "Add Task" button is triggered, enter Figure 4e The Create Task page shown is used to upload the document collection to be extracted. The "Click to Upload" button in the first step is used to select the file to be uploaded. Only txt format documents or multiple mixed word format, txt format, and pdf format documents packaged in a compressed package can be uploaded here, and only one compressed package can be uploaded for one task; the file size limit is 256M. The second step is to enter the task name. Task names must not be repeated. If a task with a duplicate name is found, a pop-up window will appear showing "The current task name already exists, please modify the task name." The "Confirm Creation" button is used to trigger the creation of a new task, and then return to the example Figure 4d The offline batch extraction page shown; the "Cancel" button is used to abandon the creation task and also return to Figure 4d The page shown.

[0091] exist Figure 4d In the task list shown, the upload status bar shows the status of the document collection to be extracted, which is divided into upload success, upload failure, and uploading. The upload time is the time when the user completes uploading the compressed package. The model status bar displays the status of the node model, relationship model, and event model respectively. The status is divided into: extracting, successful extraction, failed extraction, and queuing. If there is no corresponding model, the status is displayed as "-". The review progress bar shows the progress of manual review of the extraction results, expressed as a percentage. For tasks that have not started review, the review progress is not started.

[0092] In the operation bar, "Start Extraction" is used to start the extraction task, and after it is started, it changes to "Extracting". The "View" button is used to view the extraction results (i.e. batch knowledge information), see Figure 4f . This page is related to Figure 4cThe real-time viewing pop-up window of the online application shown is similar. The left area displays the document content, and the right area displays the knowledge information extracted from the document according to the node, relationship, and event classification, and can be clicked to edit and modify. "Modification Record" is used to trigger the display of modification records. Click the "Previous Article" and "Next Article" buttons to switch to display different documents. Click "Document List" to view the list of uploaded document collections to be extracted. When the "Return to Task List" button is triggered, a pop-up window appears asking "Do you want to save the modified content?" If the user clicks "Yes", the changes are saved and the task returns. Figure 4d The offline batch extraction page shown in the figure; if the user clicks "No", the changes will not be saved and the page will return to the same page. Figure 4d The page shown.

[0093] In addition, in the operation bar, the "Download" button is used to download the extraction results. It only supports json format. After being triggered, the "Download" button changes to "Downloading". After the download is completed, a pop-up window displays "Download completed" and the "Downloading" button changes back to "Downloading". The "Delete" button is used to delete a task. When triggered, a prompt window will pop up, "Do you want to delete xx task? Will the data entered into the knowledge graph also be deleted?" The user clicks "Confirm" to delete the task and delete the data entered into the knowledge graph. Click "Cancel" to return. Figure 4d The page shown. Since the data extracted by this task will be synchronized to the knowledge graph, the data in the task can be regarded as the source data, and the data in the knowledge graph can be regarded as the pointer. Therefore, before deleting the task, you need to delete the data in the knowledge graph first, which is equivalent to deleting the source data only when the pointer is deleted to avoid pointer errors. The "Data Reflux" button is used to return the manually reviewed and modified data (i.e., the second revised knowledge information) to the server to retrain the model. After the task is started, the "View", "Download", and "Delete" buttons are available only when all three models of the current knowledge extraction model have completed extraction and the status of at least one model is successful extraction. After manual review, the "Data Reflux" button is available only if the user modifies the extraction results.

[0094] Device Item

[0095] Figure 5 is a block diagram illustrating an application device of a knowledge extraction model applied to a server according to an exemplary embodiment of the present disclosure.

[0096] Reference Figure 5 The application device 500 of the knowledge extraction model applied to the server includes a generating unit 501, a receiving unit 502, an extracting unit 503, and a sending unit 504.

[0097] The generating unit 501 may generate an online service interface of the pre-trained knowledge extraction model in response to an online request from a client for the pre-trained knowledge extraction model, so as to be called by a document processing application; wherein the document processing application is an application for processing documents, and the online service interface can be connected to the document processing application;

[0098] The receiving unit 502 may receive a call request from a document processing application for an online service interface; wherein the call request includes a document to be extracted;

[0099] The extraction unit 503 may extract knowledge information from the document to be extracted using a pre-trained knowledge extraction model in response to the call request to obtain target knowledge information;

[0100] Optionally, the extraction unit 503 can also: in response to a call request, extract first knowledge information from the document to be extracted according to preset extraction rules; run a pre-trained knowledge extraction model to extract second knowledge information from the document to be extracted; and merge the first knowledge information and the second knowledge information to obtain target knowledge information.

[0101] The sending unit 504 may feed back the target knowledge information to the document processing application so that the document processing application outputs the target knowledge information.

[0102] Optionally, the target knowledge information is in an editable state in the document processing application; the receiving unit 502 may also receive a first model update instruction sent by the document processing application; wherein the first model update instruction includes first revised knowledge information, and the first revised knowledge information is information obtained after the target knowledge information is edited; the application device 500 also includes a first update unit (not shown in the figure), which may respond to the first model update instruction, add the document to be extracted and the first revised knowledge information to the training sample of the pre-trained knowledge extraction model, and re-train the model to update the pre-trained knowledge extraction model.

[0103] Optionally, the receiving unit 502 can also receive a test request from the client; wherein the test request includes a test document; the extraction unit 503 can also respond to the test request and use a pre-trained knowledge extraction model to extract test knowledge information in the test document; the sending unit 504 can also feed back the test knowledge information to the client, so that the client can output the test knowledge information, so that the user can determine whether the test passes, and connect the online service interface to the document processing application when the test passes.

[0104] Optionally, the extraction unit 503 can also respond to the client's extraction request for the document set to be extracted, and use the pre-trained knowledge extraction model to extract the knowledge information of multiple documents in the document set to be extracted to obtain batch knowledge information; the sending unit 504 can also feed back the batch knowledge information to the client so that the client can output the batch knowledge information.

[0105] Optionally, the batch knowledge information is in an editable state in the client; the receiving unit 502 can also receive a second model update instruction sent by the client; wherein the second model update instruction includes the second revised knowledge information and the document corresponding to the second revised knowledge information, and the second revised knowledge information is the information obtained after the batch knowledge information is edited; the application device 500 also includes a second update unit (not shown in the figure), which can respond to the second model update instruction, add the second revised knowledge information and the document corresponding to the second revised knowledge information to the training sample of the pre-trained knowledge extraction model, and re-train the model to update the pre-trained knowledge extraction model.

[0106] Optionally, the sending unit 504 can also: feed back batch knowledge information to the client so that the client can output knowledge information of preset documents in the document set to be extracted, and the client is also used to respond to the document switching operation and output knowledge information of the document corresponding to the document switching operation; or feed back knowledge information of preset documents in the document set to be extracted to the client so that the client can output knowledge information of the preset documents, and in response to the client's document switching request, feed back knowledge information of the document corresponding to the document switching request to the client so that the client can switch to output knowledge information of the document corresponding to the document switching request.

[0107] Optionally, the receiving unit 502 can also receive the knowledge graph format and training samples uploaded by the client; the application device 500 also includes a training unit (not shown in the figure), which can train the knowledge extraction model to be trained based on the knowledge graph format and training samples to obtain a pre-trained knowledge extraction model.

[0108] Optionally, the training unit may also: based on the knowledge graph format and training samples, dynamically train the knowledge extraction model to be trained by gradually increasing the training samples participating in the training, so as to obtain a continuously updated pre-trained knowledge extraction model; during the dynamic training process, determine the evaluation indicators of the current latest pre-trained knowledge extraction model according to a set cycle; and feed back the evaluation indicators to the client so that the client can output the evaluation indicators.

[0109] Figure 6 is a block diagram illustrating an application device of a knowledge extraction model applied to a client according to an exemplary embodiment of the present disclosure.

[0110] Reference Figure 6The application device 600 of the knowledge extraction model applied to the client includes a sending unit 601, a receiving unit 602, and an output unit 603.

[0111] The sending unit 601 may send an online request for the pre-trained knowledge extraction model to the server in response to the user's online operation for the pre-trained knowledge extraction model; wherein the pre-trained knowledge extraction model is used to extract knowledge information in the document.

[0112] The receiving unit 602 can receive the online service interface of the pre-trained knowledge extraction model fed back by the server; wherein, the online service interface is used for being called by the document processing application, so that the server can use the pre-trained knowledge extraction model to extract the target knowledge information of the document to be extracted in the document processing application, and feed back the target knowledge information to the document processing application, which is an application used to process documents.

[0113] The output unit 603 may output the online service interface in response to the user's operation of acquiring the online service interface, so that the user can connect the online service interface to the document processing application.

[0114] Optionally, the application device 600 also includes a first input unit (not shown in the figure), which can obtain a test document input by a user; the sending unit 601 can also send a test request with a test document to the server; the receiving unit 602 can also receive test knowledge information fed back by the server; wherein the test knowledge information is knowledge information extracted from the test document by the server using a pre-trained knowledge extraction model; the output unit 603 can also output the test knowledge information for the user to determine whether the test passes, and execute the operation of obtaining the online service interface when it is determined that the test passes.

[0115] Optionally, the application device 600 also includes a second input unit (not shown in the figure), which can obtain the document set to be extracted input by the user; wherein the document set to be extracted includes multiple documents; the sending unit 601 can also send an extraction request for the document set to be extracted to the server; the receiving unit 602 can also receive batch knowledge information feedback from the server; wherein the batch knowledge information is the knowledge information extracted by the server from multiple documents in the document set to be extracted using a pre-trained knowledge extraction model; the output unit 603 can also output batch knowledge information.

[0116] Optionally, the application device 600 also includes an editing unit (not shown in the figure), which can obtain corrected knowledge information in response to the user's editing operation on the batch knowledge information; wherein the corrected knowledge information is the information obtained after the batch knowledge information is edited; the application device 600 also includes a generation unit (not shown in the figure), which can generate a model update instruction in response to the model update operation; the model update instruction includes the corrected knowledge information and the document corresponding to the corrected knowledge information; the sending unit 601 can also send the model update instruction to the server, so that the server can add the corrected knowledge information and the document corresponding to the corrected knowledge information to the training sample of the pre-trained knowledge extraction model, and re-train the model to update the pre-trained knowledge extraction model.

[0117] Optionally, the output unit 603 may also output knowledge information of preset documents in the document set to be extracted, and in response to the user's document switching operation, output knowledge information of the document corresponding to the document switching operation; or the receiving unit 602 may also receive knowledge information of preset documents in the document set to be extracted fed back by the server, and the sending unit 601 may also send a document switching request to the server in response to the user's document switching operation, and the receiving unit 602 may also receive knowledge information of the document corresponding to the document switching request fed back by the server.

[0118] Optionally, the application device 600 also includes a third input unit (not shown in the figure), which can obtain the knowledge graph format and training samples input by the user; the sending unit 601 can also send the knowledge graph format and training samples to the server, so that the server can train the knowledge extraction model to be trained based on the knowledge graph format and training samples to obtain a pre-trained knowledge extraction model.

[0119] Optionally, the server is used to dynamically train the knowledge extraction model to be trained based on the knowledge graph format and training samples, by gradually increasing the training samples participating in the training, so as to obtain a continuously updated pre-trained knowledge extraction model. The server is also used to determine the evaluation indicators of the current latest pre-trained knowledge extraction model according to a set period during the dynamic training process; the receiving unit 602 can also receive the evaluation indicators sent by the server; the output unit 603 can also output the evaluation indicators.

[0120] The above has been referred to Figures 1 to 6 A method and apparatus for applying a knowledge extraction model according to an exemplary embodiment of the present disclosure are described.

[0121] Figure 5 and Figure 6Each unit in the application device of the knowledge extraction model shown can be configured as software, hardware, firmware or any combination of the above items to perform a specific function. For example, each unit may correspond to a dedicated integrated circuit, or to a pure software code, or to a module combining software and hardware. In addition, one or more functions implemented by each unit may also be uniformly executed by components in a physical entity device (e.g., a processor, a client or a server, etc.).

[0122] In addition, refer to Figure 1 and Figure 3 The application method of the described knowledge extraction model can be implemented by a program (or instruction) recorded on a computer-readable storage medium. For example, according to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions can be provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is prompted to perform the application method of the knowledge extraction model according to the present disclosure.

[0123] The computer program in the computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. It should be noted that the computer program can also be used to perform additional steps in addition to the above steps or perform more specific processing when performing the above steps. The contents of these additional steps and further processing have been described in reference to Figure 1 and Figure 3 It is mentioned in the description of the related method, so it will not be repeated here to avoid repetition.

[0124] It should be noted that each unit in the application device of the knowledge extraction model according to the exemplary embodiment of the present disclosure can completely rely on the operation of the computer program to realize the corresponding function, that is, each unit corresponds to each step in the functional architecture of the computer program, so that the entire system is called through a special software package (for example, lib library) to realize the corresponding function.

[0125] on the other hand, Figure 5 and Figure 6 The various units shown may also be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. When implemented by software, firmware, middleware, or microcode, the program code or code segment for performing the corresponding operation may be stored in a computer-readable medium such as a storage medium, so that the processor may perform the corresponding operation by reading and running the corresponding program code or code segment.

[0126] For example, an exemplary embodiment of the present disclosure may also be implemented as a computing device, which includes a storage component and a processor, wherein a set of computer executable instructions is stored in the storage component, and when the set of computer executable instructions is executed by the processor, an application method of the knowledge extraction model according to the exemplary embodiment of the present disclosure is executed.

[0127] Specifically, the computing device can be deployed in a server or client, or can be deployed on a node device in a distributed network environment. In addition, the computing device can be a PC, a tablet device, a personal digital assistant, a smart phone, a web application, or other device capable of executing the above instruction set.

[0128] Here, the computing device is not necessarily a single computing device, but may also be any device or circuit collection that can execute the above instructions (or instruction sets) individually or jointly. The computing device may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that is interconnected with a local or remote (e.g., via wireless transmission) interface.

[0129] In a computing device, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, a processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.

[0130] According to the exemplary embodiment of the present disclosure, some operations described in the method for applying the knowledge extraction model can be implemented by software, some operations can be implemented by hardware, and furthermore, these operations can also be implemented by a combination of software and hardware.

[0131] The processor may execute instructions or codes stored in one of the storage components, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transmission protocol.

[0132] The storage component may be integrated with the processor, for example, RAM or flash memory is arranged within an integrated circuit microprocessor, etc. In addition, the storage component may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The storage component and the processor may be operatively coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor can read files stored in the storage component.

[0133] In addition, the computing device may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the computing device may be connected to each other via a bus and / or a network.

[0134] The application method of the knowledge extraction model according to the exemplary embodiment of the present disclosure can be described as various interconnected or coupled functional blocks or functional diagrams. However, these functional blocks or functional diagrams can be equally integrated into a single logical device or operate according to non-exact boundaries.

[0135] Therefore, refer to Figure 1 and Figure 3 The described method for applying the knowledge extraction model may be implemented by a system including at least one computing device and at least one storage device storing instructions.

[0136] According to an exemplary embodiment of the present disclosure, at least one computing device is a computing device for executing an application method of a knowledge extraction model according to an exemplary embodiment of the present disclosure, and a computer executable instruction set is stored in the storage device. When the computer executable instruction set is executed by the at least one computing device, the execution reference Figure 1 and Figure 3 Methods for applying the described knowledge extraction model.

[0137] The above describes various exemplary embodiments of the present disclosure, and it should be understood that the above description is only exemplary and not exhaustive, and the present disclosure is not limited to the disclosed exemplary embodiments. Without departing from the scope and spirit of the present disclosure, many modifications and changes are obvious to those of ordinary skill in the art. Therefore, the scope of protection of the present disclosure should be based on the scope of the claims.

Claims

1. An application method of a knowledge extraction model, characterized in that: Applied to the server, the application method includes: In response to a client's request to launch a pre-trained knowledge extraction model, an online service interface of the pre-trained knowledge extraction model is generated for invocation by a document processing application; wherein the document processing application is an application for processing documents, and the online service interface can be connected to the document processing application; Receiving a call request from the document processing application program for the online service interface; wherein the call request includes the document to be extracted; In response to the call request, extracting knowledge information from the document to be extracted using the pre-trained knowledge extraction model to obtain target knowledge information; The target knowledge information is fed back to the document processing application so that the document processing application outputs the target knowledge information.

2. The application method according to claim 1, characterized in that: The target knowledge information is in an editable state in the document processing application; After feeding back the target knowledge information to the document processing application so that the document processing application outputs the target knowledge information, the application method further includes: receiving a first model update instruction sent by the document processing application; wherein the first model update instruction includes first revised knowledge information, and the first revised knowledge information is information obtained after the target knowledge information is edited; In response to the first model update instruction, the document to be extracted and the first revised knowledge information are added to the training sample of the pre-trained knowledge extraction model, and the model training is re-performed to update the pre-trained knowledge extraction model.

3. The application method according to claim 1, characterized in that: The step of extracting knowledge information from the document to be extracted by using the pre-trained knowledge extraction model in response to the call request to obtain target knowledge information includes: In response to the calling request, extracting first knowledge information from the document to be extracted according to a preset extraction rule; Running the pre-trained knowledge extraction model to extract second knowledge information from the document to be extracted; The first knowledge information and the second knowledge information are combined to obtain the target knowledge information.

4. The application method according to claim 1, characterized in that: Before receiving the calling request of the document processing application program for the online service interface, the application method further includes: Receiving a test request from the client; wherein the test request includes a test document; In response to the test request, extracting test knowledge information in the test document using the pre-trained knowledge extraction model; The test knowledge information is fed back to the client, so that the client can output the test knowledge information, so that the user can determine whether the test is passed, and if it is determined that the test is passed, the online service interface is connected to the document processing application.

5. The application method according to claim 1, characterized in that: The application method further comprises: In response to an extraction request from the client for a document set to be extracted, extracting knowledge information of a plurality of documents in the document set to be extracted using the pre-trained knowledge extraction model to obtain batch knowledge information; The batch knowledge information is fed back to the client so that the client can output the batch knowledge information.

6. A method for applying a knowledge extraction model, characterized in that: Applied to the client, the application method includes: In response to a user's online operation for a pre-trained knowledge extraction model, sending an online request for the pre-trained knowledge extraction model to a server; wherein the pre-trained knowledge extraction model is used to extract knowledge information in a document; An online service interface for receiving the pre-trained knowledge extraction model fed back by the server; wherein the online service interface is used to be called by a document processing application, so that the server uses the pre-trained knowledge extraction model to extract target knowledge information of a document to be extracted in the document processing application, and feeds back the target knowledge information to the document processing application, wherein the document processing application is an application for processing documents; In response to a user's operation of acquiring the online service interface, the online service interface is outputted so that the user can connect the online service interface to the document processing application.

7. An application device of a knowledge extraction model, characterized in that: Applied to the server, the application device includes: A generating unit is configured to generate an online service interface of the pre-trained knowledge extraction model in response to an online request from a client for the pre-trained knowledge extraction model, so as to be called by a document processing application; wherein the document processing application is an application for processing documents, and the online service interface can be connected to the document processing application; A receiving unit, configured to receive a call request from the document processing application for the online service interface; wherein the call request includes a document to be extracted; An extraction unit is configured to extract knowledge information from the document to be extracted using the pre-trained knowledge extraction model in response to the call request to obtain target knowledge information; The sending unit is configured to feed back the target knowledge information to the document processing application so that the document processing application outputs the target knowledge information.

8. An application device of a knowledge extraction model, characterized in that: Applied to the client, the application device includes: A sending unit is configured to send an online request for the pre-trained knowledge extraction model to a server in response to an online operation of the user for the pre-trained knowledge extraction model; wherein the pre-trained knowledge extraction model is used to extract knowledge information in a document; A receiving unit is configured to receive an online service interface of the pre-trained knowledge extraction model fed back by the server; wherein the online service interface is used to be called by a document processing application, so that the server uses the pre-trained knowledge extraction model to extract target knowledge information of a document to be extracted in the document processing application, and feeds back the target knowledge information to the document processing application, wherein the document processing application is an application for processing documents; The output unit is configured to output the online service interface in response to a user's operation of acquiring the online service interface, so that the user can connect the online service interface to the document processing application.

9. A computer-readable storage medium storing instructions, characterized in that: When the instructions are executed by at least one computing device, the at least one computing device is prompted to execute the application method of the knowledge extraction model as claimed in any one of claims 1 to 7.

10. A system comprising at least one computing device and at least one storage device storing instructions, characterized in that: When the instructions are executed by the at least one computing device, the at least one computing device is prompted to execute the application method of the knowledge extraction model as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • General method for extracting document structural information

    CN103399857A

  • System and method for analyzing electronic documents on basis of machine learning

    CN108334501A

  • Knowledge graph service processing method and device

    CN112287114A

  • Intelligent information extraction system construction method based on automatic machine learning platform

    CN114118077A

  • Methods and systems for artificial intelligence-assisted document annotation

    US11443102B1