Physical examination report generation method and device, electronic equipment and storage medium

By employing a multi-expert intelligent agent parallel generation and adaptive optimization mechanism, the problems of low efficiency and insufficient accuracy in the generation of existing physical examination reports have been solved, achieving efficient and accurate physical examination report generation.

CN123182887APending Publication Date: 2026-11-27CHINA MOBILE CHENGDU INFORMATION & TELECOMM TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611271614.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing hospital physical examination report generation systems rely on manual interpretation and writing, and cannot dynamically adjust the workflow, resulting in low generation efficiency and insufficient reliability and interpretability of results, especially in complex scenarios.

Method used

Multiple expert agents are used to generate sub-reports in parallel. An adaptive cyclical argumentation mechanism is constructed through quality assessment and optimization. The multimodal large model of inspection and verification is used for optimization to generate high-quality physical examination reports.

Benefits of technology

It significantly improves the efficiency and accuracy of physical examination report generation, realizes intelligent collaboration similar to expert consultation, and improves the report quality in complex medical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182887A_ABST
    Figure CN123182887A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and provides a physical examination report generation method and device, electronic equipment and a storage medium. The physical examination report generation method comprises the following steps: obtaining physical examination data to be processed; distributing the physical examination data to a plurality of first expert agents, receiving a sub-report of each examination item returned by the plurality of first expert agents; performing quality evaluation on the sub-report, determining a report state of the sub-report based on the quality evaluation result; wherein the report state comprises a qualified state and an unqualified state; based on the report state, optimizing the sub-report in the unqualified state by a corresponding second expert agent to update the report state, and when a preset termination condition is met, generating a physical examination report based on the sub-report reaching the qualified state. The application can intelligently generate a physical examination report, and improves the generation efficiency and accuracy of the physical examination report.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, electronic device and storage medium for generating physical examination reports. Background Technology

[0002] A hospital physical examination report is a written report issued by a medical institution based on a comprehensive analysis of the examinee's various examination results. It is used to assess health status and identify potential diseases or health risks. A physical examination report typically includes basic examinations (height, weight, blood pressure, pulse), laboratory tests (complete blood count, urinalysis, liver function, kidney function, blood glucose, and blood lipids), imaging examinations (chest X-ray, ultrasound, electrocardiogram), and specialist examinations (ophthalmological, dental, gynecological / urological examinations). Some advanced physical examinations may include tumor marker screening, bone density testing, and CT / MRI (Computed Tomography / Magnetic Resonance Imaging) scans.

[0003] Currently, the generation of hospital physical examination reports still relies heavily on manual labor. Most hospitals require doctors to interpret each examination result and make a diagnosis, while also writing an overall summary of the report and health management recommendations. Although some physical examination report generation systems have been put into use, they generally adopt a fixed pipeline-style processing approach, unable to dynamically adjust the workflow according to the complexity of the task. When faced with complex scenarios such as interpreting conflicting indicators or generating personalized suggestions, these systems have limited performance, and the reliability and interpretability of the generated results are insufficient.

[0004] Therefore, how to build an automated hospital physical examination report generation system to intelligently generate physical examination reports and improve the efficiency and accuracy of report generation has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and storage medium for generating physical examination reports, which are used to intelligently generate physical examination reports and improve the efficiency and accuracy of physical examination report generation.

[0006] In a first aspect, embodiments of this application provide a method for generating a physical examination report, including: Acquire physical examination data to be processed; The physical examination data is distributed to multiple corresponding first expert intelligent agents, and sub-reports of each examination item are received from the multiple first expert intelligent agents. The sub-report is subjected to a quality assessment, and the report status of the sub-report is determined based on the quality assessment results; wherein, the report status includes a qualified status and an unqualified status; Based on the report status, the corresponding second expert agent optimizes the sub-reports that are in an unqualified state to update the report status. When the preset termination condition is met, a physical examination report is generated based on the sub-reports that have reached the qualified state.

[0007] In one embodiment, the non-compliant status includes at least one of the following: empty report status, format-only abnormal status, content-only abnormal status, and both content and format abnormal status. Based on the report status, the process of optimizing sub-reports in an unqualified state through the corresponding second expert agent to update the report status includes: By scheduling the intelligent agent, based on the report status, the task to be executed by the second expert intelligent agent is determined; wherein, the task to be executed includes at least one of the following: report generation task, format optimization task, content optimization task, and joint format and content optimization task; The scheduling agent sends the task to be executed to the second expert agent to schedule the second expert agent to optimize the sub-reports that are in an unqualified state. Obtain the optimized sub-report returned by the second expert agent, and update the report status based on the optimized sub-report.

[0008] In one embodiment, the optimized sub-report is generated as follows: The second expert agent determines the target optimization prompt words based on the task to be executed; The second expert agent inputs the target optimization prompt into the inspection and verification multimodal large model to obtain the optimized sub-report output by the inspection and verification multimodal large model.

[0009] In one embodiment, determining the target optimization prompt words based on the task to be performed by the second expert agent includes: If the task to be executed is a report generation task, the second expert agent determines the first target optimization prompt word based on the task to be executed; If the task to be executed is a format optimization task, the second expert agent obtains a predefined format template, and determines the second target optimization prompt word based on the predefined format template, the task to be executed, and the sub-report in the unqualified state; If the task to be executed is a content optimization task, the second expert agent obtains reference guidelines related to the sub-report in the substandard state from the vector database, and determines the third target optimization prompt words based on the reference guidelines, the task to be executed, and the sub-report in the substandard state. If the task to be executed is a joint optimization task of format and content, the second expert agent obtains reference guidelines related to the sub-report in the non-compliant state from the vector database and obtains a predefined format template; based on the reference guidelines, the predefined format template, the task to be executed and the sub-report in the non-compliant state, the fourth target optimization prompt word is determined; The target optimization prompt word includes at least one of the first target optimization prompt word, the second target optimization prompt word, the third target optimization prompt word, and the fourth target optimization prompt word.

[0010] In one embodiment, obtaining reference guidelines related to the sub-report in the non-compliant state from the vector database through the second expert agent includes: The second expert agent extracts a query vector based on the sub-report that is in an unqualified state. Calculate the semantic similarity between the query vector and each text block vector in the vector database, and determine a candidate text block set based on the semantic similarity; The target text block is determined based on the weight ranking of each text block in the candidate text block set; Based on the target text block, obtain the reference guide.

[0011] In one embodiment, the method for generating a medical examination report further includes: Obtain the medical document to be processed, and extract the text content from the medical document to be processed; The text content is divided into blocks to obtain multiple text blocks; Determine the hierarchical labels of each text block and calculate the weight of each text block; Extract the text block vectors of each text block, and associate the text block vectors with the corresponding level labels and weights and store them in the vector database.

[0012] In one embodiment, the method for generating a medical examination report further includes: Obtain a first training sample set, a second training sample set, and a third training sample set, wherein the first training sample set includes first multimodal sample health check data and its question-answer pairs, the second training sample set includes second multimodal sample health check data and chain thinking data, and the third training sample set includes third multimodal sample health check data, query instructions, and reference response data; With the parameters of the visual encoding module and the language generation module fixed in the initial multimodal large model, modal alignment training is performed on the initial multimodal large model based on the first training sample set to obtain the first intermediate multimodal large model; The parameters of the visual encoding module in the first intermediate multimodal large model are fixed, and the first intermediate multimodal large model is trained with instructions based on the second training sample set to obtain the second intermediate multimodal large model; Based on the third training sample set, reinforcement learning is performed on the second intermediate multimodal large model to obtain the inspection and verification multimodal large model.

[0013] In one embodiment, the step of training the second intermediate multimodal large model using reinforcement learning based on the third training sample set to obtain the inspection and verification multimodal large model includes: The third multimodal sample physical examination data and the query command are input into the second intermediate multimodal large model to obtain the predicted response data output by the second intermediate multimodal large model; The total reward value is determined based on the predicted response data and the reference response data; The parameters of the visual encoding module, language generation module, and modality fusion unit in the second intermediate multimodal large model are updated according to the total reward value, and iterative training is performed until the preset iteration stopping condition is reached to obtain the inspection and verification multimodal large model.

[0014] In one embodiment, determining the total reward value based on the predicted response data and the reference response data includes: The predicted response data is checked to see if it conforms to a predefined format requirement in order to determine the format reward value; The system detects whether the predicted response data includes predefined required content in order to determine the integrity reward value. Detect the semantic similarity, professionalism, and / or logical coherence between the predicted response data and the reference response data to determine the accuracy reward value; Detect the logical correlation between the predictive thinking process data and the predictive report conclusions in the predictive response data to determine the correlation reward value; The total reward value is determined based on the format reward value, the completeness reward value, the accuracy reward value, and the relevance reward value.

[0015] In one embodiment, detecting the semantic similarity, professionalism, and / or logical coherence between the predicted response data and the reference response data to determine an accuracy reward value includes: The predicted response data and the reference response data are input into the evaluation model to perform a professionalism and / or logical coherence evaluation, and the first score output by the evaluation model is obtained. Calculate the semantic similarity between the predicted response data and the reference response data to determine the second score; The first score and the second score are weighted and summed to obtain the weighted score. The accuracy reward value is determined based on the weighted score and the first preset threshold range.

[0016] In one embodiment, the step of performing a quality assessment on the sub-report and determining the report status of the sub-report based on the quality assessment results includes: The arbitration agent determines the target evaluation prompt words based on the sub-reports and predefined format templates. The arbitration agent inputs the target evaluation prompts into the report evaluation model to evaluate the quality of the sub-report and obtain the quality evaluation results; wherein the dimensions of the quality evaluation include at least one of format standardization, result correctness and output consistency. Based on the quality assessment results, the report status is determined.

[0017] Secondly, embodiments of this application provide a medical examination report generation device, comprising: The data acquisition module is used to acquire physical examination data to be processed. The sub-report acquisition module is used to distribute the physical examination data to multiple corresponding first expert intelligent agents and receive sub-reports of each examination item returned by the multiple first expert intelligent agents. The report status assessment module is used to perform quality assessment on the sub-report and determine the report status of the sub-report based on the quality assessment results; wherein, the report status includes a qualified status and an unqualified status; The physical examination report generation module is used to optimize sub-reports that are in an unqualified state based on the report status, through the corresponding second expert intelligent agent, so as to update the report status. When the preset termination conditions are met, a physical examination report is generated based on the sub-reports that have reached the qualified state.

[0018] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the physical examination report generation method described in the first aspect.

[0019] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the physical examination report generation method described in the first aspect.

[0020] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the physical examination report generation method described in the first aspect.

[0021] The physical examination report generation method, apparatus, electronic device, and storage medium provided in this application first acquire the physical examination data to be processed. Then, the physical examination data is distributed to multiple corresponding first expert agents to generate sub-reports for each examination item in parallel through multiple first expert agents, replacing the traditional process of manual interpretation and writing, significantly improving report generation efficiency and reducing labor costs. Next, the sub-reports are quality-assessed, and the report status of the sub-reports is determined based on the quality assessment results, where the report status includes a qualified status and an unqualified status. Then, based on the report status, the corresponding second expert agent optimizes the sub-reports in the unqualified status to update the report status. When a preset termination condition is met, a physical examination report is generated based on the sub-reports that have reached the qualified status. Through this adaptive cyclical argumentation mechanism of "quality assessment-status update-scheduling optimization", a rigorous quality control closed loop is constructed, realizing an intelligent collaborative mechanism similar to expert consultation, thereby significantly improving the quality of physical examination report generation in complex medical scenarios. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is one of the flowcharts illustrating the method for generating a physical examination report provided in this application embodiment.

