Secondary training method of evaluation report entity extraction model and related equipment

By preprocessing and secondary training of the evaluation report, the pre-training model is optimized, which solves the problem of low entity extraction success rate in the evaluation report in the existing technology, achieves a higher recognition rate, and meets the actual needs in the field of network security.

CN118821733AInactive Publication Date: 2024-10-22HEFEI TANOVO INFORMATION SECURITY TECH CO LTD

Patent Information

Application Number
CN202411304124.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-10-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing pre-trained large language model has a low success rate of entity extraction in evaluation reports in the field of network security, which cannot meet the needs of practical applications and is difficult to accurately identify and extract entity information in evaluation reports.

Method used

By preprocessing the original text of the evaluation report, including semantic segmentation, text cleaning and entity annotation, we create an annotation data set in JSON format, conduct secondary training of the pre-trained model, and optimize the model to improve the recognition rate of entity extraction.

Benefits of technology

The recognition rate of entity extraction in evaluation reports has been significantly improved, from the original 65% to 89.4%, allowing the model to more accurately understand and extract entity information in evaluation reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118821733A_ABST
    Figure CN118821733A_ABST
Patent Text Reader

Abstract

The invention discloses a secondary training method of an evaluation report entity extraction model and related equipment. The secondary training method comprises the following steps: initializing a secondary training environment of a pre-training model; wherein the secondary training environment is provided with a python language dependence library; receiving an original text of the evaluation report; preprocessing the original text of the evaluation report to obtain a json format text set; according to the json format text set, performing secondary training on the pre-training model to obtain a secondary training model which can be used for evaluation report entity extraction; according to the method, special preprocessing and secondary training are carried out on the field data of the network security evaluation report, so that the model can better understand and extract entity information in the evaluation report, the identification rate of entity extraction is improved, and finally an evaluator can apply the secondary training model to evaluation report analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence natural language processing technology, and specifically to a secondary training method and related equipment for an evaluation report entity extraction model. Background Art

[0002] With the rapid development of the Internet in recent years, it has been deeply embedded in every corner of daily life, giving ordinary people unprecedented capabilities, allowing them to seamlessly connect to the world even at home. However, the borderless nature of the network has also attracted the attention of criminals, who have used technical loopholes to carry out network attacks, seriously disrupting the order of the network. Since the advent of the first computer virus "Elk Cloner" in 1981, the form of network threats has undergone several iterations and upgrades, and its complexity and unpredictability have posed a severe challenge to global information security. In order to cope with this crisis and protect internal secrets from being leaked, institutions from all walks of life have raised their awareness of network security and continued to increase their investment in network security protection. Against this background, the level protection assessment service came into being. It has not only become an important part of the network security strategy of large enterprises, but also a key indicator for measuring the level of enterprise network security. This service helps enterprises identify risks and strengthen their defense systems through a comprehensive security assessment of the enterprise's information infrastructure, thereby effectively resisting potential network threats and ensuring business continuity and data security. In summary, network security has become an indispensable part of the digital age. As a professional and necessary measure, the level protection assessment service is of great significance for maintaining the information security of enterprises and even the entire society.

[0003] The evaluation service mainly includes two steps: the first step is that the evaluator goes to the site to conduct a detailed analysis and inspection of the internal servers and computers; the second step is to write an analysis report, summarize the analysis results and make suggestions. At present, it takes a lot of time and is difficult to ensure the accuracy of the evaluation report written and reviewed by the evaluator. In addition, the company's management hopes to guide the project positioning and investment direction through in-depth analysis reports, but facing a large amount of redundant data, this work is particularly difficult to advance.

[0004] With the rise of artificial intelligence large language models, it was originally expected to directly use pre-trained models for entity extraction in the field of network security. However, after a large number of practical tests, it was found that the maximum success rate of entity extraction in network security can only reach about 65%, which is far from meeting the needs of practical applications. Therefore, the existing pre-trained large models need to improve the recognition rate in evaluation report entity extraction, that is, the proportion of evaluation report entities (such as server addresses, IP addresses, and vulnerability types) that can be correctly identified and extracted by the pre-trained models. Summary of the invention

[0005] This embodiment provides a secondary training method and related equipment for an evaluation report entity extraction model, and explores how to improve the recognition rate of the pre-trained model in the prior art when extracting evaluation report entities.

