A diagnostic report generation method based on bidirectional calibration and phased generation

By employing a two-way calibration and phased generation method, the problems of content deviation from user reality and privacy leakage in online diagnostic report generation have been solved. This has enabled controllability of the generation process and relevance of the content, and supports partial content rewriting and recovery of response progress in offline scenarios.

CN123117331APending Publication Date: 2026-11-17CHENGHUAN WIN-WIN (GUANGZHOU) E-COMMERCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611299869.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing online diagnostic report generation solutions suffer from insufficient report depth and adaptability, lack alignment and calibration during the generation process, resulting in content that deviates from the user's actual situation, and pose a high risk of privacy leakage. Furthermore, they cannot support the retention of response progress in offline scenarios.

Method used

The method adopts a two-way calibration and phased generation approach, which transforms structured questionnaire responses into multi-dimensional normalized scores and structured result codes for mirror understanding and direction selection. The report text and attachments are generated in stages, and multiple quality access control checks are combined to support partial content rewriting and supplementary information accumulation, ensuring that the generation process is controllable and the content is relevant to the user's actual needs.

Benefits of technology

It achieves controllability of the generation process and relevance of content, reduces overall generation failures, ensures content compliance and user relevance, supports recovery of answering progress in offline scenarios, and reduces the risk of privacy leaks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123117331A_ABST
    Figure CN123117331A_ABST
Patent Text Reader

Abstract

This invention discloses a diagnostic report generation method based on two-way calibration and phased generation, belonging to the field of online assessment technology. The specific steps of the method are: questionnaire collection and scoring, mid-stage two-way calibration, main text generation and access control, attachment planning and generation, and report iteration and accumulation. This invention transforms structured questionnaire response data into structured generation input composed of multi-dimensional normalized scores, risk levels, user prototypes, and structured result codes. Before formally generating the report, two-way calibration is completed through mirror understanding and direction selection. Then, the report main text and attachments are split into sequential generation stages. The finalized main text serves as the common context for all attachments. With the global division of labor planning before generation, the content boundaries and focus of each attachment are clarified, so that the content of each attachment unfolds independently around the corresponding direction. At the same time, the generation anomaly of a single attachment is only locally processed and does not affect the rest of the completed content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of online assessment technology, specifically a diagnostic report generation method based on bidirectional calibration and phased generation. Background Technology

[0002] With the popularization of online consultation and self-assessment services, the demand for personalized diagnosis in areas such as career development, psychological state, and competency matching continues to grow. More and more users tend to obtain customized analysis conclusions and guidance suggestions through online channels. The application of large language model technology has driven the upgrade of online diagnostic services from standardized scale conclusions to personalized text reports. Users' requirements for the relevance of report content, structural integrity, and user experience are constantly increasing. At the same time, in the network environment, users are gradually paying more attention to the privacy and security of their personal answer data, and have also put forward more diverse requirements for the service's adaptability to weak network conditions, content iterability, and ease of sharing.

[0003] However, existing online diagnostic report generation solutions have some shortcomings. Traditional structured questionnaires can only output fixed, template-based conclusions, and quantitative scoring results cannot serve as controllable inputs to drive personalized content generation. The depth and adaptability of reports are significantly limited. General-purpose large language model conversational generation relies on users actively inputting information, resulting in fragmented content collection, a high rate of missing key information, and a one-way output process without a pre-generation alignment and calibration step. When the model's understanding is biased, it cannot be corrected in time, easily leading to content that deviates from the user's actual situation. Furthermore, the generated results are difficult to save, compare, and iterate over a long period. Solutions that generate the entire report at once generally suffer from long, disorganized structures and missing elements, lack automated quality control mechanisms, and a single generation failure can render the entire report invalid, making it impossible to retry and repair only a part of the content. Moreover, most solutions continuously upload and store users' original answer data during the answering process, posing a risk of privacy leaks and failing to support the retention of answering progress in offline scenarios. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a diagnostic report generation method based on two-way calibration and phased generation. This invention is aimed at ordinary users without AI experience. It uses structured question-and-answer as the smallest unit of human-computer interaction. Through full-process guidance and mid-process two-way calibration, it lowers the threshold for users to organize their expression. Even when users have difficulty accurately and completely expressing their situation, it can still produce personalized and practical diagnostic reports. By transforming the structured questionnaire answer data into a structured generation input composed of multi-dimensional normalized scores, risk levels, user prototypes, and structured result codes, two-way calibration is completed through mirror understanding and direction selection before the formal report generation. Then, the report text and attachments are generated in stages. The finalized text serves as the common context for all attachments. With the global division of labor planning before generation, the content boundaries and focus of each attachment are clearly defined, so that the content of each attachment develops independently around the corresponding direction. At the same time, the generation anomaly of a single attachment is only locally processed and does not affect the rest of the completed content. This achieves a generation effect that is controllable in process, relevant to the user's actual situation, and stable in overall structure.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a diagnostic report generation method based on bidirectional calibration and phased generation, the specific steps of which are as follows:

