Early warning method, device, electronic device and computer readable medium
By constructing order feature vectors and information prediction models, the problem of unified monitoring and early warning of multiple stores is solved, and the rapid and accurate order backlog warning is achieved, which improves the management level and compliance stability of fresh product delivery.
Patent Information
- Application Number
- CN202011331014.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-24
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2040-11-24
AI Technical Summary
It is difficult for the existing technology to achieve unified standardized monitoring and early warning of multiple fresh product stores, resulting in difficult to ensure the timeliness of order delivery and stability of fulfillment, and the manual early warning is delayed and the accuracy is low.
Build a target feature vector that characterizes the order situation, generate accurate order backlog warning information through the pre-trained information prediction model, and push it to the display device to achieve rapid response and adjustment.
It improves the efficiency and management of store order processing, reduces the risk of order backlog, and improves the timeliness and accuracy of delivery.
Smart Images

Figure CN114611736B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to methods, devices, electronic devices, and computer-readable media for information prediction and early warning. Background Art
[0002] With the development of new retail, Online To Offline (O2O) has become a trend. More and more physical merchants use the Internet to expand their customer base, and more people choose to place orders online. Since fresh products have high requirements for shelf life, online orders pose a challenge to store delivery of fresh products. In the process of delivering fresh products, if there is a large backlog of orders and the store cannot fulfill the orders in time, various special measures need to be taken to maintain the stability of store operations.
[0003] However, in the process of analyzing and warning the delivery and accumulation of fresh product store orders, the following technical problems often occur:
[0004] First, due to the large number of stores and the different operating conditions of each store, it is difficult to carry out unified and standardized monitoring and early warning for many stores under complex circumstances. More manual means are needed to enable dedicated personnel to issue early warnings for store order backlogs.
[0005] Second, the method that mainly relies on manual early warning has a certain lag, making it difficult to achieve early warning, and thus difficult to take special measures in advance to effectively prevent the accumulation of a large number of orders and the inability to fulfill contracts in a timely manner. Summary of the invention
[0006] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0007] Some embodiments of the present disclosure propose early warning methods, devices, electronic devices, and computer-readable media to solve one or more of the technical problems mentioned in the above background technology section.
[0008] In a first aspect, some embodiments of the present disclosure provide a method for early warning, the method comprising: obtaining a target feature vector for characterizing an order situation; inputting the target feature vector into a pre-trained information prediction model to obtain early warning information corresponding to the target feature vector; pushing the early warning information to a target device with a display function, and controlling the target device to display the early warning information.
[0009] In a second aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any method as described in the first aspect.
[0010] In a third aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any method in the first aspect is implemented.
[0011] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the early warning method of some embodiments of the present disclosure, a target feature vector representing the personnel situation, order details and other factors related to the order situation is constructed to solve the problem of untimely processing of orders in stores. Based on the annotated historical target feature vector set, the information prediction model is trained and the target feature vector is input into the information prediction model, which can quickly and accurately generate the store's order backlog warning information, improve the store's order processing efficiency, and improve the order management level. Specifically, the inventor found that the reason why the current warning level for the store order backlog situation is not high enough is that due to the large number of stores and the different operating conditions of each store, more manual means are needed to realize the warning of the store order backlog situation by a dedicated person, and the warning lag is serious and the warning accuracy is low. Based on this, firstly, some embodiments of the present disclosure construct a target feature vector representing the personnel situation, order details and other factors related to the order situation, and realize the structured representation of the factors affecting the timely delivery of store orders. Secondly, some embodiments of the present disclosure pre-process and annotate a large number of target feature vectors in the historical data, and generate a sample feature vector set and a sample warning information set corresponding to the sample feature vector set. The sample feature vector set and the sample warning information set corresponding to the sample feature vector set are constructed based on data collected from many stores in a certain historical period. Therefore, the sample feature vector set and the sample warning information set are universal and adaptable, and can be used to build a standardized information prediction model that is consistent across many stores. Finally, some embodiments of the present disclosure train an information prediction model based on the labeled sample feature vector set and the sample warning information set, and input the target feature vector into the information prediction model, which can quickly and accurately generate the store's order backlog warning information, thereby improving the store's order delivery management level. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0013] Figure 1 is an architectural diagram of an exemplary system in which some embodiments of the present disclosure may be applied;
[0014] Figure 2 is a flow chart of some embodiments of the early warning method according to the present disclosure;
[0015] Figure 3 is a flow chart of training steps for training an information prediction model according to the present disclosure;
[0016] Figure 4 It is a structural diagram of a terminal device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0019] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0020] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0021] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0022] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the early warning method of the present disclosure can be applied.
[0023] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0024] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as information warning applications, information display applications, data analysis applications, etc.
[0025] The terminal devices 101, 102, 103 can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various terminal devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the terminal devices listed above. It can be implemented as multiple software or software modules (for example, to provide target feature vector input, etc.), or it can be implemented as a single software or software module. No specific limitation is made here.
[0026] The server 105 may be a server providing various services, such as a server storing target feature vectors input by the terminal devices 101, 102, 103. The server may process the received target feature vectors and feed back the processing results (such as warning information) to the terminal device.
[0027] It should be noted that the early warning method provided in the embodiment of the present disclosure can be executed by the server 105 or by a terminal device.
[0028] It should be pointed out that the server 105 can also directly store the target feature vector locally, and the server 105 can directly extract the local target feature vector and obtain the warning information after processing. At this time, the exemplary system architecture 100 may not include the terminal devices 101, 102, 103 and the network 104.
[0029] It should also be noted that the terminal devices 101, 102, 103 may also be installed with an early warning application, and in this case, the processing method may also be executed by the terminal devices 101, 102, 103. In this case, the exemplary system architecture 100 may also not include the server 105 and the network 104.
[0030] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, for providing early warning services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0031] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of electronic devices, networks and servers may be provided as required.
[0032] Continue to refer Figure 2 , shows a process 200 of some embodiments of the early warning method according to the present disclosure. The information display method comprises the following steps:
[0033] Step 201, obtaining a target feature vector for characterizing order conditions.
[0034] In some embodiments, the execution subject of the early warning method (for example Figure 1 The server shown in the figure) can obtain the target feature vector through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0035] Optionally, the target feature vector is a 20-dimensional vector. The target feature vector is used to characterize personnel conditions, order details and other factors related to the order conditions. The urgency of order delivery can be described by the following formula:
[0036] f = exp(-c*t),
[0037] Where t is the remaining idle time of the order. Specifically, t can be the difference between the remaining time from the current time to the order fulfillment deadline and the riding time from the store to the road area where the order is located. C is the weight parameter. Specifically, c can be -ln(0.5) / 300. f is the urgency index.
[0038] Optionally, store orders can be divided into two categories: one is orders that end at the fulfillment time on the hour (in units of half an hour), recorded as first-category orders (category A orders), and the other is orders that end at non-hourly fulfillment times, recorded as second-category orders (category B orders). Orders can be placed in the confluence area of the store, which can be a special area in the store's warehouse, where shelves are placed to store orders with different numbers.
[0039] Specifically, the target feature vector may include the following dimensions. First dimension: the number of delivery personnel currently in the store. Second dimension: the number of delivery personnel who have left the store and hold undelivered orders (i.e., in delivery). Third dimension: the number of delivery personnel who have arrived at the store on the same day, are not in the store at this time, and do not hold undelivered orders at this time (i.e., are returning or resting). Fourth dimension: the number of Class A orders being picked at the current time. Fifth dimension: the sum of the urgency indexes of Class A orders being picked at the current time. Sixth dimension: the number of Class A orders to be assigned in the merging area at the current time. Seventh dimension: the sum of the urgency indexes of Class A orders to be assigned in the merging area at the current time. Eighth dimension: the number of Class B orders being picked at the current time. Ninth dimension: the sum of the urgency indexes of Class B orders being picked at the current time. Tenth dimension: the number of Class B orders to be assigned in the merging area at the current time. Eleventh dimension: the sum of the urgency indexes of Class B orders to be assigned in the merging area at the current time. Twelfth dimension: the sum of the time periods from the confirmation of the picking to the current time for Class A orders in all current pickings. Dimension 13: The sum of the time periods from confirmation of picking to the current time for all the A-type orders to be assigned. Dimension 14: The sum of the time periods from confirmation of picking to the current time for all the B-type orders in the current picking. Dimension 15: The sum of the time periods from confirmation of picking to the current time for all the B-type orders to be assigned. Among them, the time periods mentioned in dimensions 12 to 15 are based on ten minutes as a time period. Dimension 16: Temperature. If the current temperature is higher than 30 or lower than 5, the value of this dimension is 1, otherwise it is 0. Dimension 17: Climate. If it is raining or the wind force is greater than level 4, the value of this dimension is 1, otherwise it is 0. Dimension 18: If the day is free shipping on Wednesday, the value of this dimension is 1, otherwise it is 0. Dimension 19: If the day is Saturday or Sunday, the value of this dimension is 1, otherwise it is 0. Dimension 20: If the day is an important day (including big promotions and special holidays), the value of this dimension is 1, otherwise it is 0.
[0040] Specifically, the values of the first, second, third, fourth, sixth, eighth, tenth, twelfth, thirteenth, fourteenth, and fifteenth dimensions are processed using the following formula:
[0041] y=ln(1+x),
[0042] Among them, ln() represents logarithmic processing, x represents the original value, and y represents the processed value.
[0043] For each of the 20 dimensions, the value of the dimension is standardized using the following formula:
[0044] z=(x-mu) / std,
[0045] Among them, std represents the standard deviation of the dimension, mu represents the mean of the dimension, x represents the original value of the dimension, and z is the value of the dimension after standardization.
[0046] The above step of generating the target feature vector as an inventive point of the embodiment of the present disclosure solves the technical problem mentioned in the background technology: "Due to the large number of stores and the different operating conditions of each store, it is difficult to carry out unified and standardized monitoring and early warning for many stores in complex situations. More manual means are needed to realize that a dedicated person will issue an early warning for the backlog of store orders." The factors that lead to a low early warning level are often as follows: the store differentiation is large, for example, the number of employees, employee types, etc., the weather conditions on different dates are also different, the manual judgment error is large, and the common sense bias of the manager cannot accurately obtain the real early warning result. If the above factors are solved, the early warning level can be improved. In order to achieve this effect, the present disclosure constructs a target feature vector that characterizes the personnel situation, order details and other factors related to the order situation, and realizes the structured representation of the factors affecting the timely delivery of store orders. First, 20-dimensional structured data is constructed from the perspectives of store employee situation, order situation, weather and other factors. After that, the structured data is preprocessed by taking logarithms and standardization. This method takes into account the various factors that affect the delivery of fresh food to stores, while considering data within a certain time period and standardizing the data. It can be used for subsequent model early warning processing to improve the level of early warning.
[0047] Step 202: input the target feature vector into a pre-trained information prediction model to obtain warning information corresponding to the target feature vector.
[0048] In some embodiments, the above-mentioned execution entity inputs the target feature vector into a pre-trained information prediction model to obtain warning information corresponding to the target feature vector.
[0049] Optionally, the target feature vector includes 20 dimensions. The target feature vector is data representing the personnel situation, order details and other factors of the order one hour before the current moment.
[0050] Specifically, the pre-trained information prediction model can be a random forest. A random forest is a forest that is built in a random manner. The forest consists of many decision trees, and each decision tree in the random forest is not related to each other. After the sample is input into the random forest, each decision tree in the random forest structure makes a judgment based on the corresponding classification algorithm to obtain a classification result.
[0051] Specifically, the output of the pre-trained information prediction model is "1" indicating that there is an abnormal order backlog. The output of the pre-trained information prediction model is "0" indicating that there is no abnormal order backlog. In response to the output of the pre-trained information prediction model being "1" twice in a row, the warning information is set to "trigger warning".
[0052] The above-mentioned introduction of the pre-trained information prediction model as an inventive point of the embodiment of the present disclosure solves the technical problem 2 mentioned in the background technology: "The method based on manual warning has a certain lag, it is difficult to achieve early warning, and it is difficult to take special measures in advance to effectively prevent the occurrence of a large number of orders and the failure to fulfill the contract in time." The factors that lead to the low level of prediction and warning are often as follows: the accuracy of the manual judgment method is very low, and the timeliness of manual response to problems in order delivery is also poor, and warnings are often not issued in time. If the above factors are solved, the effect of improving the warning level can be achieved. In order to achieve this effect, the present disclosure introduces a pre-trained information prediction model for early warning. The pre-trained information prediction model uses the data representing the personnel situation, order details and other factors of the order one hour before the current moment as input content, and the output is "1" or "0". Among them, "1" indicates that the order backlog is abnormal, and "0" indicates that there is no abnormality. By adopting the method of predicting with data one hour before the current moment, the lag problem in the traditional method is solved. The pre-trained information prediction model is trained based on historical data over a period of time, which can improve the warning level.
[0053] Step 203: push the warning information to a target device with a display function, and control the target device to display the warning information.
[0054] In some embodiments, the above-mentioned execution subject pushes the warning information to a target device with a display function, and controls the target device to display the warning information. Among them, the target device with a display function can be a device that is communicatively connected to the above-mentioned execution subject, and can display according to the received warning information. For example, when the above-mentioned execution subject outputs a warning message showing that the current store order backlog is serious, the user can be guided to urgently deploy manpower to speed up delivery according to the displayed information, or to suspend order acceptance and other processing to avoid a more serious backlog, alleviate the store's order delivery pressure, and improve the level of fulfillment. This implementation method constructs a target feature vector by structured processing of various factors affecting order delivery and backlog. At the same time, the target feature vector is input into the information prediction model obtained by training based on historical data to obtain warning information. This method has high prediction accuracy and can be used to guide the delivery behavior of multiple stores, supporting stores to make adjustments, so as to achieve the purpose of improving production fulfillment efficiency.
[0055] Figure 2An embodiment provided has the following beneficial effects: obtaining a target feature vector for characterizing order conditions; inputting the target feature vector into a pre-trained information prediction model to obtain warning information corresponding to the target feature vector; pushing the warning information to a target device with a display function, and controlling the target device to display the warning information. This implementation constructs a target feature vector that characterizes personnel conditions, order details, and other factors related to the order conditions to solve the problem of untimely processing of orders in stores. An information prediction model is obtained by training based on a set of annotated historical target feature vectors, and the target feature vector is input into the information prediction model, which can quickly and accurately generate store order backlog warning information, improve the store's order processing efficiency, and enhance the level of order management.
[0056] Continue to refer Figure 3 , shows a process 300 of an embodiment of a training step of a pre-trained information prediction model according to the present disclosure. The training step may include the following steps:
[0057] Step 301, determining the network structure of the initial information prediction model and initializing the network parameters of the initial information prediction model.
[0058] In this embodiment, the execution subject of the training step can be the same as the execution subject of the early warning method (for example Figure 1 The terminal device shown in the figure is the same or different. If they are the same, the execution subject of the training step can store the trained network structure information and the parameter values of the network parameters locally after training the information prediction model. If they are different, the execution subject of the training step can send the trained network structure information and the parameter values of the network parameters to the execution subject of the early warning method after training the information prediction model.
[0059] In this embodiment, the execution subject of the training step may first determine the network structure of the initial information prediction model. For example, it is necessary to determine which layers the initial information prediction model includes, the connection order relationship between the layers, which neurons each layer includes, the weight and bias corresponding to each neuron, the activation function of each layer, etc. Optionally, the information prediction model may be a random forest.
[0060] Then, the execution subject of the training step can initialize the network parameters of the initial information prediction model. In practice, the various network parameters (e.g., weight parameters and bias parameters) of the initial information prediction model can be initialized with some different small random numbers. "Small random numbers" are used to ensure that the network will not enter a saturated state due to excessive weights, thereby causing training failure, and "different" is used to ensure that the network can learn normally.
[0061] Specifically, the initial prediction model can be a random forest. Random forest is a forest built in a random way. The forest consists of many decision trees. There is no correlation between each decision tree in the random forest. After the sample is input into the random forest, each decision tree in the random forest structure is judged based on the corresponding classification algorithm to obtain the classification result. Finally, the classification result with the most occurrences is determined as the output of the random forest. Specifically, the decision tree in the random forest can be generated by the following steps. There is only one node in the initial random forest. Step 1 is executed repeatedly to build a decision tree based on each node:
[0062] Step 1: Find the optimal feature splitting point for each node so that the sum of the squared errors of the data in the two divided regions is minimized.
[0063] After executing step 1, the splitting of each node divides the input space into two regions, and then repeats step 1 for each region until it can no longer be divided.
[0064] Step 302: Obtain a training sample set.
[0065] In this embodiment, the execution subject of the training step can obtain the training sample set locally or remotely from other terminal devices connected to the execution subject network. The training sample includes a sample feature vector set and a sample warning information set corresponding to the sample feature vector set.
[0066] Optionally, for each sample feature vector in the sample feature vector set, the element of the seventh dimension of the sample feature vector is determined as the first evaluation index to obtain the first evaluation index set. Specifically, the first evaluation index may be an urgency index that characterizes Class A orders.
[0067] For each sample feature vector in the sample feature vector set, the element of the 11th dimension of the sample feature vector is determined as the second evaluation index to obtain the second evaluation index set. Specifically, the second evaluation index may be an urgency index that characterizes Class B orders.
[0068] Based on the first evaluation indicator set, a first evaluation result is obtained. Optionally, a threshold is determined. Specifically, the threshold can be determined to be 5%. The initial number of categories is determined to be K, and specifically, K can be 2. The following step 1 is executed repeatedly to obtain the first evaluation result.
[0069] Step 1: clustering processing of the first evaluation indicator set.
[0070] In the first step, the first evaluation index set is input into a predetermined clustering model to obtain a first clustering result set combination. The first clustering result set combination includes a first number of clustering result sets. The predetermined clustering model can be a K-means clustering model (Kmeans). The Kmeans model pre-divides the data into K groups, randomly selects K objects as initial cluster centers, and then calculates the distance between each object and each seed cluster center, and assigns each object to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster. Each time a sample is assigned, the cluster center of the cluster is recalculated based on the existing objects in the cluster. This process will be repeated until a certain termination condition is met. The termination condition can be that no (or a minimum number) of objects are reassigned to different clusters, no (or a minimum number) of cluster centers change again, and the sum of squared errors is locally minimized.
[0071] In the second step, for each first clustering result set in the first clustering result set combination, the first evaluation index sum of the first clustering result set is determined to obtain an evaluation index sum set. The first evaluation index sum set is sorted in descending order of values to obtain a first evaluation index sum sequence. The first clustering result set corresponding to the first first evaluation index sum in the first evaluation index sum sequence is determined as the first target clustering result set.
[0072] The third step is to determine the first evaluation ratio according to the first target clustering result set. Optionally, the total number of sample feature vectors in the sample feature vector set is determined as the second number. The total number of first target clustering results in the first target clustering result set is determined as the third number. The quotient of the second number and the third number is determined as the first evaluation ratio.
[0073] In response to the first evaluation ratio being not less than the threshold, the K value is updated, specifically K=K+1. The first step is continued.
[0074] In response to the first evaluation ratio being less than the threshold, the first clustering result with the smallest value in the first clustering result set corresponding to the first target clustering result set is determined as the first evaluation result. The loop process of step one ends.
[0075] Based on the second evaluation indicator set, a second evaluation result is obtained. Optionally, a threshold is determined. Specifically, the threshold can be determined to be 5%. The initial number of categories is determined to be K, and specifically, K can be 2. The following step 2 is executed repeatedly to obtain the second evaluation result.
[0076] Step 2: clustering processing of the second evaluation indicator set.
[0077] In the first step, the second evaluation index set is input into a predetermined clustering model to obtain a second clustering result set combination, wherein the second clustering result set combination includes a first number of second clustering result sets. The predetermined clustering model may be a Kmeans model.
[0078] In the second step, for each second clustering result set in the second clustering result set combination, the second evaluation index sum of the second clustering result set is determined to obtain a second evaluation index sum set. The second evaluation index sum set is sorted in descending order of values to obtain a second evaluation index sum sequence. The second clustering result set corresponding to the first second evaluation index sum in the second evaluation index sum sequence is determined as the second target clustering result set.
[0079] The third step is to determine the second evaluation ratio according to the second target clustering result set. Optionally, the total number of sample feature vectors in the sample feature vector set is determined as the second number. The total number of second target clustering results in the second target clustering result set is determined as a fourth number. The quotient of the second number and the fourth number is determined as the second evaluation ratio.
[0080] In response to the second evaluation ratio being not less than the threshold, the K value is updated, specifically K=K+1. The first step is continued.
[0081] In response to the second evaluation ratio being less than the threshold, the second clustering result with the smallest value in the second clustering result set corresponding to the second target clustering result set is determined as the second evaluation result. The loop process of step 2 ends.
[0082] For each sample feature vector in the sample feature vector set, the element of the 7th dimension of the sample feature vector corresponding to the sample feature vector at one hour ahead of the current moment is determined as the target element of the 7th dimension, and the element of the 11th dimension of the sample feature vector corresponding to the sample feature vector at one hour ahead of the current moment is determined as the target element of the 11th dimension.
[0083] In response to the target 7th dimension element being smaller than the first evaluation result and the target 11th dimension element being smaller than the second evaluation result, the sample warning information corresponding to the sample feature vector is determined as first category information to obtain a sample warning information set.
[0084] In response to the target 7th dimension element being not less than the first evaluation result, or the target 11th dimension element being not less than the second evaluation result, the sample warning information corresponding to the sample feature vector is determined as the second type of information to obtain a sample warning information set.
[0085] The above-mentioned process of obtaining the training sample set is an inventive point of the embodiment of the present disclosure, which solves the technical problem 2 mentioned in the background technology, "the method based on manual warning has a certain lag, and it is difficult to achieve early warning, and it is difficult to take special measures in advance to effectively prevent the occurrence of a large number of orders and the situation of failure to fulfill the contract in time." The factors that lead to the low level of prediction and warning are often as follows: the accuracy of the manual judgment method is very low, and the timeliness of manual response to problems in order delivery is also poor, and warnings are often not issued in time. If the above factors are solved, the effect of improving the warning level can be achieved. In order to achieve this effect, the present disclosure introduces a pre-trained information prediction model for early warning. In order to train the information prediction model, it is necessary to construct a sample feature vector set and a sample warning information set corresponding to the sample feature vector set. The sample feature vector set can be extracted from historical data. Whether each sample feature vector in the sample feature vector set finally generates a warning signal is marked, which directly affects the accuracy of the generated sample warning information set. The present disclosure uses a clustering model to generate a first evaluation result and a second evaluation result, and uses the first evaluation result and the second evaluation result as threshold indicators for determining whether to generate a warning signal. This method can improve the accuracy of the sample warning information set corresponding to the sample feature vector set, thereby improving the training level of the information prediction model and ultimately improving the warning level.
[0086] Step 303, select a sample from the sample set, take the sample feature vector set included in the sample as input, take the corresponding pre-obtained sample warning information set corresponding to the sample feature vector set as expected output, and train the information prediction model.
[0087] In this embodiment, the execution subject of the training step can execute step 1 to train the prediction model.
[0088] Step 1: Information prediction model training process.
[0089] Firstly, the sample feature vector set of the selected samples is input into the initial information prediction model to obtain the warning information set of the selected samples.
[0090] Second, the selected sample warning information set is compared with the corresponding sample warning information set. Specifically, the difference between the selected sample warning information set and the corresponding sample warning information set can be first calculated using a preset loss function.
[0091] Third, determine whether the initial prediction model reaches a preset optimization goal based on the comparison result. In response to determining that the initial information prediction model reaches the optimization goal, the initial information prediction model is used as a pre-trained information prediction model that has completed training. Specifically, the preset optimization goal here may include but is not limited to at least one of the following: the training time exceeds the preset duration; the number of training times exceeds the preset number of times; the calculated difference is less than the preset difference threshold.
[0092] Step 304, in response to determining that the initial information prediction model has not been trained, adjusting relevant parameters in the initial information prediction model, reselecting samples from the sample set, using the adjusted initial information prediction model as the initial information prediction model, and performing the training step again.
[0093] In this embodiment, the execution subject of the training step responds to determining that the initial information prediction model has not been trained. Specifically, it can be in response to the initial information prediction model not reaching the optimization target, and adjusts the relevant parameters in the initial information prediction model. Specifically, various implementation methods can be used to adjust the network parameters of the initial information prediction model based on the difference between the warning information set of the selected sample and the corresponding sample warning information set. For example, the Adam, BP (Back Propagation) algorithm or the SGD (Stochastic Gradient Descent) algorithm can be used to adjust the network parameters of the initial information prediction model.
[0094] Optionally, the execution subject reselects a sample from the sample set, takes the sample feature vector set included in the sample as input, takes the corresponding pre-obtained sample warning information set corresponding to the sample feature vector set as the expected output, uses the adjusted initial information prediction model as the initial prediction model, executes the above step 1, and trains the information prediction model again.
[0095] In this embodiment, the execution subject of the training step determines the initial information prediction model obtained through training as the pre-trained information prediction model.
[0096] Figure 3 An embodiment provided has the following beneficial effects: an information prediction model is obtained by training based on a sample feature vector set and a sample warning information set corresponding to the sample feature vector set. The sample feature vectors are pre-processed by labeling, and the first evaluation result and the second evaluation result are determined by a clustering processing step, so as to achieve unified processing of multi-dimensional sample feature vectors, so that the sample feature vectors can characterize the factors affecting the delivery and accumulation of store orders under multiple stores, long time and complex conditions. The information prediction model can automatically provide store order backlog warning information, so that users can make timely adjustments to the delivery plan and improve the level of store order management.
[0097] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer system 400 suitable for implementing a server of an embodiment of the present disclosure. Figure 4 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0098] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403. Various programs and data required for the operation of the system 400 are also stored in the RAM 403. The CPU 401, the ROM 402 and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0099] The following components are connected to the I / O interface 405: a storage section 406 including a hard disk, etc.; and a communication section 407 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 407 performs communication processing via a network such as the Internet. A drive 408 is also connected to the I / O interface 405 as needed. A removable medium 409, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 408 as needed, so that a computer program read therefrom is installed into the storage section 406 as needed.
[0100] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 407, and / or installed from the removable medium 409. When the computer program is executed by the central processing unit (CPU) 401, the above functions defined in the method of the present disclosure are executed. It should be noted that the computer-readable medium described in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0101] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0102] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
Claims
1. An early warning method, comprising: Obtain a target feature vector for characterizing the order situation, wherein the target feature vector is a 20-dimensional vector, and the target feature vector is data characterizing the order personnel situation, order details and other factors one hour before the current time; Inputting the target feature vector into a pre-trained information prediction model to obtain warning information corresponding to the target feature vector; Pushing the warning information to a target device with a display function, and controlling the target device to display the warning information; The pre-trained information prediction model is obtained through the following model processing steps: Determining a network structure of an initial information prediction model and initializing network parameters of the initial information prediction model; Acquire a training sample set, wherein the training sample includes a sample feature vector set and a sample warning information set corresponding to the sample feature vector set; Select samples from the sample set and perform the following training steps: Inputting the sample feature vector set of the selected samples into the initial information prediction model to obtain the warning information set of the selected samples; Comparing the selected sample warning information set with the corresponding sample warning information set; Determining whether the initial information prediction model reaches a preset optimization goal according to the comparison result; In response to determining that the initial information prediction model achieves the optimization goal, using the initial information prediction model as the pre-trained information prediction model that has completed training; In response to determining that the initial information prediction model has not been trained, adjusting relevant parameters in the initial information prediction model, reselecting samples from the sample set, using the adjusted initial information prediction model as the initial information prediction model, and performing the training step again; The model processing step further includes: For each sample feature vector in the sample feature vector set, an element of the seventh dimension of the sample feature vector is determined as a first evaluation index to obtain a first evaluation index set, where the seventh dimension is the sum of the urgency indexes of the Class A orders to be allocated in the confluence zone at the current time, and the Class A orders are orders that end at the hour of the fulfillment time; For each sample feature vector in the sample feature vector set, an element of the 11th dimension of the sample feature vector is determined as a second evaluation index to obtain a second evaluation index set, where the 11th dimension is the sum of the urgency indexes of the Class B orders to be allocated in the current time confluence zone, and the Class B orders are orders whose performance time ends at a non-integer point; Based on the first evaluation indicator set, obtaining a first evaluation result; Based on the second evaluation indicator set, obtaining a second evaluation result; For each sample feature vector in the sample feature vector set, in response to an element of the 7th dimension of the sample feature vector being less than the first evaluation result and an element of the 11th dimension of the sample feature vector being less than the second evaluation result, determining the sample warning information corresponding to the sample feature vector as first category information, so as to obtain the sample warning information set; The obtaining of a first evaluation result based on the first evaluation indicator set includes: Determine the threshold value; Inputting the first evaluation indicator set into a predetermined clustering model to obtain a clustering result set combination, wherein the clustering result set combination includes a first number of clustering result sets; For each clustering result set in the clustering result set combination, determining the sum of evaluation indicators of the clustering result set to obtain a sum set of evaluation indicators; Sorting the evaluation index sum set according to the order of values from large to small to obtain an evaluation index sum sequence; Determine the clustering result set corresponding to the first evaluation indicator sum in the evaluation indicator sum sequence as the target clustering result set; Determining an evaluation ratio according to the target clustering result set; In response to the evaluation ratio being less than the threshold, the clustering result with the smallest value in the clustering result set corresponding to the target clustering result set is determined as the first evaluation result.
2. The method according to claim 1, wherein: The orders include first-category orders and second-category orders.
3. The method according to claim 2, wherein: The model processing step further includes: For each sample feature vector in the sample feature vector set, in response to the element of the 7th dimension of the sample feature vector being not less than the first evaluation result or the element of the 11th dimension of the sample feature vector being not less than the second evaluation result, the sample warning information corresponding to the sample feature vector is determined as the second category of information to obtain the sample warning information set.
4. The method according to claim 3, wherein: Determining the evaluation ratio according to the target clustering result set includes: Determine the total number of the sample feature vectors in the sample feature vector set as a second number; Determine the total number of target clustering results in the target clustering result set as a third number; A quotient of the second number and the third number is determined as the evaluation ratio.
5. A first terminal device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
6. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Delivery pressure prediction method and device
CN107092974A
Order allocation method and device
CN109426885A
Distribution duration prediction method and device, storage medium and electronic equipment
CN110119847A
Prediction method and device
CN110428086A
System, method, and software for short term forecasting using predictive indicators
US20050256760A1