[0024] Figure 2 This is a schematic diagram of a general detection sub-report provided in an embodiment of this application.

[0025] Figure 3 This is a schematic diagram of a medical examination report provided in an embodiment of this application.

[0026] Figure 4 This is the second flowchart of the method for generating a physical examination report provided in the embodiments of this application.

[0027] Figure 5 This is a schematic diagram of multi-wheel report optimization provided in an embodiment of this application.

[0028] Figure 6 This is the third flowchart of the method for generating a physical examination report provided in this application embodiment.

[0029] Figure 7 This is the fourth flowchart of the method for generating a physical examination report provided in the embodiments of this application.

[0030] Figure 8This is an example of the second training sample data provided in the embodiments of this application.

[0031] Figure 9 This is a schematic diagram of the structure of the physical examination report generation device provided in the embodiments of this application.

[0032] Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] This application discloses a method, apparatus, electronic device, and storage medium for generating physical examination reports, which are described below in conjunction with... Figures 1-10 Describe it.

[0035] Figure 1 This is one of the flowcharts illustrating the method for generating a physical examination report provided in this application embodiment, such as... Figure 1 As shown, the method for generating the physical examination report includes steps S110, S120, S130, and S140.

[0036] Step S110: Obtain the physical examination data to be processed.

[0037] Physical examination data refers to the original examination and test results data from various business systems of medical institutions. For example, the values ​​and reference ranges of various indicators in blood tests, and the measurement parameters of ultrasound examinations.

[0038] Physical examination data generally includes the following examination items: general examination, internal medicine examination, surgical examination, ophthalmological examination, ENT examination, oral examination, ultrasound examination, general radiological examination, blood test, and urine test.

[0039] First, the examinee's physical examination data is obtained from various business systems of the medical institution. The physical examination data includes, but is not limited to: general examination data (such as height, weight, blood pressure, etc.) and internal and surgical examination data obtained from the Hospital Information System (HIS); blood test data and urine test data obtained from the Laboratory Information System (LIS); and ultrasound images, X-ray images and measurement parameters obtained from the Picture Archiving and Communication System (PACS).

[0040] Step S120: Distribute the physical examination data to multiple corresponding first expert intelligent agents, and receive sub-reports of each examination item returned by the multiple first expert intelligent agents.

[0041] The examination items corresponding to the physical examination data are determined. Then, the physical examination data corresponding to each examination item is distributed to multiple expert agents, which are referred to as the first expert agent.

[0042] Corresponding to the examination items, the first expert intelligent agent may include: general examination intelligent agent, internal medicine examination intelligent agent, surgical examination intelligent agent, ophthalmology examination intelligent agent, otolaryngology examination intelligent agent, oral examination intelligent agent, ultrasound examination intelligent agent, general radiology examination intelligent agent, blood test intelligent agent, and urine test intelligent agent.

[0043] When distributing physical examination data, general examination data is distributed to the general examination intelligent agent, internal medicine examination data is distributed to the internal medicine examination intelligent agent, blood test data is distributed to the blood test intelligent agent, and so on.

[0044] In one implementation, the distribution of physical examination data can be achieved through a scheduling agent or scheduling module.

[0045] After receiving the corresponding physical examination data, each first expert intelligent agent generates a corresponding sub-report based on a predefined format template and the backend big model.

[0046] Furthermore, the backend large model can be a pre-trained, inspected, and validated multimodal large model, or it can be an existing pre-trained multimodal large model.

[0047] For example, the blood test agent constructs report generation prompts based on blood test data (including the values ​​of various indicators, reference ranges, abnormality indicators, etc.) and predefined format templates, and then inputs them into the multimodal large-scale inspection and testing model to generate sub-reports through the multimodal large-scale inspection and testing model, thereby obtaining the blood test sub-report output by the multimodal large-scale inspection and testing model.

[0048] It should be noted that the sub-reports between the first expert agents are generated in parallel, that is, multiple expert agents can work at the same time and independently complete the initial generation of sub-reports to improve the efficiency of the overall physical examination report generation.

[0049] Step S130: Perform a quality assessment on the sub-report and determine the report status of the sub-report based on the quality assessment results; wherein, the report status includes a qualified status and an unqualified status.

[0050] Perform a quality assessment on each sub-report and determine the report status of each sub-report based on the quality assessment results.

[0051] The report status includes a qualified status and an unqualified status. A qualified status indicates that the sub-report meets the output requirements and no further optimization is needed; an unqualified status indicates that the sub-report has problems in terms of format and / or content and requires further optimization.

[0052] Furthermore, the quality assessment results may also include the reasons for nonconformity, which refers to the specific reasons for determining a nonconformity.

[0053] In one implementation, the evaluation process can be carried out by an arbitration agent or an evaluation module.

[0054] Furthermore, the arbitration agent / evaluation module and the expert agent are logically and operationally independent of each other. By introducing an independent evaluator (i.e., the arbitration agent / evaluation module) to review the sub-reports, the objectivity and accuracy of the evaluation can be improved.

[0055] Step S140: Based on the report status, the corresponding second expert agent optimizes the sub-reports that are in an unqualified state to update the report status. When the preset termination condition is met, a physical examination report is generated based on the sub-reports that have reached the qualified state.

[0056] Based on the report status, the corresponding second expert agent performs iterative optimization and quality assessment on the sub-reports that are in an unqualified state in order to update the report status.

[0057] Specifically, it determines whether all report statuses are in a qualified state and whether the current preset termination condition is met. If there is a sub-report in an unqualified state and the current preset termination condition is not met, the expert agent corresponding to the sub-report in an unqualified state (denoted as the second expert agent) is further invoked. The second expert agent optimizes the sub-report in an unqualified state and then performs a quality assessment step to evaluate the quality of the optimized sub-report in order to update the report status.

[0058] If, after the update, there are still unqualified sub-reports and the preset termination conditions are not met, the optimization and quality assessment steps will continue to be repeated. When the preset termination conditions are met, a physical examination report will be generated based on the sub-reports that have reached the qualified state.

[0059] It should be noted that during the entire optimization and quality assessment process, the second expert agent is partly or entirely the first expert agent. That is, the expert agent corresponding to each inspection item is responsible for both the initial generation and optimization of the sub-report. For example, if the blood test agent generates a sub-report in the first round but fails the quality assessment and is deemed unqualified, it will still be optimized by that same agent in subsequent rounds of evaluation, rather than being handed over to another agent. This approach ensures that each expert agent accumulates understanding and contextual information about its generated content through multiple rounds of evaluation, achieving more accurate optimization. Furthermore, the optimization is incremental, based on the existing output, rather than regenerating from scratch.

[0060] Furthermore, the preset termination conditions include at least one of the following two conditions: (1) All sub-reports have reached the qualified status. After a round of evaluation, when it is determined that all sub-reports have reached the qualified status, it means that all sub-reports have met the quality requirements in terms of format, content and coherence, and no further optimization is needed. At this time, the cyclical argumentation naturally ends and enters the report summary stage. (2) The current argumentation round reaches the preset maximum argumentation round. The preset maximum argumentation round is the upper limit guarantee mechanism for the cyclical argumentation process. When the current argumentation round reaches the preset maximum argumentation round, regardless of whether there are still sub-reports in an unqualified state, the cyclical argumentation process is forcibly terminated and enters the report summary stage.

[0061] In one implementation, the maximum number of argumentation rounds is preset to 5 rounds. Of course, the specific value of the maximum number of argumentation rounds can be adjusted according to the needs of the actual application scenario, and is not limited to a setting of 5 rounds.

[0062] When the preset termination conditions are met, a medical examination report is generated by summarizing the sub-reports that have reached the qualified status.

[0063] Furthermore, if there are still sub-reports in an unqualified state when the preset termination conditions are met, their corresponding specialist sub-reports will be set to empty, will not participate in the generation of the physical examination report, and a human expert will be prompted to intervene.

[0064] Furthermore, the sub-report should at least include the examination results and diagnosis, and may also include terminology explanation, sub-report summary, and sub-report recommendations. The examination results are derived from physical examination data; the sub-report summary includes, but is not limited to, abnormal indicators and risk warnings; the sub-report recommendations include, but are not limited to, recommendations for seeking medical attention, dietary recommendations, and exercise recommendations. An example diagram of a typical testing sub-report is shown below. Figure 2 As shown.

[0065] Furthermore, when generating the physical examination report, the terminology interpretations, summaries, and recommendations of each sub-report can be compiled separately to obtain medical terminology interpretations, report conclusions, and recommendations. These are then filled into a predefined physical examination report template, and the examination data and diagnoses of each sub-report are summarized according to the sub-report order in the predefined template. For example, a schematic diagram of each element of the sub-report in the physical examination report is shown below. Figure 3 As shown. Figure 3 In the physical examination report, the report conclusions and recommendations are presented first, followed by the various sub-reports, such as general examination, internal medicine, surgery, and chest CT, and finally, the interpretation of medical terms is presented.

[0066] Furthermore, when generating a summary medical examination report, additional information can be added to the beginning and end of the report, such as the examinee's name, examination date, report number, and the hospital where the examination was conducted.

[0067] In one implementation, the process of generating a medical examination report can be achieved by scheduling an intelligent agent or a scheduling module.

[0068] The physical examination report generation method provided in this application first acquires the physical examination data to be processed. Then, the physical examination data is distributed to multiple corresponding first expert agents to generate sub-reports for each examination item in parallel through multiple first expert agents, replacing the traditional process of manual interpretation and writing, significantly improving report generation efficiency and reducing labor costs. Next, the sub-reports are quality-assessed, and the report status of the sub-reports is determined based on the quality assessment results. The report status includes qualified and unqualified status. Then, based on the report status, the corresponding second expert agent optimizes the sub-reports in the unqualified status to update the report status. When a preset termination condition is met, a physical examination report is generated based on the sub-reports that have reached the qualified status. Through this adaptive cyclical argumentation mechanism of "quality assessment-status update-scheduling optimization", a rigorous quality control closed loop is constructed, realizing an intelligent collaboration mechanism similar to expert consultation, thereby significantly improving the quality of physical examination report generation in complex medical scenarios.

[0069] Based on any of the above embodiments, the non-compliant state includes at least one of the following: empty report state, format-only abnormal state, content-only abnormal state, and both content and format abnormal state. Figure 4 This is a second flowchart illustrating the method for generating a medical examination report provided in this application embodiment, as shown below. Figure 4 As shown, the step "based on the report status, optimize the sub-report in the unqualified state through the corresponding second expert agent to update the report status" includes: steps S141, S142 and S143.

[0070] Step S141: By scheduling the intelligent agent, based on the report status, determine the task to be executed by the second expert intelligent agent; wherein the task to be executed includes at least one of the following: report generation task, format optimization task, content optimization task, and joint format and content optimization task.

[0071] Predefine the report status of sub-reports, including but not limited to: empty report status (EMPTY), format-only error status (FORMAT), content-only error status (CONTENT), both content and format error status (CONTENT&FORMAT), and completed status (COMPLETE).

[0072] The completed status is the qualified status; the empty report status, the format-only abnormal status, the content-only abnormal status, and the content and format-only abnormal status are all unqualified statuses.

[0073] By scheduling the intelligent agent and determining the tasks to be executed by the second expert intelligent agent based on the reported state, the task is determined.

[0074] If the report status is empty (EMPTY), the task to be executed is a report generation task; if the report status is format-only (FORMAT), the task to be executed is a format optimization task; if the report status is content-only (CONTENT), the task to be executed is a content optimization task; if the report status is both content and format-only (CONTENT&FORMAT), the task to be executed is a combined format and content optimization task.