[0006] Questionnaire collection and scoring: Collect structured questionnaire responses submitted by users on the web front end, calculate multi-dimensional normalized scores, further calculate the risk rate and classify risk levels, generate structured result codes after matching user prototypes, and organize them into structured generated input.

[0007] Midfield two-way calibration: Based on structured questionnaire response data, a shared fact document is generated. A non-streaming lightweight large language model is used to generate mirror understanding and several direction cards. User correction text and direction selection results are received and summarized to form calibration intent.

[0008] Text generation and access control: Using structured input, calibration intent and shared fact documents as context, the report text is generated through a streaming large language model, and the final text is obtained after multiple independent quality access control checks and fault tolerance processing;

[0009] Attachment planning and generation: Based on the final text, calibration intent and shared fact document, complete the global planning of multiple attachments. With the final text as the common context, attachments are generated independently and in parallel through a streaming large language model according to the retention direction. Each attachment is processed by independent quality gate and local fault tolerance.

[0010] Report Iteration and Consolidation: Supports independent rewriting of single attachments and cumulative regeneration of supplementary information, retains independent versions of each generated result, and completes report storage management and sharing output.

[0011] Furthermore, in the questionnaire collection and scoring process, the specific steps for collecting structured questionnaire response data are as follows: First, the questions are grouped and displayed according to progressive themes, and subsequent questions are dynamically displayed based on the previous response results through conditional branching logic, with non-mandatory escape options set for option-based questions; Second, for questions using a hybrid semi-text auxiliary option format, the user's free text content and auxiliary option selection results are collected simultaneously, and the selection results of some auxiliary options are mapped to the intention weight of generating text length orientation; Third, the format validation of individual question response results is performed, generating format validity markers, spam input markers, and confidence level markers.

[0012] Furthermore, in the questionnaire collection and scoring process, the multi-dimensional normalized score is calculated based on the question hit score and the question dimension weight using a dimension-weighted normalized score formula. The question hit score is obtained by matching the single-question answer result with a preset answer score mapping table, and the question dimension weight is a preset scoring switch value for each question. The risk rate is calculated based on the multi-dimensional normalized score and a basic correction factor using a multi-dimensional linearly weighted risk rate calculation formula. The basic correction factor is obtained by matching the user's basic information with a preset correction factor mapping table. The user prototype is obtained by matching the dimension score vector with the cosine similarity of the candidate prototype feature vector. The candidate prototype feature vector is a preset prototype feature configuration value for each risk level. The structured result code is generated by combining the risk rate, prototype abbreviation, and retention quotient, with the retention quotient calculated from the final risk rate. The multi-dimensional normalized score, risk rate, risk level, user prototype, and structured result code together constitute the structured generation input.

[0013] Furthermore, in the questionnaire collection and scoring process, the dimensional weighted normalized scoring formula is as follows: ,in, The normalized score for the m-th dimension ranges from -1 to 1. Let be the hit score for the i-th question in the m-th dimension, with a value ranging from -1 to 1. is the dimension weight of the i-th question, with a value of 0 or 1. Questions with a weight of 1 are included in the dimension score, while factual questions with a weight of 0 are not included in the dimension score and are only used as content generation material. clamp is a clamping function used to limit the calculation result to a specified range.

[0014] The formula for calculating the risk rate using a multidimensional linear weighted risk ratio is as follows: ,in, This is the risk rate, with a value ranging from 0 to 100. The total number of dimensions. Let be the risk impact coefficient for the m-th dimension, set through a correlation mapping between the dimension and the risk level, with a value ranging from 5 to 20. An age correction factor is set by mapping user basic information to risk level, with a value range of -5 to 5. A correction factor for user work attributes is set by mapping user occupation attributes to risk levels, with a value range of -5 to 5. When the questionnaire includes self-assessment questions, the average of the risk values ​​corresponding to all self-assessment questions is taken and averaged again with the base risk rate. The final value is then clamped to the 0-100 range to obtain the final risk rate.

[0015] Furthermore, in the aforementioned two-way calibration, the shared fact documents are the empathy profile and the factual situation. The shared fact documents are generated through a non-streaming lightweight large language model. The generation process is based solely on structured questionnaire responses, and content not explicitly mentioned by the user is marked as inference. When the user submits correction text or supplementary information, the shared fact documents are regenerated synchronously. The generation of shared fact documents is configured with a fallback mechanism, and if the call fails, a fallback generation process without shared documents is initiated.

