Method, apparatus, electronic device and readable storage medium for reception number statistics

Through video data, identify employees and non-employees, count and classify their coordinate trajectories, solve the problem of inaccurate statistics of reception people in the existing technology, and achieve more efficient and accurate statistical results.

CN114882420BActive Publication Date: 2025-05-30PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210610281.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-05-30
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

In the prior art, the statistics of the number of employees received are inaccurate, and there are high labor costs, low statistical efficiency and missed statistics.

Method used

By obtaining the original video data, identifying the target employees and non-employees, counting the coordinate trajectories of employees and non-employees in the preset time period, calculating the trajectory distance, and using the classification model to classify the hosted users to count the number of people.

Benefits of technology

It improves the accuracy and efficiency of reception number statistics, reduces the need for manual statistics, and avoids repeated statistics and omissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114882420B_ABST
    Figure CN114882420B_ABST
Patent Text Reader

Abstract

The present invention relates to artificial intelligence technology, and discloses a reception number statistics method, including: identifying target employees and non-employees included in each frame of image in the original video data, counting the employee coordinate trajectories of the target employees within a preset time period, counting the non-employee coordinate trajectories of all non-employees, calculating the trajectory distance between the employee coordinate trajectories of the target employees and the non-employee coordinate trajectories of all non-employees, classifying all the trajectory distances by using a classification model, according to the distance classification result, determining the reception users corresponding to the target employees from all non-employees, and counting the reception number of the target employees according to the reception users. In addition, the present invention also relates to blockchain technology, and the distance classification result can be stored in the nodes of the blockchain. The present invention also provides a reception number statistics method device, an electronic device, and a computer-readable storage medium. The present invention can solve the problem of inaccurate statistics of the reception number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence, and in particular, to a method, device, electronic device and computer-readable storage medium for counting the number of received persons. Background Art

[0002] In order to improve the efficiency of employees in handling user business matters and improve the user experience, the number of users received by employees is generally used as an important evaluation index for employees in various fields. For example, in the financial field, banks use the index of counting the number of users received by employees as the performance evaluation of employees.

[0003] The current methods for counting the number of people include: 1. Manually counting the number of people received by each employee, but this method has too high labor costs, and in the case of a large number of received people, such as deliberately confusing users, it will lead to the situation that users are counted repeatedly, with low statistical efficiency and inaccuracy; 2. Querying the business handling system and counting based on the employee dimension. However, during the business handling process, multiple business personnel may collaborate to handle it, but the final acceptor recorded in the system is the employee who finally receives and handles the business. Therefore, counting based on the final acceptor in the system will result in missed employees. At the same time, there may be a situation where an employee receives a user, but finally the user does not handle the business due to personal reasons, which will also lead to missed statistics and inaccurate counting of the number of received people. Summary of the Invention

[0004] The present invention provides a method, device, equipment and storage medium for counting the number of received people, and its main purpose is to solve the problem of inaccurate counting of the number of received people.

[0005] To achieve the above object, a method for counting the number of received people provided by the present invention includes:

[0006] Obtain original video data, and identify the target employees and non-employees included in each frame of the original video data;

[0007] Count the employee coordinate trajectories of the target employees within a preset time period, and count the non-employee coordinate trajectories of all non-employees within the preset time period;

[0008] Calculate the trajectory distance between the employee coordinate trajectories of the target employees and the non-employee coordinate trajectories of all non-employees;

[0009] Use a preset classification model to classify all the trajectory distances, obtain the distance classification results of all the trajectory distances output by the classification model, determine the received users corresponding to the target employees from all non-employees according to the distance classification results, and count the number of received people of the target employees according to the received users.

[0010] Optionally, identifying the target employees and non-employees included in each frame of the original video data includes:

[0011] Performing face detection on each frame of the original video data, taking a screenshot of the frame with a detected face to obtain an initial face image;

[0012] Detecting facial feature points in the initial face image, and aligning the face in the initial face image based on the facial feature points to obtain an aligned face image;

[0013] Using a preset feature extraction model to extract facial features from the aligned face image, and matching the facial features with a preset employee facial feature library to determine the face corresponding to the successfully matched facial features as the target employee, and determining the face corresponding to the unsuccessfully matched facial features as a non-employee.

[0014] Optionally, before using the preset feature extraction model to extract facial features from the aligned face image and matching the facial features with the preset employee facial feature library, the method further includes:

[0015] Obtaining a face image training set, performing face position detection on each face image in the face image training set to obtain key position points;

[0016] Performing ratio adjustment and pixel filling on each face image in the face image training set according to the key position points;

[0017] Performing RGB normalization processing on the filled image, and training a pre-constructed deep neural network with the normalized image to obtain the feature extraction model;

[0018] Obtaining an employee face image set, using the feature extraction model to extract employee facial features in the employee face image set, and summarizing all the extracted employee facial features to obtain the employee facial feature library.

[0019] Optionally, the statistics of the employee coordinate trajectories of the target employees within a preset time period, and the statistics of the non-employee coordinate trajectories of all non-employees within the preset time period include:

[0020] Collecting the position coordinates of the target employees at a preset time interval, summarizing all the position coordinates of the target employees within the preset time period to obtain the employee coordinate trajectories of the target employees;

[0021] Collecting the position coordinates of each non-employee at the time interval, summarizing all the position coordinates of all non-employees within the preset time period to obtain the non-employee coordinate trajectories of all non-employees.

[0022] Optionally, calculating the trajectory distance between the employee coordinate trajectory of the target employee and the non-employee coordinate trajectories of all non-employees includes:

[0023] Calculating the distances between the corresponding position coordinates at the same moment in the employee coordinate trajectory and the non-employee coordinate trajectories of each non-employee to obtain multiple sets of trajectory distances.

[0024] Optionally, using a preset classification model to classify all the trajectory distances to obtain the distance classification results of all the trajectory distances output by the classification model includes:

[0025] Obtaining a preset label set and using the number of the trajectory distances as the feature dimension;

[0026] Constructing a multi-dimensional coordinate system according to the label set and the feature dimension;

[0027] Mapping the multiple sets of trajectory distances into the multi-dimensional coordinate system to obtain a set of trajectory feature coordinates;

[0028] Calculating the Euclidean distance between any two trajectory feature coordinates in the set of trajectory feature coordinates and selecting the two trajectory feature coordinates with the smallest Euclidean distance to construct a separating hyperplane function;

[0029] Performing binary classification on the multiple sets of trajectory distances according to the separating hyperplane function to obtain the distance classification results.

[0030] Optionally, performing binary classification on the multiple sets of trajectory distances according to the separating hyperplane function to obtain the distance classification results includes:

[0031] Calculating the distance value of the coordinates in the set of trajectory feature coordinates to the separating hyperplane function;

[0032] Constructing a minimum distance function according to the distance value;

[0033] Using a preset Lagrangian function to solve the minimum distance function to obtain a hyperplane; determining the non-employees corresponding to the trajectory distances above the hyperplane in the distance classification results as the reception users of the target employee, and determining the non-employees corresponding to the trajectory distances below the hyperplane in the distance classification results as the non-reception users of the target employee.

[0034] To solve the above problems, the present invention also provides a reception number statistics device, and the device includes:

[0035] A face recognition module, configured to obtain original video data and identify the target employee and non-employees included in each frame of the original video data;

[0036] A coordinate trajectory statistics module, configured to count the employee coordinate trajectories of the target employee within a preset time period, and count the non-employee coordinate trajectories of all non-employees within the preset time period;

[0037] A trajectory distance calculation module, configured to calculate the trajectory distance between the employee coordinate trajectory of the target employee and the non-employee coordinate trajectories of all non-employees;

[0038] A reception number statistics module, configured to classify all the trajectory distances by using a preset classification model to obtain the distance classification results of all the trajectory distances output by the classification model, determine the reception users corresponding to the target employee from all non-employees according to the distance classification results, and count the reception number of the target employee according to the reception users.

[0039] To solve the above problems, the present invention also provides an electronic device, which includes:

[0040] A memory, storing at least one computer program; and

[0041] A processor, configured to execute the computer program stored in the memory to implement the above-mentioned reception number statistics method.

[0042] To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the above-mentioned reception number statistics method.

[0043] By performing face recognition on each frame of image in the original video data, the present invention can obtain the identified target employees and non-employees, accurately identify the target employees and non-employees, and at the same time, without manual identification and statistics, improve the statistical efficiency of counting the reception number of target employees. And by counting the employee coordinate trajectories of the target employee and the non-employee coordinate trajectories of non-employees within a preset time period, and classifying the trajectory distances between all employee coordinate trajectories and non-employee coordinate trajectories by using a preset classification model, the non-employees can be classified from the dimensions of spatial position and time, so as to directly determine whether the non-employees are the reception users of the target employee, and further improve the accuracy of counting the reception number of employees. Therefore, the employee reception number statistics method, device, electronic device and computer-readable storage medium proposed by the present invention can solve the problem of inaccurate counting of the reception number. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic flowchart of a reception number statistics method provided by an embodiment of the present invention;

[0045] Figure 2Functional module diagram of the reception number statistics device provided by an embodiment of the present invention;

[0046] Figure 3 Schematic structural diagram of an electronic device for implementing the reception number statistics method provided by an embodiment of the present invention.

[0047] The realization, functional features and advantages of the present invention will be further described in conjunction with embodiments with reference to the accompanying drawings. Specific embodiments

[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0049] The embodiments of the present application provide a reception number statistics method. The execution subject of the reception number statistics method includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiments of the present application. In other words, the reception number statistics method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0050] Refer to Figure 1 As shown, it is a flowchart of the reception number statistics method provided by an embodiment of the present invention. In this embodiment, the reception number statistics method includes:

[0051] S1. Obtain original video data, and identify the target employees and non-employees included in each frame of the original video data.

[0052] In the embodiments of the present invention, the original video data may be video data containing human faces collected by different scenario monitoring systems. For example, in the financial field, the original video data may be video data collected by multiple monitoring cameras in a bank branch.