[0006] In a first aspect, the present invention provides a secondary training method for an evaluation report entity extraction model, comprising: Initialize the secondary training environment of the pre-trained model; wherein the secondary training environment is installed with a python language dependency library; Receiving the original text of the evaluation report; Preprocessing the original text of the evaluation report to obtain a text set in JSON format; According to the JSON format text set, the pre-trained model is retrained to obtain a secondary training model that can be used for entity extraction in the evaluation report.

[0007] In some of the embodiments, the original text of the evaluation report is preprocessed to obtain a text set in JSON format, including: Performing semantic segmentation on the original text of the evaluation report to obtain independent sentences; Performing text cleaning on the independent sentences to obtain cleaned sentences; Extracting and annotating entities in the cleaned sentence to obtain an annotated sentence; Create annotated dataset based on the annotated statements; The labeled dataset is converted into a JSON format text set.

[0008] In some of the embodiments, semantic segmentation is performed on the original text of the evaluation report to obtain independent sentences, including: Run the file reading module of Python language to load the original text of the evaluation report; Applying a regular expression to the original text of the evaluation report after loading, identifying and segmenting single sentence breaks, and obtaining a transition text; The regular expression is applied again to the transition text to identify and segment the English ellipsis characters to obtain the independent sentence.

[0009] In some of the embodiments, text cleaning is performed on the independent sentence to obtain a cleaned sentence, including: Applying the case conversion function of the Python language dependency library to convert the letters of the words in the independent sentence into lowercase; the case conversion function may use the lower() function of the Python string; Applying a spelling correction function of a python language dependency library to identify and correct misspellings in the independent sentence; the spelling correction function may use a correction function in an autocorrect library; Applying the text parsing function of the python language dependency library to perform text parsing on the independent sentence containing HTML tags; after the text parsing, applying the text extraction function to extract the plain text to remove the HTML tags; the text parsing function can use the html.fromstring() function in the lxml library, and the text extraction function can use the .itertext() function; Applying the recognition and replacement function of the Python language dependency library to recognize special characters in the independent statement and replace them with spaces; the recognition and replacement function may use the re.sub() function of the regular expression of the regular expression; The natural language processing process of the spaCy library is started to exclude stop words and obtain the cleaned sentence; the natural language processing process of the spaCy library is: applying the nlp object to parse the independent sentence, traversing each Token in the generated Doc object, executing the not token.is_stop condition judgment, excluding stop words, and obtaining the cleaned sentence.

[0010] In some embodiments, extracting and annotating entities in the cleaned sentence to obtain the annotated sentence includes: The NER entity recognition module of the spaCy library is applied to extract entities in the cleaned sentence, and the type and position coordinates of the extracted entities are annotated using the NER entity recognition module to obtain an annotated sentence.

[0011] In some of the embodiments, creating a labeled data set according to the labeled sentences includes: For each of the annotated sentences, a record is created; wherein the record contains the sentence text of the annotated sentence, the entity list, and the type and location coordinates of each entity; The corresponding records of all annotated sentences are collected to obtain the annotated data set.

[0012] In some embodiments, converting the annotated dataset into a JSON format text set includes: Creating a first field structure matching a record format and a second field structure matching an entity format; According to the first field structure, create a JSON object for each record, wherein the JSON object includes a sentence text and an entity list; According to the second field structure, create a JSON sub-object for each entity in the entity list, wherein the JSON sub-object includes an entity type and a location coordinate; All records including the first field structure and the second field structure are encapsulated into a JSON array to obtain the JSON format text set.

[0013] In some of the embodiments, the pre-trained model is retrained according to the JSON format text set to obtain a retrained model that can be used for entity extraction in the evaluation report, including: Presetting the hyperparameters of the pre-trained model to obtain a preset model; The preset model is iteratively trained using a text set in json format.

[0014] In some of the embodiments, the preset model is iteratively trained using a json format text set, including: Read a JSON-formatted text set containing sentence text and entity tags; Convert the sentence text in the JSON format text set into word embedding representation as feature variables; Convert entity tags in the JSON text set into BIO encoding or other applicable tag formats as target variables; The feature variable is received as input and the target variable is received as output, and the preset model is iteratively fine-tuned to obtain a secondary training model for entity extraction of the evaluation report.

[0015] Compared with the prior art, the secondary training method of the evaluation report entity extraction model of the present invention performs special preprocessing and secondary training on the domain data of the network security evaluation report, so that the model can better understand and extract the entity information in the evaluation report, improve the recognition rate of entity extraction, and ultimately enable the evaluator to apply the secondary training model to the evaluation report analysis.