[0016] Furthermore, in the aforementioned two-way calibration, the specific steps for generating mirror understanding and direction cards are as follows: First, generate mirror understanding and several direction cards using a non-streaming lightweight large language model, deduplicate the generated direction cards by title, and assign intra-session stability identifiers according to the return order; Second, receive the correction text submitted by the user for the mirror understanding, use the correction text as high-priority input, and regenerate the mirror understanding and direction cards; Third, receive the user's selection operation on the direction cards and supplementary information for custom directions, summarize them to form a calibration intent, and support the user to skip the calibration step and enter the all-directional fallback generation path.

[0017] Furthermore, in the text generation and access control process, the specific steps for quality access control detection of the report text are as follows: First, the report text is detected by length access control, blacklist access control, user fit access control, judgment consistency access control, and configurable soft access control. Specifically, the length access control counts the total number of characters in the report text and compares it with the preset upper and lower length limits; the blacklist access control matches the report text with the preset prohibited word library and regular expression validation rules; the user fit access control extracts detail tokens from the core answer data, counts the number of different tokens hit in the text, and judges the text as passed when the number of hits reaches a preset threshold and at least one token is hit in the preceding paragraph; the judgment consistency access control performs integrity and consistency checks on the judgment paragraphs in the text; and the configurable soft access control performs detection according to preset custom validation rules.

[0018] Furthermore, in the attachment planning and generation process, the global planning of multiple attachments is executed through a non-streaming lightweight large language model. Combining the final text, all retained direction cards, and shared fact documents, a unique main line, topic soft avoidance rules, and volume anchor points are assigned to each attachment to be generated. The volume anchor points are benchmark rules that match the scale of the user scenario and constrain the volume of the attachment content. The planning results correspond one-to-one with each direction card. The global planning process is configured with a degradation mechanism. When generation fails, a lightweight division of labor process based on the direction card title list is entered.

[0019] Furthermore, in the attachment planning and generation, multiple attachments are generated in batches in parallel according to a preset concurrency limit, and the generation process of a single attachment is independent of the other attachments; each attachment uses the final text as a common context and generates content around the corresponding direction through a streaming large language model; the independent quality gates of the attachments include length gates, blacklist gates, and structural element gates. The structural element gate is used to detect whether the attachment content contains preset structured tags, and the structural element gate is configured with three activation levels; when a single attachment is unqualified, only local fault tolerance processing is performed on that attachment, and the generated final text and the other qualified attachments are retained.

[0020] Furthermore, in the report iteration and accumulation process, the independent rewriting of a single attachment only covers the content of the corresponding attachment, without changing the content of the final text and other attachments; the supplementary information is cumulatively regenerated and reused, with all structured questionnaire response data and cumulative supplementary information from previous iterations. After synchronously updating the shared fact document, the final text and all attachments are regenerated; each successfully generated result is added and stored as an independent version.

[0021] Furthermore, in the questionnaire collection and scoring process, the user's draft answers are stored only locally in the browser and isolated by account namespace, supporting the resumption of the answering progress from local storage after network disconnection or page refresh; the structured questionnaire answer data is uploaded to the server only when the user actively initiates a generation request; the server treats sensitive answer texts only as temporary inputs for the current generation, and isolates sensitive texts from persistence, caching, and log links through a type guard mechanism; the logged-in user's report and non-sensitive generated materials support cross-device synchronization.

[0022] Compared with existing technologies, this diagnostic report generation method based on bidirectional calibration and phased generation has the following advantages:

[0023] I. This invention transforms structured questionnaire responses into a structured generation input composed of multi-dimensional normalized scores, risk levels, user prototypes, and structured result codes. Before formally generating the report, a two-way calibration is completed through mirror understanding and direction selection. The report text and attachments are then generated in separate stages, with the finalized text serving as the common context for all attachments. Combined with the global division of labor planning before generation, the content boundaries and focus of each attachment are clearly defined, allowing each attachment to develop independently around its corresponding direction. Furthermore, any generation anomalies in a single attachment are only handled locally without affecting the rest of the completed content, achieving a controllable generation process, content that aligns with user realities, and a stable overall structure.

[0024] Second, this invention applies multi-dimensional automatic quality gate detection to the main text and each attachment, combined with a tiered retry and tolerant delivery mechanism, to ensure content compliance and user relevance, reducing the chance of overall generation failure. It supports independent rewriting of individual attachments and cumulative regeneration after supplementing information, retaining independent versions of each generation throughout the process to adapt to users' needs for gradually supplementing information and adjusting content. At the same time, it adopts a processing method that prioritizes local storage of answer data, uploads it on demand during generation, and prevents sensitive original text from entering the persistent link, supporting the recovery of answer progress in scenarios of network outages and page refreshes. It reduces the exposure scope of users' sensitive information from the data flow path, taking into account both usage continuity and data privacy.

