Method, apparatus and device for converting medical documents
By combining a large language model with a medical document processing engine, the problem of medical document format conversion is solved, achieving fast and accurate format conversion, adapting to the needs of different systems, and improving the utilization rate of medical documents and the security of data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2026-03-20
AI Technical Summary
Due to the specialized and complex nature of medical knowledge, medical documents come in various formats, making formatting difficult. Furthermore, different systems have different requirements for formats, making it difficult for existing technologies to efficiently and conveniently convert the formats of medical documents.
By receiving the medical files to be processed and the target format requirements from the user, the system generates attribute information using a large language model, initializes the medical file processing engine, and uses the target medical file processing engine to perform format conversion, generating medical files that meet the target format requirements.
It enables rapid, efficient, and accurate conversion of medical documents, meets the format requirements of different systems, and improves the utilization rate of medical documents and the security of data transmission.
Smart Images

Figure CN120316083B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of language models, and particularly relates to a medical file conversion method, device and equipment. BACKGROUND
[0002] With the development of science and technology, the medical industry is gradually moving towards digitization, and the systematic arrangement and efficient application of medical knowledge have gradually become a key factor for improving the quality of medical services. However, due to the professional and complex nature of medical knowledge, combined with the continuous emergence of new research results and new technical standards in the field, the management and updating of medical knowledge have become a challenging task.
[0003] In the related art, medical files can be arranged and classified by medical technicians, so that the medical knowledge in the medical files can be extracted in a standardized form for subsequent tasks. However, different medical file formats vary, and often require a large amount of manpower and resources to extract formatted data. Therefore, how to efficiently and conveniently convert medical files is a technical problem that needs to be solved by related technical personnel. SUMMARY
[0004] The embodiments of the present application provide a medical file conversion method, device and equipment, which can convert different formats of medical files.
[0005] In a first aspect, the embodiments of the present application provide a medical file conversion method, comprising: receiving a user inputted to-be-processed medical file and a target format requirement of the to-be-processed medical file; determining a target attribute file template according to the target format requirement, wherein the target attribute file template includes a prediction task prompt word of attribute information, and the attribute information corresponds to an attribute of the target format requirement; inputting the attribute file template into a large language model to obtain attribute information output by the large language model, wherein the large language model performs a task of generating attribute information according to a preset task prompt word of the attribute information; initializing a target file conversion parameter of a medical file processing engine according to the attribute information to obtain a target medical file processing engine; and converting the format of the to-be-processed medical file by using the target medical file processing engine to obtain a medical file corresponding to the target format requirement.
[0006] In an implementation, the attribute information includes text attribute information and format attribute information, and the medical file processing engine is initialized according to the file conversion parameters based on the attribute information to obtain a target medical file processing engine, including: determining target text content conversion parameters corresponding to the text attribute information according to a first correspondence relationship, the first correspondence relationship representing a correspondence relationship between different text attribute information and text content conversion parameters; determining target format conversion parameters corresponding to the format attribute information according to a second correspondence relationship, the second correspondence relationship representing a correspondence relationship between different format attribute information and format conversion parameters; and performing parameter configuration on the medical file processing engine according to the target text content conversion parameters and the target format conversion parameters to obtain the target medical file processing engine.
[0007] In an implementation, the target medical file processing engine is used to perform format conversion on the medical file to be processed to obtain a medical file corresponding to the target format requirement, including: calculating, by the target medical file processing engine, a relevance between the text attribute information and a plurality of related files in the medical file to be processed according to the text attribute information saved in the text content conversion parameters to obtain a relevance calculation result; obtaining, by the target medical file processing engine, target file content satisfying a preset relevance condition from the plurality of related files according to the relevance calculation result; determining, by the target medical file processing engine, a text content extraction template according to the text attribute information and the target file content, the text content extraction template including a predicted task prompt word for extracting text content corresponding to the text attribute information from the target file content; inputting the text content extraction template into a large language model to obtain text content corresponding to the text attribute information extracted from the target file content by the large language model according to the text content extraction template; and performing format conversion on the text content according to the format attribute information saved in the target format conversion parameters to obtain the medical file corresponding to the target format requirement.
[0008] In an implementation, the relevance between the text attribute information and a plurality of related files in the medical file to be processed is calculated according to the text attribute information saved in the text content conversion parameters to obtain a relevance calculation result, including: determining a word frequency and an inverse document frequency of the text attribute information in the medical file; and calculating a relevance score corresponding to the medical file according to the word frequency, the inverse document frequency, and a length of the medical file.
[0009] In an implementation, the target file content satisfying a preset relevance condition is obtained from the plurality of related files according to the relevance calculation result by the target medical file processing engine, including: determining a relevance threshold according to the target format requirement; and in a case where the relevance score is greater than or equal to the relevance threshold, taking file content of a medical file corresponding to the relevance score as the target file content.
[0010] In an implementation, the determining the attribute file template according to the target format requirement comprises: determining, according to a third correspondence, a target attribute file template corresponding to the target format requirement from a plurality of preset attribute templates, the third correspondence representing a correspondence between different preset attribute templates and format requirements.
[0011] In an implementation, the method further comprises: determining a target system authentication parameter according to the target format requirement; establishing a target connection channel with the target system based on the target system authentication parameter; and after the target medical file corresponding to the target format requirement is obtained by converting the medical file to be processed by using the target medical file processing engine, the method further comprises: sending the medical file corresponding to the target format requirement to the target system through the target connection channel.
[0012] In an implementation, before the relevance between the text attribute information and the plurality of related files in the medical file to be processed is calculated according to the text attribute information saved in the text content conversion parameter to obtain a relevance calculation result, the method further comprises: determining a paragraph processing requirement according to the target format requirement; performing paragraph processing on the medical file to be processed according to the paragraph processing requirement to obtain a plurality of medical file segments; in a case where an nth medical file segment is less than or equal to a preset length threshold, splicing the nth medical file segment and an (n+1)th medical file segment to obtain a spliced medical file to be processed, where n is a positive integer; and calculating the relevance between the text attribute information and the plurality of related files in the medical file to be processed according to the text attribute information saved in the text content conversion parameter to obtain the relevance calculation result, comprising: calculating the relevance between the text attribute information and the plurality of related files in the spliced medical file to be processed according to the text attribute information saved in the text content conversion parameter to obtain the relevance calculation result.
[0013] In a second aspect, an embodiment of the present application provides a medical file conversion device, the device comprising:
[0014] The receiving module is configured to receive a medical file to be processed input by a user and a target format requirement of the medical file to be processed.
[0015] The first determining module is configured to determine a target attribute file template according to the target format requirement, the target attribute file template comprising a prediction task prompt word of attribute information, wherein the attribute information corresponds to an attribute of the target format requirement.
[0016] The second determining module is configured to input the attribute file template into a large language model to obtain attribute information output by the large language model, wherein the large language model performs a task of generating attribute information according to a preset task prompt word of the attribute information.
[0017] The initialization module is configured to initialize a target file conversion parameter of the medical file processing engine according to the attribute information, and obtain a target medical file processing engine.
[0018] The conversion module is configured to convert a format of the to-be-processed medical file by using the target medical file processing engine, and obtain a medical file corresponding to the target format requirement.
[0019] In a third aspect, an embodiment of the present application provides a medical file conversion device, which comprises a processor and a memory storing computer program instructions; and the processor implements the medical file conversion method in the first aspect or any one of the implementation forms of the first aspect when executing the computer program instructions.
[0020] In a fourth aspect, a computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the medical file conversion method in the first aspect or any one of the implementation forms of the first aspect.
[0021] In a fifth aspect, an embodiment of the present application provides a computer program product, and instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to execute the medical file conversion method in the first aspect or any one of the implementation forms of the first aspect.
[0022] The medical file conversion method, device and equipment provided in the embodiments of the present application can obtain a to-be-processed medical file input by a user and a target format requirement corresponding to the to-be-processed medical file, and determine a target attribute template corresponding to the target format requirement by using the target format requirement. The target attribute template is input into a trained large language model, and the large language model is enabled to perform a task of generating attribute information according to a preset task prompt word of the attribute information in the target attribute template, so as to obtain the attribute information. Further, the attribute information is used to perform format conversion on a medical file processing engine, so as to obtain a target medical file processing engine meeting the target format conversion requirement, and then the target medical file processing engine is used to perform format conversion on the to-be-processed medical file. It can be understood that the medical file conversion method in the embodiments of the present application can obtain initialization parameters of a medical file processing engine according to a target format requirement by using a large language model, and initialize the medical file processing engine according to the initialization parameters corresponding to the target format requirement, so that the initialized target medical file processing engine can realize conversion of a medical file format. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments of the present application will be briefly introduced. Those skilled in the art can obtain other drawings according to these drawings without creating any creative labor.
[0024] Figure 1 A flowchart of a method for converting medical files is shown according to an embodiment of the present application;
[0025] Figure 2 A flowchart of a method for converting medical files is shown according to another embodiment of the present application;
[0026] Figure 3 A flowchart of a method for converting medical files is shown according to yet another embodiment of the present application;
[0027] Figure 4 A flowchart of a method for determining a relevance calculation result is shown according to yet another embodiment of the present application;
[0028] Figure 5 A flowchart of a method for determining a target file content is shown according to yet another embodiment of the present application;
[0029] Figure 6 A flowchart of a method for converting medical files is shown according to yet another embodiment of the present application;
[0030] Figure 7 A flowchart of a method for converting medical files is shown according to yet another embodiment of the present application;
[0031] Figure 8 A flowchart of a method for converting medical files is shown according to yet another embodiment of the present application;
[0032] Figure 9 A schematic diagram of an architecture of a system for converting medical files is shown according to an embodiment of the present application;
[0033] Figure 10 A schematic diagram of an architecture of a system for converting medical files is shown according to another embodiment of the present application;
[0034] Figure 11 A schematic diagram of an architecture of a system for converting medical files is shown according to yet another embodiment of the present application. DETAILED DESCRIPTION
[0035] The features and exemplary embodiments of the various aspects of the present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended to explain the principles of the present application and are not intended to limit the present application. The present application can be implemented without some of the specific details described below. The following description of the embodiments is merely provided to give a better understanding of the present application by showing examples of the present application.
[0036] It is to be noted that the relative terms, such as first and second, and the like, are used herein only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between such entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... " does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the stated elements.
[0037] With the digital transformation of the medical industry, systematic organization and efficient application of medical knowledge have gradually become key factors to improve the quality of medical services. However, due to the professional and complex nature of medical knowledge, combined with the continuous emergence of new research results and new technical standards in the field, the management and updating of medical knowledge have become a challenging task.
[0038] In the related art, medical personnel can organize and classify medical files to obtain standardized medical knowledge data. The medical files can include clinical records of doctors and medical experts, or related medical literature, etc. The medical literature can include books and their photocopies, electronic archives, etc. It can be understood that the working habits of medical personnel are different, and therefore the formats of medical files are different, which can cause great difficulty in formatting processing.
[0039] In addition, different systems can require different formats, so how to quickly and accurately generate the corresponding format for different systems is also a technical problem that needs to be solved by related technical personnel.
[0040] To solve the problems in the prior art, the embodiments of the present application provide a medical file conversion method, device and equipment. First, the medical file conversion method provided by the embodiments of the present application is introduced.
[0041] Figure 1 The flowchart of the medical file conversion method provided by an embodiment of the present application is shown. As shown in Figure 1 The medical file conversion method includes the following steps:
[0042] S110, receiving a user inputted medical file to be processed and a target format requirement of the medical file to be processed.
[0043] Exemplarily, the to-be-processed medical file can represent a medical file that needs to be format-converted. The to-be-processed medical file can be a medical file entered or imported by a user through a dialog box at the front end of different systems. For example, the to-be-processed medical file can be a relevant file of experience in clinical treatment of a specific disease; or the to-be-processed medical file can be a relevant file for case analysis.
[0044] Exemplarily, the to-be-processed medical file input by the user can include one or more, and the format of the to-be-processed medical file can be different formats. In an example, the format of the to-be-processed medical file can include online notes, paper notes, drawings, and temporary drafts, etc. In another example, the to-be-processed medical file can include files in multiple languages, such as Chinese, English, and other medical files in multiple languages.
[0045] Exemplarily, the target format requirement can be a format requirement that needs to be format-converted to the to-be-processed file. In an example, the target format requirement can be selected by the user according to different needs; or the target format requirement corresponding to the target system can be automatically identified according to the target system selected by the user. The target system can include a patient inquiry system, a doctor diagnosis system, and a scientific research query system, etc.
[0046] S120, determining a target attribute file template according to the target format requirement.
[0047] The target attribute file template includes a preset task prompt word of attribute information, and the attribute information corresponds to an attribute of the target format requirement.
[0048] Exemplarily, different target format requirements can correspond to different target attribute file templates. The target attribute file template includes a preset task prompt word corresponding to attribute information.
[0049] In an example, in a case analysis task, the target attribute file template can be “illness is[MASK]”. Further, the template can be spliced with the original text to obtain the input of the prompt word (prompt) as “I like the Disney films very much. It was[MASK]”. It can be understood that [MASK] can be used to mark the creation of a prediction task. When the model sees [MASK] in the input text, it can predict the word or phrase that should be filled in the [MASK] position based on the context.
[0050] Exemplarily, the attribute information can be used to represent the attribute information to be predicted in the target attribute file template. For example, in a case analysis task, the attribute information can include disease type, medical history, family history, and other attribute information.
[0051] S130, input the target attribute file template into the large language model to obtain attribute information output by the large language model.
[0052] The large language model executes the task of generating attribute information according to the preset task prompt word of the attribute information.
[0053] For example, the target attribute file template can be input into the large language model, so that the large language model executes the task of generating attribute information according to the preset task prompt word in the target attribute file template, thereby obtaining the attribute information.
[0054] For example, the large language model (LLM) can be a language model capable of supporting multiple tasks.
[0055] S140, initialize the target file conversion parameters of the medical file processing engine according to the attribute information to obtain a target medical file processing engine.
[0056] For example, the attribute information determined by the large language model can be used to initialize the target file conversion parameters of the medical file processing engine to obtain a target medical file processing engine.
[0057] For example, the medical file processing engines corresponding to different systems are different, and the file conversion parameters of the medical file processing engine can be initialized according to different attribute information, so that the medical file processing engine can process the medical file to be processed according to different format requirements.
[0058] In an example, the medical file processing engine can be a software system or a hardware component capable of executing a data processing task. For example, the medical processing engine can include a search engine, a database processing engine, and a data preprocessing engine, etc.
[0059] S150, format conversion of the medical file to be processed is performed by using the target medical file processing engine to obtain a medical file corresponding to a target format requirement.
[0060] For example, the medical file to be processed can be format converted by using the formatted target medical file processing engine, thereby obtaining a medical file with a target format requirement.
[0061] In the embodiment of the present application, the user inputted medical file to be processed and the target format requirement corresponding to the medical file to be processed can be obtained, and the target attribute template corresponding to the target format requirement determined by the target format requirement is utilized, the target attribute template is inputted into the trained large language model, the large language model is caused to execute the task of generating attribute information according to the preset task prompt word of the attribute information in the target attribute template, and the attribute information is obtained. Further, the attribute information is utilized to perform format conversion on the medical file processing engine, so that the target medical file processing engine meeting the target format conversion requirement is obtained, and the target medical file processing engine is utilized to perform format conversion on the medical file to be processed. It can be understood that the medical file conversion method in the embodiment of the present application can obtain the initialization parameter corresponding to the medical file processing engine through the large language model according to the target format requirement, and the medical file processing engine is initialized according to the initialization parameter corresponding to the target format requirement, so that the initialized target medical file processing engine realizes the conversion of the medical file format. That is, in the embodiment of the present application, the format conversion of the medical file is realized in combination with the medical file processing engine, and the medical file to be processed can be quickly, efficiently and accurately converted into the medical file corresponding to the target format requirement.
[0062] Exemplarily, different format requirements can correspond to different attribute information, and the attribute information can be used to realize the parameter initialization of the medical file processing engine. The attribute information can include text attribute information and format attribute information.
[0063] In order to realize the parameter initialization of the medical file processing engine through the attribute information, as another implementation manner of the present application, another implementation manner of the medical file conversion method is also provided, which is specifically described in the following embodiment.
[0064] Figure 2 A flowchart of the medical file conversion method provided by another embodiment of the present application is shown. As shown in Figure 2 The medical file conversion method includes the following steps:
[0065] S210, receiving the medical file to be processed inputted by the user and the target format requirement of the medical file to be processed.
[0066] S220, determining the target attribute file template according to the target format requirement.
[0067] S230, inputting the target attribute file template into the large language model to obtain the attribute information outputted by the large language model.
[0068] Exemplarily, steps S210-S230 are consistent with steps S110-S130, and step S270 is consistent with step S150, and no more details are described herein.
[0069] S240, determining, according to the first correspondence relationship, a target text content conversion parameter corresponding to the text attribute information.
[0070] The first correspondence relationship represents a correspondence relationship between different text attribute information and text content conversion parameters.
[0071] For example, the target text content conversion parameter corresponding to the text attribute information in the attribute information can be determined through the first correspondence relationship. The target text content conversion parameter is used for parameter initialization of a text extraction processing process in the medical file processing engine.
[0072] In an example, the text attribute information can be used to represent text features corresponding to the target format requirement. For example, in a case analysis task, the text attribute information can include text features such as disease type, medical history, and family history.
[0073] For example, the first correspondence relationship can be set by a related technical person according to experience or experiment.
[0074] S250, determining, according to a second correspondence relationship, a target format conversion parameter corresponding to the format attribute information, the second correspondence relationship representing a correspondence relationship between different format attribute information and format conversion parameters.
[0075] For example, the target format conversion parameter corresponding to the format attribute information in the attribute information can be determined through the second correspondence relationship. The target format conversion parameter is used for parameter initialization of a format conversion process in the medical file processing engine.
[0076] In an example, the format attribute information can be used to represent format requirements corresponding to the target format requirement. In addition, the format attribute information can correspond to the text attribute information. For example, in a case analysis task, the format attribute information corresponding to the disease type can be that the disease type is text, the number of characters is within 256 characters, and the disease type should conform to the enumeration of the disease type in the International Classification of Diseases (ICD).
[0077] For example, the second correspondence relationship can be set by a related technical person according to experience or experiment.
[0078] S260, parameter configuration is performed on the medical file processing engine according to the target text content conversion parameter and the target format conversion parameter, and a target medical file processing engine is obtained.
[0079] Exemplarily, the medical file processing engine can be initialized by the target text content conversion parameter and the target format conversion parameter determined according to the first correspondence relationship and the second correspondence relationship, to obtain a target medical file processing engine.
[0080] S270, performing format conversion on the to-be-processed medical file by using the target medical file processing engine to obtain a medical file corresponding to the target format requirement.
[0081] In the embodiments of the present application, the target text content conversion parameter and the target format conversion parameter corresponding to the text attribute feature and the format attribute feature corresponding to the target format requirement are respectively obtained through the first correspondence relationship and the second correspondence relationship, and then the medical file processing engine is initialized by using the target text content conversion parameter and the target format conversion parameter, to obtain a target medical file processing engine meeting the target format requirement, so that the target medical file processing engine can process the to-be-processed medical file and ensure that the to-be-processed file can be accurately converted by the target medical file processing engine.
[0082] In order to accurately convert the to-be-processed medical file, as another implementation manner of the present application, another implementation manner of the medical file conversion method is further provided, which is described in detail below.
[0083] Figure 3 A flowchart of the medical file conversion method provided by another embodiment of the present application is shown. As shown in Figure 3 The medical file conversion method includes the following steps:
[0084] S310, receiving a to-be-processed medical file and a target format requirement of the to-be-processed medical file input by a user.
[0085] S320, determining a target attribute file template according to the target format requirement.
[0086] S330, inputting the target attribute file template into a large language model to obtain attribute information output by the large language model.
[0087] S340, initializing a target file conversion parameter of a medical file processing engine according to the attribute information, to obtain a target medical file processing engine.
[0088] S350, calculating the relevance between the text attribute information and a plurality of related files in the to-be-processed medical file according to the text attribute information saved in the text content conversion parameter by using the target medical file processing engine, to obtain a relevance calculation result.
[0089] S360, obtaining, by the target medical file processing engine, target file content that satisfies the preset relevance condition from the plurality of relevant files according to the relevance calculation result.
[0090] S370, determining, by the target medical file processing engine, a text content extraction template according to the text attribute information and the target file content, the text content extraction template including a preset task prompt word for extracting text content corresponding to the text attribute information from the target file content.
[0091] S380, inputting the text content extraction template into the large language model to obtain text content corresponding to the text attribute information extracted from the target file content by the large language model according to the text content extraction template.
[0092] S390, performing format conversion on the text content according to the format attribute information saved in the target format conversion parameter to obtain a medical file corresponding to the target format requirement.
[0093] For example, steps S310-S340 are consistent with steps S110-S140, and will not be described in detail here.
[0094] In some embodiments, in S350, the initialized target medical file processing engine can calculate the relevance of the text attribute information and the plurality of relevant files in the medical file to be processed according to the text attribute information saved in the text content conversion parameter, to obtain a relevance calculation result.
[0095] In some optional embodiments, the determination of the relevant files can be realized by a relevance calculation formula. Figure 4 A flowchart for determining a relevance calculation result is shown. As shown in Figure 4 The medical file conversion method includes the following steps:
[0096] S351, determining the word frequency and inverse document frequency of the text attribute information in the medical file.
[0097] For example, the word frequency and inverse document frequency (IDF) of the text attribute information in each medical file can be determined.
[0098] In an example, the inverse document frequency IDF corresponding to the text attribute information can be calculated by the following formula (1):
[0099]
[0100] wherein, N is the total number of documents; n(qi) is the number of documents containing the word "qi".
[0101] S352, the relevance score corresponding to the medical file is calculated according to the word frequency, the inverse document frequency and the length of the medical file.
[0102] In an example, the relevance score corresponding to the medical file can be calculated by the following formula (2):
[0103]
[0104] wherein score(D, Q) represents the relevance score between the medical document D and the query Q, IDF(qi) represents the inverse document frequency of the word qi, f(q, D) represents the frequency of the word q in the medical document D, k1 and b are adjustable parameters, avgdl represents the average document length, and |D| represents the length of the medical document D.
[0105] In the embodiments of the present application, the word frequency and the inverse document frequency of the text attribute information in the medical file are determined, and the relevance score corresponding to the medical file is calculated according to the word frequency, the inverse document frequency and the length of the medical file, so that the relevance between the target format requirement and each medical file can be determined.
[0106] In some embodiments, in S360, the target file content satisfying the preset relevance condition can be obtained from the multiple relevant files according to the relevance calculation result by using the target medical file processing engine.
[0107] For example, the target file content can be a medical file or a text segment in a medical file having high relevance with the text attribute information.
[0108] In an example, the medical file or the text segment in the medical file having the highest relevance score can be taken as the target file content.
[0109] For example, different target format requirements can correspond to different preset relevance conditions.
[0110] In an example, the preset relevance condition can be to select the most relevant file from the multiple relevant files as the target file content. For example, the file or the text segment having the highest relevance score can be selected as the target file content.
[0111] In some optional embodiments, Figure 5 A flowchart for determining the target file content is shown in another embodiment of the present application. As shown in Figure 5 The conversion method of the medical file includes the following steps:
[0112] S361, determining the relevance threshold according to the target format requirement.
[0113] Exemplarily, the relevance threshold can represent the relevance between the target file content and the text attribute information. In an example, the greater the value corresponding to the relevance threshold, the higher the relevance between the target text content and the text attribute information; on the contrary, the smaller the value corresponding to the relevance threshold, the weaker the relevance between the target text content and the text attribute information.
[0114] Exemplarily, different target formats require different relevance thresholds. Among them, the relevant technical personnel can determine different relevance thresholds according to the different requirements of the target format.
[0115] S362、In the case where the relevance score is greater than or equal to the relevance threshold, the file content of the medical file corresponding to the relevance score is taken as the target file content.
[0116] Exemplarily, in the case where the relevance score is greater than or equal to the relevance threshold, the file content of the medical file corresponding to the relevance score can be taken as the target file content; in the case where the relevance score is less than the relevance threshold, the file content of the medical file corresponding to the relevance score can be taken as the target file content.
[0117] In the embodiments of the present application, by comparing the relevance score with the relevance threshold, it is determined whether the medical file content corresponding to the relevance score is the target file content, wherein the relevance threshold is determined according to different target format requirements, and by comparing the relevance score with the relevance threshold corresponding to different format requirements, the determined target format content can meet different format requirements, thereby improving the accuracy of the format conversion process.
[0118] In some embodiments, in S370, the target medical file processing engine can determine a text content extraction template according to the text attribute information and the target file content.
[0119] Among them, the text content extraction template includes a preset task prompt word for extracting the text content corresponding to the text attribute information from the target file content.
[0120] Exemplarily, the target medical file processing engine can construct a text content extraction target according to the text attribute information and the target file content, wherein the text content extraction template can include a preset task prompt word, which can be used to extract the text content corresponding to the text attribute information from the target file content.
[0121] In an example, in the case where the determined text attribute information is a disease category and the target file content is heart disease related content, a text content extraction template can be constructed according to the disease category and the heart disease related content.
[0122] In some embodiments, in S380, the text content extraction template is input into the large language model, and the large language model extracts the text content corresponding to the text attribute information from the target file content according to the text content extraction template.
[0123] For example, the text content extraction template can be input into the large language model, and the large language model can predict the corresponding text content according to the text content extraction template. The text content predicted by the large language model corresponds to the text attribute information.
[0124] In an example, if the text content extraction template is the text attribute information, the target file content is heart disease related content, and the text content extraction template is determined, the predicted text content output by the large language model can be heart disease.
[0125] In some embodiments, in S390, the text content can be format-converted according to the format attribute information saved by the target format conversion parameter, and a medical file corresponding to the target format requirement is obtained.
[0126] For example, the target medical file processing engine can verify and format-convert the determined text content according to the corresponding format attribute information.
[0127] In an example, the predicted text content output by the large language model, such as heart disease, can be verified to determine whether it is text content, whether it is less than 256 characters, and whether it conforms to the ICD enumeration example. After determining that the content predicted by the large language model meets the requirements, the text content can be converted according to the preset format, for example, the text content can be converted into a text (TXT) format. Alternatively, the text content can be vectorized by a pre-training model of text-to-vector (such as text2vec-large-chinese) to facilitate the downstream task to call the formatted medical file.
[0128] In the embodiments of the present application, the relevance calculation results of the plurality of related files in the to-be-processed medical file can be obtained to determine the target file content, and the text content extraction template can be constructed according to the target file content and the text attribute information. The large language model can predict the text content in the text content extraction template to obtain the corresponding text content, and the target medical file processing engine can format-convert the text content according to the format attribute information saved by the target format conversion parameter to obtain a medical file corresponding to the target format requirement. That is, the embodiments of the present application can effectively express and organize the to-be-processed file, so that the format conversion can be correctly and normatively implemented.
[0129] In order to achieve the determination of the attribute template, as another implementation manner of the present application, the present application further provides another implementation manner of the medical file conversion method, which is specifically described in the following embodiment.
[0130] Figure 6 A flowchart of the medical file conversion method provided by another embodiment of the present application is shown. As shown in the figure, the medical file conversion method comprises the following steps: Figure 6
[0131] S610, receiving a user-inputted medical file to be processed and a target format requirement of the medical file to be processed.
[0132] For example, step S610 is consistent with step S110, and steps S630-S650 are consistent with steps S130-S150, which will not be described in detail here.
[0133] S620, determining a target attribute file template corresponding to the target format requirement from a plurality of preset attribute file templates according to a third correspondence.
[0134] The third correspondence represents the correspondence between different preset attribute file templates and format requirements.
[0135] For example, after determining the target format requirement required by the user, the target attribute file template corresponding to the target format requirement can be determined from the plurality of preset attribute file templates through the third correspondence.
[0136] The preset attribute file template can be an attribute file template set by a technician according to different requirements. The third correspondence can be established by the technician according to the correspondence between the preset attribute file template and the target format requirement.
[0137] For example, the attribute information corresponding to different preset attribute file templates can be different, or there can be some same attribute information in different preset attribute file templates. For example, different preset attribute file templates can include name, gender, etc. In another example, for example, in the template corresponding to the case analysis task, the unique attribute information can include disease type, medical history, and family history, etc.
[0138] S630, inputting the target attribute file template into a large language model to obtain attribute information output by the large language model.
[0139] S640, initializing a target file conversion parameter of a medical file processing engine according to the attribute information, to obtain a target medical file processing engine.
[0140] S650, format conversion is performed on the to-be-processed medical file by using a target medical file processing engine to obtain a medical file corresponding to the target format requirement.
[0141] In the embodiment of the application, the target format requirement is matched with the format requirement in the third correspondence, so as to determine the target attribute file template corresponding to the target format requirement, and ensure that the target attribute file template can meet the format requirements required by different users. It can be understood that, in the embodiment of the application, by determining the target attribute file template corresponding to the target format requirement, the to-be-processed medical file can be converted into medical files of multiple formats, the utilization rate of the medical file is improved, and a good foundation is provided for downstream tasks.
[0142] In order to ensure data transmission security, as another implementation manner of the application, the application further provides another implementation manner of the medical file conversion method, which is specifically described in the following embodiment.
[0143] Figure 7 A flowchart of a medical file conversion method provided by another embodiment of the application is shown. As shown in Figure 7 The medical file conversion method includes the following steps:
[0144] S710, receiving a to-be-processed medical file input by a user and a target format requirement of the to-be-processed medical file.
[0145] For example, step S710 is consistent with step S110, and steps S740-S770 are consistent with steps S120-S150, which will not be described in detail here.
[0146] S720, determining a target system authentication parameter according to the target format requirement.
[0147] For example, the target system can be determined according to the target format requirement. The target system can be a system specified by the user. Further, the authentication parameter corresponding to the target system can be determined according to the target system.
[0148] In an example, the authentication parameter of the authentication component of the target system can be used. For example, the authentication parameter can include credentials for verifying the target system, such as a username and password, a digital certificate, biometric information, etc.
[0149] S730, establishing a target connection channel with the target system based on the target system authentication parameter.
[0150] For example, in the case where the authentication parameter is successfully authenticated, a target connection channel can be established with the target system. In an example, the connection parameter can be configured, such as an IP address, a port number, an encryption protocol, etc., and a handshake process, such as a TLS / SSL handshake, can be used to ensure the security of the communication.
[0151] S740, determining a target attribute file template according to the target format requirement.
[0152] S750, inputting the target attribute file template into the large language model to obtain attribute information output by the large language model.
[0153] S760, initializing a target file conversion parameter of a medical file processing engine according to the attribute information to obtain a target medical file processing engine.
[0154] S770, performing format conversion on the medical file to be processed by using the target medical file processing engine to obtain a medical file corresponding to the target format requirement.
[0155] S780, sending the medical file corresponding to the target format requirement to the target system through the target connection channel.
[0156] Exemplarily, the medical file corresponding to the target format requirement can be sent to the target system through the target connection channel.
[0157] Exemplarily, before establishing the connection channel, a system preset configuration can be called, the system environment can be checked, and central processing unit (CPU) resources, memory and storage resources can be allocated to ensure the running of the medical file formatting process and the transmission process.
[0158] Exemplarily, the medical file corresponding to the target format requirement can be compressed through a compression algorithm to improve the data transmission speed.
[0159] In the embodiments of the present application, the target connection channel can be established through the authentication parameter and the target system, so that the medical file corresponding to the target format requirement can be transmitted to the target system. It can be understood that the security of data transmission can be improved through the target data transmission, and personal privacy and confidential data cannot be leaked.
[0160] In order to ensure that the correlation technology structure can be quickly determined, as another implementation manner of the present application, another implementation manner of the medical file conversion method is also provided, which is specifically described below.
[0161] Figure 8 A flowchart of a medical file conversion method provided by another embodiment of the present application is shown. As shown in the figure, Figure 8 the medical file conversion method includes the following steps:
[0162] S801, receiving a medical file to be processed and a target format requirement of the medical file to be processed input by a user.
[0163] S802. Determine a target attribute file template according to a target format requirement.
[0164] S803. Input the target attribute file template into a large language model to obtain attribute information output by the large language model.
[0165] S804. Perform target file conversion parameter initialization on a medical file processing engine according to the attribute information to obtain a target medical file processing engine.
[0166] Exemplarily, steps S801-S804 are consistent with steps S310-S340, and steps S809-S812 are consistent with steps S360-S390, which will not be described in detail here.
[0167] S805. Determine a paragraph processing requirement according to the target format requirement.
[0168] Exemplarily, the paragraph processing requirement is used to represent the processing requirement for each paragraph in the medical file. Different target format requirements can correspond to different preset paragraph processing requirements.
[0169] Exemplarily, the target format requirement can be determined to correspond to the paragraph processing requirement through a preset correspondence relationship. The preset correspondence relationship can represent the correspondence relationship between different format requirements and different paragraph processing requirements.
[0170] In an example, the paragraph processing requirement can include a segmentation processing requirement and a processing requirement for deleting blank lines.
[0171] S806. Perform paragraph processing on the medical file to be processed according to the paragraph processing requirement to obtain a plurality of medical file paragraphs.
[0172] Exemplarily, the medical file to be processed is segmented and processed and the blank lines are removed according to the paragraph processing requirement to obtain a plurality of medical file paragraphs.
[0173] S807. In a case where the nth medical file paragraph is determined to be less than or equal to a preset length threshold, the nth medical file paragraph and the n+1th medical file paragraph are spliced to obtain a spliced medical file to be processed, wherein n is a positive integer.
[0174] For example, if the nth medical document segment is determined to be less than or equal to a preset length threshold, the nth medical document segment can be concatenated with the (n+1)th medical document segment to obtain the concatenated medical document to be processed. It is understandable that the title segment in the medical document to be processed is often very short, and the paragraphs following it are generally used to explain and elaborate on the title segment. During the retrieval process, it was found that short title segments affect the retrieval results, easily leading to the retrieval of irrelevant and incomplete short titles. Therefore, merging them with subsequent paragraphs can effectively improve retrieval efficiency and accuracy.
[0175] For example, the preset length threshold can be set by a technician based on experiments or relevant experience.
[0176] S808. Based on the text attribute information stored in the text content conversion parameters, calculate the correlation between the text attribute information and multiple related files in the concatenated medical file to be processed, and obtain the correlation calculation result.
[0177] For example, based on the text attribute information stored in the text content conversion parameters, the correlation between the text attribute information and multiple related files in the concatenated medical file to be processed is calculated to obtain the correlation calculation result. It is understandable that by performing correlation calculations on the concatenated medical file, the efficiency and accuracy of correlation calculation can be effectively improved.
[0178] S809. Using the target medical document processing engine, based on the correlation calculation results, obtain the target document content from multiple related documents that meet the preset correlation conditions.
[0179] S810. Using the target medical document processing engine, a text content extraction template is determined based on the text attribute information and the target file content. The text content extraction template includes preset task prompts for extracting text content corresponding to the text attribute information from the target file content.
[0180] S811. Input the text content extraction template into the large language model to obtain the text content corresponding to the text attribute information extracted from the target file content by the large language model based on the text content extraction template.
[0181] S812. Based on the format attribute information saved according to the target format conversion parameters, convert the text content to obtain the medical file corresponding to the target format requirements.
[0182] For example, before splicing medical document paragraphs, the medical documents to be processed can be classified and document format normalized. After splicing the medical document paragraphs, the spliced medical documents can be deredundant and the text can be vectorized for subsequent processes.
[0183] In one example, the documents to be processed can be categorized based on medical knowledge and stored in different directories. For example, the categories can be customized by technicians, including categories such as basic disease knowledge, clinical treatment methods, disease examination protocols, and clinical treatment opinions.
[0184] In one example, document format normalization and other processing can handle various medical document formats, such as compressed files, text documents (e.g., Word), Portable Document Format (PDF), TXT, and spreadsheet documents. Optical Character Recognition (OCR) is then used to read the content of these documents and generate a unified medical document in TXT format.
[0185] In one example, deduplication of medical document information can be performed by removing redundant information from the medical document information, such as removing useless information such as the beginning of the document title, table of contents, contact person, contact information, copy, send, proofreading, etc.
[0186] In one example, text vectorization of the medical document information to be processed can be performed (based on a pre-trained model). This involves embedding each text segment from the medical document and storing it in a vector database. The vector database contains document path information (e.g., document classification information) and vector information for each text segment.
[0187] In this embodiment of the application, the efficiency and accuracy of correlation calculation are improved by performing appropriate preprocessing on the medical documents to be processed, thus laying a good foundation for subsequent steps.
[0188] For example, in combination Figure 9 The following examples illustrate the method for converting medical documents in this application.
[0189] For example, the medical document conversion method in this application embodiment can be applied to a medical document conversion system. Wherein, Figure 9 A schematic diagram of the architecture of a medical document conversion system provided in one embodiment of this application is shown, as follows: Figure 9 As shown, the medical document conversion system 900 may include a large language model 901, a medical document processing engine 902, and a client system 903.
[0190] For example, the user can enter medical knowledge or import medical files in the dialog box of the client system 903, i.e., the front end. For example: import special disease clinical treatment experience.doc. Further, the user can select the target system or the target format to which the medical file or medical knowledge is imported at the front end, wherein the target system and the target format can have a corresponding relationship. Based on the large language model, the requirements of the target format are analyzed; based on the LLM, the template corresponding to the requirements of the target format is constructed through the prompt, to obtain the description file of the processing engine (Agent) corresponding to different format requirements, and initialize the processing engine (Agent) according to the description file. The Agent after initialization extracts the features of the medical knowledge or medical files submitted by the user, and based on the large language model, the content submitted by the user is sorted, analyzed and converted based on the requirements of the target format, and through a correlation algorithm such as the BM25 algorithm, the data is extracted and backfilled into the generated target format document, and after processing, the system echoes the target document content for the front-end user to review. Or automatically reviewed by the system. After the review is completed, the data is output or imported into the target storage through the initialized processing engine.
[0191] Based on the medical file conversion method provided in the above embodiments, the application also provides a specific implementation of a medical file conversion device. Please refer to the following embodiments.
[0192] Firstly, referring to Figure 10 The medical file conversion device 1000 provided in the embodiments of the application includes the following modules:
[0193] The receiving module 1001 is configured to receive a user-inputted medical file to be processed and a target format requirement of the medical file to be processed;
[0194] The first determining module 1002 is configured to determine a target attribute file template according to the target format requirement, wherein the target attribute file template includes a prediction task prompt word of attribute information, and the attribute information corresponds to an attribute of the target format requirement;
[0195] The second determining module 1003 is configured to input the attribute file template into a large language model to obtain attribute information output by the large language model, wherein the large language model performs a task of generating the attribute information according to a preset task prompt word of the attribute information;
[0196] The initialization module 1004 is configured to initialize a target file conversion parameter of a medical file processing engine according to the attribute information, to obtain a target medical file processing engine;
[0197] The conversion module 1005 is configured to perform format conversion on the to-be-processed medical file by using the target medical file processing engine to obtain a medical file corresponding to the target format requirement.
[0198] In the embodiments of the present application, the to-be-processed medical file and the target format requirement corresponding to the to-be-processed medical file input by the user are obtained, and the target attribute template corresponding to the target format requirement determined by the target format requirement is used. The target attribute template is input into the trained large language model, so that the large language model executes the task of generating attribute information according to the preset task prompt word of the attribute information in the target attribute template, so as to obtain the attribute information. Further, the attribute information is used to perform format conversion on the medical file processing engine, so as to obtain the target medical file processing engine meeting the target format conversion requirement, and then the target medical file processing engine is used to perform format conversion on the to-be-processed medical file. It can be understood that the medical file conversion method in the embodiments of the present application can obtain the initialization parameters corresponding to the medical file processing engine according to the target format requirement through the large language model, and initialize the medical file processing engine according to the initialization parameters corresponding to the target format requirement, so that the initialized target medical file processing engine realizes the conversion of the medical file format.
[0199] As an implementation manner of the present application, the attribute information includes text attribute information and format attribute information, and the initialization module 1004 initializes the medical file processing engine according to the attribute information to obtain the target medical file processing engine in the following manner: according to a first correspondence relationship, determining the target text content conversion parameter corresponding to the text attribute information, the first correspondence relationship representing the correspondence relationship between different text attribute information and text content conversion parameters; according to a second correspondence relationship, determining the target format conversion parameter corresponding to the format attribute information, the second correspondence relationship representing the correspondence relationship between different format attribute information and format conversion parameters; and performing parameter configuration on the medical file processing engine according to the target text content conversion parameter and the target format conversion parameter to obtain the target medical file processing engine.
[0200] As an implementation manner of the present application, the conversion module 1005 converts the to-be-processed medical file into a medical file corresponding to the target format requirement by using the target medical file processing engine in the following manner: the target medical file processing engine calculates the relevance between the text attribute information and the plurality of related files in the to-be-processed medical file according to the text attribute information saved in the text content conversion parameter, and obtains a relevance calculation result; the target medical file processing engine obtains target file content that meets a preset relevance condition from the plurality of related files according to the relevance calculation result; the target medical file processing engine determines a text content extraction template according to the text attribute information and the target file content, the text content extraction template including a predicted task prompt word for extracting text content corresponding to the text attribute information from the target file content; the text content extraction template is input into the large language model, and text content corresponding to the text attribute information extracted from the target file content by the large language model according to the text content extraction template is obtained; and the text content is converted according to the format attribute information saved in the target format conversion parameter, and a medical file corresponding to the target format requirement is obtained.
[0201] As an implementation manner of the present application, the conversion module 1005 calculates the relevance between the text attribute information and the plurality of related files in the to-be-processed medical file according to the text attribute information saved in the text content conversion parameter, and obtains a relevance calculation result in the following manner: the word frequency and the inverse document frequency of the text attribute information in the medical file are determined; and the relevance score corresponding to the medical file is calculated according to the word frequency, the inverse document frequency and the length of the medical file.
[0202] As an implementation manner of the present application, the conversion module 1005 obtains target file content that meets a preset relevance condition from the plurality of related files according to the relevance calculation result by using the target medical file processing engine in the following manner: the relevance threshold is determined according to the target format requirement; and the file content of the medical file corresponding to the relevance score is taken as the target file content in a case where the relevance score is greater than or equal to the relevance threshold.
[0203] As an implementation manner of the present application, the first determination module 1002 determines the attribute file template according to the target format requirement in the following manner: the target attribute file template corresponding to the target format requirement is determined from the plurality of preset attribute templates according to a third correspondence relationship, and the third correspondence relationship represents the correspondence relationship between different preset attribute templates and format requirements.
[0204] In an implementation, the apparatus further comprises an authentication module configured to determine target system authentication parameters according to the target format requirement; establish a target connection channel with the target system based on the target system authentication parameters; and after the medical file processing engine is used to convert the to-be-processed medical file into a medical file corresponding to the target format requirement, the apparatus further comprises a sending module configured to send the medical file corresponding to the target format requirement to the target system through the target connection channel.
[0205] In an implementation, before the correlation between the text attribute information and the plurality of related files in the to-be-processed medical file is calculated according to the text attribute information saved in the text content conversion parameters to obtain the correlation calculation result, the initialization module 1004 is further configured to determine a paragraph processing requirement according to the target format requirement; perform paragraph processing on the to-be-processed medical file according to the paragraph processing requirement to obtain a plurality of medical file paragraphs; in a case where the nth medical file paragraph is less than or equal to a preset length threshold, splice the nth medical file paragraph and the (n+1)th medical file paragraph to obtain a spliced to-be-processed medical file, where n is a positive integer; and calculate the correlation between the text attribute information and the plurality of related files in the spliced to-be-processed medical file according to the text attribute information saved in the text content conversion parameters to obtain the correlation calculation result.
[0206] Figure 11 A hardware structure schematic diagram of the medical file conversion method provided by the embodiments of the present application is shown.
[0207] The 11 device can include a processor 1101 and a memory 1102 having stored computer program instructions.
[0208] Specifically, the processor 1101 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured as one or more integrated circuits that implement the embodiments of the present application.
[0209] The memory 1102 can include mass storage for data or instructions. As an example and not by way of limitation, the memory 1102 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc (e.g., a compact disc (CD) or a digital versatile disc (DVD)), a solid-state drive (SSD), a USB drive, or a combination of two or more of these. Where appropriate, the memory 1102 can include removable or non-removable (or fixed) media, where appropriate. The memory 1102 can be internal or external to the integrated gateway disaster recovery appliance. In particular embodiments, the memory 1102 is non-volatile, solid-state memory.
[0210] The memory can include read-only memory (ROM), random-access memory (RAM), magnetic disk storage mediums, optical storage mediums, flash memory devices, electrical, optical, or other physically tangible / moφhological memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (by one or more processors), is operable to perform operations described with reference to the methods according to an aspect of the present disclosure.
[0211] The processor 1101 implements the medical file conversion method of any of the above embodiments by reading and executing computer program instructions stored in the memory 1102.
[0212] In one example, the medical file conversion device can further include a communication interface 1103 and a bus 1110. Wherein, as shown, the processor 1101, the memory 1102, the communication interface 1103 are connected through the bus 1110 and complete the communication between each other. Figure 11
[0213] The communication interface 1103 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.
[0214] Bus 1110 includes hardware, software, or both, coupling components of the online data traffic metering device to each other and to various services when needed. While the application is not limited to a particular bus structure, examples of bus structures include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand™ interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or combination of busses, or two or more such busses. Where appropriate, bus 1110 can include one or more buses. Although the application is not limited to a particular bus structure, the application contemplates any suitable bus or interconnect.
[0215] The medical file conversion device can execute the medical file conversion method in the embodiments of the application based on the user-input medical file to be processed and the target format requirement, thereby realizing the medical file conversion method and device described in the embodiments of the application. Figure 1 and Figure 11 described in the embodiments of the application.
[0216] In addition, in combination with the medical file conversion method in the above embodiments, the embodiments of the application can provide a computer storage medium to realize. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to realize any one of the medical file conversion methods in the above embodiments.
[0217] The embodiments of the application also provide a computer program product, comprising a computer program, the computer program is executed by a processor to realize the medical file conversion method in the above embodiments.
[0218] It needs to be clear that the application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after understanding the spirit of the application.
[0219] The functions noted in the description of the structural block diagrams above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transport information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. The code segments can be downloaded via computer networks such as the Internet, intranets, and the like.
[0220] It is also important to note that the examples mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the steps mentioned above, that is, the steps can be performed in the order mentioned in the examples, or in an order different from the examples, or several steps can be performed simultaneously.
[0221] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer program instructions can also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other processing device to operate in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks. The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer program instructions can also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other processing device to operate in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function / act specified in the flowchart and / or block diagram block or blocks.
[0222] The above merely describes a specific implementation of the present application. Those skilled in the art can clearly understand the specific working processes of the system, modules and units described above for the convenience and brevity of description, and can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein again. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application.
Claims
1. A method for converting medical documents, characterized in that, include: Receive the medical document to be processed input by the user and the target format requirements of the medical document to be processed; Based on the target format requirements, a target attribute file template is determined, wherein the target attribute file template includes preset task prompts for attribute information, and the attribute information corresponds to the attributes required by the target format. The target attribute file template is input into the large language model to obtain the attribute information output by the large language model. The large language model performs the task of generating the attribute information according to the preset task prompt words of the attribute information. The target file conversion parameters of the medical file processing engine are initialized based on the attribute information to obtain the target medical file processing engine. The target medical file processing engine is used to convert the format of the medical file to be processed, so as to obtain a medical file corresponding to the target format requirements. The attribute information includes text attribute information and format attribute information. The step of initializing the file conversion parameters of the medical file processing engine based on the attribute information to obtain the target medical file processing engine includes: Based on the first correspondence, the target text content conversion parameters corresponding to the text attribute information are determined, wherein the first correspondence represents the correspondence between different text attribute information and text content conversion parameters; Based on the second correspondence, the target format conversion parameters corresponding to the format attribute information are determined, wherein the second correspondence represents the correspondence between different format attribute information and format conversion parameters; The medical document processing engine is configured with parameters according to the target text content conversion parameters and the target format conversion parameters to obtain the target medical document processing engine.
2. The method according to claim 1, characterized in that, The process of using the target medical file processing engine to convert the format of the medical file to be processed to obtain a medical file corresponding to the target format requirements includes: The target medical file processing engine calculates the correlation between the text attribute information and multiple related files in the medical file to be processed based on the text attribute information stored in the text content conversion parameters, and obtains the correlation calculation result. Using the target medical document processing engine, based on the correlation calculation results, the target document content whose correlation results meet the preset correlation conditions is obtained from the multiple related documents; Using the target medical document processing engine, a text content extraction template is determined based on the text attribute information and the target file content. The text content extraction template includes preset task prompt words for extracting the text content corresponding to the text attribute information from the target file content. The text content extraction template is input into the large language model to obtain the text content corresponding to the text attribute information extracted by the large language model from the content of the target file based on the text content extraction template. The text content is converted according to the format attribute information saved by the target format conversion parameters to obtain the medical file corresponding to the target format requirements.
3. The method according to claim 2, characterized in that, The step of calculating the correlation between the text attribute information stored in the text content conversion parameters and multiple related files in the medical file to be processed, and obtaining the correlation calculation result, includes: Determine the word frequency and inverse document frequency of the text attribute information in the medical document; The relevance score of the medical document is calculated based on the term frequency, the inverse document frequency, and the length of the medical document.
4. The method according to claim 3, characterized in that, The step of obtaining target file content whose correlation results satisfy preset correlation conditions from the plurality of related files through the target medical file processing engine based on the correlation calculation results includes: Determine the relevance threshold based on the target format requirements; If the relevance score is determined to be greater than or equal to the relevance threshold, the content of the medical document corresponding to the relevance score is taken as the target document content.
5. The method according to claim 1, characterized in that, The step of determining the attribute file template according to the target format requirements includes: Based on the third correspondence, the target attribute file template corresponding to the target format requirement is determined from multiple preset attribute templates. The third correspondence represents the correspondence between different preset attribute templates and format requirements.
6. The method according to claim 1, characterized in that, The method further includes: Determine the target system authentication parameters based on the target format requirements; Based on the target system authentication parameters, establish a target connection channel with the target system; After converting the format of the medical file to be processed using the target medical file processing engine to obtain the medical file corresponding to the target format requirements, the method further includes: The medical file corresponding to the target format requirement is sent to the target system through the target connection channel.
7. The method according to claim 2, characterized in that... Before calculating the correlation between the text attribute information stored in the text content conversion parameters and multiple related files in the medical file to be processed, and obtaining the correlation calculation result, the method further includes: Based on the target format requirements, determine the paragraph processing requirements; According to the paragraph processing requirements, the medical document to be processed is processed into multiple medical document segments; If the nth medical file segment is determined to be less than or equal to a preset length threshold, the nth medical file segment is concatenated with the (n+1)th medical file segment to obtain the concatenated medical file to be processed, where n is a positive integer; The step of calculating the correlation between the text attribute information stored in the text content conversion parameters and multiple related files in the medical file to be processed, and obtaining the correlation calculation result, includes: The correlation between the text attribute information stored in the text content conversion parameters and multiple related files in the concatenated medical file to be processed is calculated to obtain the correlation calculation result.
8. A medical document conversion device, characterized in that, The device includes: The receiving module is used to receive the medical file to be processed input by the user and the target format requirements of the medical file to be processed; The first determining module is used to determine a target attribute file template according to the target format requirements. The target attribute file template includes prediction task prompts for attribute information, wherein the attribute information corresponds to the attributes required by the target format. The second determining module is used to input the attribute file template into the large language model to obtain the attribute information output by the large language model, wherein the large language model performs the task of generating the attribute information according to the preset task prompt words of the attribute information; An initialization module is used to initialize the target file conversion parameters of the medical file processing engine according to the attribute information, thereby obtaining the target medical file processing engine. The attribute information includes text attribute information and format attribute information. The initialization module is further used to determine the target text content conversion parameters corresponding to the text attribute information according to a first correspondence relationship, whereby the first correspondence relationship represents the correspondence between different text attribute information and text content conversion parameters; determine the target format conversion parameters corresponding to the format attribute information according to a second correspondence relationship, whereby the second correspondence relationship represents the correspondence between different format attribute information and format conversion parameters; and configure the parameters of the medical file processing engine according to the target text content conversion parameters and the target format conversion parameters, thereby obtaining the target medical file processing engine. The conversion module is used to convert the format of the medical file to be processed using the target medical file processing engine to obtain a medical file corresponding to the target format requirements.
9. A medical document conversion device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the medical document conversion method as described in any one of claims 1-7.
Citation Information
Patent Citations
Dialogue system intention recognition method and tool based on large language model
CN116955618A
Method and System for Converting Facsimile Documents to Electronic Health Record Formats
US20240428908A1