[0016] In a second aspect, the present invention provides a secondary training system for an evaluation report entity extraction model, comprising: an environment initialization module, used to initialize a secondary training environment of a pre-trained model; wherein the secondary training environment is installed with a python language dependency library; An original text receiving module, used to receive the original text of the evaluation report; A Json format text set acquisition module is used to preprocess the original text of the evaluation report to obtain a json format text set; The secondary training module is used to perform secondary training on the pre-trained model according to the JSON format text set to obtain a secondary training model that can be used for entity extraction in the evaluation report.

[0017] In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores at least one computer executable instruction, and the processor is configured to run the computer executable instruction, and when the computer executable instruction is executed by the processor, the secondary training method of the evaluation report entity extraction model described in the first aspect is implemented.

[0018] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the secondary training method for an evaluation report entity extraction model described in the first aspect is implemented.

[0019] Compared with the prior art, the beneficial effects of the secondary training system, electronic device and storage medium of the evaluation report entity extraction model of the present invention are the same as the beneficial effects of the secondary training method of the evaluation report entity extraction model mentioned above, so they will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flowchart of a secondary training method for an evaluation report entity extraction model in an embodiment provided by the present invention; Figure 2 A schematic diagram of the hyperparameters preset in the embodiments provided by the present invention; Figure 3 A log graph of some training iterations in the embodiment provided by the present invention; Figure 4 A line graph showing changes in the evaluation index (eval / acc) versus the number of iterations in the embodiment provided by the present invention; Figure 5 A line graph showing the change of loss with the number of iterations in the embodiment provided by the present invention; Figure 6 A structural block diagram of a secondary training system for an evaluation report entity extraction model in an embodiment provided by the present invention; Figure 7 A diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0022] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0023] First, the prior art and related concepts involved in the embodiments of the present invention are described: Stop Words: refers to words that appear frequently in the text but usually do not carry substantial semantic information.

[0024] Entity: refers to the specific object to be identified in the text; entity label: refers to the category to which the entity belongs; for example, in the network security assessment report of this embodiment, "CVE-2020-1234" is identified as an entity, and its entity label may be "vulnerability".

[0025] CUDA: (Compute Unified Device Architecture) is a parallel computing platform and a programming model that allows developers to distribute computing tasks to many computing units of NVIDIA GPUs for execution; Single sentence break: In text processing, especially natural language processing (NLP) tasks, single sentence break is used to help the algorithm identify the end of a complete sentence; such as a period or full stop, exclamation mark, question mark, etc.

[0026] refer to Figures 1 to 5 In an embodiment of the present invention, a secondary training method for an evaluation report entity extraction model is provided. Figure 1 It is a flow chart of a secondary training method of an evaluation report entity extraction model of the present invention, and the process includes: Step S1, initializing the secondary training environment of the pre-trained model; wherein the secondary training environment is installed with a python language dependency library.

[0027] Exemplarily, the python language dependency library refers to a terminal operating environment for installing a pre-trained model; wherein the pre-trained model may adopt the baichuan-7B large model. The baichuan-7B large model is an open source large-scale pre-trained model, which is a 7 billion parameter model based on the Transformer structure and trained on approximately 1.2 trillion tokens. Furthermore, the python language dependency library includes installing the programming language of python 3.8 and above, the programming library of pytorch 2.0 and above in the system of the terminal device, downloading the pre-trained model based on the pytorch version, and the GPU processor of the terminal device should use CUDA 11.6 and above.

[0028] The process also includes: Step S2: Receive the original text of the evaluation report.

[0029] The original text of the evaluation report includes the original PDF file, which often contains a large number of stop words, and the target label of the entity is not clear enough. These unprocessed raw data are difficult to meet the basic requirements of model training. Under the combined effect of these factors, the original data becomes difficult to be directly used for model training.

[0030] The process also includes: Step S3: pre-process the original text of the evaluation report to obtain a text set in JSON format. The detailed steps of step S3 are: S3-1, performing semantic segmentation on the original text of the evaluation report to obtain independent sentences; Exemplarily, a file reading module of Python language is run to load the original text of the evaluation report; the file reading module uses Python's built-in functions open() and read() to open and read the original text in the terminal system environment, respectively.

