Laboratory inspection method based on semantic enhancement and related equipment
By employing a semantically enhanced laboratory testing method, deep learning technology is used to process the experimenter's voice information, accurately locate event boundaries, and generate logically consistent laboratory logs. This solves the problems of low efficiency, inaccurate information, and easy omission of time-series records in traditional laboratory testing, and achieves efficient and accurate experimental recording.
Patent Information
- Application Number
- CN202610031492.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional laboratory testing processes suffer from problems such as low recording efficiency, inaccurate information, and easy omissions in time-series recording, which affect the traceability and reliability of original records.
A laboratory verification method based on semantic enhancement is adopted. By acquiring the natural speech description information of the experimenters, semantic prediction and verification are performed using a 12-layer Transformer encoder and a bidirectional LSTM network. Combined with the Conditional Random Field (CRF) sequence labeling algorithm, the event boundaries are accurately located, and multi-level classification and attribute extraction are performed to generate laboratory logs that conform to the experimental process logic.
It improves the efficiency and accuracy of laboratory testing, ensures the integrity and traceability of experimental records, and achieves real-time and accurate time-series recording.
Smart Images

Figure CN121935381A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a laboratory testing method and related equipment based on semantic enhancement. Background Technology
[0002] In related technologies, in traditional laboratory workflows, due to the complexity of the testing process, manual testing is generally used. The main problems with manual testing are as follows:
[0003] First, the recording of the testing process is inefficient and non-standard. According to laboratory quality management requirements, testing personnel should record the testing process and data in a timely and accurate manner according to the original record requirements. Pre-recording, supplementary recording, or copying is strictly prohibited. However, in actual testing operations, inspectors often need to perform experimental operations with both hands and cannot write records at the same time. They can only supplement the records from memory after the operation is completed. This practice not only does not meet the standard requirements, but also easily leads to problems such as incomplete, inaccurate, or missing time information in the records. Especially when performing multiple operation steps in succession, inspectors find it difficult to accurately recall the specific time and detailed parameters of each step, resulting in a decrease in the traceability and reliability of the original records.
[0004] Second, inaccurate extraction of event information. Laboratory original records need to include information on all key events in the testing process, including detailed elements such as the testing stage, operational actions, reagent names and dosages, instrument names and parameters, test data values and units, and operation time. Traditional manual recording methods rely on the inspector's memory and writing habits, which easily leads to omissions such as forgetting to record reagent dosages or operation times, errors such as incorrect copying of values or confusion of units, and non-standard expressions such as non-compliance with standard terminology. These problems affect the completeness and standardization of the original records, making subsequent data review and quality traceability difficult.
[0005] Third, time-series recording is prone to omissions. Laboratory procedures involve multiple operations performed sequentially, such as sample pretreatment, property inspection, identification tests, physicochemical testing, and content determination. The execution time and duration of each step are crucial quality control parameters. For example, dissolution testing requires precise sampling at specified time points, titration operations require recording the titration duration, and heating or cooling steps require recording temperature and time. Traditional manual recording methods struggle to accurately record the timestamps of each operation in real time. This is especially true when inspectors are focused on precise operations, such as observing color changes at the titration endpoint, often failing to simultaneously record accurate operation times, leading to missing or inaccurate time-series information and affecting the traceability of the testing process. Therefore, there are still technical problems that need to be addressed in this field. Summary of the Invention
[0006] The purpose of this application is to at least partially solve one of the technical problems existing in the prior art.
[0007] Therefore, one objective of this application is to provide a semantically enhanced laboratory testing method and related equipment, which can improve the efficiency and accuracy of the laboratory.
[0008] To achieve the above technical objectives, the technical solution adopted in this application includes: a laboratory testing method based on semantic enhancement, comprising: acquiring received first text information; the first text information includes key event information of the current testing process stage in response to system inquiries from laboratory personnel and real-time collection of natural speech description information from laboratory personnel; performing forward semantic prediction and backward semantic verification on the first text information to obtain a laboratory event representation vector; the event representation vector is used to characterize laboratory events extracted from the first text information; determining the event boundaries of the laboratory events and performing multi-level classification and attribute extraction on the laboratory events to obtain processed laboratory events; performing event sequence continuity verification on the processed laboratory events, and if the verification passes, generating a laboratory log corresponding to the processed laboratory events.
[0009] In addition, the semantic enhancement-based laboratory testing method according to the above embodiments of the present invention may also have the following additional technical features:
[0010] Furthermore, in this embodiment of the application, obtaining the received first text information specifically includes:
[0011] Acquire key event voice information proactively reported by the experimenter at the current stage of the testing process, and passively monitor the experimenter's natural speech in real time;
[0012] The key event audio information and the natural speech are transcribed into text to obtain first text information; the first text information includes at least laboratory technical terms from the database.
[0013] Furthermore, in this embodiment of the application, the step of performing forward semantic prediction and backward semantic verification on the first text information to obtain the laboratory's event representation vector specifically includes:
[0014] A 12-layer Transformer encoder is used to encode the current process context, and a multi-head self-attention mechanism is used to predict the most likely event type and its probability distribution for the next step.
[0015] A bidirectional LSTM network is used to encode the preceding and following contexts, and a semantic consistency discriminator is used to detect whether the current event is consistent with the preceding and following contexts in terms of temporal logic and operational causality.
[0016] A multi-head attention weighting mechanism is used to integrate forward prediction and backward verification information. The fusion weights are dynamically adjusted through gating parameters to generate a 512-dimensional event representation vector.
[0017] Furthermore, in this embodiment of the application, determining the event boundary of the laboratory event specifically includes:
[0018] The start and end positions of each experimental event are accurately identified in the laboratory events extracted from the first text information;
[0019] The Conditional Random Field (CRF) sequence labeling algorithm is used to model event boundary localization as a BIO labeling task. The feature functions of the CRF sequence labeling algorithm include part-of-speech features, syntactic features, domain dictionary matching features, and context window features.
[0020] The event boundary of the laboratory event is obtained by decoding the optimal labeled sequence using the Viterbi algorithm.
[0021] Furthermore, in this embodiment of the application, determining the event boundary of the laboratory event further includes:
[0022] The identified event boundaries are precisely aligned with the timestamps of the original audio recordings to obtain the timestamp-aligned event boundaries.
[0023] Furthermore, in this embodiment of the application, the step of performing multi-level classification and attribute extraction on the laboratory events to obtain processed laboratory events specifically includes:
[0024] A TextCNN-based classifier is used to classify events into inspection types, operation types, and event detail extraction.
[0025] Further, in this embodiment of the application, the step of verifying the continuity of the processed laboratory events, and generating laboratory logs corresponding to the processed laboratory events if the verification passes, includes:
[0026] The system verifies whether the identified event sequence conforms to the logical rules of the experimental procedure. If it does, a laboratory log corresponding to the processed laboratory event is generated. The logical rules include a temporal rationality verifier, an operational integrity verifier, and a numerical rationality verifier. The temporal rationality verifier checks whether the event time order conforms to the operational logic based on a predefined temporal constraint rule base, which contains no less than 300 constraint rules. The operational integrity verifier compares the standard procedure to detect whether necessary steps are missing. The numerical rationality verifier checks whether the extracted numerical parameters are within a reasonable range.
[0027] On the other hand, embodiments of this application also provide a semantically enhanced laboratory testing system, including:
[0028] The acquisition unit is used to acquire the received first text information; the first text information includes key event information of the current testing process stage in response to the system's inquiry of the experimenter's active feedback and real-time acquisition of the experimenter's natural speech description information.
[0029] The first processing unit is used to perform forward semantic prediction and backward semantic verification on the first text information to obtain the event representation vector of the laboratory; the event representation vector is used to characterize the laboratory events extracted from the first text information.
[0030] The second processing unit is used to determine the event boundary of the laboratory event and perform multi-level classification and attribute extraction on the laboratory event to obtain the processed laboratory event.
[0031] The third processing unit is used to verify the continuity of the event sequence of the processed laboratory events. If the verification is successful, it generates the laboratory log corresponding to the processed laboratory events.
[0032] On the other hand, this application also provides a laboratory testing device based on semantic enhancement, comprising:
[0033] At least one processor;
[0034] At least one memory for storing at least one program;
[0035] When the at least one program is executed by the at least one processor, the at least one processor implements a semantically enhanced laboratory testing method as described in any one of the inventions.
[0036] In addition, this application also provides a computer-readable storage medium storing processor-executable instructions, which, when executed by a processor, are used to perform a semantically enhanced laboratory testing method as described in any of the preceding claims.
[0037] The advantages and beneficial effects of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application:
[0038] This application can obtain received first text information; the first text information includes key event information from the current testing process stage in response to system inquiries from lab technicians, as well as real-time collected natural language descriptions from lab technicians; perform forward semantic prediction and backward semantic verification on the first text information to obtain a laboratory event representation vector; the event representation vector is used to characterize the laboratory events extracted from the first text information; determine the event boundaries of the laboratory events and perform multi-level classification and attribute extraction on the laboratory events to obtain processed laboratory events; perform event sequence continuity verification on the processed laboratory events, and if the verification passes, generate a laboratory log corresponding to the processed laboratory events. This application can convert user-inputted text information into laboratory logs, thereby improving the efficiency and accuracy of the laboratory. Attached Figure Description
[0039] Figure 1 This is a schematic diagram illustrating the steps of a semantically enhanced laboratory testing method in a specific embodiment of the present invention;
[0040] Figure 2 This is a flowchart illustrating a semantically enhanced laboratory testing method in a specific embodiment of the present invention.
[0041] Figure 3 This is a schematic diagram of the structure of a semantically enhanced laboratory testing system in a specific embodiment of the present invention;
[0042] Figure 4 This is a schematic diagram of a semantically enhanced laboratory testing device in a specific embodiment of the present invention. Detailed Implementation
[0043] The following detailed description, in conjunction with the accompanying drawings, illustrates the principles and processes of the semantically enhanced laboratory testing method and related equipment in this invention.
[0044] Reference Figure 1 This application provides a laboratory testing method based on semantic enhancement. Figure 1 The method may include steps S101-S104.
[0045] S101. Obtain the received first text information; the first text information includes key event information of the current testing process stage in response to the system's inquiry of the experimenter's proactive feedback, as well as the real-time collected natural speech description information of the experimenter.
[0046] S102. Perform forward semantic prediction and backward semantic verification on the first text information to obtain the event representation vector of the laboratory; the event representation vector is used to represent the laboratory events extracted from the first text information.
[0047] S103. Determine the event boundaries of laboratory events and perform multi-level classification and attribute extraction on laboratory events to obtain processed laboratory events.
[0048] S104. Perform event sequence continuity verification on the processed laboratory events. If the verification passes, generate the laboratory log corresponding to the processed laboratory events.
[0049] In addition, the semantic enhancement-based laboratory testing method according to the above embodiments of the present invention may also have the following additional technical features:
[0050] Furthermore, in this embodiment of the application, the step of obtaining the received first text information specifically includes steps S201-S202.
[0051] S201. Acquire key event voice information actively reported by the experimenter at the current testing process stage, and passively monitor the experimenter's natural voice in real time.
[0052] S202. Transcribe the key event voice information and natural speech into text to obtain the first text information; the first text information includes at least the laboratory professional terms in the database.
[0053] Furthermore, in this embodiment of the application, the step of performing forward semantic prediction and backward semantic verification on the first text information to obtain the event representation vector of the laboratory specifically includes steps S301-S303.
[0054] S301. A 12-layer Transformer encoder is used to encode the current process context, and a multi-head self-attention mechanism is used to predict the most likely event type and its probability distribution for the next step.
[0055] S302. A bidirectional LSTM network is used to encode the preceding and following contexts. A semantic consistency discriminator is used to detect whether the current event is consistent with the preceding and following contexts in terms of temporal logic and operational causality.
[0056] S303 adopts a multi-head attention weighting mechanism to integrate forward prediction and backward verification information, and dynamically adjusts the fusion weights through gating parameters to generate a 512-dimensional event representation vector.
[0057] Furthermore, in the embodiments of this application, the step of determining the event boundary of the laboratory event specifically includes steps S401-S402.
[0058] The start and end positions of each experimental event are accurately identified in the laboratory events extracted from the first text information.
[0059] The Conditional Random Field (CRF) sequence labeling algorithm is used to model event boundary localization as a BIO labeling task. The feature functions of the CRF sequence labeling algorithm include part-of-speech features, syntactic features, domain dictionary matching features, and context window features.
[0060] The event boundary of the laboratory event is obtained by decoding the optimal labeled sequence using the Viterbi algorithm.
[0061] Furthermore, in this embodiment of the application, the step of determining the event boundary of the laboratory event also includes step S403.
[0062] S403. Accurately align the identified event boundaries with the timestamps of the original speech recording to obtain the timestamp-aligned event boundaries.
[0063] Furthermore, in this embodiment of the application, the step of performing multi-level classification and attribute extraction on laboratory events to obtain processed laboratory events specifically includes step S501.
[0064] S501. A TextCNN-based classifier is used to classify events into inspection types, operation types, and event detail extraction.
[0065] Furthermore, in this embodiment of the application, the processed laboratory events are subjected to event sequence continuity verification. If the verification passes, a laboratory log corresponding to the processed laboratory events is generated, including:
[0066] The system verifies whether the identified event sequence conforms to the logical rules of the experimental procedure. If it does, it generates the corresponding laboratory log for the processed laboratory event. The logical rules include a temporal rationality verifier, an operational integrity verifier, and a numerical rationality verifier. The temporal rationality verifier checks whether the time sequence of events conforms to the operational logic based on a predefined temporal constraint rule base. The rule base contains no less than 300 constraint rules. The operational integrity verifier compares the standard procedure to detect whether necessary steps are missing. The numerical rationality verifier checks whether the extracted numerical parameters are within a reasonable range.
[0067] The specific implementation principle of this application is explained below with reference to the accompanying drawings:
[0068] Reference Figure 2This embodiment provides a laboratory process event recognition system based on an event-driven bidirectional semantic enhancement algorithm. The system includes a voice interaction module, an event-driven bidirectional semantic enhancement engine, an event boundary precision localization module, a hierarchical event classification module, a standard knowledge base module, an event sequence coherence verification module, a high-precision experimental log generation module, and a human-machine collaborative verification module. The voice interaction module is used for bidirectional voice interaction with the lab technician and includes an active guidance unit and a passive listening unit. The active guidance unit proactively inquires about key event information from the lab technician based on the current stage of the testing process. The passive listening unit collects the lab technician's natural speech description in real time and transcribes it into text. An end-to-end speech recognition engine based on a deep neural network is integrated, achieving an accuracy rate of no less than 94% for recognizing laboratory technical terms. The event-driven bidirectional semantic enhancement engine is the core algorithm module of this system, used to extract experimental process events from speech text with high precision. It adopts the EDSE algorithm architecture, including a forward semantic prediction submodule, a backward semantic verification submodule, and a bidirectional semantic fusion submodule. The forward semantic prediction submodule uses a 12-layer Transformer encoder to encode the current process context and predicts the most likely event type and its probability distribution in the next step through a multi-head self-attention mechanism. The backward semantic verification submodule uses a bidirectional LSTM network to encode the preceding and following contexts and uses a semantic consistency discriminator to detect whether the current event is consistent with the preceding and following contexts in terms of temporal logic and operational causality. The bidirectional semantic fusion submodule uses a multi-head attention weighting mechanism to integrate forward prediction and backward verification information and dynamically adjusts the fusion weights through gating parameters to generate a 512-dimensional event representation vector. The event boundary precision localization module accurately identifies the start and end positions of each experimental event in the speech-transcribed text. It employs a Conditional Random Field (CRF) sequence annotation algorithm, modeling event boundary localization as a BIO annotation task. The optimal annotation sequence is decoded using the Viterbi algorithm. A timestamp alignment unit is also included to precisely align the identified event text boundaries with the timestamps of the original speech recording, achieving second-level accuracy in event time recording. The hierarchical event classification module performs multi-level classification and attribute extraction on the located events, constructing a three-layer classification system: the first layer is for testing phase classification, the second for operational behavior classification, and the third for event detail extraction. A pointer network-based multi-slot filling algorithm extracts structured attributes such as reagent names and dosages, instrument names and parameters, and test data values and units from the event description. The standard knowledge base module stores and retrieves standardized laboratory knowledge, storing structured data of the latest versions of industry standards and specifications. A graph database architecture is used to construct a knowledge graph, supporting precise matching retrieval based on sample names and similarity retrieval based on a dual-tower semantic coding model. The retrieval response time is no more than 500 milliseconds, providing the event recognition engine with standard process references and parameter rationality verification criteria.The event sequence coherence verification module verifies whether the identified event sequences conform to the logical rules of the experimental procedure. It includes a temporal rationality verifier, an operational integrity verifier, and a numerical rationality verifier. The temporal rationality verifier checks whether the event time sequence conforms to the operational logic based on a predefined temporal constraint rule base. The rule base contains no fewer than 300 constraint rules. When an unreasonable situation is detected, a manual confirmation process is triggered. The high-precision experimental log generation module automatically generates GMP-compliant laboratory raw records based on structured event records. It organizes the identified event information into a standardized JSON structure, selects the appropriate record template from the template library according to the sample type and test items, and uses a T5-based natural language generation model to convert the structured data into a natural language description conforming to standard specifications. It automatically inserts precise timestamps, calculates intermediate and final results, adds calculation processes and judgment conclusions, and generates raw records containing complete elements such as test date, sample information, test basis, operation process, test data, and test conclusions. The human-machine collaborative verification module is used for manual review and correction of automatically identified events and generated experimental logs. It provides a visual interactive interface, displaying the original speech text on the left with highlighted event boundaries, and the structured record and generated original record text on the right. Experimenters can modify the boundaries, classifications, and attributes of events with recognition errors, supporting both speech and text modification. Events with recognition confidence below a preset threshold are marked in yellow to prompt for manual review. The experimenter's correction operations are recorded as labeled data and fed back into the model training process through an active learning mechanism to continuously optimize the recognition accuracy.
[0069] The voice interaction module includes a microphone array acquisition unit, a real-time speech recognition unit, an active guidance unit, a passive monitoring unit, a context-aware response unit, a dialogue history management unit, a speech synthesis output unit, and an interaction priority control unit. The microphone array acquisition unit is equipped with at least four omnidirectional condenser microphones, employing beamforming technology to enhance the target direction speech signal by 15 to 25 dB. It integrates adaptive noise cancellation based on a minimum mean square error algorithm, with an audio sampling rate of 16 kHz or 24 kHz, supporting clear speech pickup within a 3-meter radius under ambient noise levels not exceeding 65 dB. The real-time speech recognition unit uses an end-to-end speech recognition model based on the Conformer architecture. The model contains 12 to 17 Conformer blocks, pre-trained on a general Chinese speech dataset and fine-tuned on a domain dataset containing over 5000 hours of laboratory scene speech. It achieves a 94% to 97% accuracy rate in recognizing laboratory terminology, employing streaming decoding with a first-word delay of no more than 500 milliseconds. The proactive guidance unit includes a process status tracking submodule, a guidance strategy generation submodule, and a guidance script synthesis submodule. The process status tracking submodule maintains the current inspection task status, including sample name, inspection items, current stage, completed steps, and missing parameters. The guidance strategy generation submodule uses a rule-based decision tree algorithm to determine the guidance timing and question type. Guidance timing includes stage transitions, before key operations, during operation pauses, and when information is incomplete. The guidance script synthesis submodule selects templates from a script library containing no less than 200 templates and fills in parameters to generate guidance scripts. An adaptive guidance strategy is used to dynamically adjust the guidance frequency based on the experimenter's response. The passive monitoring unit continuously collects the experimenter's natural speech descriptions and transcribes them into text. It uses a speech activity detection algorithm to determine if an audio segment contains valid speech. When a silence segment is detected lasting more than 500 milliseconds, the speech is considered finished and the recognized text is output. This includes a speaker recognition submodule that uses i-vector or x-vector-based voiceprint recognition technology to distinguish between the experimenter's, assistant's, and system speech to avoid misidentification. It also includes a continuous speech segmentation submodule that uses a bidirectional LSTM-based segmentation model to segment the continuous speech stream into semantically complete segments based on silence pauses, intonation changes, and semantic completeness. The context-aware response unit includes an intent recognition submodule and an entity extraction submodule. The intent recognition submodule uses a BERT-based text classification model to identify intent types such as event descriptions, data reports, and inquiries, with an intent recognition accuracy of no less than 92%. The entity extraction submodule uses a BERT-CRF named entity recognition model to identify entities such as sample names, reagent names, instrument names, values, and units, with an entity extraction F1 score of no less than 89%. Based on the identified intent and entities, it generates system responses such as confirmation responses, supplementary inquiries, information feedback, or anomaly prompts.The dialogue history management unit uses dialogue state tracking technology to maintain a structured dialogue state table. This table includes current testing task information, a list of identified events, extracted key parameters, unresolved missing information items, and dialogue history. It supports a pronoun-resolving function to complete pronouns and omitted expressions based on the dialogue history. It also supports information accumulation from multiple dialogues, merging information fragments extracted from multiple dialogues into a complete event record. The speech synthesis output unit uses end-to-end speech synthesis technology based on deep learning, including the Tacotron2 acoustic model and WaveGlow or HiFi-GAN vocoders. It improves the accuracy of professional terminology pronunciation by fine-tuning on laboratory-specific text-to-speech data. It supports adjusting speech rate, volume, and timbre parameters, with a speech rate range of 150 to 250 words per minute. The interaction priority control unit uses a priority decision-making mechanism combining rules and machine learning. Predefined high-priority operation scenarios include titration endpoint observation, instrument reading recording, and precision pipetting operations. In these scenarios, it automatically reduces the active guidance frequency or enters a silent mode. It also supports manual control of the interaction mode by the experimenter via voice commands or physical buttons.
[0070] The event-driven bidirectional semantic enhancement engine comprises a forward semantic prediction unit, a backward semantic verification unit, a bidirectional semantic fusion unit, an event type prediction unit, an event attribute extraction unit, a context propagation unit, an event confidence evaluation unit, and an incremental learning and update unit. The forward semantic prediction unit employs a 12-layer Transformer encoder architecture, with each layer containing a multi-head self-attention sublayer and a feedforward neural network sublayer. The multi-head self-attention mechanism includes eight attention heads with a total feature dimension of 512. It calculates the dependency between any two positions in the event sequence, learning long-distance temporal dependencies and causal relationships. The currently identified event sequence is input into the encoder, and the representation vector of the last event position is used as the semantic encoding of the current process state. The probability distribution of each event type is output through fully connected layers and softmax layers. A Top-K sampling strategy is used to select the top five event types with the highest probabilities as prediction candidates. Furthermore, the standard operating procedures corresponding to the current sample and inspection items are retrieved from the standard knowledge base as prior knowledge. Bayesian fusion is used to combine the prior probabilities and model prediction probabilities, achieving a forward prediction accuracy of over 91%. The backward semantic verification unit adopts a bidirectional long short-term memory (BiLSTM) network architecture, which includes two sub-networks: a forward LSTM and a backward LSTM. Each sub-network contains 2 to 3 LSTM layers with a hidden layer dimension of 256. The forward LSTM traverses backward from the start position of the event sequence to capture historical context information, while the backward LSTM traverses backward from the end position of the event sequence to capture future context information. The hidden states of the forward and backward LSTMs at each event position are concatenated to obtain a bidirectional representation vector with a dimension of 512 that integrates the preceding and following contexts. The semantic consistency discriminator adopts a binary classification model trained based on contrastive learning. The input is the bidirectional representation vector of the current event and the representation vectors of the preceding and following adjacent events, and the output is a consistency score. It can identify seven types of inconsistencies, including temporal contradictions, operational conflicts, numerical anomalies, logical errors, missing information, repeated operations, and stage jumps. When an inconsistency is detected, an anomaly label and a specific reason description are generated.The bidirectional semantic fusion unit employs a multi-head attention weighting mechanism to integrate forward prediction and backward verification information. It comprises eight attention heads, each independently calculating the attention weights between the forward prediction representation, the backward verification representation, and the original representation of the current event. These weighted weights are then summed to obtain the fused representation. A gating mechanism is introduced to dynamically adjust the contributions of forward prediction and backward verification. This gating mechanism includes a forward gate (alpha), a backward gate (beta), and a residual gate (gamma). The gating parameters are generated using a sigmoid activation function, ranging from 0 to 1. The fusion formula is EventRep = alpha × ForwardRep + beta × BackwardRep + gamma × OriginalRep, where alpha + beta + gamma = 1. The gating parameters are dynamically calculated based on the confidence of the current event, the consistency score between the preceding and following contexts, and the matching degree of the standard process. When the forward prediction confidence is high and the backward verification consistency is good, the values of alpha and beta are increased. When an anomaly is detected, gamma is increased to retain the original information and avoid over-correction. After fusion, a 512-dimensional event comprehensive representation vector is generated, which simultaneously contains prediction information based on historical sequences, verification information based on global context, and the original semantic information of the current event. The event type prediction unit adopts a hierarchical classification architecture. The first-layer classifier divides events into 7 inspection stage categories, including sample receiving, sample pretreatment, property inspection, identification test, physicochemical test, content determination, and result recording. It adopts a multilayer perceptron structure with two hidden layers of 256 and 128 dimensions, the activation function is ReLU, and the output layer is 7-dimensional softmax. The second-layer classifier further subdivides events into 14 specific operation types based on the inspection stage predicted by the first layer, including sampling, weighing, dissolving, diluting, transferring, adding samples, stirring, titrating, heating, cooling, filtering, centrifuging, observation, and determination. It adopts a multi-label classification architecture composed of 14 binary classifiers. Each binary classifier determines whether the current event belongs to the corresponding operation type, supporting the case where an event contains multiple operations. It also outputs the prediction confidence of each category. Prediction results with a confidence of less than 0.85 are marked as low confidence and require manual confirmation.The event attribute extraction unit adopts a sequence-to-sequence model based on pointer networks. The encoder encodes the event description text into a context representation sequence, and the decoder uses two pointers to point to the start and end positions of the attribute values in the original text to achieve boundary localization and extraction of attribute values. Independent extractors are trained for 15 attribute slot types, including reagent name, reagent dosage, instrument name, instrument parameters, temperature value, duration value, test data, and data unit. The encoder of each extractor shares the event representation vector, and the decoder is trained independently. It also includes an attribute value normalization submodule to convert the extracted original text into a standardized format. For example, "twenty-five point three milligrams" is normalized to the value 25.3 and the unit mg, "one hundred milliliters volumetric flask" is normalized to the container type volumetric flask and the capacity 100 ml, and the temperature "25 degrees Celsius" is normalized to the value 25 and the unit ℃. The overall F1 score of attribute extraction reaches more than 93%. The context propagation unit maintains a dynamic context state vector, which contains information on currently active samples, reagents, instruments, objects of operation, and environmental parameters. Each information slot includes a value, source event ID, activation time, and decay weight. When a new event is identified, if some attributes are missing, the corresponding slot value is searched from the context state vector to complete the information. During completion, the decay weight of the slot is considered; the further away the information is from the current event, the lower the decay weight. Information exceeding the time threshold or event distance threshold is automatically invalidated and no longer used for completion. It supports the resolution of pronouns such as "it," "the sample," and "the above solution." Based on syntactic analysis and semantic similarity, the referent is found from the context, and the pronoun is replaced with a specific entity. It also supports omission recovery. When the subject or object in the event description is detected to be omitted, the omitted component is inferred based on the context and operation type. For example, "add 100 ml" omits the solvent object and is completed as "add 100 ml of water" or "add 100 ml of methanol" based on the solvent type mentioned above. The event confidence assessment unit comprehensively considers multiple confidence sources, including speech recognition confidence, event classification confidence, attribute extraction confidence, forward prediction consistency, backward verification consistency, standard process matching degree, and multi-source information consistency. Speech recognition confidence comes from the word-level or sentence-level confidence output of the speech recognition model; event classification confidence comes from the maximum probability value output by the classifier; attribute extraction confidence comes from the boundary prediction probability of the extraction model; forward prediction consistency measures whether the current event is among the Top-K candidates in the forward prediction; backward verification consistency comes from the output score of the consistency discriminator; standard process matching degree measures the similarity between the current event sequence and the standard process; and multi-source information consistency checks whether the information obtained from speech and other sensors supports each other. A weighted average or logistic regression model is used to fuse multiple confidence sources into a final confidence score. Events with a confidence score below 0.85 are marked as requiring manual confirmation, and events with a confidence score below 0.6 are marked as potentially erroneous and need to be re-identified.The incremental learning update unit employs an active learning strategy, prioritizing samples with confidence levels between 0.6 and 0.85 for manual annotation. These samples, located in the model's uncertain regions, provide the greatest improvement to the model after annotation. Once sufficient new labeled samples are accumulated, incremental training of the model is triggered. During training, knowledge distillation technology is used, with the original model serving as the teacher model and the new model as the student model. By distilling the loss, the original knowledge is preserved while learning new data, avoiding catastrophic forgetting. It also supports an online learning mode where high-confidence recognition results, after simple manual verification, are directly used as training samples to update model parameters. The mini-batch gradient descent algorithm is used with a small learning rate to avoid significant disturbance to existing knowledge. The model's version history and performance metric changes are recorded, allowing the model to roll back to a previous stable version.
[0071] The event boundary precise localization module includes a text preprocessing unit, a feature extraction unit, a CRF boundary annotation unit, a multi-granularity boundary optimization unit, a timestamp forced alignment unit, an event temporal relationship annotation unit, a boundary confidence evaluation unit, and an incremental boundary correction unit. The text preprocessing unit preprocesses the transcribed text output from speech recognition, including text segmentation, part-of-speech tagging, and syntactic analysis. Text segmentation employs a segmentation algorithm based on a dictionary and statistical model. The dictionary contains a professional terminology list for the laboratory field, including over 5000 sample names, over 3000 reagent names, over 800 instrument names, and over 500 operational terms, ensuring that professional terms are not incorrectly segmented. Part-of-speech tagging uses a sequence tagging model based on BiLSTM-CRF. Syntactic analysis uses a dependency parsing algorithm to identify syntactic dependencies between words. It also performs time expression recognition and normalization, identifying absolute and relative time expressions in the text and normalizing them to a standard timestamp format. The feature extraction unit extracts rich feature representations for the CRF sequence labeling model, including word-level features, character-level features, part-of-speech features, syntactic features, domain features, and context features. Word-level features include word vector representations of the current word, the previous word, the next word, the two words before the current word, and the two words after the current word. The word vectors are 300-dimensional and pre-trained on a large-scale laboratory text corpus. Character-level features use character-level convolutional neural networks or bidirectional LSTMs to extract and capture the morphological information inside the word. Domain features include domain dictionary matching tags to indicate whether the current word matches a sample name dictionary, reagent name dictionary, instrument name dictionary, operation verb dictionary, or numerical unit dictionary. Context features use a sliding window with a window size of 5 to extract the features of the two words before and after the current word and concatenate them as the context representation of the current word. Transition features are also extracted to represent the label transition patterns between adjacent words. After concatenating all features, a comprehensive feature vector with a dimension of 800 to 1200 is formed for each word position. The CRF boundary labeling unit identifies the boundary locations of events by performing BIO labeling on text sequences based on extracted features. A Conditional Random Field (CRF) model is used to model the event boundary localization problem as a sequence labeling task. The label set includes B-Events representing the start boundary of an event, I-Events representing continuation within an event, and O-Events representing non-event text regions. The CRF model defines a feature function and a transition function. The feature function measures the score given the observed sequence and the label at the current position, while the transition function measures the score of label transitions to adjacent positions. The Viterbi algorithm is used to decode the optimal label sequence. The Viterbi algorithm uses dynamic programming to find the label sequence with the highest conditional probability among all possible label sequences. A constrained decoding strategy is also employed, adding label transition constraints, such as ensuring that an O-Event label cannot be directly followed by an I-Event label, to guarantee that the decoding result conforms to the BIO labeling specification.The multi-granularity boundary optimization unit performs post-processing optimization on the CRF annotation results to improve the accuracy of boundary localization. First, it performs a boundary rationality check to check whether the annotated event text constitutes a complete semantic unit. The judgment criteria include whether it contains a complete subject-verb-object structure, whether it forms a connected subgraph in the syntactic dependency tree, and whether the length of the event text is within a reasonable range. For unreasonable boundaries, it adjusts them by expanding or shrinking the boundaries using rule matching methods. It also uses a BERT-based boundary classifier for secondary judgment. The classifier input is the context text before and after the candidate boundary position, and the output is the probability of whether the position is a true boundary. When the CRF annotation results are inconsistent with the BERT classifier results and the BERT confidence is high, the BERT judgment result is used to correct the boundary. It supports the recognition of nested events and identifies the main event boundary and sub-event boundaries through hierarchical annotation. The timestamp forced alignment unit precisely aligns the identified event text boundaries with the timestamps of the original speech recording to achieve second-level accuracy in event time recording. It employs an acoustic model-based forced alignment algorithm. The acoustic model used in training the speech recognition system is either an HMM-GMM Gaussian mixture model or a DNN-HMM deep neural network model. The forced alignment process treats the identified text sequence as a known transcribed speech signal as the observation sequence and searches for the optimal path in the HMM state sequence space using the Viterbi algorithm. The optimal path provides the start and end times of each phoneme or character in the speech signal. Character-level timestamps are aggregated into word-level timestamps and further aggregated into event-level timestamps. The start time of an event is the start time of the first word of the event text, and the end time is the end time of the last word of the event text. The timestamp accuracy reaches the second level, meeting the second-level accuracy requirement. The event sequence relationship annotation unit identifies the sequence relationships between multiple events, defining five types of sequence relationships: sequential, simultaneous, containment, overlap, and independence. It automatically determines the sequence relationship based on the event timestamps. When the end time of event A is earlier than the start time of event B and the time interval is less than a threshold, it is determined to be a sequential relationship. When the time intervals of two events overlap by more than 80%, they are determined to be simultaneous. When the time interval of one event completely contains the time interval of another event and they describe operations at different granularities, they are determined to be containment. Explicit sequence connectors are also extracted from the event description text as supplementary evidence for sequence relationship determination. The annotated sequence relationships are used for subsequent event sequence coherence verification and process stage positioning.The boundary confidence assessment unit evaluates the reliability of each identified boundary and generates a boundary confidence score. It comprehensively considers the marginal probability of the CRF model, the probability of the Viterbi decoding path, the output probability of the BERT boundary classifier, the results of the boundary rationality check, and the confidence of timestamp alignment. The CRF marginal probability calculation is efficiently calculated using a forward-backward algorithm to determine the probability of a certain position being labeled with a specific tag under a given observation sequence. Multiple confidence sources are fused into the final boundary confidence score using a logistic regression model or a multilayer perceptron. Boundaries with a confidence score below 0.8 are marked as uncertain boundaries and indicated by dashed lines in the visualization interface for manual review. Boundaries with a confidence score below 0.5 are considered to be potentially erroneous and trigger the boundary re-identification process. The incremental boundary correction unit corrects the boundaries of identified events based on subsequently identified events and human feedback, maintains the historical record of event boundary corrections, checks whether there is a boundary conflict with the identified events when a new event is identified, and adopts a conflict resolution strategy to prioritize retaining the boundary with higher confidence or splitting the overlapping area into two independent events or merging it into a composite event containing multiple sub-operations. It receives human correction instructions from the human-machine collaborative verification module. When the user manually adjusts the boundary position of an event, it updates the event boundary and recalculates the timestamp alignment. At the same time, it records the correction information as training samples and feeds it back to the boundary labeling model in the incremental learning process.
[0072] The hierarchical event classification module includes a testing phase classification unit, an operational behavior classification unit, an event detail extraction unit, an attribute value normalization unit, a hierarchical feature fusion unit, a classification uncertainty handling unit, a classification result verification unit, and an incremental classification optimization unit. The classification unit for the inspection stage adopts a text classification model based on TextCNN, defining seven inspection stage categories: sample reception, sample pretreatment, morphology inspection, identification test, physicochemical inspection, content determination, and result recording. The TextCNN model includes a word embedding layer, a convolutional layer, a max pooling layer, and a fully connected output layer. The word embedding layer maps each word in the event text to a 300-dimensional word vector. The convolutional layer uses three different sizes of convolutional kernels: 3, 4, and 5, with 128 kernels configured for each size. The convolutional kernels slide across the word vector sequence to extract n-gram features and capture local semantic patterns of different lengths. The max pooling layer takes the maximum value of the output of each convolutional kernel to obtain a fixed-length feature representation. The pooling results of the three sizes of convolutional kernels are concatenated to obtain a 384-dimensional feature vector. The fully connected layer maps the feature vector to a 7-dimensional output space and outputs the probability distribution of each stage through a softmax activation function. The model was trained on an experimental stage classification dataset containing 20,000 labeled samples, and the classification accuracy of the first layer reached 98.2%. The operational behavior classification unit defines 14 categories of operational behaviors, including sampling, weighing, dissolving, diluting, transferring, adding samples, stirring, titrating, heating, cooling, filtering, centrifuging, observation, and measurement. A BERT classification model fine-tuned on the experimental corpus is used. The BERT model contains a 12-layer Transformer encoder with 768 hidden layers and a multi-head attention mechanism with 12 attention heads. The model has approximately 110 million parameters. When event text is input into the BERT model, a special marker [CLS] is added to the beginning of the text. The BERT encoder performs deep semantic encoding to extract [CLS]. The output vector at the [position] is used as the semantic representation of the entire event text. This vector is mapped to a 14-dimensional operation category space through dropout and fully connected layers. The sigmoid activation function is used to support multi-label classification because an event may contain multiple operations at the same time. The BERT model is first pre-trained on a general Chinese corpus and then fine-tuned on an experimental operation classification dataset containing 15,000 labeled samples. During fine-tuning, the parameters of the bottom 6 layers are frozen and only the top 6 layers and the classification head are fine-tuned. The classification accuracy of the second layer reaches 95.7%, and the F1 score of multi-label classification reaches 94.3%.The event detail extraction unit defines 15 attribute slot types, including reagent name, reagent dosage, reagent unit, solvent name, solvent volume, container type, container capacity, instrument name, instrument model, instrument parameters, temperature value, duration value, test data, data unit, and anomaly description. It uses a multi-slot filling algorithm based on pointer networks. This algorithm consists of a shared encoder and multiple independent decoders. The shared encoder uses a BiLSTM architecture to encode the event text. The BiLSTM contains 2 hidden layers with a dimension of 256. The outputs of the forward LSTM and the backward LSTM are concatenated to obtain a context representation vector of 512 dimensions for each word position. Each attribute slot corresponds to an independent pointer network decoder. The decoder contains a start position pointer and an end position pointer. The start pointer calculates the probability distribution of each position in the text as the start position of the attribute value through an attention mechanism. The end pointer similarly calculates the probability distribution of the end position. The start position and end position with the highest probability are selected to determine the boundaries of the attribute value in the original text, thus achieving the precise extraction of the attribute value. A multi-task learning framework is used for joint training. The 15 slot extractors share the encoder parameters and the decoder parameters are independently optimized among all tasks. The overall F1 value of slot filling reaches 93.4%, with the F1 value of reagent name extraction being 96.2%, the F1 value of numerical extraction being 94.8%, and the F1 value of instrument name extraction being 95.1%. The attribute value normalization unit converts the extracted original text attribute values into a standardized format, including a numerical normalization sub-module, a unit normalization sub-module, and an entity standardization sub-module. The numerical normalization sub-module processes the conversion between Chinese numeral expressions and Arabic numeral expressions, converts "twenty-five point three" to 25.3, "one hundred" to 100, and "five thousandths" to 0.005, and also processes scientific notation expressions, range expressions, and approximate number expressions. The unit normalization sub-module establishes a unit dictionary and unit conversion rules to unify "milligram", "mg", and "MG" into the standard unit "mg", and "degree Celsius", "degree", and "℃" into "℃", and supports unit conversion, such as converting "0.5 grams" to "500 mg". The entity standardization sub-module maps sample names, reagent names, and instrument names to a standard dictionary to handle abbreviations, aliases, and typos, and also processes compound expressions, such as decomposing "25 mg / 100 ml" into the numerical value 25 and the unit mg / 100 ml.The hierarchical feature fusion unit integrates the results of three-layer classification to form a complete semantic representation of the event. An attention mechanism is used to calculate the importance weights of the classification results at different levels. The classification results of the first-layer verification stage are encoded as 7-dimensional one-hot vectors. The classification results of the second-layer operation behavior are encoded as 14-dimensional multi-label vectors. The attribute extraction results of the third layer are organized into structured key-value pairs and encoded as fixed-dimensional vector representations. Attribute embedding technology is used to map each attribute type to a 64-dimensional embedding vector. All attribute embedding vectors are aggregated into a unified attribute feature vector through average pooling or attention pooling. The three-layer feature vectors are concatenated and then fused through a multilayer perceptron. The fused event representation vector has a dimension of 512 and contains the event's stage information, operation information, and detailed information. The consistency score of the three-layer classification results is also calculated to check whether the second-layer operation classification matches the first-layer stage classification and whether the attributes extracted in the third layer match the second-layer operation. The classification uncertainty handling unit addresses situations where classification results are uncertain or ambiguous. It defines three sources of uncertainty: low model confidence, similar probabilities across multiple categories, and conflicts between the classification result and the context. When the maximum probability of the first-level stage classification is below 0.9 or the probability difference between the top two categories is less than 0.1, the stage classification is considered uncertain. A context-assisted discrimination strategy is employed, referencing the stage categories of adjacent events. The temporal coherence of the verification process is used to infer the most likely stage of the current event. A Hidden Markov Model is used to model the stage transition probabilities, and the posterior probabilities of each stage are recalculated by combining the model output probability and the transition probability. When multiple labels appear in the second-level operation classification and semantic conflicts exist between labels, rule constraints are used to resolve the conflicts. When the third-level attribute extraction results are incomplete or contain extraction errors, a supplementary extraction process is triggered, using an active guidance unit to query the experimenter for missing attribute information. The classification result verification unit verifies the rationality of the classification results. It retrieves the standard procedures for the current sample and test items from the standard knowledge base, compares the identified event sequence with the standard procedures, checks whether the event stage classification conforms to the stage sequence of the standard procedures, checks whether the operation classification includes the necessary operations required by the standard procedures, and checks whether the extracted reagents, instruments, and parameters are consistent with the standard methods. It defines rationality constraints, such as the "content determination" stage must include the "determination" operation, and the "weighing" operation must include mass value and unit attribute. When the classification result violates the constraint rules, a verification failure warning is generated. It also checks the rationality of the numerical range of attribute values, such as the weighing mass should be within the balance range, the added liquid volume should not exceed the container capacity, the temperature should be within the instrument setting range, and the pH value should be between 0 and 14.The incremental classification optimization unit continuously optimizes the classification model based on human feedback and newly labeled data. It adopts an active learning strategy to select samples with the most information and request human annotation. The selection criteria include samples with low classification confidence, samples whose model predictions are inconsistent with the rule verification results, and samples containing newly appearing samples or test items. When enough new labeled samples are accumulated, incremental training of the model is triggered, and incremental updates are performed on the three-layer classifier. The TextCNN stage classifier continues to be trained with a fixed learning rate, while the BERT operation classifier is fine-tuned with a smaller learning rate to avoid catastrophic forgetting. The pointer network attribute extractor adopts an experience replay mechanism to randomly sample some old samples for mixed training while training new samples to maintain the memory of old knowledge. It records the model version and performance index change trajectory to support the model rollback to a historical stable version.
[0073] The standard knowledge base module includes a structured data storage unit, an exact match retrieval unit, a semantic similarity retrieval unit, a knowledge graph reasoning unit, an external knowledge source integration unit, an inspection process template management unit, a parameter rationality verification unit, and a knowledge base update and maintenance unit. The structured data storage unit uses the Neo4j graph database architecture to store the latest version of structured knowledge data from industry standards and specifications. The standard specification data is organized into a graph structure, with node types including: sample nodes storing 5982 basic information items such as sample common name, type, and specifications; inspection item nodes storing information on items such as appearance inspection, identification tests, physicochemical tests, and content determination; operation step nodes storing detailed operation steps such as sampling, weighing, dissolving, adding samples, and determination; reagent nodes storing over 3200 types of information such as reagent name, chemical formula, purity requirements, and preparation methods; and instrument nodes. The system stores over 800 types of information, including instrument names, models, technical parameters, and operating procedures. Edge relationship types include "Applicable to" connecting samples and test items, "Contains" connecting test items and operating procedures, "Requires" connecting operating procedures and reagents, "Uses" connecting operating procedures and instruments, and "Complies with" connecting test items and quality limits. It also stores detailed step texts for 23,678 test methods and 186,547 quality limit data entries, totaling approximately 8.7 GB. Index optimization techniques were used to create B-tree indexes for frequently queried fields such as sample names and test item names to improve retrieval efficiency. The precise matching retrieval unit performs precise matching retrieval based on sample name, type, and specifications. It uses the Cypher graph query language to construct query statements. When a sample name and specifications are entered, the graph query returns all the corresponding test items and operation steps for that sample. It supports multi-condition combined queries, allowing simultaneous specification of multiple query conditions such as sample name, type, specifications, and manufacturer. Multiple conditions are connected using AND logic. It also supports fuzzy matching. When precise matching fails, fuzzy matching is automatically initiated. It matches a portion of the sample name using regular expressions or finds the sample name with the highest similarity using the edit distance algorithm. The average response time for precise retrieval is 120 milliseconds, and the hit rate reaches 87%.The semantic similarity retrieval unit performs semantic similarity retrieval when exact matching fails. It employs a dual-tower semantic encoding model, consisting of a query encoder and a document encoder. Both encoders use the same BERT architecture but are trained independently. The query encoder encodes the input sample text into a 768-dimensional query vector, while the document encoder encodes each sample standard document in the knowledge base into a 768-dimensional document vector. Vector representations of all documents in the knowledge base are pre-computed offline and stored in the Faiss vector database. During online retrieval, only the query vector needs to be computed, and the MIPS algorithm (Maximum Inner Product Search) is used to retrieve the top-10 most similar document vectors from the vector database. Cosine similarity is used for similarity calculation. The dual-tower model is trained on a dataset containing 50,000 sample query-document pairs using a contrastive learning loss function that maximizes the similarity of positive sample pairs and minimizes the similarity of negative sample pairs. After training, the model achieves a retrieval accuracy of 89.3% on the test set, with an average semantic retrieval response time of 380 milliseconds. The knowledge graph reasoning unit performs multi-hop reasoning queries based on graph structures, supporting complex relational path queries, such as querying "which instruments are needed for content determination". The query path is constructed and the graph traversal algorithm searches for all instrument nodes that match the path pattern along the relational edges. The breadth-first search algorithm is used for graph traversal, and the maximum traversal depth is set to 5 to avoid over-search. It supports path constraints such as edge attribute filtering and node attribute filtering, and also supports semantic reasoning to identify the superordinate and subordinate concepts of the sample. The external knowledge source integration unit integrates external chemical and professional domain databases to supplement the knowledge base information. It calls the PubChem database's REST API interface to query the molecular formula, molecular weight, chemical structure, physicochemical properties, and safety data of compounds based on the sample's chemical name or CAS number. The API returns chemical data in JSON format. It associates external data with sample nodes and reagent nodes in the knowledge graph to establish association edges for compounds with similar chemical structures. It also supports the integration of multiple external data sources such as sample instruction manual databases, adverse reaction databases, and substance interaction databases. It uses data fusion technology to integrate multi-source heterogeneous data and uses an entity alignment algorithm to identify entities pointing to the same sample in different data sources and merge them. The average response time of external API calls is 850 milliseconds, and the timeout is set to 3 seconds to avoid affecting the overall search performance.The Inspection Process Template Management Unit manages standardized inspection process templates. It extracts the operation flow of inspection methods from standard specification data and organizes the process into a directed acyclic graph structure. Nodes in the graph represent operation steps, and edges represent the sequence or dependency relationship between steps. Each operation step node includes attributes such as step name, operation description, required reagents and dosage, required instruments and parameters, expected results, and quality control points. A standard process template is defined for each inspection item. The template includes mandatory steps and optional steps. Mandatory steps are operations that must be performed to complete the inspection. Optional steps are selected and executed according to specific circumstances. The unit supports the instantiation of process templates to generate personalized inspection processes from templates based on specific samples and inspection conditions. There are a total of 126 process templates covering common laboratory scenarios. The parameter rationality verification unit verifies whether the parameters in the event identification results conform to standard specifications and physical constraints. It retrieves the parameter range requirements for the corresponding test items from the knowledge base, including reagent dosage range, instrument parameter range, temperature range, time range, and numerical range. The identified parameter values are compared with the standard range to determine whether they are within a reasonable range. Three levels of verification rules are defined: the first level is the hard constraint rule, such as the weighed mass cannot be negative, the pH value must be between 0 and 14, and the temperature cannot exceed the instrument's maximum operating temperature. Parameters that violate hard constraints are marked as errors and need to be re-identified. The second level is the standard range constraint, such as the reference standard weighing should be within the mass range specified by the standard. Parameters that exceed the standard range are marked as warnings and require manual confirmation. The third level is the empirical range constraint, which is the range of commonly used parameters based on historical data statistics. Parameters that exceed the empirical range but are within the physically possible range are marked as abnormal and prompt the user to pay attention. It also checks the logical consistency between parameters, such as the solution volume cannot exceed the container capacity and the total amount of added reagent should match the final solution volume. The knowledge base update and maintenance unit manages the knowledge base through version control and incremental updates. It monitors version updates of industry standards and specifications, and initiates the knowledge base update process when a new version of the standard or specification is released. It performs structured processing on newly added samples, revised standards, and updated methods and imports them into the knowledge base. It adopts a differential update strategy to compare the differences between the old and new versions of the standard or specification, updating only the changed parts to avoid a full reconstruction. Update operations include adding new nodes, modifying node attributes, adding new relationships, and deleting outdated information. It also supports the addition of user-defined knowledge. Laboratories can import their internal testing procedures, testing methods for special samples, empirical parameter ranges, and other knowledge into the knowledge base. User-defined knowledge is stored separately from standard knowledge to avoid contaminating standard data. It records the modification history and version information of the knowledge base, supports version rollback, and regularly performs knowledge consistency checks to detect and repair anomalies such as isolated nodes, dangling edges, and circular dependencies in the graph structure.
[0074] The event sequence coherence verification module includes a timing rationality verification unit, an operation integrity verification unit, a numerical rationality verification unit, a logical consistency verification unit, an anomaly pattern detection unit, a multi-source information cross-verification unit, and a verification result hierarchical processing unit. The timing rationality verification unit checks whether the time sequence of events conforms to the logical rules of experimental operations. It maintains a timing constraint rule library containing no less than 300 constraint rules. Rule types include strict sequential relationships such as "weighing must be done before dissolution", "preparation of reference standard must be done before content determination", and "sample addition must be done before instrument measurement", time interval constraints such as "after heating, it must be cooled to room temperature before proceeding to the next operation, and the cooling time is usually 10 to 30 minutes" and "the sampling time point for dissolution determination must be strictly in accordance with the specified time", and prohibition of simultaneous relationships such as "heating and cooling cannot be performed simultaneously" and "the same sample cannot be subjected to two different test items at the same time". The timing logic reasoning engine represents the event sequence as event points on the time axis. Each event point includes a start time, end time, and event type. It traverses all constraint rules to check whether the event sequence meets the constraint conditions. When a violation of the constraint is found, a timing conflict report is generated, which includes the specific conflicting event, a description of the violated rule, and a suggested correction scheme. It also calculates the rationality of the time interval between events and issues a warning when the time interval between two related events is too short or too long. The operational integrity verification unit detects whether any necessary operational steps are missing from the identified event sequence. It retrieves the standard test procedure template corresponding to the current sample and test item from the standard knowledge base. The procedure template defines the sequence of operational steps that must be performed to complete the test item and their order. A sequence alignment algorithm is used to compare the identified event sequence with the standard procedure template. The alignment algorithm is based on dynamic programming to calculate the longest common subsequence and identify the executed and missing steps, distinguishing between mandatory and optional steps. Mandatory steps are key operations that must be performed to complete the test, such as content determination, which must include steps such as "preparing the test solution", "preparing the reference solution", "determination", and "calculating the content". Optional steps are selected and executed according to the specific situation. When a mandatory step is detected to be missing, a serious warning is generated, triggering active guidance to ask the laboratory technician whether the step has been executed. When an optional step is detected to be missing, only a prompt message is recorded without mandatory supplementation. The unit also checks the rationality of the step execution order. When the actual execution order is inconsistent with the standard order, it is judged as a process deviation, and the rationality of the deviation needs to be manually confirmed.The numerical rationality verification unit checks whether the numerical parameters extracted in the event are within the physically possible range and standard requirements. It defines three layers of numerical constraints. The first layer is physical constraints, including basic physical laws such as mass must be greater than 0, volume must be greater than 0, temperature must be above absolute zero, pH value must be between 0 and 14, percentage must be between 0% and 100%, and concentration cannot be negative. Values violating physical constraints are judged as identification errors and require re-identification or manual input. The second layer is equipment constraints, including weighing mass typically ranging from 0.1 mg to 220 g within the balance's range, and the added liquid volume not exceeding... The container capacity and temperature are typically within the operating range of heating or refrigeration equipment, ranging from -20℃ to 200℃. The centrifugation speed should not exceed the maximum speed of the centrifuge. The high-performance liquid chromatography flow rate is typically within the pump flow rate range, ranging from 0.1 to 5 ml / min. Values that violate equipment constraints are judged as parameter setting errors and marked as warnings. The third layer consists of standard constraints, including that the weighing of reference standards should be within the mass range specified in the standard, the amount of reagents should conform to the amount specified in the standard method, and the test data should be within the quality limit requirements. Values that violate standard constraints require manual verification to determine whether they are genuine non-compliant results or identification errors. The logical consistency verification unit checks whether the information in the event sequence is logically self-consistent, and checks the material conservation relationship. For example, if 25mg of sample is weighed and completely transferred to a 100ml volumetric flask for dissolution, and then 5ml of this solution is taken for measurement, the sample mass in the test solution should be 1.25mg. The unit verifies whether the quantitative relationship of each step matches through material conservation calculations. It also checks the consistency of concentration and dilution relationship. When describing the dilution operation, it verifies whether the concentration after dilution is consistent with the dilution factor. It checks the consistency of repeated measurements. Standard specifications require most test items to be measured in parallel 2 to 6 times. It verifies whether the number of measurements identified meets the requirements and whether the data from multiple measurements are within a reasonable deviation range. When the difference between multiple measurement data is too large, it indicates that there may be an operational error or recording error. It also checks the correctness of unit conversion. When the same parameter is expressed in different units in different steps, it verifies whether the conversion relationship is correct.The abnormal pattern detection unit identifies abnormal patterns and suspicious operations in event sequences. Based on historical data statistics, it establishes a normal operation pattern library, recording typical event sequences, commonly used parameter ranges, average operation time, and other statistical characteristics for each test item. When the identified event sequence deviates significantly from the normal pattern, it is judged as abnormal. Abnormal patterns include abnormal operation time (e.g., a step normally takes 10 to 15 minutes but is actually recorded as 2 minutes or 60 minutes), abnormal parameter values (e.g., the commonly used volume of a reagent is 50 ml but is actually recorded as 5 ml or 500 ml), abnormal operation frequency (e.g., performing the same weighing operation three times consecutively), and step skipping (e.g., jumping directly from sample pretreatment to result recording without all test steps). The unit uses the isolated forest algorithm or the local anomaly factor algorithm for anomaly detection, taking the feature vector of the event sequence as input and outputting an anomaly score. Event sequences with scores higher than the threshold are marked as suspicious and require manual review. The unit also detects repeated operation patterns. When it detects repeated execution of the same operation with identical parameters within a short period of time, it determines whether it is a misoperation or duplicate recording and prompts the user for confirmation. The multi-source information cross-validation unit integrates data from different information sources for cross-validation. It integrates event information from voice recognition, data automatically recorded by instruments, weighing data output by electronic balances, and temperature curves recorded by temperature control devices, checking whether information from different sources supports each other. For example, it compares and verifies the voice description "weigh 25.3 mg of sample" with the data recorded by the electronic balance, and compares and verifies the heating temperature described by the voice with the temperature curve recorded by the temperature control device. It calculates the consistency score of multi-source information. When there are conflicts between data from different sources, it analyzes the severity of the conflict and possible causes. It prioritizes the data automatically recorded by instruments because it is more accurate, but at the same time prompts the user to check whether there are recognition errors or slips of the tongue in the voice recording. It also uses timestamp information to verify the time consistency of the event occurrence. It checks whether the event time recorded by the voice and the operation time recorded by the instrument are within a reasonable time window. If the time difference exceeds the threshold, it is determined that the time recording is inconsistent and manual confirmation is required.The verification result classification processing unit classifies verification issues into four levels: Critical Error Level: This includes serious issues such as violations of physical constraints, temporal logic contradictions, and missing mandatory steps. These issues prevent log generation and must be corrected immediately. Warning Level: This includes issues requiring attention such as violations of equipment constraints, exceeding standard ranges, and abnormal operation sequences. These issues allow the process to continue but are marked as requiring manual review. Hint Level: This includes minor issues such as parameters deviating from the expected range, slightly abnormal time intervals, and missing optional steps. These issues only record hints for user reference. Information Level: This includes non-problem information such as operation suggestions and optimization reminders. Different processing strategies are adopted according to the issue level. Critical Error Level triggers a mandatory manual confirmation dialogue process. Warning Level issues are highlighted in the generated log. Hint Level issues are summarized at the end of the log. Information Level issues do not affect log generation and are only recorded in the system log. The system log also records the results and processing measures for each verification, including the type of problem found, problem description, triggered rules, processing methods, and manual confirmation results, forming a verification log for subsequent analysis and rule optimization.
[0075] The high-precision experimental log generation module includes an event information structuring unit, a record template management unit, a natural language generation unit, a timestamp insertion unit, a data calculation and processing unit, a test conclusion generation unit, a record integrity check unit, and a multi-format output unit. The event information structuring unit organizes the identified and verified event information into a standardized JSON structure, defining a unified event data schema. Each event object contains 22 standard fields, including a unique event identifier (ID), event type (type), testing phase (phase), operation name (operation), start timestamp (start_time, accurate to the second), end timestamp (end_time), duration, operator, reagent information (reagents, an array containing reagent names, quantities, and units), solvent information (solvents), instrument information (instruments, instrument name, model, and parameters), temperature conditions, operation object, test data (test_data, containing values and units), calculation formula, intermediate result (intermediate_result), final result (final_result), quality limit requirement (limit), judgment result (judgment), abnormal flag (abnormal_flag), confidence level, and remarks. Multiple event objects are organized into an event array in chronological order and metadata is added, including global information such as sample name, batch number, specifications, testing items, testing basis, submitting unit, testing personnel, and testing date, generating a complete structured test record JSON document. The record template management unit manages original laboratory record templates that comply with GMP requirements. It maintains a template library containing no fewer than 100 commonly used laboratory record templates. Templates are categorized by sample type (chemical sample templates, natural product templates, biological product templates) and by test item (property inspection templates, identification test templates, physicochemical test templates, content determination templates, etc.). Each template defines the original record's document structure, chapter divisions, required fields, optional fields, data table format, and text expression specifications. Templates are written using the Jinja2 template language and support dynamic content generation functions such as variable substitution, conditional judgment, and loop iteration. Templates include fixed text parts such as titles, headers, field labels, etc., as well as dynamic content parts marked with placeholders. The system automatically selects the most matching template based on the input sample type and test item. The selection strategy combines rule matching and similarity calculation; when multiple candidate templates exist, the matching degree between the structured data and the template fields is calculated, and the template with the highest matching degree is selected.The natural language generation unit converts structured event data into natural language descriptions that conform to standard specifications. It adopts a sequence-to-sequence generation model based on the T5 architecture. The T5 model includes an encoder and a decoder, both of which adopt a 12-layer Transformer structure with approximately 220 million parameters. The encoder converts the JSON representation of structured events into a sequence representation, with each field separated by a special marker. The encoder outputs a semantic representation vector of the event. The decoder uses an autoregressive approach to generate natural language descriptions word by word. The generation model is trained on a parallel corpus containing 50,000 pairs of structured data and standard specification descriptions. It learns to convert structured fields into standard expressions, such as converting the structured data of a weighing operation into "precisely weigh XX reference standard XX mg", and converting a dissolving operation into "add XX solvent XX ml to dissolve". It supports context-aware generation, adjusting subsequent expressions based on previously generated content to avoid repetition and redundancy. The fluency score of the generated text reaches 4.6 out of 5, and the standard specification compliance reaches 96%. The timestamp insertion unit automatically inserts precise timestamp information into the generated raw records, extracting start and end times from structured event data with second-level precision. The time format adopts the ISO 8601 standard format or a localized format. Timestamps are inserted after each key step in the operation process description. The timestamp insertion positions include the start time of each inspection stage, the execution time of each operation step, the time of each data record, and the time of occurrence of abnormal situations. The timestamps are embedded in text in brackets, such as "Precisely weigh 25.3 mg of a certain reference standard (09:15:32)". It also calculates and inserts the duration of the operation. For time-consuming steps such as heating for 30 minutes and dissolution determination for 60 minutes, the duration is clearly marked in the description. The unit verifies the rationality of the timestamps, checks whether the time sequence is increasing, whether the time interval is reasonable, and whether the total inspection time is within the normal range. When time abnormalities are found, they are marked as items to be confirmed. The data processing unit automatically calculates intermediate and final results according to the calculation formulas specified in the testing standards. It retrieves the corresponding calculation formulas for the testing items from the standard knowledge base. The formula types include content calculation formulas, recovery rate calculation formulas, relative standard deviation calculation formulas, dissolution rate calculation formulas, etc. The symbolic computing engine SymPy is used to parse and execute mathematical formulas. The formulas are stored in string form, such as content calculation formulas. The variable values required for the formula are extracted from structured event data and automatically substituted into the formula for calculation. The complete record of the calculation process is retained. The generated original record includes the textual description of the calculation formula, the substituted values of each variable, the calculation steps, and the final result. Significant figures and numerical rounding are processed according to the standard specifications. The content determination results are retained to one decimal place, the relative standard deviation is retained to two decimal places, and the absorbance is retained to three significant figures. The rounding rule adopts the principle of rounding to even numbers.The test conclusion generation unit automatically generates test conclusions based on test data and quality limit requirements. It retrieves the quality limit requirements and judgment rules for the current test item from the standard knowledge base, compares the calculated test results with the quality limits, and the judgment rules include upper limit judgment, lower limit judgment, range judgment, and compliance judgment. Based on the judgment results, it generates individual conclusions and overall conclusions. The format of an individual conclusion is "Test Item Name: Compliant or Non-compliant". When the test data is within the quality limit, it is judged as compliant; when it exceeds the range, it is judged as non-compliant, and the exception is noted. The overall conclusion is a comprehensive judgment based on the individual conclusions of all test items. When all items comply with the requirements, the conclusion "This sample complies with the relevant provisions of the sample name item in the [version] of the industry standard specification" is generated. When there are non-compliant items, the conclusion "This sample does not comply with the specific test items" is generated. The record integrity check unit checks whether the generated original records contain all required elements. It defines a list of required elements for original records as required by GMP standards, including 22 items such as test report number, test date, submitting unit, sample name, sample batch number, sample specifications, manufacturer, test item, test basis, test method description, detailed operation process record, reagent information, instrument information, original test data record, data processing process, calculation formula and results, test conclusion, inspector's signature, and test completion date. It verifies the completeness of each item in the generated records, including the consistency of date format, correct number of significant figures for numerical values, standardized unit labeling, neat table alignment, and correct punctuation. When missing items or format errors are found, an inspection report is generated listing the specific problems and areas for improvement. The multi-format output unit outputs the generated raw records in multiple formats, supporting JSON format output for inter-system data exchange and storage; Word format output using the python-docx library to generate docx documents that meet format requirements, including titles, tables, text paragraphs, headers, and footers; PDF format output using the ReportLab library or by converting Word documents to PDF documents; PDF documents have anti-tampering features and ensure document integrity through digital signature technology; HTML format output for web page display and print preview; embedding electronic signature areas in Word and PDF documents to reserve signature positions for inspectors, checkers, and reviewers; embedding QR codes in PDF documents containing the unique identifier and hash value of the original record; scanning the QR code allows users to query the electronic version of the record in the system and verify that the document has not been tampered with; and printing output that conforms to A4 paper specifications, with margins, fonts, and sizes meeting document management requirements, and including page numbers, printing time, and document identification information.
[0076] The human-machine collaborative verification module includes a visual interactive interface unit, a confidence level visualization unit, a boundary adjustment unit, a classification correction unit, an attribute editing unit, a voice correction interaction unit, a correction history unit, an active learning feedback unit, and a collaborative review management unit. The visual interactive interface unit adopts a split-screen layout. The left side displays the original text of the voice recognition and highlights event boundaries in color, with different colors used for different verification stages. The right side displays structured event records at the top and the generated original record text at the bottom. Color-coded lines connect the left and right sides, enabling bidirectional association. Clicking on content on either side automatically locates and highlights the corresponding area on the other side. It supports functions such as filtering by verification stage and sorting by confidence level. The confidence level visualization unit categorizes the recognition results into four confidence levels using color coding: high confidence (above 0.9) is green, medium confidence (0.75 to 0.9) is blue, low confidence (0.6 to 0.75) is yellow (requiring priority review), and extremely low confidence (below 0.6) is red (requiring manual confirmation). A confidence level heatmap view is provided to quickly locate areas awaiting review by color-coding text segments. It also supports filtering by confidence threshold to centrally display low-confidence events. The boundary adjustment unit allows users to adjust the event text range by dragging the event boundary line with the mouse. It displays the selected text in real time and updates the event content and timestamp after releasing the mouse. It supports precise character-by-character boundary adjustment using the keyboard arrow keys and provides functions such as double-clicking to quickly add words and right-click menu shortcuts. After boundary adjustment, it automatically triggers reclassification and attribute extraction to update structured information. The classification correction unit provides a drop-down menu next to the event type field, listing all possible testing stages and operation categories for the experimenter to select. It supports multi-label correction, allowing multiple operation categories to be selected for a single event. An intelligent recommendation function suggests the most likely correct category based on event text features and context. After modification, the classification rationality is automatically checked, and batch correction is supported, correcting multiple identical errors simultaneously. The attribute editing unit provides dedicated input controls for different attribute types. Numerical types offer a number input box with limited ranges; unit types offer a standard unit drop-down menu; reagent and instrument names offer dictionary auto-completion; and time types offer a date and time selector. Missing attributes can be added via the "Add" button, and after modification, parameter rationality checks are automatically invoked to verify that the value meets constraints. The voice correction interaction unit allows the experimenter to speak correction commands, including location, modification, and confirmation commands. The command text is converted using a speech recognition engine, and the intent and parameters are parsed by a natural language understanding module. Based on the parsing results, the corresponding operation is executed, and the results are announced verbally. Context-sensitive abbreviations, such as "change to 55," are automatically understood as modifying the currently selected field.The correction history unit generates a record for each correction operation, including the correction time, personnel, type, values before and after the correction, and reason. It supports undo / redo functionality to roll back or restore the operation state, maintains a complete correction history version chain, retains all historical versions, supports version comparison and rollback, and generates correction statistics reports to analyze the frequency of different error types and the recognition accuracy of operations at different stages. The active learning feedback unit converts the experimenter's correction operations into labeled data and feeds it back into the model training. It marks the corrected events as positive samples and the erroneous results before correction as negative samples. It adopts an active learning strategy to prioritize samples with low initial confidence but clear results after correction, large differences between the recognition results and manual corrections, and those representing new samples or test items. After accumulating a certain number of samples, such as 100, it triggers incremental model training. It uses hard sample mining techniques to focus on training samples that repeatedly identify errors, records the trajectory of model performance changes, and automatically deploys new models when performance improves. The collaborative review management unit defines three levels of review roles: initial review, secondary review, and final review. It assigns personnel to track the review status for each review task, including statuses such as pending initial review, in progress of initial review, pending secondary review, in progress of secondary review, pending final review, in progress of final review, and completed. It provides a review comments function that allows reviewers to add comments and suggestions, which are displayed in bubble format. It records the processing time and personnel for each review stage, generates a complete review log, and statistically analyzes the correction accuracy and review efficiency of different reviewers to support personnel training and performance evaluation.
[0077] In addition, refer to Figure 3 ,and Figure 1 Corresponding to the method described above, this application also provides a laboratory testing system based on semantic enhancement. The system may include an acquisition unit 1001, a first processing unit 1002, a second processing unit 1003, and a third processing unit 1004. The acquisition unit 1001 is used to acquire received first text information; the first text information includes key event information from the current testing process stage regarding the system's inquiry of the laboratory technician's proactive feedback, as well as real-time collected natural language description information from the technician. The first processing unit 1002 is used to perform forward semantic prediction and backward semantic verification on the first text information to obtain a laboratory event representation vector; the event representation vector is used to characterize the laboratory events extracted from the first text information. The second processing unit 1003 is used to determine the event boundaries of the laboratory events and perform multi-level classification and attribute extraction on the laboratory events to obtain processed laboratory events. The third processing unit 1004 is used to perform event sequence continuity verification on the processed laboratory events; if the verification passes, a laboratory log corresponding to the processed laboratory events is generated.
[0078] It should be noted that the content of the above-described embodiments of the laboratory testing method based on semantic enhancement is applicable to the embodiments of the laboratory testing system based on semantic enhancement. The specific functions implemented by the embodiments of the laboratory testing system based on semantic enhancement are the same as those of the above-described embodiments of the laboratory testing method based on semantic enhancement, and the beneficial effects achieved are also the same as those achieved by the above-described embodiments of the laboratory testing method based on semantic enhancement.
[0079] and Figure 1 Corresponding to the method described above, this application also provides a laboratory testing device based on semantic enhancement, the specific structure of which can be referred to... Figure 4 ,include:
[0080] At least one processor 1011;
[0081] At least one memory 1012 is used to store at least one program;
[0082] When at least one program is executed by at least one processor, the semantically enhanced laboratory testing method is implemented by at least one processor.
[0083] The content of the above method embodiments is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0084] and Figure 1 Corresponding to the method described above, embodiments of this application also provide a computer-readable storage medium storing processor-executable instructions, which, when executed by a processor, are used to execute a semantically enhanced laboratory testing method.
[0085] The content of the above-described embodiments of the laboratory testing method based on semantic enhancement is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above-described embodiments of the laboratory testing method based on semantic enhancement, and the beneficial effects achieved are also the same as those achieved in the above-described embodiments of the laboratory testing method based on semantic enhancement.
[0086] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0087] Furthermore, although this application is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding this application. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional technology for an engineer. Therefore, those skilled in the art can implement the application set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of this application, which is determined by the full scope of the appended claims and their equivalents.
[0088] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they 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 portion 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 programs 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.
[0089] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequential list of executable programs for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, a program execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can retrieve and execute a program from or in conjunction with such a program execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit a program for use by or in conjunction with a program execution system, apparatus, or device.
[0090] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0091] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable program execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0092] In the foregoing description of this specification, the references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0093] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
[0094] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A laboratory testing method based on semantic enhancement, characterized in that, Includes the following steps: Acquire the first text information received; the first text information includes key event information of the current testing process stage in response to the system's inquiry of the experimenter's proactive feedback, as well as the experimenter's natural speech description information collected in real time; The first text information is subjected to forward semantic prediction and backward semantic verification to obtain the event representation vector of the laboratory; the event representation vector is used to characterize the laboratory events extracted from the first text information. The event boundaries of the laboratory events are determined, and the laboratory events are classified and their attributes are extracted at multiple levels to obtain the processed laboratory events. For the processed laboratory events, the event sequence continuity is verified. If the verification passes, the laboratory log corresponding to the processed laboratory events is generated.
2. The laboratory testing method based on semantic enhancement according to claim 1, characterized in that, The acquisition of the received first text information specifically includes: Acquire key event voice information proactively reported by the experimenter at the current stage of the testing process, and passively monitor the experimenter's natural speech in real time; The key event audio information and the natural speech are transcribed into text to obtain first text information; the first text information includes at least laboratory technical terms from the database.
3. The laboratory testing method based on semantic enhancement according to claim 1, characterized in that, The step of performing forward semantic prediction and backward semantic verification on the first text information to obtain the laboratory's event representation vector specifically includes: A 12-layer Transformer encoder is used to encode the current process context, and a multi-head self-attention mechanism is used to predict the most likely event type and its probability distribution for the next step. A bidirectional LSTM network is used to encode the preceding and following contexts, and a semantic consistency discriminator is used to detect whether the current event is consistent with the preceding and following contexts in terms of temporal logic and operational causality. A multi-head attention weighting mechanism is used to integrate forward prediction and backward verification information. The fusion weights are dynamically adjusted through gating parameters to generate a 512-dimensional event representation vector.
4. The laboratory testing method based on semantic enhancement according to claim 1, characterized in that, Determining the event boundary of the laboratory event specifically includes: The start and end positions of each experimental event are accurately identified in the laboratory events extracted from the first text information; The Conditional Random Field (CRF) sequence labeling algorithm is used to model event boundary localization as a BIO labeling task. The feature functions of the CRF sequence labeling algorithm include part-of-speech features, syntactic features, domain dictionary matching features, and context window features. The event boundary of the laboratory event is obtained by decoding the optimal labeled sequence using the Viterbi algorithm.
5. The laboratory testing method based on semantic enhancement according to claim 4, characterized in that, Determining the event boundary of the laboratory event further includes: The identified event boundaries are precisely aligned with the timestamps of the original audio recordings to obtain the timestamp-aligned event boundaries.
6. The laboratory testing method based on semantic enhancement according to claim 1, characterized in that, The process of performing multi-level classification and attribute extraction on the laboratory events to obtain processed laboratory events specifically includes: A TextCNN-based classifier is used to classify events into inspection types, operation types, and event detail extraction.
7. The laboratory testing method based on semantic enhancement according to claim 1, characterized in that, The processed laboratory events are then subjected to event sequence continuity verification. If the verification passes, a laboratory log corresponding to the processed laboratory events is generated, including: The system verifies whether the identified event sequence conforms to the logical rules of the experimental procedure. If it does, a laboratory log corresponding to the processed laboratory event is generated. The logical rules include a temporal rationality verifier, an operational integrity verifier, and a numerical rationality verifier. The temporal rationality verifier checks whether the event time order conforms to the operational logic based on a predefined temporal constraint rule base, which contains no less than 300 constraint rules. The operational integrity verifier compares the standard procedure to detect whether necessary steps are missing. The numerical rationality verifier checks whether the extracted numerical parameters are within a reasonable range.
8. A laboratory testing system based on semantic enhancement, characterized in that, include: The acquisition unit is used to acquire the received first text information; the first text information includes key event information of the current testing process stage in response to the system's inquiry of the experimenter's active feedback and real-time acquisition of the experimenter's natural speech description information. The first processing unit is used to perform forward semantic prediction and backward semantic verification on the first text information to obtain the event representation vector of the laboratory; the event representation vector is used to characterize the laboratory events extracted from the first text information. The second processing unit is used to determine the event boundary of the laboratory event and perform multi-level classification and attribute extraction on the laboratory event to obtain the processed laboratory event. The third processing unit is used to verify the continuity of the event sequence of the processed laboratory events. If the verification is successful, it generates the laboratory log corresponding to the processed laboratory events.
9. A laboratory testing device based on semantic enhancement, characterized in that... include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a semantically enhanced laboratory testing method as described in any one of claims 1-7.
10. A computer-readable storage medium storing processor-executable instructions, characterized in that, The processor-executable instructions, when executed by the processor, are used to perform a semantically enhanced laboratory testing method as described in any one of claims 1-7.
Citation Information
Cited By
Method and system for generating and verifying multi-jurisdictional salary calculation criteria based on large models
CN122173874A