[0053] In this embodiment, the target employees are one or more employees. Through this embodiment, the number of users received by one or more employees can be identified. By repeatedly executing this method, the reception numbers received by different employees can be identified.

[0054] Specifically, identifying the target employees and non-employees included in each frame of the original video data includes:

[0055] Performing face detection on each frame of the original video data, taking a screenshot of the frame with a detected face to obtain an initial face image;

[0056] Detecting the facial feature points in the initial face image, and aligning the face in the initial face image based on the facial feature points to obtain an aligned face image;

[0057] Using a preset feature extraction model to extract the facial features in the aligned face image, and matching the facial features with a preset employee facial feature library to determine that the face corresponding to the successfully matched facial features is a target employee, and determining that the face corresponding to the unsuccessfully matched facial features is a non-employee.

[0058] In an embodiment of the present invention, the position of the facial feature points in the initial face image can be detected by a preset 3D correction method, and position-driven deformation is performed on the position of the facial feature points, so as to align the face in the image. The position of the facial feature points includes positions such as the left side of the nose, the lower side of the nostril, the position of the pupil, and the lower side of the upper lip.

[0059] Optionally, the identified employees and non-employees can be numbered respectively, such as Employee A, Employee B (the internal ID of the employee can also be directly used), Non-employee a, Non-employee b, Non-employee c, etc.

[0060] In another optional embodiment of the present invention, matching can be performed by calculating the similarity between the facial features in the aligned face image and the facial features in the employee facial feature library. If the similarity is greater than a preset similarity threshold, it is determined that the match is successful. If the similarity is less than or equal to the preset similarity threshold, it is determined that the match is unsuccessful.

[0061] Specifically, before using the preset feature extraction model to extract the facial features in the aligned face image and matching the facial features with the preset employee facial feature library, the method further includes:

[0062] Obtaining a face image training set, performing face position detection on each face image in the face image training set to obtain key position points;

[0063] Performing ratio adjustment and pixel filling on each face image in the face image training set according to the key position points;

[0064] Performing RGB normalization processing on the filled image, and training a pre-constructed deep neural network with the normalized image to obtain the feature extraction model;

[0065] Obtain a set of employee face images, extract the employee face features in the set of employee face images using the feature extraction model, and summarize all the extracted employee face features to obtain the employee face feature library.

[0066] In an embodiment of the present invention, key position points in an image can be obtained through a facemesh detection algorithm, and the key position points include eyes, nose, pupils, etc.

[0067] In an optional embodiment of the present invention, the face image training set can be an open-source face image set. For example, the CASIA-Webface face dataset, etc. And adjust the image size ratio to 160*160 by rotating according to the detected nose position (i.e., the key position point), use black as the filling for the pixel-free area in the image, and standardize the three-channel RGB values in the image so that the mean is 0 and the variance is 1.

[0068] S2. Statistically analyze the employee coordinate trajectory of the target employee within a preset time period, and statistically analyze the non-employee coordinate trajectories of all non-employees within the preset time period.

[0069] Specifically, statistically analyzing the employee coordinate trajectory of the target employee within the preset time period and statistically analyzing the non-employee coordinate trajectories of all non-employees within the preset time period includes:

[0070] Collect the position coordinates of the target employee at preset time intervals, and summarize all the position coordinates of the target employee within the preset time period to obtain the employee coordinate trajectory of the target employee;

[0071] Collect the position coordinates of each non-employee at the time interval, and summarize all the position coordinates of all non-employees within the preset time period to obtain the non-employee coordinate trajectories of all non-employees.

[0072] In an optional embodiment of the present invention, the preset time interval can be 5S, and the preset time period can be 60S. For example, taking the maximum picture that can be captured by multiple cameras as the coordinate system, collect 12 position coordinates every 5S, and form an employee coordinate trajectory in the coordinate system.

[0073] In an optional embodiment of the present invention, for example, for employee A, employee B, non-employee a, non-employee b, and non-employee c, five coordinate trajectories will be obtained.

[0074] S3. Calculate the trajectory distance between the employee coordinate trajectory of the target employee and the non-employee coordinate trajectories of all non-employees.

[0075] In the embodiments of the present invention, calculating the trajectory distance between the employee coordinate trajectory of the target employee and the non-employee coordinate trajectories of all non-employees includes:

[0076] Calculating the distances between the corresponding position coordinates at the same moment in the employee coordinate trajectory and the non-employee coordinate trajectories of each non-employee to obtain multiple sets of trajectory distances.

[0077] In an alternative embodiment of the present invention, for example, the distances between the position coordinates of the employee in the employee coordinate trajectory and the position coordinates of the non-employee in the non-employee coordinate trajectory at the same moment can be calculated every 5S to obtain 12 sets of trajectory distances. In the above example, the trajectory distances between employee A and non-employees a, b, and c, and the trajectory distances between employee B and non-employees a, b, and c are calculated respectively.

[0078] S4. Using a preset classification model to classify all the trajectory distances to obtain the distance classification results of all the trajectory distances output by the classification model, determining the reception users corresponding to the target employee from all non-employees according to the distance classification results, and counting the reception number of the target employee according to the reception users.

