Outpatient nursing risk assessment method and system based on artificial intelligence

By constructing an association matrix and a connection graph, and combining an LSTM model and a fully connected neural network, the problem of inaccurate judgment of crowd behavior in outpatient public areas in existing technologies has been solved, enabling accurate identification and targeted intervention of crowd behavior and improving safety management efficiency.

CN121504140APending Publication Date: 2026-02-10中国人民解放军总医院京南医疗区
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511576270.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

The existing outpatient nursing risk assessment system cannot accurately identify video data in the outpatient public area, resulting in inaccurate judgment of the status of the waiting group and the inability to take targeted intervention measures before abnormal events occur, thus increasing safety risks.

Method used

By constructing an association matrix and a connection graph, analyzing individual position vectors and inter-frame velocities, calculating flow entropy and global density, using an LSTM model to predict emotion categories, and combining a fully connected neural network to identify behavior categories, the optimal intervention measures are selected.

Benefits of technology

It enables accurate identification and prediction of crowd behavior, provides scenario adaptability and intelligent recommendation capabilities, and guides security and medical personnel to take targeted response strategies to reduce security risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504140A_ABST
    Figure CN121504140A_ABST
Patent Text Reader

Abstract

The invention discloses an outpatient nursing risk assessment method and system based on artificial intelligence, and relates to the technical field of risk assessment, and the method comprises the following steps: S1, obtaining outpatient video data, S2, analyzing disorder degree and global density, S3, determining individual groups, S4, calculating group stability, and S5, outputting an intervention measure scheme. According to the method, the spatial-temporal features of individuals are aggregated, and the full-connection neural network is used for behavior category recognition, so that the method can accurately distinguish complex scenes such as normally-ordered scenes, local aggregation scenes and panic diffusion scenes, and the optimal measure scheme is screened through accurate behavior category judgment; therefore, a safety management decision is no longer a simple threshold alarm, but has scene adaptability and intelligent recommendation ability, and can guide security and medical personnel to adopt a most targeted disposal strategy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of risk assessment, in particular to a clinic nursing risk assessment method and system based on artificial intelligence. BACKGROUND

[0002] A clinic nursing risk assessment system based on artificial intelligence uses AI visual analysis technology to monitor the abnormal behavior of the crowd in the clinic hall in real time, such as gathering and running, and automatically warns of potential safety risks, improving the efficiency of clinic safety management. In the patent application No. 202011210311.2, a "clinic nursing assessment system is disclosed, which relates to the technical field of clinic nursing. The present application comprises a nursing unit, a medical management unit, a doctor-patient interaction unit and a nursing assessment unit. The nursing unit combs all the treatment processes and links of the patients, and forms data records in real time, which are sent to the medical management unit. The medical management unit sorts and classifies the treatment experience and project of the patient, and forms detailed treatment records. The doctor-patient interaction unit can help patients and medical staff communicate based on the medical management unit, improve the treatment suggestions and content, and improve the satisfaction of the treatment. The results generated by the doctor-patient interaction unit are sent to the nursing assessment unit in the form of data, and the nursing assessment unit evaluates the operation specification of the nursing staff combined with the patient satisfaction. The clinic nursing assessment system can evaluate the operation specification of the nursing staff and form feedback to help improve the work and improve the quality of nursing service."

[0003] The above prior art solves the problem of difficult evaluation and improvement of the actual nursing effect of the patient, but the system lacks analysis of video data in the public area of the clinic during operation, resulting in inaccurate judgment of the state of the waiting crowd, and unable to distinguish between orderly flow and potential panic gathering. Only after the abnormal event breaks out can it be reacted passively, and because the system cannot accurately identify the behavior category, the subsequent intervention scheme cannot take the optimal solution for the specific scene, thereby causing greater safety risks. SUMMARY

[0004] The present application aims to provide a clinic nursing risk assessment method and system based on artificial intelligence to solve the problems raised in the background art.

[0005] To achieve the above-mentioned purpose, the present application provides the following technical scheme: a clinic nursing risk assessment method based on artificial intelligence, comprising the following steps:

[0006] S1, acquiring clinic video data: after collecting video data through the camera arranged in the public area of the clinic, identifying the video data frame by frame, determining the position vector and inter-frame speed of each individual in different video frames, and constructing an association matrix for each video frame, the flow entropy value of the video frame is calculated by using the association matrix;

[0007] S2, analyze the disorder degree and global density: calculate the disorder degree and global density of the current video frame according to the position vector of each individual in the video frame;

[0008] S3, determine the individual grouping: read the position vector, motion direction and inter-frame speed of all individuals in each video frame, judge whether the individuals meet the constraint condition, if yes, build a weak connection edge between them, otherwise do not perform any operation, when the number of weak connection edges is higher than the preset value, convert the weak connection edge into a strong connection edge, construct a connection graph and a relationship graph using the individuals and the weak connection edges and strong connection edges between individuals, and group all individuals according to the relationship graph;

[0009] S4, calculate the grouping stability: determine the average interval value, speed correlation value and angle correlation value of each group in different video frames, calculate the stability according to the average interval value, speed correlation value and angle correlation value, and output the emotion category probability of each group in different video frames through the LSTM model;

[0010] S5, output the intervention measure scheme: obtain the spatial feature vector and time sequence feature vector of each individual at different time, aggregate them to obtain a global feature vector, input the global feature vector into a fully connected neural network to identify the behavior category of the current crowd, and select the optimal measure scheme according to the behavior category.

[0011] Preferably, the S1 specifically comprises the following steps:

[0012] S101, collect video data through the camera arranged in the outpatient public area, decode and read the video data, identify the video data frame by frame, each person in each video frame is regarded as an individual, and determine the position of all individuals in each video frame;