[0075] In one implementation, determining the task to be executed based on the report status can be achieved through a prompting model. Specifically, task allocation prompts are generated based on the report status of each sub-report, and these prompts are input into the task allocation model to obtain the task to be executed output by the model. The task allocation model can be a large language model, such as DEEPSEEK-R1 (DeepExploration-First Generation Inference Model), or it can be a multimodal large model for checking and verifying.

[0076] For example, the task assignment prompt is as follows: system: You are a scheduler in the process of generating a medical examination report.

[0077] User: You need to coordinate with expert agents and plan their next steps, which include the following five tasks: [Report generation task, format optimization task, content optimization task, combined format and content optimization task, stop generation].

[0078] These five tasks correspond to the following five report statuses: [EMPTY,FORMAT,CONTENT,CONTENT&FORMAT,COMPLETE].

[0079] The current report status of each sub-report is as follows: Blood test report: FORMAT; Urine test report: CONTENT; Internal and surgical report: COMPLETE; Oral report: FORMAT; ENT report: COMPLETE; Ophthalmology report: COMPLETE.

[0080] Please assign tasks to each expert agent based on the current report status of each sub-report. The output JSON format is as follows: {“Expert Agent 1”: Task 1;} "Expert Agent 2": Task 2; ...}

[0081] Step S142: The scheduling agent sends the task to be executed to the second expert agent to schedule the second expert agent to optimize the sub-reports that are in an unqualified state.

[0082] Then, by scheduling the intelligent agent, a task to be executed is sent to the second expert intelligent agent corresponding to the sub-report that is in a substandard state, so as to schedule the second expert intelligent agent to optimize the sub-report that is in a substandard state.

[0083] Specifically, a second expert agent determines target optimization prompts based on the task to be executed and the sub-reports in an unqualified state. Then, the second expert agent inputs the target optimization prompts into the multimodal inspection and verification model to obtain the optimized sub-reports output by the model. The specific execution process can be found in the following embodiment, and will not be elaborated here.

[0084] Furthermore, while sending the task to be executed to the second expert agent through the scheduling agent, reasons for non-compliance can also be sent simultaneously. Upon receiving the task and the aforementioned reasons for non-compliance, the second expert agent, in conjunction with the sub-report currently in a non-compliant state, executes the corresponding optimization operation. By sending reasons for non-compliance, a clear optimization direction and correction basis are provided to the expert agent, enabling it to perform targeted optimization with evidence, thereby further improving the optimization efficiency of each round of argumentation.

[0085] Step S143: Obtain the optimized sub-report returned by the second expert agent, and update the report status based on the optimized sub-report.

[0086] Obtain the optimized sub-report returned by the second expert agent, evaluate the optimized sub-report, and update the report status.

[0087] For example, such as Figure 5 As shown, after generating the first round of sub-reports, formatting issues were found in the urine test report, while content issues were found in the blood test and chest X-ray reports. Therefore, pending tasks were sent to the urine test agent, blood test agent, and radiology agent to schedule these agents to optimize the sub-reports and generate the second round of sub-reports. In the second round of sub-reports, the optimized urine test and chest X-ray reports were acceptable, but the blood test report still had formatting issues. Therefore, a pending task was sent to the blood test agent to schedule it to optimize the sub-reports and generate the third round of reports. In the third round of reports, the optimized blood test report was acceptable, and optimization stopped.

[0088] The physical examination report generation method provided in this application classifies unqualified states in a fine-grained manner, and then assigns targeted optimization tasks to the expert agent. This enables the expert agent to adopt differentiated optimization methods for different types of quality problems during the iterative argumentation process, avoiding unnecessary regeneration of qualified parts, reducing computational resource consumption, and improving the efficiency and effectiveness of each round of optimization.

[0089] Based on any of the above embodiments, the optimized sub-report is generated through the following steps S1421 and S1422.

[0090] Step S1421: The second expert agent determines the target optimization prompt words based on the task to be executed.

[0091] The second expert agent determines the optimized prompt word template based on the task to be executed, and then obtains the prompt word based on the physical examination data and / or the sub-reports that are in an unqualified state, as well as the optimized prompt word template. This prompt word is recorded as the target optimized prompt word.

[0092] Step S1422: The target optimization prompt is input into the inspection and verification multimodal large model through the second expert agent, and the optimized sub-report output by the inspection and verification multimodal large model is obtained.

[0093] The second expert agent inputs the target optimization prompts into the inspection and verification multimodal big data model, so that the report is optimized by the inspection and verification multimodal big data model, and the optimized sub-report output by the inspection and verification multimodal big data model is obtained.

[0094] It should be noted that for expert agents involved in medical imaging examinations (such as chest X-ray agents), the target optimization prompts must also include the input of image data. The multimodal large model for examination and testing can simultaneously process textual and image information, generating or optimizing sub-reports containing image diagnostic conclusions based on the visual features of the images and the context of the text descriptions.

[0095] To test and validate multimodal large models, one can directly choose general models, such as closed-source GPT-4o (Generative Pre-trained Transformer-4 Omni), Gemini Ultra, and Claude 3 Opus. However, considering that closed-source multimodal large models cannot be deployed locally and data needs to be uploaded to the cloud, they are not suitable for medical report generation scenarios. Meanwhile, open-source multimodal large models, in their basic capabilities in healthcare, especially report generation, cannot meet the needs of real-world scenarios. Therefore, open-source general knowledge models, such as Qwen2.5-VL-72B-Instruct (Qwen2.5 Visual Language Model - 72 Billion Parameters - Instruction Version) or Qwen2.5-VL-32B-Instruct (Qwen2.5 Visual Language Model - 32 Billion Parameters - Instruction Version), can be used as the initial multimodal large model. Using the first, second, and third sample training sets, the initial multimodal large model can be sequentially trained through modality alignment, instruction training, and reinforcement learning to obtain the check and verification multimodal large model. The specific training set construction and training process can be found in the following embodiments, and will not be elaborated here.

[0096] It should be noted that in this embodiment, the expert agent does not directly perform report generation and optimization operations. Instead, it guides and instructs the underlying multimodal inspection and verification model to complete the specific generation and optimization work by constructing target optimization prompts. The core function of the expert agent is to intelligently organize and construct prompts, thereby ensuring that the underlying multimodal inspection and verification model can obtain sufficient and accurate guidance information.

[0097] In addition, expert agents can also adopt a large-scale model collaboration strategy: for simple tasks with a high degree of standardization (such as comparing the range of abnormal indicators), a lightweight model can be used to complete the task quickly; for tasks that require complex reasoning (such as image reading and comprehensive analysis), a large multimodal model can be called to handle the task.

[0098] The medical examination report generation method provided in this application separates task understanding from task execution by constructing prompt words through an expert agent and combining this with the task execution mode of a large model. The expert agent is responsible for transforming complex optimization requirements into structured instructions that the large model can understand, while the large model is responsible for executing specific sub-report generation and optimization tasks. Through this mode, the system can fully utilize the language understanding and generation capabilities of the large model, while fine-grained control of the prompt words constrains the output quality and scope, reducing the uncertainty of the content generated by the large model. Furthermore, the construction of the expert agent does not require training an independent model for each examination item; only differentiated prompt words need to be designed to quickly expand to new examination items, significantly reducing the cost and cycle time of system expansion.

[0099] Based on any of the above embodiments, step S1421 includes: step S14211, step S14212, step S14213 and step S14214.

[0100] The execution order of steps S14211, S14212, S14213 and S14214 is not important.

[0101] Step S14211: If the task to be executed is a report generation task, the second expert agent determines the first target optimization prompt word based on the task to be executed.

[0102] If the task to be executed is a report generation task, i.e., the report status is empty, since there is no sub-report base version available for optimization, the second expert agent directly determines the target optimization suggestion word based on the physical examination data and the task to be executed. This first target optimization suggestion word is recorded instead of calling RAG (Retrieval-Augmented Generation). This is because an empty report status is usually caused by problems in the generation process itself (such as input data parsing failure), and introducing external retrieval information may increase the complexity of the suggestion word, affecting the success rate of the first generation.

[0103] For example, taking a chest X-ray report as an example, if the task to be performed is a report generation task, that is, the report status is an empty report status, the first target optimization prompt can be set as follows: system: You are a chest X-ray report expert with professional medical knowledge.

[0104] user: The chest X-ray report is currently in an empty report state. Please output a chest X-ray reading report based on the patient's chest X-ray.

[0105] Enter the examination results directly. For other information, please refer to the examination results to generate a chest X-ray report in the specified format. Please output the report in the following JSON format: {"Inspection Results": {xxx},} "Examination and Diagnosis": {xxx} “Abnormal Indicators”: {xxx} Health advice: {xxx} Terminology Explanation: {xxx} }

[0106] It should be noted that the above-mentioned first objective optimization prompt words... Chest X-ray images can be inserted here.

[0107] Step S14212: If the task to be executed is a format optimization task, the second expert agent obtains a predefined format template, and determines a second target optimization prompt word based on the predefined format template, the task to be executed, and the sub-report in the unqualified state.

[0108] If the task to be executed is a format optimization task, that is, when the report status is only in the format abnormality state, the second expert agent obtains the predefined format template, and based on the predefined format template, the task to be executed and the sub-report in the unqualified state, determines the target optimization prompt word, which is recorded as the second target optimization prompt word.

[0109] Among them, the predefined format template is a standard report output structure pre-designed for each inspection item, including specifications such as the name, order, and data presentation method of each field, which can be determined based on the predefined sub-report template. For example, Figure 2 The general examination sub-report shown has a predefined format template that includes the arrangement specifications for fields such as examination items, examination data, examination diagnosis, abnormal indicators, terminology interpretation, and health advice.

[0110] For example, taking a chest X-ray report as an example, if the task to be performed is a format optimization task, that is, the report status is only in the format anomaly state, the second target optimization prompt words can be set as follows: system: You are a chest X-ray report expert with professional medical knowledge.

[0111] user: The current chest X-ray report is in a formatting error only state. Please output an optimized chest X-ray report based on the patient's chest X-ray and the current chest X-ray sub-report.

[0112] The current chest X-ray report is as follows: {"Examination Results": Chest X-ray showed enlargement of the left hilum; a right parabronchial mass; and enlarged lymph nodes} "Diagnosis": {Primary pulmonary tuberculosis} "Abnormal indicators": {Primary pulmonary tuberculosis} Terminology Explanation: {xxx} }; Enter the examination results directly. For other information, please refer to the examination results to generate a chest X-ray report in the specified format. Please output the report in the following JSON format: {"Inspection Results": {xxx},} "Examination and Diagnosis": {xxx} “Abnormal Indicators”: {xxx} Health advice: {xxx} Terminology Explanation: {xxx} }

[0113] Step S14213: If the task to be executed is a content optimization task, the second expert agent obtains reference guidelines related to the sub-report in the non-compliant state from the vector database, and determines the third target optimization prompt words based on the reference guidelines, the task to be executed, and the sub-report in the non-compliant state.

[0114] Reference guidelines refer to professional instructions retrieved from authoritative knowledge bases (i.e., vector databases). Injecting these guidelines into the prompts of large models can effectively provide correct factual basis for large models and correct content errors.

[0115] If the task to be performed is a content optimization task, i.e., the report status is only in the content abnormality state, since content abnormality is often an illusion of the large model or a lack of knowledge, by retrieving relevant professional reference guidelines from the authoritative knowledge base and injecting optimization prompt words, the large model can be effectively provided with correct factual basis and the content error can be corrected. Therefore, through the second expert agent, reference guidelines related to the sub-report in the non-compliant state are obtained from the vector database, and based on the reference guidelines, the task to be performed, and the sub-report in the non-compliant state, the target optimization prompt words are determined and denoted as the third target optimization prompt words.

