Behavior determination method, device, equipment and storage medium
By building a knowledge graph database and training behavior detection models, and using cosine similarity and Euclidean distance to monitor worker operations, the problem of the inability of existing technology to comprehensively monitor operating methods is solved, simplifying safety management and reducing costs at industrial sites.
Patent Information
- Application Number
- CN201911330611.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-20
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2039-12-20
AI Technical Summary
Existing technology cannot fully monitor how workers operate at industrial sites, resulting in loopholes in safety management, and manual observation and equipment installation are complex and costly.
By constructing a knowledge graph database, the behavior detection model is trained, and the cosine similarity and Euclidean distance between real-time operation images and standard operation images are used for behavior monitoring, and alarm information is generated to notify irregular operations.
It achieves comprehensive monitoring of workers' operating methods, simplifies the management process of industrial sites, reduces safety management costs, and improves judgment speed and accuracy.
Smart Images

Figure CN113011449B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of industrial safety technology, and in particular relates to a behavior detection method, device, equipment and storage medium. Background Art
[0002] Industrial site safety management is of great significance to any industrial workplace, and the country’s safety management requirements for industrial sites are becoming increasingly higher.
[0003] At present, to ensure the safety of industrial sites and prevent unsafe and irregular operation of machinery and equipment by industrial workers, a common prevention method is to equip machines or work clothes with relevant equipment to measure the end-to-end distance, and warn workers when the distance is less than the threshold. However, installing distance measuring equipment on machines and work clothes can only measure the distance between workers and machines, and cannot more comprehensively monitor the workers' operation methods. Summary of the invention
[0004] The embodiments of the present invention provide a behavior determination method, device, equipment and storage medium, which can solve the problem that the operation mode of workers cannot be monitored more comprehensively at present.
[0005] In a first aspect, a behavior determination method is provided, the method comprising:
[0006] Get real-time operational images;
[0007] Determine the cosine similarity and Euclidean distance between the real-time operation image and the pre-stored standard operation image according to the pre-trained behavior detection model;
[0008] Determine the similarity between the real-time operation image and the standard operation image based on the cosine similarity and the Euclidean distance;
[0009] When the similarity is less than a preset similarity threshold, it is determined that the operation behavior in the real-time operation image is not standard.
[0010] In a possible implementation, the method further includes:
[0011] Obtain target operation image information from the knowledge graph database; the target operation image information includes: standard operation images, standardized operation images, and non-standard operation images;
[0012] According to the standard operation image, the normal operation image and the non-normal operation image, a cosine similarity threshold and a Euclidean distance threshold are determined;
[0013] Calculate the similarity threshold based on the cosine similarity threshold and the Euclidean distance threshold.
[0014] In a possible implementation, the method further includes:
[0015] Acquire sample operation images; the sample operation images include: standard operation images, normative operation images and non-standard operation images; the standard operation images, normative operation images and non-standard operation images all include key nodes;
[0016] Determine the coordinate values of the key nodes in the standard operation image, the coordinate values of the key nodes in the standard operation image, and the coordinate values of the key nodes in the non-standard operation image;
[0017] According to the correspondence between the coordinate values of key nodes in standard operation images and standard operation images, the correspondence between the coordinate values of key nodes in standard operation images and standard operation images, and the correspondence between the coordinate values of key nodes in non-standard operation images and non-standard operation images, a knowledge graph database of operation behaviors is constructed.
[0018] In a possible implementation, the method further includes:
[0019] Delete the sample operation images whose operation images are not clear;
[0020] Delete sample operation images whose number of key nodes is less than the preset value.
[0021] In a possible implementation, determining a cosine similarity threshold and a Euclidean distance threshold according to the standard operation image, the normative operation image, and the non-normative operation image includes:
[0022] Extracting feature vectors of standard operation images, normative operation images and irregular operation images respectively;
[0023] A cosine similarity threshold and a Euclidean distance threshold are determined according to the feature vectors corresponding to the standard operation image, the normative operation image and the non-normative operation image respectively.
[0024] In a possible implementation, the method further includes:
[0025] Obtain target operation image information from the knowledge graph database; the target operation image information includes: standard operation images, standardized operation images, and non-standard operation images;
[0026] Extracting feature vectors of standard operation images, normative operation images and irregular operation images respectively;
[0027] According to the feature vectors corresponding to the standard operation images, the normative operation images and the irregular operation images, a behavior detection model is trained.
[0028] In a possible implementation, the method further includes:
[0029] Gradient descent method is used to adjust the parameters of the behavior detection model.
[0030] In a possible implementation, the method further includes:
[0031] When it is determined that the operation behavior in the real-time operation image is not standardized, an alarm message is generated; the alarm message is used to notify the staff that the construction worker has an irregular operation behavior.
[0032] In a possible implementation, extracting feature vectors of the standard operation image, the normative operation image, and the non-normative operation image respectively includes:
[0033] The standard operation images, normative operation images and non-standard operation images are input into the VGG16 neural network, and the feature vectors of the standard operation images, normative operation images and non-standard operation images are extracted respectively.
[0034] In one possible implementation, the behavior prediction model is a bigram network model.
[0035] In a second aspect, a behavior determination device is provided, the device comprising:
[0036] An acquisition module, used for acquiring real-time operation images;
[0037] A first determination module is used to determine the cosine similarity and Euclidean distance between the real-time operation image and the pre-stored standard operation image according to the pre-trained behavior detection model;
[0038] A second determination module is used to determine the similarity between the real-time operation image and the standard operation image according to the cosine similarity and the Euclidean distance;
[0039] The second determination module is further configured to determine that the operation behavior in the real-time operation image is not standardized when the similarity is less than a preset similarity threshold.
[0040] In a possible implementation, the acquisition module is further used to acquire target operation image information from the knowledge graph database; the target operation image information includes: standard operation images, standard operation images, and non-standard operation images;
[0041] A first determination module is used to determine a cosine similarity threshold and a Euclidean distance threshold according to the standard operation image, the standard operation image and the non-standard operation image;
[0042] Calculate the similarity threshold based on the cosine similarity threshold and the Euclidean distance threshold.
[0043] In a possible implementation, the device further includes:
[0044] The acquisition module is also used to acquire sample operation images; the sample operation images include: standard operation images, normative operation images and non-standard operation images; the standard operation images, normative operation images and non-standard operation images all include key nodes;
[0045] The second determination module is further used to determine the coordinate values of the key nodes in the standard operation image, the coordinate values of the key nodes in the standard operation image, and the coordinate values of the key nodes in the non-standard operation image;
[0046] A construction module is used to construct a knowledge graph database of operation behaviors based on the correspondence between the coordinate values of key nodes in the standard operation image and the operation standard image, the correspondence between the coordinate values of key nodes in the standard operation image and the standard operation image, and the correspondence between the coordinate values of key nodes in the non-standard operation image and the non-standard operation image.
[0047] In a possible implementation, the device further includes: a deleting module, configured to delete sample operation images whose operation images are unclear, and delete sample operation images whose number of key nodes is less than a preset value.
[0048] In a possible implementation manner, the first determining module is specifically configured to:
[0049] Extracting feature vectors of standard operation images, normative operation images and irregular operation images respectively;
[0050] A cosine similarity threshold and a Euclidean distance threshold are determined according to the feature vectors corresponding to the standard operation image, the normative operation image and the non-normative operation image respectively.
[0051] In a possible implementation, the device further includes:
[0052] An acquisition module is used to acquire target operation image information from a knowledge graph database; the target operation image information includes: standard operation images, standardized operation images, and non-standard operation images;
[0053] An extraction module, used for respectively extracting feature vectors of a standard operation image, a normal operation image and an abnormal operation image;
[0054] The training module is used to train a behavior detection model according to the feature vectors corresponding to the standard operation image, the normative operation image and the non-normative operation image.
[0055] In a possible implementation, the device further includes:
[0056] The adjustment module is used to adjust the parameters of the behavior detection model using the gradient descent method.
[0057] In a possible implementation, the device further includes:
[0058] The generation module is used to generate an alarm message when it is determined that the operation behavior in the real-time operation image is not standardized; the alarm message is used to notify the staff that the construction worker has an irregular operation behavior.
[0059] In a possible implementation, the extraction module is specifically used to:
[0060] The standard operation images, normative operation images and non-standard operation images are input into the VGG16 neural network, and the feature vectors of the standard operation images, normative operation images and non-standard operation images are extracted respectively.
[0061] In one possible implementation, the behavior prediction model is a bigram network model.
[0062] According to a third aspect, an electronic device is provided, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method according to the first aspect or any possible implementation manner of the first aspect is implemented.
[0063] In a fourth aspect, a computer storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0064] The behavior determination method, device, equipment and computer storage medium of the embodiments of the present invention obtain real-time operation images; determine the cosine similarity and Euclidean distance between the real-time operation images and the pre-stored standard operation images according to the pre-trained behavior detection model; when the cosine similarity is less than a preset cosine similarity threshold or the Euclidean distance is less than a preset Euclidean distance threshold, it is determined that the operation behavior in the real-time operation image is not standardized, which can more comprehensively monitor the workers' operation methods and simplify the management process of the industrial site. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0066] Figure 1 It is a flowchart of a method for constructing a knowledge graph database provided by an embodiment of the present invention;
[0067] Figure 2 It is a schematic diagram of a flow chart of data collection and storage provided by an embodiment of the present invention;
[0068] Figure 3 is a schematic diagram of the structure of a VGG16 neural network provided by an embodiment of the present invention;
[0069] Figure 4is a flow chart of a behavior determination method provided by an embodiment of the present invention;
[0070] Figure 5 It is a flow chart of determining the similarity between the operation behaviors in the real-time operation image and the standard operation image provided by one embodiment of the present invention;
[0071] Figure 6 is a structural diagram of a behavior determination device provided by an embodiment of the present invention;
[0072] Figure 7 It is a flowchart of a method for judging industrial safety behavior based on a knowledge graph provided by an embodiment of the present invention;
[0073] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0074] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0075] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0076] At present, industrial site safety management is of great significance to any industrial workplace, and the country's requirements for safety management of work sites are getting higher and higher. In order to ensure the safety of industrial sites and prevent unsafe and irregular operation of machinery and equipment by industrial workers, the commonly used prevention plans generally include the following two methods: manual observation and reminders and warnings, or equipping machines and work clothes with relevant equipment to measure end-to-end distances, and warning workers when the distance is less than the threshold.
[0077] Regarding the above two technical solutions, firstly, for manual observation and warning, the observers will stay at the industrial site for a long time, causing congestion at the industrial site and even large-scale dangers, and the labor cost is too high, resulting in a waste of funds. Secondly, for the installation of equipment on machines and work clothes for distance measurement, the same distance measuring equipment needs to be installed at many points on the work clothes. The operation process is too complicated, which affects the work efficiency of workers to some extent, and it is impossible to guarantee that all equipment will be fault-free. Once the equipment is found to be damaged, the work process will be blocked to a certain extent and resources will be wasted.
[0078] Therefore, the embodiments of the present invention provide a behavior determination method, apparatus, device and storage medium, which can more comprehensively monitor the operation mode of workers and simplify the management process of industrial sites.
[0079] To facilitate understanding of this embodiment, the behavior determination method provided by the embodiment of the present invention is first described in detail.
[0080] The behavior determination method provided in the embodiment of the present invention requires the construction of a knowledge graph database in advance, and the training of a behavior detection model based on sample data in the knowledge graph database. The following describes in detail the construction method of the knowledge graph database and the training method of the behavior detection model.
[0081] Figure 1 is a flow chart of a method for constructing a knowledge graph database provided by an embodiment of the present invention; Figure 1 As shown, the method may include:
[0082] S101: Acquire sample operation images; the sample operation images include: standard operation images, normative operation images and non-standard operation images; the standard operation images, normative operation images and non-standard operation images all include key nodes.
[0083] In one embodiment of the present invention, the standard operation image may be an image corresponding to the operation mode specified by the relevant organization or department. The standard operation image may be an image in which the operation mode does not exceed a certain range of the standard operation mode based on the standard operation image. The non-standard operation image may be an image corresponding to a certain dangerous accident caused by using the operation mode in the operation image for industrial site construction. Each sample operation image includes key nodes, wherein the key nodes refer to nodes of the human body.
[0084] To use the knowledge graph to judge the normative operation of industrial behavior, it is first necessary to construct a knowledge graph database that connects normative operations with non-normative operations, and store the collected image data in the knowledge graph database. For example, in the data collection process, images can be taken as resources for the knowledge graph database, and the normative operation image collection can be obtained by taking pictures of human demonstrations. Considering safety issues, the non-normative operation image collection can be obtained by taking pictures of simulated human models. When taking pictures, the human body nodes corresponding to six parts of the forehead, shoulders, elbows, wrists, chest, and waist are selected as key nodes. Figure 2 As shown in the figure, during the data collection process, the standard operation images are obtained by shooting the operations demonstrated by humans. In order to ensure safety, the non-standard operation images are obtained by shooting the operations demonstrated by simulation models. For example, a robot is used to simulate the human body to demonstrate non-standard operations. After the standard operation images and non-standard operation images are collected, key nodes are annotated on the images. For example, LabelImage is used to annotate the key nodes in the sample operation images. Images with less than five annotated nodes are invalid data. Images with no less than five annotated nodes are valid data. Valid data is used to construct the knowledge graph.
[0085] S102: Determine the coordinate values of the key nodes in the standard operation image, the coordinate values of the key nodes in the normative operation image, and the coordinate values of the key nodes in the non-normative operation image.
[0086] In one embodiment of the present invention, before determining the coordinate values of the key nodes in the sample operation image, it is necessary to determine whether the sample operation image is valid. Among them, a valid sample operation image refers to an image in which the number of key nodes in the image is greater than five. Sample operation images in which the number of key nodes is less than five are also required to be deleted. In addition, the sample operation image may have an unclear image corresponding to the operation method in the image, and it is impossible to determine what the operation method is or the key nodes in the sample operation image cannot be extracted, and such sample operation images need to be deleted.
[0087] After determining the valid sample operation image, the coordinate value of each key node is determined, that is, the coordinate value of the key node in the standard operation image, the coordinate value of the key node in the standard operation image, and the coordinate value of the key node in the non-standard operation image.
[0088] In addition, the sample operation images may have unclear images corresponding to the operation methods in the images, and it is impossible to determine what the operation methods are. Sample operation images with unclear operation images need to be deleted. Sample operation images with less than five identified key nodes also need to be deleted.
[0089] S103: Construct a knowledge graph database of operation behaviors according to the correspondence between the coordinate values of key nodes in the standard operation image and the standard operation image, the correspondence between the coordinate values of key nodes in the standard operation image and the standard operation image, and the correspondence between the coordinate values of key nodes in the non-standard operation image and the non-standard operation image.
[0090] In one embodiment of the present invention, each image in the sample operation image has a corresponding relationship with the coordinate value of the key node in each image, that is, the corresponding relationship between the coordinate value of the key node in the standard operation image and the operation standard image, the corresponding relationship between the coordinate value of the key node of the standard operation image and the standard operation image, and the corresponding relationship between the coordinate value of the key node of the non-standard operation image and the non-standard operation image. Based on the association relationship between the sample operation image and the key nodes in the sample image, a knowledge graph database is constructed. Wherein, when constructing the knowledge graph database, the sample operation image can be saved in the knowledge graph database in Node format.
[0091] After building the knowledge graph database, you need to use the images in the knowledge graph database to train a behavior detection model.
[0092] Specifically, target operation image information is obtained from the knowledge graph database; the target operation image information includes: standard operation images, normative operation images and non-normative operation images; feature vectors of the standard operation images, normative operation images and non-normative operation images are extracted respectively; and a behavior detection model is trained according to the feature vectors corresponding to the standard operation images, normative operation images and non-normative operation images respectively.
[0093] In one embodiment of the present invention, the target operation image information refers to the standard operation image, the standard operation image and the non-standard operation image in the knowledge graph database. When extracting the feature vectors of the standard operation image, the standard operation image and the non-standard operation image respectively, the VGG16 convolutional neural network can be used to extract the features in the image to obtain the feature vector. Then, according to the feature vectors corresponding to the standard operation image, the standard operation image and the non-standard operation image, the fully connected layer of VGG16 is trained by Lambda data exchange for the feature vector to obtain the weight value. The weight value is used as the parameter of the binary network to determine the behavior detection model. That is, the behavior determination model is a binary network model. In addition, in order to ensure the detection accuracy of the behavior detection model, the gradient descent algorithm is used to summarize and optimize the model, and the final model parameters are saved.
[0094] Among them, the VGG16 neural network structure in the embodiment of the present invention is as follows Figure 3 As shown in the figure, the convolution layer (convolution+ReLU) of VGG16 has 5 layers, including 13 convolution operations and 5 pooling operations (maxpooling) after each layer. The convolution operation of Block1 and Block2 has two steps, in which the effect of two consecutive 2*2 convolution kernels is the same as that of 5*5 convolution kernels. Block1 is the first convolution kernel, and the corresponding image size is 224*224*64. The first convolution kernel is a convolution filter, and the normal convolution operation doubles the dimension of the image. Block2 is the second convolution kernel, and the corresponding image size is 112*112*128. The second convolution kernel is like a fully connected layer (fully connected+ReLU), and there is no change to the image data. The convolution operation of Block3, Block4, and Block5 has three steps. Three consecutive 3*3 convolution kernels are used to replace the 7*7 convolution kernel. While ensuring the same processing range, the depth of the network is improved, the number of parameters is reduced, and the image properties can be better expressed. The convolution kernel step size is 1. Among them, the image size corresponding to Block3 is 56*56*256. The image size corresponding to Block4 is 28*28*512. The image size corresponding to Block5 is 14*14*512.
[0095] After the knowledge graph database and behavior detection model are determined, it is necessary to determine whether the behavior in the real-time operation image is standardized based on the knowledge graph database and behavior detection model.
[0096] The embodiment of the present invention introduces knowledge graphs into industrial sites to judge safety behaviors, builds a knowledge graph database in the factory, and can quickly judge whether the results meet the specifications based on the collected images. The judgment rate and accuracy of the judgment results are further improved through standardized processes. Compared with the traditional judgment using sensors, drones, etc., this patented technology reduces the complex operations caused by various equipment configurations, simplifies the judgment process, and effectively reduces factory safety costs.
[0097] Figure 4 FIG. 1 is a flow chart of a behavior determination method provided by an embodiment of the present invention. Figure 1 As shown, the method may include:
[0098] S401: Acquire real-time operation images.
[0099] In one embodiment of the present invention, the real-time operation image refers to an image of a worker's operation captured by a camera device in an industrial site. For example, the worker's operation can be captured by a camera device in a factory and analyzed by frame sampling in time periods to obtain a real-time operation image.
[0100] S402: Determine the cosine similarity and Euclidean distance between the real-time operation image and the pre-stored standard operation image according to the pre-trained behavior detection model.
[0101] In one embodiment of the present invention, the real-time operation image and the standard operation image corresponding to the extracted video frame data are simultaneously input into a pre-trained behavior detection model, and the Euclidean distance and cosine similarity between the real-time operation image and the standard operation image are calculated.
[0102] S403: Determine the similarity between the real-time operation image and the standard operation image according to the cosine similarity and the Euclidean distance.
[0103] In one embodiment of the present invention, the cosine similarity and the Euclidean distance are used to determine the similarity between the operation behaviors in the real-time operation image and the standard operation image.
[0104] like Figure 5 As shown, Input1 is a real-time operation image, and feature vector X1 is extracted through a neural network, such as the fully connected layer of VGG16. Input2 is a standard operation image, and feature vector X2 is extracted through a neural network, such as the fully connected layer of VGG16. X1 and X2 are input into a binary neural network, that is, a pre-obtained behavior detection model, to determine the Euclidean distance and cosine similarity between X1 and X2. The similarity of the operation behavior in the real-time operation image and the standard operation image, that is, the Label, is determined based on the Euclidean distance and cosine similarity.
[0105] S404: When the similarity is less than a preset similarity threshold, it is determined that the operation behavior in the real-time operation image is not standard.
[0106] In one embodiment of the present invention, the similarity threshold is a threshold for measuring whether the operation behavior in the real-time operation image is a standard operation behavior. When the determined similarity is less than the similarity threshold, the operation behavior in the real-time operation image is not a standard behavior.
[0107] Here, the similarity threshold can be determined by the following method, specifically:
[0108] The target operation image information is obtained from the knowledge graph database; the target operation image information includes: standard operation images, standardized operation images and non-standard operation images; according to the standard operation images, standardized operation images and non-standard operation images, the cosine similarity threshold and the Euclidean distance threshold are determined; according to the cosine similarity threshold and the Euclidean distance threshold, the similarity threshold is calculated.
[0109] In one embodiment of the present invention, in order to use measurable data to compare the "distance" between different operation images, that is, to compare the similarity of the images, VGG16 adopts a triple input method. In the safety behavior judgment, the triples are standard operation image, standard operation standard, and non-standard operation image.
[0110] Specifically, feature vectors of the standard operation image, the normative operation image, and the non-normative operation image are extracted respectively; and a cosine similarity threshold and a Euclidean distance threshold are determined according to the feature vectors corresponding to the standard operation image, the normative operation image, and the non-normative operation image respectively.
[0111] For example, first, the standard operation image, standard operation standard, and non-standard operation image are input into the VGG16 neural network for analysis and feature vectors are extracted. For the feature vectors, the cosine similarity and Euclidean distance value ranges of standard-standard operation and standard-non-standard operation can be calculated and saved in the knowledge graph database.
[0112] After the cosine similarity threshold and the Euclidean distance threshold are obtained, the cosine similarity algorithm and the Euclidean distance algorithm are used to calculate the similarity threshold according to the cosine similarity threshold and the Euclidean distance threshold.
[0113] In order to ensure the safety of workers on industrial sites, an alarm message is generated when irregular operation behavior is detected in the real-time image, wherein the alarm message is used to notify the staff that the construction worker has irregular operation behavior. The alarm message can be a sound signal, such as a buzzer, or a light information lamp.
[0114] The behavior determination method of the embodiment of the present invention determines whether the operating behavior of construction workers at industrial sites is standardized based on the behavior detection model, which can more comprehensively monitor the workers' operating methods and simplify the management process of industrial sites.
[0115] Figure 6 It is a structural diagram of a behavior determination device provided by an embodiment of the present invention.
[0116] like Figure 6 As shown, the device may include:
[0117] An acquisition module 601 is used to acquire a real-time operation image;
[0118] A first determination module 602 is used to determine the cosine similarity and Euclidean distance between the real-time operation image and the pre-stored standard operation image according to the pre-trained behavior detection model;
[0119] A second determination module 603 is used to determine the similarity between the real-time operation image and the standard operation image according to the cosine similarity and the Euclidean distance;
[0120] The second determination module 603 is further configured to determine that the operation behavior in the real-time operation image is not standard when the similarity is less than a preset similarity threshold.
[0121] Optionally, the acquisition module 601 is further used to acquire target operation image information from the knowledge graph database; the target operation image information includes: standard operation images, standard operation images and non-standard operation images;
[0122] A first determination module 602 is used to determine a cosine similarity threshold and a Euclidean distance threshold according to the standard operation image, the standard operation image and the non-standard operation image;
[0123] Calculate the similarity threshold based on the cosine similarity threshold and the Euclidean distance threshold.
[0124] Optionally, the device further comprises:
[0125] The acquisition module 601 is also used to acquire sample operation images; the sample operation images include: standard operation images, normative operation images and non-standard operation images; the standard operation images, normative operation images and non-standard operation images all include key nodes;
[0126] The second determination module 603 is further used to determine the coordinate values of the key nodes in the standard operation image, the coordinate values of the key nodes in the standard operation image, and the coordinate values of the key nodes in the non-standard operation image;
[0127] A construction module is used to construct a knowledge graph database of operation behaviors based on the correspondence between the coordinate values of key nodes in the standard operation image and the operation standard image, the correspondence between the coordinate values of key nodes in the standard operation image and the standard operation image, and the correspondence between the coordinate values of key nodes in the non-standard operation image and the non-standard operation image.
[0128] Optionally, the device further includes: a deleting module, used to delete sample operation images whose operation images are unclear, and to delete sample operation images whose number of key nodes is less than a preset value.
[0129] Optionally, the first determining module 602 is specifically configured to:
[0130] Extracting feature vectors of standard operation images, normative operation images and irregular operation images respectively;
[0131] A cosine similarity threshold and a Euclidean distance threshold are determined according to the feature vectors corresponding to the standard operation image, the normative operation image and the non-normative operation image respectively.
[0132] Optionally, the device further comprises:
[0133] The acquisition module 601 is used to acquire target operation image information from the knowledge graph database; the target operation image information includes: standard operation images, standard operation images and non-standard operation images;
[0134] An extraction module, used for respectively extracting feature vectors of a standard operation image, a normal operation image and an abnormal operation image;
[0135] The training module is used to train a behavior detection model according to the feature vectors corresponding to the standard operation image, the normative operation image and the non-normative operation image.
[0136] Optionally, the device further comprises:
[0137] The adjustment module is used to adjust the parameters of the behavior detection model using the gradient descent method.
[0138] Optionally, the device further comprises:
[0139] The generation module is used to generate an alarm message when it is determined that the operation behavior in the real-time operation image is not standardized; the alarm message is used to notify the staff that the construction worker has an irregular operation behavior.
[0140] Optional, extraction module, specifically used to:
[0141] The standard operation images, normative operation images and non-standard operation images are input into the VGG16 neural network, and the feature vectors of the standard operation images, normative operation images and non-standard operation images are extracted respectively.
[0142] Optionally, the behavior prediction model is a bigram network model.
[0143] The behavior determination device provided in the embodiment of the present invention performs Figure 6 The various steps in the method shown can achieve the technical effect of more comprehensively monitoring the workers' operating methods and simplifying the management process of the industrial site. For the sake of brevity, they will not be described in detail here.
[0144] Figure 7 It is a flowchart of a method for judging industrial safety behavior based on a knowledge graph provided by an embodiment of the present invention.
[0145] like Figure 7 As shown in the figure, data collection module: To judge industrial behavior by using knowledge graph, we must first construct a database of the connection between standard operations and non-standard operations, and store the data in the relevant knowledge graph. Before that, data must be collected, and photos are taken as graph database resources. Standard operation collection is obtained by human demonstration, and non-standard operation collection is obtained by simulation human model demonstration considering safety issues. When taking photos, six parts of the human body, including forehead, shoulders, elbows, wrists, chest, and both sides of the waist, are selected as human nodes used for extraction.
[0146] Data storage module: Data storage is mainly used to save the collected data. LabelImage is used to label the image data nodes. It is stipulated that the number of collected image data nodes is greater than or equal to five nodes as valid data, and the valid data is stored to construct an industrial safety behavior knowledge graph.
[0147] The specific data collection and storage flow chart is as follows Figure 2 shown.
[0148] Data processing module: After the data is stored in the knowledge graph, it is necessary to extract image features and use the VGG16 convolutional neural network to process the sample data. In order to use measurable data to compare the "distance" between different operation images, that is, to compare the similarity of the images, VGG16 uses a triple input method. In the safety behavior judgment, the triples are standard operation images, standard operation images, and non-standard operation images. Figure 4As shown, first, the samples, i.e., standard operation images, standard operation images, and non-standard operation images, are input into the input layer (Input layer) of the VGG16 neural network for analysis and feature vector extraction. For the feature vector, the value range of the cosine similarity and Euclidean distance of the standard-standard and standard-non-standard operations can be calculated. The standard operation images, standard operation images, and non-standard operation images are passed to the fully connected layer for Lambda data exchange and a behavior detection model is constructed. The gradient descent algorithm is used iteratively to summarize and optimize the model, and the final model parameters are saved. After the model is built, the weight values and similarity values calculated by the network are returned as the benchmark weights for subsequent analysis of the capture operation.
[0149] Figure 8 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention is shown.
[0150] The electronic device may include a processor 801 and a memory 802 storing computer program instructions.
[0151] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.
[0152] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory. In a specific embodiment, the memory 802 includes a read-only memory (ROM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0153] The processor 801 implements any one of the behavior determination methods in the above embodiments by reading and executing computer program instructions stored in the memory 802 .
[0154] In one example, the electronic device may further include a communication interface 803 and a bus 810. Figure 8 As shown, the processor 801, the memory 802, and the communication interface 803 are connected via a bus 810 and communicate with each other.
[0155] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiment of the present invention.
[0156] Bus 810 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 810 may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.
[0157] The electronic device can execute the behavior determination method in the embodiment of the present invention, thereby realizing the combination Figure 1 and Figure 5 Describes the behavior of the method.
[0158] In addition, in combination with the behavior determination method in the above embodiment, the embodiment of the present invention can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the behavior determination methods in the above embodiment is implemented.
[0159] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0160] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0161] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0162] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A behavior determination method, characterized in that: The method comprises: Get real-time operational images; Determining the cosine similarity and Euclidean distance between the real-time operation image and the pre-stored standard operation image according to the pre-trained behavior detection model; Determining the similarity between the real-time operation image and the standard operation image according to the cosine similarity and the Euclidean distance; Acquire target operation image information from a knowledge graph database; the target operation image information includes: standard operation images, standard operation images, and non-standard operation images; Input the standard operation image, the normative operation image and the non-standard operation image into a VGG16 neural network, and extract feature vectors of the standard operation image, the normative operation image and the non-standard operation image respectively; Calculating the value ranges of the cosine similarity and the Euclidean distance between the standard-standard operation and the standard-non-standard operation according to the feature vectors corresponding to the standard operation image, the standard operation image and the non-standard operation image respectively; Determine the cosine similarity threshold and the Euclidean distance threshold according to the value interval; Calculating the similarity threshold according to the cosine similarity threshold and the Euclidean distance threshold; When the similarity is less than a preset similarity threshold, it is determined that the operation behavior in the real-time operation image is not standard.
2. The method according to claim 1, characterized in that The method further comprises: Acquire sample operation images; the sample operation images include: standard operation images, normative operation images and non-standard operation images; the standard operation images, the normative operation images and the non-standard operation images all include key nodes; Determine the coordinate values of the key nodes in the sample operation image, the coordinate values of the key nodes in the standard operation image, and the coordinate values of the key nodes in the non-standard operation image; A knowledge graph database of operation behaviors is constructed based on the correspondence between the coordinate values of the key nodes in the standard operation image and the standard operation image, the correspondence between the coordinate values of the key nodes in the standard operation image and the standard operation image, and the correspondence between the coordinate values of the key nodes in the non-standard operation image and the non-standard operation image.
3. The method according to claim 2, characterized in that The method further comprises: Delete the sample operation images whose operation images are not clear; Delete sample operation images whose number of key nodes is less than the preset value.
4. The method according to claim 1, characterized in that: The method further comprises: Acquire target operation image information from a knowledge graph database; the target operation image information includes: standard operation images, standard operation images, and non-standard operation images; Extracting feature vectors of the standard operation image, the normative operation image, and the non-normative operation image respectively; The behavior detection model is trained according to the feature vectors corresponding to the key node coordinate values of the standard operation image, the key node coordinate values of the normative operation image, and the key node coordinate values of the irregular operation image.
5. The method according to claim 1, characterized in that The method further comprises: The parameters of the behavior detection model are adjusted using a gradient descent method.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When it is determined that the operation behavior in the real-time operation image is not standardized, an alarm message is generated; the alarm message is used to notify the staff that the construction worker has an irregular operation behavior.
7. The method according to any one of claims 1 or 4, characterized in that: The behavior prediction model is a bigram network model.
8. A behavior determination device, characterized in that: The device comprises: An acquisition module, used for acquiring real-time operation images; A first determination module is used to determine the cosine similarity and Euclidean distance between the real-time operation image and the pre-stored standard operation image according to a pre-trained behavior detection model; A second determination module, configured to determine the similarity between the real-time operation image and the standard operation image according to the cosine similarity and the Euclidean distance; The acquisition module is further used to acquire target operation image information from the knowledge graph database; the target operation image information includes: standard operation images, standard operation images and non-standard operation images; The second determination module is further used to input the standard operation image, the standard operation image and the non-standard operation image into the VGG16 neural network, and extract the feature vectors of the standard operation image, the standard operation image and the non-standard operation image respectively; according to the feature vectors corresponding to the standard operation image, the standard operation image and the non-standard operation image respectively, calculate the value range of the cosine similarity and the Euclidean distance of the standard-standard operation and the standard-non-standard operation; determine the cosine similarity threshold and the Euclidean distance threshold according to the value range; The first determination module is further used to calculate the similarity threshold according to the cosine similarity threshold and the Euclidean distance threshold; The second determination module is further configured to determine that the operation behavior in the real-time operation image is not standard when the similarity is less than a preset similarity threshold.
9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the behavior determination method as described in any one of claims 1-7 is implemented.
10. A computer storage medium, characterized in that: The computer storage medium stores computer program instructions, which, when executed by a processor, implement the behavior determination method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Malicious activity detection method and device
CN103699843A
Method and device used for automatically observing and correcting unsafe behaviors at important posts
CN104156819A
Violent behavior monitoring method
CN107330414A
Behavior identification and detection method based on single sample
CN108664919A
A method for identify that safety of electric power operation
CN109460719A