[0013] S102, select the i-th individual P i , and then count the position vector of P i in each video frame; , wherein represents the position vector of the i-th individual P i in the first video frame, represents the position vector of the i-th individual P i in the second video frame, represents the position vector of the i-th individual P i in the N-th video frame, N represents the total number of video frames, i represents the individual serial number, and according to , the inter-frame speed of P i in each video frame is calculated. , wherein represents the i-th individual Pi inter-frame velocity in the 1st video frame, represents the i-th individual P i inter-frame velocity in the 2nd video frame, represents the i-th individual P i inter-frame velocity in the Nth video frame, represents the i-th individual P i position vector in the N-1th video frame, Δt represents the time interval between two frames, represents the i-th individual P i X-direction position in the Nth video frame, represents the i-th individual P i Y-direction position in the Nth video frame, represents the i-th individual P i X-direction position in the N-1th video frame, represents the i-th individual P i Y-direction position in the N-1th video frame, represents the i-th individual P i X-direction inter-frame velocity in the Nth video frame, represents the i-th individual P i Y-direction inter-frame velocity in the Nth video frame.

[0014] Preferably, the S1 further comprises the following steps:

[0015] S103, after the inter-frame velocities of all individuals in each video frame are counted, the j-th video frame R j is determined, and the inter-frame velocities of all individuals in the j-th video frame R j are read wherein M represents the total number of individuals in the j-th video frame R j , j represents the video frame serial number, and the velocity average value is calculated according to wherein represents the ω-th individual P ω X-direction inter-frame velocity in the j-th video frame, represents the X-direction inter-frame velocity average of all individuals in the j-th video frame, represents the ω-th individual P ω Y-direction inter-frame velocity in the j-th video frame, represents the Y-direction inter-frame velocity average of all individuals in the j-th video frame, and ω represents the individual serial number;

[0016] S104, the inter-frame velocities of all individuals are utilized​ and the average value of the speed A corresponding correlation matrix Σ is constructed, where where v X represents the X-direction inter-frame speed, v Y represents the Y-direction inter-frame speed,

[0017] S105, the corresponding flow entropy value r is calculated according to the correlation matrix Σ in the jth video frame R i and the individual total number M, where represents a constant value.

[0018] Preferably, the S2 specifically comprises the following steps:

[0019] S201, after determining the flow entropy values of all video frames, the corresponding motion direction is analyzed according to the position vectors of all individuals in each video frame, the direction range is equally divided into eight sector regions, and the eight sector regions are respectively: [0°, 45°), [45°, 90°), [90°, 135°), [135°, 180°), [180°, 225°), [225°, 270°), [270°, 315°), [315°, 360°), the number of individuals in each sector region in a single video frame is counted A1, A2, …, A8, and the disorder degree L of the video frame is calculated according to A1, A2, …, A8, where A c represents the number of individuals in the cth sector region, and c represents the region serial number;

[0020] S202, after obtaining the position vectors of all individuals in each video frame, an arbitrary video frame is selected, an independent point is set at each individual position, and a corresponding exclusive region is drawn for all independent points, and the distance between all pixel points in the region and the current independent point is less than the distance between the pixel points and other independent points;

[0021] S203, the areas of each exclusive region Q1, Q2, …, Q C are counted, and the global density U is calculated according to the total number of independent points C of the current video frame and the areas Q1, Q2, …, Q C of all exclusive regions, where U = C / (Q1+Q2+…+Q C ), Q C represents the exclusive region area of the Cth independent point, and the operation is repeated until the global densities of all video frames are determined.

[0022] Preferably, the S3 specifically comprises the following steps:

[0023] S301. After extracting the position vector, motion direction and inter-frame velocity of all individuals in each video frame, determine whether each individual satisfies the constraint conditions with other individuals. If the constraint conditions are satisfied, a weak connection edge is built between the corresponding two individuals; otherwise, no operation is performed.

[0024] S302. After determining the weak connections of all individuals in different video frames, treat the individuals as nodes and construct the connection graph corresponding to each video frame based on the nodes and the weak connections between nodes. Count the number of times each edge appears in different video frames. If the number of appearances is higher than the preset value, convert the weak connection edge into a strong connection edge. Otherwise, do not perform any operation. Construct a relationship graph using the nodes and the strong connections between nodes.

[0025] S303. Traverse all connected subgraphs in the relation graph, store the nodes belonging to the same connected subgraph into the same group, and group the nodes that do not have strong connections into a single group.

[0026] Preferably, step S4 specifically includes the following steps:

[0027] S401, Select the g-th group f g Then, statistical grouping f g In the current video frame R γ The number of nodes V g Then, determine group f g All nodes according to Retrieve the location vector of the corresponding individual Direction of movement and inter-frame speed use Analyze the average interval value in f represents the g-th group g V of the Middle g 1 node Indicates the Vth g The position vectors of each node. Let represent the position vector of the α-th node. Let α represent the position vector of the β-th node, where α and β represent the node indices. Indicates the Vth g The direction of movement of each node Indicates the Vth g The inter-frame speed of each node, through Calculate the velocity-related values in inter-frame speed of the a-th node, inter-frame speed of the β-th node, according to angle correlation value is analyzed wherein motion direction of the a-th node, motion direction of the β-th node;

[0028] S402, after obtaining the average interval value, the speed correlation value and the angle correlation value of all groups in each video frame, the average interval value, the speed correlation value and the angle correlation value are calculated by using a stability analysis algorithm, so as to obtain the stability of each group in different video frames, and the stability analysis algorithm is specifically:

[0029]