[0116] For example, taking a chest X-ray report as an example, if the task to be performed is a content optimization task, that is, the report status is only an anomaly in terms of content, the third target optimization prompt words can be set as follows: system: You are a chest X-ray report expert with professional medical knowledge.

[0117] user: The current chest X-ray report is in an abnormal content state. Please output an optimized chest X-ray report based on the patient's chest X-ray and the current chest X-ray report.

[0118] The current chest X-ray report is as follows: {"Examination Results": Chest X-ray showed enlargement of the left hilum, a parabronchial mass on the right side, and enlarged lymph nodes} "Diagnosis": {Primary pulmonary tuberculosis} "Abnormal indicators": {Primary pulmonary tuberculosis} Terminology Explanation: {xxx} }; Reference Guide: The chest radiographic features of primary pulmonary tuberculosis typically include unilateral hilar or mediastinal lymphadenopathy, with or without parenchymal infiltration. The typical presentation is the primary syndrome's "triad": primary lesion (mostly located in the peripheral lung), lymphangitis (linear shadows), and hilar lymphadenopathy. Significantly enlarged hilar lymph nodes are common in children but relatively rare in adults. Segmental atelectasis in the middle or lower lobe may be seen in some cases. Calcified lymph nodes suggest old infection. It should be noted that the chest radiographic findings of primary pulmonary tuberculosis may be atypical, especially in immunocompromised patients. Diagnosis requires a comprehensive assessment combining clinical manifestations, PPD (Purified Protein Derivative) or gamma-interferon release tests, and sputum acid-fast staining.

[0119] Enter the examination results directly. For other information, please refer to the examination results and the retrieved reference guidelines to generate a chest X-ray report in the specified format. Please output the report in the following JSON format: {"Inspection Results": {xxx},} "Examination and Diagnosis": {xxx} “Abnormal Indicators”: {xxx} Health advice: {xxx} Terminology Explanation: {xxx} }

[0120] Step S14214: If the task to be executed is a joint optimization task of format and content, the second expert agent obtains a reference guide related to the sub-report in the non-compliant state from the vector database and obtains a predefined format template; based on the reference guide, the predefined format template, the task to be executed and the sub-report in the non-compliant state, the fourth target optimization prompt word is determined.

[0121] The target optimization prompt word includes at least one of the first target optimization prompt word, the second target optimization prompt word, the third target optimization prompt word, and the fourth target optimization prompt word.

[0122] If the task to be performed is a joint optimization task of format and content, that is, when the report status is abnormal in both content and format, the second expert agent obtains the reference guide related to the sub-report in the non-compliant state from the vector database, and obtains the predefined format template. Then, based on the reference guide, the predefined format template, the task to be performed, and the sub-report in the non-compliant state, the target optimization prompt word is determined and recorded as the fourth target optimization prompt word.

[0123] The method for setting the fourth objective optimization prompts can refer to the settings for the second and third objective optimization prompts mentioned above.

[0124] The target optimization prompts include at least one of the following: a first target optimization prompt, a second target optimization prompt, a third target optimization prompt, and a fourth target optimization prompt.

[0125] The physical examination report generation method provided in this application uses the report status as the decision-making basis, directly determining the RAG calling strategy and the organization method of optimized prompt words according to the status rules. Compared with the traditional adaptive RAG scheme, which requires separate training of a classifier model to determine whether to perform RAG retrieval, this application eliminates the training and maintenance costs of the classifier model, while retaining the core advantage of adaptation—retrieval is only performed when external knowledge is needed. In addition, the method accurately selects the type of auxiliary information (external knowledge retrieval and / or format template) according to different types of non-compliance status, avoiding noise interference caused by introducing irrelevant information into the optimized prompt words, and improving the generation accuracy of the large model.

[0126] Based on any of the above embodiments, the step "obtaining reference guidelines related to the sub-report in the non-compliant state from the vector database through the second expert agent" includes: steps A, B, C, and D.

[0127] Step A: The second expert agent extracts a query vector based on the sub-report that is in an unqualified state.

[0128] The query vector is extracted using a second expert agent based on the sub-reports that are in an unqualified state.

[0129] In one implementation, the inspection results (derived from physical examination data) in the sub-report of the unqualified status can be extracted, and the extracted inspection results can be vectorized (encoded) to obtain a query vector.

[0130] The method for extracting query vectors is the same as that for extracting text block vectors, as can be found in the following examples.

[0131] Step B: Calculate the semantic similarity between the query vector and each text block vector in the vector database, and determine the candidate text block set based on the semantic similarity.

[0132] After extracting the query vector, a coarse recall is performed. In the coarse recall stage, semantic similarity calculation is used for recall. Specifically, the semantic similarity between the query vector and the text block vectors in the vector database is calculated, and text blocks with semantic similarity greater than a threshold are selected as the candidate text block set.

[0133] When calculating semantic similarity, cosine similarity is used as the metric. The query vector is represented by `request`. Represents a set of text blocks, where, t i Indicates the first i A text block; This represents a text block vector in a vector database, where, q i Indicates the first i A text block vector of text blocks, Represents a text block t i and text vector q i One-to-one mapping between them This is a mapping function. Correspondingly, ,in, , for The inverse operation.

[0134] During the coarse recall process, the request and response time are calculated using the following formula. Cosine similarity between : ; Based on the calculated cosine similarity , construct a set Set S is the set of semantic similarities between the request and all text block vectors; then, determine the set... Set A consists of elements in set S that have a similarity threshold greater than the threshold; then, the set is filtered to obtain the set... The set Candidate is the top k elements with the highest similarity in set A; thus, the set is determined. The set RT is the set of candidate text blocks for coarse recall.

[0135] Step C: Determine the target text block based on the weight ranking of each text block in the candidate text block set.

[0136] Considering the authority and impact factor of the text source, this application embodiment performs fine sorting on the basis of coarse recall in order to carry out weighted recall.

[0137] Since the vector database has pre-built weighted hierarchical text blocks, the weights are mainly based on the authority and influence of the text source, which can serve as a good indicator for evaluating the importance of text. Therefore, the weights of each text block in the candidate text block set can be directly obtained. Then, these text blocks are sorted. Through this precise sorting method, the 3-5 most important and authoritative text blocks are selected as the target text blocks. Let's take 3 as an example for illustration.

[0138] ; Where Retrieve represents the set of target text blocks, express The three text blocks with the highest weight in the set.

[0139] Step D: Obtain the reference guide based on the target text block.

[0140] Based on the identified target text block, obtain the reference guide.

[0141] In one implementation, multiple target text blocks are directly concatenated to obtain the parameter guide.

[0142] The medical examination report generation method provided in this application adopts a target text block search approach that combines coarse recall with fine ranking, achieving more accurate and efficient medical knowledge retrieval. Specifically, coarse recall ensures relevance based on semantic similarity, while fine ranking ensures credibility based on authority weights. The combination of these two methods results in retrieval results that are both relevant and authoritative, making it suitable for scenarios such as medical care where information reliability is paramount.

[0143] Based on any of the above embodiments Figure 6 This is the third flowchart illustrating the method for generating a physical examination report provided in this application embodiment, as shown below. Figure 6 As shown, before step S110, the method for generating a physical examination report further includes steps S11, S12, S13 and S14.

[0144] Step S11: Obtain the medical document to be processed and extract the text content from the medical document to be processed.

[0145] Medical documents to be processed refer to medical-related documents obtained from different data sources.

[0146] In one implementation, under compliant conditions, a distributed web crawler framework is used to collect medical documents to be processed from both structured and unstructured data sources. Structured data sources include, but are not limited to: various health APIs (Application Programming Interfaces), and the National Medical Products Administration's XML (Extensible Markup Language) interface; unstructured data sources include, but are not limited to: PDF (Portable Document Format) documents, such as the Sinomed (Chinese Biomedical Literature Service System) medical literature database, the Chinese Journal of Cardiovascular Diseases, the Chinese Journal of Stomatology, etc.; and NCCN (National Comprehensive Cancer Network), etc.

[0147] Then, extract the text content from the medical document to be processed.

[0148] In one implementation, for PDF documents, text content can be extracted using a dual-channel approach based on OCR (Optical Character Recognition) and a parsing library (such as PyMuPDF / pdfplumber).

[0149] In another embodiment, the medical document to be processed is input as an image into a multimodal visual language model (MVLM). The MVLM extracts the text content, and the MVLM can be Qwen2.5-VL-3B (Qwen2.5-Visual Language Model-3 billion parameters). The advantage of using a large multimodal model to extract text content is that basic text cleaning can be performed simultaneously during the extraction process, including formatting removal and patient privacy information cleanup, significantly reducing the workload of data cleaning, and the output can be in a specified format. For example, the prompts extracted from a PDF document using the MVLM are as follows: System: You are a document extraction assistant. Your job is to extract text from PDF documents according to the user's requirements.

[0150] User: Please extract the text from the image and store it as a JSON file, using the main text and tables as keys. During the extraction process, remove headers, footers, reference numbers, and patient privacy information (including name, phone number, ID number, test number, sample number, etc.). Please output in JSON format.

[0151] Step S12: Divide the text content into blocks to obtain multiple text blocks.

[0152] The text content is divided into blocks to obtain multiple text blocks.

[0153] Blocking strategies include, but are not limited to: fixed-length blocks, dynamic blocks, and hybrid blocks.

[0154] In one implementation, natural semantic boundaries in the text content are first identified, such as paragraph boundaries and chapter boundaries. If such boundaries exist in the text content, the text is segmented according to these boundaries to ensure that each text block corresponds to a complete paragraph or chapter. Then, for each segment obtained after segmentation, its character length is checked. If the length of a segment exceeds a preset threshold (e.g., 300 characters), the segment is segmented a second time. The second segmentation uses a fixed length method, with a block size of 150 characters, and slides from front to back, allowing 20 characters of overlap between blocks to maintain contextual continuity. Furthermore, if there are no natural semantic boundaries in the text content, the text is directly segmented into blocks of a fixed length (e.g., 150 characters).

[0155] By combining the advantages of natural boundary segmentation and fixed-length segmentation, the above hybrid segmentation strategy makes it less likely for content on the same topic to be fragmented, maintaining semantic integrity and facilitating subsequent tag classification and semantic retrieval. Furthermore, the extremely long segments are further divided into fixed-length segments to avoid the decrease in retrieval efficiency caused by excessively large single vectors.

[0156] Step S13: Determine the hierarchical label of each text block and calculate the weight of each text block.

[0157] Each text block is tagged to obtain the corresponding hierarchical labels for each text block.

[0158] In one implementation, the hierarchical labeling system can be designed based on the examination items. For example, hierarchical labels may include, but are not limited to: general examination, internal medicine examination, surgical examination, ophthalmological examination, ENT examination, oral examination, ultrasound examination, electrocardiogram examination, radiological examination, blood test, urine test, and others. The "other" category is designed to address situations where text blocks cannot be categorized.

[0159] In one implementation, joint labeling is performed using document titles and a large model for judgment. Specifically, the document titles corresponding to each text block are obtained, and the document titles and text block content are input into a labeling prompt template to determine the labeling prompt, which is used to guide the labeling model to classify it. The labeling model can be either DEEPSEEK-R1 or a Qwen series model. An example of a text block labeling prompt template is as follows: User: The following text is an excerpt from a guide. The guide's title is [Document Title]. Please read the text carefully and categorize the documents based on its content and meaning. The categories include Labels={General Examination, Internal Medicine Examination, Surgical Examination, Ophthalmological Examination, Otolaryngological Examination, Oral Examination, Ultrasound Examination, Electrocardiogram Examination, Radiological Examination, Blood Test, Urine Test, Other}. Please refer to the document's title and text content. The text content is as follows: [Text block content].