[0025] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from an examination of the following, or may be learned from the practice of the invention. Attached Figure Description

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

[0027] Figure 1 A flowchart of a diagnostic report generation method based on bidirectional calibration and phased generation;

[0028] Figure 2 This is a framework diagram of bidirectional calibration in a diagnostic report generation method based on bidirectional calibration and phased generation.

[0029] Figure 3 This is a framework diagram of text generation and access control in a diagnostic report generation method based on bidirectional calibration and phased generation. Detailed Implementation

[0030] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0031] Example:

[0032] This embodiment applies to an online career diagnostic web platform for working professionals. The platform is built on a three-layer architecture: a web front-end, a back-end API service, and an independent large language model service. It outputs personalized career diagnostic reports for working professionals through a diagnostic report generation method based on bidirectional calibration and phased generation. At the hardware level, the web front-end is compatible with all mainstream desktop and mobile browsers. The back-end service uses a general-purpose cloud server to handle interface scheduling, numerical calculation, and temporary caching. The large language model service is independently deployed with isolated computing power, eliminating the problem of computing power contention. At the software level, the back-end uses a general-purpose back-end programming language to implement numerical calculation, interface forwarding, and configuration reading. Browser local storage relies on the standard LocalStorage to store user drafts. All preset rules, mapping tables, and judgment thresholds are stored in an editable configuration library in the back-end, allowing parameter adjustments to be completed without modifying the program code. This adapts to the diagnostic needs of different working professionals. The entire process includes questionnaire collection and scoring, bidirectional calibration, text generation and access control, attachment planning and generation, and report iteration and accumulation. At the same time, data privacy protection logic under the questionnaire collection and scoring items runs throughout the entire process.

[0033] Questionnaire collection and scoring: The platform's web front-end preloads all preset configuration files, and all preset content is uniformly stored in the back-end editable configuration library. During front-end initialization, the configuration cache is pulled to local temporary memory. The configuration content is permanently editable. This process involves all preset content, including a progressive topic grouping list, a unique answer score mapping table for each question, a single question dimension contribution configuration value, a correction factor mapping table, conditional branch logic, escape option switches, semi-text question type intent weight mapping rules, various access control thresholds, hook word extraction rules, etc.

[0034] First, structured questionnaire responses are collected. Questionnaire questions are pre-divided into progressive topic groups according to workplace diagnostic scenarios. The group list is stored in the backend configuration, which includes five groups: personal workplace status, career aspirations, job adaptation experience, development obstacles, and long-term career goals. The frontend displays questions in order of group. Each question is bound to exclusive conditional branch logic, which is stored in the branchPath field in the configuration. The frontend reads the structured questionnaire responses that users have already answered in real time, matches the branchPath, dynamically filters and displays subsequent questions. For all single-choice and multiple-choice questions, a non-mandatory escape option configuration is enabled. The escape option text is fixed as "inconvenient to explain in detail". Questions with this type of option are not included in the dimension score.

[0035] Two types of question collection logic are set up. The first type is the regular single-choice, multiple-choice, and situational objective question types, which only collects the user's selections and matches the corresponding scores. The second type is a mixed question type with semi-text auxiliary options, which simultaneously collects the user's manually entered free text content and the selection results of the interface's preset auxiliary options. The mapping relationship between auxiliary options and the intention weight of the generated text orientation is pre-stored in the backend configuration. After the user selects the corresponding auxiliary option, the backend reads the mapping value and stores it in the structured questionnaire answer data. This intention weight is subsequently sent to the mid-stage two-way calibration stage as an auxiliary constraint parameter for the generation direction.

[0036] After a user completes a single question, the front-end immediately executes format validation logic. All validation rules are preset in the back-end configuration. For numerical questions such as age, years of work experience, and salary range, the front-end validates the number format and numerical range. For free text questions, the front-end validates for empty values ​​and meaningless repeated characters. After validation, three types of tags are automatically generated and stored in the structured questionnaire response data: format validity tag, spam input tag, and confidence tag. If the format validation passes, the format validity tag is assigned a value of 1; if it fails, it is assigned a value of 0. Continuous meaningless characters and completely blank answers are judged as spam input and assigned a value of 1; all other cases are assigned a value of 0. The confidence tag is derived from the format validity and spam input validation results and is divided into three observation labels: high, medium, and low. It is only used as observational metadata and is left in the desensitized summary. It does not participate in the scoring calculation or content generation. The question has a preset fixed weight as a switch for whether to include it in the multi-dimensional normalized scoring. Factual questions such as age, identity, and income with a weight of 0 are not included in the dimensional scoring and are only used as material for subsequent content generation.

