Method and device for training identification model

By training a dynamic context sharing mechanism and dynamically adjusting shared weight identification model, the problem of not being able to automatically identify clinical trial DVP rules in the prior art is solved, and efficient, accurate and consistent rule identification and dynamic adjustment are achieved.

CN119597927AInactive Publication Date: 2025-03-11SHANGHAI AISHA MEDICAL TECH CO LTD

Patent Information

Application Number
CN202510142354.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-03-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing clinical data management tools fail to automatically identify Data Verification Program (DVP) rules from research protocols, resulting in inefficiency, error-prone, lack of consistency and difficulty in dynamic adjustment.

Method used

By training an identification model with text classification paths and relationship extraction paths, DVP rules are automatically identified from the research plan using dynamic context sharing mechanisms and methods of dynamic adjustment of shared weights.

Benefits of technology

It realizes efficient, accurate and consistent DVP rule identification, and can dynamically adjust rules to adapt to changes in research plans, improving the efficiency and reliability of clinical trial data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597927A_ABST
    Figure CN119597927A_ABST
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence, in particular to a method and device for training an identification model, a medium, electronic equipment and a computer program product. According to the method, the DVP rule can be automatically identified from the research scheme, the efficiency is high, errors are not prone to occurring, the identification standard is consistent, and dynamic adjustment can be achieved along with adjustment of the research scheme. And secondly, a dynamic context sharing mechanism is utilized, so that a text classification task and a relation extraction task can adaptively share context information in a decoding stage, and the problem that the context information in a traditional multi-task model is fixed and is difficult to adapt is solved. Besides, by dynamically adjusting the shared weight, real-time information fusion between tasks is realized, so that the model has better performance in complex tasks (such as identification of a DVP rule).
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, and in particular to methods, devices, media, electronic devices, and computer program products for training recognition models. Background Art

[0002] In clinical trials, the generation of a Data Verification Plan (DVP) is the core link to ensure data quality and compliance with research requirements. Designing a Case Report Form (CRF) according to the study protocol and generating corresponding DVP rules can help maintain consistency and integrity of trial data. However, existing clinical data management tools, such as SAS and Medidata Rave, can provide data verification functions, but they mainly focus on the verification process and do not have the ability to automatically identify DVP rules from the study protocol.

[0003] The current DVP rule identification process mainly relies on data management personnel to manually sort out the requirements in the research plan. This operation process has the following obvious problems: Inefficiency. Clinical trials involve a large number of data fields and complex logical relationships. Manually combing through each target variable and conditional variable and identifying the corresponding DVP rules is an extremely arduous task. Especially in multi-center trials or large-scale clinical studies, the time cost of manual operations is extremely high, resulting in inefficiency in identifying DVP rules and delaying the trial process.

[0004] Error-prone. When manually identifying DVP rules, data managers need to process a large number of target variables and conditional variables and make complex logical judgments, which greatly increases the risk of human error. Omissions or errors in the identification of DVP rules may lead to inaccurate verification of key data, thereby affecting the reliability and scientificity of the test results.

[0005] Lack of consistency. Due to different understandings and operating habits of different data managers, the identified DVP rules may be inconsistent. In multicenter studies, when multiple research centers participate in the trial, if the DVP rule identification process lacks standardization, it is easy to cause differences in the rules identified by each center, affecting the comparison and integration of the final data.

[0006] Difficulty in dynamic adjustment. With the adjustment of the research plan or the change of data requirements during the trial, it is very difficult to manually update and maintain the DVP rules and it is easy to overlook certain details, which may lead to incomplete or missing DVP rule identification. Summary of the invention

[0007] Embodiments of the present application provide methods, devices, media, electronic devices, and computer program products for training recognition models.

[0008] In a first aspect, an embodiment of the present application provides a method for training a recognition model for an electronic device, the method comprising: An acquisition step of acquiring a training data set, wherein the training data set includes a plurality of training texts; A construction step, constructing the recognition model having a text classification path and a relationship extraction path; and The training step, for each training text in the plurality of training texts, comprises: The encoding step encodes the training text into an initial feature representation, an extraction step, inputting the initial feature representation into the text classification path and the relationship extraction path respectively to extract a first feature representation associated with text classification and a second feature representation associated with relationship extraction, a fusion step of fusing the first feature representation with the second feature representation to obtain a shared feature representation, an output step, wherein the shared feature representation continues to pass through the text classification path and the relationship extraction path respectively to output a text classification result and a relationship extraction result, and An adjustment step of adjusting the recognition model based on the joint loss; The trained recognition model is used to recognize medical text.