[0031] Apply a regular expression to the original text of the evaluation report after loading, identify and segment single sentence breakers, and obtain a transition text; apply a regular expression to the transition text again, identify and segment English ellipsis, and obtain the independent sentence. The regular expression can be used to match the sentence breakers in the original text; the sentence breakers usually include a period or full stop (.), a question mark (?), and an exclamation mark (!), etc. The regular expression will find these symbols and divide the text into multiple parts accordingly; by identifying the sentence breakers such as a period or full stop, a question mark, and an exclamation mark in the original text, the original text in the evaluation report is divided into independent sentences, that is, the independent sentence is obtained.

[0032] S3-2, performing text cleaning on the independent sentence to obtain a cleaned sentence.

[0033] Exemplarily, a case conversion function of a python language dependency library is applied to convert the letters of the words in the independent sentence into lowercase; the case conversion function may use the lower() function of the Python string; Applying a spelling correction function of a python language dependency library to identify and correct misspellings in the independent sentence; the spelling correction function may use a correction function in an autocorrect library; Applying the text parsing function of the python language dependency library to perform text parsing on the independent sentence containing HTML tags; after the text parsing, applying the text extraction function to extract the plain text to remove the HTML tags; the text parsing function can use the html.fromstring() function in the lxml library, and the text extraction function can use the .itertext() function; Applying the recognition and replacement function of the Python language dependency library to recognize special characters in the independent statement and replace them with spaces; the recognition and replacement function may use the re.sub() function of the regular expression of the regular expression; The natural language processing process of the spaCy library is started to exclude stop words and obtain the cleaned sentence; the natural language processing process of the spaCy library is: applying the nlp object to parse the independent sentence, traversing each Token in the generated Doc object, executing the not token.is_stop condition judgment, excluding stop words, and obtaining the cleaned sentence.

[0034] The cleaned sentences are obtained by performing text cleaning on each independent sentence to remove noise, correct spelling errors, and standardize the text format.

[0035] S3-3, extracting and annotating entities in the cleaned sentence to obtain an annotated sentence.

[0036] Exemplarily, the NER entity recognition module of the spaCy library is applied to extract entities from the cleaned sentence, and the type and position coordinates of the extracted entities are annotated using the NER entity recognition module to obtain annotated sentences; by using natural language processing technology (NER entity recognition module) to extract entities from the cleaned sentence and annotate the types and position coordinates of these entities, it is possible to clarify which words represent specific entities and provide clear labels for model training.

[0037] S3-4, creating a labeled dataset based on the labeled statements; Exemplarily, for each annotated sentence, a record is created; wherein the record includes the sentence text of the annotated sentence, the entity list, and the type and location coordinates of each entity; The corresponding records of all annotated sentences are collected to obtain the annotated data set.

[0038] The sentence text refers to the annotated sentence itself, and the entity list lists all entities in the sentence in a table; each entity has a type and its start and end position in the sentence. For example, the following table can be used to display records and annotated datasets;

[0039] S3-5, converting the annotated data set into a JSON format text set.

[0040] Exemplarily, a first field structure matching a record format and a second field structure matching an entity format are created; According to the first field structure, create a JSON object for each record, wherein the JSON object includes a sentence text and an entity list; According to the second field structure, create a JSON sub-object for each entity in the entity list, wherein the JSON sub-object includes an entity type and a location coordinate; All records including the first field structure and the second field structure are encapsulated into a JSON array to obtain the JSON format text set.

[0041] The process also includes: Step S4: perform secondary training on the pre-trained model according to the json format text set to obtain a secondary training model that can be used for entity extraction in the evaluation report.

[0042] Specifically, the hyperparameters of the pre-trained model are preset to obtain the preset model. In this embodiment, the batch size is determined to be 16, which means that in each parameter update process, the pre-trained model will process the gradient information of 16 samples at the same time. The number of epochs is set to 50, which means that the entire training process will traverse the data set (json format text set) 50 times to ensure that the pre-trained model fully learns the sample distribution characteristics in the json format text set. For specific parameter settings, please refer to Figure 2 .

[0043] The preset model is iteratively trained using a text set in json format.

[0044] Furthermore, the preset model is iteratively trained using a json format text set, including: reading a json format text set containing sentence text and entity tags; Convert the sentence text in the JSON format text set into word embedding representation as feature variables; Convert entity tags in the JSON text set into BIO encoding or other applicable tag formats as target variables; The feature variable is received as input and the target variable is received as output, and the preset model is iteratively fine-tuned to obtain a secondary training model for entity extraction of the evaluation report.