[0160] While labeling, the weight of each text block is calculated.

[0161] In one implementation, different weights are assigned based on the authority of the source of the medical document to be processed; the basic logic is that the more authoritative the source, the higher the score. The weight calculation method is as follows: If text block i If the medical documents to be processed originate from national ministries (such as the National Health Commission or the Ministry of Science and Technology), then... =40 points, otherwise 0 points Represents a text block i The source document is a score issued by the national ministry; if the text block i If the medical documents to be processed are published in academic journals, then... The score is the journal's impact factor (IF) score; otherwise, it is 0. Represents a text block i The IF (Impact Factor) score of the source document; if the text block i If the journal containing the medical document to be processed is in the first quartile of the Chinese Academy of Sciences (CAS) ranking, then... =10 points, Zone 2 is 8 points, Zone 3 is 4 points, Zone 4 is 2 points, otherwise it is 0 points. Represents a text block i The score of the source document in the Chinese Academy of Sciences section.

[0162] After obtaining these three scores for each text block, perform the following calculations: ; in, Represents a text block i The weight vector, where softmax() represents the normalized exponential function. , , Where N represents the total number of text blocks, j Represents the sample index, 1≤ j ≤N, and j It is a positive integer.

[0163] The weights are then calculated using the following formula: ; in, For text blocks i The weights; This represents the L2 norm (Euclidean norm). Indicates a text block i The three components of the weight vector are summed by squares. l The circular index of the component is represented by the values ​​1, 2, and 3.

[0164] Step S14: Extract the text block vector of each text block, and associate the text block vector with the corresponding level label and weight and store it in the vector database.

[0165] Extract the text block vectors of each text block, and then associate the text block vectors with the corresponding level labels and weights and store them in the vector database as an external knowledge base.

[0166] In one embodiment, each text block is vectorized (encoded) based on a pre-trained model in deep learning to obtain text block vectors. The pre-trained model can be a BGE (BAAI General Embedding) model. For the vertical domain data (i.e., medical examination reports) in this embodiment, domain-adaptive fine-tuning can be used to optimize the BGE model's representation ability within the domain, thereby improving the accuracy of subsequent vector retrieval and the system's scalability.

[0167] Furthermore, in this embodiment, regarding the selection of the vector database framework, a distributed architecture design is preferred, using ElasticSearch as the core indexing engine to achieve high throughput and low latency near nearest neighbor search. The retrieval efficiency of large-scale vector data is optimized through sharding storage and load balancing mechanisms. Simultaneously, a metadata management module is integrated to enhance the ability to query the association between vector and structured data.

[0168] The physical examination report generation method provided in this application determines the hierarchical labels of text blocks by using a hierarchical text segmentation method, calculates the weight of text blocks based on a weight allocation algorithm based on the authority of the text source, and constructs a vector database based on the hierarchical labels, weights and text block vectors. This vector database serves as an external knowledge base, which can facilitate subsequent retrieval of reference guidelines for generating sub-reports.

[0169] Based on any of the above embodiments Figure 7 This is the fourth flowchart illustrating the method for generating a physical examination report provided in this application embodiment, as follows: Figure 7As shown, before step S110, the method for generating a physical examination report further includes steps S21, S22, S23 and S24.

[0170] Step S21: Obtain a first training sample set, a second training sample set, and a third training sample set. The first training sample set includes first multimodal sample health check data and its question-answer pairs. The second training sample set includes second multimodal sample health check data and chain thinking data. The third training sample set includes third multimodal sample health check data, query instructions, and reference response data.

[0171] Obtain the first training sample set, the second training sample set, and the third training sample set.

[0172] The first training sample set is used for modality alignment training of the multimodal large model, primarily to improve its ability to recognize and understand medical image data and report-type data. The construction process of the first training sample set is as follows: First, acquire multimodal sample physical examination data, denoted as the first multimodal sample physical examination data, including medical imaging data and report data. Medical imaging data can be obtained from open-source datasets, such as the classic SLAKE (semantic annotation knowledge augmentation dataset), PathVQA (pathology visual question answering dataset), PMC-report (medical case report dataset), and PubMedVision (medical multimodal assessment dataset). Report data also has a small number of open-source datasets, such as Report_ex (example report dataset), which can be obtained from. However, considering that open-source datasets are mostly man-made data, their content and structure differ significantly from real physical examination reports. Therefore, physical examination reports from internal institutional systems can also be collected. After removing user privacy information, a large-scale image-text multimodal model can be used to extract data from the collected physical examination reports. A suitable image-text multimodal model is Qwen2.5-VL-72B-Instruct (a visual language model with 72 billion parameters and optimized instructions), as shown in the prompt below: System: You are a document extraction assistant. Your job is to extract text from image documents according to the user's requirements.

[0173] User: The image is a page from a personal medical examination report. Please extract the content from the image and output it in JSON format.

[0174] Then, question-answer pairs are constructed based on medical imaging data and report data. Considering that the classic alignment training dataset format is generally VQA (Visual Question Answering), this embodiment of the application constructs the following types of question-answer pairs according to commonly used alignment data formats, combined with test report data and business characteristics: (1) For medical imaging data, such as an abdominal CT image, the corresponding question-and-answer pairs are as follows: Question: Please describe this medical image.

[0175] Answer: This is an image of an abdominal CT scan. Specifically, it's a portion of an abdominal CT scan. The image shows a cross-section of the abdomen, revealing organs such as the liver, spleen, stomach, and intestines. The liver is on the left side of the image, exhibiting typical liver tissue density. The spleen is located below the liver, with a slightly lower density. The stomach is located in the lower center of the image, and the stomach wall structure is clearly visible. The intestines appear as darker areas, possibly due to gas or fluid filling the intestines. There is a small white structure on the left side of the image, possibly part of a kidney. There are some black structures on the right side of the image, likely gas or fluid within the intestines.

[0176] (2) For report-type data, such as a table-style liver function report image, the corresponding question-and-answer pairs are: Question: Please describe this medical image.

[0177] Answer: “E”: “7.0 kPa” Conclusion regarding fatty liver: "Fatty liver (mild)" "Liver fibrosis conclusion": "Liver stiffness value (normal)" Summary: "Fatty liver (mild), liver stiffness value (normal)" "Review Date": "2023-07-17" "Pulmonary Function Room": { "Pulmonary ventilation function test": { "Pulmonary ventilation function test": "V50, V25, and PEF (Peak Expiratory Flow) are slightly decreased. Small airway airflow is slightly restricted, and pulmonary ventilation function is slightly impaired." Summary: "V50, V25, and PEF are slightly decreased. Small airway airflow is mildly restricted, and lung ventilation function is slightly impaired." "Review Date": "2023-07-18" } }, "Laboratory Department": { "Outpatient Biochemistry 1": { "Total bilirubin": { Result: "10.40" Unit: "umol / L" "Reference range": "<23" }, "Direct bilirubin": { Result: 1.90 Unit: "umol / L" "Reference range": "<4" }, "Indirect bilirubin": { Result: 8.50 Unit: "umol / L" "Reference range": "<19" } } }

[0178] The second training set is used to train the multimodal large model using instructions, primarily to improve its logical reasoning and step-by-step thinking abilities. The construction process of the second training set is as follows: First, obtain the examination report content and conclusions. The examination report content includes the images, indicators, and corresponding values ​​of the examination; the examination report conclusions are the doctor's annotations.

[0179] In one embodiment, based on the first multimodal sample physical examination data obtained above, the examination report content (denoted as the second multimodal physical examination data) and the examination report conclusion are obtained.

[0180] In another implementation, the original multimodal image-text pair data can be obtained through a hospital system or open-source dataset. Taking a chest X-ray report as an example, the multimodal image-text pair data includes the chest X-ray image and the examination report conclusion, such as "Imaging features": the chest X-ray shows left hilar enlargement, right parabronchial mass, and enlarged lymph nodes; "Examination diagnosis": primary pulmonary tuberculosis.

[0181] Then, the text portion of the inspection report is encoded and coarsely recalled in a vector database. Next, the coarsely recalled content is finely ranked, and the text blocks corresponding to the top three weighted items are concatenated to obtain the reference guide. The specific execution process of coarse recall and fine ranking can be found in the above embodiment and will not be repeated here.

[0182] Next, instruction prompts are constructed based on the content, conclusions, and reference guidelines of the examination report. These prompts are then input into the multimodal base model, which generates thought chain data. For example, using the aforementioned chest X-ray report, the instruction prompts are as follows: user: This X-ray is a chest X-ray of a patient who has been diagnosed with COVID-19, and it contains the following information: Imaging features: Chest X-ray showed left hilar enlargement, right parabronchial mass, and enlarged lymph nodes.

[0183] The doctor's diagnosis was: primary pulmonary tuberculosis.

[0184] Relevant guidelines can be found at: XXXXXX (details omitted here).

[0185] Please refer to the image. Based on known imaging features and doctor's diagnosis, this paper presents the thought process by which the doctor arrived at this diagnosis from the image.

[0186] Furthermore, the thought process data can be obtained through the above-mentioned prompting methods, specifically: This chest X-ray shows some abnormal imaging features. Based on the examination and diagnosis, it is primary pulmonary tuberculosis. We can consider the following aspects: (1) Left hilar enlargement: Hilar enlargement usually indicates lymphadenopathy, which is a common phenomenon in tuberculosis. Hilar lymphadenopathy is an important feature of primary pulmonary tuberculosis, especially in children and adolescents. The enlargement of hilar lymph nodes may be due to a local immune response caused by tuberculosis infection, leading to lymphadenopathy and hyperplasia.

[0187] (2) Right parabronchial mass: A parabronchial mass may be connected to enlarged hilar lymph nodes or may be an independent lesion. Enlarged lymph nodes near the bronchus are also a common manifestation in tuberculosis. If the mass is located near the bronchus, it is necessary to consider whether it is lymph node enlargement caused by tuberculosis, or whether it is caused by other types of infection or tumor.

[0188] (3) Lymphadenopathy: Lymphadenopathy is an important feature of primary pulmonary tuberculosis, especially in children and adolescents. Lymphadenopathy may be due to a local immune response caused by tuberculosis infection, leading to lymph node enlargement and hyperplasia. In tuberculosis, lymphadenopathy usually manifests as hilar lymphadenopathy, but it may also occur in the peribronchial region.

[0189] (4) Diagnosis of primary pulmonary tuberculosis: Primary pulmonary tuberculosis usually occurs in children and adolescents, manifesting as hilar lymphadenopathy and nodular lesions in the lungs. Hilar lymphadenopathy is a common manifestation in tuberculosis, especially in children and adolescents. Nodular lesions in the lungs may be due to a local immune response caused by Mycobacterium tuberculosis infection, leading to inflammation and nodule formation in the lung tissue. I need to select the diagnosis from the above possibilities that most closely resembles the features in the image.

[0190] Finally, chain-thinking data is constructed based on the questions, thought process data, and examination report conclusions. Based on the examination report content (i.e., the second multimodal physical examination data) and the chain-thinking data, a second training sample set is obtained. In the above chest X-ray example, the corresponding example of the constructed COT training data (i.e., the second training sample data) is as follows: Figure 8 As shown.