[0009] In a second aspect, an embodiment of the present application provides a device for training a recognition model, the device comprising: An acquisition unit, which acquires a training data set, wherein the training data set includes a plurality of training texts; A construction unit, constructing the recognition model having a text classification path and a relationship extraction path; and The training unit, for each training text in the plurality of training texts, comprises: An encoding unit, encoding the training text into an initial feature representation, an extraction unit, inputting the initial feature representation into the text classification path and the relationship extraction path respectively, to extract a first feature representation associated with text classification and a second feature representation associated with relationship extraction, a fusion unit, fusing the first feature representation with the second feature representation to obtain a shared feature representation, an output unit, which continues to pass the shared feature representation through the text classification path and the relationship extraction path respectively to output a text classification result and a relationship extraction result, and An adjustment unit, which adjusts the recognition model based on the joint loss; The trained recognition model is used to recognize medical text.

[0010] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed by a computer, the computer executes the method for training a recognition model according to the first aspect above.

[0011] In a fourth aspect, an embodiment of the present application provides an electronic device comprising one or more processors and one or more memories; one or more programs are stored on the one or more memories, and when the one or more programs are executed by the one or more processors, the electronic device executes the method for training a recognition model according to the first aspect above.

[0012] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising computer executable instructions, which are executed by a processor to implement the method for training a recognition model according to the first aspect above.

[0013] This application can automatically identify DVP rules from the research plan, with high efficiency, not prone to errors, consistent identification standards, and can be dynamically adjusted as the research plan is adjusted. Secondly, this application uses a dynamic context sharing mechanism to enable text classification tasks and relationship extraction tasks to adaptively share context information during the decoding phase, solving the problem of fixed context information and difficulty in adapting in traditional multi-task models. In addition, this application achieves real-time information fusion between tasks by dynamically adjusting shared weights, allowing the model to perform better in complex tasks (such as identifying DVP rules). BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 According to an embodiment of the present application, a flow chart of a method for training a recognition model is shown; Figure 2 According to an embodiment of the present application, a schematic diagram of training a recognition model is shown; Figure 3 According to an embodiment of the present application, a structural diagram of an apparatus for training a recognition model is shown; Figure 4 According to an embodiment of the present application, a block diagram of an electronic device is shown. DETAILED DESCRIPTION

[0015] The illustrative embodiments of the present application include, but are not limited to, methods, apparatuses, media, electronic devices, and computer program products for training recognition models.

[0016] The embodiments of the present application will be described in further detail below in conjunction with the accompanying drawings.

[0017] Figure 1 The method for training a recognition model in an embodiment of the present application is shown. Figure 4 Electronic equipment shown.

[0018] like Figure 1 As shown, in the acquisition step S11, a training data set is acquired, and the training data set includes a plurality of training texts. Specifically, the training texts may include texts in the medical field, such as text contents from research schemes for clinical trials.

[0019] Continue as Figure 1 As shown, in construction step S12, a recognition model having a text classification path and a relationship extraction path is constructed. Specifically, the recognition model may include a Dynamic Context Sharing Network (DCS-Net) model using a joint learning framework, allowing different tasks (such as text classification tasks and relationship extraction tasks) to share their context information during each training, and this sharing is not static, but can adaptively adjust the type and degree of shared information based on current task requirements. Both the text classification path and the relationship extraction path can be task-specific neural network modules (including such as fully connected layers, attention mechanisms, etc.), which are used to perform text classification tasks and relationship extraction tasks respectively to determine the overall semantic category of the text and the relationship between entities in the text.

[0020] Continue as Figure 1 As shown, in the training step S13, for each training text in the plurality of training texts ,include: In the encoding step S131, the training text is encoded into an initial feature representation The initial feature representation is common to the text classification path and the relationship extraction path. The two paths can share the same initial feature representation, reducing computational overhead. At the same time, the two paths can extract task-specific feature representations from it according to their respective needs. Specifically, the encoding step can be performed by a pre-trained model (such as the BERT model).

[0021] In the extraction step S132, the initial feature representation is input into the text classification path and the relationship extraction path respectively to extract the first feature representation associated with the text classification. and the second feature representation associated with relation extraction The first feature representation can be extracted by at least a portion of the layers of the text classification path and has context information associated with the text classification, while the second feature representation can be extracted by at least a portion of the layers of the relationship extraction path and has context information associated with the relationship extraction.

