Casing knowledge base construction method based on large model vector

By adopting the container knowledge base construction method based on large model vectors in maritime logistics, the problems of resource waste and lack of allocation knowledge in container transportation are solved, and efficient container transportation and resource saving are achieved.

CN119312886APending Publication Date: 2025-01-14YUKUAI CHUANGLING INTELLIGENT TECH (NANJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411241336.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

Container transportation in maritime logistics has problems such as wasting resources and lack of allocation knowledge, especially the problem of inability to quantify the experience and knowledge of air-running and allocation personnel, which leads to inefficient manual allocation.

Method used

The boxing knowledge base construction method based on large model vectors is used to classify and classify the original order characteristics, and use the large model vector model combined with the weight algorithm to construct knowledge vectors, build a vector knowledge base and a pool of candidate vector orders, and carry out order matching. , and build a scoring matrix to score order pairs from multiple dimensions.

Benefits of technology

It improves the efficiency of box-packing, reduces the dependence on manual allocation, can effectively utilize the information in historical data, reduces the problem of empty runs during transportation, and saves resources and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_9
    Figure QLYQS_9
  • Figure QLYQS_14
    Figure QLYQS_14
  • Figure QLYQS_27
    Figure QLYQS_27
Patent Text Reader

Abstract

The invention provides a casing knowledge base construction method based on a large model vector, and the method comprises the following steps: S1, carrying out the grading and classification of original order features, and constructing the original order features into knowledge vectors through a large model vector model in combination with a weight algorithm; s2, constructing a vector knowledge base and a vector order pool to be selected; s3, querying recommendation and constructing a scoring matrix; s4, updating the knowledge base; according to the invention, an order feature classification method and a vector generation method are adopted to construct a vector knowledge base and a vector order pool to be selected, a given order is converted into an order vector, order pairing is carried out in the vector knowledge base and the vector order pool to be selected, and finally a scoring matrix is constructed to score order pairs from multiple dimensions. The order pair with the highest score is obtained for casing; the quantitative basis and the clear box sleeving process are provided, and the box sleeving efficiency is improved; the problems that in the prior art, box sleeving depends on the experience of deploying personnel, and the manual deploying efficiency is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of marine logistics, and in particular to a method for constructing a container knowledge base based on a large model vector. Background Art

[0002] At present, in the field of maritime logistics, there are problems of resource waste and lack of allocation knowledge in the transportation of containers, especially the problems of empty runs (i.e., containers are transported without goods) and the inability to quantify the experience and knowledge of allocation personnel. Trucks need to travel back and forth between container borrowing and returning offices, ports, and customer points. Especially in the transportation of imported and exported goods, the empty runs are long, which increases labor costs and resource waste. Allocation personnel usually match import orders and export orders based on experience to reduce empty runs. Although this method can save resources in some cases, it is often based on intuition and experience, lacks quantitative basis and clear container set-up processes, and manual allocation is inefficient. It is impossible to effectively utilize the information in all historical data, the personal knowledge of allocation personnel is difficult to disseminate and reuse, and it is impossible to quantify indicators. It is also impossible to strictly follow the principle of saving the maximum distance. Summary of the invention

[0003] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a method for constructing a box knowledge base based on a large model vector.

[0004] To achieve the above object, the present invention adopts the following technical solutions: A method for constructing a box-nesting knowledge base based on a large model vector comprises the following steps: S1: Classify and classify the original order features, and use the large model vector model combined with the weight algorithm to construct the original order features into a knowledge vector; The following sub-steps are included: S11: Divide the original order features into different levels and feature types; Collect original order features and classify the original order features into different levels and feature types; The original order features include the name of the goods, the type of goods, the port information, the longitude and latitude of the pickup point, the location information of the delivery point, the box type, the weight of the goods, the loading time, the box making time, the delivery time, etc.; The levels include order-level features and container-level features; the order-level features refer to the features that describe various attributes of a single order during the transportation process, including cargo name, cargo type, port information, latitude and longitude of the pickup point, and location information of the delivery point, etc. The container-level features refer to features that evaluate whether two items can be combined into the same container, including container type, loading time, cargo weight, etc. Feature types include continuous features, semantic features, and categorical features; the continuous features refer to features that can take any real value and have a sequential relationship, including cargo weight, distance, loading time, etc.; the semantic features refer to features involving text or other forms of unstructured data that need to be converted into numerical form through natural language processing or large-scale vectorization, including cargo name, cargo type, address information, etc.; the categorical features refer to features with discrete values ​​used to identify different categories or groups, including box type, customer identification, etc. Among them, the order-level features include three feature types: continuous features, semantic features, and classification features; the box-level features include two feature types: classification features and continuous features.

[0005] S12: Convert order-level features into knowledge vectors; The following sub-steps are included: S121: Convert order-level features into raw vectors; The order-level features are converted into original vectors through three vector encoding methods: position vector, large model semantic vector, and onehot vector. That is, the original order features of continuous features, semantic features, and classification features are converted into original vectors. For order-level features whose feature type is continuous features, they are converted into original vectors through position vectors; in this method, order-level features whose feature type is continuous features specifically refer to position features such as longitude and latitude; Specifically, the longitude and latitude (L, B) in the order-level features are converted into 3D coordinates (X, Y, Z) by an ideal sphere approximation method. , , ; Among them, R is the radius of the earth, L and B are the arc values ​​of longitude and latitude; For order-level features whose feature type is semantic features, they are directly converted into original vectors through a large model vector model; the large model vector model includes BERT, GPT, etc.; Specifically, the text in the semantic features is input into the large model vector model, the large model vector model generates a long vector, and a specific dimension is intercepted according to actual needs or the dimension of the long vector is reduced by dimensionality reduction technology; and the processed vector is normalized to obtain the original vector; For order-level features whose feature type is categorical features, index each category through one-hot encoding to obtain the original vector; Specifically, one-hot encoding performs index processing on each category and converts each category into a vector of length n, where n is the total number of categories, and each vector has only one position that is 1 and the rest are 0; assuming that the index of category i is i, then , ; For example, if there are 3 categories, the onehot encoding of category 2 is [0,1,0]; S122: converting the original vector into a knowledge vector; According to actual needs, weight parameters are set for each original vector obtained in step S121, and the weight parameters are recorded as , let the original vector be ; The original vector and the corresponding weight parameter Doing Hadamard product, we get , concatenate all the Hadamard product results to get the knowledge vector, denoted as V, ; in, for Dimension, if the sum of the feature dimensions does not satisfy , supplement the 0 value dimension; Further, The weight parameter values ​​are adjusted according to the importance of the corresponding order-level features. For example, the weight parameter values ​​of the pickup point and delivery point are higher, the weight parameter values ​​of the empty return point are in the middle, and the weight parameter values ​​of the goods and other information are lower.

[0006] S2: Build a vector knowledge base and a pool of vector orders to be selected; An engineer creates a knowledge base, the knowledge base comprising an import side and an export side; Collecting historical container packing orders, wherein the historical container packing orders include import orders and export orders; Convert the import order and export order of the historical container into an import vector and an export vector respectively according to the method of step S1; Specifically, the import orders and export orders in the historical boxes are divided into different levels and feature types respectively; according to the feature type, the import orders and export orders are converted into original vectors through the corresponding vector encoding method, the original vectors are processed by Hadamard product, and all Hadamard product results are spliced ​​to obtain import vectors and export vectors; Compare the obtained import vectors and export vectors with the existing knowledge vectors in the knowledge base. If there is a knowledge vector in the knowledge base that is the same as the import vector and export vector, then this vector will not be processed; If there is no knowledge vector identical to the import vector or export vector in the knowledge base, the corresponding import vector is saved to the import side of the knowledge base, and the export order is saved to the export side of the knowledge base; According to actual needs, the export orders and import orders in the knowledge base are sequentially formed into order pairs, and each import order corresponds to an export order one by one; Furthermore, the frequency of vector pairs in the statistical knowledge base is calculated through cluster analysis; the distance of each group of vector pairs is calculated by the distance formula, and the vector pairs with the same distance in the knowledge base are clustered into the same group. The frequency of each vector is the number of vector pairs contained in the group; By measuring the similarity of vectors through distance and counting the frequency of vectors according to the clustering algorithm, all vectors can be grouped according to similarity, making it easier to understand the structure and distribution of different groups.

[0007] New import and export orders, import and export orders that have not yet been closed, and unpaired import and export orders are converted into import vectors and export vectors respectively according to the method of step S1; and the import vectors and export vectors are saved in a pool of vector orders to be selected.

[0008] S3: query recommendation and construct scoring matrix; The following sub-steps are included: S31: querying an order pair according to a given order; If the given order is an import order, the given import order is converted into an import order vector by the method of step S1, and a distance threshold L1 is set; Specifically, the distance between the given import order vector and each import vector in the import side of the knowledge base is calculated by the vector distance formula, and the import vectors in the knowledge base whose distance is less than the distance threshold L1 are saved in the set R1; Query the corresponding export vectors of the import vectors in the set R1 in the knowledge base, and set the distance threshold R2; The distance between all the export vectors in the candidate vector order pool and the export vector corresponding to each import vector in the set R1 is calculated in sequence by using the vector distance formula; the export vectors in the candidate vector order pool whose distance is less than the distance threshold are saved in the set R2; The import order vector of the given import order conversion and each export vector in the set R2 form an order pair, and there are M order pairs in total; On the contrary, if the given order is an export order, the given export order is converted into an export order vector by the method of step S1, and a distance threshold L1 is set; Specifically, the distance between the given export order vector and each export vector in the export side of the knowledge base is calculated by the vector distance formula, and the export vectors in the knowledge base whose distance is less than the distance threshold L1 are saved in the set R1; Query the import vector corresponding to the export vector in the set R1 in the knowledge base, and set the distance threshold R2; The distance between all the import vectors in the candidate vector order pool and the import vector corresponding to each export vector in the set R1 is calculated in sequence by using the vector distance formula; the import vectors in the candidate vector order pool whose distance is less than the distance threshold are saved in the set R2; The export order vector of the given export order conversion and each import vector in the set R2 form an order pair, and there are M order pairs in total; S32: construct a scoring matrix to rank the M order pairs; The scoring matrix includes time dimension, box type dimension, weight dimension, customer dimension, frequency dimension, similarity dimension, and distance saving dimension; The following sub-steps are included: S321: Score the order pairs from the time dimension; Set the upper limit of the bonus points for the time dimension to 10a and the penalty points to Max; where a and Max are positive integers; The two orders in the order pair are Order 1 and Order 2, and the customer points contained in Order 1 and Order 2 are respectively recorded as Point B and Point Points; the scores of M order pairs in the time dimension are calculated using the following formula; ; in, , is the distance between order 1 and order 2, is the average speed between order 1 and order 2, v is known, The hyperparameters set for The driving time between ; Point B and The distance between points is calculated by the navigation system; Get the order pair score of the box dimension, recorded as ; S322: Score the order pairs based on the box size dimension; Set the upper limit of the box dimension to a and the penalty to Max; Traverse each order pair. If the box types of the two orders in the order pair are the same, the maximum bonus point a is obtained. If the box types of the two orders in the order pair are inconsistent, the penalty point Max is subtracted. The order pair score of the box type dimension is obtained, which is recorded as ; S323: scoring the order pairs based on the weight dimension; Set the upper limit of bonus points for the weight dimension to a and the upper limit of penalty points to 2a; Traverse each order pair. If the weights of the two orders in the order pair are equal, the upper limit of a points will be awarded. If the weights of the two orders in the order pair are not equal, the order pair will be penalized according to the following formula; Note that the weights of the two orders in an order pair differ by k times; ; ; in, , is the weight of the goods included in the two orders in the order pair, for and The absolute difference of for The minimum value of , is a single value, the minimum value is ,if and is an element in an array or collection, the minimum value is the minimum value calculated by the min function; Get the order pair score of the box dimension, recorded as ; S324: scoring the order pairs from the customer dimension; Set the upper limit of the bonus score for the customer dimension to a and the penalty score to 0; Traverse each order pair. If the order pair meets the customer's specific business rules, the order pair will get a maximum score of a. If the order pair does not meet the customer's specific business rules, the order pair will not get any points. Get the order pair score of the customer dimension, recorded as ; S325: Score the order pairs based on the frequency dimension; The upper limit of bonus points for the frequency dimension is set to 10a, and the penalty points are set to 0; The distances of M vector pairs are calculated respectively by the vector distance formula, and the number of vector pairs contained in the group to which each vector pair is clustered is the frequency of this vector pair; The scores of M order pairs in the frequency dimension are calculated using the following formula; ; in, To order frequency, is the maximum frequency of order pairs in the knowledge base; Get the order pair score of the frequency dimension, recorded as ; S326: scoring the order pairs based on the similarity dimension; The upper limit of the bonus score for the similarity dimension is set to 10a, and the penalty score is set to 0; Suppose the distance threshold between two order pairs is , is the distance between two orders in an order pair; The distance between two orders in each order pair is calculated using the vector distance formula, and the scores of the M order pairs on the similarity dimension are calculated using the following formula; ; Get the order pair score of the similarity dimension, recorded as ; When score<0 Take 0; S327: scoring the order pairs from the perspective of distance saving; The upper limit of bonus points for saving distance is set to 10a, and the penalty points are set to 0; Traverse each order pair and derive the original distance and the saved distance based on the information of each order in the order pair; The original distance is the mileage spent on completing the delivery of the two orders respectively, and the saved distance is the original distance minus the distance spent on completing the delivery after the two orders are packed together; The scores of each order pair in the customer dimension are calculated according to the following formula, recorded as ; ; in, is a pre-set hyperparameter, d is the distance saved; Rank the order pairs according to their total scores; The total score of the order pair is recorded as score, score= ; The total scores of each order pair are sorted by the sorted function, and the sorting result is the ranking of M order pairs; The order pairs with the highest scores are boxed.

[0009] S4: Update knowledge base; After the order packing is completed, the new order is packed according to the method described in steps S1-S2 and saved in the knowledge base to update the knowledge base.

[0010] Compared with the prior art, the present invention has the following beneficial effects: The present invention proposes a method for constructing a box-packing knowledge base based on a large model vector. By adopting an order feature classification method and a vector generation method, a vector knowledge base and a pool of vector orders to be selected are constructed, a given order is converted into an order vector, and order pairing is performed in the vector knowledge base and the pool of vector orders to be selected. Finally, a scoring matrix is ​​constructed to score order pairs from multiple dimensions, and the order pairs with the highest scores are obtained for box packing; and the vector knowledge base is updated; the method has a quantitative basis and a clear box packing process, which improves the box packing efficiency; and the problem of relying on the experience of the dispatching personnel for box packing, failing to effectively utilize the information in the historical data, and low efficiency of manual dispatching in the prior art is avoided; By combining the large model vector with weighting, clustering, scoring and other algorithms, this method can find recommended orders with higher rankings for container packing, thereby improving the efficiency of manual allocation, reducing the problem of empty runs during transportation, and saving resources and labor costs. DETAILED DESCRIPTION

[0011] In order to provide a further understanding of the purpose, structure, features, and functions of the present invention, the following detailed description is given in conjunction with the embodiments.

[0012] A method for constructing a box-nesting knowledge base based on a large model vector comprises the following steps: S1: Classify and classify the original order features, and use the large model vector model combined with the weight algorithm to construct the original order features into a knowledge vector; The following sub-steps are included: S11: Divide the original order features into different levels and feature types; Collect original order features and classify the original order features into different levels and feature types; The original order features include the name of the goods, the type of goods, the port information, the longitude and latitude of the pickup point, the location information of the delivery point, the box type, the weight of the goods, the loading time, the box making time, the delivery time, etc.; The levels include order-level features and container-level features; the order-level features refer to the features that describe various attributes of a single order during the transportation process, including cargo name, cargo type, port information, latitude and longitude of the pickup point, and location information of the delivery point, etc. The container-level features refer to features that evaluate whether two items can be combined into the same container, including container type, loading time, cargo weight, etc. Feature types include continuous features, semantic features, and categorical features; the continuous features refer to features that can take any real value and have a sequential relationship, including cargo weight, distance, loading time, etc.; the semantic features refer to features involving text or other forms of unstructured data that need to be converted into numerical form through natural language processing or large-scale vectorization, including cargo name, cargo type, address information, etc.; the categorical features refer to features with discrete values ​​used to identify different categories or groups, including box type, customer identification, etc. Among them, the order-level features include three feature types: continuous features, semantic features, and classification features; the box-level features include two feature types: classification features and continuous features.

[0013] Order-level features are used to create knowledge vectors and compare the similarity between two vectors; box-level features are used to combine and score order pairs and finally calculate the ranking of order pairs; S12: Convert order-level features into knowledge vectors; The following sub-steps are included: S121: Convert order-level features into raw vectors; The order-level features are converted into original vectors through three vector encoding methods: position vector, large model semantic vector, and onehot vector. That is, the original order features of continuous features, semantic features, and classification features are converted into original vectors. For order-level features whose feature type is continuous features, they are converted into original vectors through position vectors; in this method, order-level features whose feature type is continuous features specifically refer to position features such as longitude and latitude; Specifically, the longitude and latitude (L, B) in the order-level features are converted into 3D coordinates (X, Y, Z) by an ideal sphere approximation method. , , ; Among them, R is the radius of the earth, L and B are the arc values ​​of longitude and latitude; For order-level features whose feature type is semantic features, they are directly converted into original vectors through a large model vector model; the large model vector model includes BERT, GPT, etc.; Specifically, the text in the semantic features is input into the large model vector model, the large model vector model generates a long vector, and a specific dimension is intercepted according to actual needs or the dimension of the long vector is reduced by dimensionality reduction technology; and the processed vector is normalized to obtain the original vector; For order-level features whose feature type is categorical features, index each category through one-hot encoding to obtain the original vector; Specifically, one-hot encoding performs index processing on each category and converts each category into a vector of length n, where n is the total number of categories, and each vector has only one position that is 1 and the rest are 0; assuming that the index of category i is i, then , ; For example, if there are 3 categories, the onehot encoding of category 2 is [0,1,0]; S122: converting the original vector into a knowledge vector; According to actual needs, weight parameters are set for each original vector obtained in step S121, and the weight parameters are recorded as , let the original vector be ; The original vector and the corresponding weight parameter Doing Hadamard product, we get , concatenate all the Hadamard product results to get the knowledge vector, recorded as ; ; in, for Dimension, if the sum of the feature dimensions does not satisfy , supplement the 0 value dimension; Further, The weight parameter values ​​are adjusted according to the importance of the corresponding order-level features. For example, the weight parameter values ​​of the pickup point and delivery point are higher, the weight parameter values ​​of the empty return point are in the middle, and the weight parameter values ​​of the goods and other information are lower.

[0014] S2: Build a vector knowledge base and a pool of vector orders to be selected; An engineer creates a knowledge base, the knowledge base comprising an import side and an export side; Collecting historical container packing orders, wherein the historical container packing orders include import orders and export orders; Convert the import order and export order of the historical container into an import vector and an export vector respectively according to the method of step S1; Specifically, the import orders and export orders in the historical boxes are divided into different levels and feature types respectively; according to the feature type, the import orders and export orders are converted into original vectors through the corresponding vector encoding method, the original vectors are processed by Hadamard product, and all Hadamard product results are spliced ​​to obtain import vectors and export vectors; Compare the obtained import vectors and export vectors with the existing knowledge vectors in the knowledge base. If there is a knowledge vector in the knowledge base that is the same as the import vector and export vector, then this vector will not be processed; If there is no knowledge vector identical to the import vector or export vector in the knowledge base, the corresponding import vector is saved to the import side of the knowledge base, and the export order is saved to the export side of the knowledge base; According to actual needs, the export orders and import orders in the knowledge base are sequentially formed into order pairs, and each import order corresponds to an export order one by one; Furthermore, the frequency of vector pairs in the statistical knowledge base is calculated through cluster analysis; the distance of each group of vector pairs is calculated by the distance formula, and the vector pairs with the same distance in the knowledge base are clustered into the same group. The frequency of each vector is the number of vector pairs contained in the group; By measuring the similarity of vectors through distance and counting the frequency of vectors according to the clustering algorithm, all vectors can be grouped according to similarity, making it easier to understand the structure and distribution of different groups.

[0015] New import and export orders, import and export orders that have not yet been closed, and unpaired import and export orders are converted into import vectors and export vectors respectively according to the method of step S1; and the import vectors and export vectors are saved in a pool of vector orders to be selected.

[0016] S3: query recommendation and construct scoring matrix; The following sub-steps are included: S31: querying an order pair according to a given order; If the given order is an import order, the given import order is converted into an import order vector by the method of step S1, and a distance threshold L1 is set; Specifically, the distance between the given import order vector and each import vector in the import side of the knowledge base is calculated by the vector distance formula, and the import vectors in the knowledge base whose distance is less than the distance threshold L1 are saved in the set R1; Query the corresponding export vectors of the import vectors in the set R1 in the knowledge base, and set the distance threshold R2; The distance between all the export vectors in the candidate vector order pool and the export vector corresponding to each import vector in the set R1 is calculated in sequence by using the vector distance formula; the export vectors in the candidate vector order pool whose distance is less than the distance threshold are saved in the set R2; The import order vector of the given import order conversion and each export vector in the set R2 form an order pair, and there are M order pairs in total; On the contrary, if the given order is an export order, the given export order is converted into an export order vector by the method of step S1, and a distance threshold L1 is set; Specifically, the distance between the given export order vector and each export vector in the export side of the knowledge base is calculated by the vector distance formula, and the export vectors in the knowledge base whose distance is less than the distance threshold L1 are saved in the set R1; Query the import vector corresponding to the export vector in the set R1 in the knowledge base, and set the distance threshold R2; The distance between all the import vectors in the candidate vector order pool and the import vector corresponding to each export vector in the set R1 is calculated in sequence by using the vector distance formula; the import vectors in the candidate vector order pool whose distance is less than the distance threshold are saved in the set R2; The export order vector of the given export order conversion and each import vector in the set R2 form an order pair, and there are M order pairs in total; The vector distance formula is as follows: When the vector is two-dimensional, ; When the vector is multidimensional, dim is the dimension; ; among them, among them, point To point The vector representation is , The distance is ; S32: construct a scoring matrix to rank the M order pairs; The scoring matrix includes time dimension, box type dimension, weight dimension, customer dimension, frequency dimension, similarity dimension, and distance saving dimension; The following sub-steps are included: S321: Score the order pairs from the time dimension; Set the upper limit of the bonus points for the time dimension to 10a and the penalty points to Max; where a and Max are positive integers; The two orders in the order pair are Order 1 and Order 2, and the customer points contained in Order 1 and Order 2 are respectively recorded as Point B and Point Points; the scores of M order pairs in the time dimension are calculated using the following formula; ; in, , is the distance between order 1 and order 2, is the average speed between order 1 and order 2, v is known, is the set hyperparameter; for The driving time between ; Point B and The distance between points is calculated by the navigation system; Get the order pair score of the box dimension, recorded as ; S322: Score the order pairs based on the box size dimension; Set the upper limit of the box dimension to a and the penalty to Max; Traverse each order pair. If the box types of the two orders in the order pair are the same, the maximum bonus point a is obtained. If the box types of the two orders in the order pair are inconsistent, the penalty point Max is subtracted. The order pair score of the box type dimension is obtained, which is recorded as ; S323: scoring the order pairs based on the weight dimension; Set the upper limit of bonus points for the weight dimension to a and the upper limit of penalty points to 2a; Traverse each order pair. If the weights of the two orders in the order pair are equal, the upper limit of a points will be awarded. If the weights of the two orders in the order pair are not equal, the order pair will be penalized according to the following formula; Note that the weights of the two orders in an order pair differ by k times; ; ; in, , is the weight of the goods included in the two orders in the order pair, for and The absolute difference of for The minimum value of , is a single value, the minimum value is ,if and is an element in an array or collection, the minimum value is the minimum value calculated by the min function; Get the order pair score of the box dimension, recorded as ; S324: scoring the order pairs from the customer dimension; Set the upper limit of the bonus score for the customer dimension to a and the penalty score to 0; Traverse each order pair. If the order pair meets the customer's specific business rules, the order pair will get a maximum score of a. If the order pair does not meet the customer's specific business rules, the order pair will not get any points. Get the order pair score of the customer dimension, recorded as ; S325: Score the order pairs based on the frequency dimension; The upper limit of bonus points for the frequency dimension is set to 10a, and the penalty points are set to 0; The distances of M vector pairs are calculated respectively by the vector distance formula, and the number of vector pairs contained in the group to which each vector pair is clustered is the frequency of this vector pair; The scores of M order pairs in the frequency dimension are calculated using the following formula; ; in, To order frequency, is the maximum frequency of order pairs in the knowledge base; Get the order pair score of the frequency dimension, recorded as ; S326: scoring the order pairs based on the similarity dimension; The upper limit of the bonus score for the similarity dimension is set to 10a, and the penalty score is set to 0; Suppose the distance threshold between two order pairs is , is the distance between two orders in an order pair; The distance between two orders in each order pair is calculated using the vector distance formula, and the scores of the M order pairs on the similarity dimension are calculated using the following formula; ; Get the order pair score of the similarity dimension, recorded as ; When score<0 Take 0; S327: scoring the order pairs from the perspective of distance saving; The upper limit of bonus points for saving distance is set to 10a, and the penalty points are set to 0; Traverse each order pair and derive the original distance and the saved distance based on the information of each order in the order pair; The original distance is the mileage spent on completing the delivery of the two orders respectively, and the saved distance is the original distance minus the distance spent on completing the delivery after the two orders are packed together; The scores of each order pair in the customer dimension are calculated according to the following formula, recorded as ; ; in, is a pre-set hyperparameter, d is the distance saved; Rank the order pairs according to their total scores; The total score of the order pair is recorded as score, score= ; The total scores of each order pair are sorted by the sorted function, and the sorting result is the ranking of M order pairs; The order pairs with the highest scores are boxed.

[0017] By constructing a scoring matrix, we can comprehensively evaluate order pairs from multiple dimensions and obtain the order pairs with the highest scores, which helps ensure that decisions are comprehensive and balanced, rather than focusing on a single factor; reduce human errors and improve the accuracy of decisions; Furthermore, when there is a clear actual demand for order packing, the dimensions in the scoring matrix and the specific scores of each dimension can be adjusted to obtain the order pairs that best meet the actual needs for packing, supporting flexible decision-making strategies; through efficient order matching and transportation arrangements, delivery time can be reduced, optimization configuration can be performed according to different customer needs, services that better meet customer requirements can be provided, service quality can be improved, and customer satisfaction can be enhanced.

[0018] S4: Update knowledge base; After the order packing is completed, the new order is packed according to the method described in steps S1-S2 and saved in the knowledge base to update the knowledge base.

[0019] The present invention has been described by the above-mentioned relevant embodiments, however, the above-mentioned embodiments are only examples for implementing the present invention. It must be pointed out that the disclosed embodiments do not limit the scope of the present invention. On the contrary, changes and modifications made without departing from the spirit and scope of the present invention are all within the scope of patent protection of the present invention.

Claims

1. A method for constructing a box knowledge base based on a large model vector, characterized by: The following steps are involved: S1: Classify and classify the original order features, and use the large model vector model combined with the weight algorithm to construct the original order features into a knowledge vector; The following sub-steps are included: S11: Divide the original order features into different levels and feature types; Collect original order features and classify the original order features into different levels and feature types; The levels include order-level features and container-level features; the order-level features refer to features that describe various attributes of a single order during transportation; the container-level features refer to features that evaluate whether two items can be combined into the same container; Feature types include continuous features, semantic features, and categorical features; Among them, the order-level features include three types of features: continuous features, semantic features, and classification features; the box-level features include two types of features: classification features and continuous features; S12: Convert order-level features into knowledge vectors; The following sub-steps are included: S121: Convert order-level features into raw vectors; S122: converting the original vector into a knowledge vector; S2: Build a vector knowledge base and a pool of vector orders to be selected; An engineer creates a knowledge base, the knowledge base comprising an import side and an export side; Collecting historical container packing orders, wherein the historical container packing orders include import orders and export orders; Convert the import order and export order of the historical container into an import vector and an export vector respectively according to the method of step S1; The import vector is saved to the import side of the knowledge base, and the export vector is saved to the export side of the knowledge base; Convert new import and export orders, import and export orders that have not yet been closed, and unpaired import and export orders into import vectors and export vectors respectively according to the method of step S1; save the import vectors and export vectors into a pool of vector orders to be selected; S3: query recommendation and construct scoring matrix; The following sub-steps are included: S31: querying an order pair according to a given order; If the given order is an import order, the given import order is converted into an import order vector by the method of step S1; and all export vectors that meet the conditions in the candidate vector order pool are queried, and the import order vector converted from the given import order is sequentially combined with each export vector that meets the conditions in the candidate vector order pool to form an order pair, and there are M order pairs in total; On the contrary, if the given order is an export order, the given export order is converted into an export order vector by the method of step S1; and all the import vectors that meet the conditions in the order pool of the vectors to be selected are queried, and the export order vector converted from the given export order is sequentially combined with each import vector that meets the conditions in the order pool of the vectors to be selected to form an order pair, and there are M order pairs in total; S32: construct a scoring matrix to rank the M order pairs; The scoring matrix includes time dimension, box type dimension, weight dimension, customer dimension, frequency dimension, similarity dimension, and distance saving dimension; The following sub-steps are included: S321: Score the order pairs from the time dimension; S322: Score the order pairs based on the box size dimension; S323: scoring the order pairs based on the weight dimension; S324: scoring the order pairs from the customer dimension; S325: Score the order pairs based on the frequency dimension; S326: scoring the order pairs based on the similarity dimension; S327: scoring the order pairs from the perspective of distance saving; The scores of each dimension are added together to obtain the total score of the order pair, and the order pairs are ranked according to their total scores; The order pairs with the highest scores are boxed; S4: Update knowledge base; After the order packing is completed, the new order is packed according to the method described in steps S1-S2 and saved in the knowledge base to update the knowledge base.

2. The method for constructing a box knowledge base based on a large model vector according to claim 1, characterized in that: The specific contents of step S12 are as follows: S121: Convert order-level features into raw vectors; The order-level features are converted into original vectors through three vector encoding methods: position vector, large model semantic vector, and onehot vector. That is, the original order features of continuous features, semantic features, and classification features are converted into original vectors. For order-level features whose feature type is continuous features, they are converted into original vectors through position vectors; in this method, order-level features whose feature type is continuous features specifically refer to the position features of longitude and latitude; Specifically, the longitude and latitude (L, B) in the order-level features are converted into 3D coordinates (X, Y, Z) by an ideal sphere approximation method. , , ; Among them, R is the radius of the earth, L and B are the arc values ​​of longitude and latitude; For order-level features whose feature type is semantic features, they are directly converted into original vectors through the large model vector model; For order-level features whose feature type is categorical features, index each category through one-hot encoding to obtain the original vector; S122: converting the original vector into a knowledge vector; According to actual needs, weight parameters are set for each original vector obtained in step S121, and the weight parameters are recorded as , let the original vector be ; The original vector and the corresponding weight parameter Doing Hadamard product, we get , concatenate all the Hadamard product results to get the knowledge vector, recorded as ; ; in, for Dimension, if the sum of the feature dimensions does not satisfy , add the 0 value dimension.

3. The method for constructing a box knowledge base based on a large model vector according to claim 1, characterized in that: In step S2, the import orders and export orders in the historical boxes are divided into different levels and feature types respectively; the import orders and export orders are converted into original vectors by corresponding vector encoding methods according to the feature types, the original vectors are processed by Hadamard products, and all Hadamard product results are spliced ​​to obtain import vectors and export vectors; Compare the obtained import vectors and export vectors with the existing knowledge vectors in the knowledge base. If there is a knowledge vector in the knowledge base that is the same as the import vector and export vector, then this vector will not be processed; If there is no knowledge vector identical to the import vector or export vector in the knowledge base, the corresponding import vector is saved to the import side of the knowledge base, and the export order is saved to the export side of the knowledge base; According to actual needs, the export orders and import orders in the knowledge base are sequentially formed into order pairs, and each import order corresponds to an export order one by one.

4. The method for constructing a box knowledge base based on a large model vector according to claim 1, characterized in that: The specific contents of step S31 are as follows: If the given order is an import order, the given import order is converted into an import order vector by the method of step S1, and a distance threshold L1 is set; Specifically, the distance between the given import order vector and each import vector in the import side of the knowledge base is calculated by the vector distance formula, and the import vectors in the knowledge base whose distance is less than the distance threshold L1 are saved in the set R1; Query the corresponding export vectors of the import vectors in the set R1 in the knowledge base, and set the distance threshold R2; The distance between all the export vectors in the candidate vector order pool and the export vector corresponding to each import vector in the set R1 is calculated in sequence by using the vector distance formula; the export vectors in the candidate vector order pool whose distance is less than the distance threshold are saved in the set R2; The import order vector of the given import order conversion and each export vector in the set R2 form an order pair, and there are M order pairs in total; On the contrary, if the given order is an export order, the given export order is converted into an export order vector by the method of step S1, and a distance threshold L1 is set; Specifically, the distance between the given export order vector and each export vector in the export side of the knowledge base is calculated by the vector distance formula, and the export vectors in the knowledge base whose distance is less than the distance threshold L1 are saved in the set R1; Query the import vector corresponding to the export vector in the set R1 in the knowledge base, and set the distance threshold R2; The distance between all the import vectors in the candidate vector order pool and the import vector corresponding to each export vector in the set R1 is calculated in sequence by using the vector distance formula; the import vectors in the candidate vector order pool whose distance is less than the distance threshold are saved in the set R2; The export order vector of the given export order conversion and each import vector in the set R2 form an order pair, and there are M order pairs in total.

5. The method for constructing a box knowledge base based on a large model vector according to claim 1, characterized in that: The specific contents of step S32 are as follows: S321: Score the order pairs from the time dimension; Set the upper limit of the bonus points for the time dimension to 10a and the penalty points to Max; where a and Max are positive integers; The two orders in the order pair are Order 1 and Order 2, and the customer points contained in Order 1 and Order 2 are respectively recorded as Point B and Point Points; the scores of M order pairs in the time dimension are calculated using the following formula; ; in, , is the distance between order 1 and order 2, is the average speed between order 1 and order 2, Known, Hyperparameters set; for The driving time between ; Point B and The distance between points is calculated by the navigation system; Get the order pair score of the box dimension, recorded as ; S322: Score the order pairs based on the box size dimension; Set the upper limit of the box dimension to a and the penalty to Max; Traverse each order pair. If the box types of the two orders in the order pair are the same, the maximum bonus point a is obtained. If the box types of the two orders in the order pair are inconsistent, the penalty point Max is subtracted. The order pair score of the box type dimension is obtained, which is recorded as ; S323: scoring the order pairs based on the weight dimension; Set the upper limit of bonus points for the weight dimension to a and the upper limit of penalty points to 2a; Traverse each order pair. If the weights of the two orders in the order pair are equal, the upper limit of a points will be awarded. If the weights of the two orders in the order pair are not equal, the order pair will be penalized according to the following formula; Note that the weights of the two orders in an order pair differ by k times; ; ; in, , is the weight of the goods included in the two orders in the order pair, for and The absolute difference of for The minimum value of , is a single value, the minimum value is ,if and is an element in an array or collection, the minimum value is the minimum value calculated by the min function; Get the order pair score of the box dimension, recorded as ; S324: scoring the order pairs from the customer dimension; Set the upper limit of the bonus score for the customer dimension to a and the penalty score to 0; Traverse each order pair. If the order pair meets the customer's specific business rules, the order pair will get a maximum score of a. If the order pair does not meet the customer's specific business rules, the order pair will not get any points. Get the order pair score of the customer dimension, recorded as ; S325: Score the order pairs based on the frequency dimension; The upper limit of bonus points for the frequency dimension is set to 10a, and the penalty points are set to 0; The distances of M vector pairs are calculated respectively by the vector distance formula, and the number of vector pairs contained in the group to which each vector pair is clustered is the frequency of this vector pair; The scores of M order pairs in the frequency dimension are calculated using the following formula; ; in, To order frequency, is the maximum frequency of order pairs in the knowledge base; Get the order pair score of the frequency dimension, recorded as ; S326: scoring the order pairs based on the similarity dimension; The upper limit of the bonus score for the similarity dimension is set to 10a, and the penalty score is set to 0; Suppose the distance threshold between two order pairs is , is the distance between two orders in an order pair; The distance between two orders in each order pair is calculated using the vector distance formula, and the scores of the M order pairs on the similarity dimension are calculated using the following formula; ; Get the order pair score of the similarity dimension, recorded as ; When score<0 Take 0; S327: scoring the order pairs from the perspective of distance saving; The upper limit of bonus points for saving distance is set to 10a, and the penalty points are set to 0; Traverse each order pair and derive the original distance and the saved distance based on the information of each order in the order pair; The original distance is the mileage spent on completing the delivery of the two orders respectively, and the saved distance is the original distance minus the distance spent on completing the delivery after the two orders are packed together; The scores of each order pair in the customer dimension are calculated according to the following formula, recorded as ; ; in, is a pre-set hyperparameter, d is the distance saved; Rank the order pairs according to their total scores; The total score of the order pair is recorded as score, score= ; The total scores of each order pair are sorted by the sorted function, and the sorting result is the ranking of the M order pairs.

6. The method for constructing a box knowledge base based on a large model vector according to claim 1, characterized in that: The frequency of vector pairs in the statistical knowledge base is calculated through cluster analysis; the distance of each group of vector pairs is calculated using the distance formula, and the vector pairs with the same distance in the knowledge base are clustered into the same group. The frequency of each vector is the number of vector pairs contained in the group.

Citation Information

Cited By

  • Continuous learning waybill matching method based on rules and experience

    CN120031002A