[0037] During the process of generating structured questionnaire data from all user responses, all draft answers are written only to isolated storage in the browser's local namespace. Each logged-in account corresponds to an independent local storage partition, and drafts from different accounts do not interfere with each other. After page refresh or temporary network disconnection, the front end automatically reads the local drafts to restore all responses. The front end only encrypts and uploads the current complete structured questionnaire data to the back end when the user manually clicks the report generation button. At other times, there is no data upload activity.

[0038] After receiving the complete structured questionnaire responses, the backend initiates a multi-dimensional normalized score calculation process, executing the dimension-weighted normalized score formula to complete the calculation. The backend pre-reads the answer score mapping table and dimension contribution configuration value for each question. The answer score mapping table records the hit score for each answer in each dimension. The dimension weight configuration value relies on a preset switch value of 0 or 1 for the question attribute. The clamp function is encapsulated in a general mathematical utility class on the backend, forcing the output result to be locked in the range of -1 to 1. The dimension-weighted normalized score formula is: ,in, The normalized score for the m-th dimension ranges from -1 to 1. Let be the hit score for the i-th question in the m-th dimension. Let be the dimension weight of the i-th question, and 'clamp' be the clamping function;

[0039] After calculating the dimensional scores, the multi-dimensional linear weighted risk rate calculation formula is executed. The backend reads the preset risk impact coefficients for each dimension, and simultaneously reads the user's age and occupation information attached to the structured questionnaire response data. It then matches the correction factor mapping table to obtain the user's age correction factor and user's work attribute correction factor, and calculates and outputs the risk rate. The multi-dimensional linear weighted risk rate calculation formula calculates the risk rate as follows: ,in, This is the risk rate, with a value ranging from 0 to 100. The total number of dimensions. Let m be the risk impact coefficient of the m-th dimension. Age correction factor for users Adjust the user's work attributes as a factor; if the questionnaire includes self-assessment questions, take the average of the risk values ​​corresponding to all self-assessment questions and the risk rate, and then average them again. The final value is locked in the 0-100 range through secondary clamping to obtain the final risk rate, and the corresponding risk level is matched according to the preset risk level threshold.

[0040] The user prototype matching process relies on cosine similarity. The backend pre-stores candidate prototype feature vectors for each risk level, composed of standard values ​​for each dimension. The cosine similarity is calculated sequentially between the current user's dimension score vector and all candidate prototype feature vectors for the same risk level. The entry with the highest similarity value is selected as the matched user prototype. The retention quotient is obtained by subtracting the final risk rate from a fixed 100. The risk rate, prototype abbreviation, and retention quotient string are combined to generate a structured result code. Multi-dimensional normalized scores, risk rates, risk levels, user prototypes, and structured result codes are integrated to form a structured generation input, such as... Figure 1 As shown, the structured input and the original structured questionnaire responses are synchronously transmitted to the two-way calibration process in the middle of the field.

[0041] Mid-process two-way calibration: After receiving structured questionnaire responses and structured generated input, the backend first calls the non-streaming lightweight large language model to generate two shared fact documents. This embodiment clearly distinguishes the underlying architecture, training objectives, and calling logic of the two types of large language models. The non-streaming lightweight large language model adopts a lightweight encoding and decoding architecture, with the training objective being structured text summarization and information sorting. It outputs fixed JSON structured text in a single output, without word-by-word streaming push logic. The interface is set with a three-level degradation mechanism. The first level silently retryes once. If the retry fails, the frontend manual retry button is enabled. Two failures directly trigger the no-shared-document fallback process. The streaming large language model adopts a dedicated architecture for long text generation, with the training objective being the segmented output of long narrative diagnostic text. It uses SSE streaming long connections to continuously return text characters, without degradation retry configuration. The internal retry logic is only triggered when the content generation gate is unqualified.

[0042] The shared factual document consists of two independent documents: an empathy profile and a factual situation report. The non-streaming lightweight large language model only receives structured questionnaire responses. The backend sets fixed input constraints, and the output content can only be generated based on the user's responses. Workplace information not mentioned by the user is uniformly marked with an "inference" label and written into the document. If the user subsequently submits corrected text or supplementary information, the backend automatically clears the cache of the two original shared factual documents and re-calls the non-streaming lightweight large language model to complete the regeneration. The empathy profile is fixedly transmitted to the main text generation and access control processes as input parameters, while the factual situation report is fixedly transmitted to the two processes of mid-stage two-way calibration and attachment planning and generation as input parameters.