[0079] In the embodiments of the present invention, the preset classification model can be a support vector machines (SVM) model. The SVM model is a binary classification model, and its basic model is a linear classifier with the largest margin defined in the feature space.

[0080] In the embodiments of the present invention, by classifying the characteristics of each non-employee in terms of time and space (i.e., multiple sets of trajectory distances at preset time intervals) through the SVM model, the reception users corresponding to the target employee can be accurately determined from all non-employees according to the distance classification results, so that the reception number of employees can be directly counted. For example, after binary classification, the reception users of employee A are non-employees a and b, and the reception users of employee B are non-employees a, b, and c.

[0081] Specifically, using the preset classification model to classify all the trajectory distances to obtain the distance classification results of all the trajectory distances output by the classification model includes:

[0082] Obtaining a preset label set and using the number of the trajectory distances as the feature dimension;

[0083] Constructing a multi-dimensional coordinate system according to the label set and the feature dimension;

[0084] Mapping the multiple sets of trajectory distances into the multi-dimensional coordinate system to obtain a set of trajectory feature coordinates;

[0085] Calculate the Euclidean distance between any two trajectory feature coordinates in the set of trajectory feature coordinates, and select the two trajectory feature coordinates with the smallest Euclidean distance to construct a separating hyperplane function;

[0086] Perform binary classification on the multiple sets of trajectory distances according to the separating hyperplane function to obtain the distance classification result.

[0087] In the embodiment of the present invention, the preset label set includes 0 and 1, where 0 represents not receiving a user, and 1 represents receiving a user. The separating hyperplane function can be: w T *x + b = 0, where w T is a weight vector. Taking a two-dimensional coordinate system as an example, the separating hyperplane function can be: w 1 *x 1 + w 2 *x 2 + b = 0.

[0088] Specifically, the performing binary classification on the multiple sets of trajectory distances according to the separating hyperplane function to obtain the distance classification result includes:

[0089] Calculate the distance value from the coordinates in the set of trajectory feature coordinates to the separating hyperplane function;

[0090] Construct a minimum distance function according to the distance value;

[0091] Use the preset Lagrangian function to solve the minimum distance function to obtain a hyperplane;

[0092] Determine that the non - employee corresponding to the trajectory distance above the hyperplane in the distance classification result is the user received by the target employee, and determine that the non - employee corresponding to the trajectory distance below the hyperplane in the distance classification result is the user not received by the target employee.

[0093] Further, the calculating the distance value from the coordinates in the set of trajectory feature coordinates to the separating hyperplane function includes:

[0094] Calculate the distance value from the coordinates in the set of trajectory feature coordinates to the separating hyperplane function according to a preset distance formula:

[0095]

[0096] where γ i is the distance value, x i is the i - th trajectory feature coordinate, y i is the i - th label in the label set, and w and b are preset fixed parameters.

[0097] Specifically, constructing the minimum distance function according to the distance value includes:

[0098]

[0099] where γ is the minimum distance function, and γ i is the distance value.

[0100] Further, solving the minimum distance function by using the preset Lagrangian function to obtain a hyperplane includes:

[0101] Constructing a Lagrangian objective function according to the preset constraint conditions and the minimum distance function;

[0102] Solving the Lagrangian objective function to obtain a hyperplane.

[0103] Specifically, the Lagrangian objective function is:

[0104]

[0105] where α i is the Lagrange multiplier, w and b are preset fixed parameters, x i is the coordinate of the i-th target feature, and y i is the label.

[0106] In the embodiment of the present invention, the constraint condition can be that the distance from each coordinate to the hyperplane is greater than or equal to the minimum distance function, and the constraint condition can be expressed by the formula as

[0107] In an optional embodiment of the present invention, for example, non-employees whose trajectory distances are divided above the hyperplane are classified as received users, and non-employees whose trajectory distances are divided below the hyperplane are classified as unreceived users.

[0108] In another optional embodiment of the present invention, the employee ID of the target employee can be obtained, and the number of users classified as received users can be counted as the reception number of the target employee. At the same time, information such as the face ID and reception time of the received users can be recorded in the reception information table.

[0109] By performing face recognition on each frame of the original video data, the present invention can identify the target employees and non-employees, accurately identify the target employees and non-employees, and at the same time, without manual identification and statistics, improve the statistical efficiency of the number of target employees received. And by counting the employee coordinate trajectories of the target employees and the non-employee coordinate trajectories of the non-employees within a preset time period, and using a preset classification model to classify the trajectory distances of all employee coordinate trajectories and non-employee coordinate trajectories, the non-employees can be classified from the dimensions of spatial position and time, so as to directly determine whether the non-employees are the reception users of the target employees, and further improve the accuracy of the statistics of the number of employees received. Therefore, the method for counting the number of employees received proposed by the present invention can solve the problem of inaccurate statistics of the number of received people.

[0110] As Figure 2 shown, it is a functional module diagram of a reception number statistics device provided by an embodiment of the present invention.