[0022] In the fusion step S133, the first feature representation is fused with the second feature representation to obtain a shared feature representation. The shared feature representation fuses the context information associated with text classification and the context information associated with relation extraction, allowing the text classification path and the relation extraction path to share an appropriate amount of feature representation, enhancing the synergy between the two paths so that they can complement each other without interfering with each other. Specifically, the fusion step can be performed by the Dynamic Context Sharing Module (DCSM) by performing the following operations: A first weight matrix is ​​determined for the text classification task; a second weight matrix is ​​determined for the relationship extraction task; and a shared feature representation is obtained according to the following function: , in, is the shared feature representation, is the first weight matrix, is the first feature representation, is the second weight matrix, is the second feature representation. By constructing a weight matrix for each task, the degree of feature sharing between the text classification task and the relationship extraction task can be dynamically adjusted according to the task requirements. The task requirement refers to the requirement that the model automatically adjusts the weights to optimize the task performance according to the content of the input text and the task objectives during training or inference. As an example, the first weight matrix is ​​dynamically adjusted according to different training texts and training stages. and the second weight matrix .

[0023] Different texts may have different importance for text classification tasks and relation extraction tasks. For example, if the text contains obvious entity pairs and their relations, the demand for relation extraction tasks may be higher, and the second weight matrix can be added at this time. If the text focuses more on overall semantic classification, the demand for text classification tasks may be higher, and the first weight matrix can be added at this time.

[0024] In multi-task learning, the priorities of text classification tasks and relation extraction tasks may be different. For example, in the early stage of training, the model may pay more attention to the text classification task to quickly learn global semantic information. At this time, the first weight matrix can be added. In the later stage of training, the model may pay more attention to the relation extraction task to capture more fine-grained semantic relationships. At this time, the second weight matrix can be added.

[0025] There is a certain dependency between the text classification task and the relation extraction task. For example, the results of the text classification task (such as text categories) may provide contextual information for the relation extraction task, while the results of the relation extraction task (such as entity relations) may help the text classification task better understand the text semantics. Therefore, the two weight matrices can be adjusted as needed to ensure that there is always a certain synergy between the two paths.

[0026] In the output step S134, the shared feature representation continues to pass through the text classification path and the relationship extraction path respectively to output the text classification result And the relationship extraction results The shared feature representation can continue to pass through the rest of the text classification path and the relationship extraction path respectively. The two paths can optimize their respective task performance under the enhancement of the dynamic context sharing mechanism.

[0027] In the adjustment step S135, the recognition model is adjusted based on the joint loss. The joint loss is a hierarchical loss function suitable for multi-task learning. It can comprehensively consider and effectively balance multiple tasks and interactions between tasks to fine-tune the model, thereby improving the overall ability of the model. As an example, the joint loss is determined according to the following function: , in, For joint losses, is the text classification task loss, is the relation extraction task loss, is the task interaction loss, is the first adjustment parameter, is the second adjustment parameter.

[0028] For the text classification task loss and the relationship extraction task loss, it can be a standard cross entropy loss or other task-specific loss functions.

[0029] For the inter-task interaction loss, it is used to constrain the feature sharing or consistency of multiple task paths. It can be a feature consistency loss to constrain the consistency of the text classification task loss and the relationship extraction task loss in the shared feature space, such as using mean square error or cosine similarity. It can also be an adversarial loss, which ensures that the feature representations of the two task paths can be shared through adversarial training. It can also be an inter-task attention mechanism, which dynamically adjusts the feature sharing weights of the two task paths by designing an attention module, and uses the attention weights as part of the inter-task interaction loss.

[0030] For the first adjustment parameter, which controls the weight of the loss of the relationship extraction task, it can be dynamically adjusted according to different training stages. For example, in the early training stage, the model may need to pay more attention to the text classification task, because the text classification task is usually easier to converge and can provide a better initial feature representation for the model. In the later training stage, as the text classification task gradually stabilizes, gradually increasing the first adjustment parameter can make the model pay more attention to the relationship extraction task, thereby improving the performance of relationship extraction. Therefore, the first adjustment parameter can be gradually increased as the training stage progresses. This increase can be achieved through linear increase, exponential increase, or dynamic adjustment based on the training stage. For example, adjust the first adjustment parameter according to the following function: , in, is the first adjustment parameter after adjustment, is the initial value of the first adjustment parameter, is the final value of the first adjustment parameter, is the current period of training, is the total period of training.