[0045] The secondary training process of this embodiment is performed on four NVIDIA GeForce RTX 4080s and takes about 3 days in total. Figure 3 This is a partial training iteration log graph. From the log, we can see that the loss is oscillating locally and gradually decreasing overall, proving that the model has not reached the optimal solution and there is still room for training.

[0046] After the training is completed, print out the entire training process of pre-training, refer to Figure 4 and Figure 5 ,from Figure 4 and Figure 5 It can be seen from the entire training process that when the number of training iterations approaches 6,000, the loss function curve shows an obvious stable trend. This sign indicates that the pre-trained model has entered the rapid convergence stage, that is, the learning of model parameters has gradually approached the optimal solution, and the marginal effect of subsequent training on performance improvement has decreased. The entire training process completed a total of 32,343 iterations. In the end, the pre-trained model showed the best recognition rate on the validation set, with a value of up to 89.4%.

[0047] A secondary training method for an evaluation report entity extraction model in this embodiment performs special preprocessing and secondary training on the domain data of the network security evaluation report, so that the model can better understand and extract entity information in the evaluation report, improve the recognition rate of entity extraction, and ultimately enable the evaluator to apply the secondary training model to the evaluation report analysis.

[0048] The present invention also provides a related device for secondary training of a model for extracting evaluation report entities, and the related device is disclosed through the following embodiments; The related equipment includes a secondary training system for an evaluation report entity extraction model provided in an embodiment of the present invention. The system is used to implement the above-mentioned method embodiment, and will not be repeated hereafter. The terms "module", "unit", "sub-unit", etc. used below can implement a combination of software and / or hardware for predetermined functions. Although the systems described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0049] like Figure 6 As shown, Figure 6 It is a structural block diagram of a secondary training system of an evaluation report entity extraction model of the present invention, and the system includes: An environment initialization module 101 is used to initialize the secondary training environment of the pre-trained model; wherein the secondary training environment is installed with a python language dependency library; The original text receiving module 102 is used to receive the original text of the evaluation report; The Json format text set acquisition module 103 is used to pre-process the original text of the evaluation report to obtain a json format text set; The secondary training module 104 is used to perform secondary training on the pre-trained model according to the JSON format text set to obtain a secondary training model that can be used for entity extraction in the evaluation report.

[0050] In the above system, the secondary training environment of the pre-trained model is initialized through the environment initialization module 101; the original text of the evaluation report is received through the original text receiving module 102; the original text of the evaluation report is preprocessed through the Json format text set acquisition module 103 to obtain a json format text set; the pre-trained model is secondarily trained according to the json format text set through the secondary training module 104 to obtain a secondary training model that can be used for extracting the evaluation report entity; thereby improving the recognition rate of the pre-trained model in the prior art when extracting the evaluation report entity.

[0051] like Figure 7As shown, the related device includes an electronic device provided by an embodiment of the present invention, the electronic device includes a memory 230 and a processor 210, the memory 230 stores at least one computer executable instruction, the processor 210 is configured to run the computer executable instruction, and when the computer executable instruction is run by the processor 210, it realizes the above-mentioned secondary training method of an evaluation report entity extraction model.

[0052] The electronic device may include a processor 210, a communication interface 220, a memory 230, and a communication bus 240, wherein the processor 210, the communication interface 220, and the memory 230 communicate with each other via the communication bus 240. The processor 210 may apply the logic instructions in the memory 230 to execute a secondary training method for an evaluation report entity extraction model disclosed in this embodiment.

[0053] In addition, the logic instructions in the above-mentioned memory 230 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0054] The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0055] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A secondary training method for an evaluation report entity extraction model, characterized in that: include: Initialize the secondary training environment of the pre-trained model; wherein the secondary training environment is installed with a python language dependency library; Receiving the original text of the evaluation report; Preprocessing the original text of the evaluation report to obtain a text set in JSON format; According to the JSON format text set, the pre-trained model is retrained to obtain a secondary training model that can be used for entity extraction in the evaluation report.

2. The secondary training method of the evaluation report entity extraction model according to claim 1 is characterized in that: The original text of the evaluation report is preprocessed to obtain a text set in JSON format, including: Performing semantic segmentation on the original text of the evaluation report to obtain independent sentences; Performing text cleaning on the independent sentences to obtain cleaned sentences; Extracting and annotating entities in the cleaned sentence to obtain an annotated sentence; Create annotated dataset based on the annotated statements; The labeled dataset is converted into a JSON format text set.