[0111] The reception number statistics device 100 of the present invention can be installed in an electronic device. According to the functions achieved, the reception number statistics device 100 can include a face recognition module 101, a coordinate trajectory statistics module 102, a trajectory distance calculation module 103, and a reception number statistics module 104. The modules of the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

[0112] In this embodiment, the functions of each module / unit are as follows:

[0113] The face recognition module 101 is used to obtain the original video data and identify the target employees and non-employees included in each frame of the original video data;

[0114] The coordinate trajectory statistics module 102 is used to count the employee coordinate trajectories of the target employees within a preset time period, and count the non-employee coordinate trajectories of all non-employees within the preset time period;

[0115] The trajectory distance calculation module 103 is used to calculate the trajectory distances between the employee coordinate trajectories of the target employees and the non-employee coordinate trajectories of all non-employees;

[0116] The reception number statistics module 104 is used to classify all the trajectory distances by using a preset classification model, obtain the distance classification results of all the trajectory distances output by the classification model, determine the reception users corresponding to the target employees from all non-employees according to the distance classification results, and count the number of target employees received according to the reception users.

[0117] Specifically, the specific implementation manners of each module of the reception number statistics device 100 are as follows:

[0118] Step 1: Obtain the original video data, and identify the target employees and non-employees included in each frame of the original video data.

[0119] In the embodiment of the present invention, the original video data may be video data including faces collected by different scenario monitoring systems. For example, in the financial field, the original video data may be video data collected by multiple monitoring cameras in a bank branch.

[0120] In this embodiment, the target employees are one or more employees. Through this embodiment, the number of users received by one or more employees can be identified. By repeatedly executing this method, the reception numbers received by different employees can be identified.

[0121] Specifically, the identification of the target employees and non-employees included in each frame of the original video data includes:

[0122] Perform face detection on each frame of the original video data, and take a screenshot of the frame with detected face to obtain an initial face image;

[0123] Detect the face feature points in the initial face image, and align the face in the initial face image based on the face feature points to obtain an aligned face image;

[0124] Extract the face features in the aligned face image by using a preset feature extraction model, and match the face features with a preset employee face feature library to determine the face corresponding to the successfully matched face features as the target employee, and determine the face corresponding to the unsuccessfully matched face features as the non-employee.

[0125] In the embodiment of the present invention, the positions of the face feature points in the initial face image can be detected by a preset 3D correction method, and position-driven deformation is performed on the positions of the face feature points, so as to align the face in the image. Among them, the positions of the face feature points include positions such as the left side of the nose, the lower side of the nostril, the pupil position, and the lower side of the upper lip.

[0126] Optionally, the identified employees and non-employees can be numbered respectively. For example, Employee A, Employee B (the internal ID of the employee can also be directly used), Non-employee a, Non-employee b, Non-employee c, etc.

[0127] In another alternative embodiment of the present invention, the similarity between the facial features in the aligned face image and the facial features in the employee face feature library can be calculated for matching. If the similarity is greater than the preset similarity threshold, it is determined that the match is successful. If the similarity is less than or equal to the preset similarity threshold, it is determined that the match is unsuccessful.

[0128] Specifically, before using the preset feature extraction model to extract the facial features in the aligned face image and matching the facial features with the preset employee face feature library, the method further includes:

[0129] Obtain a face image training set, perform face position detection on each face image in the face image training set to obtain key position points;

[0130] Perform ratio adjustment and pixel filling on each face image in the face image training set according to the key position points;

[0131] Perform RGB normalization on the filled image, and use the normalized image to train a pre-constructed deep neural network to obtain the feature extraction model;

[0132] Obtain an employee face image set, use the feature extraction model to extract the employee face features in the employee face image set, and summarize all the extracted employee face features to obtain the employee face feature library.

[0133] In an embodiment of the present invention, the key position points in the image can be obtained through the facemesh detection algorithm, and the key position points include eyes, nose, pupils, etc.

[0134] In an alternative embodiment of the present invention, the face image training set can be an open-source face image set. For example, the CASIA-Webface face dataset, etc. And rotate and adjust the image size ratio to 160*160 according to the detected nose position (i.e., the key position point), use black as the filling for the pixel-free area in the image, and normalize the three-channel RGB values in the image so that the mean is 0 and the variance is 1.

[0135] Step 2: Statistically analyze the employee coordinate trajectories of the target employee within a preset time period, and statistically analyze the non-employee coordinate trajectories of all non-employees within the preset time period.

[0136] Specifically, the statistically analyzing the employee coordinate trajectories of the target employee within a preset time period and the non-employee coordinate trajectories of all non-employees within the preset time period includes:

[0137] Collect the position coordinates of the target employee according to a preset time interval, and summarize all the position coordinates of the target employee within the preset time period to obtain the employee coordinate trajectory of the target employee;

[0138] Collect the position coordinates of each non-employee according to the time interval, and summarize all the position coordinates of all non-employees within the preset time period to obtain the non-employee coordinate trajectory of all non-employees.

[0139] In an alternative embodiment of the present invention, the preset time interval may be 5S, and the preset time period may be 60S. For example, taking the maximum picture that can be captured by multiple cameras as the coordinate system, the position coordinates are collected 12 times every 5S, and the employee coordinate trajectory is formed in the coordinate system.

