Hand hygiene detection methods, apparatuses, electronic devices, and computer program products
By collecting video data during handwashing to generate skeletal diagrams and performing automated scoring, the problem of low accuracy in hand hygiene detection in existing technologies is solved, achieving objective and quantitative assessment, and improving the accuracy of detection and the effectiveness of user feedback.
Patent Information
- Application Number
- CN202510682954.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2026-11-27
AI Technical Summary
Existing hand hygiene testing methods rely on manual observation, which is subject to selection bias and subjectivity, resulting in low accuracy and an inability to effectively correct errors made by healthcare workers during handwashing.
By collecting video data during handwashing, a skeletal map is generated, and a rating scale is automatically evaluated using deep recurrent networks and fully connected layers, providing objective and quantitative feedback.
It improves the accuracy of hand hygiene detection, reduces subjective judgment bias, provides quantitative scoring and feedback, helps users improve their handwashing techniques, and enhances learning efficiency.
Smart Images

Figure CN123182284A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and computer program product for detecting hand hygiene. Background Technology
[0002] Hospital infection control is a crucial measure to ensure the safety of the public and medical staff. Among the various routes of transmission, medical staff's hands are the most common route for pathogens to spread in the medical environment and among patients. Therefore, hand hygiene is recognized both domestically and internationally as the simplest, most effective, convenient, and economical measure to reduce the risk of hospital infections. Proper handwashing techniques ensure that medical staff's hands are clean, effectively reducing the transmission of infectious diseases through their hands. However, many medical staff make mistakes in their handwashing techniques, such as washing too quickly, and these mistakes are not corrected in a timely manner, resulting in ineffective handwashing.
[0003] Currently, manual observation is the most common method for testing hand hygiene among medical personnel. While manual observation can record detailed information, such as the method and duration of handwashing, it suffers from drawbacks such as selection bias, the Hawthorne effect, and observer bias, making it somewhat one-sided and thus resulting in lower accuracy in hand hygiene testing. Summary of the Invention
[0004] In view of this, embodiments of this application provide a hand hygiene detection method, apparatus, electronic device, and computer program product to improve the accuracy of hand hygiene detection.
[0005] The first aspect of this application provides a method for detecting hand hygiene, including:
[0006] During the user's handwashing process, the first prompt message corresponding to each handwashing step is displayed sequentially;
[0007] During the display duration of the first prompt information, video data corresponding to the user's handwashing actions in each handwashing step is collected.
[0008] Based on the video data, multiple skeletal diagrams corresponding to each handwashing step are obtained, and the skeletal diagrams are used to indicate the user's hand movements;
[0009] Based on the multiple skeletal diagrams, a rating level is generated corresponding to the user's handwashing actions in each handwashing step;
[0010] The rating level is displayed.
[0011] In one possible implementation of the first aspect, generating a rating level corresponding to the user's handwashing action in each handwashing step based on the plurality of skeletal diagrams specifically includes:
[0012] The multiple skeleton diagrams corresponding to the first handwashing step are input into the step judgment model to generate a judgment result; the judgment result includes the category labels corresponding to the multiple skeleton diagrams respectively, and the category labels are used to represent the step category of the skeleton diagram, wherein the first handwashing step is any one of the multiple handwashing steps.
[0013] Based on the number of skeleton diagrams with the category label as the first label, a rating level is generated corresponding to the handwashing action in the first handwashing step, where the first label indicates that the step category of the skeleton diagram is the step category corresponding to the first handwashing step.
[0014] In one possible implementation of the first aspect, the determination result further includes the probability value of the hand action corresponding to the plurality of skeletal diagrams being the hand action corresponding to the first handwashing step;
[0015] The step of generating a rating level corresponding to the handwashing action in the first handwashing step based on the number of skeletal diagrams with the category label as the first label specifically includes:
[0016] If the probability value is less than or equal to the probability threshold, a second prompt message is generated; the second prompt message is used to prompt the user to repeat the first handwashing step.
[0017] If the probability value is greater than the probability threshold, a rating level corresponding to the handwashing action in the first handwashing step is generated based on the number of skeletons with the category label as the first label.
[0018] In one possible implementation of the first aspect, generating a rating level corresponding to the handwashing action in the first handwashing step based on the number of skeletal diagrams with the category label as the first label includes:
[0019] If the number of skeletons with the category label as the first label is greater than or equal to the first threshold, then the scoring level corresponding to the handwashing action in the first handwashing step is determined to be the first level;
[0020] If the number of skeletal diagrams with the first category label is less than the first threshold, and the number of skeletal diagrams with the first category label is greater than or equal to the second threshold, then the scoring level corresponding to the handwashing action in the first handwashing step is determined to be the second level, and a third prompt message is generated based on the multiple skeletal diagrams; the third prompt message is used to prompt the user to correct the handwashing action.
[0021] If the number of skeletons with the category label as the first label is less than the second threshold, then the rating level corresponding to the handwashing action in the first handwashing step is determined to be the third level, and a second prompt message is generated; the second prompt message is used to prompt the user to repeat the first handwashing step.
[0022] In one possible implementation of the first aspect, after generating the rating level corresponding to the handwashing action in the first handwashing step based on the number of skeletal diagrams with the category label as the first label, the method further includes:
[0023] The standard operation time corresponding to the first handwashing step is determined based on the number of skeleton diagrams with the category label as the first label.
[0024] The multiple skeletal diagrams corresponding to each handwashing step, the standard operation time, the rating level, and the hand-rubbing judgment result are input into the score evaluation model to generate an evaluation score.
[0025] In one possible implementation of the first aspect, the score evaluation model includes a deep recurrent network and fully connected layers;
[0026] The process of inputting the multiple skeletal diagrams corresponding to each handwashing step, the standard operation time, the scoring level, and the hand-rubbing judgment result into the score evaluation model to generate an evaluation score includes:
[0027] Feature extraction is performed on the standard operation duration, the rating level, and the hand-rubbing judgment result to determine non-graphic features;
[0028] The skeletal map and the non-graphical features are input into the deep recurrent network for feature fusion to determine the fused features;
[0029] The fused features are input into the fully connected layer for score prediction to generate the evaluation score.
[0030] In one possible implementation of the first aspect, the deep recursive network comprises a plurality of N sequentially connected recursive network layers; where N is a positive integer greater than 0.
[0031] The step of inputting the skeletal map and the non-graphical features into the deep recurrent network for feature fusion and determining the fused features includes:
[0032] The i-th feature to be encoded is input into the i-th recursive network layer to obtain the i-th graphic feature; when i is 1, the i-th feature to be encoded is the skeleton map;
[0033] The non-graphic features and the i-th graphic features are fused to obtain the (i+1)-th feature to be encoded;
[0034] Increase the value of i, and return to execute the operation of inputting the i-th feature to be encoded into the i-th recursive network layer to obtain the i-th graphic feature, until i equals N, and then determine the (i+1)-th feature to be encoded as the fused feature.
[0035] A second aspect of this application provides a hand hygiene detection device, comprising:
[0036] The first display module is used to sequentially display the first prompt information corresponding to each handwashing step during the user's handwashing process;
[0037] The data acquisition module is used to acquire video data corresponding to the user's handwashing actions in each handwashing step within the display duration of the first prompt information.
[0038] The skeleton diagram acquisition module is used to acquire multiple skeleton diagrams corresponding to each handwashing step based on the video data, and the skeleton diagrams are used to indicate the user's hand movements;
[0039] The scoring module is used to generate a scoring level corresponding to the user's handwashing actions in each handwashing step based on the multiple skeletal diagrams.
[0040] The second display module is used to display the rating level.
[0041] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the hand hygiene detection method as described in the first aspect above.
[0042] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the hand hygiene detection method as described in the first aspect above.
[0043] A fifth aspect of this application provides a computer program product that, when run on a computer, causes the computer to perform the hand hygiene detection method described in the first aspect.
[0044] Compared with the prior art, the embodiments of this application have the following advantages:
[0045] In this embodiment, the electronic device acquires a skeletal diagram of the user's handwashing actions in each step based on video data corresponding to the handwashing movements. It then scores the user's handwashing movements in each step based on the skeletal diagram, generating a rating level for each handwashing movement. Since the skeletal diagram accurately represents the details and characteristics of the user's hand movements, and different handwashing movements show significant differences on the skeletal diagram, scoring based on the skeletal diagram and generating a rating level can reduce the subjectivity and bias of relying solely on manual observation or simple rule-based judgment, thereby improving the accuracy of hand hygiene detection. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a schematic diagram of the framework of a hand hygiene detection system provided in an embodiment of this application;
[0048] Figure 2 This is a schematic diagram of a hand hygiene detection method provided in an embodiment of this application;
[0049] Figure 3 This is a flowchart illustrating the generation of a rating level, as provided in an embodiment of this application.
[0050] Figure 4 This is a flowchart of a step-determination model provided in an embodiment of this application;
[0051] Figure 5 This is a schematic diagram of a skeletal diagram processing flow provided in an embodiment of this application;
[0052] Figure 6 This is a schematic diagram of a hand hygiene testing process provided in an embodiment of this application;
[0053] Figure 7 This is a schematic diagram of another hand hygiene detection method provided in an embodiment of this application;
[0054] Figure 8 This is a schematic diagram of the structure of a deep recursive network provided in an embodiment of this application;
[0055] Figure 9 This is a schematic diagram of a hand hygiene detection device provided in an embodiment of this application;
[0056] Figure 10This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0057] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0058] Hand hygiene is recognized both domestically and internationally as the simplest, most effective, convenient, and economical measure to reduce the risk of hospital-acquired infections. Despite its crucial role in reducing healthcare-associated infections, effective hand hygiene education and testing methods remain limited. Existing hand hygiene education methods primarily rely on lectures and video demonstrations, and most existing hand hygiene testing methods are based on manual observation. Manual observation of hand hygiene is susceptible to the subjective influence of the observer. Furthermore, while some hand hygiene education systems exist, these systems mainly provide handwashing instructions and lack the ability to score users' actual hand movements in real time, thus failing to serve as effective hand hygiene testing tools.
[0059] Therefore, embodiments of this application provide a hand hygiene detection system. Figure 1 A schematic diagram of the framework of a hand hygiene detection system provided in an embodiment of this application is shown. Figure 1 As shown, on the device side, the electronic device can collect video data through a camera. Then, the electronic device can input the collected video data and data obtained from the browser into a skeletal extraction model to generate a skeletal diagram, which is then displayed on the user interface. Simultaneously, the electronic device can also transmit user information, skeletal diagrams, and other data to the server. The server can process the received user information, skeletal diagrams, and other data through a backend, and input the processed data into a preset model for further analysis and processing, generating a rating level and score corresponding to the user's handwashing actions. The server can also transmit the rating level and score to the electronic device and display them in the user interface. Specifically, the electronic device can be an augmented reality (AR) device, thereby providing students and healthcare providers with real-time, interactive, user-friendly, and data-driven training and assessment. Through the hand hygiene detection system provided in this application embodiment, the augmented reality device can capture the user's hand movements during handwashing and then score the user's hand movements to provide feedback to the user.
[0060] The technical solution of this application will be described below through specific embodiments.
[0061] Reference Figure 2 The diagram illustrates a hand hygiene detection method provided in an embodiment of this application. This method can be applied to... Figure 1 The aforementioned hand hygiene detection system. The electronic devices in the hand hygiene detection system can be augmented reality (AR) devices, servers, electronic control units (ECUs), microcontroller units (MCUs), central processing units (CPUs), etc. The aforementioned hand hygiene detection method may specifically include the following steps:
[0062] S201. During the user's handwashing process, the first prompt information corresponding to each handwashing step is displayed sequentially.
[0063] In this embodiment, when a user needs to perform hand hygiene testing, the user can initiate a start command to the electronic device. The electronic device then responds to the user's start command by continuously capturing images of the sink using a camera. The electronic device can perform target detection on the captured images to determine whether the user's hands are present in the sink. If the electronic device does not detect the user's hands in the image, i.e., it determines that the user's hands are not present in the sink, the electronic device can determine that the user has not yet started the handwashing operation, and the electronic device may not display the first prompt information. If the electronic device detects the user's hands in the image, i.e., it determines that the user's hands are present in the sink, the electronic device can determine that the user has started the handwashing operation, and the electronic device can sequentially display the first prompt information corresponding to each handwashing step during the user's handwashing process. Specifically, the first prompt information corresponding to a certain handwashing step can be information guiding the user to perform the corresponding hand movements for that handwashing step, such as a diagram of the hand movements for that handwashing step, or an instructional video for that handwashing step.
[0064] In one possible implementation, the electronic device can collect user information before performing hand hygiene checks. Specifically, the electronic device can display a preset information collection page on a display device, where the user can input their information. For example, the user information input may include, but is not limited to, user identification, the user's department, the user's hospital, and the selected training program. The electronic device can store the user information in a preset database. Specifically, the electronic device can store the user information in a MySQL database. This information enables the system to personalize training courses, track user progress over time, and generate department-specific reports. This step ensures that all training data is accurately attributed to the corresponding user for further analysis and feedback.
[0065] S202. During the display duration of the first prompt message, video data corresponding to the user's handwashing actions in each handwashing step is collected.
[0066] In this embodiment, the display duration of the first prompt information corresponding to different handwashing steps can be different. Specifically, the display duration of the first prompt information corresponding to each handwashing step can be preset by the developers or set by the user according to their own needs. Specifically, the electronic device can collect video data of the user's hand movements through a camera within the display duration of the first prompt information corresponding to a certain handwashing step, and determine the video data collected within that display duration as the video data of the user performing that handwashing step. For example, when there are 7 handwashing steps, and the display duration of the first prompt information corresponding to the first handwashing step is 8 seconds, the electronic device can collect video data containing the user's hand movements when performing the first handwashing step within the 8 seconds of displaying the first prompt information corresponding to the first handwashing step.
[0067] S203. Obtain multiple skeletal diagrams corresponding to each handwashing step based on video data.
[0068] In this embodiment, after acquiring video data corresponding to each handwashing step, the electronic device can obtain multiple skeletal diagrams corresponding to each handwashing step based on the video data. The skeletal diagrams can represent the user's hand movements during a particular handwashing step. Specifically, the video data can consist of multiple video frames. The electronic device can input the video data into a preset skeletal extraction model to extract the skeletal diagram corresponding to each video frame. For example, the skeletal extraction model can be a MediaPipe model.
[0069] In one possible implementation, the skeleton graph may include a set of joints V. t And a skeletal diagram used to represent the connections between various joints. For example, the set of joints may include 23 joints, each of which can represent a joint on the palm. The skeletal diagram can be represented as an undirected spatial graph. Wherein, the set of joints V... t Relationship diagram with skeleton It can be as follows:
[0070]
[0071] in, This can be the skeletal relationship diagram corresponding to the t-th video frame. t It can be the set of key points corresponding to the t-th video frame. It can be the set of skeleton connection edges corresponding to the t-th video frame. This can be the coordinates of the i-th joint in the t-th video frame. N can be the total number of joints; for example, N can be 21.
[0072] S204. Based on multiple skeletal diagrams, generate a rating level corresponding to the user's handwashing actions in each handwashing step.
[0073] In this embodiment, after the electronic device acquires multiple skeleton maps corresponding to the video data of the user performing a certain handwashing step, it can generate a rating level corresponding to the handwashing action of the user when performing the handwashing step based on the multiple skeleton maps.
[0074] In one possible implementation, after acquiring multiple skeletal diagrams corresponding to the first handwashing step, the electronic device can input these diagrams into a step judgment model, which then generates a judgment result for the first handwashing step. The first handwashing step can be any one of the multiple handwashing steps. Specifically, the judgment result generated by the electronic device can include probability values corresponding to the multiple skeletal diagrams and category labels for each diagram. The probability values in the judgment result can represent the probability that the hand movements corresponding to the multiple skeletal diagrams are classified as the hand movements corresponding to the first handwashing step. The category labels can represent the step category of the skeletal diagrams. Specifically, the category labels can include a first label and a second label. The first label can indicate that the step category of the skeletal diagram is the same as the step category of the first handwashing step associated with that skeletal diagram. The second label can indicate that the step category of the skeletal diagram is not the same as the step category of the first handwashing step associated with that skeletal diagram. For example, the first label can be "true" and the second label can be "false".
[0075] Figure 3 A flowchart illustrating a rating level generation process provided in an embodiment of this application is shown. Figure 3As shown, after generating probability values through a step-based judgment model, the electronic device can obtain the probability threshold corresponding to the current first handwashing step and determine whether the probability value is greater than the probability threshold corresponding to the first handwashing step. The probability threshold for each handwashing step can be different and can be preset by the developers. If the electronic device determines that the probability values of multiple skeletal diagrams corresponding to the first handwashing step are less than or equal to the probability threshold, the electronic device can generate a second prompt message and display it on a display device. The second prompt message is used to prompt the user to repeat the first handwashing step. The electronic device can re-capture video data of the user's hand movements during the first handwashing step and re-acquire multiple skeletal diagrams corresponding to the first handwashing step based on the new video data.
[0076] If the electronic device determines that the probability values of multiple skeletons corresponding to the first handwashing step are greater than the probability threshold corresponding to the first handwashing step, the electronic device can count the number of skeletons with the category label of the first label in all skeletons corresponding to the first step, and generate the rating level corresponding to the handwashing action in the first handwashing step based on the number of skeletons with the category label of the first label.
[0077] In one possible implementation, Figure 4 A flowchart of a step-determination model provided in an embodiment of this application is shown. Figure 4 As shown, the step-determination model can be composed of a batch normalization layer, multiple core modules, pooling layers, and fully connected layers. Each core module can be formed by connecting an attention mechanism module, a graph convolutional network module, and a temporal convolutional network module. After the electronic device inputs the skeletal map into the step-determination model, the model first normalizes the input skeletal map using the batch normalization layer. Then, the model sequentially inputs the normalized skeletal map into different levels of core modules for feature extraction. Next, the model inputs the graph features extracted by the core modules into the pooling layer for dimensionality reduction, reducing the amount of data. Finally, the model inputs the dimensionality-reduced graph features into the fully connected layer. The fully connected layer integrates the previously processed graph features and generates a determination result.
[0078] In one possible implementation, such as Figure 3As shown, after the electronic device determines that the probability values of multiple skeletal diagrams corresponding to the first handwashing step are greater than the probability threshold corresponding to the first handwashing step, it can count the number of skeletal diagrams with the category label "first" among all skeletal diagrams corresponding to the first step, and determine whether the number of skeletal diagrams with the category label "first" is greater than or equal to the first threshold. If the electronic device determines that the number of skeletal diagrams with the category label "first" is greater than or equal to the first threshold, then the electronic device can determine that the rating level corresponding to the handwashing action in the first handwashing step is the first level. For example, the first level can be "perfect" or "perfect".
[0079] If the electronic device determines that the number of skeletal diagrams with the first category label is less than a first threshold, it can further determine whether the number of skeletal diagrams with the first category label is greater than or equal to a second threshold. If the electronic device determines that the number of skeletal diagrams with the first category label is less than the first threshold but greater than or equal to the second threshold, it can determine that the rating level corresponding to the handwashing action in the first handwashing step is the second level. For example, the first level can be "good" or "good". At this time, the electronic device can generate a third prompt message based on all the skeletal diagrams corresponding to the current first step and display the third prompt message through a display device. The third prompt message can be used to prompt the user to correct their handwashing actions.
[0080] If the electronic device determines that the number of skeletons with the category label "first" is less than a first threshold and less than a second threshold, then the rating level of the current first handwashing step is determined to be level three. For example, the first level could be "fail" or "fail". At this time, the electronic device can generate a second prompt message and display it on a display device.
[0081] In this embodiment, the electronic device can generate a rating level for the user's handwashing actions during the handwashing process based on the number of skeletal diagrams with the first category label. Therefore, the method provided in this embodiment can quantify the evaluation process, making hand hygiene detection more objective and standardized, avoiding subjective judgment bias, and improving the accuracy of hand hygiene detection. Furthermore, multi-level classification can finely differentiate hand movement performance, providing richer feedback, making it easier for users to understand their own performance and make targeted improvements, thereby improving user learning efficiency.
[0082] In one possible implementation, in order to make the decision results generated by the step decision model more accurate. Figure 5 This illustration shows a schematic diagram of a skeletal diagram processing flow provided in an embodiment of this application. For example... Figure 5As shown, the skeletal diagram acquired by the electronic device can include 20 joints and the skeletal connection edges between each joint. After acquiring the skeletal diagram corresponding to each video frame, the electronic device can connect the skeletal diagrams corresponding to multiple video frames according to a preset number of frames to generate skeletal sequence information. Then, the electronic device can input the skeletal sequence information into the step judgment model to generate a skeletal sequence information judgment result. For example, after acquiring the skeletal diagram corresponding to each video frame in the video data of a user performing a certain handwashing step, the electronic device can connect the skeletal diagrams corresponding to every 12 video frames as input data into the step judgment model and generate a judgment result.
[0083] In one possible implementation, before generating a decision result through the step-based decision model, the electronic device can also acquire a first training model and a first training dataset input by the user, and train the first training model using the first training dataset to obtain the step-based decision model. For example, the first training model can be an STGCN model. Specifically, the first training dataset can consist of multiple training images and expected labels corresponding to each training image. The expected labels corresponding to the training videos can be labeled by researchers, and the expected labels can be used to represent the action category to which the training image belongs. For example, researchers can collect 768 complete handwashing videos from 280 nursing students before training. Each handwashing video can be 2 to 3 minutes long and can contain all handwashing steps. After collecting these handwashing videos, researchers can edit each handwashing video according to the 7 steps, editing each handwashing video into 7 training videos. Each training video can correspond to one handwashing step. See Table 1, which shows the number of training videos provided in this application embodiment.
[0084]
[0085] Table 1
[0086] To ensure the trained step-judgment model can adapt to different camera distances, researchers can perform data augmentation on each training video after acquiring the training video for each handwashing step. Specifically, researchers can first normalize the training videos. Since the coordinates of each joint in the skeletal map extracted from the training videos are affected by the distance between the camera and the hand, normalization is necessary to eliminate this difference. Then, for the normalized training videos, researchers can rotate them. Specifically, they can rotate the training videos with a 45-degree stride. The training videos are collected from a fixed camera, but in actual use, video data acquired by electronic devices may be obtained from cameras at different angles. Therefore, training the model with randomly rotated training videos increases the robustness of the trained step-judgment model. Then, researchers can input all the data-augmented training videos into the skeletal extraction model, which will then obtain multiple training images corresponding to each training video. Researchers can then assign a desired label to each training image based on the handwashing step corresponding to the training video.
[0087] S205, Display rating levels.
[0088] In this embodiment, after generating a rating for the user's handwashing performance at a given step, the electronic device can display the rating for each handwashing action in the process on the corresponding display page. Furthermore, to create a competitive and motivating environment, the electronic device can also respond to user queries, generate ranking information based on the user's current rating, and display the ranking information on the display page, allowing the user to view their ranking within their department or training queue.
[0089] In this embodiment, the electronic device can objectively and quantitatively assess a user's hand hygiene and detect whether the user's hand movements during handwashing conform to the World Health Organization's seven-step hand hygiene guidelines. Therefore, the method provided in this embodiment can improve the accuracy of hand hygiene detection.
[0090] Figure 6 A schematic diagram of a hand hygiene testing process provided in an embodiment of this application is shown. Figure 6As shown, after acquiring video data containing the user's hand movements, the electronic device can extract skeletal diagrams of the user during each handwashing step. Then, the electronic device can generate a rating level corresponding to the user's handwashing actions in each step based on multiple skeletal diagrams. To further quantify the user's hand hygiene, after generating the rating levels for each handwashing step, the electronic device can also combine the rating levels of all handwashing steps to generate a score for the user's entire handwashing process.
[0091] Specifically, the method for generating evaluation scores for electronic devices can be described as follows.
[0092] Figure 7 A flowchart illustrating the specific implementation of a hand hygiene detection method S204 according to the second embodiment of this application is shown. See also... Figure 7 Compared to Figure 2 In the embodiment described herein, the hand hygiene detection method further includes steps S701 to S702 after step S204, as detailed below:
[0093] S701. Determine the standard operation time of the handwashing action in the first handwashing step based on the number of skeleton diagrams with the category label as the first label.
[0094] In this embodiment, after generating a rating level corresponding to the user's handwashing actions in each handwashing step, the electronic device can further combine the rating levels of multiple handwashing steps to generate an overall score for the user's handwashing process. Specifically, after obtaining the category label of the skeleton diagram corresponding to each handwashing step, the electronic device can count the number of skeleton diagrams with the first label for each handwashing step. For the first handwashing step in the handwashing process, the electronic device can determine the standard operation time for the user when performing the first handwashing step based on the number of skeleton diagrams with the first label corresponding to the first handwashing step. The standard operation time can be used to represent the duration for which the user's handwashing actions conform to the required handwashing actions for a given step.
[0095] Specifically, for any handwashing step in the handwashing process, after counting the number of skeletons with the first category label in that handwashing step, the electronic device can calculate the standard operation time for the user when performing that handwashing step based on the number of skeletons with the first category label and the frame rate corresponding to the video data.
[0096] S702. Input the multiple skeleton diagrams corresponding to each handwashing step, the standard operation time, the rating level, and the hand-rubbing judgment result into the score evaluation model to generate the evaluation score.
[0097] In this embodiment, after the electronic device collects video data corresponding to the user's handwashing actions in each handwashing step, it can continue to collect video data including the sink and generate a hand-rubbing judgment result based on the video data. Specifically, the electronic device can generate a hand-rubbing judgment result by determining whether the user's hands are in the water flow in the video data. The hand-rubbing judgment result can include a first result and a second result. The first result can be used to indicate that the user performed a hand-rubbing operation after completing all handwashing steps. The second result can be used to indicate that the user did not perform a hand-rubbing operation after completing all handwashing steps. The electronic device can input the video data including the sink into a target detection model to generate the hand-rubbing judgment result. After generating the hand-rubbing judgment result, the electronic device can input all the skeleton diagrams corresponding to each handwashing step, the standard operation time corresponding to each handwashing step, and the rating level corresponding to each handwashing step into a score evaluation model to generate an evaluation score for the user during the handwashing process. After generating the evaluation score, the electronic device can display the evaluation score on the corresponding display page of the display device.
[0098] In this embodiment, in addition to generating a user's rating for each handwashing step, the electronic device can further combine information such as standard operation time and hand-rubbing judgment results to generate a score for the user's entire handwashing process. Therefore, the method provided in this embodiment can reduce observer bias and provide quantitative feedback to users, thereby offering an effective hand hygiene training method to improve the efficiency of users' hand hygiene learning. Furthermore, the method provided in this embodiment is applicable to various medical environments, making it a sustainable and effective solution for improving the hand hygiene habits of healthcare workers and students.
[0099] In one possible implementation, the score evaluation model may include a feature extraction network, a deep recurrent network, and a fully connected layer. The specific process by which the electronic device generates a score using the score evaluation model can be described as follows: For any handwashing step, the electronic device can input the standard operation time, rating level, and hand-rubbing judgment result corresponding to each handwashing step into the feature extraction network. The feature extraction network extracts features from the standard operation time, rating level, and hand-rubbing judgment result corresponding to each handwashing step, generating non-graphical features for each step. Specifically, the feature extraction network can be a Convolutional Neural Network (CNN). After obtaining the non-graphical features corresponding to each handwashing step, the electronic device can input all the skeletal and non-graphical features corresponding to each handwashing step into the deep recurrent network. The deep recurrent network fuses all the skeletal and non-graphical features corresponding to all handwashing steps, generating fused features. Specifically, the deep recurrent network can be a Relational Graph Neural Network (RGNN). After acquiring the fused features, the electronic device can input the fused features into the fully connected layer of the score evaluation model to predict the score and generate the evaluation score.
[0100] In one possible implementation, Figure 8 A schematic diagram of the structure of a deep recurrent network provided in an embodiment of this application is shown. Figure 8 As shown, a deep recurrent network can include multiple N sequentially connected recurrent network layers. N can be a positive integer greater than 0. For example, a deep recurrent network can include three N sequentially connected recurrent network layers. After obtaining the non-graph features corresponding to all handwashing steps, the electronic device can input the i-th feature to be encoded into the i-th recurrent network layer of the deep recurrent network to obtain the i-th graph feature. When i is 1, the first feature to be encoded can be multiple skeletal graphs corresponding to all handwashing steps. After extracting the i-th graph feature, the electronic device can fuse the non-graph features and the i-th graph feature to obtain the (i+1)-th feature to be encoded. Then, the electronic device can increment i by 1 and return to input the i-th feature to be encoded into the i-th recurrent network layer to obtain the i-th graph feature. This process continues until i equals N, at which point the electronic device can determine the (i+1)-th feature to be encoded as the fused feature.
[0101] In one possible implementation, before generating the evaluation score through the score evaluation model, the developers can obtain a second training model and a second training dataset input by the user, and train the second training model using the second training dataset to obtain the step judgment model. The second training dataset can include training data and the expected scores corresponding to the training data. The electronic device can input the second training dataset into the second training model, which generates training scores for each training data point in the training dataset. Then, the electronic device can input the training scores and expected scores for each training data point into a preset loss function to calculate the loss value for the second training model. The electronic device can then determine whether the loss value is less than a preset loss threshold. If the electronic device determines that the loss value is greater than or equal to the loss threshold, it can update the second training model based on the loss value and input the second training dataset into the updated second training model to continue model training. The electronic device can continuously train the second training model using the second training dataset until the loss value is less than the loss threshold. The electronic device can then determine the second training model with a loss value less than the loss threshold as the score evaluation model. The loss function can be a cross-entropy function.
[0102] Specifically, the loss function can be as follows.
[0103]
[0104] Here, `loss` represents the loss value. `cross entryopy` represents the cross-entropy function. `y` represents the training score. It can represent the expected score corresponding to the training data.
[0105] Training data can include training images corresponding to each of the seven handwashing steps, training operation duration, expected score, and hand-rubbing training results. Specifically, when collecting the second training dataset, researchers can have participants apply fluorescent powder to their hands before washing. Then, participants can perform all handwashing steps sequentially, and training data is collected. After completing all handwashing steps, researchers can use a fluorescent light to measure the area of fluorescent powder residue on the participants' hands. Then, researchers can calculate the expected score corresponding to the currently collected training data based on the area of fluorescent powder residue on the participants' hands and the area of their palms.
[0106] The specific formula for calculating the expected score is as follows.
[0107]
[0108] in, This can represent the expected score corresponding to the training data. D′ can represent the area of residual fluorescent powder on the subject's hand. D can represent the area of the subject's palm.
[0109] In this embodiment, since the expected score set by the researchers is calculated based on the residual area of the fluorescent powder after the subject's actual operation, the method provided in this embodiment can make the expected score in the second training dataset more in line with the actual operation, thereby improving the accuracy of the step judgment model trained by the second training dataset.
[0110] It should be noted that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0111] Reference Figure 9 The diagram illustrates a hand hygiene detection device according to an embodiment of this application, which may specifically include a first display module 901, a data acquisition module 902, a skeletal map acquisition module 903, a scoring module 904, and a second display module 905, wherein:
[0112] The first display module 901 is used to sequentially display the first prompt information corresponding to each handwashing step during the user's handwashing process;
[0113] The acquisition module 902 is used to acquire video data corresponding to the user's handwashing actions in each handwashing step within the display duration of the first prompt information;
[0114] The skeleton diagram acquisition module 903 is used to acquire multiple skeleton diagrams corresponding to each handwashing step based on the video data, and the skeleton diagrams are used to indicate the user's hand movements.
[0115] The scoring module 904 is used to generate a scoring level corresponding to the user's handwashing action in each handwashing step based on the multiple skeletal diagrams.
[0116] The second display module 905 is used to display the rating level.
[0117] The scoring module 904 can also be used to input the plurality of skeletal diagrams corresponding to the first handwashing step into the step judgment model to generate a judgment result; the judgment result includes category labels corresponding to the plurality of skeletal diagrams respectively, the category labels are used to indicate the step category of the skeletal diagram, and the first handwashing step is any one of the plurality of handwashing steps; based on the number of skeletal diagrams whose category label is the first label, a scoring level corresponding to the handwashing action in the first handwashing step is generated, the first label is used to indicate that the step category of the skeletal diagram is the step category corresponding to the first handwashing step.
[0118] The scoring module 904 can also be used to generate a second prompt message if the probability value is less than or equal to a probability threshold; the second prompt message is used to prompt the user to repeat the first handwashing step; if the probability value is greater than the probability threshold, a scoring level corresponding to the handwashing action in the first handwashing step is generated based on the number of skeleton diagrams with the category label as the first label.
[0119] The scoring module 904 can also be used to determine the scoring level corresponding to the handwashing action in the first handwashing step as a first level if the number of skeletal diagrams with the first category label is greater than or equal to a first threshold; if the number of skeletal diagrams with the first category label is less than the first threshold and the number of skeletal diagrams with the first category label is greater than or equal to a second threshold, then determine the scoring level corresponding to the handwashing action in the first handwashing step as a second level, and generate third prompt information based on the multiple skeletal diagrams; the third prompt information is used to prompt the user to correct the handwashing action; if the number of skeletal diagrams with the first category label is less than the second threshold, then determine the scoring level corresponding to the handwashing action in the first handwashing step as a third level, and generate second prompt information; the second prompt information is used to prompt the user to repeat the first handwashing step.
[0120] The scoring module 904 can also be used to determine the standard operation time corresponding to the first handwashing step based on the number of skeleton diagrams with the category label as the first label; and input the multiple skeleton diagrams corresponding to each handwashing step, the standard operation time, the scoring level, and the hand-rubbing judgment result into the score evaluation model to generate an evaluation score.
[0121] The scoring module 904 can also be used to extract features from the standard operation duration, the scoring level, and the hand-rubbing judgment result to determine non-graphic features; input the skeleton map and the non-graphic features into the deep recurrent network for feature fusion to determine the fused features; input the fused features into the fully connected layer for score prediction to generate the evaluation score.
[0122] The scoring module 904 can also be used to input the i-th feature to be encoded into the i-th recurrent network layer to obtain the i-th graphic feature; when i is 1, the i-th feature to be encoded is the skeleton map; perform feature fusion on the non-graphic feature and the i-th graphic feature to obtain the (i+1)-th feature to be encoded; increment the value of i, and return to execute the operation of inputting the i-th feature to be encoded into the i-th recurrent network layer to obtain the i-th graphic feature, until i is equal to N, and then determine the (i+1)-th feature to be encoded as the fused feature.
[0123] As the apparatus embodiments are basically similar to the method embodiments, they are described in a relatively simple manner. For relevant details, please refer to the description in the method embodiment section.
[0124] Reference Figure 10 The diagram illustrates an electronic device according to an embodiment of this application. Figure 10 As shown, the electronic device 1000 in this embodiment includes: a processor 1010, a memory 1020, and a computer program 1021 stored in the memory 1020 and executable on the processor 1010. When the processor 1010 executes the computer program 1021, it implements the steps in the various embodiments of the hand hygiene detection method described above, for example... Figure 2 The steps S201 to S205 are shown. Alternatively, when the processor 1010 executes the computer program 1021, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 3 The functions of modules 301 to 305 are shown.
[0125] For example, the computer program 1021 can be divided into one or more modules / units, which are stored in the memory 1020 and executed by the processor 1010 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which can be used to describe the execution process of the computer program 1021 in the electronic device 1000. For example, the computer program 1021 can be divided into a first display module, an acquisition module, a skeleton map acquisition module, a scoring module, and a second display module, with the specific functions of each module as follows:
[0126] The first display module is used to sequentially display the first prompt information corresponding to each handwashing step during the user's handwashing process;
[0127] The data acquisition module is used to acquire video data corresponding to the user's handwashing actions in each handwashing step within the display duration of the first prompt information.
[0128] The skeleton diagram acquisition module is used to acquire multiple skeleton diagrams corresponding to each handwashing step based on the video data, and the skeleton diagrams are used to indicate the user's hand movements;
[0129] The scoring module is used to generate a scoring level corresponding to the user's handwashing actions in each handwashing step based on the multiple skeletal diagrams.
[0130] The second display module is used to display the rating level.
[0131] The electronic device 1000 may be an augmented reality (AR) device, a server, an electronic control unit (ECU), a microcontroller unit (MCU), a central processing unit (CPU), or other similar devices. The electronic device 1000 may include, but is not limited to, a processor 1010 and a memory 1020. Those skilled in the art will understand that... Figure 10 This is merely one example of electronic device 1000 and does not constitute a limitation on electronic device 1000. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 1000 may also include input / output devices, network access devices, buses, etc.
[0132] The processor 1010 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0133] The memory 1020 can be an internal storage unit of the electronic device 1000, such as a hard disk or memory of the electronic device 1000. The memory 1020 can also be an external storage device of the electronic device 1000, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 1000. Furthermore, the memory 1020 can include both internal and external storage units of the electronic device 1000. The memory 1020 is used to store the computer program 1021 and other programs and data required by the electronic device 1000. The memory 1020 can also be used to temporarily store data that has been output or will be output.
[0134] This application also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the hand hygiene detection method as described in the foregoing embodiments.
[0135] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the hand hygiene detection method as described in the foregoing embodiments.
[0136] This application also discloses a computer program product that, when run on a computer, causes the computer to execute the hand hygiene detection method described in the foregoing embodiments.
[0137] The embodiments described above are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for detecting hand hygiene, characterized in that, include: During the user's handwashing process, the first prompt message corresponding to each handwashing step is displayed sequentially; During the display duration of the first prompt information, video data corresponding to the user's handwashing actions in each handwashing step is collected. Based on the video data, multiple skeletal diagrams corresponding to each handwashing step are obtained, and the skeletal diagrams are used to indicate the user's hand movements; Based on the multiple skeletal diagrams, a rating level is generated corresponding to the user's handwashing actions in each handwashing step; The rating level is displayed.
2. The method according to claim 1, characterized in that, The step of generating a rating level for each handwashing action of the user in each handwashing step based on the multiple skeletal diagrams specifically includes: The multiple skeleton diagrams corresponding to the first handwashing step are input into the step judgment model to generate a judgment result; the judgment result includes the category labels corresponding to the multiple skeleton diagrams respectively, and the category labels are used to represent the step category of the skeleton diagram, wherein the first handwashing step is any one of the multiple handwashing steps. Based on the number of skeleton diagrams with the category label as the first label, a rating level is generated corresponding to the handwashing action in the first handwashing step, where the first label indicates that the step category of the skeleton diagram is the step category corresponding to the first handwashing step.
3. The method according to claim 2, characterized in that, The determination result also includes the probability value of the hand movements corresponding to the multiple skeletal diagrams being the hand movements corresponding to the first handwashing step; The step of generating a rating level corresponding to the handwashing action in the first handwashing step based on the number of skeletal diagrams with the category label as the first label specifically includes: If the probability value is less than or equal to the probability threshold, a second prompt message is generated; the second prompt message is used to prompt the user to repeat the first handwashing step. If the probability value is greater than the probability threshold, a rating level corresponding to the handwashing action in the first handwashing step is generated based on the number of skeletons with the category label as the first label.
4. The method according to claim 2 or 3, characterized in that, The step of generating a rating level corresponding to the handwashing action in the first handwashing step based on the number of skeletal diagrams with the category label as the first label includes: If the number of skeletons with the category label as the first label is greater than or equal to the first threshold, then the scoring level corresponding to the handwashing action in the first handwashing step is determined to be the first level; If the number of skeletal diagrams with the first category label is less than the first threshold, and the number of skeletal diagrams with the first category label is greater than or equal to the second threshold, then the scoring level corresponding to the handwashing action in the first handwashing step is determined to be the second level, and a third prompt message is generated based on the multiple skeletal diagrams; the third prompt message is used to prompt the user to correct the handwashing action. If the number of skeletons with the category label as the first label is less than the second threshold, then the rating level corresponding to the handwashing action in the first handwashing step is determined to be the third level, and a second prompt message is generated; the second prompt message is used to prompt the user to repeat the first handwashing step.
5. The method according to claim 2, characterized in that, After generating the rating level corresponding to the handwashing action in the first handwashing step based on the number of skeletal diagrams with the category label as the first label, the method further includes: The standard operation time corresponding to the first handwashing step is determined based on the number of skeleton diagrams with the category label as the first label. The multiple skeletal diagrams corresponding to each handwashing step, the standard operation time, the rating level, and the hand-rubbing judgment result are input into the score evaluation model to generate an evaluation score.
6. The method according to claim 5, characterized in that, The score evaluation model includes a deep recurrent network and a fully connected layer; The process of inputting the multiple skeletal diagrams corresponding to each handwashing step, the standard operation time, the scoring level, and the hand-rubbing judgment result into the score evaluation model to generate an evaluation score includes: Feature extraction is performed on the standard operation duration, the rating level, and the hand-rubbing judgment result to determine non-graphic features; The skeletal map and the non-graphical features are input into the deep recurrent network for feature fusion to determine the fused features; The fused features are input into the fully connected layer for score prediction to generate the evaluation score.
7. The method according to claim 6, characterized in that, The deep recursive network comprises multiple N sequentially connected recursive network layers; where N is a positive integer greater than 0. The step of inputting the skeletal map and the non-graphical features into the deep recurrent network for feature fusion and determining the fused features includes: The i-th feature to be encoded is input into the i-th recursive network layer to obtain the i-th graphic feature; when i is 1, the i-th feature to be encoded is the skeleton map; The non-graphic features and the i-th graphic features are fused to obtain the (i+1)-th feature to be encoded; Increase the value of i, and return to execute the operation of inputting the i-th feature to be encoded into the i-th recursive network layer to obtain the i-th graphic feature, until i equals N, and then determine the (i+1)-th feature to be encoded as the fused feature.
8. A hand hygiene detection device, characterized in that, include: The first display module is used to sequentially display the first prompt information corresponding to each handwashing step during the user's handwashing process; The data acquisition module is used to acquire video data corresponding to the user's handwashing actions in each handwashing step within the display duration of the first prompt information. The skeleton diagram acquisition module is used to acquire multiple skeleton diagrams corresponding to each handwashing step based on the video data, and the skeleton diagrams are used to indicate the user's hand movements; The scoring module is used to generate a scoring level corresponding to the user's handwashing actions in each handwashing step based on the multiple skeletal diagrams. The second display module is used to display the rating level.
9. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, the electronic device implements the hand hygiene detection method as described in any one of claims 1-7.
10. A computer program product, characterized in that, It includes a computer program, which, when run, causes the hand hygiene detection method as described in any one of claims 1-7 to be performed.