[0031] For the second adjustment parameter, it controls the interaction loss between tasks, ensures that the two paths can effectively cooperate in the feature sharing process, and avoids conflicts or interference between tasks. For example, if the interaction between tasks is critical to the performance of the model, the second adjustment parameter can be set to a fixed small value (such as 0.1 or 0.2) to ensure that there is always a certain synergy between tasks. For another example, the second adjustment parameter can be dynamically adjusted according to the performance difference between tasks. For example, if the performance of the text classification task is significantly better than the relationship extraction task, the second adjustment parameter can be appropriately increased to enhance the interaction between tasks and help the relationship extraction task better utilize the feature representation of the text classification task. For another example, if the interaction between tasks is more important in the early training stage (for example, to help the model quickly learn shared feature representations), and task independence is more important in the later training stage, the second adjustment parameter can be gradually reduced. This reduction can be achieved by linear reduction, exponential reduction, or dynamic adjustment based on the training stage. For example, the second adjustment parameter is adjusted according to the following function: , in, is the second adjustment parameter after adjustment, is the initial value of the second adjustment parameter, is the current period of training, is the total period of training.

[0032] The above training steps are repeated until the joint loss meets the corresponding threshold requirement or the number of training times meets the corresponding threshold requirement, and the trained recognition model can be used to recognize medical text. More specifically, the medical text includes a research protocol for a clinical trial, and the trained recognition model is used to identify DVP rules from the research protocol. It is understandable that the research protocol is usually more colloquial, so the DVP rules identified from the research protocol are also often more colloquial. Subsequently, the DVP rules can be matched with the standard fields in the CRF, and finally a standardized DVP rule is generated.

[0033] This application can automatically identify DVP rules from the research plan, with high efficiency, not prone to errors, consistent identification standards, and can be dynamically adjusted as the research plan is adjusted. Secondly, this application uses a dynamic context sharing mechanism to enable text classification tasks and relationship extraction tasks to adaptively share context information during the decoding phase, solving the problem of fixed context information and difficulty in adapting in traditional multi-task models. In addition, this application achieves real-time information fusion between tasks by dynamically adjusting shared weights, allowing the model to perform better in complex tasks (such as identifying DVP rules).

[0034] Figure 2 The training process of the recognition model of the embodiment of the present application is shown.

[0035] like Figure 2 As shown, each training text Encoded by the pre-trained model as the initial feature representation , then the initial feature representation are input into the text classification path and the relationship extraction path respectively.

[0036] A first feature representation associated with the text classification is extracted from at least a portion of the layers in the text classification path and the relationship extraction path. and the second feature representation associated with relation extraction , and then the dynamic context sharing module represents the first feature and the second feature representation Fusion to obtain shared feature representation .

[0037] The shared feature representation Continue through the text classification path and relationship extraction path to output the text classification results And the relationship extraction results .

[0038] The text classification result And the relationship extraction results Combined with training text The joint loss is calculated by the joint loss function to fine-tune the recognition model.

[0039] Figure 3 The device for training the recognition model according to an embodiment of the present application is shown.

[0040] like Figure 3 As shown, the acquisition unit 301 acquires a training data set, which includes multiple training texts; the construction unit 302 constructs a recognition model with a text classification path and a relationship extraction path; and the training unit 303 targets each training text in the multiple training texts.

[0041] The training unit 303 includes: an encoding unit 3031, which encodes the training text into an initial feature representation; an extraction unit 3032, which inputs the initial feature representation into a text classification path and a relationship extraction path respectively to extract a first feature representation associated with text classification and a second feature representation associated with relationship extraction; a fusion unit 3033, which fuses the first feature representation with the second feature representation to obtain a shared feature representation; an output unit 3034, which continues to pass the shared feature representation through the text classification path and the relationship extraction path respectively to output a text classification result and a relationship extraction result; and an adjustment unit 3035, which adjusts the recognition model based on the joint loss.

[0042] The trained recognition model is used to recognize medical texts.

[0043] It can be understood that the acquisition unit 301, the construction unit 302, the training unit 303 and its encoding unit 3031, the extraction unit 3032, the fusion unit 3033, the output unit 3034 and the adjustment unit 3035 can be Figure 4 The processor 402 having the functions of these modules or units in the electronic device is implemented.

[0044] The present application also provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a computer, the computer executes Figure 1 The method shown in .

[0045] The present application also provides a computer program product, including computer executable instructions, which are executed by a processor to implement Figure 1 The method shown in .

