Freight box sleeving method based on user behavior habits
By based on the user behavior habit method, the historical transportation data and Geohash encoding are used to build a characteristic weight and position matrix model, which solves the adaptability of traditional methods when the business volume increases and the scene is rich, and realizes self -adaptation, automation, automation, automation and automation Recommended with intelligent kit schemes, reducing costs and human resources demand.
Patent Information
- Application Number
- CN202411907188.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The traditional freight container packing method is difficult to adapt to new constraints when the business volume increases and the business scenarios are rich, resulting in high development costs, functional conflicts, dependence on personal abilities and inability to meet personalized needs.
Adopt a freight boxing method based on user behavior and habits, extract and group waybill features by using historical waybill data, calculate feature similarity weights, use geohash coding to process location data, build feature weights and location matrix models, and adaptively adjust the model to suit New constraints.
This method can adapt to adjust the model, adapt to more new constraints, reduce development costs, unify the constraints and definitions of different business departments, analyze user behavior habits, automated and intelligent kit schemes recommendation, significantly reduce artificially handle the clottering kit Time and cost.
Smart Images

Figure CN119358975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a freight container packing method based on user behavior habits. Background Art
[0002] At present, the traditional freight container packing method relies on various constraints, such as: mileage saving, empty mileage, packing time, container condition, etc. However, with the continuous increase in business volume and the continuous enrichment of business scenarios, the traditional container packing method has the following technical difficulties: 1. Currently, due to the increase in business volume, new hard constraints continue to emerge, and development costs are high in the short term.
[0003] 2. Different business departments have different definitions of the same constraint, resulting in functional conflicts. The traditional box-building method cannot be compatible with the business of multiple departments at the same time.
[0004] 3. Different individuals have different behavioral habits and different abilities to apply multiple constraints. The success of the traditional box-building method depends heavily on personal ability and understanding of the business.
[0005] 4. As the business capabilities of the same person deepen, the traditional box-packing method can no longer meet personal needs. In fact, manual box-packing is more effective than the traditional box-packing method. The traditional box-packing method cannot save manpower and cost. Summary of the invention
[0006] The purpose of the present invention is to solve the above problems and to propose a freight container method based on user behavior habits.
[0007] In order to achieve the above purpose, the following technical solutions are adopted: A method for packing a freight container based on user behavior habits comprises the following steps: S1: The historical waybill dataset WaybillArray[W1 (I1O1), W2(I2O2), ..., Wn(InOn)] is generated by the traditional nesting method and stored in the database. Then, the database is accessed through the waybill asynchronous data synchronization service to obtain the historical waybill dataset of the specified user User. The asynchronous data synchronization service for waybills is a Python program deployed on the server; The database is a MySQL database deployed on the server; The WaybillArray is an array of historical waybill data; Wherein, W1~Wn represent different waybill numbers, I1~In represent the import order corresponding to the waybill number, and O1~On represent the export order corresponding to the waybill number.
[0008] S2: Use the data obtained in S1 to extract and group the waybill features in WaybillArray to obtain the number of waybills with the same features and their feature values; The data is a historical waybill data set; S3: Calculate the similarity weight of waybill features; S4: Use the data obtained in S1 to extract the locations in the waybill in WaybillArray, encode and group the unpacking and repacking location points therein, and obtain the longitude and latitude code FT of the waybill and the number of occurrences of the same code Q; The data is a historical waybill data set; The encoding adopts geohash algorithm; S5: The position point data is changed into a two-dimensional matrix of position weights; S6: Repeat steps S1 to S5, record and continuously update the feature weight coefficients and the position weight two-dimensional matrix; S7: Export the updated feature weight coefficients and position weight two-dimensional matrix from the database to the feature weight and position matrix model.
[0009] Preferably, the user's method of use includes the following steps: K1: According to the user's username, the corresponding data is extracted from the feature weight and position matrix model and imported into the data model; K2: Extract data from the order pool and import it into the data model; K3: Match the data in the order pool with the data in the feature weight and position matrix model through the data model to calculate the optimal matching result; K4: Feedback the best matching results to the user.
[0010] Preferably, in step S2, the waybill features in the historical waybill array are extracted and grouped by a feature extraction algorithm and a classification algorithm to obtain waybill feature values. Waybill features with the same features are divided into 1 group, which can be divided into m groups in total. After grouping, the number of waybills and feature values in each group are counted and mapped in the corresponding waybill group, wherein the number of waybills is distributed in the interval [P1, P2, ..., Pm], and the range of waybill feature values is (X1,, X2, X3...Xn).
[0011] Preferably, in step S3, the formula for calculating the similarity of the waybill features is:
[0012] Among them: A is the special similarity, P is the number of waybills with the same characteristics, W is the weight coefficient of a certain feature, and X is the feature value.
[0013] Furthermore, when used for model training, the default similarity of the waybills that have been matched in the past is 100%, that is, A = 1. Substitute the known X to calculate P and W. The specific calculation process is: During the application process, A is a changing value, but P and W become known data. The closer the calculated value of A is to 100%, the higher the matching degree is.
[0014] Preferably, in step S4, the historical waybill data is traversed, and the geohash.encode function is used to convert the longitude and latitude of the import and export orders in the waybill data into geohash codes. Based on the geohash code string prefix, the encoded waybills are grouped, and the waybills with the same code are grouped into one group, which can be divided into m groups in total. After the grouping is completed, the number of occurrences of the code in each group is counted and mapped in the corresponding group. The number of occurrences of the same code is [Q1, Q2...Qm].
[0015] Since the longitude and latitude of similar locations have the same encoding results after geohash encoding, the waybills are grouped according to the prefix of the string data after geohash encoding, and the waybills with the same prefix encoding are grouped together.
[0016] Preferably, in step S5, a position weight two-dimensional matrix is created, the encoded waybill groups are traversed, and based on the longitude and latitude codes FT obtained after geohash encoding and the number of times the code appears Q, a correspondence between the longitude and latitude codes FT and the number of times Q the code appears is established and the two-dimensional matrix is updated. The two-dimensional matrix is [G1[F1T1,Q1],…, Gm[FmTm,Qm]], where G1~Gm represent position weight two-dimensional matrix groups, F1T1~FmTm are longitude and latitude codes, and Q1~Qm are the number of times the same code appears.
[0017] Preferably, step K3 includes the following sub-steps: K31: The user matches the export orders OutOrder1 ... OutOrdern according to the import order InOrder, calculates the similarity of the waybill features and sorts them to obtain the feature sorting group FeatureSort; K32: The user matches the export orders OutOrder1 ... OutOrdern according to the import order InOrder, calculates the position similarity and sorts them, and obtains the position sorting group PositionSort; K33: Merge the feature sorting group and the position sorting group to obtain the matching result.
[0018] Preferably, in step K31, the order data in the data model is traversed, InOrder and OutOrder1 ... OutOrdern are extracted, and the feature similarity is calculated. The larger the A value is, the higher the similarity with the historical waybill features of the user is. The feature sorting group FeatureSort [A m (InOrder, OutOrderm),...,A n (InOrder, OutOrdern)], the calculation formula is:
[0019] Among them, A is the feature similarity, W is the feature weight coefficient, X is the feature value, InOrder is the import order, and OutOrder is the export order.
[0020] Preferably, in step K32, the order data in the data model is traversed, the location information of InOrder and OutOrder1 ... OutOrdern is extracted, and geohash encoding is performed, and FmTm is searched in the two-dimensional matrix of location weights. If it is not found, Q = 0, and if it is found, the corresponding Q = Q m The obtained position similarities are sorted from high to low to obtain the position sorting group PositionSort[Qm=Qm, ..., Qp =0], where Qm = Qm represents the maximum position similarity value to find the corresponding Qm.
[0021] Preferably, in step K33, the merging formula of the best matching results is: Among them, Am is the feature similarity, Qm is the location similarity, and Q1~Qn is the sum of the corresponding weights of export orders in the location weight two-dimensional matrix.
[0022] In order to perform weighted average calculation on the number of times longitude and latitude appear and make the calculation result more accurate, it is necessary to perform weighted average calculation on the number of times each appears during the calculation process and then multiply the similarity, in order to make the feature similarity account for a higher proportion.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: the method continuously learns and optimizes the data model from the actual operation of the user through daily behavior learning, and can adaptively adjust the model to accommodate more new constraints. Moreover, the method mainly relies on the learning and optimization of user behavior data, rather than hard-coded rules or algorithms, and does not conflict with the traditional box-fitting method, so high development costs can be avoided; the method standardizes the different definitions of the same constraint by different business departments by constructing a unified data model, so as to adapt to the needs of different business departments; by analyzing the historical behavior data of the user, the personal behavior habits and business capabilities of each user can be understood; and because the system can automatically learn and optimize the data model, it can help users better apply multiple constraints, even if their understanding of the business is limited; through automated and intelligent box-fitting solution recommendations, the method can significantly reduce the time and cost of manual box-fitting. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a schematic diagram of a model training method for a freight container based on user behavior habits in Example 1 of the present invention; Figure 2 This is a user usage diagram of a freight box packing method based on user behavior habits in Example 1 of the present invention; Figure 3 This is a schematic diagram of calculating the optimal matching result of a freight box packing method based on user behavior habits in Example 1 of the present invention; DETAILED DESCRIPTION
[0025] Hereinafter, a method for packing a freight container based on user behavior habits of the present invention will be described in detail with reference to the accompanying drawings.
[0026] like Figure 1 As shown, a method for packing a freight container based on user behavior habits includes the following steps: S1: The historical waybill dataset WaybillArray[W1 (I1O1), W2(I2O2), ..., Wn(InOn)] is generated by the traditional nesting method and stored in the database. Then, the database is accessed through the waybill asynchronous data synchronization service to obtain the historical waybill dataset of the specified user User. The asynchronous data synchronization service for waybills is a Python program deployed on the server; The database is a MySQL database deployed on the server; The WaybillArray is an array of historical waybill data; Wherein, W1~Wn represent different waybill numbers, I1~In represent the import order corresponding to the waybill number, and O1~On represent the export order corresponding to the waybill number.
[0027] S2: Use the data obtained in S1 to extract and group the waybill features in WaybillArray to obtain the number of waybills with the same features and their feature values; The data is a historical waybill data set; S3: Calculate the similarity weight of waybill features; S4: Using the data obtained in S1, extract the locations in the waybill in WaybillArray, and encode and group the unpacking and repacking location points therein; The data is a historical waybill data set; The encoding adopts geohash algorithm; S5: The position point data is changed into a two-dimensional matrix of position weights; S6: Repeat steps S1 to S5, record and continuously update the feature weight coefficients and the position weight two-dimensional matrix; S7: Export the updated feature weight coefficients and position weight two-dimensional matrix from the database to the feature weight and position matrix model.
[0028] like Figure 2 As shown, the user's method of use includes the following steps: K1: According to the user's username, the corresponding data is extracted from the feature weight and position matrix model and imported into the data model; K2: Extract data from the order pool and import it into the data model; K3: Match the data in the order pool with the data in the feature weight and position matrix model through the data model to calculate the optimal matching result; K4: Feedback the best matching result to the user. Figure 1 , Figure 2 , Figure 3 As shown, feature weight and position matrix model training.
[0029] like Figure 3 As shown, step K3 includes the following sub-steps: K31: The user matches the export orders OutOrder1 ... OutOrdern according to the import order InOrder, calculates the similarity of the waybill features and sorts them to obtain the feature sorting group FeatureSort; K32: The user matches the export orders OutOrder1 ... OutOrdern according to the import order InOrder, calculates the position similarity and sorts them, and obtains the position sorting group PositionSort; K33: Merge the feature sorting group and the position sorting group to obtain the matching result.
[0030] In this embodiment, combined with Figure 1 , Figure 2 , Figure 3 As shown, feature weight and position matrix model training: The historical waybill dataset is obtained through the traditional box nesting method and stored in the MySQL database. Then the system sets up and starts to execute the scheduled task. The MySQL database is accessed through the waybill asynchronous data synchronization service to obtain the historical waybill dataset of the specified user. The acquired historical waybill data is used to extract the waybill features using the BoW algorithm and group them using the python-scikit-learn tool. Waybills with the same features are grouped together. After the waybill features are grouped, the waybill feature similarity weight coefficient is calculated based on the number of waybills in each group and the waybill feature range using the formula. Then the location in the waybill is extracted, and the unpacking and repacking location points are geohash encoded and grouped. Waybills with the same code are grouped together. Based on the location information and geohash encoding, a two-dimensional matrix of location weights is constructed, and the location similarity is calculated. The calculated feature similarity weight coefficient and location similarity matrix coefficient are saved in the database, and the feature weight and location matrix model are imported. The scheduled task is completed and then repeated daily.
[0031] User use: The system uses Python's third-party library numpy to import the data of the feature weight coefficient and the position weight two-dimensional matrix into the current data calculation model. Then the system extracts the import order and export order data that the user currently needs to match from the order pool. According to the acquired import orders, the feature weight and position matrix model are used to calculate the feature weight coefficient for each possible export order in the order pool. The feature similarity between them is calculated by combining the feature values of the import order and the export order. Then, they are sorted from high to low according to the feature similarity to form a waybill feature group. The system also extracts the location information of the import order and each possible export order, encodes the location information using geohash encoding, and searches for the corresponding location weight in the location weight two-dimensional matrix of the feature weight and position matrix model. According to the found location weight, the location similarity is calculated, and then they are sorted from high to low according to the location similarity to form a waybill location group. Finally, the waybill feature group and the waybill location are combined to obtain the matching result, and the matching result is fed back to the user.
[0032] The above description is only a preferred example of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have other optimization schemes and additional functions. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for packing freight containers based on user behavior habits, characterized by: The following steps are involved: S1: The historical waybill dataset WaybillArray[W1 (I1O1), W2(I2O2), …, Wn( InOn)] is generated by the traditional nesting method and stored in the database. Then, the database is accessed through the waybill asynchronous data synchronization service to obtain the historical waybill dataset of the specified user User. The asynchronous data synchronization service for waybills is a Python program deployed on the server; The database is a MySQL database deployed on the server; The WaybillArray is an array of historical waybill data; Wherein, W1~Wn represent different waybill numbers, I1~In represent the import orders corresponding to the waybill numbers, and O1~On represent the export orders corresponding to the waybill numbers; S2: Use the data obtained in S1 to extract and group the waybill features in WaybillArray to obtain the number of waybills with the same features P and feature value X; The acquired data is a historical waybill data set; S3: Calculate the similarity weight of waybill features; S4: Use the data obtained in S1 to extract the locations in the waybill in WaybillArray, encode and group the unpacking and repacking location points therein, and obtain the longitude and latitude code FT of the waybill and the number of occurrences of the same code Q; The data is a historical waybill data set, which contains corresponding longitude and latitude information; The encoding adopts geohash algorithm; S5: The position point data is changed into a two-dimensional matrix of position weights; S6: Repeat steps S1 to S5, and continuously record and update the feature weight coefficients and the position weight two-dimensional matrix; S7: Import the updated feature weight coefficients and position weight two-dimensional matrix from the database into the feature weight and position matrix model.
2. The method for packing a freight container based on user behavior habits according to claim 1, characterized in that: The user's usage method includes the following steps: K1: According to the user's username, the corresponding data is extracted from the feature weight and position matrix model and imported into the data model; The data is a two-dimensional matrix of feature weight coefficients and position weights of waybills; The data model is a calculation model used to calculate the optimal matching result; K2: Extract data from the order pool and import it into the data model; The data in the order pool is the order data to be packed, which is stored in the order database; K3: Match the data in the order pool with the data in the feature weight and position matrix model through the data model to calculate the optimal matching result; K4: Feedback the best matching results to the user.
3. The method for packing a freight container based on user behavior habits according to claim 1, characterized in that: In step S2, the waybill features in the historical waybill array are extracted by the Bow algorithm to obtain the waybill feature values, and the features are grouped using the python-scikit-learn tool. Waybills with the same features are divided into 1 group, and a total of m groups are divided. After the grouping is completed, the number of waybills and feature values in each group are counted and mapped in the corresponding waybill group, where the number of waybills is distributed in the interval [P1, P2, ..., Pm], and the range of the waybill feature values is (x1, x2, x3, ..., xn).
4. The method for packing a freight container based on user behavior habits according to claim 1, characterized in that: In step S3, the formula for calculating the similarity of waybill features is: Among them, A is the special similarity, P is the number of waybills with the same characteristics, W is the weight coefficient of a certain feature, and X is the feature value.
5. The method for packing a freight container based on user behavior habits according to claim 1, characterized in that: In step S4, the historical waybill data is traversed, and the geohash.encode function is used to convert the longitude and latitude of the import and export orders in the waybill data into geohash codes. Based on the prefix of the geohash code string, the encoded waybills are grouped, and the waybills with the same code are grouped into one group, which can be divided into m groups in total. After the grouping is completed, the number of occurrences of the code in each group is counted and mapped in the corresponding group. The number of times the same code appears is [Q1, Q2, ..., Qm].
6. The method for packing a freight container based on user behavior habits as claimed in claim 1, characterized in that: In step S5, a two-dimensional matrix of position weights is created, the encoded waybill groups are traversed, and based on the longitude and latitude codes FT obtained after geohash encoding and the number of times the code appears Q, a correspondence between the longitude and latitude codes FT and the number of times Q appears is established and the two-dimensional matrix is updated. The two-dimensional matrix is [G1[F1T1,Q1],…, Gm[FmTm,Qm]], where G1~Gm represents the two-dimensional matrix number, F1T1~FmTm is the longitude and latitude codes, and Q1~Qm is the number of times the same code appears.
7. The method for packing a freight container based on user behavior habits as claimed in claim 2, characterized in that: Step K3 includes the following sub-steps: K31: The user matches the export orders OutOrder1 ... OutOrdern according to the import order InOrder, calculates the similarity of the waybill features and sorts them to obtain the feature sorting group FeatureSort; K32: The user matches the export orders OutOrder1 ... OutOrdern according to the import order InOrder, calculates the position similarity and sorts them, and obtains the position sorting group PositionSort; K33: Merge the feature sorting group and the position sorting group to obtain the matching result.
8. The method for packing a freight container based on user behavior habits as claimed in claim 7, characterized in that: In step K31, InOrder and OutOrder1 ... OutOrdern are extracted, and feature similarity is calculated. The larger the A value is, the higher the similarity is with the historical waybill features of the user. The feature sorting group FeatureSort [A m (InOrder, OutOrderm),..., A n (InOrder, OutOrdern)], the calculation formula is: Where A is the feature similarity, W is a feature weight coefficient, X is the feature value, InOrder is the import order, and OutOrder is the export order.
9. The method for packing a freight container based on user behavior habits according to claim 7, characterized in that: In step K32, the position information of InOrder and OutOrder1 ... OutOrdern is extracted and geohash encoded, and FmTm is searched in the position weight two-dimensional matrix. If it is not found, Q = 0, if it is found, the corresponding Q = Qm, and the obtained position similarities are sorted from high to low to obtain the position sorting group PositionSort[Qm = Qm, ..., Qp = 0], where Qm = Qm represents that the value of the maximum position similarity is the corresponding Qm found.
10. The method for packing a freight container based on user behavior habits as claimed in claim 2, characterized in that: In step K3, the merging formula of the best matching result Sortm is: Among them, Am is the feature similarity, Qm is the location similarity, and Q1~Qn is the sum of the corresponding weights of export orders in the location weight two-dimensional matrix.
Citation Information
Patent Citations
Method for realizing coupling calculation of tritium transport models in different dimensions based on Matlab / Simulink
CN112949120A
Intelligent box splicing method, system and equipment based on machine learning
CN117422372A
Partial load shipment consolidation and scheduling
US20170046658A1