[0191] The third training sample set is used for reinforcement learning training to improve the model's alignment and task adaptability. The third training sample set includes third multimodal sample health check data, query commands, and reference response data. The construction process of the third training sample set is as follows: Multimodal sample physical examination data is used as the basic data, and is then reviewed and annotated by professionals. If the reviewed modal sample physical examination data is already in a structured data format, it is designated as the third multimodal sample physical examination data. If this data is in PDF or image (e.g., PNG, JPG, BMP, etc.) format, it needs to be extracted and processed into structured data, which is then designated as the third multimodal sample physical examination data. The third multimodal sample physical examination data can be the same as or different from the first and second multimodal sample physical examination data. Furthermore, a query command is configured for each third multimodal sample physical examination data, such as "Please generate a complete physical examination report conclusion based on the above physical examination data." The annotated examination report conclusion is used as reference response data. Based on the third multimodal sample physical examination data, the query command, and the reference response data, a third training sample set is constructed.

[0192] Step S22: Fix the parameters of the visual encoding module and the language generation module in the initial multimodal large model, and perform modal alignment training on the initial multimodal large model based on the first training sample set to obtain the first intermediate multimodal large model.

[0193] For initial multimodal large models, open-source general models can be selected, such as Qwen2.5-VL-72B-Instruct and Qwen2.5-VL-32B-Instruc.

[0194] Although the initial multimodal large model has already pre-trained the modality fusion engine, due to the professional nature of medical industry data and the special nature of the physical examination report generation task, the modality fusion engine still needs to be trained again to improve its performance on specific medical tasks.

[0195] First, fix the parameters of the visual encoding module and the language generation module in the initial multimodal large model. Based on the first training sample set, perform modal alignment training on the initial multimodal large model to adjust the parameters of the modal fusion device, and obtain the multimodal large model after modal alignment training, which is denoted as the first intermediate multimodal large model.

[0196] In one implementation, an MLP (Multilayer Perceptron) is used as the basic structure of the modality fusion unit.

[0197] The purpose of alignment training is to address the semantic associations and structural consistency between different modal data (such as text, images, etc.). Its core objective is to establish a unified semantic space across modalities, enabling the model to understand and generate collaborative representations across modalities.

[0198] Step S23: Fix the parameters of the visual encoding module in the first intermediate multimodal large model, and perform instruction training on the first intermediate multimodal large model based on the second training sample set to obtain the second intermediate multimodal large model.

[0199] Then, the parameters of the visual encoding module in the first intermediate multimodal large model are fixed, and the first intermediate multimodal large model is trained with instructions based on the second training sample set to adjust the parameters of the modality fusion unit and the language generation module, so as to obtain the second intermediate multimodal large model.

[0200] By introducing structured thought chain data (i.e., the second training sample set), the model can gradually decompose the diagnosis and treatment logic and intermediate reasoning steps of report generation, thereby improving the model's performance in complex reasoning tasks.

[0201] Step S24: Based on the third training sample set, perform reinforcement learning training on the second intermediate multimodal large model to obtain the inspection and verification multimodal large model.

[0202] Based on the third training sample set, reinforcement learning is performed on the second intermediate multimodal large model to obtain the check and test multimodal large model.

[0203] Specifically, the third multimodal sample physical examination data and query command are input into the second intermediate multimodal large model to obtain the predicted response data output by the second intermediate multimodal large model; based on the predicted response data and reference response data, the total reward value is determined; the parameters of the visual encoding module, language generation module, and modality fusion unit in the second intermediate multimodal large model are updated according to the total reward value, and iterative training is performed until the preset iteration stopping condition is reached to obtain the inspection and verification multimodal large model. The specific execution process can be referred to in the following embodiment, which will not be elaborated here.

[0204] The health check report generation method provided in this application first optimizes the modality fusion processor using medical image and report data through modal alignment training, thereby improving the model's cross-modal understanding ability; then, it performs instruction training, using synthesized chain-like thinking data to enhance the model's logical reasoning and step-by-step thinking ability; finally, it uses reinforcement learning training to fine-tune the model, improving the accuracy and completeness of the generated reports. Through the above three-stage progressive training, the model can automatically generate high-quality reports based on multimodal health check data.

[0205] Based on any of the above embodiments, step S24 includes: step S241, step S242 and step S243.

[0206] Step S241: Input the third multimodal sample physical examination data and the query command into the second intermediate multimodal large model to obtain the predicted response data output by the second intermediate multimodal large model.

[0207] The physical examination data of the third multimodal sample and the query command are input into the second intermediate multimodal large model to obtain the predicted response data output by the second intermediate multimodal large model. The predicted response data includes the predicted thinking process data and the predicted report conclusion. The predicted thinking process data is the reasoning process of the model prediction, and the predicted report conclusion is the physical examination report conclusion predicted by the model.

[0208] Step S242: Determine the total reward value based on the predicted response data and the reference response data.

[0209] Based on the predicted response data and the reference response data, one or more of the following are calculated: format reward value, integrity reward value, accuracy reward value, and relevance reward value, and then the total reward value is determined.

[0210] Step S243: Update the parameters of the visual encoding module, language generation module, and modality fusion unit in the second intermediate multimodal large model according to the total reward value, and perform iterative training until the preset iteration stopping condition is reached to obtain the inspection and verification multimodal large model.

[0211] The parameters of the visual encoding module, modality fusion unit, and language generation module in the second intermediate multimodal large model are updated based on the total reward value, and iterative training is performed until the preset iteration stopping condition is reached to obtain the final check and verification multimodal large model.

[0212] Among them, the preset iteration stopping conditions include, but are not limited to: the total reward value converges, or the preset maximum number of iterations is reached.

[0213] The physical examination report generation method provided in this application introduces a reinforcement learning framework to calculate the total reward value, enabling the model to autonomously adjust the generation strategy and gradually improve its performance in tasks such as open-domain dialogue, complex reasoning, and instruction execution.

[0214] Based on any of the above embodiments, step S242 includes: step S2421, step S2422, step S2423, step S2424 and step S2425.

[0215] Step S2421: Detect whether the predicted response data meets the predefined format requirements in order to determine the format reward value.

[0216] The system checks whether the predicted response data conforms to predefined format requirements, obtains format detection results, and determines a format reward value based on these results. The format reward value aims to improve format accuracy.

[0217] During training or in query commands, prompts can be made to indicate to the model that... <think> ...< / think> The label clearly outputs the thought process, and in <answer> ...< / answer> The final answer is output in the labels, stimulating the model's logical thinking ability. The format reward mechanism aims to check whether the above labels exist in the predicted response data. That is, the predefined format requirement is that the predicted response data must contain... <think> ...< / think> Tags and <answer> ...< / answer> The tags must be correctly matched. If the format meets the predefined requirements, the format bonus is 1 point; otherwise, it is 0 points.

[0218] During detection, regular expression matching can be used, or another large model (such as an evaluation model) can be called for judgment.

[0219] Step S2422: Detect whether the predicted response data includes predefined required content in order to determine the integrity reward value.

[0220] The system checks whether the predicted response data includes predefined required content, obtains the content detection result, and determines the integrity bonus value based on this result. The integrity bonus value aims to improve the completeness of the report.

[0221] The predefined required content can be set according to the examination items. For example, a blood test report needs to include the test results, terminology explanations, health advice, and abnormal indicators. The test results also need to include the reference range for the indicators.

[0222] If the predicted response data includes predefined required content, the integrity bonus is set at 1 point; otherwise, it is 0 points.

[0223] During detection, another large model (such as an evaluation model) can be invoked for judgment.

[0224] Step S2423: Detect the semantic similarity, professionalism, and / or logical coherence between the predicted response data and the reference response data to determine the accuracy reward value.

[0225] Detect the semantic similarity, professionalism, and / or logical coherence between the predicted response data and the reference response data to determine the accuracy reward value.

[0226] In one embodiment, predicted response data and reference response data are input into an evaluation model to assess professionalism and / or logical coherence, obtaining a first score output by the evaluation model; the semantic similarity between the predicted response data and the reference response data is calculated to determine a second score; the first score and the second score are weighted and summed to obtain a weighted score; and an accuracy reward value is determined based on the weighted score and a first preset threshold range. The specific execution process can be found in the following embodiments, which will not be elaborated here.

[0227] Step S2424: Detect the logical correlation between the predictive thinking process data and the predictive report conclusion in the predictive response data to determine the correlation reward value.

[0228] Detect the logical correlation between the predictive thinking process data in the predictive response data and the conclusions of the predictive report in order to determine the correlation reward value.

[0229] In one implementation, a relevance score is calculated based on the predictive thinking process data and the conclusions of the predictive report, using the predictive response data; a relevance reward value is then determined based on the relevance score and a second preset threshold range. The specific execution process can be found in the following embodiments, which will not be elaborated upon here.

[0230] Step S2425: Determine the total reward value based on the format reward value, the completeness reward value, the accuracy reward value, and the relevance reward value.

[0231] In one implementation, the format reward value, integrity reward value, accuracy reward value, and relevance reward value are summed to calculate the total reward value.

[0232] In another implementation, the format reward value, integrity reward value, accuracy reward value, and relevance reward value are weighted and summed to calculate the total reward value.

[0233] The medical examination report generation method provided in this application comprehensively evaluates the quality of the model-generated report through a multi-dimensional reward function design. Specifically, the format reward value ensures structured output for easy subsequent parsing; the completeness reward value prevents omission of key information; the accuracy reward value guarantees professional reliability; and the relevance reward value prevents the thought process from becoming disconnected from the answer or creating illusions. These four reward values ​​complement each other, guiding the model to generate high-quality medical examination reports.

[0234] Based on any of the above embodiments, step S2423 includes: step S24231, step S24232, step S24233 and step S24234.

[0235] Step S24231: Input the predicted response data and the reference response data into the evaluation model to perform professionalism and / or logical coherence evaluation, and obtain the first score output by the evaluation model.

[0236] A prompt word is constructed based on the predicted response data and the reference response data, and is denoted as the first evaluation prompt word. For example, the first evaluation prompt word is as follows: "You are a medical expert. Please compare the generated medical examination report with the standard reference report from the following perspectives:" 1. Medical professionalism (whether the terminology is used correctly and whether the diagnosis is reasonable); 2. Logical coherence (whether the report structure is clear and the reasoning is logical).

[0237] Please give an overall score of 0-10, where 10 indicates strong professionalism and logical coherence.

[0238] Then, the aforementioned first assessment prompt is input into the assessment model to evaluate its professionalism and logical coherence, obtaining the first score output by the assessment model. This application uses DeepSeek-R1 as the evaluation model, which is a different model instance from the multimodal large model of inspection and verification that is being trained.

[0239] Step S24232: Calculate the semantic similarity between the predicted response data and the reference response data to obtain the second score.

[0240] The semantic similarity between the predicted response data and the reference response data is calculated to obtain the second score.

[0241] In one embodiment, the specific calculation process for the second score is as follows: The predicted response data and the reference response data are encoded separately to obtain the predicted response data vector and the reference response data vector. Then, the cosine similarity between the predicted response data vector and the reference response data vector is calculated as the second score.

[0242] In another embodiment, the specific calculation process for the second score is as follows: The predicted response data is segmented into words, and each segmented word is converted into an embedding vector using a pre-trained BERT (Bidirectional Encoder Representations from Transformers) model, resulting in a word embedding sequence for the predicted response data. Where |c| represents the total number of words in the predicted response data; simultaneously, the reference response data is segmented, and a pre-trained BERT model is used to convert each segment into an embedding vector, resulting in the word embedding sequence of the reference response data: Where |r| represents the total number of words in the reference response data.

[0243] Then, calculate the first [number]th [item] in the predicted response data. a Each word Compared with the reference response data, the first b Each word Cosine similarity between S ab The specific calculation formula is as follows: ; Next, the precision is calculated based on cosine similarity. and recall rate Then, the Bert score is calculated based on precision and recall. The specific calculation formula is as follows: ; ; .

[0244] Finally, Multiply by 10 and map to the second score (range 0-10).

[0245] Step S24233: The first score and the second score are weighted and summed to obtain a weighted score.

