A nursing behavior compliance evaluation method based on a visual large model
By combining visual large models and finite state machines, the problem of insufficient automated identification and evaluation in the evaluation of specialized nursing operations was solved, realizing efficient and accurate compliance assessment of nursing behaviors, supporting dynamic standard updates and training, and improving nursing quality and safety.
Patent Information
- Application Number
- CN202611247737.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-20
Smart Images

Figure CN123139136A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of large model applications and visual information processing technology, and in particular to a method for assessing compliance of nursing behaviors based on a visual large model. Background Technology
[0002] In specialized clinical nursing practices, evaluating nurses' mastery of specialized nursing techniques of varying difficulty provides a scientific basis for nurse competency assessment, showcases the unique professional value of nursing staff, and thus incentivizes the application of specialized clinical nursing techniques. In tiered nurse access management, establishing corresponding access systems based on the difficulty level of nursing techniques can standardize nurses' technical operations, provide a theoretical basis for tiered nurse training, and ensure nursing quality and patient safety. Traditional nursing procedure evaluations are conducted by domain experts, which is time-consuming and labor-intensive. Developing automated capture and recognition technologies based on visual recognition for nurse training and daily operational optimization has significant application value.
[0003] In recent years, motion assessment has become an important research direction in the field of computer vision. Its core objective is to endow computers with the ability to automatically quantify motion quality and generate easily understandable feedback to guide and optimize nursing motion standards. This technology has broad application potential in various fields such as specialist nursing, sports training, medical rehabilitation, interactive entertainment, and video content analysis.
[0004] Due to the rapid development of visual large-scale model technology, capturing and evaluating the actions of nursing staff in videos using large-scale models has become a research hotspot. Nursing work involves many steps, is time-consuming, and has a certain degree of continuity and consistency. While a video-based automatic evaluation system for specialized nursing actions is feasible, it also presents considerable challenges. Specifically, on the one hand, accurately identifying various objects appearing in the video—whether people, tools, or other objects—and tracking their positions and trajectories to achieve continuous action recognition and accurately capture the changes in posture and continuity of actions during movement, is quite difficult. On the other hand, video understanding also requires understanding the events and behaviors within the video. This means that the computer must be able to determine the activities that people or objects are performing, such as checking patient information, assessing the environment, evaluating the patient, etc., as well as the logical relationships between these activities. Through the recognition and analysis of continuous actions, the computer can clearly identify the sequence and causal relationships between actions.
[0005] However, existing technologies lack sufficient operational support for the evaluation of specialized nursing procedures. Current technologies only identify individual actions and lack automatic recording of data such as training frequency, operation duration, and operation details. Furthermore, existing technologies do not adequately support configurable operation procedures and scoring rules. Since specialized nursing skills change over time, it is necessary to support managers in customizing operation procedures and scoring rules to accommodate these changes. Additionally, existing technologies do not adequately utilize the recognition results for secondary applications. For example, after obtaining and scoring the operation details of nursing staff, targeted training and guidance are needed, requiring video playback to pinpoint specific operation segments for improvement guidance. Summary of the Invention
[0006] The purpose of this invention is to provide a method for assessing compliance of nursing behaviors based on a visual large model, which scores each identified action using a standard action library.
[0007] To achieve the above objectives, the present invention provides the following solution: A method for assessing compliance of nursing behaviors based on a visual large model includes the following steps: Embedding vectors of the text and video to be detected are extracted using machine learning models and large visual models, respectively, and the similarity between the embedding vectors is calculated. Based on similarity, the mean clustering algorithm is used to cluster adjacent frames of the video to be detected to obtain the clustering results; Action segments are extracted from clustering results using a pre-built professional nursing action knowledge base; The action segments are reasoned and scored using a finite state machine to obtain the scoring results.
[0008] Optionally, embedding vectors of the text to be detected and the video to be detected are extracted using machine learning models and large visual models, respectively, and the similarity between the embedding vectors is calculated, including: The BERT model is used to convert the format of the text to be detected, resulting in the text encoding. The text encoding is processed by average pooling through a self-attention mechanism to obtain the embedding vector of the text to be detected; Calculate the cosine of the angle between the embedding vectors of the text to be detected and the Euclidean distance, and then perform a weighted summation to obtain the similarity of the text to be detected.
[0009] Optionally, embedding vectors of the text to be detected and the video to be detected are extracted using machine learning models and large visual models, respectively, and the similarity between the embedding vectors is calculated, including: Extracting image features from the video to be detected using a large visual model; Calculate the cosine of the angle between image features and the Euclidean distance, and then perform a weighted summation to obtain the similarity of the video to be detected.
[0010] Optionally, based on similarity, the video to be detected is clustered into adjacent frames using the mean clustering algorithm to obtain the clustering results, including: When the similarity between adjacent frames in the video to be detected exceeds a preset similarity threshold, the adjacent frames are merged into an adjacent cluster. When the average similarity between adjacent clusters exceeds the similarity threshold, the adjacent clusters are merged into a new cluster. The merging process is repeated until no clusters are merged or the preset number of iterations is reached, and the clustering result is obtained.
[0011] Optionally, action segments from the clustering results can be extracted using a pre-built professional nursing action knowledge base, including: A professional nursing action knowledge base was constructed based on the names and descriptions of various nursing actions. The logical relationships between basic nursing procedures are modeled as finite state machines. Nursing actions are identified based on a professional nursing action knowledge base and a finite state machine, resulting in action fragments and prompt words.
[0012] Optionally, a finite state machine is used to reason and score the action segments to obtain a scoring result, including: Construct an action diagram based on a finite state machine; Based on the action graph, an action sequence is obtained by prioritizing the search of action segments using a graph traversal algorithm. The scoring is based on the degree of difference between the action sequence and the standard sequence, and the scoring result is obtained.
[0013] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: The nursing behavior compliance assessment method based on a visual large model provided by the present invention achieves automated continuous identification and multi-dimensional compliance evaluation of long-process operations in specialized nursing through a dual-modal feature fusion action segmentation mechanism, a finite state machine-driven SOP compliance scoring system, and a knowledge base-guided adaptive prompt word recognition strategy. This method not only solves the problems of low efficiency and inconsistent standards in traditional manual evaluation, but also makes up for the shortcomings of existing technologies such as single action recognition, rule solidification, and poor result reusability. It can flexibly adapt to the dynamic updates of different specialized operation specifications, support the business closed loop of nursing operation assessment, tiered training, and capacity building, and effectively ensure the quality of nursing operations and patient safety. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart of the nursing behavior compliance assessment method based on a visual large model, as described in an embodiment of the present invention. Figure 2 This is a flowchart of the main algorithm for nursing behavior assessment in an embodiment of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] like Figure 1 and Figure 2 As shown, this embodiment of the invention provides a method for assessing compliance of nursing behaviors based on a visual large model, including the following steps: Step 100: Extract the embedding vectors of the text to be detected and the video to be detected using machine learning models and large visual models respectively, and calculate the similarity between the embedding vectors; Step 200: Based on similarity, cluster adjacent frames of the video to be detected using the mean clustering algorithm to obtain the clustering results; Step 300: Extract action fragments from the clustering results using a pre-built professional nursing action knowledge base; Step 400: Use a finite state machine to reason and score the action segments to obtain the scoring results.
[0019] In this embodiment, step 100, to achieve accurate segmentation of actions in the video, designs an action-aware encoder based on the BERT model. Its core function is to compare the visual and semantic features generated after processing by the multimodal large model with the same features in adjacent frames to determine whether adjacent frames are a continuation of the same action. The specific steps include: (a) using the powerful pre-training capability of the BERT model to encode the input text description, converting it into a format that the model can understand and process; (b) obtaining the text embedding vectors through the BERT model, which contain the semantic information of the text; (c) using the cosine of the vector angle combined with Euclidean distance to calculate the similarity between the embedding vectors of adjacent descriptions, thereby determining whether the actions they describe are similar, and then classifying the actions; (d) extracting image representations through the visual large model and performing the same similarity calculation process.
[0020] Specifically, BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained model based on the Transformer architecture, which has been widely used in the field of natural language processing. This model adopts a bidirectional training mechanism, which can simultaneously consider the contextual information on both sides of the input data, thereby obtaining richer semantic representations.
[0021] In this embodiment, the BERT model's tokenizer is used to process the text in the description sequence. Specifically, the tokenizer converts the original input text into a format that the model can understand, including mapping words to indices in the vocabulary, adding special delimiters (such as [CLS] and [SEP]), and generating corresponding attention masks.
[0022] Furthermore, the text-encoded data processed by the tokenizer is input into the BERT model. The BERT model, through its multi-layered network structure, utilizes self-attention mechanisms and feedforward networks to process the input data, thereby generating an embedding representation for each input token. In this embodiment, the output of the model's last layer is used as the final feature representation. These outputs contain high-level semantic information after multi-layered processing, enabling a more accurate reflection of the text's semantic content.
[0023] Preferably, to obtain more stable and representative features, average pooling is performed on the embedding vector of each token output by the BERT model. Specifically, let the word embedding sequence output by the last layer of the model be h1, h2, h3, ..., hn, where n is the length of the word embedding sequence, and hi is the word embedding vector at the i-th position in the sequence. This can be achieved using the formula... Calculate the average word embedding vector This allows the embedding vectors of multiple tokens to be aggregated into a single vector representation, which can comprehensively reflect the semantic features of the entire text and provide a reliable input for subsequent similarity calculations.
[0024] In this embodiment, the similarity between vectors is calculated by combining the vector angle and Euclidean distance. The calculation process of the cosine of the vector angle includes: if there are two vectors... and Their dot product can be expressed as: ,in It is the cosine of the angle between two vectors. The calculation process for Euclidean distance includes: if there are two vectors... and The Euclidean distance between them is calculated using the following formula: Then, a weighted method is adopted using the cosine of the included angle and the Euclidean distance. The weights of each can be adjusted according to the data test results. In this embodiment, 0.5 and 0.5 are used.
[0025] It should be noted that, on the one hand, by calculating the short text similarity based on the angle between the embedding vectors of adjacent descriptions in the description sequence, actions can be classified into different categories according to a set similarity threshold. This action classification method based on semantic similarity combines the deep semantic understanding capability of the BERT model with the intuitive measurement method of cosine similarity, and can effectively evaluate the semantic closeness between adjacent action descriptions.
[0026] On the other hand, large visual models can be used to effectively extract image features that reliably reflect the main actions and content within the image. In some other embodiments, large visual models such as Alibaba Qwen3-VL, Google Gemini series, SenseTime SenseNova series, and MiniCPM-V4.6 are employed. By utilizing the ability to recognize action units, information such as image edges, color distribution, and shape can be obtained, thus providing a foundation for subsequent similarity calculations.
[0027] After extracting image features, the next step is to calculate the similarity between two images. Based on the extracted features, this embodiment uses a method that combines cosine similarity and Euclidean distance, which is the same method used to calculate the similarity, to evaluate the similarity between features. Cosine similarity effectively measures the degree of similarity between image contents by comparing the direction of feature vectors rather than their magnitude.
[0028] In this embodiment, after calculating the similarity between frames, step 200 uses the mean clustering algorithm to cluster consecutive frames. Mean clustering effectively divides the video into multiple segments by grouping frames with high similarity into one class. Each segment represents a specific scene or action in the video, facilitating subsequent analysis and processing. This clustering method not only simplifies the video structure but also improves the ability to understand the video content.
[0029] Specifically, when clustering consecutive video frames, local merging is first performed to optimize the clustering results. A similarity threshold θ is set to determine the similarity between adjacent frames. If the similarity between two frames exceeds this threshold, they are considered to belong to the same action and merged into a single adjacent cluster. Next, the similarity between adjacent clusters is checked. For each pair of adjacent clusters, if their average similarity exceeds the threshold θ, these two clusters are merged into a new cluster. This local merging process is repeated until no more clusters are merged, or a preset number of iterations is reached, thus ensuring the stability of the clustering and reducing erroneous clustering caused by improper initial cluster center selection. Finally, based on the optimized clustering results, the video is divided into multiple segments, each segment corresponding to a cluster, representing a specific scene or action in the video.
[0030] In this embodiment, step 300 constructs a professional nursing action knowledge base based on the names and detailed descriptions of various nursing actions. Each action name is accompanied by a description file, which includes information such as the purpose, steps, precautions, and applicable patient types. These description files not only provide important references for nursing staff but also serve as part of the prompts, helping the large model better understand and identify specific nursing operations in video clips.
[0031] For example, when a nursing action appears in a video, the large model can search its knowledge base in real time to obtain a relevant description of the action and analyze it in conjunction with visual information from the video to accurately identify the action. Based on the specific scene in the video and the context of the nursing action, more precise prompts are dynamically generated. In some other embodiments, in the scenario of intravenous injection, prompts include terms such as "disinfection" and "needle insertion angle."
[0032] In this embodiment, standard operating procedures (SOPs) in the nursing field are first modeled using finite state machines (FSMs). Specifically, the logical relationships between basic nursing procedures (such as intravenous infusion, aseptic technique, and catheterization) are modeled as FSMs. Essentially, this transforms the clinical nursing SOPs into a discrete event system that is computer-recognizable, traceable, and evaluable. In nursing scenarios, operations often involve strict pre-dependencies, concurrent execution, conditional branches, and abnormal interruptions. However, in daily assessments, only the sequential execution and looping of actions are considered, allowing the removal of complex conditional judgments and concurrency mechanisms, simplifying the model to a basic linear state machine.
[0033] Specifically, when the visual big data model captures a specific action (such as "a nurse is forcefully pressing on a patient's abdomen"), it first transforms the colloquial description into standard medical terminology (such as "Heimlich maneuver - abdominal thrusts"), similar to the query rewriting process in RAG. Simultaneously, it accurately retrieves authoritative descriptions of the action: "Make a fist with one hand, press the thumb side against the patient's abdomen (two fingers above the navel), and quickly push upwards and inwards." Then, the current scene features extracted by the visual big data model are concatenated with authoritative SOP text fragments retrieved from RAG to assemble structured prompts. Based on this solid evidence, the model then summarizes and generates precise prompts containing strict compliance constraints.
[0034] Specifically, step 400 compares the recorded professional action sequence with the action sequence obtained from the video and scores the smoothness and rationality of the actions. Since some actions in the professional action sequence have no sequential relationship with adjacent actions, directly comparing the consistency of the sequences is insufficient to complete the action sequence scoring.
[0035] Preferably, when mapping standard operating procedures (SOPs) to a finite state machine, the granularity of action division directly determines the executability of the model and the accuracy of the assessment. Combining clinical nursing quality control standards and practical assessment details, this embodiment adopts a "three-stage-four-dimensional" action division standard: 1. Macro-level division: Based on the three stages of "pre-operation - during-operation - post-operation". This is the most common timeline division standard for nursing operations, which can be directly mapped to three super states (combined states) of a state machine: 1.1 Preparation States Verify patient information (bed number, name, wristband) and doctor's orders; assess the patient's condition, consciousness, cooperation, and the operating environment (e.g., lighting, temperature). Explain the purpose and precautions of the procedure to the patient and provide psychological support. Wash hands, wear a mask, and prepare and check the completeness and expiration dates of sterile instruments, emergency equipment, and other supplies.
[0036] 1.2 Execution States in Operation Strictly adhere to aseptic principles and standard procedures when performing substantive procedures (such as intravenous puncture, catheterization, and swabbing). Closely observe the patient's physiological and psychological responses during the procedure (such as complexion and presence of chills).
[0037] 1.3 Post-operation States Assist the patient to assume a comfortable lying position, tidy the bed, and dispose of medical waste according to regulations (e.g., separate medical waste from household waste). Wash hands, record the time of the procedure in the doctor's order book and sign it, and explain subsequent precautions to the patient.
[0038] 2. Micro-level segmentation: Based on the four dimensions of "action attributes". Within each macro-level stage, further refinement is needed based on the nature of the action to facilitate the definition and scoring of state machine nodes: 2.1. Check / Assess actions: such as "checking the expiration date of sterile packs," "assessing vascular conditions," and "confirming the patient's allergy history." These actions are the guard conditions for state transitions.
[0039] 2.2 Physical Actions: Such as "disinfecting skin (range 5cm×5cm)," "inserting needle at a 15°-30° angle," and "adjusting oxygen flow." These actions are the core execution nodes in the state machine, and their parameters need to be clearly defined.
[0040] 2.3 Communication / Humanistic Actions: Such as "asking the patient how they feel" and "instructing the patient to take deep breaths." These actions fall under the "Humanistic Care" scoring item in quality control and cannot be omitted.
[0041] 2.4 Recording / Documentation: such as "Note the date of opening the package" or "Record the puncture time". This is a sign that the procedure has ended or is about to begin the next cycle.
[0042] In this embodiment, when comparing action sequences, an action graph needs to be constructed based on a finite state machine. Each action is considered a node in the graph, and if two actions are interchangeable, an undirected edge is added between them to represent the commutative relationship. This graph structure not only clearly shows the relationships between actions but also lays the foundation for subsequent sequence generation.
[0043] Next, a graph traversal algorithm is used to generate all possible action sequences. Then, depth-first search (DFS) or breadth-first search (BFS) is used to explore various combinations that include all actions in the original sequence. Furthermore, this step considers the relationships between commutative actions, thus ensuring that the generated sequence is comprehensive.
[0044] For example, the sequential execution of actions represents irreversible, step-by-step standard procedures in nursing operations. Logically, this is represented as follows: after the current action is completed, the next action is triggered unidirectionally. The state machine mapping is a linearly arranged chain of nodes. For example, S1 (wash hands) -- [completed] --> S2 (prepare supplies) -- [completed] --> S3 (check) -- [completed] --> S4 (execute). Action loops, on the other hand, represent steps in nursing operations that need to be repeated or retried repeatedly if the expected results are not achieved. Logically, after an action is completed, based on the feedback result, the state pointer points back to the upstream node. The state machine mapping is represented as a "backward edge" pointing to itself or the preceding node.
[0045] Furthermore, in the specific scoring process, the scoring relies on the action results identified by the large model, as well as the finite state machine formed by the model. The scoring is then based on the reasoning ability of the large model, primarily considering: 1. Sequential scoring (to prevent omissions): Only check whether the state machine has completely traversed S1->S2->S3->S4->S5 (observation). If it jumps directly from S2 to S4, it means that a step was skipped, and the "process completeness" score will be deducted directly.
[0046] 2. Cyclic scoring (preventing over- or under-scoring): Retry limit: In the S3 cycle, if the number of status rollbacks exceeds 3, a deduction will be triggered (the nurse's operational skills are not up to standard).
[0047] 3. Cycle Frequency Evaluation: In the S5 self-loop, record the number of times the loop is triggered and the time interval. If it only loops once per hour, or the loop interval exceeds the time specified in the SOP, a "poor inspection" penalty will be triggered.
[0048] The beneficial effects of this invention are as follows: 1) By using bimodal similarity calculation that integrates textual semantic features and visual features, combined with video segmentation methods that combine mean clustering and local merging optimization, it can automatically segment, identify, and record the entire process of long-term nursing operation videos, covering all stages from pre-operation preparation, operation execution, and post-operation processing. It can automatically collect data such as operation duration, training times, and step details, replacing the traditional manual frame-by-frame evaluation mode, significantly reducing the cost of expert evaluation, and improving the efficiency of nursing operation assessment and training. 2) Based on a pre-built professional nursing action knowledge base, exclusive prompt words are dynamically constructed in combination with the video scene context. The screen features extracted by the visual big model are integrated with the authoritative SOP text description, which guides the model to accurately identify professional nursing actions. It also supports real-time adjustment of prompt words according to the operation progress, adapting to the recognition needs of different operation stages, and improving the accuracy and scene adaptability of action recognition in complex nursing scenarios. 3) The clinical nursing SOP is modeled as a finite state machine, and a "three-stage-four-dimensional" action division standard is adopted to support the verification of various business logics such as sequential execution and action loop. At the same time, the scoring dimensions cover process integrity (preventing omissions), operation retry compliance (preventing excessive / insufficient operation), and cycle frequency compliance (preventing inadequate inspection), making the evaluation results more in line with the clinical quality control standards of specialized nursing and more scientific.
[0049] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0050] Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. Furthermore, those skilled in the art will recognize that, based on the ideas of this invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A method for assessing compliance of nursing behaviors based on a visual large model, characterized in that, Includes the following steps: Embedding vectors of the text to be detected and the video to be detected are extracted using machine learning models and large visual models, respectively, and the similarity between the embedding vectors is calculated. Based on the similarity, the video to be detected is clustered into adjacent frames using the mean clustering algorithm to obtain the clustering results; Action segments are extracted from the clustering results using a pre-built professional nursing action knowledge base; The action segment is inferred and scored using a finite state machine to obtain the scoring result.
2. The method for assessing compliance of nursing behavior based on a large visual model according to claim 1, characterized in that, Embedding vectors of the text and video to be detected are extracted using machine learning models and large-scale visual models, respectively, and the similarity between the embedding vectors is calculated, including: The text to be detected is formatted using the BERT model to obtain the text encoding; The text encoding is subjected to average pooling through a self-attention mechanism to obtain the embedding vector of the text to be detected; Calculate the cosine of the angle between the embedding vectors of the text to be detected and the Euclidean distance, and perform a weighted summation to obtain the similarity of the text to be detected.
3. The method for assessing compliance of nursing behavior based on a large visual model according to claim 1, characterized in that, Embedding vectors of the text and video to be detected are extracted using machine learning models and large-scale visual models, respectively, and the similarity between the embedding vectors is calculated, including: The image features of the video to be detected are extracted using the large visual model. Calculate the cosine of the angle between the image features and the Euclidean distance, and perform a weighted summation to obtain the similarity of the video to be detected.
4. The method for assessing compliance of nursing behavior based on a visual large model according to claim 1, characterized in that, Based on the similarity, the video to be detected is clustered into adjacent frames using the mean clustering algorithm to obtain the clustering results, including: When the similarity between adjacent frames in the video to be detected exceeds a preset similarity threshold, the adjacent frames are merged into an adjacent cluster. When the average similarity between adjacent clusters exceeds the similarity threshold, the adjacent clusters are merged into a new cluster. The merging process is repeated until no clusters are merged or the preset number of iterations is reached, and the clustering result is obtained.
5. The method for assessing compliance of nursing behavior based on a large visual model according to claim 1, characterized in that, Action fragments from the clustering results are extracted using a pre-built professional nursing action knowledge base, including: A professional nursing action knowledge base is constructed based on the names and descriptions of various nursing actions. The logical relationships between basic nursing operations are modeled as a finite state machine. Based on the professional nursing action knowledge base and the finite state machine, nursing actions are identified from the clustering results to obtain the action segments and generate prompt words.
6. The method for assessing compliance of nursing behavior based on a visual large model according to claim 1, characterized in that, The action segment is reasoned and scored using a finite state machine to obtain a scoring result, including: Construct an action diagram based on the finite state machine; Based on the action graph, the action segments are preferentially searched using a graph traversal algorithm to obtain the action sequence; The scoring result is obtained by reasoning and scoring based on the degree of difference between the action sequence and the standard sequence.