[0030] wherein, Ψ represents stability, ω1, ω2, ω3 represent weight coefficients, ω e e-th weight coefficient, e represents the number of weight coefficient sequence numbers, average interval value, d min average interval minimum value, d max average interval maximum value, speed correlation value, angle correlation value;

[0031] S403, after reading the inter-frame speed and the motion direction of all nodes in each video frame, a multi-dimensional input representation is constructed according to the inter-frame speed, the motion direction of all nodes and the average interval value, the average speed difference value, the average angle difference value and the stability of different groups, and then the multi-dimensional input representation is transmitted to an LSTM model for analysis, and the emotion category probability of each group in different video frames is output, wherein the emotion categories include joy, calmness, excitement, terror, sadness and anger.

[0032] Preferably, the S5 specifically includes the following steps:

[0033] S501, after extracting the flow entropy value, the disorder degree, the global density, the position vector of all individuals, the motion direction, the inter-frame speed and the average interval value, the speed correlation value, the angle correlation value, the stability and the emotion category probability of different groups in each video frame, a feature vector of each individual at different time is constructed, and the feature vector of each individual at different time and the connection graph at the corresponding time are transmitted to a graph convolution network for analysis, so as to output the spatial feature vector of all individuals at different time;

[0034] S502. After setting the sliding window size, arbitrarily select a time point, extract the feature vectors of multiple time points before that time point according to the sliding window size, and transmit the feature vector of each individual at that time point, the feature vectors of multiple time points before that time point, and the relationship graph between individuals to the graph convolutional network for analysis, thereby outputting the temporal feature vector of all individuals at that time point. Repeat the operation until all time points have been selected.

[0035] S503. After concatenating the spatial feature vector and temporal feature vector of each individual at the same time, a joint feature vector is obtained. The joint feature vectors of all individuals at different times are counted. The joint feature vectors of individuals at different times are analyzed using a recurrent neural network, and the comprehensive feature vector of each individual is output.

[0036] S504. After receiving the comprehensive feature vector of each individual, the comprehensive feature vectors of all individuals are aggregated into a global feature vector through a global average pooling layer. The global feature vector is then input into a fully connected neural network to determine the behavior category of the current crowd and determine the corresponding confidence level. The behavior categories include normal order, local aggregation, waiting and wandering, queue disorder, emergency running, and panic spread.

[0037] S505. After determining the behavioral categories Be1, Be2, ..., Be6 of the current population and their corresponding confidence levels F(Be1), F(Be2), ..., F(Be6), read all intervention plans E1, E2, ..., E W E W Let E represent the W-th intervention plan, according to E1, E2, ..., E W And query the corresponding utility values ​​Us(E1,Be), Us(E2,Be), ..., Us(E) for behavior category Be. W According to Us(E1,Be),...,Us(E), W Be) to select the optimal solution in F(Be) represents the confidence level corresponding to behavior category Be, and E cs Let cs represent the cs-th intervention plan, where cs represents the plan number. The optimal intervention plan E is used to remind and reassure the people in the outpatient public area.

[0038] The aforementioned artificial intelligence-based outpatient nursing risk assessment system includes a video data acquisition unit, a disorder degree analysis unit, an emotion category output unit, and a measure screening unit.

[0039] The video data acquisition unit collects video data through cameras deployed in the outpatient public area, identifies the video data frame by frame, determines the position vector and inter-frame velocity of each individual in different video frames, constructs an association matrix for each video frame, and uses the association matrix to calculate the flow entropy value of the video frame.

[0040] The disorder analysis unit calculates the disorder and global density of the current video frame according to the position vector of each individual in the video frame;

[0041] The emotion category output unit reads the position vector, motion direction, and inter-frame velocity of all individuals in each video frame, and determines whether the constraints between individuals are met. If they are met, a weak connection edge is built between them; otherwise, no operation is performed. When the occurrence frequency of a weak connection edge is higher than a preset value, the weak connection edge is converted into a strong connection edge. A connection graph and a relationship graph are constructed using the individuals and the weak and strong connection edges between individuals, respectively. All individuals are grouped according to the relationship graph, and the average interval value, velocity correlation value, and angle correlation value of each group in different video frames are determined. The stability is calculated based on the average interval value, velocity correlation value, and angle correlation value, and the emotion category probability of each group in different video frames is output through an LSTM model.

[0042] The location recognition unit acquires the spatial feature vector and temporal feature vector of each individual at different times, aggregates them, and inputs the resulting global feature vector into a fully connected neural network to identify the behavior category of the current crowd and select the optimal solution based on the behavior category.

[0043] Compared with the prior art, the beneficial effects of the present invention are:

[0044] 1. This invention analyzes the position vectors of individuals and the velocity between frames frame by frame. It can not only calculate the disorder degree and flow entropy that reflect the overall degree of chaos, but also dynamically capture the potential interaction relationships between individuals by constructing an association matrix and connecting edges. This two-layer network construction from physical movement to social relationship can more profoundly reveal the internal structure and organizational pattern of the crowd, surpassing the limitations of traditional methods that only rely on density or overall movement trajectory. Furthermore, by calculating the stability of grouping, this method can quantify the organization and consistency of the group. At the same time, by introducing an LSTM model to analyze time series data to predict the probability of emotion, it combines the physical movement state of the group with the potential psychological and emotional state, providing a richer and more advanced decision-making basis for judging the category of crowd behavior.

[0045] 2. This invention aggregates the spatiotemporal characteristics of individuals and uses a fully connected neural network for behavior category recognition. This enables the method to accurately distinguish complex scenarios such as normal order, local aggregation, and panic spread. By accurately determining the behavior category, the optimal response plan is selected. This makes safety management decisions no longer a simple threshold alarm, but has scenario adaptability and intelligent recommendation capabilities, which can guide security and medical personnel to take the most targeted response strategies. Attached Figure Description