[0246] The weighted score is obtained by weighted summing the first and second scores. The specific calculation formula is as follows: Weighted score = α1 × first score + α2 × second score, where α1 and α2 represent weighting coefficients, and α1 + α2 = 1.

[0247] In one implementation, α1 is set to 0.7 and α2 is set to 0.3. This setting is based on the consideration that the judgment of the large model is more comprehensive and reliable. Of course, it can also be adjusted according to the needs.

[0248] Step S24234: Determine the accuracy reward value based on the weighted score and the first preset threshold range.

[0249] The accuracy reward value is determined based on the weighted score and the first preset threshold range.

[0250] Assume the first preset threshold range is [6, 8); if the weighted score is greater than or equal to the upper limit of the first preset threshold range, that is, when the weighted score is ≥ 8, the accuracy reward value is determined to be positive, for example, 1 point; if the weighted score is within the first preset threshold range, that is, when 6 ≤ weighted score < 8, the accuracy reward value is determined to be 0 points; if the weighted score is less than the lower limit of the first preset threshold range, that is, when the weighted score < 6, the accuracy reward value is determined to be negative, for example, -0.5 points.

[0251] The physical examination report generation method provided in this application, through the accuracy reward calculated in the above manner, integrates the multi-dimensional evaluation of the large-scale judge model and the fine-grained semantic matching of BERT Score, thus balancing professionalism and efficiency.

[0252] Further, step S2424 includes: step S24241 and step S24242.

[0253] Step S24241: Calculate the relevance score based on the prediction thinking process data and prediction report conclusions of the prediction response data.

[0254] In one implementation, predictive thought process data (i.e.) is calculated. <think> ...< / think> The text within the label) and the conclusions of the prediction report (i.e. <answer> ...< / answer> The relevance score between the text within the label is denoted as: , For specific calculation methods, please refer to the above. The calculation method. Then, Multiply by 10 to obtain the correlation score (range 0-10).

[0255] In another embodiment, a second evaluation prompt is constructed based on the predicted thought process data and the conclusions of the predicted report. For example, the second evaluation prompt is as follows: "You are a medical expert. Please determine the logical relevance between the following thought process [predicted thought process data] and the final answer [predicted report conclusion], and give a comprehensive score of 0-10, where 10 indicates perfect relevance." Then, input the second evaluation prompt word mentioned above into the evaluation model (which may be the same as or different from the evaluation model in step S24231) to obtain the relevance score output by the evaluation model.

[0256] Step S24242: Determine the correlation reward value based on the correlation score and the second preset threshold range.

[0257] The correlation reward value is determined based on the correlation score and the second preset threshold range.

[0258] Assume the second preset threshold range is [6, 9); if the correlation score is greater than or equal to the upper limit of the second preset threshold range, i.e., the correlation score is ≥ 9, then the correlation reward value is determined to be positive, for example, 1 point; if the correlation score is within the second preset threshold range, i.e., 0.6 ≤ correlation score < 0.8, then the correlation reward value is determined to be 0 points; if the correlation score is less than the lower limit of the second preset threshold range, i.e., the correlation score < 6, then the correlation reward value is determined to be negative, for example, -0.5 points.

[0259] The physical examination report generation method provided in this application calculates the relevance reward in the above manner, effectively solving the common illusion problem that the model's thinking is unrelated to the answer.

[0260] Based on any of the above embodiments, step S130 includes: step S131, step S132 and step S133.

[0261] Step S131: The arbitration agent determines the target evaluation prompt words based on the sub-report and the predefined format template.

[0262] The arbitration agent is a specialized agent built on a large language model, specifically responsible for reviewing report quality. The arbitration agent can use the same base model as the expert agent, such as the same multimodal inspection and verification model, but employ different prompts to achieve different functional roles, thus maintaining logical independence. Alternatively, it can use different base models, for example, using a locally deployed DeepSeek-R1 as the backbone model of the arbitration agent, to achieve greater evaluation independence.

[0263] The arbitration agent determines target evaluation prompts based on sub-reports and predefined format templates.

[0264] In one embodiment, the sub-report and the predefined format template are filled into a preset evaluation prompt word template to obtain the target evaluation prompt word.

[0265] In another embodiment, the sub-report, predefined format template, and corresponding reference guidelines for the sub-report are filled into a preset evaluation prompt word template to obtain the target evaluation prompt words. The method for obtaining the reference guidelines for the sub-report can be referred to the above embodiments and will not be repeated here.

[0266] The preset evaluation prompt template includes the following elements: (1) Role setting; (2) Evaluation object: the sub-report to be evaluated; (3) Reference benchmark: preset report format template (for format standardization evaluation) and marked inspection report conclusion (for result correctness evaluation); (4) Evaluation dimension description: clearly requires evaluation from three dimensions: format standardization, result correctness and output coherence; (5) Output requirements: requires output of the evaluation conclusion of each dimension and the comprehensive report status judgment.

[0267] Step S132: The arbitration agent inputs the target evaluation prompt into the report evaluation model to perform a quality evaluation on the sub-report and obtain a quality evaluation result; wherein, the dimensions of the quality evaluation include at least one of format standardization, result correctness and output consistency.

[0268] Format compliance: Check whether the output format of the sub-report conforms to the predefined report template specifications. Evaluation includes: whether necessary fields are complete, whether the field order is correct, whether the data presentation method (e.g., tables, lists, natural language paragraphs) meets requirements, and whether there are any redundant or duplicate fields.

[0269] The accuracy of the results involves verifying whether the examination results described in the sub-report are consistent with the original physical examination data. The assessment includes: whether the values ​​of each indicator are correctly cited; whether abnormal indicators are accurately identified and labeled; whether the diagnostic conclusions match the examination data; and whether there is any fabricated data. This dimension is crucial for ensuring the medical reliability of the physical examination report.

[0270] Output coherence: Check whether the text of the sub-report is fluent, logically coherent, and consistent with the context. Evaluation includes: whether there are logical jumps between sentences, consistency in the use of technical terminology, and whether there are contradictions in the descriptions.

[0271] The arbitration agent inputs target evaluation prompts into the report evaluation model to evaluate the quality of the sub-reports and obtain the quality evaluation results. The dimensions of the quality evaluation include at least one of the following: format standardization, result correctness, and output consistency, preferably three.

[0272] Step S133: Determine the report status based on the quality assessment results.

[0273] After obtaining the quality assessment results, determine the report status. Report status includes, but is not limited to: Empty report (EMPTY), Format-only error (FORMAT), Content-only error (CONTENT), Both content and format error (CONTENT&FORMAT), and Complete (COMPLETE).

[0274] The physical examination report generation method provided in this application ensures the comprehensiveness and structure of the evaluation process by conducting a systematic evaluation from three clear dimensions: format standardization, result correctness, and output consistency.

[0275] The medical examination report generation device provided in this application is described below. The medical examination report generation device described below can be referred to in correspondence with the medical examination report generation method described above.

[0276] Figure 9 This is a schematic diagram of the structure of the physical examination report generation device provided in the embodiments of this application, such as... Figure 9 As shown, the device includes a data acquisition module 910, a sub-report acquisition module 920, a report status assessment module 930, and a medical examination report generation module 940; wherein: The data acquisition module 910 is used to acquire physical examination data to be processed. The sub-report acquisition module 920 is used to distribute the physical examination data to multiple corresponding first expert intelligent agents and receive sub-reports of each examination item returned by the multiple first expert intelligent agents. The report status assessment module 930 is used to perform a quality assessment on the sub-report and determine the report status of the sub-report based on the quality assessment results; wherein, the report status includes a qualified status and an unqualified status; The physical examination report generation module 940 is used to optimize the sub-reports that are in an unqualified state based on the report status, through the corresponding second expert intelligent agent, so as to update the report status. When the preset termination conditions are met, a physical examination report is generated based on the sub-reports that have reached the qualified state.

[0277] The physical examination report generation device provided in this application first acquires the physical examination data to be processed. Then, it distributes the physical examination data to multiple corresponding first expert agents, so that sub-reports for each examination item can be generated in parallel by multiple first expert agents, replacing the traditional process of manual interpretation and writing, which significantly improves the efficiency of report generation and reduces labor costs. Next, the sub-reports are quality-assessed, and the report status of the sub-reports is determined based on the quality assessment results. The report status includes qualified and unqualified status. Then, based on the report status, the corresponding second expert agent optimizes the sub-reports in the unqualified status to update the report status. When a preset termination condition is met, a physical examination report is generated based on the sub-reports that have reached the qualified status. Through this adaptive cyclical argumentation mechanism of "quality assessment-status update-scheduling optimization", a rigorous quality control closed loop is constructed, realizing an intelligent collaboration mechanism similar to expert consultation, thereby significantly improving the quality of physical examination report generation in complex medical scenarios.

[0278] In one embodiment, the non-compliant status includes at least one of the following: empty report status, format-only abnormal status, content-only abnormal status, and both content and format abnormal status. The physical examination report generation module 940 includes: The task determination unit is configured to determine the task to be executed by the second expert agent based on the report status by scheduling the agent; wherein the task to be executed includes at least one of the following: report generation task, format optimization task, content optimization task, and joint format and content optimization task; An intelligent agent scheduling unit is used to send the task to be executed to the second expert intelligent agent through the scheduling intelligent agent, so as to schedule the second expert intelligent agent to optimize the sub-reports that are in an unqualified state; The report status update unit is used to obtain the optimized sub-report returned by the second expert agent and update the report status based on the optimized sub-report.

[0279] In one embodiment, the agent scheduling unit includes: The optimized prompt word determination subunit is used to determine the target optimized prompt word based on the task to be executed through the second expert agent; The optimization report acquisition subunit is used to input the target optimization prompt words into the inspection and verification multimodal large model through the second expert agent, and obtain the optimized sub-report output by the inspection and verification multimodal large model.

[0280] In one embodiment, the optimized prompt word determination subunit is specifically used for: If the task to be executed is a report generation task, the second expert agent determines the first target optimization prompt word based on the task to be executed; If the task to be executed is a format optimization task, the second expert agent obtains a predefined format template, and determines the second target optimization prompt word based on the predefined format template, the task to be executed, and the sub-report in the unqualified state; If the task to be executed is a content optimization task, the second expert agent obtains reference guidelines related to the sub-report in the substandard state from the vector database, and determines the third target optimization prompt words based on the reference guidelines, the task to be executed, and the sub-report in the substandard state. If the task to be executed is a joint optimization task of format and content, the second expert agent obtains reference guidelines related to the sub-report in the non-compliant state from the vector database and obtains a predefined format template; based on the reference guidelines, the predefined format template, the task to be executed and the sub-report in the non-compliant state, the fourth target optimization prompt word is determined; The target optimization prompt word includes at least one of the first target optimization prompt word, the second target optimization prompt word, the third target optimization prompt word, and the fourth target optimization prompt word.

[0281] In one embodiment, the optimized prompt word determining subunit is further specifically used for: The second expert agent extracts a query vector based on the sub-report that is in an unqualified state. Calculate the semantic similarity between the query vector and each text block vector in the vector database, and determine a candidate text block set based on the semantic similarity; The target text block is determined based on the weight ranking of each text block in the candidate text block set; Based on the target text block, obtain the reference guide.

[0282] In one embodiment, the medical examination report generation device further includes: The text content acquisition module is used to acquire the medical document to be processed and extract the text content from the medical document to be processed; The text segmentation module is used to segment the text content into multiple text blocks; A text block processing module is used to determine the hierarchical label of each text block and calculate the weight of each text block; The associated storage module is used to extract the text block vector of each text block, and associate the text block vector with the corresponding level label and weight and store it in the vector database.

[0283] In one embodiment, the medical examination report generation device further includes: The training sample acquisition module is used to acquire a first training sample set, a second training sample set, and a third training sample set. The first training sample set includes first multimodal sample health check data and its question-answer pairs. The second training sample set includes second multimodal sample health check data and chain thinking data. The third training sample set includes third multimodal sample health check data, query instructions, and reference response data. The modality alignment training module is used to fix the parameters of the visual encoding module and the language generation module in the initial multimodal large model, and perform modality alignment training on the initial multimodal large model based on the first training sample set to obtain the first intermediate multimodal large model; The instruction training module is used to fix the parameters of the visual encoding module in the first intermediate multimodal large model, and to perform instruction training on the first intermediate multimodal large model based on the second training sample set to obtain the second intermediate multimodal large model. The reinforcement learning training module is used to perform reinforcement learning training on the second intermediate multimodal large model based on the third training sample set to obtain the inspection and verification multimodal large model.

[0284] In one embodiment, the reinforcement learning training module includes: The model input unit is used to input the third multimodal sample physical examination data and the query command into the second intermediate multimodal large model to obtain the predicted response data output by the second intermediate multimodal large model; The total reward value determination unit is used to determine the total reward value based on the predicted response data and the reference response data; The reinforcement learning training unit is used to update the parameters of the visual encoding module, language generation module and modality fusion unit in the second intermediate multimodal large model according to the total reward value, and to perform iterative training until the preset iteration stopping condition is reached to obtain the inspection and verification multimodal large model.

[0285] In one embodiment, the total reward value determination unit is specifically used for: The predicted response data is checked to see if it conforms to a predefined format requirement in order to determine the format reward value; The system detects whether the predicted response data includes predefined required content in order to determine the integrity reward value. Detect the semantic similarity, professionalism, and / or logical coherence between the predicted response data and the reference response data to determine the accuracy reward value; Detect the logical correlation between the predictive thinking process data and the predictive report conclusions in the predictive response data to determine the correlation reward value; The total reward value is determined based on the format reward value, the completeness reward value, the accuracy reward value, and the relevance reward value.

[0286] In one embodiment, the total reward value determination unit is further configured to: The predicted response data and the reference response data are input into the evaluation model to perform a professionalism and / or logical coherence evaluation, and the first score output by the evaluation model is obtained. Calculate the semantic similarity between the predicted response data and the reference response data to determine the second score; The first score and the second score are weighted and summed to obtain the weighted score. Based on the weighted score and the first preset threshold range, the accuracy reward value is determined; and / or, The process of detecting the logical correlation between the predictive thinking process data and the predictive report conclusions in the predictive response data to determine the correlation reward value includes: Based on the predictive thinking process data and predictive report conclusions of the predicted response data, a correlation score is calculated. The correlation reward value is determined based on the correlation score and the second preset threshold range.

[0287] In one embodiment, the reporting status assessment module 930 includes: The evaluation prompt word determination unit is used to determine the target evaluation prompt word based on the sub-report and the predefined format template through the arbitration agent; A quality assessment unit is used to input the target assessment prompts into the report assessment model through the arbitration agent to perform quality assessment on the sub-report and obtain a quality assessment result; wherein, the dimensions of the quality assessment include at least one of format standardization, result correctness and output consistency; The report status determination unit is used to determine the report status based on the quality assessment results.

[0288] It should be noted that the physical examination report generation device provided in this application embodiment can implement all the method steps implemented in the above physical examination report generation method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0289] Figure 10 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 10As shown, the electronic device may include a processor 1010, a communications interface 1020, a memory 1030, and a communication bus 1040, wherein the processor 1010, the communications interface 1020, and the memory 1030 communicate with each other via the communication bus 1040. The processor 1010 can call logical instructions in the memory 1030 to execute the physical examination report generation method provided in the above embodiments.