[0043] After the shared fact document is generated, the backend calls the same non-streaming lightweight large language model again, inputs structured questionnaire answer data and fact document, and outputs mirror understanding text and multiple direction card data. The backend performs string deduplication on all output direction cards according to the title field, and assigns a unique stable identifier within the session according to the order of return. The stable identifier remains unchanged throughout the current user's complete report generation session and is used for frontend selection and binding.

[0044] The front-end displays the mirror understanding text and all direction cards, providing interactive controls for user operation. If a user determines that the mirror understanding does not match their workplace situation, the front-end provides a text input box to receive the user's submitted correction text. The back-end sets the correction text as the highest priority input field, replaces the original mirror understanding generation input parameters, and re-generates a new mirror understanding and direction cards using a non-streaming lightweight large language model, simultaneously regenerating two shared fact documents. Users can select existing direction cards or manually enter custom direction content. All selected items and custom directions are integrated into a set of retained directions to form a calibration intent, such as... Figure 2 As shown, the calibration intent, along with two shared fact documents and structured generation input, is simultaneously sent into the main text generation process. Users can skip this interaction step directly, and the backend will automatically generate a comprehensive calibration intent covering all dimensions.

[0045] Text generation and access control: The backend integrates structured input, calibration intent, empathy profile, and current situation as complete input parameters for the streaming large language model. It loads a preset professional diagnosis-specific prompt template, establishes a long connection, and pushes the generated report text in a streaming manner. After the complete text generation is completed, it is automatically sent to multiple independent quality access control channels for testing. All judgment rules, thresholds, dictionaries, and regular expressions of the five access control channels are stored in the backend editable configuration library, which supports visual modification in the backend.

[0046] The length access control system has preset upper and lower character limits. Front-end and back-end configurations are synchronized. The back-end counts the total number of characters in the complete report text; if the value falls within the range, it passes. The blacklist access control system loads a preset prohibited word library and regular expression matching rules, scanning the report text segment by segment. If any item is matched, it fails. The user-fit access control system extracts and verifies core detail tokens, extracting detailed tokens representing the user's core workplace information from structured questionnaire responses, including numerical values, specific phrases, and content words. It counts the number of different tokens matched in the text; if the total number of matches reaches a preset threshold and at least one token is matched in the first three paragraphs, the access control system passes. The consistency access control system verifies the completeness and coherence of the judgment paragraphs within the text. It passes if the judgment paragraph meets the length requirement, contains complete judgment elements, references user details, and has a valid token intersection with the preceding content. Configurable soft access control supports custom verification rules added in the back-end. Each access control system can be independently configured with three operating modes: forced interception, warning only, and disabled. Mode configurations are permanent.

[0047] After all access control systems complete the inspection, a unified fault-tolerant scheduling logic is executed. If there is no valid output or the main text is blank, the original prompt is executed for a single retry. If the access control system fails the inspection, the backend collects the corresponding failure description and concatenates it to the streaming large language model's prompt word, carrying the failure reason for a targeted retry. If the access control standard still cannot be met after two retries, a lenient delivery judgment is entered. The main text is only output if both conditions are met simultaneously: no content is on the blacklist and the character length meets the requirement. Otherwise, a generation failure prompt is returned. For all reports that pass the all-access control inspection, the backend automatically extracts the baseline judgment text used for internal calculations from the streaming large language model output, retaining only the narrative content for user reading to form the final main text. Figure 3 As shown, the final complete text is transmitted to the attachment planning and generation process.

[0048] Attachment Planning and Generation: The backend receives the final text, all retained direction cards within the calibration intent, and two shared fact documents. It calls a non-streaming lightweight large language model to perform global planning calculations for multiple attachments. The input parameters of the non-streaming lightweight large language model are fixed and include three types of document data. The output content is the planning item corresponding to each direction card. The item includes three types of parameters: a unique core theme, topic soft avoidance rules, and volume anchor points. The unique core theme limits a single attachment to focusing on only a single workplace dimension. The topic soft avoidance rules restrict overlapping topics in multiple attachments to only a brief mention. The volume anchor points are configured with the corresponding text volume range based on the user's years of experience and job level to avoid generalizing content to a general audience. The global planning interface reuses a three-level degradation mechanism. When the call fails, the backend reads the direction card title list to generate simple division rules without blocking the subsequent attachment generation process. The planning results are bound to the corresponding direction cards and stored in the cache.

[0049] The backend reads the preset attachment concurrency limit value and initiates multiple attachment generation requests according to the batch parallel scheduling logic. Each retention direction corresponds to an independent streaming large language model call. Each call carries the final text, the corresponding planning item, and the shared fact document as context. The attachment generation processes are isolated from each other. The interruption of a single attachment generation or the failure of the access control will not terminate the operation process of other attachments.