[0046] Figure 1 An overall method flowchart is provided for embodiments of the present invention. Detailed Implementation

[0047] 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.

[0048] Example 1:

[0049] Please see Figure 1 This invention provides a technical solution: an artificial intelligence-based outpatient nursing risk assessment method, comprising the following steps:

[0050] S1. Acquire outpatient video data: After collecting video data by cameras deployed in the outpatient public area, the video data is identified frame by frame to determine the position vector and inter-frame velocity of each individual in different video frames, and an association matrix is ​​constructed for each video frame. The flow entropy value of the video frame is calculated using the association matrix.

[0051] S2. Analyze disorder and global density: Calculate the disorder and global density of the current video frame based on the position vector of each individual in the video frame;

[0052] S3. Determine individual grouping: Read the position vector, motion direction and inter-frame velocity of all individuals in each video frame, and determine whether the constraints between individuals are met. If they are met, a weak connection edge is built between them; otherwise, no operation is performed. When the number of occurrences of a weak connection edge is higher than a preset value, the weak connection edge is converted into a strong connection edge. A connection graph and a relationship graph are constructed using the individuals and the weak and strong connection edges between individuals, respectively, and all individuals are grouped according to the relationship graph.

[0053] S4. Calculate group stability: Determine the average interval, velocity correlation, and angle correlation of each group in different video frames, calculate the stability based on the average interval, velocity correlation, and angle correlation, and output the emotion category probability of each group in different video frames through the LSTM model;

[0054] S5. Output intervention plan: Obtain the spatial feature vector and temporal feature vector of each individual at different times, aggregate them, and input the resulting global feature vector into a fully connected neural network to identify the behavior category of the current population, and select the optimal intervention plan based on the behavior category.

[0055] S1 specifically includes the following steps:

[0056] S101. Video data is collected by cameras deployed in the outpatient public area. After decoding and reading the data, the video data is identified frame by frame. Each person in each video frame is treated as a separate individual, and the position of all individuals in each video frame is determined.

[0057] The process of identifying video data frame by frame includes the following steps:

[0058] S1011. Input the video data frame by frame into the YOLOv5 neural network for recognition. The model outputs the recognition results, which are specifically the position coordinates, confidence scores and categories of all target detection boxes in the current video frame. The categories include, but are not limited to, people and objects. After removing overlapping and low-confidence detection boxes through non-maximum suppression, only the detection boxes belonging to the category of people are retained.

[0059] S1012. Transmit the recognition results frame by frame to the StrongSORT model. After receiving the first video frame, extract all detection boxes S within the current video frame. 1,1 ,S 1,2 ,…,S 1,n The appearance feature vector, and for each detection box S 1,1 ,S 1,2 ,…,S 1,n Create the corresponding trajectory z 1,1 ,z 1,2 ,…,z 1,n S 1,n z represents the nth detection box within the first video frame. 1,n This represents the trajectory corresponding to the nth detection box within the first video frame, where n represents the total number of detection boxes within the first video frame. Each trajectory includes the detection box number, its position within the current video frame, and its appearance feature vector.

[0060] S1013. For the currently existing trajectory z 1,1 ,z 1,2,…,z 1,n Set the corresponding Kalman filter, and use the Kalman filter to predict the current trajectory z. 1,1 ,z 1,2 ,…,z 1,n The corresponding detection box S 1,1 ,S 1,2 ,…,S 1,n Estimated position in the next frame This indicates the estimated position of the nth detection box within the first video frame in the next frame;

[0061] S1014, Receive all detection frames S of the next video frame 2,1 ,S 2,2 ,…,S 2,m S 2,m This represents the m-th detection box within the second video frame, where m represents the total number of detection boxes within the second video frame. The selected detection box S... 2,1 Afterwards, S was determined. 2,1 actual location and appearance feature vectors Then, using With each trajectory z 1,1 ,z 1,2 ,…,z 1,n Estimated location Calculate the first distance value in express With estimated location The first distance value between them θ represents the innovation covariance matrix, according to and each trajectory z 1,1 ,z 1,2 ,…,z 1,n appearance feature vector Analyze the second distance value in Indicate z 1,n The appearance feature vector, express With appearance feature vector The second distance value between them Repeat the operation until S 2,2 ,…,S 2,m All were selected;

[0062] S1015. Using the Kuhn-Munkres algorithm, based on the detection box S 2,1 ,S 2,2 ,…,S 2,m With all trajectories z1,1 ,z 1,2 ,…,z 1,n Output all matching pairs and their corresponding association values ​​based on the first and second distance values ​​between them;

[0063] S1016. Determine whether the detection box and trajectory in the current matching pair are valid matches based on the correlation value. If the correlation value is lower than the preset value, the detection box and trajectory in the current matching pair are determined to be valid matches; otherwise, they are determined to be invalid matches.

[0064] S1017. When the detection box and the trajectory are a valid match, the state vector of the Kalman filter in the corresponding trajectory is corrected by using the actual position of the detection box, and the actual position of the detection box is used as the position of the trajectory in the second frame. At the same time, the appearance feature vector of the detection box is stored in the corresponding trajectory.

[0065] S1018. When the detection box and the trajectory are invalid matches, create a new trajectory for the unmatched detection box and mark the unmatched trajectory. After marking it 30 times, delete the trajectory directly.

[0066] S1019. Repeat the operation until all video frames have been received, and the StrongSORT model outputs the position of each person in each video frame in the current video data.

[0067] S102, Select the i-th individual P i Then, statistical analysis of P. i Position vector within each video frame