[0140] In an alternative embodiment of the present invention, for example, for employee A, employee B, non-employee a, non-employee b, and non-employee c, five coordinate trajectories will be obtained.

[0141] Step 3: Calculate the trajectory distance between the employee coordinate trajectory of the target employee and the non-employee coordinate trajectories of all non-employees.

[0142] In the embodiment of the present invention, calculating the trajectory distance between the employee coordinate trajectory of the target employee and the non-employee coordinate trajectories of all non-employees includes:

[0143] Calculate the distance between the position coordinates corresponding to the same moment in the employee coordinate trajectory and the non-employee coordinate trajectory of each non-employee to obtain multiple sets of trajectory distances.

[0144] In an alternative embodiment of the present invention, for example, the distance between the position coordinates of the employee in the employee coordinate trajectory and the position coordinates of the non-employee in the non-employee coordinate trajectory at the same moment can be calculated every 5S to obtain 12 sets of trajectory distances. In the above example, that is, calculate the trajectory distances between employee A and non-employee a, non-employee b, and non-employee c respectively, and calculate the trajectory distances between employee B and non-employee a, non-employee b, and non-employee c respectively.

[0145] Step 4: Use a preset classification model to classify all the trajectory distances to obtain the distance classification result of all the trajectory distances output by the classification model. Determine the reception user corresponding to the target employee from all non-employees according to the distance classification result, and count the number of reception users of the target employee according to the reception user.

[0146] In the embodiment of the present invention, the preset classification model may be a support vector machines (SVM) model. The SVM model is a binary classification model, and its basic model is a linear classifier with the largest interval defined in the feature space.

[0147] In an embodiment of the present invention, by using an SVM model to classify the features of each non-employee in terms of time and space (i.e., multiple sets of trajectory distances at a preset time interval), the reception users corresponding to the target employee can be accurately determined from all non-employees according to the distance classification result, so that the number of reception users of the employee can be directly counted. For example, after binary classification, the reception users of employee A are non-employee a and non-employee b, and the reception users of employee B are non-employee a, non-employee b, and non-employee c.

[0148] Specifically, the using a preset classification model to classify all the trajectory distances to obtain the distance classification result of all the trajectory distances output by the classification model includes:

[0149] Obtain a preset label set and use the number of the trajectory distances as the feature dimension;

[0150] Construct a multi-dimensional coordinate system according to the label set and the feature dimension;

[0151] Map the multiple sets of trajectory distances into the multi-dimensional coordinate system to obtain a trajectory feature coordinate set;

[0152] Calculate the Euclidean distance between any two trajectory feature coordinates in the trajectory feature coordinate set, and select the two trajectory feature coordinates with the smallest Euclidean distance to construct a separating hyperplane function;

[0153] Perform binary classification on the multiple sets of trajectory distances according to the separating hyperplane function to obtain the distance classification result.

[0154] In an embodiment of the present invention, the preset label set includes 0 and 1, where 0 represents a non-reception user and 1 represents a reception user. The separating hyperplane function can be: w T *x + b = 0, where w T is a weight vector. Taking a two-dimensional coordinate system as an example, the separating hyperplane function can be: w 1 *x 1 + w 2 *x 2 + b = 0.

[0155] Specifically, the performing binary classification on the multiple sets of trajectory distances according to the separating hyperplane function to obtain the distance classification result includes:

[0156] Calculate the distance value from the coordinates in the trajectory feature coordinate set to the separating hyperplane function;

[0157] Construct a minimum distance function according to the distance value;

[0158] Solve the minimum distance function using the preset Lagrangian function to obtain a hyperplane; determine that the non-employee corresponding to the trajectory distance above the hyperplane of the distance classification result is the reception user of the target employee, and determine that the non-employee corresponding to the trajectory distance below the hyperplane of the distance classification result is the non-reception user of the target employee.

[0159] Further, the calculating the distance value from the coordinates in the trajectory feature coordinate set to the separating hyperplane function includes:

[0160] Calculate the distance value from the coordinates in the trajectory feature coordinate set to the separating hyperplane function according to a preset distance formula:

[0161]

[0162] where γ i is the distance value, x i is the i-th trajectory feature coordinate, y i is the i-th label in the label set, and w and b are preset fixed parameters.

[0163] Specifically, the constructing the minimum distance function according to the distance value includes:

[0164]

[0165] where γ is the minimum distance function, and γ i is the distance value.

[0166] Further, the solving the minimum distance function using the preset Lagrangian function to obtain a hyperplane includes:

[0167] Construct a Lagrangian objective function according to the preset constraint conditions and the minimum distance function;

[0168] Solve the Lagrangian objective function to obtain a hyperplane.

[0169] Specifically, the Lagrangian objective function is:

[0170]

[0171] where α i is the Lagrange multiplier, w and b are preset fixed parameters, x i is the i-th target feature coordinate, and y i is the label.

[0172] In the embodiments of the present invention, the constraint condition may be that the distance from each coordinate to the hyperplane is greater than or equal to the minimum distance function, where the constraint condition can be expressed by the formula