[0050] After each attachment is generated, three sets of quality access control checks are performed independently. The length access control, blacklist access control rules and the text access control share the same backend editable configuration library. The structural element access control is configured with a dedicated structured markup list, including table separators, step title marks, etc. The attachment text is scanned to see if it contains preset marks. It is also configured with three levels of operation modes: forced interception, warning only recording, and disabling. The attachment is equipped with a two-level retry + tolerant delivery fault tolerance logic. When a single attachment is deemed unqualified, only that attachment is retried. The generated qualified final text and other compliant attachments are fully retained in the cache. The generated content is not cleared, thus completing the partial fault tolerance processing.

[0051] Report Iteration and Consolidation: After all attachments are generated, the report iteration and consolidation process begins. The front end sets up an independent rewrite interaction button for each attachment. When a user triggers a single attachment rewrite operation, the back end only re-executes the global planning read, streaming model call, and attachment access control detection logic corresponding to that attachment. All other attachments and the final text reuse existing data in the cache, without any duplicate calculation operations.

[0052] Users can add supplementary information text at any time and store it in an independent supplementary information storage container. The container persistently stores all historical supplementary content. When a user triggers a regeneration command, the backend reuses the original complete structured questionnaire answer data and all supplementary information in the container, automatically calls the non-streaming lightweight large language model to update the two shared fact documents: the empathy profile and the factual situation, and then re-executes the entire process of generating the main text and all attachments. All text data after each complete regeneration is added as an independent version to the backend database. Historical versions are permanently retained. The frontend provides a version switching control for users to freely retrieve any historical report data, and there is no issue of version overwriting or loss.

[0053] The entire process synchronously runs the privacy protection logic for questionnaire collection and scoring. The backend has a fixed-type guard mechanism at the compilation layer. The sensitive rawText field of the original answer is removed from the field definitions of all persistent databases, log files, and cached objects. Only the anonymized summary data is stored. The anonymized summary includes parameters without sensitive information such as answer number, confidence level, and text length. After the logged-in user completes the report generation, the backend only synchronizes the non-sensitive structured input, the final text, and attachment text to the cloud. The original sensitive answer does not participate in cross-device synchronization. Users can reproduce the entire report generation process by only reading the non-sensitive generated material from the cloud when switching login devices. There is no risk of sensitive data leakage across devices.

[0054] In summary, this embodiment relies on an online career development diagnosis web platform for engineering deployment. It can run stably through a general web front-end and back-end and a general large language model service, solving many technical defects of existing online diagnostic report generation solutions, such as fragmented information collection, lack of bidirectional alignment before generation, poor stability of long text generation, overall failure due to faults, data privacy leakage, and inability to perform partial iterative updates.

[0055] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A diagnostic report generation method based on bidirectional calibration and phased generation, characterized in that, The specific steps of this method are as follows: Questionnaire collection and scoring: Collect structured questionnaire responses submitted by users on the web front end, calculate multi-dimensional normalized scores, further calculate the risk rate and classify risk levels, generate structured result codes after matching user prototypes, and organize them into structured generated input. Midfield two-way calibration: Based on structured questionnaire response data, a shared fact document is generated. A non-streaming lightweight large language model is used to generate mirror understanding and several direction cards. User correction text and direction selection results are received and summarized to form calibration intent. Text generation and access control: Using structured input, calibration intent and shared fact documents as context, the report text is generated through a streaming large language model, and the final text is obtained after multiple independent quality access control checks and fault tolerance processing; Attachment planning and generation: Based on the final text, calibration intent and shared fact documents, complete the global planning of multiple attachments. With the final text as the common context, attachments are generated independently and in parallel through a streaming large language model according to the retention direction. Each attachment is subject to independent quality gate and local fault tolerance processing.

2. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 1, characterized in that, The specific steps for collecting structured questionnaire responses in the questionnaire collection and scoring process are as follows: First, the questions are grouped and displayed according to progressive themes, and subsequent questions are dynamically displayed based on the previous responses through conditional branching logic. Non-mandatory escape options are set for option-type questions. Second, for questions that use a hybrid text-assisted option format, the user's free text content and the results of auxiliary option selections are collected simultaneously, and the selection results of some auxiliary options are mapped to the intention weight of the generated text length orientation. The third step is to perform format validation on the answers to individual questions, and generate format validity flags, spam input flags, and confidence level flags.

3. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 1, characterized in that, In the questionnaire collection and scoring process, the multi-dimensional normalized score is calculated based on the question hit score and the question dimension weight, using the dimension weighted normalized score formula. The question hit score is obtained by matching the answer result of a single question with a preset answer score mapping table, and the question dimension weight is the preset scoring switch value of a single question. The risk rate is calculated based on a multi-dimensional normalized score and a basic correction factor, using a multi-dimensional linear weighted risk rate calculation formula. The basic correction factor is obtained by matching the user's basic information with a preset correction factor mapping table. User prototypes are obtained by matching the cosine similarity between the dimensional score vector and the candidate prototype feature vector. The candidate prototype feature vector is the preset prototype feature configuration value under each risk level. The structured result code is generated by combining the risk rate, prototype abbreviation, and retention quotient, with the retention quotient calculated from the final risk rate. The multi-dimensional normalized score, risk rate, risk level, user prototype, and structured result code together constitute the structured generation input.

4. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 3, characterized in that, In the questionnaire collection and scoring process, the dimension-weighted normalized scoring formula is as follows: ,in, For the normalized score of the m-th dimension, Let be the hit score for the i-th question in the m-th dimension. is the dimension weight of the i-th question, with a value of 0 or 1. Questions with a weight of 1 are included in the dimension score, while factual questions with a weight of 0 are not included in the dimension score and are only used as content generation material. clamp is the clamping function. The formula for calculating the risk rate using a multi-dimensional linear weighted risk ratio is as follows: ,in, For risk rate, The total number of dimensions. Let m be the risk impact coefficient of the m-th dimension. Adjusting factor for user age. Adjust the user's work attributes as a factor; when the questionnaire includes self-assessment questions, take the average of the risk values ​​corresponding to all self-assessment questions and the base risk rate, and then average them again. The final value is then clamped to the 0-100 range to obtain the final risk rate.

5. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 1, characterized in that, In the aforementioned two-way calibration, the shared fact documents are the empathy profile and the factual situation. The shared fact documents are generated through a non-streaming lightweight large language model. The generation process is based solely on the structured questionnaire response data, and content not explicitly mentioned by the user is marked as inference. When the user submits correction text or supplementary information, the shared fact documents are regenerated synchronously. The generation of shared fact documents is configured with a fallback mechanism, and if the call fails, a fallback generation process without shared documents is initiated.

6. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 1, characterized in that, In the aforementioned two-way calibration, the specific steps for generating mirror understanding and direction cards are as follows: First, generate mirror understanding and several direction cards using a non-streaming lightweight large language model, deduplicate the generated direction cards by title, and assign intra-session stability identifiers according to the return order; Second, receive the correction text submitted by the user for the mirror understanding, use the correction text as high-priority input, and regenerate the mirror understanding and direction cards; Third, receive the user's check-in operation on the direction cards and supplementary information for custom directions, and summarize them to form the calibration intent.

7. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 1, characterized in that, In the text generation and access control process, the specific steps for quality access control detection of the report text are as follows: First, the report text is detected by length access control, blacklist access control, user fit access control, judgment consistency access control, and configurable soft access control. Specifically, the length access control counts the total number of characters in the report text and compares it with the preset upper and lower length limits; the blacklist access control matches the report text with the preset prohibited word library and regular expression validation rules; the user fit access control extracts detail tokens from the core answer data, counts the number of different tokens hit in the text, and judges the text as passed when the number of hits reaches a preset threshold and at least one token is hit in the preceding paragraph; the judgment consistency access control performs integrity and consistency checks on the judgment paragraphs in the text; and the configurable soft access control performs detection according to preset custom validation rules.

8. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 1, characterized in that, In the planning and generation of attachments, the global planning of multiple attachments is executed through a non-streaming lightweight large language model. Combining the final text, all retained direction cards and shared fact documents, a unique main line, topic soft avoidance rules and volume anchor points are assigned to each attachment to be generated. The planning results correspond one-to-one with each direction card. The global planning process is configured with a degradation mechanism. When the generation fails, a lightweight task allocation process based on the direction card title list is entered.

9. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 1, characterized in that, In the planning and generation of attachments, multiple attachments are generated in batches in parallel according to a preset concurrency limit, and the generation process of a single attachment is independent of the other attachments. Each attachment uses the final text as a common context and generates content around the corresponding direction using a streaming large language model; the independent quality gates for attachments include length gates, blacklist gates, and structural element gates, with three activation levels for structural element gates; when a single attachment is unqualified, only local fault tolerance processing is performed on that attachment, while the generated final text and the remaining qualified attachments are retained.

10. The diagnostic report generation method based on bidirectional calibration and phased generation according to claim 1, characterized in that, This method also includes report iteration and consolidation: it supports independent rewriting of single attachments and cumulative regeneration of supplementary information, retaining independent versions of each generated result, and completing report storage management and sharing output; among them, independent rewriting of single attachments only covers the content of the corresponding attachment, without changing the content of the final text and other attachments; cumulative regeneration of supplementary information reuses all structured questionnaire response data and accumulated supplementary information from previous times, and regenerates the final text and all attachments after synchronously updating the shared fact document; each successfully generated result is added to the storage as an independent version.