[0046] Figure 4 An electronic device according to an embodiment of the present application is shown.

[0047] like Figure 4As shown, the electronic device may include one or more processors 402 , a system control logic 408 connected to at least one of the processors 402 , a system memory 404 connected to the system control logic 408 , a non-volatile memory (NVM) 406 connected to the system control logic 408 , and a communication interface 410 connected to the system control logic 408 .

[0048] Processor 402 may include one or more single-core or multi-core processors. Processor 402 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In the embodiments of this invention, processor 402 may be configured to execute Figure 1 The method shown in .

[0049] In some embodiments, system control logic 408 may include any suitable interface controller to provide any suitable interface to at least one of processors 402 and / or any suitable device or component in communication with system control logic 408 .

[0050] In some embodiments, the system control logic 408 may include one or more memory controllers to provide an interface to the system memory 404. The system memory 404 may be used to load and store data and / or instructions. In some embodiments, the system memory 404 of the electronic device may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).

[0051] NVM / memory 406 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM / memory 406 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of a HDD (Hard Disk Drive), a CD (Compact Disc) drive, and a DVD (Digital Versatile Disc) drive.

[0052] NVM / storage 406 may include a portion of storage resources installed on a device of an electronic device, or it may be accessible by the device but not necessarily a portion of the device. For example, NVM / storage 406 may be accessed over a network via communication interface 410 .

[0053] In particular, system memory 404 and NVM / storage 406 may include, respectively, a temporary copy and a permanent copy of instructions 420. Instructions 420 may include instructions that, when executed by at least one of processors 402, cause the electronic device to perform Figure 1In some embodiments, instructions 420, hardware, firmware and / or software components thereof may additionally / alternatively be placed in system control logic 408, communication interface 410 and / or processor 402.

[0054] The communication interface 410 may include a transceiver for providing a radio interface for the electronic device to communicate with any other suitable device (such as a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the communication interface 410 may be integrated with other components of the electronic device. For example, the communication interface 410 may be integrated with at least one of the processor 402, the system memory 404, the NVM / storage 406, and a firmware device (not shown) having instructions, and when at least one of the processors 402 executes the instructions, the electronic device implements Figure 1 The method shown in .

[0055] The communication interface 410 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the communication interface 410 may be a network adapter, a wireless network adapter, a telephone modem and / or a wireless modem.

[0056] In one embodiment, at least one of the processors 402 may be packaged together with logic for one or more controllers of the system control logic 408 to form a system in package (SiP). In one embodiment, at least one of the processors 402 may be integrated on the same die with logic for one or more controllers of the system control logic 408 to form a system on chip (SoC).

[0057] The electronic device may further include: an input / output (I / O) device 412. The I / O device 412 may include a user interface that enables a user to interact with the electronic device; the design of the peripheral component interface enables the peripheral component to also interact with the electronic device. In some embodiments, the electronic device further includes a sensor for determining at least one of an environmental condition and location information related to the electronic device.

[0058] In some embodiments, the user interface may include, but is not limited to, a display (e.g., an LCD display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.

[0059] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.

[0060] In some embodiments, the sensors may include, but are not limited to, gyroscope sensors, accelerometers, proximity sensors, ambient light sensors, and positioning units. The positioning unit may also be part of or interact with the communication interface 410 to communicate with components of a positioning network (e.g., global positioning system (GPS) satellites).

[0061] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0062] Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0063] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described herein is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0064] One or more aspects of at least one embodiment may be implemented by representative instructions stored on a computer-readable storage medium, which represent various logic in a processor, and when the instructions are read by a machine, cause the machine to fabricate logic for performing the techniques described herein. These representations, known as "IP cores," may be stored on a tangible computer-readable storage medium and supplied to multiple customers or manufacturing facilities to load into a manufacturing machine that actually manufactures the logic or processor.

[0065] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "A / B" means "A or B." The phrase "A and / or B" means "(A and B) or (A or B)."

[0066] As used herein, the term "module" or "unit" may refer to, be or include: an application specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated or group) processor and / or memory that executes one or more software or firmware programs, a combinational logic circuit and / or other suitable components that provide the described functionality.

[0067] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or by other computer-readable media. Therefore, the machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), but not limited to, a floppy disk, an optical disk, a read-only memory (CD-ROM), a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic card or an optical card, a flash memory, or a tangible machine-readable memory for transmitting information through the Internet via electrical, optical, acoustic or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.). Therefore, the machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0068] In the accompanying drawings, some structural or method features are shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. In some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a specific figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0069] It should be understood that although the terms "first", "second", etc. may be used here to describe various units or data, these units or data should not be limited by these terms. These terms are used only to distinguish one feature from another. For example, without departing from the scope of the exemplary embodiment, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature.