[0173] In an alternative embodiment of the present invention, for example, non-employees whose trajectory distances are classified above the hyperplane are classified as received users, and non-employees whose trajectory distances are classified below the hyperplane are classified as unreceived users.

[0174] In another alternative embodiment of the present invention, the employee ID of the target employee can be obtained, and the number of users classified as received users can be counted as the number of receptions of the target employee. At the same time, information such as the face ID and reception time of the received users can be recorded in the reception information table.

[0175] By performing face recognition on each frame of the original video data, the present invention can obtain the identified target employees and non-employees, accurately identify the target employees and non-employees, and at the same time, without manual identification and statistics, improve the statistical efficiency of counting the number of receptions of target employees. And by counting the employee coordinate trajectories of the target employees and the non-employee coordinate trajectories of non-employees within a preset time period, and using a preset classification model to classify the trajectory distances of all employee coordinate trajectories and non-employee coordinate trajectories, non-employees can be classified from the dimensions of spatial position and time, so as to directly determine whether the non-employee is a received user of the target employee, thereby improving the accuracy of counting the number of receptions of employees. Therefore, the device for counting the number of employee receptions proposed by the present invention can solve the problem of inaccurate counting of the number of receptions.

[0176] As Figure 3 shown, it is a schematic structural diagram of an electronic device for implementing the method for counting the number of receptions according to an embodiment of the present invention.

[0177] The electronic device may include a processor 10, a memory 11, a communication interface 12, and a bus 13, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a program for counting the number of receptions.

[0178] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, optical disc, etc. The memory 11 can be an internal storage unit of the electronic device in some embodiments, such as the mobile hard disk of the electronic device. The memory 11 can also be an external storage device of the electronic device in some other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device. Further, the memory 11 can also include both the internal storage unit and the external storage device of the electronic device. The memory 11 can be used not only to store application software installed in the electronic device and various types of data, such as the code of the reception number statistics program, etc., but also to temporarily store the data that has been output or will be output.

[0179] The processor 10 can be composed of integrated circuits in some embodiments. For example, it can be composed of a single packaged integrated circuit, or can also be composed of multiple integrated circuits with the same or different functions packaged together, including the combination of one or more Central Processing Units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and circuits, and by running or executing the programs or modules (such as the reception number statistics program, etc.) stored in the memory 11, and calling the data stored in the memory 11, to execute various functions of the electronic device and process data.

[0180] The communication interface 12 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface can include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), and is usually used to establish a communication connection between this electronic device and other electronic devices. The user interface can be a display (Display), an input unit (such as a keyboard (Keyboard)). Optionally, the user interface can also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display can also be appropriately referred to as a display screen or a display unit, and is used to display the information processed in the electronic device and to display the visual user interface.

[0181] The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 13 may be divided into an address bus, a data bus, a control bus, etc. The bus 13 is configured to implement connection communication between the memory 11, at least one processor 10, and the like.

[0182] Figure 3 Only an electronic device having components is shown. Those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the electronic device, and may include fewer or more components than shown, or combine certain components, or have a different component arrangement.

[0183] For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charge management, discharge management, and power consumption management through the power management device. The power source may further include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The electronic device may further include a variety of sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0184] Further, the electronic device may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.

[0185] Optionally, the electronic device may further include a user interface. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0186] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.

[0187] The reception number statistics program stored in the memory 11 of the electronic device is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0188] Obtain the original video data, and identify the target employees and non-employees included in each frame of the original video data;

[0189] Statistically analyze the employee coordinate trajectories of the target employees within a preset time period, and statistically analyze the non-employee coordinate trajectories of all non-employees within the preset time period;

[0190] Calculate the trajectory distance between the employee coordinate trajectories of the target employees and the non-employee coordinate trajectories of all non-employees;

[0191] Use a preset classification model to classify all the trajectory distances, obtain the distance classification results of all the trajectory distances output by the classification model, determine the reception users corresponding to the target employees from all non-employees according to the distance classification results, and statistically analyze the reception numbers of the target employees according to the reception users.

[0192] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiments of the attached drawings, which will not be elaborated here.

[0193] Furthermore, if the integrated module / unit of the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory).

[0194] The present invention also provides a computer-readable storage medium. The readable storage medium stores a computer program. When the computer program is executed by the processor of the electronic device, it can achieve:

[0195] Obtain the original video data, and identify the target employees and non-employees included in each frame of the original video data;

[0196] Statistically analyze the employee coordinate trajectories of the target employees within a preset time period, and statistically analyze the non-employee coordinate trajectories of all non-employees within the preset time period;

[0197] Calculate the trajectory distance between the employee coordinate trajectories of the target employees and the non-employee coordinate trajectories of all non-employees;

[0198] Classify all the trajectory distances using a preset classification model to obtain the distance classification results of all the trajectory distances output by the classification model. Determine the reception users corresponding to the target employee from all non-employees according to the distance classification results, and count the number of receptions of the target employee based on the reception users.

[0199] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0200] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0201] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.

[0202] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention.

