Construction Method, Device and Computer Equipment for Loss Risk Prediction Model
A deep learning model predicts package loss risk during transportation by analyzing historical data, improving warning timeliness and reducing loss rates, thus optimizing logistics operations.
Patent Information
- Application Number
- CN202110195946.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-22
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-02-22
AI Technical Summary
The existing early warning methods for loss of logistics packages have obvious lag, and it is difficult to warn in time before the loss of logistics packages, resulting in the inability to effectively avoid the risk of loss.
A loss risk prediction model is built, and by obtaining sample logistics information and loss risk tags of historical logistics packages, using deep neural network models for training, adjusting model parameters, generating loss risk scores, and achieving an advance estimate of the loss risk of logistics packages that have not reached the transportation destination.
In order to predict the loss of logistics parcels, we have achieved an advance estimate, effectively avoid the risk of loss of logistics parcels, reduce the proportion of loss of logistics parcels, reduce the operating costs of logistics companies, and improve customer experience.
Smart Images

Figure CN114971446B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method, apparatus, computer device, and storage medium for constructing a loss risk prediction model. Background Art
[0002] With the continuous development of the logistics industry, the transportation volume of logistics parcels is also increasing. In order to reduce the transportation risk of logistics parcels, the transportation situation of logistics parcels is often monitored. However, the existing logistics parcel loss warning methods have obvious lag. When the warning information is sent, the logistics parcel has been lost for a long time, and it is difficult to avoid the risk of loss of logistics parcels. Summary of the Invention
[0003] Based on this, it is necessary to provide a method, apparatus, computer device, and storage medium for constructing a loss risk prediction model for the above technical problems.
[0004] A method for constructing a loss risk prediction model, the method includes:
[0005] Obtain sample logistics information and loss risk labels corresponding to historical logistics parcels; the sample logistics information includes information reflecting the logistics activity characteristics of the historical logistics parcels;
[0006] Input the sample logistics information into a deep neural network model to be trained, so as to determine the predicted loss risk result corresponding to the historical logistics parcel based on the sample logistics information through the deep neural network model;
[0007] Adjust the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model; the loss risk prediction model is used to determine the loss risk score corresponding to the target logistics parcel according to the logistics information corresponding to the target logistics parcel; the target logistics parcel is a logistics parcel that has not reached the transportation destination.
[0008] Optionally, the obtaining of the sample logistics information corresponding to the historical logistics parcel includes:
[0009] Obtain the original logistics information corresponding to the historical logistics parcel; the original logistics information includes information corresponding to multiple fields, and the multiple fields reflect the logistics activity characteristics of the historical logistics parcel from different dimensions;
[0010] Screen out multiple target fields and their corresponding target logistics information that match the preset fields from the original logistics information;
[0011] Convert the data format of the target logistics information to obtain sample logistics information.
[0012] Optionally, obtaining the original logistics information corresponding to the historical logistics package includes:
[0013] Obtaining the predicted logistics routing data, the actual logistics routing data, and the package sending information corresponding to the historical logistics package;
[0014] Based on the predicted logistics routing data, the actual logistics routing data, and the package sending information, obtaining the original logistics information corresponding to the historical logistics package.
[0015] Optionally, performing data format conversion on the target logistics information to obtain sample logistics information, including:
[0016] According to the data types corresponding to each target field, screening out the fields with the nominal data type and their corresponding target logistics information;
[0017] Based on the screened fields and their corresponding target logistics information, generating key-value pairs of the dictionary type, and using the key-value pairs as the sample logistics information.
[0018] Optionally, generating key-value pairs of the dictionary type according to the screened fields and their corresponding target logistics information includes:
[0019] When the target logistics information includes multiple routing nodes corresponding to the routing node field, obtaining the first numbers mapped by each routing node, and generating key-value pairs of the dictionary type according to the routing node field and the first numbers mapped by each routing node;
[0020] And / or
[0021] When the target logistics information includes multiple node transport capacities corresponding to the transport capacity field, obtaining the second numbers mapped by each node transport capacity, and generating key-value pairs of the dictionary type according to the transport capacity field and the second numbers mapped by each node transport capacity.
[0022] Optionally, adjusting the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model, including:
[0023] Inputting the predicted loss risk result and the loss risk label into a logic correction module to adjust the deep neural network model through the logic correction module;
[0024] Returning to the step of obtaining the sample logistics information and the loss risk label corresponding to the historical logistics package, and repeating the adjustment of the deep neural network model until the training end condition is met, and determining the current deep neural network model as the loss risk prediction model.
[0025] A method for loss warning of logistics packages, the method includes:
[0026] Obtain the logistics information corresponding to the logistics package; the logistics package includes the logistics package that has not reached the transportation destination; the logistics information includes the information reflecting the logistics activity characteristics of the logistics package;
[0027] Input the logistics information into a preset loss risk prediction model, so as to determine the loss risk score corresponding to the logistics package based on the logistics information through the loss risk prediction model; the loss risk score is used to reflect the possibility of the logistics package being lost in subsequent logistics activities;
[0028] When the loss risk score exceeds the score threshold, generate a loss warning message for the logistics package;
[0029] Wherein, the loss risk prediction model is constructed by the construction method of the loss risk prediction model as described above.
[0030] An apparatus for constructing a loss risk prediction model, the apparatus includes:
[0031] The first logistics information acquisition module is used to acquire the sample logistics information and loss risk labels corresponding to the historical logistics packages; the sample logistics information includes the information reflecting the logistics activity characteristics of the historical logistics packages;
[0032] The predicted loss risk result acquisition module is used to input the sample logistics information into the deep neural network model to be trained, so as to determine the predicted loss risk result corresponding to the historical logistics package based on the sample logistics information through the deep neural network model;
[0033] The model adjustment module is used to adjust the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model; the loss risk prediction model is used to determine the loss risk score corresponding to the target logistics package according to the logistics information corresponding to the target logistics package; the target logistics package is a logistics package that has not reached the transportation destination.
[0034] A loss warning device for logistics packages, the device includes:
[0035] The second logistics information acquisition module is used to acquire the logistics information corresponding to the logistics package; the logistics package includes the logistics package that has not reached the transportation destination; the logistics information includes the information reflecting the logistics activity characteristics of the logistics package;
[0036] A loss risk score acquisition module, configured to input the logistics information into a preset loss risk prediction model, so as to determine the loss risk score corresponding to the logistics package based on the logistics information through the loss risk prediction model; the loss risk score is used to reflect the possibility of loss of the logistics package in subsequent logistics activities;
[0037] A loss warning information generation module, configured to generate loss warning information for the logistics package when the loss risk score exceeds a score threshold;
[0038] Wherein, the loss risk prediction model is constructed by the construction method of the loss risk prediction model as described above.
[0039] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the above are implemented.
[0040] A computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.
[0041] The above-mentioned construction method, device and computer device of a loss risk prediction model obtain sample logistics information and loss risk labels corresponding to historical logistics packages, input the sample logistics information into a deep neural network model to be trained, and determine the predicted loss risk results corresponding to the historical logistics packages based on the sample logistics information through the deep neural network model. Furthermore, according to the predicted loss risk results and loss risk labels, the deep neural network model is adjusted to obtain a loss risk prediction model. This model can determine the loss risk score of a logistics package that has not reached the destination of transportation, can realize the early estimation of the loss of the logistics package, effectively avoid the risk of loss of the logistics package, reduce the proportion of lost logistics packages, reduce the operating cost of logistics enterprises, and improve the customer experience. Description of the Drawings
[0042] Figure 1 It is a schematic flowchart of a construction method of a loss risk prediction model in an embodiment;
[0043] Figure 2a It is a schematic diagram of a fully connected layer in an embodiment;
[0044] Figure 2b It is a schematic diagram of an activation function in an embodiment;
[0045] Figure 2c It is a schematic diagram of another activation function in an embodiment;
[0046] Figure 2d It is a schematic diagram of a dropout process in an embodiment;
[0047] Figure 2e Schematic diagram of a long short-term memory artificial neural network in an embodiment;
[0048] Figure 3 Schematic diagram of the training process of a deep neural network model in an embodiment;
[0049] Figure 4 Schematic diagram of the sample logistics information acquisition step in an embodiment;
[0050] Figure 5 Schematic diagram of the process of a method for warning of loss of a logistics package
[0051] Figure 6 Schematic diagram of the data processing process of a deep neural network model in an embodiment;
[0052] Figure 7 Schematic diagram of the data processing process of a logistics package in an embodiment;
[0053] Figure 8 Block diagram of the structure of a device for constructing a loss risk prediction model in an embodiment;
[0054] Figure 9 Block diagram of the structure of a device for warning of loss of a logistics package in an embodiment;
[0055] Figure 10 Internal structure diagram of a computer device in an embodiment;
[0056] Figure 11 Another internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0057] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] In an embodiment, as Figure 1 shown, the present application provides a method for constructing a loss risk prediction model. In this embodiment, an example is given where the method is applied to a terminal. The terminal can obtain the sample logistics information and loss risk labels corresponding to the processed historical logistics packages, and construct a loss risk prediction model based on this. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method may include the following steps:
[0059] Step 101: Obtain the sample logistics information and loss risk label corresponding to the historical logistics package.
[0060] As an example, a logistics package can refer to an item consigned through logistics resources. Among them, logistics packages can include express deliveries or slow deliveries. An express delivery can refer to a consigned item with a transportation speed or efficiency higher than a preset standard, and a slow delivery can refer to a consigned item with a transportation speed or efficiency lower than a preset standard. A historical logistics package can be a logistics package whose transportation task has been completed, and historical logistics packages can include packages successfully transported to the designated location and, packages lost during the transportation to the designated location.
[0061] During the process of consigning or transporting a logistics package through logistics resources, it can involve multiple logistics activities, such as transportation, warehousing, packaging, handling, circulation processing, distribution, etc. Logistics information can reflect the corresponding logistics activity characteristics of the logistics package in the logistics activities. The sample logistics information can include the logistics information reflecting the logistics activity characteristics of the historical logistics package. In a specific implementation, the logistics activities corresponding to the historical logistics package can be recorded to obtain the corresponding logistics information. Then, when constructing the loss risk prediction model, the recorded logistics information can be used as the sample logistics information of the historical logistics package.
[0062] The loss risk label can be a loss risk score preset by the user according to the logistics activity situation and / or logistics activity results of the historical logistics package (such as the loss of the logistics package or the delivery of the logistics package).
[0063] In this embodiment, the terminal can obtain the sample logistics information and loss risk label corresponding to the historical logistics package from local data, or, through a communication connection with the server, obtain the sample logistics information and loss risk label from the server.
[0064] Step 102: Input the sample logistics information into the deep neural network model to be trained, so as to determine the predicted loss risk result corresponding to the historical logistics package based on the sample logistics information through the deep neural network model.
[0065] As an example, the deep neural network model to be trained can be a model obtained after pre-constructing the number of layers of the model, the number of neurons in each layer, and / or the model optimization method. Those skilled in the art can construct the model according to actual needs.
[0066] After obtaining the sample logistics information, the sample logistics information can be input into a deep neural network (DNN) model to be trained, and through the deep neural network model, based on the input sample logistics information, the predicted loss risk result corresponding to the historical logistics package can be determined. The predicted loss risk result can be information indicating whether the historical logistics package will be lost. In one example, the corresponding predicted loss risk score can be obtained by converting the predicted loss risk result, and the loss risk result can be quantitatively displayed.
[0067] Step 103, adjust the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model; the loss risk prediction model is used to determine the loss risk score corresponding to the target logistics package according to the logistics information corresponding to the target logistics package; the target logistics package is a logistics package that has not reached the transportation destination.
[0068] After obtaining the predicted loss risk result output by the deep neural network model, the model parameters of the deep neural network model can be adjusted according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model. For a logistics package that has not reached the transportation destination, that is, the target logistics package, the loss risk prediction model can predict the loss risk score of the target logistics package during transportation according to the logistics information corresponding to the target logistics package.
[0069] In this embodiment, by obtaining the sample logistics information and the loss risk label corresponding to the historical logistics package, inputting the sample logistics information into the deep neural network model to be trained, and through the deep neural network model, determining the predicted loss risk result corresponding to the historical logistics package based on the sample logistics information, and then adjusting the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model. This model can determine the loss risk score of the logistics package that has not reached the transportation destination, can realize the early estimation of the loss of the logistics package, effectively avoid the risk of the loss of the logistics package, reduce the proportion of the loss of the logistics package, reduce the operating cost of the logistics enterprise, and improve the customer experience.
[0070] In one example, the deep neural network model to be trained may include any one or more of the following structures: x = layers.Dense(256)(inputs), x = layers.BatchNormalization()(x), x = layers.Activation('relu')(x), x = layers.Dropout(0.2)(x), x = layers.Dense(512)(x), x = layers.BatchNormalization()(x), x = layers.Activation('relu')(x), x = layers.Dropout(0.2)(x), x = layers.Dense(1024)(x), x = layers.BatchNormalization()(x), x = layers.Activation('relu')(x), x = layers.Dropout(0.2)(x), x = layers.Dense(512)(x), x = ayers.BatchNormalization()(x), x = layers.Activation('relu')(x), x = layers.Dropout(0.2)(x), x = layers.Dense(256)(x), x = layers.BatchNormalization()(x), x = layers.Activation('relu')(x), x = layers.Dropout(0.2)(x), x = layers.Dense(128)(x), x = layers.BatchNormalization()(x), x = layers.Activation('relu')(x), x = layers.Dropout(0.2)(x), x = layers.Dense(64)(x), x = layers.BatchNormalization()(x), x = layers.Activation('relu')(x), x = layers.Dropout(0.2)(x), x = layers.Dense(32)(x), x = layers.BatchNormalization()(x), x = layers.Activation('relu')(x), x = layers.Dropout(0.2)(x), x = tf.keras.layers.Dense(1)(x), x = layers.BatchNormalization()(x), outputs = layers.Activation('sigmoid')(x).
[0071] Among them, x represents the input and output of a certain layer in the model, and the output of a certain layer in the model is the input of its next layer; layers.Dense represents the full connected layer; the ReLU (Rectified Linear Unit) is used as the activation function for the input layer and the hidden layers, and the sigmoid is used as the activation function for the output layer; the Batch Normalization (batch normalization) and Dropout (dropout) methods can be added to the model.
[0072] In an example, the full connected layer can be as Figure 2a shown. The preprocessed data x1, x2, x3 and the bias (such as "+1" in the figure) can be input into the input layer (LayerL1), and then respectively input into each neuron of the hidden layer (LayerL2). Each neuron in the hidden layer can perform a weighted sum on the input data and process the weighted sum result according to the activation function corresponding to the neuron. Then, each neuron in the hidden layer can respectively obtain the corresponding processed results a1 (2) , a2 (2) and a3 (2) . The hidden layer can input the processed results together with the bias into the output layer (LayerL3), and the output layer can output the final result after corresponding data processing. Among them, the hidden layer can be multiple hidden layers, and the activation function of the hidden layer can adopt ReLU as Figure 2b shown, and the activation function of the output layer adopts the sigmoid function as Figure 2c shown.
[0073] Batch Normalization means that for each batch of input data, standardization processing is performed on each neuron in each layer of the neural network. By this method, the problem of gradient disappearance in deep neural networks can be effectively solved. Among them, during the model training process, for the input of each neuron in each layer, the corresponding mean and variance can be calculated respectively, and data normalization processing is performed according to the mean and variance to obtain the data normalization processing result. Finally, through the corresponding learnable parameters Υ and β, scale transformation and offset are performed on the data normalization processing result. After the processing result passes through the corresponding activation function respectively, it is used as the output of the corresponding neuron. During this training process, the mean, variance, and the parameters Υ and β used for Batch Normalization in subsequent model applications can be learned.
[0074] Dropout refers to randomly discarding neurons during training, effectively alleviating overfitting. As Figure 2d shown, it is an example of Dropout.
[0075] In a deep neural network model, Long Short-Term Memory (LSTM) artificial neural network processing may also be involved. The Long Short-Term Memory artificial neural network is a model for processing sequential data. For the data Xt to be trained, this model can refer to the information before it, that is, [X0, Xt-1], as Figure 2e shown.
[0076] In one embodiment, adjusting the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model includes:
[0077] Inputting the predicted loss risk result and the loss risk label into a logic correction module to adjust the deep neural network model through the logic correction module; returning to the step of obtaining the sample logistics information and the loss risk label corresponding to the historical logistics package, and repeating the adjustment of the deep neural network model until the training end condition is met, and determining the current deep neural network model as the loss risk prediction model.
[0078] In practical applications, after obtaining the predicted loss risk result output by the deep neural network model, the predicted loss risk result and the loss risk label can be input into the logic correction module. Specifically, after constructing the deep neural network model, a logic correction module can be added outside the model. In the logic correction module, there can be a correction logic for correcting the parameters involved in the deep neural network model according to the training data.
[0079] Specifically, the logic correction module can determine the loss function currently corresponding to the deep neural network model according to the predicted loss risk result and the loss risk label, and then can adjust the deep neural network model according to the loss function and the backpropagation algorithm. Among them, the content of the adjustment includes the weights and biases of each layer in the deep neural network model, γ and β included in Batch Normalization. In one example, it can also include the value of the vector V corresponding to the field for training the model, and the parameters in LSTM. As Figure 3As shown, after cleaning and preprocessing the original data, training data can be obtained, which may include sample logistics information and loss risk labels. The sample logistics information is input into the deep neural network model, and through the deep neural network model for prediction, the prediction result (corresponding to the predicted loss risk result in this application) is output, and the prediction result and the training data are input into the external correction logic to adjust the deep neural network model according to the training data and the prediction result.
[0080] After adjusting the deep neural network model, it can return to the step of obtaining the sample logistics information and loss risk labels corresponding to the historical logistics packages, input the new sample logistics information into the adjusted deep neural network model again, and repeat the adjustment of the deep neural network model according to the predicted loss risk result and the new loss risk label output by it until the training end condition is met, and the current deep neural network model is determined as the loss risk prediction model, where the training end condition can be that the loss function is less than the preset threshold, or the number of training iterations of the deep neural network model reaches the preset number.
[0081] In this embodiment, by adjusting the model parameters of the deep neural network model multiple times until the training end condition is met, the model structure can be continuously optimized, and the prediction accuracy of the loss risk prediction model can be improved.
[0082] In one embodiment, as Figure 4 shown, the obtaining of the sample logistics information corresponding to the historical logistics packages may include the following steps:
[0083] Step 401, obtain the original logistics information corresponding to the historical logistics packages; the original logistics information includes information corresponding to multiple fields, and the multiple fields reflect the logistics activity characteristics of the historical logistics packages from different dimensions.
[0084] As an example, the original logistics information may be the logistics information of the historical logistics packages without preprocessing and data cleaning. The fields corresponding to the original logistics information may include fields associated with the logistics packages themselves, fields associated with costs, fields associated with logistics services, fields associated with logistics customer information, fields associated with routes, and fields associated with customer complaints. For example, the fields corresponding to the original logistics information may include any one or more of the following: package volume, number of packages, package category, package value, total cost, freight, timeliness type, business type, whether it belongs to the insured logistics business, customer type, payment method, routing node, departure time of the logistics transportation tool, arrival time of the logistics transportation tool, and transportation capacity of the logistics transportation tool.
[0085] In a specific implementation, the original logistics information corresponding to historical logistics parcels can be obtained. Among them, the original logistics information can include information corresponding to multiple fields, and the multiple fields can reflect the logistics activity characteristics of historical logistics parcels from different dimensions.
[0086] Step 402: From the original logistics information, filter out multiple target fields that match the preset fields and their corresponding target logistics information.
[0087] As an example, the target fields can include fields associated with the logistics parcel itself, fields associated with fees, fields associated with logistics services, fields associated with logistics customer information, fields associated with routing, and fields associated with customer complaints. Specifically, it can include any one or more of the following: parcel volume, number of parcels, parcel category, parcel value, total fee, freight, timeliness type, business type, whether it belongs to the insured logistics business, customer type, payment method, routing node, departure time of the logistics transportation vehicle, arrival time of the logistics transportation vehicle, and transport capacity of the logistics transportation vehicle.
[0088] After obtaining the original logistics information, the preset fields can be obtained, and according to the fields corresponding to each piece of information in the original logistics information, multiple target fields that match the preset fields can be filtered out, and the information corresponding to each target field can be obtained as the target logistics information. In practical applications, the preset fields can be determined according to business logic and business knowledge.
[0089] Step 403: Perform data format conversion on the target logistics information to obtain sample logistics information.
[0090] After obtaining the target logistics information, data format conversion can be performed on the target logistics information to obtain sample logistics information. Specifically, the data format conversion can include any one or more of the following processes: data standardization processing, data binning processing, one-hot processing (feature digitization processing), and data type conversion.
[0091] In this embodiment, by filtering out multiple target fields that match the preset fields and their corresponding target logistics information from the original logistics information, and performing data format conversion on the target logistics information to obtain sample logistics information, standardized and effective logistics information for model training can be obtained, providing a data basis for optimizing the model training effect.
[0092] In one embodiment, the obtaining of the original logistics information corresponding to the historical logistics parcel may include the following steps:
[0093] Obtain the predicted logistics routing data, actual logistics routing data, and package shipping information corresponding to the historical logistics package; based on the predicted logistics routing data, actual logistics routing data, and package shipping information, obtain the original logistics information corresponding to the historical logistics package.
[0094] As an example, the predicted logistics routing data can also be referred to as static routing data, that is, the data corresponding to the routing that the predicted logistics package will pass through. Among them, the predicted logistics routing data can include each routing node involved in the predicted logistics package routing, the departure time of the logistics transportation vehicle corresponding to each routing node, the arrival time of the logistics transportation vehicle, or the transport capacity of the logistics transportation vehicle corresponding to each routing node. The logistics transportation vehicle can be a land transportation vehicle, water transportation vehicle, or air transportation vehicle, such as vehicle transportation, railway transportation, shipping, and air shipping, etc.
[0095] The actual logistics routing data can also be referred to as dynamic routing data, that is, the data corresponding to the routing that the logistics package actually passes through. Among them, the actual logistics routing data can include each routing node involved in the actual logistics package routing, the departure time of the logistics transportation vehicle corresponding to each routing node, the arrival time of the logistics transportation vehicle, or the transport capacity of the logistics transportation vehicle corresponding to each routing node. The logistics transportation vehicle can be a land transportation vehicle, water transportation vehicle, or air transportation vehicle, such as vehicle transportation, railway transportation, shipping, and air shipping, etc.
[0096] The package shipping information can be information associated with the logistics package itself or the characteristics of the logistics shipping business. For example, it can include package volume, number of packages, package category, package value, total cost, freight, timeliness type, business type, whether it belongs to an insured logistics business, customer type, payment method, etc.
[0097] In a specific implementation, the predicted logistics routing data, actual logistics routing data, and package shipping information can be obtained, and based on the predicted logistics routing data, actual logistics routing data, and package shipping information, the original logistics information corresponding to the historical logistics package can be generated.
[0098] In this embodiment, generating the original logistics information based on the predicted logistics routing data, actual logistics routing data, and package shipping information can collect multi-dimensional characteristic information of the logistics package, providing a training basis for subsequent model training. Moreover, the collected original logistics information is associated with the logistics package itself and is highly decoupled from business rules. In different business scenarios, only simple adjustments are required, and the model can be quickly applied to various scenarios of logistics package transportation services, effectively reducing the workload of model training and improving the efficiency of model training.
[0099] In one embodiment, the data format conversion of the target logistics information to obtain the sample logistics information includes:
[0100] According to the data types corresponding to each target field, filter out the fields with the nominal data type and their corresponding target logistics information; according to the filtered fields and their corresponding target logistics information, generate key-value pairs of dictionary type, and use the key-value pairs as sample logistics information.
[0101] As an example, the data type corresponding to each field can be the data type corresponding to the data under the field. The data with the nominal data type means that the data is selected from a finite set of data.
[0102] In a specific implementation, the data types corresponding to each target field can be obtained, the fields with the nominal data type can be filtered out from multiple target fields, and the target logistics information corresponding to the filtered fields can be obtained. Furthermore, for each filtered field and its corresponding target logistics information, a mapping relationship can be constructed, key-value pairs of dictionary type can be generated, and the key-value pairs can be used as sample logistics information.
[0103] In this embodiment, for the fields with the nominal data type, according to the fields and their corresponding target logistics information, key-value pairs of dictionary type are generated, and the key-value pairs are used as sample logistics information to provide a data basis for subsequent model training.
[0104] In one embodiment, the generating key-value pairs of dictionary type according to the filtered fields and their corresponding target logistics information includes:
[0105] When the target logistics information includes multiple routing nodes corresponding to the routing node field, obtain the first numbers mapped by each routing node, and generate key-value pairs of dictionary type according to the routing node field and the first numbers mapped by each routing node; and / or, when the target logistics information includes multiple node capacities corresponding to the capacity field, obtain the second numbers mapped by each node capacity, and generate key-value pairs of dictionary type according to the capacity field and the second numbers mapped by each node capacity.
[0106] As an example, the routing node field can be the field corresponding to the logistics information reflecting the routing nodes. Under the routing node field, it can include the routing nodes passed by each logistics package. For example, the routing nodes passed by logistics package A are routing node 1 and routing node 2, and for another example, the routing nodes passed by logistics package B are routing node 3, routing node 4... routing node n.
[0107] The capacity field can be the field corresponding to the logistics information reflecting the capacity of the routing nodes. Among them, the capacity of the routing nodes can be the capacity corresponding to adjacent routing nodes. For example, under the capacity field, it can include the capacity corresponding to the routing nodes passed by each logistics package. For example, the two routing nodes passed by logistics package A correspond to "capacity x".
[0108] In a specific implementation, the data types corresponding to the routing node field and the transport capacity field can be nominal types, that is, the values corresponding to this field are nominal data, which are obtained from a finite data set. Based on this, when the target logistics information includes multiple routing nodes corresponding to the routing node field, the first numbers mapped by each routing node can be obtained according to the preset mapping relationship between the routing node and the number, and based on the routing node field itself and the first numbers mapped by each routing node, key-value pairs of the dictionary type are generated.
[0109] When the target logistics information includes multiple node transport capacities corresponding to the transport capacity field, the second numbers mapped by each node transport capacity can be obtained according to the preset mapping relationship between the node transport capacity and the number, and based on the transport capacity field itself and the second numbers mapped by each node transport capacity, key-value pairs of the dictionary type are generated.
[0110] In an example, each field with a nominal data type can be subjected to Embedding processing, that is, each value corresponding to the field is converted into a vector V with a fixed length; for the routing node field and the transport capacity field, after Embedding processing, they can be processed by LSTM respectively with the time field, and after the results are concatenated with other inputs, they are the inputs for training the deep neural network model, that is, the "inputs" mentioned above.
[0111] In this embodiment, generating key-value pairs of the dictionary type according to the routing node field and the first numbers mapped by each routing node, or generating key-value pairs of the dictionary type according to the transport capacity field and the second numbers mapped by each node transport capacity can standardize the data format of the routing node or transport capacity data, provide a good data basis for subsequent model training, shorten the model training time, and improve the training efficiency.
[0112] In an embodiment, the method may further include the following steps: encapsulating the loss risk prediction model into a model interface and embedding the model interface into the package monitoring system.
[0113] Among them, the model interface can be an interface associated with the loss risk model.
[0114] Specifically, after model training to obtain a trained loss risk prediction model, the loss risk prediction model can be encapsulated in the form of an interface to obtain a model interface, and the model interface is embedded into the package monitoring system.
[0115] In this embodiment, by encapsulating the loss risk prediction model into an interface and embedding it into the package monitoring system, it can promptly respond to the user's request to call the model at the front end and improve the data processing efficiency in the loss risk prediction process.
[0116] In one embodiment, as Figure 5 shown, a method for predicting the loss of a logistics parcel is provided. In this embodiment, the method is exemplified by being applied to a server. Among them, the server can obtain the current logistics information of the logistics parcel by interacting with a terminal or other servers. It can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is realized through the interaction between the terminal and the server. In this embodiment, the method may include the following steps:
[0117] Step 501, obtain the logistics information corresponding to the logistics parcel; the logistics parcel includes logistics parcels that have not reached the transportation destination.
[0118] Among them, the logistics information includes information reflecting the characteristics of the logistics activities of the logistics parcel.
[0119] In practical applications, for logistics parcels that have not reached the transportation destination, the server can obtain their corresponding logistics information.
[0120] Specifically, each logistics parcel can have a corresponding transportation status label. The transportation status label can be used to characterize whether the logistics parcel has reached the transportation destination, and can include "has reached the transportation destination" and "has not reached the transportation destination". In one example, the transportation status label can be a label indicating whether the recipient of the logistics parcel has signed for it. When monitoring, the server can obtain the transportation status labels corresponding to each logistics parcel. For logistics parcels with a transportation status label of "has not reached the transportation destination", the server can obtain the logistics information of the logistics parcel.
[0121] Step 502, input the logistics information into a preset loss risk prediction model, so as to determine the loss risk score corresponding to the logistics parcel based on the logistics information through the loss risk prediction model.
[0122] Among them, the loss risk prediction model can be constructed by the loss risk prediction model construction method described above; the loss risk score is used to reflect the possibility of the logistics parcel being lost in subsequent logistics activities.
[0123] In practical applications, in one or more links of the entire logistics activity of the logistics parcel, there may be a risk of loss, that is, the logistics parcel is lost before reaching the transportation destination. Based on this, after obtaining the logistics information corresponding to the logistics parcel, the logistics information can be input into the loss risk prediction model, and the loss risk prediction model determines the loss risk score corresponding to the logistics parcel according to the input logistics information.
[0124] Step 503, when the loss risk score exceeds the score threshold, generate a loss warning message for the logistics parcel.
[0125] After obtaining the loss risk score, it is possible to determine whether the loss risk score exceeds a preset score threshold. When the loss risk score exceeds the score threshold, a loss warning message can be generated for the logistics parcel to remind the user that the current loss risk score of the logistics parcel is too high, and the possibility of loss in subsequent logistics activities is higher than the threshold. Then the user can take preventive measures in a timely manner based on the loss warning message to prevent problems before they occur.
[0126] In this embodiment, by obtaining the logistics information corresponding to the logistics parcel that has not reached the destination, inputting the logistics information into a preset loss risk prediction model, and determining the loss risk score corresponding to the logistics parcel based on the logistics information through the loss risk prediction model. When the loss risk score exceeds the score threshold, a loss warning message is generated for the logistics parcel, realizing the early estimation of the loss of the logistics parcel and reminding the user in advance to take preventive measures for the logistics parcel with high loss risk, being able to prevent problems before they occur, effectively avoiding the risk of loss of the logistics parcel, reducing the proportion of lost logistics parcels, lowering the operating costs of logistics enterprises, and improving the customer experience.
[0127] In one embodiment, the method may further include the following steps:
[0128] When the logistics information corresponding to the logistics parcel is updated, obtain the current logistics information, and return to the step of inputting the logistics information into the preset loss risk prediction model; update the stored loss risk score according to the loss risk score currently output by the loss risk prediction model.
[0129] In specific implementation, the transportation of the logistics parcel is a dynamic transfer process. At different time points, the logistics information and the possibility of loss corresponding to the logistics parcel may change. When it is detected that the logistics information corresponding to the logistics parcel is updated, the current logistics information of the logistics parcel can be obtained and returned to step 502. Through the loss risk prediction model, based on the currently obtained logistics information, the loss risk score corresponding to the logistics parcel is re-determined. For example, when it is detected that one or more logistics activity characteristics have changed, it can be determined that the logistics information corresponding to the logistics parcel has been updated, and then the current logistics information can be obtained and input into the loss risk prediction model.
[0130] After obtaining the new loss risk score output by the loss risk prediction model, the currently output loss risk score can be used to update the stored loss risk score, that is, to update the previous loss risk score.
[0131] In this embodiment, by obtaining the current logistics information and updating the loss risk score according to the current logistics information, it is possible to provide real-time loss risk assessment of the logistics parcel, dynamically adjust the loss risk score according to the logistics status of the logistics parcel, and improve the prediction accuracy and timeliness.
[0132] In one embodiment, the server may be a package monitoring system. In a method for warning of loss of a logistics package, the following steps may be included: obtaining logistics information corresponding to the currently monitored logistics package in the package monitoring system; calling a model interface corresponding to the package monitoring system according to the logistics information, so as to determine a loss risk score corresponding to the logistics package based on the logistics information through a loss risk prediction model associated with the model interface; when the loss risk score exceeds a score threshold, displaying loss warning information for the logistics package through the package monitoring system.
[0133] In a specific implementation, the loss risk prediction model may be encapsulated as a model interface and embedded in the package monitoring system. After obtaining the logistics information corresponding to the logistics package, based on the received logistics information, the corresponding model interface may be called from the package monitoring system, and the loss risk score corresponding to the logistics package may be determined according to the logistics information through the loss risk prediction model associated with the model interface. When the loss risk score exceeds the score threshold, loss warning information for the logistics package may be displayed through the package monitoring system.
[0134] In this embodiment, the loss risk prediction model is encapsulated as an interface and embedded in the package monitoring system. After obtaining the logistics information, by calling the model interface, one-key evaluation of the loss risk can be quickly implemented in the system, and the loss risk evaluation result can be directly displayed, without relying on other evaluation methods or data transmission in different data processing modules, effectively improving the evaluation efficiency and display speed of the loss risk of logistics packages.
[0135] In an example, when the loss risk score exceeds the score threshold, the current logistics information and loss warning information of the logistics package may be displayed through the package monitoring system.
[0136] Specifically, when the loss risk score exceeds the score threshold, the logistics information and loss warning information corresponding to the logistics package may be displayed through the package monitoring system. In addition to being able to determine the logistics packages with too high loss risk, the staff can also take preventive measures matching the current logistics information according to the current logistics information of the logistics package. For example, through the current logistics information, the transfer yard where the logistics package is currently located or the person in charge corresponding to the logistics package can be determined, and then targeted preventive measures can be taken.
[0137] To enable those skilled in the art to better understand the above steps, the following exemplarily illustrates the embodiments of the present application through an example, but it should be understood that the embodiments of the present application are not limited thereto.
[0138] As Figure 6As shown, during model training, for routing times (such as the departure time of a logistics transportation vehicle and the arrival time of a logistics transportation vehicle), LSTM processing can be performed to obtain corresponding first processing results. For routing nodes and node capacities, corresponding bags of words (corresponding to the key-value pairs in this application) can be generated, and after Embedding processing, LSTM processing is performed to obtain second processing results.
[0139] For categorical (nominal) fields such as logistics timeliness and logistics categories, after generating corresponding bags of words and performing Embedding processing, they can be flattened, that is, the multi-dimensional input is made one-dimensional to obtain corresponding third processing results.
[0140] Furthermore, based on the first processing result, the second processing result, the third processing result, and other fields, matrix concatenation (Concatenate) can be performed to obtain corresponding vectors, and these vectors are input into a neural network including multiple layers. In this neural network, there can be fully connected layers (dense), and processing is combined with batch normalization (Batch Normalization), activation functions (Activation), dropout (Dropout), etc. Finally, a predicted loss risk result indicating whether there is a loss is output, and a loss risk score is obtained after conversion.
[0141] As Figure 7 shown, after obtaining the data source (corresponding to the logistics information of the logistics package in this application), data processing including format conversion can be performed to convert the original data in the data source into a data format that can be processed by a deep neural network model. And data verification can be performed to verify whether the converted data format can be used for model training and conforms to the preset data format specifications. After passing the verification, the deep neural network model can be trained based on the converted data to obtain a loss risk prediction model, which is encapsulated as a model interface and embedded in a monitoring dashboard (corresponding to the package monitoring system in this application).
[0142] During operation, whenever the data of a logistics package is updated, the model interface in the monitoring dashboard can be called again. The model runs once, gives an updated loss risk score, and when the loss risk score exceeds the threshold, the relevant data of the logistics package is displayed to alert relevant business personnel that the logistics package has a high loss risk during subsequent transfers and should be monitored closely.
[0143] It should be understood that although Figures 1-7The steps in the flowchart are shown in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 1-7 At least a part of the steps in Figures 1-7 may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in rotation with at least a part of other steps or steps or stages in other steps.
[0144] In one embodiment, as Figure 8 shown, a device for constructing a loss risk prediction model is provided. The device includes:
[0145] A first logistics information acquisition module 801, configured to acquire sample logistics information and a loss risk label corresponding to a historical logistics package; the sample logistics information includes information reflecting the logistics activity characteristics of the historical logistics package;
[0146] A predicted loss risk result acquisition module 802, configured to input the sample logistics information into a deep neural network model to be trained, and based on the sample logistics information, determine a predicted loss risk result corresponding to the historical logistics package through the deep neural network model;
[0147] A model adjustment module 803, configured to adjust the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model; the loss risk prediction model is used to determine a loss risk score corresponding to a target logistics package according to the logistics information corresponding to the target logistics package; the target logistics package is a logistics package that has not reached the transportation destination.
[0148] In one embodiment, the first logistics information acquisition module 801 includes:
[0149] An original logistics information acquisition sub-module, configured to acquire original logistics information corresponding to a historical logistics package; the original logistics information includes information corresponding to multiple fields, and the multiple fields reflect the logistics activity characteristics of the historical logistics package from different dimensions;
[0150] A screening sub-module, configured to screen out multiple target fields and their corresponding target logistics information that match a preset field from the original logistics information;
[0151] A format conversion sub-module, configured to perform data format conversion on the target logistics information to obtain sample logistics information.
[0152] In one embodiment, the original logistics information acquisition sub-module includes:
[0153] A data acquisition unit for acquiring predicted logistics routing data, actual logistics routing data, and package shipping information corresponding to historical logistics packages;
[0154] An original logistics information generation unit for obtaining the original logistics information corresponding to the historical logistics packages according to the predicted logistics routing data, actual logistics routing data, and package shipping information.
[0155] In one embodiment, the format conversion sub-module includes:
[0156] A field screening unit for screening out fields with a nominal data type and their corresponding target logistics information according to the data types corresponding to each target field;
[0157] A dictionary generation unit for generating key-value pairs of dictionary type according to the screened fields and their corresponding target logistics information, and using the key-value pairs as sample logistics information.
[0158] In one embodiment, the dictionary generation unit includes:
[0159] A first sub-unit for, when the target logistics information includes multiple routing nodes corresponding to a routing node field, obtaining the first numbers mapped by each routing node, and generating key-value pairs of dictionary type according to the routing node field and the first numbers mapped by each routing node;
[0160] And / or,
[0161] A second sub-unit for, when the target logistics information includes multiple node transport capacities corresponding to a transport capacity field, obtaining the second numbers mapped by each node transport capacity, and generating key-value pairs of dictionary type according to the transport capacity field and the second numbers mapped by each node transport capacity.
[0162] In one embodiment, the model adjustment module 803
[0163] A parameter correction module for inputting the predicted loss risk result and the loss risk label into a logic correction module to adjust the deep neural network model through the logic correction module;
[0164] An iteration module for returning to the step of obtaining sample logistics information and loss risk labels corresponding to historical logistics packages, repeatedly adjusting the deep neural network model until the training end condition is met, and determining the current deep neural network model as the loss risk prediction model.
[0165] In one embodiment, the device further includes:
[0166] A model encapsulation module, configured to encapsulate the loss risk prediction model into a model interface and embed the model interface into a parcel monitoring system.
[0167] For specific limitations on a device for constructing a loss risk prediction model, reference may be made to the limitations on a method for constructing a loss risk prediction model in the foregoing text, which will not be elaborated herein. Each module in the foregoing device for constructing a loss risk prediction model may be implemented in whole or in part by software, hardware, and their combination. The foregoing modules may be embedded in a processor in a computer device in hardware form or independent thereof, or stored in a memory in a computer device in software form, so as to facilitate the processor to call and execute operations corresponding to the foregoing modules.
[0168] In one embodiment, as Figure 9 shown, a loss warning device for a logistics parcel is provided. The device includes:
[0169] A second logistics information acquisition module 901, configured to acquire logistics information corresponding to a logistics parcel; the logistics parcel includes a logistics parcel that has not reached a transportation destination; the logistics information includes information reflecting the characteristics of the logistics activities of the logistics parcel;
[0170] A loss risk score acquisition module 902, configured to input the logistics information into a preset loss risk prediction model, so as to determine, based on the logistics information through the loss risk prediction model, a loss risk score corresponding to the logistics parcel; the loss risk score is used to reflect the possibility of loss of the logistics parcel in subsequent logistics activities;
[0171] A loss warning information generation module 903, which is used to generate loss warning information for the logistics parcel when the loss risk score exceeds a score threshold.
[0172] Wherein, the loss risk prediction model is constructed by the method for constructing a loss risk prediction model described in other embodiments above.
[0173] In one embodiment, the device further includes:
[0174] A logistics information update module, configured to acquire current logistics information and call the loss risk score acquisition module 902 when the logistics information corresponding to the logistics parcel is updated;
[0175] A score update module, configured to update a stored loss risk score according to the loss risk score currently output by the loss risk prediction model.
[0176] For the specific limitations of a loss warning device for a logistics package, reference may be made to the limitations of a loss warning method for a logistics package in the foregoing text, which will not be elaborated herein. Each module in the above-mentioned loss warning device for a logistics package can be implemented in whole or in part by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or stored in a memory in the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above-mentioned modules.
[0177] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 10 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it is used to implement a method for constructing a loss risk prediction model. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0178] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 11 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data associated with logistics packages. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it is used to implement a loss warning method for a logistics package.
[0179] Those skilled in the art can understand that Figure 10 and Figure 11The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0180] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:
[0181] Obtain the logistics information corresponding to the currently monitored logistics packages in the package monitoring system; the logistics packages include the logistics packages that have not reached the transportation destination; the logistics information includes the information reflecting the logistics activity characteristics of the logistics packages;
[0182] Call the model interface corresponding to the package monitoring system according to the logistics information, so as to determine the loss risk score corresponding to the logistics package based on the loss risk prediction model associated with the model interface and the logistics information; the loss risk score is used to reflect the possibility of the logistics package being lost in subsequent logistics activities;
[0183] When the loss risk score exceeds the score threshold, display the loss warning information for the logistics package through the package monitoring system.
[0184] In one embodiment, when the processor executes the computer program, the steps in the above-mentioned other embodiments are also implemented.
[0185] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0186] Obtain the logistics information corresponding to the currently monitored logistics packages in the package monitoring system; the logistics packages include the logistics packages that have not reached the transportation destination; the logistics information includes the information reflecting the logistics activity characteristics of the logistics packages;
[0187] Call the model interface corresponding to the package monitoring system according to the logistics information, so as to determine the loss risk score corresponding to the logistics package based on the loss risk prediction model associated with the model interface and the logistics information; the loss risk score is used to reflect the possibility of the logistics package being lost in subsequent logistics activities;
[0188] When the loss risk score exceeds the score threshold, display the loss warning information for the logistics package through the package monitoring system.
[0189] In one embodiment, when the computer program is executed by the processor, the steps in the above-mentioned other embodiments are also implemented.
[0190] In one embodiment, a computer device is provided, which includes a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:
[0191] Obtain the logistics information corresponding to the logistics package; the logistics package includes the logistics packages that have not reached the transportation destination; the logistics information includes the information reflecting the logistics activity characteristics of the logistics package;
[0192] Input the logistics information into a preset loss risk prediction model to determine the loss risk score corresponding to the logistics package based on the logistics information through the loss risk prediction model; the loss risk score is used to reflect the possibility of the logistics package being lost in subsequent logistics activities;
[0193] When the loss risk score exceeds the score threshold, generate a loss warning message for the logistics package;
[0194] Wherein, the loss risk prediction model is constructed by the construction method of the loss risk prediction model described in the above embodiments.
[0195] In one embodiment, when the processor executes the computer program, the steps in the above other embodiments are also implemented.
[0196] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0197] Obtain the logistics information corresponding to the logistics package; the logistics package includes the logistics packages that have not reached the transportation destination; the logistics information includes the information reflecting the logistics activity characteristics of the logistics package;
[0198] Input the logistics information into a preset loss risk prediction model to determine the loss risk score corresponding to the logistics package based on the logistics information through the loss risk prediction model; the loss risk score is used to reflect the possibility of the logistics package being lost in subsequent logistics activities;
[0199] When the loss risk score exceeds the score threshold, generate a loss warning message for the logistics package;
[0200] Wherein, the loss risk prediction model is constructed by the construction method of the loss risk prediction model described in the above embodiments.
[0201] In one embodiment, when the computer program is executed by the processor, the steps in the above other embodiments are also implemented.
[0202] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above various methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0203] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0204] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.
Claims
1. A method for constructing a loss risk prediction model, characterized in that, The method includes: Obtaining sample logistics information and a loss risk label corresponding to a historical logistics package; the sample logistics information includes information reflecting the logistics activity characteristics of the historical logistics package; Inputting the sample logistics information into a deep neural network model to be trained, so as to determine, through the deep neural network model and based on the sample logistics information, a predicted loss risk result indicating whether the historical logistics package is lost during transportation; Adjusting the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model; the loss risk label includes a pre-set loss risk score according to the logistics activity situation and / or logistics activity result of the historical logistics package; the loss risk prediction model is used to determine the loss risk score corresponding to a target logistics package according to the logistics information corresponding to the target logistics package, and the loss risk score reflects the possibility of the target logistics package being lost in subsequent logistics activities; the target logistics package is a logistics package that has not reached the transportation destination.
2. The method according to claim 1, characterized in that, The obtaining of the sample logistics information corresponding to the historical logistics package includes: Obtaining the original logistics information corresponding to the historical logistics package; the original logistics information includes information corresponding to multiple fields, and the multiple fields reflect the logistics activity characteristics of the historical logistics package from different dimensions; Screening out multiple target fields matching the preset fields and the corresponding target logistics information from the original logistics information; Performing data format conversion on the target logistics information to obtain the sample logistics information.
3. The method according to claim 2, characterized in that, The obtaining of the original logistics information corresponding to the historical logistics package includes: Obtaining the predicted logistics routing data, actual logistics routing data and package sending information corresponding to the historical logistics package; Obtaining the original logistics information corresponding to the historical logistics package according to the predicted logistics routing data, actual logistics routing data and package sending information.
4. The method according to claim 2, wherein The performing of data format conversion on the target logistics information to obtain the sample logistics information includes: Screening out the fields with the nominal data type and the corresponding target logistics information according to the data types corresponding to the respective target fields; Generating key-value pairs of the dictionary type according to the screened fields and the corresponding target logistics information, and using the key-value pairs as the sample logistics information.
5. The method according to claim 4, wherein The generating of the key-value pairs of the dictionary type according to the screened fields and the corresponding target logistics information includes: When the target logistics information includes multiple routing nodes corresponding to a routing node field, obtaining the first numbers mapped by the respective routing nodes, and generating key-value pairs of the dictionary type according to the routing node field and the first numbers mapped by the respective routing nodes; and / or When the target logistics information includes multiple node transport capacities corresponding to a transport capacity field, obtaining the second numbers mapped by the respective node transport capacities, and generating key-value pairs of the dictionary type according to the transport capacity field and the second numbers mapped by the respective node transport capacities.
6. The method according to claim 1, wherein The adjusting of the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model includes: Input the predicted loss risk result and the loss risk label into the logic correction module to adjust the deep neural network model through the logic correction module; Return to the step of obtaining the sample logistics information and the loss risk label corresponding to the historical logistics package, and repeat adjusting the deep neural network model until the training end condition is met, and determine the current deep neural network model as the loss risk prediction model.
7. A method for warning of the loss of a logistics parcel, characterized in that, The method includes: Obtain the logistics information corresponding to the logistics package; the logistics package includes the logistics package that has not reached the transportation destination; the logistics information includes the information reflecting the logistics activity characteristics of the logistics package; Input the logistics information into a preset loss risk prediction model to determine the loss risk score corresponding to the logistics package based on the logistics information through the loss risk prediction model; the loss risk score is used to reflect the possibility of the logistics package being lost in subsequent logistics activities; When the loss risk score exceeds the score threshold, generate a loss warning message for the logistics package; Among them, the loss risk prediction model is constructed by the construction method of the loss risk prediction model according to any one of claims 1 to 6.
8. An apparatus for constructing a loss risk prediction model, characterized in that, The device includes: The first logistics information acquisition module is used to acquire the sample logistics information and the loss risk label corresponding to the historical logistics package; the sample logistics information includes the information reflecting the logistics activity characteristics of the historical logistics package; The predicted loss risk result acquisition module is used to input the sample logistics information into the deep neural network model to be trained, and determine the predicted loss risk result indicating whether the historical logistics package is lost during transportation based on the sample logistics information through the deep neural network model; The model adjustment module is used to adjust the deep neural network model according to the predicted loss risk result and the loss risk label to obtain a loss risk prediction model; the loss risk label includes a preset loss risk score according to the logistics activity situation and / or logistics activity result of the historical logistics package; the loss risk prediction model is used to determine the loss risk score corresponding to the target logistics package according to the logistics information corresponding to the target logistics package, and the loss risk score reflects the possibility of the target logistics package being lost in subsequent logistics activities; the target logistics package is a logistics package that has not reached the transportation destination.
9. A loss warning device for logistics packages, characterized in that, The device includes: The second logistics information acquisition module is used to acquire the logistics information corresponding to the logistics package; the logistics package includes the logistics package that has not reached the transportation destination; the logistics information includes the information reflecting the logistics activity characteristics of the logistics package; The loss risk score acquisition module is used to input the logistics information into a preset loss risk prediction model to determine the loss risk score corresponding to the logistics package based on the logistics information through the loss risk prediction model; the loss risk score is used to reflect the possibility of the logistics package being lost in subsequent logistics activities; The loss warning message generation module, when the loss risk score exceeds the score threshold, is used to generate a loss warning message for the logistics package; Among them, the loss risk prediction model is constructed by the construction method of the loss risk prediction model according to any one of claims 1 to 6.
10. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Article leaving determination method and device and model training method and device
CN110796017A