[0070] It should be noted that in this specification, similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

Claims

1. A method for training a recognition model, for use in electronic equipment, characterized in that: The method comprises: An acquisition step of acquiring a training data set, wherein the training data set includes a plurality of training texts; A construction step, constructing the recognition model having a text classification path and a relationship extraction path; and The training step, for each training text in the plurality of training texts, comprises: The encoding step encodes the training text into an initial feature representation, an extraction step, inputting the initial feature representation into the text classification path and the relationship extraction path respectively to extract a first feature representation associated with text classification and a second feature representation associated with relationship extraction, a fusion step of fusing the first feature representation with the second feature representation to obtain a shared feature representation, an output step, wherein the shared feature representation continues to pass through the text classification path and the relationship extraction path respectively to output a text classification result and a relationship extraction result, and An adjustment step of adjusting the recognition model based on the joint loss; Wherein, the trained recognition model is used to recognize medical text; Wherein, the fusion step further comprises: Determining a first weight matrix for a text classification task; Determining a second weight matrix for the relationship extraction task; The shared feature representation is obtained according to the following function: , in, is the shared feature representation, is the first weight matrix, is the first feature representation, is the second weight matrix, This is the second feature representation.

2. The method according to claim 1, characterized in that Dynamically adjust the first weight matrix according to different training texts and training stages and the second weight matrix .

3. The method according to any one of claims 1 to 2, characterized in that The joint loss is determined according to the following function: , in, is the joint loss, is the text classification task loss, is the relation extraction task loss, is the task interaction loss, is the first adjustment parameter, is the second adjustment parameter.

4. The method according to claim 3, characterized in that Adjust the first adjustment parameter according to the following function : , in, is the first adjustment parameter after adjustment, is the initial value of the first adjustment parameter, is the final value of the first adjustment parameter, is the current period of training, is the total period of training.

5. The method according to claim 3, characterized in that: Adjust the second adjustment parameter according to the following function : , in, is the second adjustment parameter after adjustment, is the initial value of the second adjustment parameter, is the current period of training, is the total period of training.

6. The method according to claim 1, characterized in that The medical text includes a study protocol for a clinical trial, and the trained recognition model is used to identify data validation plan rules from the study protocol.

7. A device for training a recognition model, characterized in that: The device comprises: An acquisition unit, which acquires a training data set, wherein the training data set includes a plurality of training texts; A construction unit, constructing the recognition model having a text classification path and a relationship extraction path; and The training unit, for each training text in the plurality of training texts, comprises: An encoding unit, encoding the training text into an initial feature representation, an extraction unit, inputting the initial feature representation into the text classification path and the relationship extraction path respectively to extract a first feature representation associated with text classification and a second feature representation associated with relationship extraction, a fusion unit, fusing the first feature representation with the second feature representation to obtain a shared feature representation, an output unit, which continues to pass the shared feature representation through the text classification path and the relationship extraction path respectively to output a text classification result and a relationship extraction result, and An adjustment unit, which adjusts the recognition model based on the joint loss; Wherein, the trained recognition model is used to recognize medical text; Wherein, the fusion unit further comprises: Determining a first weight matrix for a text classification task; Determining a second weight matrix for the relationship extraction task; The shared feature representation is obtained according to the following function: , in, is the shared feature representation, is the first weight matrix, is the first feature representation, is the second weight matrix, This is the second feature representation.

8. A computer-readable storage medium, characterized in that: The storage medium stores instructions, and when the instructions are executed by a computer, the computer executes the method for training a recognition model according to claim 1.

9. An electronic device, characterized in that: It includes one or more processors and one or more memories; one or more programs are stored on the one or more memories, and when the one or more programs are executed by the one or more processors, the electronic device executes the method for training the recognition model according to claim 1.

10. A computer program product, characterized in that The method comprises computer executable instructions, wherein the instructions are executed by a processor to implement the method for training a recognition model according to claim 1.

Citation Information

Patent Citations

  • Multi-task joint element identification method based on multi-head attention mechanism

    CN118964858A

  • Detecting affective characteristics of text with gated convolutional encoder-decoder framework

    US20200192927A1

Cited By

  • Method and device for generating programming language according to clinical DVP table

    CN120929062A