[0068] in Represents the i-th individual P i The position vector within the first video frame. Represents the i-th individual P i The position vector within the second video frame. Represents the i-th individual P i The position vector within the Nth video frame, where N represents the total number of video frames and i represents the individual index, is calculated according to... Calculate P i Inter-frame speed of each video frame in Represents the i-th individual P i The inter-frame speed in the first video frame, Represents the i-th individual P i The inter-frame speed in the second video frame, Represents the i-th individual P i The inter-frame velocity of the Nth video frame, Represents the i-th individual P i The position vector within the (N-1)th video frame, where Δt represents the time interval between two frames. Represents the i-th individual P i The position in the X direction within the Nth video frame. Represents the i-th individual P i At the Y-direction position within the Nth video frame, Represents the i-th individual P i At the X-direction position within the (N-1)th video frame, Represents the i-th individual P i At the Y-direction position within the (N-1)th video frame, Represents the i-th individual P i The inter-frame velocity in the X direction of the Nth video frame. Represents the i-th individual P i Inter-frame velocity in the Y direction of the Nth video frame;

[0069] S1 further includes the following steps:

[0070] S103. After calculating the inter-frame velocity of all individuals in each video frame, select the j-th video frame R. j Read and determine the j-th video frame R j Inter-frame velocity of all individuals Where M represents the j-th video frame R j The total number of individuals in the video, where j represents the video frame number, according to Calculate the average velocity in Represents the ω-th individual P ω The inter-frame velocity in the X direction of the j-th video frame. Let represent the average inter-frame velocity in the X direction for all individuals in the j-th video frame. Represents the ω-th individual P ω The inter-frame velocity in the Y direction of the j-th video frame. ω represents the average inter-frame velocity in the Y direction for all individuals in the j-th video frame, and ω represents the individual index.

[0071] S104, Utilize the inter-frame velocity of all individuals and average speed Construct the corresponding correlation matrix Σ, where Where v X v represents the inter-frame velocity in the X direction. Y Indicates the inter-frame velocity in the Y direction.

[0072]

[0073] S105, Based on the j-th video frame R i The flow entropy value r is calculated from the correlation matrix Σ and the total number of individuals M, where Indicates a constant value;

[0074] S2 specifically includes the following steps:

[0075] S201. After determining the flow entropy values ​​of all video frames, analyze the corresponding motion directions based on the position vectors of all individuals within each video frame. Divide the direction range into eight equally spaced sector regions, which are: [0°, 45°), [45°, 90°), [90°, 135°), [135°, 180°), [180°, 225°), [225°, 270°), [270°, 315°), [315°, 360°). Count the number of individuals A1, A2, ..., A8 within each sector region of a single video frame. Calculate the disorder degree L of the video frame based on A1, A2, ..., A8. A c This represents the number of individuals within the c-th sector, where c represents the sector index.

[0076] S202. After obtaining the position vectors of all individuals in each video frame, arbitrarily select a video frame, set an independent point at each individual position, and delineate a corresponding exclusive region for all independent points. The distance between all pixels in this region and the current independent point is less than the distance between all other independent points.

[0077] S203. Calculate the area of ​​each exclusive region: Q1, Q2, ..., Q C Based on the total number of independent points C in the current video frame and the areas Q1, Q2, ..., Q of all exclusive regions, C Calculate the global density U, where U = C / (Q1 + Q2 + ... + Q C ), Q C This represents the area of ​​the exclusive region of the Cth independent point. Repeat this operation until the global density of all video frames is determined.

[0078] S3 specifically includes the following steps:

[0079] S301. After extracting the position vector, motion direction and inter-frame velocity of all individuals in each video frame, determine whether each individual satisfies the constraint conditions with other individuals. If the constraint conditions are satisfied, a weak connection edge is built between the corresponding two individuals; otherwise, no operation is performed.

[0080] The specific constraints are as follows:

[0081] S3011, Extract the αth individual P α With the βth individual P β In the current video frame R γ Inner position vector and Then, according to and Calculate P α and P β Interval values ​​between in And d α,β ≤ indicates a limit value, which is set based on Hall's interpersonal distance theory, and α and β represent the node index. Represents the α-th individual P α In the current video frame R γ The X-direction position vector within the space. Represents the α-th individual P α In the current video frame R γ The Y-direction position vector within. Represents the β-th individual P β In the current video frame R γ The X-direction position vector within the space. Represents the β-th individual P β In the current video frame R γ The Y-direction position vector within the frame, where γ represents the video frame number;

[0082] S3012, Extract the αth individual P α With the βth individual P β In the current video frame R γ Direction of movement within and Then, according to and Calculate P α and P β angular difference between And φ α,β ≤π / 12;

[0083] S3013, Extract the αth individual P α With the βth individual P β In the current video frame R γ Inter-frame speed within and Then, according to and Calculate P α and P βSpeed ​​difference between And η α,β ≤0.06;

[0084] S302. After determining the weak connections of all individuals in different video frames, treat the individuals as nodes and construct the connection graph corresponding to each video frame based on the nodes and the weak connections between nodes. Count the number of times each edge appears in different video frames. If the number of appearances is higher than the preset value, convert the weak connection edge into a strong connection edge. Otherwise, do not perform any operation. Construct a relationship graph using the nodes and the strong connections between nodes.

[0085] S303. Traverse all connected subgraphs in the relation graph, store the nodes belonging to the same connected subgraph into the same group, and group the nodes that do not have strong connection edges into a group.

[0086] S4 specifically includes the following steps:

[0087] S401, Select the g-th group f g Then, statistical grouping f g In the current video frame R γ The number of nodes V g Then, determine group f g All nodes according to Retrieve the location vector of the corresponding individual Direction of movement and inter-frame speed use Analyze the average interval value in f represents the g-th group g V of the Middle g 1 node Indicates the Vth g The position vectors of each node. Let represent the position vector of the α-th node. Let α represent the position vector of the β-th node, where α and β represent the node indices. Indicates the Vth g The direction of movement of each node Indicates the Vth g The inter-frame speed of each node, through Calculate the velocity-related values in This represents the inter-frame velocity of the α-th node. Represents the inter-frame velocity of the β-th node, according to Analyze the angle correlation values in Indicates the direction of motion of the α-th node. Indicates the direction of motion of the β-th node;

[0088] S402. After obtaining the average interval value, velocity correlation value, and angle correlation value of all groups in each video frame, the stability analysis algorithm is used to calculate the average interval value, velocity correlation value, and angle correlation value to obtain the stability of each group in different video frames. The stability analysis algorithm is as follows:

[0089]

[0090] Where Ψ represents stability, ω1, ω2, ω3 represent weighting coefficients, and ω e This represents the e-th weight coefficient, where e represents the index of the weight coefficient. d represents the average interval value. min d represents the minimum average interval. max This represents the maximum value of the average interval. Indicates speed-related values. Indicates angle-related values;

[0091] S403. After reading the inter-frame velocity and motion direction of all nodes in each video frame, a multi-dimensional input representation is constructed based on the inter-frame velocity, motion direction of all nodes, as well as the average interval value, average velocity difference, average angle difference, and stability of different groups. This representation is then transmitted to the LSTM model for analysis, and the probability of the emotion category of each group in different video frames is output. The emotion categories include joy, calmness, excitement, fear, sadness, and anger.

[0092] S5 specifically includes the following steps:

[0093] S501. Extract the flow entropy, disorder, global density, position vectors of all individuals, motion direction, inter-frame velocity, average interval, velocity correlation, angle correlation, stability, and emotion category probability of each video frame. Then, construct the feature vector of each individual at different times. Transmit the feature vector of each individual at different times and the connection graph at the corresponding times to the graph convolutional network for analysis, thereby outputting the spatial feature vectors of all individuals at different times.

[0094] S502. After setting the sliding window size, arbitrarily select a time point, extract the feature vectors of multiple time points before that time point according to the sliding window size, and transmit the feature vector of each individual at that time point, the feature vectors of multiple time points before that time point, and the relationship graph between individuals to the graph convolutional network for analysis, thereby outputting the temporal feature vector of all individuals at that time point. Repeat the operation until all time points have been selected.

[0095] S503. After concatenating the spatial feature vector and temporal feature vector of each individual at the same time, a joint feature vector is obtained. The joint feature vectors of all individuals at different times are counted. The joint feature vectors of individuals at different times are analyzed using a recurrent neural network, and the comprehensive feature vector of each individual is output.

[0096] S504. After receiving the comprehensive feature vector of each individual, the comprehensive feature vectors of all individuals are aggregated into a global feature vector through a global average pooling layer. The global feature vector is then input into a fully connected neural network to determine the behavior category of the current crowd and determine the corresponding confidence level. The behavior categories include normal order, local clustering, waiting and wandering, queue disorder, emergency running, and panic spread.

[0097] S505. After determining the behavioral categories Be1, Be2, ..., Be6 of the current population and their corresponding confidence levels F(Be1), F(Be2), ..., F(Be6), read all intervention plans E1, E2, ..., E W E W Let E represent the W-th intervention plan, according to E1, E2, ..., E W And query the corresponding utility values ​​Us(E1,Be), Us(E2,Be), ..., Us(E) for behavior category Be. W According to Us(E1,Be),...,Us(E), W Be) to select the optimal solution in F(Be) represents the confidence level corresponding to behavior category Be, and E cs Let cs represent the cs-th intervention plan, where cs represents the plan number. The optimal intervention plan E is used to remind and reassure the people in the outpatient public area.

[0098] Example 2:

[0099] The present invention also provides an outpatient nursing risk assessment system based on artificial intelligence, including a video data acquisition unit, a disorder degree analysis unit, an emotion category output unit, and a measure screening unit;

[0100] After the video data acquisition unit collects video data through cameras deployed in the outpatient public area, it identifies the video data frame by frame, determines the position vector and inter-frame velocity of each individual in different video frames, and constructs an association matrix for each video frame. The association matrix is ​​then used to calculate the flow entropy value of the video frame.

[0101] The disorder analysis unit calculates the disorder and global density of the current video frame based on the position vector of each individual in the video frame;

[0102] The emotion category output unit reads the position vector, motion direction, and inter-frame velocity of all individuals in each video frame, and determines whether the constraints between individuals are met. If they are met, a weak connection edge is built between them; otherwise, no operation is performed. When the occurrence frequency of a weak connection edge exceeds a preset value, the weak connection edge is converted into a strong connection edge. A connection graph and a relationship graph are constructed using the individuals and the weak and strong connection edges between individuals, respectively. All individuals are grouped according to the relationship graph, and the average interval value, velocity correlation value, and angle correlation value of each group in different video frames are determined. The stability is calculated based on the average interval value, velocity correlation value, and angle correlation value, and the emotion category probability of each group in different video frames is output through an LSTM model.

[0103] The location recognition unit acquires the spatial and temporal feature vectors of each individual at different times, aggregates them, and inputs the resulting global feature vector into a fully connected neural network to identify the behavior category of the current crowd and select the optimal solution based on the behavior category.

