A motion state recognition method, device, storage medium and electronic device
By using air pressure data to identify the movement status of the delivery party in a closed area, the problem of inaccurate movement status judgment caused by weak GPS signals is solved, and the accuracy of delivery routes and order allocation is improved.
Patent Information
- Application Number
- CN202410780785.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-17
AI Technical Summary
In indoor scenes, the GPS signal is weak, resulting in inaccurate judgment of the delivery party's movement status, making it difficult to improve the accuracy of identifying the movement status of delivered goods in closed areas.
By obtaining the air pressure data set marked by the delivery end within a preset time period, the air pressure change parameters are calculated, a feature data set is generated and converted into a feature tensor set, and input into the pre-trained state recognition model to determine the movement status of the delivery end.
It improves the accuracy of identifying the movement status of the delivery party in a closed area, avoids relying on other methods with insufficient accuracy to identify the movement status, and enhances the accuracy of delivery paths and order allocation.
Smart Images

Figure CN118347516B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a motion state recognition method, device, storage medium and electronic device. Background Art
[0002] Nowadays, with the rapid development of the economy and the popularization of the Internet, instant delivery services have become an indispensable part of people's daily lives. In order to improve the delivery efficiency of delivered goods, the movement status of the delivery party can be judged to determine the delivery route and delivery order allocation method based on the movement status. Summary of the invention
[0003] The embodiments of this specification provide a motion state recognition method, device, storage medium and electronic device. According to a set of air pressure data of a closed area detected by a delivery terminal corresponding to a delivery terminal identifier within a preset time period, a target motion state is calculated through a state recognition model, thereby determining the motion state of a delivery party in a closed area based on the air pressure data, without the need to perform motion state recognition based on other less accurate methods, thereby improving the accuracy of identifying the motion state of a delivery party in a closed area.
[0004] In a first aspect, an embodiment of the present specification provides a motion state recognition method, the method comprising:
[0005] Acquire a set of air pressure data transmitted within a preset time period based on a delivery terminal identifier, wherein the air pressure data set includes air pressure data sent by a delivery terminal corresponding to the delivery terminal identifier at each collection time point, and the air pressure data is data collected by the delivery terminal in a closed area at the collection time point, and the preset time period includes multiple collection time points, and each air pressure data corresponds to each collection time point one by one;
[0006] Calculate the air pressure change parameter corresponding to each of the air pressure data based on the air pressure data set, and generate the feature data set of the delivery end identifier based on the air pressure data set and the air pressure change parameter corresponding to each of the air pressure data;
[0007] Using a data conversion method to convert the feature data set into a feature tensor set;
[0008] The feature tensor set is input into a pre-trained state recognition model to obtain the target motion state corresponding to the delivery end identification in the closed area.
[0009] In a second aspect, an embodiment of the present specification provides a method for training a state recognition model, the method comprising:
[0010] Acquire an unlabeled sample data set and a labeled sample data set, wherein each unlabeled sample data in the unlabeled sample data set is air pressure data in an unlabeled motion state, and each labeled sample data in the labeled sample data set is air pressure data in a labeled motion state;
[0011] Using the unlabeled sample data set to train a state recognition model to obtain a first state recognition model;
[0012] Using the labeled sample data set to train the first state recognition model to obtain a second state recognition model, and calculating a loss function of the second state recognition model;
[0013] If the loss function indicates that the second state recognition model converges, the second state recognition model is determined as a pre-trained state recognition model.
[0014] In a third aspect, an embodiment of the present specification provides a motion state recognition device, the device comprising:
[0015] A data acquisition unit, used to acquire a set of air pressure data transmitted within a preset time period based on a delivery terminal identifier, wherein the air pressure data set includes air pressure data sent by a delivery terminal corresponding to the delivery terminal identifier at each collection time point, and the air pressure data is data collected by the delivery terminal in a closed area at the collection time point, and the preset time period includes multiple collection time points, and each air pressure data corresponds to each collection time point one by one;
[0016] A set generating unit, configured to calculate the air pressure change parameter corresponding to each of the air pressure data based on the air pressure data set, and to generate the characteristic data set of the delivery end identification based on the air pressure data set and the air pressure change parameter corresponding to each of the air pressure data;
[0017] A data conversion unit, used to convert the feature data set into a feature tensor set by adopting a data conversion method;
[0018] The state recognition unit is used to input the feature tensor set into a pre-trained state recognition model to obtain the target motion state corresponding to the delivery end identification in the closed area.
[0019] In a fourth aspect, an embodiment of the present specification provides a training device for a state recognition model, the device comprising:
[0020] A sample acquisition unit, used to acquire an unlabeled sample data set and a labeled sample data set, wherein each unlabeled sample data in the unlabeled sample data set is air pressure data in an unlabeled motion state, and each labeled sample data in the labeled sample data set is air pressure data in a labeled motion state;
[0021] A first training unit, configured to train a state recognition model using the unlabeled sample data set to obtain a first state recognition model;
[0022] A second training unit is used to train the first state recognition model using the labeled sample data set to obtain a second state recognition model, and calculate a loss function of the second state recognition model;
[0023] The second training unit is further configured to determine the second state recognition model as a pre-trained state recognition model if the loss function indicates that the second state recognition model has converged.
[0024] In a fifth aspect, an embodiment of the present specification provides a computer program product, wherein the computer program product stores at least one instruction, and the at least one instruction is suitable for being loaded by a processor and executing the above-mentioned method steps.
[0025] In a sixth aspect, an embodiment of the present specification provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned method.
[0026] In a seventh aspect, an embodiment of the present specification provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the above method.
[0027] In an embodiment of the present specification, by obtaining the air pressure data set transmitted by the delivery terminal identification within a preset time period, the air pressure change parameters corresponding to the air pressure data set are calculated, a feature data set is generated according to the air pressure change parameters and converted into a feature tensor set, and the feature tensor set is input into a pre-trained state recognition model to obtain the target motion state, thereby calculating the target motion state through the state recognition model based on the air pressure data set of the closed area detected by the delivery terminal corresponding to the delivery terminal identification within a preset time period, thereby realizing the determination of the motion state of the delivery party in the closed area according to the air pressure data, without the need to perform motion state recognition according to other less accurate methods, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in this specification or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1A system architecture diagram of a motion state recognition method provided in an embodiment of this specification;
[0030] Figure 2 A schematic diagram of a motion state recognition method provided in an embodiment of this specification;
[0031] Figure 3 A schematic diagram of a motion state recognition method provided in an embodiment of this specification;
[0032] Figure 4 An example schematic diagram of a state recognition model provided in an embodiment of this specification;
[0033] Figure 5 An example schematic diagram of obtaining a target motion state provided in an embodiment of this specification;
[0034] Figure 6 A flowchart of a training method for a state recognition model provided in an embodiment of this specification;
[0035] Figure 7 A flowchart of another state recognition model training method provided in an embodiment of this specification;
[0036] Figure 8 An example schematic diagram of a training state recognition model provided in an embodiment of this specification;
[0037] Fig. 9 A schematic diagram of the structure of a motion state recognition device provided in an embodiment of this specification;
[0038] Fig.10 A schematic diagram of the structure of a training device for a state recognition model provided in an embodiment of this specification;
[0039] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification;
[0040] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0041] In order to make the features and advantages of this specification more obvious and easy to understand, the technical solutions in this specification are described clearly and completely in conjunction with the drawings in this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this specification.
[0042] In the prior art, when judging the motion status of the delivery party, the weak GPS signal of the delivery party in indoor scenes has a great impact on the judgment of the delivery party's motion status, resulting in inaccurate motion status of the delivery party. Therefore, how to improve the accuracy of judging the motion status of the delivery party in indoor scenes is an urgent problem to be solved.
[0043] Based on this, an embodiment of the present specification provides a method for identifying a motion state. Using the embodiment of the present specification, by obtaining the air pressure data set transmitted by the delivery end identifier within a preset time length, the air pressure change parameters corresponding to the air pressure data set are calculated, and a feature data set is generated according to the air pressure change parameters and converted into a feature tensor set. The feature tensor set is input into a pre-trained state recognition model to obtain the target motion state, and then the target motion state is calculated through the state recognition model according to the air pressure data set of the closed area detected by the delivery terminal corresponding to the delivery end identifier within a preset time length, thereby realizing the determination of the motion state of the delivery party in the closed area according to the air pressure data, without the need to perform motion state recognition according to other less accurate methods, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area.
[0044] See also Figure 1 , which provides a system architecture diagram for motion state recognition in the embodiments of this specification. Figure 1 As shown, the motion state recognition method provided in the embodiment of this specification can be applied to a terminal device to realize the process of motion state recognition. The system architecture provided in the embodiment of this specification mainly includes a state recognition server 10 and a distribution terminal 20. Among them, the state recognition server 10 can be a server storing a state recognition model, specifically a large integrated server used by an enterprise, or a microcomputer, such as a personal computer, etc.; the distribution terminal 20 can be a terminal with a barometer carried by the distribution party, such as a rider's helmet, etc. Figure 1 The distribution terminal 20 is in a closed area and takes the elevator up.
[0045] In an embodiment of the present specification, the state recognition server 10 obtains a set of air pressure data transmitted within a preset time period based on the delivery end identifier, the air pressure data set includes the air pressure data sent by the delivery terminal 20 corresponding to the delivery end identifier at each collection time point, the air pressure data is the data collected by the delivery terminal 20 in the closed area at the collection time point, the preset time period includes multiple collection time points, and each air pressure data corresponds to each collection time point one by one. The state recognition server 10 calculates the air pressure change parameters corresponding to each air pressure data based on the air pressure data set, generates a feature data set of the delivery end identifier based on the air pressure data set and the air pressure change parameters corresponding to each air pressure data, converts the feature data set into a feature tensor set using a data conversion method, and inputs the feature tensor set into the state recognition model pre-trained in the state recognition server 10 to obtain the target motion state corresponding to the delivery end identifier in the closed area.
[0046] In an embodiment of the present specification, by obtaining the air pressure data set transmitted by the delivery terminal identification within a preset time period, the air pressure change parameters corresponding to the air pressure data set are calculated, a feature data set is generated according to the air pressure change parameters and converted into a feature tensor set, and the feature tensor set is input into a pre-trained state recognition model to obtain the target motion state, thereby calculating the target motion state through the state recognition model based on the air pressure data set of the closed area detected by the delivery terminal corresponding to the delivery terminal identification within a preset time period, thereby realizing the determination of the motion state of the delivery party in the closed area according to the air pressure data, without the need to perform motion state recognition according to other less accurate methods, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area.
[0047] based on Figure 1 The system architecture shown below will be combined with Figure 2 , the motion state recognition method provided in the embodiments of this specification is introduced in detail.
[0048] See also Figure 2 , is a flow chart of a motion state recognition method provided in an embodiment of this specification. Figure 2 As shown, the method may include the following steps S101-S104.
[0049] S101, obtaining a set of air pressure data transmitted within a preset time period based on a delivery terminal identifier;
[0050] In one embodiment, the air pressure data transmitted by the delivery terminal at the collection time point based on the delivery terminal identifier is obtained to obtain a set of air pressure data transmitted within a preset time period.
[0051] The delivery end identifier may be an identifier corresponding to the delivery terminal, and is used to indicate the identifier of the delivery terminal. In order to facilitate the establishment of a corresponding relationship between the delivery parties corresponding to each delivery terminal, so as to perform calculations based on the delivery habits of the delivery parties, a binding relationship may be established between the delivery terminal and the delivery end identifier. The indicated delivery party may then be determined through the delivery end identifier so as to perform calculations for the delivery party.
[0052] The air pressure data set may be air pressure data sent by the delivery terminal corresponding to the delivery terminal identifier at each collection time point, and the air pressure data may be data collected by the delivery terminal in a closed area at the collection time point, for example, the air pressure value of the detected environment. The closed area may be an indoor area, an underground area, or other area with poor signal. For example, it may be inside a shopping mall, an underground shopping street, or an indoor area in a residential building.
[0053] The preset time length may include multiple collection time points, and each air pressure data corresponds to each collection time point. The specific value of the preset time point may be set according to actual conditions, for example, 5 seconds.
[0054] The collection time point may be a preset time point at which the distribution terminal transmits air pressure data. For example, if the preset time length is 5 seconds and the preset time length includes 50 collection time points, the interval between each time point is 100 milliseconds.
[0055] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the delivery terminal identification and air pressure data involved in this specification are all obtained with full authorization.
[0056] S102, calculating the air pressure change parameters corresponding to each of the air pressure data based on the air pressure data set, and generating the feature data set of the delivery end identifier based on the air pressure data set and the air pressure change parameters corresponding to each of the air pressure data;
[0057] In one embodiment, the first air pressure data and the second air pressure data in the air pressure data set, as well as the time difference between the first collection time point corresponding to the first air pressure data and the second collection time point corresponding to the second air pressure data are obtained, the air pressure change parameter corresponding to the first air pressure data is calculated based on the first air pressure data, the second air pressure data and the time difference, and the characteristic data set corresponding to the delivery end identifier is generated based on the air pressure change data corresponding to each air pressure data in the air pressure data set and the air pressure data set.
[0058] The first air pressure data may be any air pressure data in the air pressure data set.
[0059] The second air pressure data may be the air pressure data collected at a time point adjacent to the first air pressure data. It is understandable that, since the air pressure change parameter of the first air pressure data is to be calculated, it is necessary to obtain the air pressure data of a certain number of collection time points before the first air pressure data, and the air pressure data before the first air pressure data is used as the second air pressure data. The specific second air pressure data obtained may be the number of data required to be obtained according to the type of air pressure change parameter to be calculated. For example, if the air pressure change parameter to be calculated is the air pressure change speed, the second air pressure data may be the air pressure data of the last collection time point adjacent to the first air pressure data; if the air pressure change to be calculated from that time is the air pressure change acceleration, it is necessary to obtain the air pressure data of the last two collection time points adjacent to the first air pressure data.
[0060] The time difference may be the difference between the acquisition time points of the first air pressure data and the adjacent second air pressure data, or may be the difference between the acquisition time points of the second air pressure data calculated when necessary.
[0061] The air pressure change parameters may be parameters such as air pressure change speed, air pressure change acceleration, and air pressure change jerk, and then the motion state corresponding to the delivery party corresponding to the delivery end identifier is calculated based on the air pressure change parameters.
[0062] Furthermore, after obtaining the air pressure change parameters corresponding to each air pressure data in the air pressure data set, each air pressure change parameter, each air pressure data and the delivery end identifier are integrated into a data set to generate a feature data set corresponding to the delivery end identifier.
[0063] S103, converting the feature data set into a feature tensor set by using a data conversion method;
[0064] In one embodiment, after obtaining the feature data set corresponding to the delivery end identifier, the air pressure change parameters and air pressure data in the feature data set are format converted using a data conversion method to obtain corresponding matrix data, and the data set including the matrix data corresponding to each air pressure change parameter in the feature data set and the air pressure data is determined as a feature tensor set.
[0065] The data conversion method may be to use a preset conversion matrix and the air pressure change parameters and air pressure data to perform format conversion.
[0066] The matrix data may be data obtained by converting the air pressure change parameter and the air pressure data using a data conversion method. Since the data conversion method uses a conversion matrix for format conversion, the data type corresponding to the data obtained after the format conversion is a matrix. It should be noted that the matrix parameters of the conversion matrix correspond to the format of the calculation network in the model used for state recognition later, so that the matrix data obtained after the format conversion can be recognized and calculated by the state recognition model.
[0067] The feature tensor set may be a set of matrix data corresponding to each air pressure change parameter and air pressure data in the feature data set.
[0068] S104, inputting the feature tensor set into a pre-trained state recognition model to obtain the target motion state corresponding to the delivery end identification in the closed area;
[0069] In one embodiment, a feature tensor set is input into a pre-trained state recognition model, and a computing network in the state recognition model highlights the feature tensors in the feature tensor set to obtain at least one candidate motion state. The probability value corresponding to each candidate motion state is determined based on a classifier in the state recognition model, and a first candidate motion state with the largest probability value is determined among the probability values corresponding to each candidate motion state. The first motion state is determined as the target motion state corresponding to the delivery end identifier, and the target motion state is output.
[0070] The state recognition model may be a model for analyzing and calculating a feature tensor set to obtain a target motion state corresponding to the feature tensor set. The state recognition model may include a computing network and a classifier. The computing network may include a convolution layer and a maximum pooling layer, the convolution layer is used to filter the feature tensor set, and the maximum pooling layer is used to calculate the maximum value of a specific feature to prevent the model from overfitting. The classifier is used to determine the probability value corresponding to each candidate motion state, and select the first candidate motion state with the largest probability value among the candidate motion states.
[0071] The candidate motion state may be a motion state pre-selected and stored in the state recognition model, and may specifically include taking an elevator up, taking an elevator down, taking an escalator up, and taking an escalator down. The specific types of candidate motion states may be set according to actual conditions. It is understandable that since the speeds of taking an escalator up / down and walking up / down stairs are similar, a feasible method is to classify walking up / down stairs as taking an escalator up / down.
[0072] The probability value corresponding to the candidate motion state can be the predicted value of the classifier for the candidate motion state. The larger the probability value, the greater the possibility that the motion state of the delivery party carrying the delivery terminal corresponding to the delivery end identifier within the preset time period is the candidate motion state.
[0073] In an embodiment of the present specification, by obtaining the air pressure data set transmitted by the delivery terminal identification within a preset time period, the air pressure change parameters corresponding to the air pressure data set are calculated, a feature data set is generated according to the air pressure change parameters and converted into a feature tensor set, and the feature tensor set is input into a pre-trained state recognition model to obtain the target motion state, thereby calculating the target motion state through the state recognition model based on the air pressure data set of the closed area detected by the delivery terminal corresponding to the delivery terminal identification within a preset time period, thereby realizing the determination of the motion state of the delivery party in the closed area according to the air pressure data, without the need to perform motion state recognition according to other less accurate methods, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area.
[0074] See also Figure 3 , is a flow chart of a motion state recognition method provided in an embodiment of this specification. Figure 3 As shown, the method may include the following steps S201-S209.
[0075] S201, obtaining a set of air pressure data transmitted within a preset time period based on a delivery terminal identifier;
[0076] In one embodiment, the air pressure data transmitted by the delivery terminal at the collection time point based on the delivery terminal identifier is obtained to obtain a set of air pressure data transmitted within a preset time period.
[0077] The specific definitions of the delivery end identification, air pressure data set and preset time can refer to the relevant content in step S101 and will not be repeated here.
[0078] Furthermore, in addition to being bound to the delivery terminal, the delivery-end identifier is also used to indicate the delivery method that the delivery party may adopt. For example, the delivery party may walk or run quickly while taking an escalator upward. When the state recognition model is subsequently used to identify the motion state, the motion method corresponding to the delivery party identified by the delivery-end identifier is used as the basis for judgment, thereby improving the accuracy of identifying the motion state.
[0079] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the delivery terminal identification and air pressure data involved in this specification are all obtained with full authorization.
[0080] S202, obtaining first air pressure data and second air pressure data in the air pressure data set, and a time difference between a first time collection point corresponding to the first air pressure data and a second time collection point corresponding to the second air pressure data;
[0081] In one embodiment, first air pressure data and second air pressure data in the air pressure data set are obtained, and a time difference between a first time acquisition point corresponding to the first air pressure data and a second time acquisition point corresponding to each second air pressure data is calculated.
[0082] The first air pressure data is any air pressure data in the air pressure data set. It is understandable that, since the difference between the first time acquisition point corresponding to the first air pressure data and the second time acquisition point corresponding to the second air pressure data needs to be calculated, the first air pressure data is any air pressure data in the air pressure data set except the air pressure data corresponding to the first time acquisition point.
[0083] The second air pressure data may be the air pressure data collected at a time point adjacent to the first air pressure data. It is understandable that, since the air pressure change parameter of the first air pressure data is to be calculated, it is necessary to obtain the air pressure data of a certain number of collection time points before the first air pressure data, and the air pressure data before the first air pressure data is used as the second air pressure data. The specific second air pressure data obtained may be the number of data required to be obtained according to the type of air pressure change parameter to be calculated. For example, if the air pressure change parameter to be calculated is the air pressure change speed, the second air pressure data may be the air pressure data of the last collection time point adjacent to the first air pressure data; if the air pressure change to be calculated from that time is the air pressure change acceleration, it is necessary to obtain the air pressure data of the last two collection time points adjacent to the first air pressure data.
[0084] The time difference may be the difference between the acquisition time points of the first air pressure data and the adjacent second air pressure data, or may be the difference between the acquisition time points of the second air pressure data calculated when necessary.
[0085] For example, if the first time collection point is 13:00:00.50 and the second time collection point is 13:00:00.40, the time difference is 0.1 (0.5-0.4) seconds (ie, 100 milliseconds); if the second time collection point includes 13:00:00.40 and 13:00:00.31, the time difference is 0.09 seconds.
[0086] S203, calculating an air pressure change parameter corresponding to the first air pressure data based on the first air pressure data, the second air pressure data and the time difference;
[0087] In one embodiment, after obtaining the first air pressure data, the second air pressure data and the time difference, the air pressure change parameter corresponding to the first air pressure data is calculated based on the first air pressure data, the second air pressure data and the time difference using a calculation formula corresponding to the parameter type of the air pressure change parameter.
[0088] The air pressure change parameters may be parameters such as air pressure change speed, air pressure change acceleration, and air pressure change jerk, and then the motion state corresponding to the delivery party corresponding to the delivery end identifier is calculated based on the air pressure change parameters.
[0089] Exemplarily, when the air pressure change parameter is the air pressure change speed, the calculation formula may be air pressure change speed = (second air pressure data - first air pressure data) / time difference. For example, if the second air pressure data is 101.5 kPa, the first air pressure data is 101.4 kPa, and the time difference is 0.1 seconds, the air pressure change speed is 1 kPa / s.
[0090] S204, generating a feature data set corresponding to the delivery end identifier based on the air pressure change parameter corresponding to each air pressure data in the air pressure data set and the air pressure data set;
[0091] In one embodiment, after obtaining the air pressure change parameters corresponding to each air pressure data in the air pressure data set, each air pressure change parameter, each air pressure data and the delivery end identifier are integrated into a data set to generate a feature data set corresponding to the delivery end identifier.
[0092] S205, using a preset data conversion matrix to convert the format of each air pressure change parameter in the characteristic data set to obtain matrix data corresponding to each air pressure change parameter;
[0093] In one embodiment, after obtaining the characteristic data set corresponding to the delivery end identification, a preset data conversion matrix is used to convert the format of each air pressure change parameter, air pressure data and delivery end identification in the characteristic data set to obtain matrix data corresponding to each air pressure change parameter, air pressure data and delivery end identification.
[0094] The data conversion method may be to use a preset conversion matrix and the air pressure change parameters and air pressure data to perform format conversion.
[0095] The matrix data may be data obtained by converting the air pressure change parameter and the air pressure data using a data conversion method. Since the data conversion method uses a conversion matrix for format conversion, the data type corresponding to the data obtained after the format conversion is a matrix. It should be noted that a matrix data includes all data corresponding to the same time acquisition point.
[0096] It should be noted that the matrix parameters of the conversion matrix correspond to the format of the computing network in the state recognition model used for subsequent state recognition, so that the matrix data obtained after the format conversion can be recognized and calculated by the state recognition model. Specifically, the number of data types included in the matrix data is equal to the filter dimension of the convolution layer of the computing network in the state recognition model.
[0097] S206, determining a data set including the matrix data corresponding to each of the air pressure change parameters in the feature data set as a feature tensor set;
[0098] In one embodiment, after the data at each time acquisition point in the feature data set are converted into matrix data, a data set including the matrix data corresponding to each data in the feature data set is determined as a feature tensor set.
[0099] The feature tensor set may be a set of matrix data corresponding to each air pressure change parameter and air pressure data in the feature data set. Further, in order to facilitate the state recognition model to recognize the feature tensor set, the data format of the feature tensor set may be: , where M can be the data length of the feature data set, that is, the number of time collection points within a preset time length, and N can be the number of features of the feature data set, that is, the number of data types included.
[0100] S207, inputting the feature tensor set into a pre-trained state recognition model, and highlighting the feature tensors in the feature tensor set based on a computing network in the state recognition model to obtain at least one candidate motion state;
[0101] In one embodiment, the feature tensor set is input into a pre-trained state recognition model, and the features of each feature tensor in the feature tensor set are highlighted based on the convolutional layer and the maximum pooling layer in the computing network in the state recognition model to obtain at least one candidate motion state.
[0102] The state recognition model may be a model for analyzing and calculating a feature tensor set to obtain a target motion state corresponding to the feature tensor set. The state recognition model may include a computing network and a classifier. Figure 4 As shown, Figure 4 The computing network includes a computing network and a classifier, wherein the computing network includes a convolution layer and a maximum pooling layer. The computing network may include multiple components, each of which includes two convolution layers and one maximum pooling layer.
[0103] The computing network may include a convolution layer and a maximum pooling layer. The convolution layer is used to filter a set of feature tensors, and the maximum pooling layer is used to calculate the maximum value of a specific feature to prevent the model from overfitting.
[0104] The filter size of the convolution layer can be 1*M*N, where M is the length of the filter convolution and N is the filter dimension. The convolution length can be the amount of data included when filtering the feature tensor in the feature tensor set. For example, if M is 3, the feature tensors corresponding to three time acquisition points are calculated in one filtering.
[0105] The candidate motion state may be a motion state pre-selected and stored in the state recognition model, and may specifically include taking an elevator up, taking an elevator down, taking an escalator up, and taking an escalator down. The specific types of candidate motion states may be set according to actual conditions. It is understandable that since the speeds of taking an escalator up / down and walking up / down stairs are similar, a feasible method is to classify walking up / down stairs as taking an escalator up / down.
[0106] S208, determining probability values corresponding to the candidate motion states based on the classifier in the state recognition model, and determining a first candidate motion state having the largest probability value among the probability values corresponding to the candidate motion states;
[0107] In one embodiment, after highlighting the features of each feature tensor in the feature tensor set, the probability value of the candidate motion state obtained after each feature highlighting is calculated based on the classifier in the state recognition model, and the probability value corresponding to each candidate motion state is determined, and the first candidate motion state with the largest probability value among the probability values corresponding to the candidate motion states is selected.
[0108] The probability value corresponding to the candidate motion state can be the predicted value of the classifier for the candidate motion state. The larger the probability value, the greater the possibility that the motion state of the delivery party carrying the delivery terminal corresponding to the delivery end identifier within the preset time period is the candidate motion state.
[0109] The classifier may be used to calculate the probability value of the subsequent motion state, for example, it may be a softmax function.
[0110] Exemplarily, the candidate motion states include taking an elevator up, taking an elevator down, taking an escalator up, and taking an escalator down. The probability value of taking an elevator up is 0.12, the probability value of taking an elevator down is 0.09, the probability value of taking an escalator up is 0.7, and the probability value of taking an escalator down is 0.09. Then taking an escalator up is determined as the first candidate motion state.
[0111] S209, determining the first candidate motion state as the target motion state corresponding to the delivery end identifier, and outputting the target motion state;
[0112] In one embodiment, the first candidate motion state is determined as the target motion state corresponding to the delivery end identification, and the target motion state is output as the calculation result of the state recognition model for the air pressure data set to determine the motion state of the delivery party in the closed area corresponding to the delivery end calibration.
[0113] like Figure 5 As shown, Figure 5 The state recognition model performs calculations on the acquired air pressure data set and outputs the target motion state corresponding to the delivery end identification in the air pressure data set.
[0114] Furthermore, the target motion state is transmitted to the delivery state adjustment module, so that the delivery state adjustment module adjusts the delivery state corresponding to the delivery end identifier.
[0115] The delivery status may include the delivery time and number of delivery orders corresponding to the delivery end identifier.
[0116] The delivery status adjustment module can be used to calculate the delivery time in the delivery status corresponding to the delivery end identifier, and increase / decrease the number of delivery orders.
[0117] For example, if the target motion state is to take an escalator up, it can be considered that the delivery party corresponding to the delivery end identifier will need to spend a long time on the delivery order currently being delivered. Therefore, if the delivery time before the target motion state is determined to be taking an escalator up and down in a closed area, the delivery time corresponding to the delivery end identifier can be increased to avoid affecting the delivery evaluation of the delivery party due to incorrect estimation of the motion state during the delivery process. It can be understood that as the required delivery time increases, the number of delivery orders assigned to the delivery end identifier can be reduced accordingly, and the delivery distance corresponding to the delivery order of the delivery party can be adjusted according to the newly calculated delivery time and the assigned delivery order, thereby improving the delivery experience of the delivery party.
[0118] In the embodiment of the present specification, by acquiring the air pressure data set transmitted by the delivery terminal identification within a preset time, calculating the air pressure change parameters corresponding to the air pressure data set, generating feature data according to the air pressure change parameters and converting them into feature tensor sets, the feature tensor sets are input into the pre-trained state recognition model to obtain the target motion state, thereby according to the air pressure data set of the closed area detected by the delivery terminal corresponding to the delivery terminal identification within the preset time, the target motion state is calculated by the state recognition model, and the motion state of the delivery party is determined in the closed area according to the air pressure data, without the need to identify the motion state according to other methods with insufficient accuracy, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area. The target motion state is transmitted to the delivery state adjustment module, so that the delivery state adjustment module adjusts the delivery time and the number of delivery orders of the delivery terminal identification, thereby improving the delivery experience of the delivery party corresponding to the delivery terminal identification, and then improving the delivery efficiency of the delivery order through the allocation of delivery orders and the adjustment of the delivery plan of the delivery party.
[0119] See also Figure 6 , is a flow chart of a training method for a state recognition model provided in an embodiment of this specification. Figure 6 As shown, the method may include the following steps S301-S304.
[0120] S301, obtaining an unlabeled sample data set and a labeled sample data set;
[0121] In one embodiment, in order to identify the motion state corresponding to the delivery terminal identifier in the closed area, it is necessary to perform model training in advance to obtain a state recognition model that identifies the motion state according to the air pressure data. Therefore, an unlabeled sample data set and a labeled sample data set for model training are obtained.
[0122] Each unlabeled sample data in the unlabeled sample data set may be air pressure data in an unlabeled motion state, and each labeled sample data in the labeled sample data set may be air pressure data in a labeled motion state.
[0123] It should be noted that, in order to improve the accuracy of model training, a feasible method is that the number of unlabeled samples in the unlabeled sample set is greater than the number of labeled samples in the labeled sample data set.
[0124] The data types included in the unlabeled sample data and the labeled sample data may include air pressure data, air pressure change speed, air pressure change acceleration, air pressure change acceleration, and delivery end identification. It is understandable that the delivery end identification may be used to indicate the delivery method that the delivery party may adopt, for example, when taking an escalator upward, while the escalator is moving upward, the delivery party moves in a fast walking or running manner.
[0125] S302, training a state recognition model using the unlabeled sample data set to obtain a first state recognition model;
[0126] In one embodiment, the initial state recognition model is trained based on the unlabeled data in the unlabeled sample data set by contrastive learning, and the parameters in the initial state recognition model are adjusted until the objective function of the state recognition model indicates model convergence, thereby obtaining a first state recognition model.
[0127] Specifically, the method of model training using contrastive learning can be: using a preset grouping method to divide the unlabeled sample data into a preset number of data groups, selecting any one of the data groups as positive sample data, and the other data groups as negative sample data, inputting each data group into the state recognition model for training, and calculating the Euclidean distance of each data group, using the value that minimizes the Euclidean distance of the positive sample data as the first objective function, and using the value that maximizes the Euclidean distance of the negative sample data as the second objective function, indicating the convergence of the state recognition model according to the first objective function and the second objective function, and obtaining a first state recognition model.
[0128] The number of data groups is the same as the number of motion state types.
[0129] Furthermore, a method for indicating the convergence of a state recognition model according to the first objective function and the second objective function may be to determine a first similarity score corresponding to positive sample data according to the first objective function, and to determine a second similarity score corresponding to negative sample data according to the second objective function; if both the first similarity score and the second similarity score satisfy a preset score range, the state recognition model is considered to have converged.
[0130] S303, using the labeled sample data set to train the first state recognition model to obtain a second state recognition model, and calculating a loss function of the second state recognition model;
[0131] In one embodiment, after obtaining a first state recognition model based on an unlabeled sample data set, the first state recognition model is trained using labeled sample data in a labeled sample data set to obtain a second state recognition model, and a loss function of the second state recognition model is calculated.
[0132] Specifically, the method for training the first state recognition model using labeled sample data in a labeled sample data set can be: inputting the labeled sample data in the labeled sample data set into the first state recognition model, adjusting the parameters in the first state recognition model according to the labeled sample data, obtaining a second state recognition model after parameter adjustment and training state data output by the first state recognition model, comparing the labels corresponding to the labeled sample data with the training state data, and calculating the loss function of the second state recognition model.
[0133] The training state data may be state data output by the first state recognition model after the labeled sample data is input into the first state recognition model.
[0134] S304: if the loss function indicates that the second state recognition model converges, determining the second state recognition model as a pre-trained state recognition model;
[0135] In one embodiment, after obtaining the loss function of the second state recognition model, the loss function is compared with a preset loss function. If the comparison result indicates that the loss function is less than the preset loss function, the second state recognition model is considered to have converged, and the second state recognition model is determined to be a pre-trained state recognition model.
[0136] The preset loss function may be a pre-set function used to determine whether the model has converged. If the loss function is less than the preset loss function, the model is considered to have converged, otherwise the model is considered to have not converged. The specific value of the preset loss function may be set according to actual conditions.
[0137] Furthermore, if the loss function indicates that the second state recognition model has not converged, the labeled sample data in the labeled sample data set is input into the second state recognition model and the loss function is calculated, and the training process is repeated until the loss function indicates that the second state recognition model has converged.
[0138] In an embodiment of the present specification, a state recognition model is preliminarily trained using an unlabeled sample data set to obtain a first state recognition model, and then the parameters of the first state recognition model are fine-tuned based on the labeled sample data to obtain a second state recognition model. The converged second state recognition model is determined as the pre-trained state recognition model, thereby completing the training of the state recognition model and being able to identify the operating state of the delivery party corresponding to the delivery end identification in the closed area, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area.
[0139] See also Figure 7 , is a flow chart of a training method for a state recognition model provided in an embodiment of this specification. Figure 7As shown, the method may include the following steps S401-S407.
[0140] S401, obtaining an unlabeled sample data set and a labeled sample data set;
[0141] In one embodiment, the specific definitions of the unlabeled sample data set and the labeled sample data set can refer to the relevant content of step S301, which will not be repeated here.
[0142] S402, dividing each unlabeled data in the unlabeled sample data set into a preset number of data groups, and selecting a target data group as positive sample data;
[0143] In one embodiment, a preset grouping method is used to group the unlabeled sample data in the unlabeled sample data set, the unlabeled sample data is divided into a preset number of data groups, and a target data group is selected in each data group as positive sample data.
[0144] The target data group may be any data group among the data groups obtained after grouping the unlabeled data set.
[0145] Furthermore, other data groups except the target data group in the data groups included in the unlabeled data set are taken as negative sample data.
[0146] The number of data groups is the same as the number of motion state types.
[0147] S403, respectively using the positive sample data and the negative sample data to train a state recognition model, and calculating a first similarity score corresponding to the positive sample data and a second similarity score corresponding to the negative sample data;
[0148] In one embodiment, each data group is input into the state recognition model for training, and the Euclidean distance of each data group is calculated. The value that minimizes the Euclidean distance of the positive sample data is used as the first objective function, and the value that maximizes the Euclidean distance of the negative sample data is used as the second objective function. The first similarity score corresponding to the positive sample data is determined according to the first objective function, and the second similarity score corresponding to the negative sample data is determined according to the second objective function.
[0149] The first similarity score may be used to indicate the degree of similarity between positive sample data, and the second similarity score may be used to indicate the degree of difference between negative sample data and positive sample data.
[0150] It can be understood that if the degree of similarity between the positive sample data is higher, it is believed that the accuracy rate obtained by the first state recognition model for identifying the positive sample data is higher.
[0151] S404, if the first similarity score and the second similarity score satisfy a preset score range, determining the state recognition model as a first state recognition model;
[0152] In one embodiment, if both the first similarity score and the second similarity score satisfy the preset score range, it is considered that the accuracy of identifying the positive sample data and the negative sample data meets the expected accuracy, and the convergence degree of the state recognition model reaches the first state recognition model.
[0153] The preset score range may be a score set for the comparative learning method, and the specific value of the preset score range may be set according to actual conditions.
[0154] S405, using the labeled sample data in the labeled sample data set to train the first state recognition model to obtain a second state recognition model with adjusted parameters and output training state data;
[0155] In one embodiment, labeled sample data in a labeled sample data set is input into a first state recognition model, and parameters in the first state recognition model are adjusted according to the labeled sample data to obtain a second state recognition model with adjusted parameters and training state data output by the first state recognition model.
[0156] The training state data may be state data output by the first state recognition model after the labeled sample data is input into the first state recognition model.
[0157] S406, calculating a loss function of the second state recognition model based on the label corresponding to the labeled sample data and the training state data;
[0158] In one embodiment, after the training state data is obtained, the loss function of the second state recognition model is calculated based on the comparison between the label corresponding to the labeled sample data and the training state data.
[0159] S407, if the loss function indicates that the second state recognition model converges, determining the second state recognition model as a pre-trained state recognition model;
[0160] In one embodiment, after obtaining the loss function of the second state recognition model, the loss function is compared with a preset loss function. If the comparison result indicates that the loss function is less than the preset loss function, the second state recognition model is considered to have converged, and the second state recognition model is determined to be a pre-trained state recognition model.
[0161] The preset loss function may be a pre-set function used to determine whether the model has converged. If the loss function is less than the preset loss function, the model is considered to have converged, otherwise the model is considered to have not converged. The specific value of the preset loss function may be set according to actual conditions.
[0162] Furthermore, if the loss function indicates that the second state recognition model has not converged, the labeled sample data in the labeled sample data set is input into the second state recognition model and the loss function is calculated, and the training process is repeated until the loss function indicates that the second state recognition model has converged.
[0163] For example, Figure 8 As shown, the unlabeled sample data set and the labeled sample data set are input into the initial state recognition model, and the trained state recognition model is obtained by adjusting the parameters in the initial state recognition model. The time difference value can be the time difference value of adjacent data.
[0164] In an embodiment of the present specification, a state recognition model is preliminarily trained using an unlabeled sample data set to obtain a first state recognition model, and then the parameters of the first state recognition model are fine-tuned based on the labeled sample data to obtain a second state recognition model. The converged second state recognition model is determined as the pre-trained state recognition model, thereby completing the training of the state recognition model and being able to identify the operating state of the delivery party corresponding to the delivery end identification in the closed area, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area.
[0165] based on Figure 1 The system architecture shown below will be combined with Fig. 9 , the motion state recognition device provided in the embodiment of this specification is introduced in detail. It should be noted that, Fig. 9 The motion state recognition device in the embodiment of this specification is used to execute Figures 2 to 5 For the convenience of explanation, only the part related to the embodiment of this specification is shown. For the specific technical details not disclosed, please refer to the embodiment of this specification. Figures 2 to 5 The embodiment shown.
[0166] See also Fig. 9 , is a schematic diagram of the structure of a motion state recognition device provided in the embodiment of this specification. Fig. 9 As shown, the motion state recognition device 1 of the embodiment of this specification may include: a data acquisition unit 11, a set generation unit 12, a data conversion unit 13 and a state recognition unit 14.
[0167] The data acquisition unit 11 is used to acquire a set of air pressure data transmitted within a preset time period based on the delivery terminal identifier, wherein the air pressure data set includes air pressure data sent by the delivery terminal corresponding to the delivery terminal identifier at each collection time point, and the air pressure data is data collected by the delivery terminal in a closed area at the collection time point. The preset time period includes multiple collection time points, and each air pressure data corresponds to each collection time point one by one;
[0168] A set generating unit 12, configured to calculate the air pressure change parameter corresponding to each of the air pressure data based on the air pressure data set, and to generate the feature data set of the delivery end identification based on the air pressure data set and the air pressure change parameter corresponding to each of the air pressure data;
[0169] A data conversion unit 13, used for converting the feature data set into a feature tensor set by adopting a data conversion method;
[0170] The state recognition unit 14 is used to input the feature tensor set into a pre-trained state recognition model to obtain the target motion state corresponding to the delivery end identification in the closed area.
[0171] Optionally, the set generating unit 12 is further used for:
[0172] Acquire first air pressure data and second air pressure data in the air pressure data set, and a time difference between a first time collection point corresponding to the first air pressure data and a second time collection point corresponding to the second air pressure data, wherein the first air pressure data is any air pressure data in the air pressure data set, and the second air pressure data is air pressure data at a time collection point adjacent to the first air pressure data;
[0173] Calculating an air pressure change parameter corresponding to the first air pressure data based on the first air pressure data, the second air pressure data and the time difference;
[0174] Based on the air pressure change parameters corresponding to each air pressure data in the air pressure data set and the air pressure data set, a feature data set corresponding to the delivery end identifier is generated.
[0175] Optionally, the data conversion unit 13 is further used for:
[0176] Using a preset data conversion matrix to convert the format of each air pressure change parameter in the characteristic data set to obtain matrix data corresponding to each air pressure change parameter;
[0177] A data set including the matrix data corresponding to each of the air pressure change parameters in the characteristic data set is determined as a characteristic tensor set.
[0178] Optionally, the state identification unit 14 is further used for:
[0179] Based on the computing network in the state recognition model, feature tensors in the feature tensor set are highlighted to obtain at least one candidate motion state;
[0180] Determine the probability value corresponding to each of the candidate motion states based on the classifier in the state recognition model, and determine a first candidate motion state with the largest probability value among the probability values corresponding to the candidate motion states;
[0181] The first candidate motion state is determined as the target motion state corresponding to the delivery end identifier, and the target motion state is output.
[0182] Optionally, the motion state recognition device 1 further includes:
[0183] The state transmission unit 15 is used to transmit the target motion state to the delivery state adjustment module so that the delivery state adjustment module adjusts the delivery state corresponding to the delivery end identifier, wherein the delivery state includes the delivery time and the number of delivery orders corresponding to the delivery end identifier.
[0184] In the embodiment of the present specification, by acquiring the air pressure data set transmitted by the delivery terminal identification within a preset time, calculating the air pressure change parameters corresponding to the air pressure data set, generating feature data according to the air pressure change parameters and converting them into feature tensor sets, the feature tensor sets are input into the pre-trained state recognition model to obtain the target motion state, thereby according to the air pressure data set of the closed area detected by the delivery terminal corresponding to the delivery terminal identification within the preset time, the target motion state is calculated by the state recognition model, and the motion state of the delivery party is determined in the closed area according to the air pressure data, without the need to identify the motion state according to other methods with insufficient accuracy, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area. The target motion state is transmitted to the delivery state adjustment module, so that the delivery state adjustment module adjusts the delivery time and the number of delivery orders of the delivery terminal identification, thereby improving the delivery experience of the delivery party corresponding to the delivery terminal identification, and then improving the delivery efficiency of the delivery order through the allocation of delivery orders and the adjustment of the delivery plan of the delivery party.
[0185] based on Figure 1 The system architecture shown below will be combined with Fig.10 , the training device of the state recognition model provided in the embodiment of this specification is introduced in detail. It should be noted that, Fig.10 The training device of the state recognition model in the embodiment of this specification is used to execute Figure 6-Figure 8 For the convenience of explanation, only the part related to the embodiment of this specification is shown. For the specific technical details not disclosed, please refer to the embodiment of this specification. Figure 6-Figure 8The embodiment shown.
[0186] See also Fig.10 , is a schematic diagram of a structure of a training device for a state recognition model provided in an embodiment of this specification. Fig.10 As shown, the training device 2 of the state recognition model in the embodiment of this specification may include: a sample acquisition unit 21, a first training unit 22 and a second training unit 23.
[0187] The sample acquisition unit 21 is used to acquire an unlabeled sample data set and a labeled sample data set, wherein each unlabeled sample data in the unlabeled sample data set is air pressure data in an unlabeled motion state, and each labeled sample data in the labeled sample data set is air pressure data in a labeled motion state;
[0188] A first training unit 22, configured to train the state recognition model using the unlabeled sample data set to obtain a first state recognition model;
[0189] A second training unit 23 is used to train the first state recognition model using the labeled sample data set to obtain a second state recognition model, and calculate a loss function of the second state recognition model;
[0190] The second training unit 23 is further configured to determine the second state recognition model as a pre-trained state recognition model if the loss function indicates that the second state recognition model has converged.
[0191] Optionally, the first training unit 22 is further used for:
[0192] Divide each unlabeled data in the unlabeled sample data set into a preset number of data groups, and select a target data group as positive sample data, and select other data groups in the data group except the target data group as negative sample data;
[0193] The state recognition model is trained using the positive sample data and the negative sample data respectively, and a first similarity score corresponding to the positive sample data and a second similarity score corresponding to the negative sample data are calculated, wherein the first similarity score indicates the degree of similarity between the positive sample data, and the second similarity score indicates the degree of difference between the negative sample data and the positive sample data;
[0194] If the first similarity score and the second similarity score satisfy a preset score range, the state recognition model is determined as a first state recognition model.
[0195] Optionally, the second training unit 23 is further used for:
[0196] Using the labeled sample data in the labeled sample data set to train the first state recognition model, to obtain a second state recognition model with adjusted parameters and output training state data;
[0197] Based on the labels corresponding to the labeled sample data and the training state data, a loss function of the second state recognition model is calculated.
[0198] In an embodiment of the present specification, a state recognition model is preliminarily trained using an unlabeled sample data set to obtain a first state recognition model, and then the parameters of the first state recognition model are fine-tuned based on the labeled sample data to obtain a second state recognition model. The converged second state recognition model is determined as the pre-trained state recognition model, thereby completing the training of the state recognition model and being able to identify the operating state of the delivery party corresponding to the delivery end identification in the closed area, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area.
[0199] The present specification also provides a computer storage medium, which can store a plurality of program instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1-Figure 8 The method steps of the embodiment shown in the figure can be found in the specific implementation process. Figure 1-Figure 8 The specific description of the illustrated embodiment will not be repeated here.
[0200] The embodiment of the present specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1-Figure 8 The motion state recognition method of the embodiment shown in the figure can be specifically executed by referring to Figure 1-Figure 8 The specific description of the illustrated embodiment will not be repeated here.
[0201] See also Fig.11 , is a schematic diagram of the structure of an electronic device provided in the embodiment of this specification. Fig.11 As shown, the electronic device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, an input / output interface 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. Fig.11As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, an input and output interface module, and a motion state recognition application.
[0202] exist Fig.11 In the electronic device 1000 shown, the input-output interface 1003 is mainly used to provide an input interface for the user and obtain data input by the user.
[0203] In one embodiment, the processor 1001 may be used to call the motion state recognition application stored in the memory 1005, and specifically perform the following operations:
[0204] Acquire a set of air pressure data transmitted within a preset time period based on a delivery terminal identifier, wherein the air pressure data set includes air pressure data sent by a delivery terminal corresponding to the delivery terminal identifier at each collection time point, and the air pressure data is data collected by the delivery terminal in a closed area at the collection time point, and the preset time period includes multiple collection time points, and each air pressure data corresponds to each collection time point one by one;
[0205] Calculate the air pressure change parameter corresponding to each of the air pressure data based on the air pressure data set, and generate the characteristic data set of the delivery end identification based on the air pressure data set and the air pressure change parameter corresponding to each of the air pressure data;
[0206] Using a data conversion method to convert the feature data set into a feature tensor set;
[0207] The feature tensor set is input into a pre-trained state recognition model to obtain the target motion state corresponding to the delivery end identification in the closed area.
[0208] Optionally, when the processor 1001 calculates the air pressure change parameters corresponding to each of the air pressure data based on the air pressure data set, and generates the feature data set of the delivery end identifier based on the air pressure data set and the air pressure change parameters corresponding to each of the air pressure data, the processor 1001 specifically performs the following operations:
[0209] Acquire first air pressure data and second air pressure data in the air pressure data set, and a time difference between a first time collection point corresponding to the first air pressure data and a second time collection point corresponding to the second air pressure data, wherein the first air pressure data is any air pressure data in the air pressure data set, and the second air pressure data is air pressure data at a time collection point adjacent to the first air pressure data;
[0210] Calculating an air pressure change parameter corresponding to the first air pressure data based on the first air pressure data, the second air pressure data and the time difference;
[0211] Based on the air pressure change parameters corresponding to each air pressure data in the air pressure data set and the air pressure data set, a feature data set corresponding to the delivery end identifier is generated.
[0212] Optionally, when the processor 1001 converts the feature data set into a feature tensor set by using a data conversion method, the processor 1001 specifically performs the following operations:
[0213] Using a preset data conversion matrix to convert the format of each air pressure change parameter in the characteristic data set to obtain matrix data corresponding to each air pressure change parameter;
[0214] A data set including the matrix data corresponding to each of the air pressure change parameters in the characteristic data set is determined as a characteristic tensor set.
[0215] Optionally, when obtaining the target motion state corresponding to the delivery end identifier in the closed area, the processor 1001 specifically performs the following operations:
[0216] Based on the computing network in the state recognition model, feature tensors in the feature tensor set are highlighted to obtain at least one candidate motion state;
[0217] Determine the probability value corresponding to each of the candidate motion states based on the classifier in the state recognition model, and determine a first candidate motion state with the largest probability value among the probability values corresponding to the candidate motion states;
[0218] The first candidate motion state is determined as the target motion state corresponding to the delivery end identifier, and the target motion state is output.
[0219] Optionally, after obtaining the target motion state corresponding to the delivery end identifier in the closed area, the processor 1001 further performs the following operations:
[0220] The target motion state is transmitted to the delivery state adjustment module so that the delivery state adjustment module adjusts the delivery state corresponding to the delivery end identifier, wherein the delivery state includes the delivery time and the number of delivery orders corresponding to the delivery end identifier.
[0221] In the embodiment of the present specification, by acquiring the air pressure data set transmitted by the delivery terminal identification within a preset time, calculating the air pressure change parameters corresponding to the air pressure data set, generating feature data according to the air pressure change parameters and converting them into feature tensor sets, the feature tensor sets are input into the pre-trained state recognition model to obtain the target motion state, thereby according to the air pressure data set of the closed area detected by the delivery terminal corresponding to the delivery terminal identification within the preset time, the target motion state is calculated by the state recognition model, and the motion state of the delivery party is determined in the closed area according to the air pressure data, without the need to identify the motion state according to other methods with insufficient accuracy, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area. The target motion state is transmitted to the delivery state adjustment module, so that the delivery state adjustment module adjusts the delivery time and the number of delivery orders of the delivery terminal identification, thereby improving the delivery experience of the delivery party corresponding to the delivery terminal identification, and then improving the delivery efficiency of the delivery order through the allocation of delivery orders and the adjustment of the delivery plan of the delivery party.
[0222] See also Fig.12 , is a schematic diagram of the structure of an electronic device provided in the embodiment of this specification. Fig.12 As shown, the electronic device 2000 may include: at least one processor 2001, such as a CPU, at least one network interface 2004, an input / output interface 2003, a memory 2005, and at least one communication bus 2002. The communication bus 2002 is used to realize the connection and communication between these components. The network interface 2004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 2005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 2005 may optionally also be at least one storage device located away from the aforementioned processor 2001. Fig.12 As shown, the memory 2005 as a computer storage medium may include an operating system, a network communication module, an input and output interface module, and a state recognition model training application.
[0223] exist Fig.12 In the electronic device 2000 shown, the input-output interface 2003 is mainly used to provide an input interface for the user and obtain data input by the user.
[0224] In one embodiment, the processor 2001 may be used to call a training application of a state recognition model stored in the memory 2005, and specifically perform the following operations:
[0225] Acquire an unlabeled sample data set and a labeled sample data set, wherein each unlabeled sample data in the unlabeled sample data set is air pressure data in an unlabeled motion state, and each labeled sample data in the labeled sample data set is air pressure data in a labeled motion state;
[0226] Using the unlabeled sample data set to train a state recognition model to obtain a first state recognition model;
[0227] Using the labeled sample data set to train the first state recognition model to obtain a second state recognition model, and calculating a loss function of the second state recognition model;
[0228] If the loss function indicates that the second state recognition model converges, the second state recognition model is determined as a pre-trained state recognition model.
[0229] Optionally, when the processor 2001 trains the state recognition model using the unlabeled sample data set to obtain the first state recognition model, the processor 2001 specifically performs the following operations:
[0230] Divide each unlabeled data in the unlabeled sample data set into a preset number of data groups, and select a target data group as positive sample data, and select other data groups in the data group except the target data group as negative sample data;
[0231] The state recognition model is trained using the positive sample data and the negative sample data respectively, and a first similarity score corresponding to the positive sample data and a second similarity score corresponding to the negative sample data are calculated, wherein the first similarity score indicates the degree of similarity between the positive sample data, and the second similarity score indicates the degree of difference between the negative sample data and the positive sample data;
[0232] If the first similarity score and the second similarity score satisfy a preset score range, the state recognition model is determined as a first state recognition model.
[0233] Optionally, when the processor 2001 trains the first state recognition model using the labeled sample data set to obtain a second state recognition model and calculates a loss function of the second state recognition model, the processor 2001 specifically performs the following operations:
[0234] Using the labeled sample data in the labeled sample data set to train the first state recognition model, to obtain a second state recognition model with adjusted parameters and output training state data;
[0235] Based on the labels corresponding to the labeled sample data and the training state data, a loss function of the second state recognition model is calculated.
[0236] In an embodiment of the present specification, a state recognition model is preliminarily trained using an unlabeled sample data set to obtain a first state recognition model, and then the parameters of the first state recognition model are fine-tuned based on the labeled sample data to obtain a second state recognition model. The converged second state recognition model is determined as the pre-trained state recognition model, thereby completing the training of the state recognition model and being able to identify the operating state of the delivery party corresponding to the delivery end identification in the closed area, thereby improving the accuracy of identifying the motion state of the delivery party in the closed area.
[0237] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0238] The above disclosure is only the preferred embodiment of this specification, which certainly cannot be used to limit the scope of rights of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.
Claims
1. A motion state recognition method, characterized in that: The method comprises: Acquire a set of air pressure data transmitted within a preset time period based on a delivery terminal identifier, wherein the air pressure data set includes air pressure data sent by a delivery terminal corresponding to the delivery terminal identifier at each collection time point, and the air pressure data is data collected by the delivery terminal in a closed area at the collection time point, and the preset time period includes multiple collection time points, and each air pressure data corresponds to each collection time point one by one; Calculate the air pressure change parameter corresponding to each of the air pressure data based on the air pressure data set, and generate the characteristic data set of the delivery end identification based on the air pressure data set and the air pressure change parameter corresponding to each of the air pressure data; Using a preset data conversion matrix to convert the format of each air pressure change parameter in the characteristic data set to obtain matrix data corresponding to each air pressure change parameter; Determine a data set including the matrix data corresponding to each of the air pressure change parameters in the feature data set as a feature tensor set; The feature tensor set is input into a pre-trained state recognition model to obtain the target motion state corresponding to the delivery end identification in the closed area. The state recognition model is trained based on unlabeled sample data of labeled motion states and labeled sample data of unlabeled motion states, and is used to analyze and calculate the feature tensor set to obtain the target motion state corresponding to the feature tensor set.
2. The method according to claim 1, characterized in that The step of calculating the air pressure change parameters corresponding to each of the air pressure data based on the air pressure data set, and generating the feature data set of the delivery end identifier based on the air pressure data set and the air pressure change parameters corresponding to each of the air pressure data, comprises: Acquire first air pressure data and second air pressure data in the air pressure data set, and a time difference between a first time collection point corresponding to the first air pressure data and a second time collection point corresponding to the second air pressure data, wherein the first air pressure data is any air pressure data in the air pressure data set, and the second air pressure data is air pressure data at a time collection point adjacent to the first air pressure data; Calculating an air pressure change parameter corresponding to the first air pressure data based on the first air pressure data, the second air pressure data and the time difference; Based on the air pressure change parameters corresponding to each air pressure data in the air pressure data set and the air pressure data set, a feature data set corresponding to the delivery end identifier is generated.
3. The method according to claim 1, characterized in that The obtaining of the target motion state corresponding to the delivery end identifier in the closed area includes: Based on the computing network in the state recognition model, feature tensors in the feature tensor set are highlighted to obtain at least one candidate motion state; Determine the probability value corresponding to each of the candidate motion states based on the classifier in the state recognition model, and determine a first candidate motion state with the largest probability value among the probability values corresponding to the candidate motion states; The first candidate motion state is determined as the target motion state corresponding to the delivery end identifier, and the target motion state is output.
4. The method according to claim 1, characterized in that: After obtaining the target motion state corresponding to the delivery end identifier in the closed area, the method further includes: The target motion state is transmitted to the delivery state adjustment module so that the delivery state adjustment module adjusts the delivery state corresponding to the delivery end identifier, wherein the delivery state includes the delivery time and the number of delivery orders corresponding to the delivery end identifier.
5. A training method for a state recognition model, characterized in that: The method comprises: Acquire an unlabeled sample data set and a labeled sample data set, wherein each unlabeled sample data in the unlabeled sample data set is air pressure data in an unlabeled motion state, and each labeled sample data in the labeled sample data set is air pressure data in a labeled motion state; Using the unlabeled sample data set to train a state recognition model to obtain a first state recognition model; Using the labeled sample data set to train the first state recognition model to obtain a second state recognition model, and calculating a loss function of the second state recognition model; If the loss function indicates that the second state recognition model converges, the second state recognition model is determined as a pre-trained state recognition model.
6. The method according to claim 5, characterized in that The step of training the state recognition model using the unlabeled sample data set to obtain a first state recognition model includes: Divide each unlabeled data in the unlabeled sample data set into a preset number of data groups, and select a target data group as positive sample data, and select other data groups in the data group except the target data group as negative sample data; The state recognition model is trained using the positive sample data and the negative sample data respectively, and a first similarity score corresponding to the positive sample data and a second similarity score corresponding to the negative sample data are calculated, wherein the first similarity score indicates the degree of similarity between the positive sample data, and the second similarity score indicates the degree of difference between the negative sample data and the positive sample data; If the first similarity score and the second similarity score satisfy a preset score range, the state recognition model is determined as a first state recognition model.
7. The method according to claim 5, characterized in that The step of training the first state recognition model using the labeled sample data set to obtain a second state recognition model and calculating a loss function of the second state recognition model includes: Using the labeled sample data in the labeled sample data set to train the first state recognition model, to obtain a second state recognition model with adjusted parameters and output training state data; Based on the labels corresponding to the labeled sample data and the training state data, a loss function of the second state recognition model is calculated.
8. A motion state recognition device, characterized in that: The device comprises: A data acquisition unit, used to acquire a set of air pressure data transmitted within a preset time period based on a delivery terminal identifier, wherein the air pressure data set includes air pressure data sent by a delivery terminal corresponding to the delivery terminal identifier at each collection time point, and the air pressure data is data collected by the delivery terminal in a closed area at the collection time point, and the preset time period includes multiple collection time points, and each air pressure data corresponds to each collection time point one by one; A set generating unit, configured to calculate the air pressure change parameter corresponding to each of the air pressure data based on the air pressure data set, and to generate the characteristic data set of the delivery end identification based on the air pressure data set and the air pressure change parameter corresponding to each of the air pressure data; A data conversion unit, used to convert the format of each air pressure change parameter in the characteristic data set using a preset data conversion matrix to obtain matrix data corresponding to each air pressure change parameter; The data conversion unit is further used to determine the data set including the matrix data corresponding to each of the air pressure change parameters in the characteristic data set as a characteristic tensor set; A state recognition unit is used to input the feature tensor set into a pre-trained state recognition model to obtain the target motion state corresponding to the delivery end identification in the closed area. The state recognition model is trained based on unlabeled sample data of labeled motion states and labeled sample data of unlabeled motion states, and is used to analyze and calculate the feature tensor set to obtain the target motion state corresponding to the feature tensor set.
9. A training device for a state recognition model, characterized in that: The device comprises: A sample acquisition unit, used to acquire an unlabeled sample data set and a labeled sample data set, wherein each unlabeled sample data in the unlabeled sample data set is air pressure data in an unlabeled motion state, and each labeled sample data in the labeled sample data set is air pressure data in a labeled motion state; A first training unit, configured to train a state recognition model using the unlabeled sample data set to obtain a first state recognition model; A second training unit is used to train the first state recognition model using the labeled sample data set to obtain a second state recognition model, and calculate a loss function of the second state recognition model; The second training unit is further configured to determine the second state recognition model as a pre-trained state recognition model if the loss function indicates that the second state recognition model has converged.
10. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the method as claimed in any one of claims 1 to 4 or 5 to 7.
11. An electronic device, comprising: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 4 or 5 to 7.
