Container prediction method, electronic equipment and storage medium
By combining current and historical waybill data, utilizing loading attribute parameters and multiple prediction models, the subjectivity problem in container quantity prediction is solved, achieving accurate container quantity prediction and supporting large-scale applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SF TECH CO LTD
- Filing Date
- 2026-01-07
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, the prediction of container numbers relies on human experience, which is highly subjective, difficult to replicate on a large scale, and results in large prediction errors.
By acquiring current and historical waybill data for pending transshipment orders, and utilizing loading attribute parameters, prediction models, and optimization models, combined with classification coefficients and scaling coefficients, multiple prediction methods are integrated to determine the target number of containers required for the pending transshipment orders.
It enables accurate prediction of container numbers, reduces errors caused by human subjectivity, supports large-scale applications, and improves the accuracy and reliability of predictions.
Smart Images

Figure CN122047591A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of logistics technology, and in particular to a container prediction method, electronic device, and storage medium. Background Technology
[0002] Logistics distribution network planning is a fundamental issue in the field of supply chain management research. The purpose of enterprise logistics distribution network planning is to improve its logistics distribution service level to better meet customer needs. One of the most critical indicators for measuring logistics distribution level is timeliness; therefore, improving timeliness is a key area that many logistics companies continuously research and invest in.
[0003] To improve timeliness, logistics companies are vigorously promoting containerization, which has increased the efficiency of waybill processing and reduced the pressure on last-mile waybill sorting. However, this has also brought new challenges. Typically, the number of containers for waybills is predicted manually based on experience, which is highly subjective and difficult to scale up. Summary of the Invention
[0004] This application provides a container prediction method, electronic device, and storage medium to solve the problem that predictions based on human experience in the prior art are highly subjective and difficult to scale up.
[0005] According to a first aspect of the embodiments of this application, a method for predicting containers is provided, comprising: Obtain the current waybill data of the pending transshipment orders. The current waybill data includes the loading attribute parameters of each pending transshipment order. The loading attribute parameters are parameters that affect the container space of the pending transshipment orders. Based on the loading attribute parameters, determine the first predicted number of containers required to load the pending transfer order; Obtain a second predicted number of containers required to load the pending transshipment order, determined based on historical waybill data from historical transshipment orders. Based on the number of containers already loaded on the pending transfer order, a third predicted number of containers required to load the pending transfer order is determined. Based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, the target number of containers required to load the transshipment order is determined.
[0006] Optionally, determining the first predicted number of containers required to load the transshipment order based on the loading attribute parameters includes: Based on the loading attribute parameters, the transit orders to be processed are classified into preset categories, and the number of transit orders to be processed in each category is determined. Obtain the category coefficient and scaling factor corresponding to each of the aforementioned categories. The category coefficient is used to indicate the category weight of each category, and the scaling factor is used to indicate the proportional relationship between the actual number of containers and the predicted number of containers. The first predicted quantity is determined based on the number of waybills, the category coefficient, and the scaling factor.
[0007] Optionally, before obtaining the category coefficients and scaling factors corresponding to each of the classification categories, the method further includes: Obtain sample waybill data of the sample flow transfer order, the sample waybill data including the loading attribute parameters of the sample flow transfer order, the sample container where the sample flow transfer order is located, and the number of sample containers; The classification category corresponding to each of the classified flow transfer orders is determined based on the loading attribute parameters. Determine the number of samples for each classification category in each of the sample containers; Obtain the range of values for the initial category coefficients of each of the aforementioned categories; An optimization model is obtained based on the number of sample containers, the number of samples, and the initial class coefficients, wherein the optimization model is used to determine the initial class coefficients; Within the range of values, the initial category coefficients are adjusted to determine the initial category coefficient that minimizes the output value of the optimization model as the category coefficient corresponding to the classification category.
[0008] Optionally, after obtaining the current waybill data for the pending transshipment order, the following may also be included: If the volume of the pending transshipment order does not exist in the current waybill data, the text features of the current waybill data are extracted based on a pre-trained prediction model. The text features include the attribute category features and the contents of the consigned items of the pending transshipment order. The volume of the pending transshipment order is predicted based on the text features to obtain the waybill volume. The volume of the waybill is determined to be the loading attribute parameter.
[0009] Optionally, extract the text features of the current waybill data, including: Based on the current waybill data, determine the target attribute category to which the pending transshipment waybill belongs in the preset attribute categories; The attribute category characteristics of the transshipment order to be transferred are determined based on the target attribute category; The consignment details in the current waybill data are matched with a preset keyword set to determine the target keyword; The characteristics of the contents of the consigned items in the transit order are determined based on the target keywords; The attribute category features and the content features of the entrusted item are determined as the text features.
[0010] Optionally, the historical waybill data includes the historical container quantity. Determining the second predicted quantity based on the historical waybill data of historical transit waybills includes: Obtain the correspondence between the circulation time and the number of containers, wherein the number of containers is determined based on the historical number of containers in the historical waybill data within the circulation time; The number of containers corresponding to the target turnover time is determined from the correspondence as the second predicted quantity, and the target turnover time is the same as the turnover time of the transfer order to be transferred in the correspondence.
[0011] Optionally, based on the number of containers already loaded on the pending transfer order, a third predicted number of containers required to load the pending transfer order is determined, including: Obtain the completion time of the transfer order to be transferred; When determining the preset time before the end of the transfer, the number of containers already loaded on the transfer order is calculated. The sum of the number of containers and the preset number of containers is determined to be the third predicted number.
[0012] Optionally, based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, the target number of containers required to load the transshipment order is determined, including: Determine the allocation coefficients for the first prediction quantity, the second prediction quantity, and the third prediction quantity; The target quantity is obtained by weighted summation of the allocation coefficient, the first predicted quantity, the second predicted quantity, and the third predicted quantity.
[0013] Optionally, after determining the target number of containers required to load the transshipment order based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, the method further includes: Obtain the actual number of containers after the pending transfer order has been loaded; Based on the actual number of containers and the target number, determine the monitoring metrics; The circulation results of the pending transfer orders are monitored based on the aforementioned monitoring indicators.
[0014] According to a second aspect of the embodiments of this application, a container prediction apparatus is provided, comprising: The first acquisition unit is used to acquire the current waybill data of the transshipment orders to be transferred. The current waybill data includes the loading attribute parameters of each transshipment order to be transferred. The loading attribute parameters are parameters that affect the container space of the transshipment orders to be transferred. The first determining unit is used to determine the first predicted number of containers required to load the transshipment order based on the loading attribute parameters. The second acquisition unit is used to acquire a second predicted number of containers required to load the pending transshipment order, determined based on historical waybill data of historical transshipment orders. The second determining unit is used to determine a third predicted number of containers required to load the pending transfer order based on the number of containers already loaded on the pending transfer order. The third determining unit is used to determine the target number of containers required to load the transshipment order based on the first predicted quantity, the second predicted quantity, and the third predicted quantity.
[0015] According to a third aspect of the embodiments of this application, an electronic device is provided, including a memory and a processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the container prediction method as described in the first aspect by running a program in the memory.
[0016] According to a fourth aspect of the embodiments of this application, a storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the container prediction method as described in the first aspect.
[0017] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including computer program instructions that, when executed by a processor, cause the processor to perform a container prediction method as described in the first aspect.
[0018] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application obtains the current waybill data of the pending transshipment orders, the current waybill data including the loading attribute parameters of each pending transshipment order, the loading attribute parameters being parameters that affect the container space of the pending transshipment order; determines a first predicted number of containers required to load the pending transshipment order based on the loading attribute parameters; obtains a second predicted number of containers required to load the pending transshipment order based on historical waybill data of historical transshipment orders; determines a third predicted number of containers required to load the pending transshipment order based on the number of containers already loaded on the pending transshipment order; and determines a target number of containers required to load the pending transshipment order based on the first predicted number, the second predicted number, and the third predicted number. In this way, there is no need to manually predict the number of containers. Instead, the number of containers required for the pending transfer order and historical transfer orders are predicted using different prediction methods. The predicted quantities are then merged and output, so that the target quantity can be closer to the actual needs of the pending transfer order. The prediction method for the container can be configured in the corresponding scenario, which can achieve large-scale replication and avoid the errors caused by the strong subjectivity of human determination. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0020] Figure 1 A flowchart of a container prediction method provided for one embodiment of this application.
[0021] Figure 2 A flowchart of a container prediction method is provided for another embodiment of this application.
[0022] Figure 3 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] Exemplary Implementation Environment The container prediction method according to embodiments of this application can be executed by electronic devices such as terminal devices or servers. Terminal devices can be user equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. Servers can be independent physical servers, server clusters composed of multiple physical servers, or cloud servers capable of cloud computing. This method can be implemented by a processor calling computer-readable program instructions stored in memory. This application uses the execution of the container prediction method by a server as an example for explanation, but does not limit it.
[0025] Exemplary methods Before providing a detailed description of the embodiments of the present invention, the relevant background information involved in the embodiments of the present invention will be further explained.
[0026] Transit sites: Transit sites are generally divided into three types: Level 3, Level 2, and Level 1, with the coverage area increasing in that order. Goods that cannot be directly shipped from lower-level sites will be collected and shipped directly from higher-level sites. Among them, Level 3 sites are used for small-volume delivery to network points.
[0027] Outlets: Terminals are nodes for receiving and sending packages. The application scenario of this application is mainly the route planning of transit centers to outlets, that is, the flow of goods from transit centers to outlets, sometimes also referred to as flow direction.
[0028] Schedule: Fixed-time transportation / transfer batches, divided into consolidation / distribution schedules, used to determine the latest departure and arrival times. The schedule to which the waybill arrives is assigned based on the time it reaches its destination, thereby measuring the arrival timeliness of the waybill.
[0029] Container: The vessel that carries the waybill.
[0030] Cage: A cage-like container, such as a 1.6m³ iron cage. The waybill is placed in the cage, and the shipment is made according to the number of cages.
[0031] Waybill data: A collection of data that records key information throughout the entire transportation process of a waybill, and is the core voucher data for logistics circulation.
[0032] Please see Figure 1 In one exemplary embodiment, a method for predicting containers is provided, comprising: Step 101: Obtain the current waybill data of the transit orders to be transferred. The current waybill data includes the loading attribute parameters of each transit order to be transferred. The loading attribute parameters are the parameters of the transit orders to be transferred that affect the container space.
[0033] In some embodiments, the transit order to be processed can be a waybill for a specific shift arriving at the transit hub. The transit order to be processed can include multiple waybills, each carrying its own current waybill data.
[0034] Current waybill data may include the packing site / network point, unpacking site / network point, waybill number, sender city code, delivery city code, waybill volume, waybill weight, consignment class, consignment name, whether it is a small item, time limit type, monthly settlement account, etc.
[0035] The loading attribute parameters can be, but are not limited to, waybill volume and weight. Typically, waybill volume and weight can be filled in by staff during pickup or identified by AI cameras during sorting at the site. However, in reality, the number of waybills with loading attribute parameters is often small. For waybills whose current data does not include these parameters, the loading attribute parameters can be predicted based on the current waybill data to obtain the waybill volume.
[0036] For example, the specific content of the current waybill data can be seen in Table 1 below.
[0037] Table 1 In an optional embodiment, after obtaining the current waybill data of the transshipment order to be transferred, the method further includes: If the volume of the pending transshipment order does not exist in the current waybill data, the text features of the current waybill data are extracted based on a pre-trained prediction model. The text features include the attribute category features and the contents of the consigned items of the pending transshipment order. The volume of the pending transshipment order is predicted based on the text features to obtain the waybill volume. The volume of the waybill is determined to be the loading attribute parameter.
[0038] In some embodiments, text features are extracted from the current waybill data using a pre-trained prediction model. To enable the model to recognize the current waybill data, the current waybill data can be vectorized into text features. The prediction model then uses the extracted text features to predict the volume, thereby obtaining the waybill volume.
[0039] Furthermore, the training process of the prediction model can use historical waybill data as training samples, including the waybill volume. The `train_test_split` method is used to divide the training samples into a validation set and a training set in a 2:8 ratio. An Extreme Gradient Boosting (XGBoost) regression model is used as the initial model for the prediction model, directly calling the XGBoost model library in Python to train the model. After the model training is complete, the accuracy of the trained model's predictions is verified using the validation set. If the accuracy is higher than a preset value (e.g., 70%), the trained model is determined to be the prediction model; otherwise, the model is trained again until the accuracy reaches the preset value.
[0040] In an optional embodiment, extracting the text features of the current waybill data includes: Based on the current waybill data, determine the target attribute category to which the pending transshipment waybill belongs in the preset attribute categories; The attribute category characteristics of the transshipment order to be transferred are determined based on the target attribute category; The consignment details in the current waybill data are matched with a preset keyword set to determine the target keyword; The characteristics of the contents of the consigned items in the transit order are determined based on the target keywords; The attribute category features and the content features of the entrusted item are determined as the text features.
[0041] In some embodiments, the text features of the current waybill data can be preprocessed before extraction to remove interference. The preprocessing process includes processing the consignment content field (e.g., deduplication of Chinese characters, removal of parentheses, punctuation marks, English text, etc.), and deleting rows with empty content.
[0042] The preprocessed current waybill data determines its target attribute category based on preset attribute categories, which include product type classification, timeliness type classification, monthly settlement account classification, sender city code classification, delivery city code classification, consignment level classification, waybill volume classification, etc.
[0043] For example, the target attribute categories for the waybills to be processed can be determined as follows: Waybills are categorized and summarized by product type; those with fewer than 1000 items or null (i.e., no value) are grouped into one category, and the remaining product codes are grouped into another. Waybills are categorized and summarized by time-sensitivity type; those with fewer than 1000 items or null are grouped into one category, and the remaining time-sensitivity types are grouped into another. Waybills are categorized and summarized by monthly settlement account; those with fewer than 1000 items or null are grouped into one category, and the remaining monthly settlement accounts are grouped into another. Waybills are categorized and summarized by sender city code; those with fewer than 1000 items or null are grouped into one category, and the remaining sender city codes are grouped into another. Waybills are categorized and summarized by delivery city code; those with fewer than 1000 items or null are grouped into one category, and the remaining delivery city codes are grouped into another. Waybills are categorized and summarized by first-level consignment, second-level consignment, and third-level consignment. Weight is input as a continuous variable; null or 0 values are discarded. Whether it is a small item is used as a 0,1 feature.
[0044] Furthermore, the volume of the waybill can be discretized into a 200cm³ dimension to reduce the variation in the volume of the waybill.
[0045] After performing the above category statistics, since the content of the above preset attribute categories (such as product type, timeliness type, and sending city) is enumerable, these categories can be directly encoded and converted into vector data, i.e. attribute category features, through the StringIndexer feature processing function.
[0046] The StringIndexer feature processing function converts string-type categorical features (discrete features) into numerical indices (non-negative integers), solving the problem that machine learning algorithms cannot directly process string features.
[0047] Furthermore, keywords can be extracted from the contents of the consignment, and invalid terms such as "goods" and "items" can be deleted. The extracted keywords are then matched against a pre-defined keyword set. In practical applications, it has been found that due to the large variety of types and names of consignment contents, they are usually impossible to enumerate. Therefore, they can be first transformed into an enumerable form. For example, based on the consignment contents in historical waybill data, the frequency of each character in the consignment contents can be counted in the waybill. A pre-defined number (e.g., 500) of high-frequency characters can cover 90% of the waybills. Therefore, the first 500 high-frequency characters are used as a 500-dimensional vector, and 1... The contents of the entrusted item of 1 are transformed into 1 A 500-dimensional vector is used to vectorize the contents of the entrusted item, thereby obtaining the characteristics of the entrusted item's contents.
[0048] Then, the attribute category features and the contents of the entrusted item are merged to obtain text features, thus the feature data input to the model is N. Data with 510 dimensions and 510 columns of numerical features.
[0049] After the prediction model is trained, it can be saved online in .pkl format. When predicting the quantity of items in real time, the waybill data without volume is input, the waybill text data is converted into features, the prediction model is called to directly predict the volume, and the predicted volume data is then restored to cm³.
[0050] Step 102: Determine the first predicted number of containers required to load the pending transfer order based on the loading attribute parameters.
[0051] In some embodiments, the loading attribute parameters include waybill volume and waybill weight. A waybill-to-container model can be pre-configured, which can convert the number of waybills into the number of containers. Based on the loading attribute parameters, the number of containers is predicted to obtain a first predicted number.
[0052] In an optional embodiment, determining a first predicted number of containers required to load the transshipment order based on the loading attribute parameters includes: Based on the loading attribute parameters, the transit orders to be processed are classified into preset categories, and the number of transit orders to be processed in each category is determined. Obtain the category coefficient and scaling factor corresponding to each of the aforementioned categories. The category coefficient is used to indicate the category weight of each category, and the scaling factor is used to indicate the proportional relationship between the actual number of containers and the predicted number of containers. The first predicted quantity is determined based on the number of waybills, the category coefficient, and the scaling factor.
[0053] In some embodiments, waybills can be divided into multiple categories according to loading attribute parameters, for example, into 16 categories as shown in Table 2 below. The acquired transshipment waybills can be classified into corresponding categories according to preset classification categories, thereby obtaining the number of waybills to be transshipped in each category. ,... Among them, the category coefficient ( ) and scaling factor It can be obtained in advance. To improve the accuracy of prediction, different category coefficients can be configured for different circulation scenarios. When classifying, the transshipment orders to be circulated can be filtered according to the circulation scenario to obtain the transshipment orders to be circulated in each circulation scenario. Then, the transshipment orders to be circulated in each circulation scenario are classified to obtain the number of orders in each category in each circulation scenario.
[0054] Table 2 The circulation scenarios can be divided according to the site, shift, outlet, and cage construction direction in the current waybill data.
[0055] The first predicted quantity can be calculated using the following formula: First prediction quantity A1 = ; Where X represents the total number of circulation scenarios, K represents the total number of categories, and i represents the category number. Represents the category coefficient. This indicates the number of waybills.
[0056] In an optional embodiment, before obtaining the category coefficients and scaling coefficients corresponding to each of the classification categories, the method further includes: Obtain sample waybill data of the sample flow transfer order, the sample waybill data including the loading attribute parameters of the sample flow transfer order, the sample container where the sample flow transfer order is located, and the number of sample containers; The classification category corresponding to each of the classified flow transfer orders is determined based on the loading attribute parameters. Determine the number of samples for each classification category in each of the sample containers; Obtain the range of values for the initial category coefficients of each of the aforementioned categories; An optimization model is obtained based on the number of sample containers, the number of samples, and the initial class coefficients, wherein the optimization model is used to determine the initial class coefficients; Within the range of values, the initial category coefficients are adjusted to determine the initial category coefficient that minimizes the output value of the optimization model as the category coefficient corresponding to the classification category.
[0057] In some embodiments, considering the different characteristics of the quantity of goods in dimensions such as site, shift, network point, and cage construction flow direction, historical waybill data and container data with high saturation over a period of time (80≤number of waybills≤140) can be used to establish an operations optimization model. This model calculates the category coefficient and scaling coefficient for each flow scenario (including site, shift, network point, and cage construction flow direction). Each waybill is categorized into 16 types based on volume and weight. Using a single cage construction flow direction as the smallest granularity, the fitting coefficients for the 16 types of waybills are calculated. It is assumed that the number of waybills of the 16 types in a container is as follows: ,... Therefore, the mathematical model that needs to be solved is approximately: +... The operations research optimization model formed by N containers is as follows: The following model is solved using the dimensions of a single cage construction direction, a single network point, and a single site: M= ; Where N represents the number of sample containers, and K represents the total number of classification categories. This represents the constraint constant. For each initial classification coefficient... Constraints can be set on it to determine its decision boundary.
[0058] Specifically, the constraint can be to set an adjustment range (lower bound) for each classification coefficient. The upper bound), the difference in classification coefficients between two adjacent categories should be greater than a preset threshold ( ), .
[0059] For example, the values of each classification coefficient can be found in Table 3 below.
[0060] Table 3 The initial category coefficients are selected from the range provided in Table 3 and substituted into the optimization model. By adjusting the initial category coefficients to minimize the output value M of the optimization model, the category coefficients corresponding to each category are determined. It is understood that the category coefficients used for the same category are consistent across different circulation scenarios.
[0061] The optimization model described above only addresses the prediction of the number of containers with high saturation. However, in actual field operations, a large number of containers with low saturation will appear, leading to a significant deviation between the predicted number of containers and the final actual number of containers. Therefore, a scaling factor parameter needs to be added to measure the difference between the number of containers calculated by the model and the actual number of containers. Scaling factor data for the network flow dimension is established, and the calculation logic for the scaling factor is as follows: ; in, The number of containers in the actual flow direction dimension. The number of containers is calculated using category coefficients. This is the scaling factor.
[0062] The input waybills are divided into 16 categories based on volume and weight. The classification coefficients are then used to obtain the number of containers in each circulation scenario. The decimal part greater than or equal to 0.12 is rounded up to obtain the number of containers in each circulation scenario. The sum of these values is then multiplied by a scaling factor to obtain the first predicted quantity.
[0063] Step 103: Obtain the second predicted number of containers required to load the pending transshipment order, determined based on historical waybill data.
[0064] In some embodiments, a second predicted quantity determined using historical waybill data from historical transit transshipments is incorporated into the predicted target quantity. This allows historical data to be used as a reference for current data, thereby improving the accuracy of the prediction results. The second predicted quantity can be determined using a median model, which can determine the second predicted quantity required for loading the transit transshipment to be loaded this time based on historical waybill data from historical transit transshipments.
[0065] In one optional embodiment, the historical waybill data includes historical container quantities. Determining a second predicted quantity based on the historical waybill data of historical transit waybills includes: Obtain the correspondence between the circulation time and the number of containers, wherein the number of containers is determined based on the historical number of containers in the historical waybill data within the circulation time; The number of containers corresponding to the target turnover time is determined from the correspondence as the second predicted quantity, and the target turnover time is the same as the turnover time of the transfer order to be transferred in the correspondence.
[0066] In some embodiments, the number of historical containers can be counted according to the circulation time. The median or average number of containers lost within the circulation time can be used as the number of containers corresponding to that circulation time, thereby establishing a correspondence between circulation time and container number. The circulation time can be calculated in days, with Sunday and Monday as one group, and Tuesday to Saturday as another group, and the corresponding number of containers is calculated for each group.
[0067] For the target transit time of the pending transfer order, the number of containers corresponding to the target transit time is determined from the correspondence, and the second predicted quantity is obtained.
[0068] Furthermore, to improve the accuracy of the second predicted quantity, a corresponding relationship can be configured for each flow scenario according to the different flow scenarios. Thus, the second predicted quantity can be the sum of the container quantities determined for each flow scenario.
[0069] Step 104: Based on the number of containers already loaded on the pending transfer order, determine the third predicted number of containers required to load the pending transfer order.
[0070] In some embodiments, the third predicted quantity can be predicted by a pre-set bottom cage model, which can determine the third predicted quantity of containers required to load the transfer order based on the number of containers already loaded on the transfer order.
[0071] In one optional embodiment, a third predicted number of containers required to load the pending transfer order is determined based on the number of containers already loaded on the pending transfer order, including: Obtain the completion time of the transfer order to be transferred; When determining the preset time before the end of the transfer, the number of containers already loaded on the transfer order is calculated. The sum of the number of containers and the preset number of containers is determined to be the third predicted number.
[0072] In some embodiments, during the real-time prediction process of the model, the status of containers in the actual business scenario includes issued, built, and under construction. Issued and built containers are facts. The prediction is based on the number of containers under construction. Within a preset time (e.g., 2 hours) before the end of the flow (e.g., the end of the shift), the number of containers under construction is increased by 1-2 as a third prediction quantity.
[0073] Step 105: Based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, determine the target number of containers required to load the transfer order.
[0074] In some embodiments, the target quantity is determined by referring to the first prediction quantity, the second prediction quantity, and the third prediction quantity determined by the three prediction methods. This reduces the limitations of a single method, improves the reliability and robustness of prediction, and provides more comprehensive support for subsequent decision-making.
[0075] In an optional embodiment, determining the target number of containers required to load the transshipment order based on the first predicted quantity, the second predicted quantity, and the third predicted quantity includes: Determine the allocation coefficients for the first prediction quantity, the second prediction quantity, and the third prediction quantity; The target quantity is obtained by weighted summation of the allocation coefficient, the first predicted quantity, the second predicted quantity, and the third predicted quantity.
[0076] In some embodiments, the allocation coefficients for the first predicted quantity, the second predicted quantity, and the third predicted quantity can be set by professionals based on practical experience. By weighted summing of the three, the target quantity is obtained, which more closely reflects the actual needs of the transshipment order. The prediction method for the container can be configured in the corresponding scenario, enabling scalable replication and avoiding errors caused by the strong subjectivity of human determination.
[0077] Furthermore, the weights of the first, second, and third predicted quantities can be determined as follows: Taking today's transit orders as an example, the weights can be determined using the first, second, and third predicted quantities obtained yesterday using the three methods, along with the actual number of containers. The errors between the first, second, and third predicted quantities obtained yesterday and the actual number of containers are then calculated. , The weights of today's first predicted quantity, second predicted quantity, and third predicted quantity are calculated using three errors, respectively.
[0078] After obtaining the above errors, the absolute error of each prediction method is calculated based on the above three errors. Specifically, the following method can be used: like The absolute error of this prediction method is... =0, otherwise = Similarly, if The absolute error of this prediction method is... =0, otherwise = ;like The absolute error of this prediction method is... =0, otherwise = .
[0079] Furthermore, after determining the absolute error using the above method, the allocation coefficient for the first predicted quantity is determined. The allocation coefficient for the second predicted quantity The allocation coefficient of the third predicted quantity .
[0080] Understandably, after loading the transfer orders into containers each day, the data can be processed based on the actual number of containers and the errors between the first, second, and third predicted quantities obtained from each prediction method.
[0081] For example, in today's results, if the median version error is greater than that of the component-to-container model in the first-tier scenario, then the median version will be added to the blacklist for tomorrow's flow prediction. If, in today's data, the predicted item volume is learned from historical information, the splitting and merging of network points will cause the predicted item volume of this network point to deviate. Therefore, when network point flow splitting / merging occurs, the item-to-container model result will be added to the blacklist. If, based on today's results, a certain version's flow error reaches 10 or more, then that version will be added to the blacklist.
[0082] The aforementioned addition to the blacklist refers to the number of containers obtained by discarding the prediction method for adding them to the blacklist.
[0083] In an optional embodiment, after determining the target number of containers required to load the transshipment order based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, the method further includes: Obtain the actual number of containers after the pending transfer order has been loaded; Based on the actual number of containers and the target number, determine the monitoring metrics; The circulation results of the pending transfer orders are monitored based on the aforementioned monitoring indicators.
[0084] In some embodiments, the monitoring indicators may include, but are not limited to, extreme value rate, compliance rate, accuracy rate, number of loads, and quantity error.
[0085] Specifically, if the absolute value of the error between the target number and the actual number of containers is greater than or equal to 4, it is considered to have a significant impact on business operations; therefore, an extreme value rate is set for focused monitoring. If the absolute value of the error between the target number and the actual number of containers in a certain flow direction (i.e., flow scenario) is greater than or equal to 1, then the flow direction achieves ±1, and the number of flow directions achieved by a site divided by the total number of flow directions in that site is taken as the ±1 achievement rate for that site. If the absolute value of the error between the target number and the actual number of containers in a certain flow direction is greater than or equal to 2, then the flow direction achieves ±2, and the number of flow directions achieved by a site divided by the total number of flow directions in that site is taken as the ±2 achievement rate for that site. The absolute value of the error between the target number and the actual number of containers divided by the actual number of containers is taken as the prediction accuracy rate for that site. If the number of waybills in a container is less than 10 (defined according to actual business), it can be identified as a low-load container. The more low-load containers a site has in total, the worse the operational standardization of that site is. If a container contains more than 200 waybills (the number can be customized based on actual business needs), it can be identified as a high-load container. The more high-load containers a site has in total, the worse the site's operational standardization is.
[0086] The difference between the target quantity and the actual number of containers in a certain flow dimension is used to measure the accuracy of the predicted quantity data (i.e., the target quantity), and further measures the degree of impact of the deviation in quantity on the predicted number of containers.
[0087] The calculated second number of predictions is compared with the real container data, and the error value can be used to measure whether the class coefficients and scaling coefficients used in optimizing the model training are reasonable.
[0088] By outputting these predicted target quantities to downstream operations, the business can pre-arrange vehicle task resources, avoiding cost increases from temporary resource additions and reducing the risk of product delivery delays. In terms of technological innovation, the XGBoost model and feature engineering techniques that vectorize high-frequency text features are used to predict missing waybill volume data. Furthermore, a novel technical solution is proposed to transform item quantity into container quantity through classification and fitting category coefficients. This solution significantly improves prediction accuracy and target achievement rate in practical business applications.
[0089] In one specific embodiment, participants Figure 2In real-time tasks, based on real-time predicted waybill data (i.e., current waybill data), waybills without volume are processed by a volume prediction model to predict volume. The next step involves categorizing all current waybill data into 16 classes based on location, shift, direction, and K25. The class coefficients trained on the component-to-container model are matched, summed along the K25 dimension, and then summed again along the direction dimension to obtain the first version of the predicted container quantity for that direction. Based on historical container quantities for that direction, the median of containers for the same period is calculated weekly as the second prediction result for that direction. Based on real-time information on existing and under-construction containers, the number of containers not yet built for a shift is estimated, resulting in the third prediction result for that direction. Based on these three container-dimensional prediction results, the fusion model selects one result or a weighted fusion output according to the fusion strategy and sends it downstream, enabling post-processing monitoring of model performance metrics.
[0090] Exemplary device Accordingly, embodiments of this application also provide a container prediction device, including: The first acquisition unit is used to acquire the current waybill data of the transshipment orders to be transferred. The current waybill data includes the loading attribute parameters of each transshipment order to be transferred. The loading attribute parameters are parameters that affect the container space of the transshipment orders to be transferred. The first determining unit is used to determine the first predicted number of containers required to load the transshipment order based on the loading attribute parameters. The second acquisition unit is used to acquire a second predicted number of containers required to load the pending transshipment order, determined based on historical waybill data of historical transshipment orders. The second determining unit is used to determine a third predicted number of containers required to load the pending transfer order based on the number of containers already loaded on the pending transfer order. The third determining unit is used to determine the target number of containers required to load the transshipment order based on the first predicted quantity, the second predicted quantity, and the third predicted quantity.
[0091] The container prediction device provided in this embodiment belongs to the same concept as the container prediction method provided in the above embodiments of this application. It can execute the method provided in any of the above embodiments of this application and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the specific processing content of the container prediction method provided in the above embodiments of this application, and will not be repeated here.
[0092] The functions implemented by each unit in the above-mentioned container prediction device can be implemented by the same or different processors, and this application embodiment does not limit this.
[0093] It should be understood that each unit in the above device can be implemented by a processor calling software. For example, the device includes a processor connected to a memory containing instructions. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of each unit in the device. The processor can be a general-purpose processor, such as a CPU or microprocessor, and the memory can be internal or external to the device. Alternatively, the units in the device can be implemented as hardware circuits. By designing the hardware circuits, some or all of the unit functions can be implemented. The hardware circuits can be understood as one or more processors. For example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are implemented by designing the logical relationships between the components within the circuit. In another implementation, the hardware circuit can be implemented using a PLD, such as an FPGA, which can include a large number of logic gates. The connection relationships between the logic gates are configured through configuration files to implement the functions of some or all of the above units. All units in the above device can be implemented entirely by a processor calling software, entirely by hardware circuits, or partially by a processor calling software with the remaining parts implemented by hardware circuits.
[0094] In this application embodiment, a processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction reading and execution capabilities, such as a CPU, microprocessor, GPU, or DSP. In another implementation, the processor can implement certain functions through the logical relationships of hardware circuits. These logical relationships are fixed or reconfigurable. For example, the processor may be a hardware circuit implemented as an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the processor loading instructions to implement the functions of some or all of the above units. Furthermore, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as an NPU, TPU, or DPU.
[0095] As can be seen, each unit in the above device can be one or more processors (or processing circuits) configured to implement the above methods, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.
[0096] Furthermore, the units in the above devices can be integrated in whole or in part, or they can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a System-on-Chip (SoC). The SoC may include at least one processor for implementing any of the above methods or implementing the functions of the units in the device. The at least one processor may be of different types, such as CPU and FPGA, CPU and artificial intelligence processor, CPU and GPU, etc.
[0097] Exemplary electronic devices Another embodiment of this application also provides an electronic device, see [link to relevant documentation] Figure 3 As shown, the device includes: Memory 300 and processor 310; The memory 300 is connected to the processor 310 and is used to store programs; The processor 310 is configured to implement the container prediction method disclosed in any of the above embodiments by running the program stored in the memory 300.
[0098] Specifically, the prediction device of the above-mentioned container may also include: a bus, a communication interface 320, an input device 330, and an output device 340.
[0099] The processor 310, memory 300, communication interface 320, input device 330, and output device 340 are interconnected via a bus. Among them: A bus can include a pathway for transmitting information between various components of a computer system.
[0100] The processor 310 can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0101] Processor 310 may include a main processor, as well as a baseband chip, modem, etc.
[0102] The memory 300 stores a program that executes the technical solution of this invention, and may also store an operating system and other key business functions. Specifically, the program may include program code, which includes computer operation instructions. More specifically, the memory 300 may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, flash memory, etc.
[0103] Input device 330 may include a device for receiving user input data and information, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer, or gravity sensor.
[0104] Output device 340 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0105] The communication interface 320 may include a device that uses any transceiver to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
[0106] The processor 310 executes the program stored in the memory 300 and calls other devices, which can be used to implement the various steps of any of the container prediction methods provided in the above embodiments of this application.
[0107] Exemplary computer program products and storage media In addition to the methods and apparatus described above, embodiments of this application may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the container prediction method according to various embodiments of this application as described in any of the foregoing embodiments of this specification.
[0108] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0109] Furthermore, embodiments of this application may also be storage media storing a computer program, which is executed by a processor through steps in the container prediction method according to various embodiments of this application described above. Specifically, the following steps can be implemented: Obtain the current waybill data of the pending transshipment orders. The current waybill data includes the loading attribute parameters of each pending transshipment order. The loading attribute parameters are parameters that affect the container space of the pending transshipment orders. Based on the loading attribute parameters, determine the first predicted number of containers required to load the pending transfer order; Obtain a second predicted number of containers required to load the pending transshipment order, determined based on historical waybill data from historical transshipment orders. Based on the number of containers already loaded on the pending transfer order, a third predicted number of containers required to load the pending transfer order is determined. Based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, the target number of containers required to load the transshipment order is determined.
[0110] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0111] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0112] The steps in the methods of the various embodiments of this application can be adjusted, merged, or deleted in order according to actual needs, and the technical features described in each embodiment can be replaced or combined.
[0113] The modules and sub-modules in the apparatus and terminal in the various embodiments of this application can be merged, divided, and deleted according to actual needs.
[0114] It should be understood that the disclosed terminals, devices, and methods can be implemented in other ways, given the several embodiments provided in this application. For example, the terminal embodiments described above are merely illustrative. For instance, the division of modules or sub-modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0115] The modules or submodules described as separate components may or may not be physically separate. The components that constitute a module or submodule may or may not be physical modules or submodules; that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules can be selected to achieve the purpose of this embodiment's solution, depending on actual needs.
[0116] Furthermore, the functional modules or sub-modules in the various embodiments of this application can be integrated into one processing module, or each module or sub-module can exist physically separately, or two or more modules or sub-modules can be integrated into one module. The integrated modules or sub-modules described above can be implemented in hardware or in the form of software functional modules or sub-modules.
[0117] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0118] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software unit executed by a processor, or a combination of both. The software unit can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0119] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0120] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting containers, characterized in that, include: Obtain the current waybill data of the pending transshipment orders. The current waybill data includes the loading attribute parameters of each pending transshipment order. The loading attribute parameters are parameters that affect the container space of the pending transshipment orders. Based on the loading attribute parameters, determine the first predicted number of containers required to load the pending transfer order; Obtain a second predicted number of containers required to load the pending transshipment order, determined based on historical waybill data from historical transshipment orders. Based on the number of containers already loaded on the pending transfer order, a third predicted number of containers required to load the pending transfer order is determined. Based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, the target number of containers required to load the transshipment order is determined.
2. The method according to claim 1, characterized in that, Determining the first predicted number of containers required to load the pending transfer order based on the loading attribute parameters includes: Based on the loading attribute parameters, the transit orders to be processed are classified into preset categories, and the number of transit orders to be processed in each category is determined. Obtain the category coefficient and scaling factor corresponding to each of the aforementioned categories. The category coefficient is used to indicate the category weight of each category, and the scaling factor is used to indicate the proportional relationship between the actual number of containers and the predicted number of containers. The first predicted quantity is determined based on the number of waybills, the category coefficient, and the scaling factor.
3. The method according to claim 2, characterized in that, Before obtaining the category coefficients and scaling factors corresponding to each of the aforementioned categories, the process also includes: Obtain sample waybill data of the sample flow transfer order, the sample waybill data including the loading attribute parameters of the sample flow transfer order, the sample container where the sample flow transfer order is located, and the number of sample containers; The classification category corresponding to each of the classified flow transfer orders is determined based on the loading attribute parameters. Determine the number of samples for each classification category in each of the sample containers; Obtain the range of values for the initial category coefficients of each of the aforementioned categories; An optimization model is obtained based on the number of sample containers, the number of samples, and the initial class coefficients, wherein the optimization model is used to determine the initial class coefficients; Within the range of values, the initial category coefficients are adjusted to determine the initial category coefficient that minimizes the output value of the optimization model as the category coefficient corresponding to the classification category.
4. The method according to claim 1, characterized in that, After obtaining the current waybill data for the pending transshipment order, it also includes: If the volume of the pending transshipment order does not exist in the current waybill data, the text features of the current waybill data are extracted based on a pre-trained prediction model. The text features include the attribute category features and the contents of the consigned items of the pending transshipment order. The volume of the pending transshipment order is predicted based on the text features to obtain the waybill volume. The volume of the waybill is determined to be the loading attribute parameter.
5. The method according to claim 4, characterized in that, Extracting the text features of the current waybill data, including: Based on the current waybill data, determine the target attribute category to which the pending transshipment waybill belongs in the preset attribute categories; The attribute category characteristics of the transshipment order to be transferred are determined based on the target attribute category; The consignment details in the current waybill data are matched with a preset keyword set to determine the target keyword; The characteristics of the contents of the consigned items in the transit order are determined based on the target keywords; The attribute category features and the content features of the entrusted item are determined as the text features.
6. The method according to claim 1, characterized in that, The historical waybill data includes the historical container quantity. The second predicted quantity is determined based on the historical waybill data for historical transit waybills, including: Obtain the correspondence between the circulation time and the number of containers, wherein the number of containers is determined based on the historical number of containers in the historical waybill data within the circulation time; The number of containers corresponding to the target turnover time is determined from the correspondence as the second predicted quantity, and the target turnover time is the same as the turnover time of the transfer order to be transferred in the correspondence.
7. The method according to claim 1, characterized in that, Based on the number of containers already loaded on the pending transfer order, a third predicted number of containers required to load the pending transfer order is determined, including: Obtain the completion time of the transfer order to be transferred; When determining the preset time before the end of the transfer, the number of containers already loaded on the transfer order is calculated. The sum of the number of containers and the preset number of containers is determined to be the third predicted number.
8. The method according to claim 1, characterized in that, Based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, determine the target number of containers required to load the transshipment order, including: Determine the allocation coefficients for the first prediction quantity, the second prediction quantity, and the third prediction quantity; The target quantity is obtained by weighted summation of the allocation coefficient, the first predicted quantity, the second predicted quantity, and the third predicted quantity.
9. The method according to claim 1, characterized in that, After determining the target number of containers needed to load the transshipment order based on the first predicted quantity, the second predicted quantity, and the third predicted quantity, the method further includes: Obtain the actual number of containers after the pending transfer order has been loaded; Based on the actual number of containers and the target number, determine the monitoring metrics; The circulation results of the pending transfer orders are monitored based on the aforementioned monitoring indicators.
10. An electronic device, characterized in that, Including memory and processor; The memory is connected to the processor and is used to store programs; The processor is configured to implement the container prediction method as described in any one of claims 1 to 9 by running a program in the memory.
11. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the container prediction method as described in any one of claims 1 to 9.