3. The secondary training method of the evaluation report entity extraction model according to claim 2 is characterized in that: The original text of the evaluation report is semantically segmented to obtain independent sentences, including: Run the file reading module of Python language to load the original text of the evaluation report; Applying a regular expression to the original text of the evaluation report after loading, identifying and segmenting single sentence breaks, and obtaining a transition text; The regular expression is applied again to the transition text to identify and segment the English ellipsis characters to obtain the independent sentence.

4. The secondary training method of the evaluation report entity extraction model according to claim 2 is characterized in that: The independent sentences are cleaned to obtain cleaned sentences, including: Apply the case conversion function of the Python language dependency library to convert the letters of the words in the independent sentence to lowercase; Applying a spelling correction function of a Python language dependency library to identify and correct misspellings in the independent sentence; Applying a text parsing function of a Python language dependency library to perform text parsing on the independent sentence containing HTML tags; after the text parsing, applying a text extraction function to extract the plain text to remove the HTML tags; Applying the recognition and replacement function of the Python language dependency library to recognize special characters in the independent statement and replace them with spaces; The natural language processing process of the spaCy library is started, stop words are excluded, and the cleaned sentence is obtained.

5. The secondary training method of the evaluation report entity extraction model according to claim 2 is characterized in that: Extracting and annotating entities in the cleaned sentence to obtain an annotated sentence includes: The NER entity recognition module of the spaCy library is applied to extract entities in the cleaned sentence, and the type and position coordinates of the extracted entities are annotated using the NER entity recognition module to obtain an annotated sentence.

6. The secondary training method of the evaluation report entity extraction model according to claim 2 is characterized in that: Create a labeled dataset based on the labeled statements, including: For each of the annotated sentences, a record is created; wherein the record contains the sentence text of the annotated sentence, the entity list, and the type and location coordinates of each entity; The corresponding records of all annotated sentences are collected to obtain the annotated data set.

7. The secondary training method of the evaluation report entity extraction model according to claim 2 is characterized in that: Convert the labeled dataset into a JSON format text set, including: Creating a first field structure matching a record format and a second field structure matching an entity format; According to the first field structure, create a JSON object for each record, wherein the JSON object includes a sentence text and an entity list; According to the second field structure, create a JSON sub-object for each entity in the entity list, wherein the JSON sub-object includes an entity type and a location coordinate; All records including the first field structure and the second field structure are encapsulated into a JSON array to obtain the JSON format text set.

8. The secondary training method for an evaluation report entity extraction model according to claim 2, characterized in that: According to the JSON format text set, the pre-trained model is retrained to obtain a retrained model that can be used for entity extraction in the evaluation report, including: Presetting the hyperparameters of the pre-trained model to obtain a preset model; The preset model is iteratively trained using a text set in json format.

9. The secondary training method of the evaluation report entity extraction model according to claim 8 is characterized in that: The preset model is iteratively trained using a json format text set, including: Read a JSON-formatted text set containing sentence text and entity tags; Convert the sentence text in the JSON format text set into word embedding representation as feature variables; Convert entity tags in the JSON text set into BIO encoding or other applicable tag formats as target variables; The feature variable is received as input and the target variable is received as output, and the preset model is iteratively fine-tuned to obtain a secondary training model for entity extraction of the evaluation report.

10. A secondary training system for an evaluation report entity extraction model, characterized in that: include: An environment initialization module, used to initialize the secondary training environment of the pre-trained model; wherein the secondary training environment is installed with a python language dependency library; An original text receiving module, used to receive the original text of the evaluation report; A Json format text set acquisition module is used to preprocess the original text of the evaluation report to obtain a json format text set; The secondary training module is used to perform secondary training on the pre-trained model according to the JSON format text set to obtain a secondary training model that can be used for entity extraction in the evaluation report.

Citation Information

Patent Citations

  • Intelligent search system based on knowledge graph

    CN114218472A

  • Method for obtaining target intention recognition model and intention recognition method

    CN114757176A

  • Traditional Chinese medicine ancient book named entity recognition method, device and equipment and storage medium

    CN116796742A

  • Deep learning-based equal insurance evaluation result record knowledge graph extraction method

    CN118035468A

  • Vulnerability entity extraction method for small sample semantic analysis

    CN118070804A

Cited By

  • Multi-task large language model training method oriented to biomedical field

    CN120069086A

  • Multi-task large language model training method for biomedical field

    CN120069086B