[0104] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0105] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. An artificial intelligence-based outpatient nursing risk assessment method, characterized in that, The method includes the following steps: S1. Acquire outpatient video data: After collecting video data by cameras deployed in the outpatient public area, the video data is identified frame by frame to determine the position vector and inter-frame velocity of each individual in different video frames, and an association matrix is ​​constructed for each video frame. The flow entropy value of the video frame is calculated using the association matrix. S2. Analyze disorder and global density: Calculate the disorder and global density of the current video frame based on the position vector of each individual in the video frame; S3. Determine individual grouping: Read the position vector, motion direction and inter-frame velocity of all individuals in each video frame, and determine whether the constraints between individuals are met. If they are met, a weak connection edge is built between them; otherwise, no operation is performed. When the number of occurrences of a weak connection edge is higher than a preset value, the weak connection edge is converted into a strong connection edge. A connection graph and a relationship graph are constructed using the individuals and the weak and strong connection edges between individuals, respectively, and all individuals are grouped according to the relationship graph. S4. Calculate group stability: Determine the average interval, velocity correlation, and angle correlation of each group in different video frames, calculate the stability based on the average interval, velocity correlation, and angle correlation, and output the emotion category probability of each group in different video frames through the LSTM model; S5. Output intervention plan: Obtain the spatial feature vector and temporal feature vector of each individual at different times, aggregate them, and input the resulting global feature vector into a fully connected neural network to identify the behavior category of the current population, and select the optimal intervention plan based on the behavior category.

2. The outpatient nursing risk assessment method based on artificial intelligence according to claim 1, characterized in that: S1 specifically includes the following steps: S101. Video data is collected by cameras deployed in the outpatient public area. After decoding and reading the data, the video data is identified frame by frame. Each person in each video frame is treated as a separate individual, and the position of all individuals in each video frame is determined. S102, Select the i-th individual P i Then, statistical analysis of P. i Position vector within each video frame That Represents the i-th individual P i The position vector within the first video frame. Represents the i-th individual P i The position vector within the second video frame. Represents the i-th individual P i The position vector within the Nth video frame, where N represents the total number of video frames and i represents the individual index, is calculated according to... Calculate P i Inter-frame speed of each video frame in Represents the i-th individual P i The inter-frame speed in the first video frame, Represents the i-th individual P i The inter-frame speed in the second video frame, Represents the i-th individual P i The inter-frame velocity of the Nth video frame, Represents the i-th individual P i The position vector within the (N-1)th video frame, where Δt represents the time interval between two frames. Represents the i-th individual P i The position in the X direction within the Nth video frame. Represents the i-th individual P i At the Y-direction position within the Nth video frame, Represents the i-th individual P i At the X-direction position within the (N-1)th video frame, Represents the i-th individual P i At the Y-direction position within the (N-1)th video frame, Represents the i-th individual P i The inter-frame velocity in the X direction of the Nth video frame. Represents the i-th individual P i Inter-frame velocity in the Y direction of the Nth video frame.

3. The outpatient nursing risk assessment method based on artificial intelligence according to claim 2, characterized in that: S1 further includes the following steps: S103. After calculating the inter-frame velocity of all individuals in each video frame, select the j-th video frame R. j Read and determine the j-th video frame R j Inter-frame velocity of all individuals Where M represents the j-th video frame R j The total number of individuals in the video, where j represents the video frame number, according to Calculate the average velocity in Represents the ω-th individual P ω The inter-frame velocity in the X direction of the j-th video frame. Let represent the average inter-frame velocity in the X direction for all individuals in the j-th video frame. Represents the ω-th individual P ω The inter-frame velocity in the Y direction of the j-th video frame. ω represents the average inter-frame velocity in the Y direction for all individuals in the j-th video frame, and ω represents the individual index. S104, Utilize the inter-frame velocity of all individuals and average speed Construct the corresponding correlation matrix Σ, where Where v X v represents the inter-frame velocity in the X direction. Y Indicates the inter-frame velocity in the Y direction. S105, Based on the j-th video frame R i The flow entropy value r is calculated from the correlation matrix Σ and the total number of individuals M, where This represents a constant value.

4. The outpatient nursing risk assessment method based on artificial intelligence according to claim 1, characterized in that: S2 specifically includes the following steps: S201. After determining the flow entropy values ​​of all video frames, analyze the corresponding motion directions based on the position vectors of all individuals within each video frame. Divide the direction range into eight equally spaced sector regions. Count the number of individuals A1, A2, ..., A8 within each sector region of a single video frame. Calculate the disorder degree L of the video frame based on A1, A2, ..., A8. A c This represents the number of individuals within the c-th sector, where c represents the sector index. S202. After obtaining the position vectors of all individuals in each video frame, arbitrarily select a video frame, set an independent point at each individual position, and delineate a corresponding exclusive region for all independent points. The distance between all pixels in this region and the current independent point is less than the distance between all other independent points. S203. Calculate the area of ​​each exclusive region: Q1, Q2, ..., Q C Based on the total number of independent points C in the current video frame and the areas Q1, Q2, ..., Q of all exclusive regions, C Calculate the global density U, where U = C / (Q1 + Q2 + ... + Q C ), Q C This represents the area of ​​the exclusive region of the Cth independent point. The operation is repeated until the global density of all video frames is determined.

5. The outpatient nursing risk assessment method based on artificial intelligence according to claim 1, characterized in that: S3 specifically includes the following steps: S301. After extracting the position vector, motion direction and inter-frame velocity of all individuals in each video frame, determine whether each individual satisfies the constraint conditions with other individuals. If the constraint conditions are satisfied, a weak connection edge is built between the corresponding two individuals; otherwise, no operation is performed. S302. After determining the weak connections of all individuals in different video frames, treat the individuals as nodes and construct the connection graph corresponding to each video frame based on the nodes and the weak connections between nodes. Count the number of times each edge appears in different video frames. If the number of appearances is higher than the preset value, convert the weak connection edge into a strong connection edge. Otherwise, do not perform any operation. Construct a relationship graph using the nodes and the strong connections between nodes. S303. Traverse all connected subgraphs in the relation graph, store the nodes belonging to the same connected subgraph into the same group, and group the nodes that do not have strong connections into a single group.