[0203] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any associated drawing marks in the claims should not be regarded as limiting the claimed rights.

[0204] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology, and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.

[0205] The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0206] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a series of data blocks generated by using cryptographic methods, and each data block contains information on a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer, etc.

[0207] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. Words such as "second" are used to denote names and do not denote any particular order.

[0208] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for counting the number of received guests, characterized in that, the method includes: obtaining original video data, and identifying target employees and non-employees included in each frame of the original video data; collecting the position coordinates of the target employees at a preset time interval, summarizing all the position coordinates of the target employees within a preset time period to obtain the employee coordinate trajectory of the target employees; collecting the position coordinates of each non-employee at the time interval, summarizing all the position coordinates of all non-employees within the preset time period to obtain the non-employee coordinate trajectory of all non-employees; calculating the distances between the position coordinates corresponding to the same moment in the employee coordinate trajectory and the non-employee coordinate trajectory of each non-employee to obtain multiple sets of trajectory distances; using a preset classification model to classify all the trajectory distances, obtaining the distance classification results of all the trajectory distances output by the classification model, determining the reception users corresponding to the target employees from all non-employees according to the distance classification results, and counting the number of guests received by the target employees according to the reception users.

2. The method for counting the number of received guests according to claim 1, characterized in that, the identifying the target employees and non-employees included in each frame of the original video data includes: performing face detection on each frame of the original video data, taking a screenshot of the frame with detected face to obtain an initial face image; detecting the face feature points in the initial face image, and aligning the face in the initial face image based on the face feature points to obtain an aligned face image; using a preset feature extraction model to extract the face features in the aligned face image, and matching the face features with a preset employee face feature library, determining the face corresponding to the successfully matched face features as the target employees, and determining the face corresponding to the unsuccessfully matched face features as non-employees.

3. The method for counting the number of received guests according to claim 2, characterized in that, before the using a preset feature extraction model to extract the face features in the aligned face image and matching the face features with a preset employee face feature library, the method further includes: obtaining a face image training set, performing face position detection on each face image in the face image training set to obtain key position points; performing ratio adjustment and pixel filling on each face image in the face image training set according to the key position points; performing RGB normalization processing on the filled image, and training a pre-constructed deep neural network with the normalized image to obtain the feature extraction model; obtaining an employee face image set, using the feature extraction model to extract the employee face features in the employee face image set, and summarizing all the extracted employee face features to obtain the employee face feature library.

4. The method for counting the number of received guests according to claim 1, characterized in that, the using a preset classification model to classify all the trajectory distances, obtaining the distance classification results of all the trajectory distances output by the classification model, includes: Obtain a preset tag set, and use the number of the trajectory distances as the feature dimension; Construct a multi-dimensional coordinate system according to the tag set and the feature dimension; Map the multiple groups of trajectory distances into the multi-dimensional coordinate system to obtain a set of trajectory feature coordinates; Calculate the Euclidean distance between any two trajectory feature coordinates in the set of trajectory feature coordinates, and select two trajectory feature coordinates with the smallest Euclidean distance to construct a separating hyperplane function; Perform binary classification on the multiple groups of trajectory distances according to the separating hyperplane function to obtain the distance classification result.

5. The reception number statistics method according to claim 4, wherein, the performing binary classification on the multiple groups of trajectory distances according to the separating hyperplane function to obtain the distance classification result includes: Calculate the distance value from the coordinates in the set of trajectory feature coordinates to the separating hyperplane function; Construct a minimum distance function according to the distance value; Use a preset Lagrangian function to solve the minimum distance function to obtain a hyperplane; determine that the non-employees corresponding to the trajectory distances above the hyperplane in the distance classification result are the reception users of the target employee, and determine that the non-employees corresponding to the trajectory distances below the hyperplane in the distance classification result are the non-reception users of the target employee.

6. A reception number statistics device, wherein, the device includes: A face recognition module, configured to obtain original video data and identify the target employee and non-employees included in each frame of the original video data; A coordinate trajectory statistics module, configured to collect the position coordinates of the target employee at preset time intervals, summarize all the position coordinates of the target employee within a preset time period to obtain the employee coordinate trajectory of the target employee, collect the position coordinates of each non-employee at the time intervals, and summarize all the position coordinates of all non-employees within the preset time period to obtain the non-employee coordinate trajectories of all non-employees; A trajectory distance calculation module, configured to calculate the distances between the corresponding position coordinates at the same moment in the employee coordinate trajectory and the non-employee coordinate trajectories of each non-employee to obtain multiple groups of trajectory distances; A reception number statistics module, configured to classify all the trajectory distances by using a preset classification model to obtain the distance classification result of all the trajectory distances output by the classification model, determine the reception users corresponding to the target employee from all non-employees according to the distance classification result, and count the reception number of the target employee according to the reception users.

7. An electronic device, wherein, the electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the reception number statistics method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, wherein, When the computer program is executed by a processor, it implements the reception number statistical method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Customer visit trajectory tracking and passenger flow analysis system and method

    CN112184497A

  • Employee behavior recognition method and device based on behavior track, equipment and medium

    CN113850836A