[0290] Furthermore, the logical instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0291] On the other hand, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the physical examination report generation method provided in the above embodiments.

[0292] In another aspect, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the physical examination report generation method provided in the above embodiments.

[0293] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0294] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0295] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for generating a physical examination report, characterized in that, include: Acquire physical examination data to be processed; The physical examination data is distributed to multiple corresponding first expert intelligent agents, and sub-reports of each examination item are received from the multiple first expert intelligent agents. The sub-report is subjected to a quality assessment, and the report status of the sub-report is determined based on the quality assessment results; wherein, the report status includes a qualified status and an unqualified status; Based on the report status, the corresponding second expert agent optimizes the sub-reports that are in an unqualified state to update the report status. When the preset termination condition is met, a physical examination report is generated based on the sub-reports that have reached the qualified state.

2. The method for generating a physical examination report according to claim 1, characterized in that, The unqualified status includes at least one of the following: empty report status, format-only abnormal status, content-only abnormal status, and both content and format abnormal status. Based on the report status, the process of optimizing sub-reports in an unqualified state through the corresponding second expert agent to update the report status includes: By scheduling the intelligent agent, based on the report status, the task to be executed by the second expert intelligent agent is determined; wherein, the task to be executed includes at least one of the following: report generation task, format optimization task, content optimization task, and joint format and content optimization task; The scheduling agent sends the task to be executed to the second expert agent to schedule the second expert agent to optimize the sub-reports that are in an unqualified state. Obtain the optimized sub-report returned by the second expert agent, and update the report status based on the optimized sub-report.

3. The method for generating a physical examination report according to claim 2, characterized in that, The optimized sub-report is generated in the following manner: The second expert agent determines the target optimization prompt words based on the task to be executed; The second expert agent inputs the target optimization prompt into the inspection and verification multimodal large model to obtain the optimized sub-report output by the inspection and verification multimodal large model.

4. The method for generating a physical examination report according to claim 3, characterized in that, The step of determining the target optimization prompt words based on the task to be executed through the second expert agent includes: If the task to be executed is a report generation task, the second expert agent determines the first target optimization prompt word based on the task to be executed; If the task to be executed is a format optimization task, the second expert agent obtains a predefined format template, and determines the second target optimization prompt word based on the predefined format template, the task to be executed, and the sub-report in the unqualified state; If the task to be executed is a content optimization task, the second expert agent obtains reference guidelines related to the sub-report in the substandard state from the vector database, and determines the third target optimization prompt words based on the reference guidelines, the task to be executed, and the sub-report in the substandard state. If the task to be executed is a joint optimization task of format and content, the second expert agent obtains reference guidelines related to the sub-report in the non-compliant state from the vector database and obtains a predefined format template; based on the reference guidelines, the predefined format template, the task to be executed and the sub-report in the non-compliant state, the fourth target optimization prompt word is determined; The target optimization prompt word includes at least one of the first target optimization prompt word, the second target optimization prompt word, the third target optimization prompt word, and the fourth target optimization prompt word.

5. The method for generating a physical examination report according to claim 4, characterized in that, The step of obtaining reference guidelines related to the sub-report in the non-compliant state from the vector database through the second expert agent includes: The second expert agent extracts a query vector based on the sub-report that is in an unqualified state. Calculate the semantic similarity between the query vector and each text block vector in the vector database, and determine a candidate text block set based on the semantic similarity; The target text block is determined based on the weight ranking of each text block in the candidate text block set; Based on the target text block, obtain the reference guide.

6. The method for generating a physical examination report according to claim 4, characterized in that, The method for generating the physical examination report also includes: Obtain the medical document to be processed, and extract the text content from the medical document to be processed; The text content is divided into blocks to obtain multiple text blocks; Determine the hierarchical labels of each text block and calculate the weight of each text block; Extract the text block vectors of each text block, and associate the text block vectors with the corresponding level labels and weights and store them in the vector database.

7. The method for generating a physical examination report according to claim 3, characterized in that, The method for generating the physical examination report also includes: Obtain a first training sample set, a second training sample set, and a third training sample set, wherein the first training sample set includes first multimodal sample health check data and its question-answer pairs, the second training sample set includes second multimodal sample health check data and chain thinking data, and the third training sample set includes third multimodal sample health check data, query instructions, and reference response data; With the parameters of the visual encoding module and the language generation module fixed in the initial multimodal large model, modal alignment training is performed on the initial multimodal large model based on the first training sample set to obtain the first intermediate multimodal large model; The parameters of the visual encoding module in the first intermediate multimodal large model are fixed, and the first intermediate multimodal large model is trained with instructions based on the second training sample set to obtain the second intermediate multimodal large model; Based on the third training sample set, reinforcement learning is performed on the second intermediate multimodal large model to obtain the inspection and verification multimodal large model.

8. The method for generating a physical examination report according to claim 7, characterized in that, The step of training the second intermediate multimodal large model using reinforcement learning based on the third training sample set to obtain the inspection and verification multimodal large model includes: The third multimodal sample physical examination data and the query command are input into the second intermediate multimodal large model to obtain the predicted response data output by the second intermediate multimodal large model; The total reward value is determined based on the predicted response data and the reference response data; The parameters of the visual encoding module, language generation module, and modality fusion unit in the second intermediate multimodal large model are updated according to the total reward value, and iterative training is performed until the preset iteration stopping condition is reached to obtain the inspection and verification multimodal large model.

9. The method for generating a physical examination report according to claim 8, characterized in that, The determination of the total reward value based on the predicted response data and the reference response data includes: The predicted response data is checked to see if it conforms to a predefined format requirement in order to determine the format reward value; The system detects whether the predicted response data includes predefined required content in order to determine the integrity reward value. Detect the semantic similarity, professionalism, and / or logical coherence between the predicted response data and the reference response data to determine the accuracy reward value; Detect the logical correlation between the predictive thinking process data and the predictive report conclusions in the predictive response data to determine the correlation reward value; The total reward value is determined based on the format reward value, the completeness reward value, the accuracy reward value, and the relevance reward value.

10. The method for generating a physical examination report according to claim 9, characterized in that, The process of detecting the semantic similarity, professionalism, and / or logical coherence between the predicted response data and the reference response data to determine the accuracy reward value includes: The predicted response data and the reference response data are input into the evaluation model to perform a professionalism and / or logical coherence evaluation, and the first score output by the evaluation model is obtained. Calculate the semantic similarity between the predicted response data and the reference response data to determine the second score; The first score and the second score are weighted and summed to obtain the weighted score. The accuracy reward value is determined based on the weighted score and the first preset threshold range.

11. The method for generating a physical examination report according to any one of claims 1 to 10, characterized in that, The process of performing a quality assessment on the sub-report and determining the report status of the sub-report based on the quality assessment results includes: The arbitration agent determines the target evaluation prompt words based on the sub-reports and predefined format templates. The arbitration agent inputs the target evaluation prompts into the report evaluation model to evaluate the quality of the sub-report and obtain the quality evaluation results; wherein the dimensions of the quality evaluation include at least one of format standardization, result correctness and output consistency. Based on the quality assessment results, the report status is determined.

12. A medical examination report generation device, characterized in that, include: The data acquisition module is used to acquire physical examination data to be processed. The sub-report acquisition module is used to distribute the physical examination data to multiple corresponding first expert intelligent agents and receive sub-reports of each examination item returned by the multiple first expert intelligent agents. The report status assessment module is used to perform quality assessment on the sub-report and determine the report status of the sub-report based on the quality assessment results; wherein, the report status includes a qualified status and an unqualified status; The physical examination report generation module is used to optimize sub-reports that are in an unqualified state based on the report status, through the corresponding second expert intelligent agent, so as to update the report status. When the preset termination conditions are met, a physical examination report is generated based on the sub-reports that have reached the qualified state.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the physical examination report generation method as described in any one of claims 1 to 11.

14. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the physical examination report generation method as described in any one of claims 1 to 11.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for generating a physical examination report as described in any one of claims 1 to 11.