6. The outpatient nursing risk assessment method based on artificial intelligence according to claim 1, characterized in that: S4 specifically includes the following steps: S401, Select the g-th group f g Then, statistical grouping f g In the current video frame R γ The number of nodes V g Then, determine group f g All nodes according to Retrieve the location vector of the corresponding individual Direction of movement and inter-frame speed use Analyze the average interval value in f represents the g-th group g V of the Middle g 1 node Indicates the Vth g The position vectors of each node. Let represent the position vector of the α-th node. Let α represent the position vector of the β-th node, where α and β represent the node indices. Indicates the Vth g The direction of movement of each node Indicates the Vth g The inter-frame speed of each node, through Calculate the velocity-related values in This represents the inter-frame velocity of the α-th node. Represents the inter-frame velocity of the β-th node, according to Analyze the angle correlation values in Indicates the direction of motion of the α-th node. Indicates the direction of motion of the β-th node; S402. After obtaining the average interval value, velocity correlation value and angle correlation value of all groups in each video frame, use the stability analysis algorithm to calculate the average interval value, velocity correlation value and angle correlation value, so as to obtain the stability of each group in different video frames. S403. After reading the inter-frame velocity and motion direction of all nodes in each video frame, a multi-dimensional input representation is constructed based on the inter-frame velocity, motion direction of all nodes, as well as the average interval value, average velocity difference, average angle difference, and stability of different groups. This representation is then transmitted to the LSTM model for analysis, and the probability of the emotion category of each group in different video frames is output.

7. The outpatient nursing risk assessment method based on artificial intelligence according to claim 1, characterized in that: S5 specifically includes the following steps: S501. Extract the flow entropy, disorder, global density, position vectors of all individuals, motion direction, inter-frame velocity, average interval, velocity correlation, angle correlation, stability, and emotion category probability of each video frame. Then, construct the feature vector of each individual at different times. Transmit the feature vector of each individual at different times and the connection graph at the corresponding times to the graph convolutional network for analysis, thereby outputting the spatial feature vectors of all individuals at different times. S502. After setting the sliding window size, arbitrarily select a time point, extract the feature vectors of multiple time points before that time point according to the sliding window size, and transmit the feature vector of each individual at that time point, the feature vectors of multiple time points before that time point, and the relationship graph between individuals to the graph convolutional network for analysis, thereby outputting the temporal feature vector of all individuals at that time point. Repeat the operation until all time points have been selected. S503. After concatenating the spatial feature vector and temporal feature vector of each individual at the same time, a joint feature vector is obtained. The joint feature vectors of all individuals at different times are counted. The joint feature vectors of individuals at different times are analyzed using a recurrent neural network, and the comprehensive feature vector of each individual is output. S504. After receiving the comprehensive feature vector of each individual, the comprehensive feature vectors of all individuals are aggregated into a global feature vector through a global average pooling layer. The global feature vector is then input into a fully connected neural network to determine the behavior category of the current population and the corresponding confidence level. S505. After determining the behavioral categories Be1, Be2, ..., Be6 of the current population and their corresponding confidence levels F(Be1), F(Be2), ..., F(Be6), read all intervention plans E1, E2, ..., E W E W Let E represent the W-th intervention plan, according to E1, E2, ..., E W And query the corresponding utility values ​​Us(E1,Be), Us(E2,Be), ..., Us(E) for behavior category Be. W According to Us(E1,Be),...,Us(E), W Be) to select the optimal solution in F(Be) represents the confidence level corresponding to behavior category Be, and E cs Let cs represent the cs-th intervention plan, where cs represents the plan number. The optimal intervention plan E is used to remind and reassure the people in the outpatient public area.

8. An outpatient nursing risk assessment system based on artificial intelligence, characterized in that, The outpatient nursing risk assessment system is applicable to the artificial intelligence-based outpatient nursing risk assessment method described in any one of claims 1-7, including a video data acquisition unit, a disorder degree analysis unit, an emotion category output unit, and a measure screening unit; The video data acquisition unit collects video data through cameras deployed in the outpatient public area, identifies the video data frame by frame, determines the position vector and inter-frame velocity of each individual in different video frames, constructs an association matrix for each video frame, and uses the association matrix to calculate the flow entropy value of the video frame. The disorder analysis unit calculates the disorder and global density of the current video frame according to the position vector of each individual in the video frame; The emotion category output unit reads the position vector, motion direction, and inter-frame velocity of all individuals in each video frame, and determines whether the constraints between individuals are met. If they are met, a weak connection edge is built between them; otherwise, no operation is performed. When the occurrence frequency of a weak connection edge is higher than a preset value, the weak connection edge is converted into a strong connection edge. A connection graph and a relationship graph are constructed using the individuals and the weak and strong connection edges between individuals, respectively. All individuals are grouped according to the relationship graph, and the average interval value, velocity correlation value, and angle correlation value of each group in different video frames are determined. The stability is calculated based on the average interval value, velocity correlation value, and angle correlation value, and the emotion category probability of each group in different video frames is output through an LSTM model. The location recognition unit acquires the spatial feature vector and temporal feature vector of each individual at different times, aggregates them, and inputs the resulting global feature vector into a fully connected neural network to identify the behavior category of the current crowd and select the optimal solution based on the behavior category.

Citation Information

Patent Citations

  • Outpatient nursing evaluation system

    CN112259208A