Domain report generation method and device
By obtaining keyword information, matching the target entity map and abstract text in the domain knowledge graph, and generating detailed and accurate domain reports, the problem of insufficient detailed and accurate content of the existing report is solved, and the professionalism of the report is improved.
Patent Information
- Application Number
- CN202311008490.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-21
AI Technical Summary
The content of existing field reports is not detailed and precise enough, resulting in their professionalism being unable to meet the needs of the company.
By obtaining keyword information for the specified domain, determine the domain knowledge graph, and match the target entity graph and the target summary text in the knowledge graph, generate detailed and accurate domain reports.
It improves the depth and breadth of field reports, makes it more professional and can better meet the information needs of enterprises.
Smart Images

Figure CN119493858A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for generating a field report. Background Art
[0002] Reports are one of the important means to reflect the basic situation of an enterprise's work. Especially when an enterprise involves business in multiple fields, reports can quickly feedback important or latest information in the field to the enterprise. When writing field reports, the corresponding information is generally obtained through information retrieval, and then the overall report is written based on the retrieved information.
[0003] At present, existing domain reports usually first search and select relevant information on the company's internal website through keywords, and then use a large language model to generate the corresponding domain report. However, since the selected information is partial information extracted from different materials, the content of the domain report is not detailed and accurate enough, that is, the depth and breadth of the content of the domain report are insufficient, and the professionalism of the domain report cannot meet the needs of the enterprise. Summary of the invention
[0004] In view of the above problems, the present application provides a method and device for generating a field report, the main purpose of which is to enhance the breadth and depth of the field report so that the professionalism of the field report meets the needs of the enterprise.
[0005] In order to solve the above technical problems, this application proposes the following solutions:
[0006] In a first aspect, the present application provides a method for generating a field report, the method comprising:
[0007] Get keyword information in the specified field;
[0008] Determine a domain knowledge graph corresponding to the specified domain, and match a corresponding target entity graph in the domain knowledge graph according to the keyword information, wherein the domain knowledge graph is used to represent a knowledge graph constructed based on ontology, relationships, and attributes in the specified domain;
[0009] Determine the target summary text corresponding to the keyword information;
[0010] A field report corresponding to the keyword information is generated according to the target entity graph and the target summary text.
[0011] In a second aspect, the present application provides a field report generating device, the device comprising:
[0012] An acquisition unit, used to acquire keyword information of a specified field;
[0013] A first determining unit is used to determine a domain knowledge graph corresponding to the specified domain obtained by the obtaining unit, and match a corresponding target entity graph in the domain knowledge graph according to the keyword information obtained by the obtaining unit, wherein the domain knowledge graph is used to represent a knowledge graph constructed based on ontology, relationship and attribute in the specified domain;
[0014] A second determining unit, configured to determine a target summary text corresponding to the keyword information obtained by the acquiring unit;
[0015] The first generating unit is used to generate a domain report corresponding to the keyword information according to the target entity graph obtained by the first determining unit and the target summary text obtained by the second determining unit.
[0016] In order to achieve the above-mentioned purpose, according to the third aspect of the present application, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the field report generation method of the above-mentioned first aspect.
[0017] In order to achieve the above-mentioned purpose, according to the fourth aspect of the present application, an electronic device is provided, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the field report generation method of the first aspect mentioned above.
[0018] By means of the above technical scheme, a method and device for generating a domain report provided by the present application is that when the domain report needs to be automatically generated, the keyword information of the specified domain is first obtained, that is, the user's writing intention is obtained, and then the domain knowledge graph corresponding to the specified domain is determined according to the specified domain, and the target entity graph corresponding to the keyword information is matched in the domain knowledge graph, wherein the domain knowledge graph is used to characterize the knowledge graph constructed by ontology, relationship and attribute based on the specified domain, that is, the target entity graph has the ontology, relationship and attribute corresponding to the keyword information, and the target summary text corresponding to the keyword information is determined in another way, and finally the domain report corresponding to the keyword information is generated by the target entity graph obtained in one way and the target summary text obtained in another way. Through the technical scheme provided by the present application, it is possible to obtain a knowledge graph with ontology, relationship and attribute from one way according to the keyword information, and obtain the relevant summary text from another way, that is, enrich the relevant information searched by the keyword information, and generate the domain report corresponding to the keyword information based on the two, so that the information used to generate the domain report is more detailed and accurate, thereby improving the depth and breadth of the content of the domain report, and then making the domain report more professional to meet the needs of enterprises.
[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0021] Figure 1 A flow chart of a method for generating a field report provided in an embodiment of the present application is shown;
[0022] Figure 2 A flow chart of another method for generating a field report provided in an embodiment of the present application is shown;
[0023] Figure 3 A block diagram showing a device for generating a field report according to an embodiment of the present application is shown;
[0024] Figure 4 A block diagram showing another device for generating a field report provided in an embodiment of the present application is shown;
[0025] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present application is shown;
[0026] Figure 6 A schematic diagram of the page layout of the target entity graph and target summary text provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0028] At present, whether the domain report generated by the large language model is professional is positively correlated with whether the selected information is rich and comprehensive. The corresponding information is searched and selected on the internal website of the enterprise through keywords. The selected information is partial information extracted from different materials, such as summary content, etc. However, the details in a document are not all reflected in the partial information, such as ontology relationships, ontology attributes, relationship attributes, etc. This leads to the content of the final generated domain report being not detailed and accurate enough, that is, the depth and breadth of the content of the domain report are insufficient, and the professionalism of the domain report cannot meet the needs of the enterprise.
[0029] After research, the inventors found that a domain report can be generated based on the summary text obtained by searching within the application field, combined with the domain knowledge graph composed of the ontology, relationships and attributes within the field, thereby enriching the relevant information searched through keywords, so as to achieve the purpose of making the information used in the final generation of the domain report more detailed and accurate, thereby improving the depth and breadth of the content of the domain report, making the domain report more professional, and meeting the needs of enterprises.
[0030] Based on the above considerations, the embodiment of the present application provides a technical solution for generating a domain report. Specifically, the keyword information of the specified domain is first obtained, and then the domain knowledge graph corresponding to the specified domain is determined, and the corresponding target entity graph is matched in the domain knowledge graph according to the keyword information, wherein the domain knowledge graph is used to represent the knowledge graph constructed based on the ontology, relationship and attribute in the specified domain, and the target summary text corresponding to the keyword information is determined at the same time, and finally the domain report corresponding to the keyword information is generated according to the target entity graph and the target summary text.
[0031] Based on the above-mentioned technical solution for generating a field report, the embodiment of the present application provides a method and device for generating a field report. The method and device for generating a field report provided by the embodiment of the present application can be applied to any scenario where a corresponding professional report needs to be generated based on important information in the field. For example, it is applied to the monthly technical report within the enterprise, such as the technical report in the oil and gas field.
[0032] The following is a detailed description of the field report generation method and device provided in the embodiments of the present application.
[0033] like Figure 1 As shown, the embodiment of the present application provides a method for generating a field report, through which the breadth and depth of the field report can be improved so that the professionalism of the field report meets the needs of the enterprise. The method for generating a field report mainly includes the following steps 101-104:
[0034] 101. Get keyword information in a specified field.
[0035] The designated field of the embodiment of the present application can be any field involved in the business of the enterprise, and the keyword information refers to the writing needs of the user to generate a report in the corresponding field, which can be represented by the meaning of topic selection, theme, etc., for example, the characteristics of Luzhou Oilfield, etc. Specifically, a corresponding search interface can be set on the client, and the keyword information can be obtained by the user entering the terms in the search box in the search interface. A corresponding selection interface can also be set, and the optional items corresponding to the designated field are set in the selection interface, and the keyword information is determined by the configuration of the optional items. This embodiment does not limit this. The client can be an application software, a small program or a web page running on a computer, IPAD, smart phone, etc.
[0036] 102. Determine the domain knowledge graph corresponding to the specified domain, and match the corresponding target entity graph in the domain knowledge graph based on the keyword information.
[0037] In this step, since the specified field has been determined, the corresponding domain knowledge graph can be determined based on the specified field. The domain knowledge graph is pre-constructed through the domain corpus of the specified field, and is used to characterize the knowledge graph constructed based on the specified field through ontology, relationship and attribute, wherein the attribute refers to ontology attribute and relationship attribute. The ontology is any object selected by the user in the specified field, that is, a node type reflected in the knowledge graph, which has corresponding ontology attributes. In the oil and gas field, the ontology includes but is not limited to a basin, an oil field, a well, a level of structure, an oil field production, etc. Water volume, etc., while an oil and gas field has attributes such as name, organization, level, and geological unit area. Relationships are used to characterize the relationship types between entities, that is, the connection structure between each node in the knowledge graph, which also has corresponding relationship attributes, including but not limited to containment, location, indicators, indicator association, generation, etc., and what is constructed based on the three is the entity examples reflected in the knowledge graph one by one. Therefore, the corresponding partial knowledge graph can be determined in the knowledge graph in the field by matching the keyword information with each entity example in the knowledge graph in the field, and this partial knowledge graph is the target entity graph.
[0038] It should be emphasized that the specific method for determining the corresponding domain knowledge graph through the specified domain can be determined by establishing a domain keyword index, such as maintaining a corresponding relationship table, etc. The specific method for determining the target entity sample based on keyword information can be matched through the subject information contained in the keyword information, and can be matched together through the subject information contained in the keyword information and the relationship information between the subjects. The specific method can be determined according to the specific content contained in the keyword information. Before that, the domain corpus used in pre-constructing the domain knowledge graph can be internal papers of the enterprise, public industry standards in the field, textbooks implemented in the field, etc. This embodiment does not limit this.
[0039] 103. Determine the target summary text corresponding to the keyword information.
[0040] In this step, the summary text may be pre-generated by the domain corpus used in the aforementioned step 102 and stored together with the original text of the domain corpus in a full-text search engine or a relational database, and the target summary text is at least one summary text corresponding to the keyword information, which is used to characterize the degree of matching of the corresponding content obtained by searching based on the keyword information, that is, the relevance. Since the target summary text may be one or more, a selection rule may be pre-configured. The selection rule may be a rule with a number as a restriction condition set based on the relevance, or a rule with a score as a restriction condition set based on the relevance. This embodiment does not limit this, and it is only necessary to ensure that the target summary text is the optimal one or more summary texts selected based on the relevance.
[0041] Among them, this step is another step implemented in parallel with step 102. Specifically, an information display page corresponding to the search content can be set, and different partitions can be set on the page to reflect the target entity map and the target summary text in the content page, so that the user can obtain the corresponding related field information on the client side.
[0042] 104. Generate a domain report corresponding to the keyword information according to the target entity graph and the target summary text.
[0043] Based on the implementation of the aforementioned steps 102-103, the target entity graph and the target summary text have been determined. Therefore, at this time, the two can be used together as the related field information corresponding to the keyword information to generate the corresponding field report. Specifically, it can be achieved through a pre-configured report generation template or an existing large language model, that is, the two are organized into a complete input sample to obtain the corresponding field report. Since the target entity graph corresponds to the keyword information and can represent the subject, relationship and attribute in the keyword information, and the target summary text is also a summary text related to the keyword information, therefore, using the two together as a complete input sample can make the related field information of the keyword information richer and more comprehensive, thereby making the field report output by the large language model more detailed and accurate, that is, improving the depth and breadth of the content of the field report, making the field report more professional, thereby meeting the needs of the enterprise.
[0044] Based on the above Figure 1It can be seen from the implementation method that a method for generating a domain report provided by the present application is to obtain the keyword information of the specified domain when the domain report needs to be automatically generated, that is, to obtain the user's writing intention, and then determine the domain knowledge graph corresponding to the specified domain according to the specified domain, and match the target entity graph corresponding to the keyword information in the domain knowledge graph, wherein the domain knowledge graph is used to characterize the knowledge graph constructed by ontology, relationship and attribute based on the specified domain, that is, the target entity graph has the ontology, relationship and attribute corresponding to the keyword information, and the other path determines the target summary text corresponding to the keyword information, and finally generates the domain report corresponding to the corresponding keyword information through the target entity graph obtained by one path and the target summary text obtained by another path. Through the technical solution provided by the present application, it is possible to obtain the knowledge graph with ontology, relationship and attribute from one path according to the keyword information, and obtain the relevant summary text from another path, that is, enrich the relevant information searched by the keyword information, and generate the domain report corresponding to the keyword information based on the two, so that the information used to generate the domain report is more detailed and accurate, thereby improving the depth and breadth of the content of the domain report, and then making the domain report more professional to meet the needs of enterprises.
[0045] Furthermore, the preferred embodiment of the present application is in the above Figure 1 Based on this, a detailed description of the process of generating a field report is given. The specific steps are as follows Figure 2 As shown, including:
[0046] 201. Obtain a corpus in a specified field, and perform text processing on each corpus in the corpus to obtain a text corpus.
[0047] In this embodiment, the corpus of the specified field refers to the relevant corpus in the field, which includes but is not limited to internal papers of the enterprise, industry standards disclosed in the field, textbooks implemented in the field, etc. Specifically, an interface corresponding to the storage of the corpus in the enterprise server can be set, and the relevant corpus can be obtained through the interface to form a collection, i.e., a corpus. However, in actual applications, the formats of the relevant corpus are different, which may be plain text, rich text, etc. In order to ensure the accuracy and convenience of the subsequent construction of the domain knowledge graph based on the corpus and the generation of the corresponding summary text, each corpus in the corpus can be text-processed to obtain a text corpus, wherein the text processing specifically refers to plain text processing. Specifically, the corpus can be processed by a corresponding format conversion tool to obtain a text corpus corresponding to the specified field, so as to execute subsequent steps 202 and 203.
[0048] 202. Extract entity samples from each text corpus in the text corpus set, and build a domain knowledge graph based on all entity samples.
[0049] In this step, entity samples refer to instance objects composed of subjects, relationships, and attributes within a specified domain. They can be extracted from each text corpus in the text corpus and stored in the graph database of the server. Based on the relationship between the graph database and the domain knowledge graph, the domain knowledge graph can be automatically constructed. Specifically, a storage directory dedicated to the domain can be set in the database so that all entity samples corresponding to the domain are stored in the directory.
[0050] Since the amount of data in the text corpus is too large, there may be multiple entity samples in a text corpus, and the subjects, relations and attributes in the text corpus are relatively complex. Therefore, in order to improve the efficiency and accuracy of entity sample extraction, entity samples can be extracted by training models. Specifically, some text corpora in the text corpus are selected as basic samples, and extracted samples are annotated in each basic sample to obtain training samples. The extracted samples are used to represent the entity samples composed of ontology, relations and attributes in each basic sample; the extraction model is trained with the training samples, and information is extracted from each text corpus in the text corpus based on the extraction model to obtain entity samples in each text corpus.
[0051] It should be noted that part of the text corpus may be representative text corpus in the text corpus set that can fully annotate the extracted samples, and may be sampled or selected in a targeted manner by a fixed number or a fixed ratio. This embodiment does not limit this, and the extracted samples are entity samples, which may be annotated in part of the text corpus, and the annotation method may be highlighting, bolding, coloring, etc. Specifically, one or more annotation methods may be selected for custom annotation based on the number of entity samples and whether they overlap with each other, so as to accurately reflect the entity samples of part of the text corpus, thereby obtaining training samples for training the extraction model. The extraction model is trained by the training samples, so that all entity samples existing in the text corpus in the text corpus set can be extracted, which not only improves the efficiency and accuracy of entity sample extraction through automatic extraction, but also further ensures the professionalism of subsequent field report generation.
[0052] 203. Generate summary texts corresponding to the respective text corpora in the text corpus set, and jointly establish an index based on each summary text and the text corpora corresponding to each summary text.
[0053] In this step, the summary of each text corpus can be generated based on existing summary generation methods, including but not limited to extractive summary, generative summary, etc., and in order to facilitate the subsequent search of relevant summary texts and text corpora corresponding to the relevant summary texts based on keyword information, taking into account the advantages and disadvantages of full-text search engines and relational databases, this embodiment adopts a more suitable full-text search engine to ensure the accuracy of the search. Specifically, each summary text and the text corpus corresponding to each summary text can be imported into the full-text search engine together, so that it can automatically establish an index according to keywords, so as to automatically match the corresponding relevant summary texts and the relevant summary texts based on the keyword index.
[0054] Since the text corpus is obtained through textual processing of the corpus, and the corpus includes but is not limited to internal papers of the enterprise, public industry standards in the field, textbooks implemented in the field, etc., therefore, in order to improve the efficiency and professionalism of summary text generation, specifically, the corpus type of each text corpus in the text corpus can be determined, and the corpus type includes a summary type and a non-summary type; if it is a summary type, the summary sentence in the text corpus is directly extracted as the summary text; if it is a non-summary type, the summary text is generated based on several important sentences in the text corpus.
[0055] Among them, due to the format requirements of papers, textbooks, etc., an abstract part is generally written in the corresponding content. Therefore, papers, textbooks, etc. belong to the type with abstracts, while industry standards are generally in the form of regulations, and the corresponding content may not have an abstract part. Therefore, different summary text generation methods can be set according to different corpus types. Specifically, for the type with abstracts, the abstract sentences in the text corpus are directly extracted as the summary text, and the summary text can represent the core content of the text corpus. For the type without abstracts, the summary text is generated based on several important sentences in the text corpus, wherein the important sentences can be the first sentence or the last sentence of each paragraph, etc., which can express the main idea of the paragraph. Specifically, it can be generated by an extractive summary, that is, generated by extracting titles, topics, and main sentences, etc., and it can also be generated by a generative summary, that is, automatically generated by an NLP model. This is not limited in this embodiment.
[0056] 204. Obtain keyword information of a specified field.
[0057] This step is combined with the description of step 101 in the above method, and the same contents are not repeated here.
[0058] 205. Determine the domain knowledge graph corresponding to the specified domain, and match the corresponding target entity graph in the domain knowledge graph according to the keyword information.
[0059] This step is combined with the description of step 102 in the above method, and the same content is not repeated here. It should be noted that since the keyword information must contain the corresponding subject information, in order to ensure the accuracy of matching the corresponding target entity graph in the domain knowledge graph, specifically, the ontology information in the keyword information is matched with all entity samples in the domain knowledge graph to obtain the target entity sample; the corresponding part of the knowledge graph of the target entity sample in the domain knowledge graph is used as the target entity graph.
[0060] For example, in the aforementioned “Characteristics of Ouzhou Oilfield”, Ouzhou Oilfield is the subject information, and in the domain knowledge graph, Ouzhou Oilfield naturally corresponds to the entity sample. Therefore, the corresponding partial knowledge graph can be determined in the domain knowledge graph by matching the subject information with the subject corresponding to each entity sample in the domain knowledge graph, and this partial knowledge graph is the target entity graph.
[0061] 206. Determine a target summary text corresponding to the keyword information.
[0062] This step is combined with the description of step 103 in the above method, and the same content is not repeated here. However, it should be noted that since the target summary text can be one or more, in order to further ensure the relevance of the relevant summary texts obtained by searching based on keyword information, specifically, the relevant summary texts corresponding to the keyword information are determined based on the index; at least one relevant summary text is selected as the target summary text according to the preset extraction rules, and the preset extraction rules are used to characterize the rules for extracting the relevant summary texts based on the relevance. Among them, the index is an index automatically constructed after generating a summary text and storing the summary text and the corresponding text corpus in the full-text search engine. Based on the index, the search information consisting of the matching relevant summary text and the text corpus corresponding to the relevant summary text can be quickly searched. By setting the preset extraction rules, the selection of relevant summary texts can be restricted based on the relevance, so as to obtain the target summary text. Since the application of the aforementioned score restriction condition inevitably requires setting a score threshold for judgment, if the relevance score of each relevant summary text is low, there may be a situation where the score does not meet the standard, which will cause the relevant summary text to be unable to be applied. Therefore, in this embodiment, the restriction is specifically a quantity restriction. Since it is sorted by relevance in the relevant content display page of the client, the relevant summary texts ranked top 3 or top 5 in relevance can be selected as the target summary text.
[0063] 207. Generate a domain report corresponding to the keyword information according to the target entity graph and the target summary text.
[0064] This step is combined with the description of step 104 in the above method, and the same content is not repeated here. It should be noted that in order to improve the availability of the corresponding information of the target entity graph and the convenience of generating a domain report, specifically, the attribute information corresponding to the target entity graph is merged with the target summary text to obtain the associated domain information corresponding to the keyword information; the associated domain information is input into the large language model to generate a domain report corresponding to the keyword information. Among them, since the entity sample corresponding to the target entity graph corresponds to the main information in the keyword information, and the entity sample also contains information about relationships and attributes, the attribute information corresponding to the target entity graph can be merged with the target summary text, and the merging method can be partition merging or overall cross merging. This embodiment does not limit this, and only needs to ensure that the associated domain information is clear and clear. By inputting the associated domain information into the large language model, the corresponding domain report can be obtained through the large language model, wherein the large speech model has the characteristics of direct use without construction, and specifically, chatglm or moss can be used.
[0065] For example, Figure 6 As shown, the upper part is the target entity graph and the attribute information corresponding to the graph, and the lower part is the information of the relevant summary text obtained by the search, which is sorted according to the relevance. Assuming that the limit number of target summary texts is 1, the subsequent related field information is composed of the left half of the upper part (attribute information) and the first relevant summary text in the lower part.
[0066] Furthermore, in order to ensure the timeliness of the domain report and thus make the domain report more professional, specifically, the corresponding reminder information for adding the corpus set of the specified domain is generated periodically, so as to update the domain knowledge graph and the summary text. Among them, the periodicity can be cycled in time units such as one week and one month, and the specific duration can be customized. The reminder information can be added by prompting in a pop-up window on the client or sending text messages, emails, etc. This embodiment does not limit this. By prompting to add corpus, the domain knowledge graph and the summary text can be updated in time to ensure the timeliness of the domain report.
[0067] Furthermore, as a response to the above Figure 1-2 The implementation of the method embodiment shown in the figure, the embodiment of the present application provides a field report generation device, which is used to improve the breadth and depth of the field report so that the professionalism of the field report meets the needs of the enterprise. The embodiment of the device corresponds to the aforementioned method embodiment. For the sake of ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Specifically, Figure 3 As shown, the device comprises:
[0068] An acquisition unit 31 is used to acquire keyword information of a specified field;
[0069] A first determining unit 32 is used to determine the domain knowledge graph corresponding to the specified domain obtained by the obtaining unit 31, and match the corresponding target entity graph in the domain knowledge graph according to the keyword information obtained by the obtaining unit 31, wherein the domain knowledge graph is used to represent the knowledge graph constructed based on the ontology, relationship and attribute in the specified domain;
[0070] A second determining unit 33, configured to determine a target summary text corresponding to the keyword information obtained by the obtaining unit 31;
[0071] The first generating unit 34 is used to generate a domain report corresponding to the keyword information according to the target entity graph obtained by the first determining unit 32 and the target summary text obtained by the second determining unit 33.
[0072] Furthermore, if Figure 4 As shown, the device also includes:
[0073] The processing unit 35 is used to obtain the corpus of the specified field before the obtaining unit, and perform text processing on each corpus in the corpus to obtain a text corpus;
[0074] A construction unit 36 is used to extract the entity examples from each text corpus in the text corpus set obtained by the processing unit 35, and construct the domain knowledge graph based on all the entity examples;
[0075] The second generating unit 37 is used to generate summary texts corresponding to the respective text corpora in the text corpus set obtained by the processing unit 35, and jointly establish an index based on each summary text and the text corpora corresponding to each summary text.
[0076] Furthermore, if Figure 4 As shown, the construction unit 36 includes:
[0077] The first processing module 361 is used to select part of the text corpus in the text corpus set as basic samples, and extract and annotate samples in each of the basic samples to obtain training samples, wherein the extracted samples are used to represent entity samples composed of entities, relationships and attributes in each of the basic samples;
[0078] The second processing module 362 is used to train the extraction model using the training samples obtained by the first processing module 361, and extract information from each text corpus in the text corpus set based on the extraction model to obtain the entity examples in each text corpus.
[0079] Furthermore, if Figure 4 As shown, the second generating unit 37 includes:
[0080] A first determination module 371 is used to determine the corpus type of each text corpus in the text corpus set, wherein the corpus type includes a type with summary and a type without summary;
[0081] A first generating module 372 is configured to directly extract a summary sentence from the text corpus as the summary text if the summary type is obtained by the first determining module 371;
[0082] The first generating module 372 is further configured to generate the summary text based on several important sentences in the text corpus if the type of no summary is obtained by the first determining module 371 .
[0083] Furthermore, if Figure 4 As shown, the first determining unit 32 includes:
[0084] A matching module 321, configured to match the ontology information in the keyword information with all the entity examples in the domain knowledge graph obtained by the construction unit 36 to obtain a target entity example;
[0085] The second determination module 322 is used to use the partial knowledge graph corresponding to the target entity sample obtained by the matching module 321 in the domain knowledge graph as the target entity graph.
[0086] Furthermore, if Figure 4 As shown, the second determining unit 33 includes:
[0087] A third determining module 331, configured to determine relevant summary text corresponding to the keyword information based on the index obtained by the second generating unit 37;
[0088] The selection module 332 is used to select at least one of the related summary texts obtained by the third determination module 331 as a target summary text according to a preset extraction rule, wherein the preset extraction rule is used to represent a rule for extracting the related summary text based on relevance.
[0089] Furthermore, if Figure 4 As shown, the first generating unit 34 includes:
[0090] A merging module 341 is used to merge the attribute information corresponding to the target entity graph with the target summary text to obtain the associated field information corresponding to the keyword information;
[0091] The second generating module 342 is used to input the associated domain information obtained by the merging module into a large language model to generate a domain report corresponding to the keyword information.
[0092] Furthermore, if Figure 4 As shown, the device also includes:
[0093] The third generating unit 38 is used to periodically generate the adding prompt information corresponding to the corpus of the specified field, so as to update the field knowledge graph and the summary text.
[0094] Furthermore, an embodiment of the present application also provides an electronic device, the electronic device includes a processor and a memory, the acquisition unit 31, the first determination unit 32, the second determination unit 33 and the first generation unit 34 are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory.
[0095] One or more kernels can be set to improve the breadth and depth of the domain report by adjusting the kernel parameters so that the professionalism of the domain report meets the needs of the enterprise.
[0096] An embodiment of the present application provides a storage medium on which a program is stored. When the program is executed by a processor, the field report generation method is implemented.
[0097] An embodiment of the present application provides a processor, which is used to run a program, wherein the field report generation method is executed when the program is run.
[0098] The present application embodiment provides a device 40, such as Figure 5 As shown, the device 40 includes at least one processor 401, at least one memory 402 and a bus 403 connected to the processor 401; the processor 401 and the memory 402 communicate with each other through the bus 403; the processor 401 is used to call the program instructions in the memory 402 to execute the above-mentioned field report generation method. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0099] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining keyword information of a specified field; determining a domain knowledge graph corresponding to the specified field, and matching a corresponding target entity graph in the domain knowledge graph based on the keyword information, wherein the domain knowledge graph is used to represent a knowledge graph constructed based on ontology, relationships and attributes within the specified field; determining a target summary text corresponding to the keyword information; and generating a domain report corresponding to the keyword information based on the target entity graph and the target summary text.
[0100] Before obtaining the keywords of the specified field, the method also includes: obtaining a corpus of the specified field, and textualizing each corpus in the corpus to obtain a text corpus; extracting the entity samples in each text corpus in the text corpus, and constructing the domain knowledge graph based on all the entity samples; generating summary texts corresponding to each text corpus in the text corpus, and jointly establishing an index based on each summary text and the text corpus corresponding to each summary text.
[0101] The extracting of the entity samples from each text corpus in the text corpus includes: selecting part of the text corpus in the text corpus as basic samples, and annotating the extracted samples in each of the basic samples to obtain training samples, wherein the extracted samples are used to characterize the entity samples composed of ontology, relationship and attribute in each of the basic samples; using the training samples to train an extraction model, and extracting information from each text corpus in the text corpus based on the extraction model to obtain the entity samples in each of the text corpora.
[0102] The generating of summary texts corresponding to the respective text corpora in the text corpus set comprises: determining the corpus type of the respective text corpora in the text corpus set, wherein the corpus type comprises a type with summary and a type without summary; if the type is the type with summary, directly extracting summary sentences in the text corpus as the summary text; if the type is the type without summary, generating the summary text based on several important sentences in the text corpus.
[0103] The matching of the corresponding target entity graph in the domain knowledge graph according to the keyword information includes: matching the ontology information in the keyword information with all entity samples in the domain knowledge graph to obtain the target entity sample; and using the partial knowledge graph corresponding to the target entity sample in the domain knowledge graph as the target entity graph.
[0104] The determining of the target summary text corresponding to the keyword information includes: determining the relevant summary text corresponding to the keyword information based on the index; selecting at least one of the relevant summary texts as the target summary text according to a preset extraction rule, wherein the preset extraction rule is used to represent a rule for extracting the relevant summary text based on relevance.
[0105] Generate a domain report corresponding to the keyword information according to the target entity graph and the target summary text, including: merging the attribute information corresponding to the target entity graph with the target summary text to obtain the associated domain information corresponding to the keyword information; inputting the associated domain information into a large language model to generate a domain report corresponding to the keyword information.
[0106] The method further includes: periodically generating adding prompt information corresponding to the corpus of the specified field, so as to update the field knowledge graph and the summary text.
[0107] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0108] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.
[0109] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
[0110] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0111] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0112] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0113] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for generating a field report, characterized in that: The method comprises: Get keyword information in the specified field; Determine a domain knowledge graph corresponding to the specified domain, and match a corresponding target entity graph in the domain knowledge graph according to the keyword information, wherein the domain knowledge graph is used to represent a knowledge graph constructed based on ontology, relationships, and attributes in the specified domain; Determine the target summary text corresponding to the keyword information; A field report corresponding to the keyword information is generated according to the target entity graph and the target summary text.
2. The method according to claim 1, characterized in that Before acquiring the keywords of the specified field, the method further includes: Acquire a corpus of the specified field, and perform text processing on each corpus in the corpus to obtain a text corpus; Extracting the entity examples from each text corpus in the text corpus set, and constructing the domain knowledge graph based on all the entity examples; A summary text corresponding to each text corpus in the text corpus set is generated, and an index is jointly established based on each summary text and the text corpus corresponding to each summary text.
3. The method according to claim 2, characterized in that The extracting the entity examples from each text corpus in the text corpus set includes: Selecting part of the text corpus in the text corpus as basic samples, and extracting and annotating samples in each of the basic samples to obtain training samples, wherein the extracted samples are used to characterize entity samples composed of ontology, relationship and attribute in each of the basic samples; The training samples are used to train an extraction model, and information is extracted from each text corpus in the text corpus set based on the extraction model to obtain the entity examples in each text corpus.
4. The method according to claim 2, characterized in that: The generating of summary texts corresponding to the respective text corpora in the text corpus set comprises: Determine the corpus type of each text corpus in the text corpus set, wherein the corpus type includes a type with an abstract and a type without an abstract; If it is the type with summary, directly extract the summary sentence in the text corpus as the summary text; If it is the non-summary type, the summary text is generated based on several important sentences in the text corpus.
5. The method according to claim 2, characterized in that: The matching of the corresponding target entity graph in the domain knowledge graph according to the keyword information includes: Matching the ontology information in the keyword information with all entity examples in the domain knowledge graph to obtain target entity examples; The part of the knowledge graph corresponding to the target entity example in the domain knowledge graph is used as the target entity graph.
6. The method according to claim 2, characterized in that The step of determining the target summary text corresponding to the keyword information includes: Determine relevant summary text corresponding to the keyword information based on the index; At least one of the related summary texts is selected as a target summary text according to a preset extraction rule, wherein the preset extraction rule is used to represent a rule for extracting the related summary text based on relevance.
7. The method according to claim 1, characterized in that Generating a field report corresponding to the keyword information according to the target entity graph and the target summary text includes: Merging the attribute information corresponding to the target entity graph with the target summary text to obtain the associated field information corresponding to the keyword information; The associated domain information is input into a large language model to generate a domain report corresponding to the keyword information.
8. A field report generating device, characterized in that: The device comprises: An acquisition unit, used to acquire keyword information of a specified field; A first determining unit is used to determine a domain knowledge graph corresponding to the specified domain obtained by the obtaining unit, and match a corresponding target entity graph in the domain knowledge graph according to the keyword information obtained by the obtaining unit, wherein the domain knowledge graph is used to represent a knowledge graph constructed based on ontology, relationship and attribute in the specified domain; A second determining unit, configured to determine a target summary text corresponding to the keyword information obtained by the acquiring unit; The first generating unit is used to generate a domain report corresponding to the keyword information according to the target entity graph obtained by the first determining unit and the target summary text obtained by the second determining unit.
9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the field report generation method according to any one of claims 1 to 7.
10. An electronic device, comprising at least one processor, and at least one memory and a bus connected to the processor; wherein: The processor and the memory communicate with each other via the bus; The processor is used to call the program instructions in the memory to execute the field report generation method according to any one of claims 1 to 7.
Citation Information
Cited By
LLM-based industry map multi-modal report generation system
CN120996158A
Method for generating navigation announcement abstract through artificial intelligence technology
CN121071136A