A sustainable learning method for shipping order matching based on both rules and experience

Through a sustainable learning method based on rules and experience, combined with large language models and comparative learning technology, the problems of waste of mileage and low manual scheduling efficiency of sea container transportation are solved, and more accurate waybill matching and energy-saving and emission reduction effects are achieved.

CN120031002BActive Publication Date: 2025-08-08YUKUAI CHUANGLING INTELLIGENT TECH (NANJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510520580.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-08-08
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

In the prior art, there are problems such as serious waste of empty container mileage during shipping container transportation, low manual scheduling efficiency and insufficient matching of rules, especially in complex conditions, which is difficult to meet actual needs.

Method used

A sustainable learning method based on rules and experience is adopted, thresholds are formulated through data analysis, combined with large language models and comparative learning technology, waybill vectors are generated, and route angles are comprehensively considered, empty box mileage and time intervals are completed to match the waybills.

Benefits of technology

It improves the accuracy and efficiency of waybill matching, conforms to the habits of dispatchers, has the ability to continue learning, solves the problems of waste of empty box mileage and low manual scheduling efficiency, and achieves more accurate waybill matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120031002B_ABST
    Figure CN120031002B_ABST
Patent Text Reader

Abstract

This invention provides a sustainable learning method for waybill matching based on both rules and experience, addressing the complex, time-consuming, and labor-intensive manual scheduling of waybills during ocean shipping. From a rule-based perspective, this method considers three key factors: the percentage of empty container miles saved, the remaining time interval, and the route angle. A comprehensive ranking is performed based on these three factors. From an empirical perspective, a large language model is established to vectorize waybills, extracting experiences similar to historical orders, and then sorting them based on the difference values. This comprehensive ranking, combining both rules and experience, allows for waybill matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of logistics and e-commerce, and in particular to a waybill matching method based on sustainable learning from both rule and experience perspectives. Background Art

[0002] With the development of international trade, the volume of import and export cargo has increased dramatically. Ocean freight, as the most cost-effective mode of international transportation, sees a large number of containers entering and leaving ports daily. Import containers are transported by truck from the port to the customer's door for unpacking and unloading, and then returned to the port empty. Exports, on the other hand, begin with an empty container taken from the port to the customer's door, where the cargo is loaded and then delivered to the port. Trucks are the primary mode of container transportation for both import and export, and empty containers are often transported throughout the process. Studies have shown that trucks, as energy-intensive transportation vehicles, account for nearly 65% of China's annual gasoline consumption. Therefore, a rational algorithm to reduce the number of empty container miles traveled during container transport can both economically save fuel and socially contribute to carbon emissions reductions in the transportation industry.

[0003] Transport companies use manual dispatching to select import and export waybills from currently unprocessed shipping documents and match them. This way, after unpacking the import waybill at the customer's door, the empty container does not need to be transported back to the terminal. Instead, it is transported directly to the customer's door for loading and then returned to the terminal with the goods.

[0004] This manual dispatching method requires filtering through a large number of waybills to identify the appropriate ones, which is a very labor-intensive process. If every waybill were compared, for m import waybills and n export waybills, there would be m*n possible combinations. In reality, dispatchers do not perform such computationally intensive comparisons, but instead perform matching operations based on past experience.

[0005] However, using a system for matching can lead to overly rigid rules. Relying solely on pre-set rules can lead to unsatisfactory recommendations in real-world applications. This is because real-world scenarios often involve complex conditions that are difficult to clearly define and extract in advance. For example, in scenarios involving export goods, if the goods are food, the containers used for loading them should not be containers that have previously loaded toxic chemicals (especially during import). Such implicit and specific applicability criteria are difficult to fully address with simple rules. Summary of the Invention

[0006] The purpose of the present invention is to address the shortcomings of the existing technology and to propose a waybill matching method based on sustainable learning from both rules and experience perspectives.

[0007] To achieve the above object, the present invention adopts the following technical solutions:

[0008] S1. Analyze the import and export waybill groups in the historical data and formulate rules. The steps are as follows:

[0009] S11. Calculate the data distribution of three dimensions: the percentage of empty-box mileage saved, the remaining time interval, and the route angle;

[0010] S12. Calculate the thresholds for the three dimensions of the ratio of empty-box mileage saved, the remaining time interval, and the route angle;

[0011] S13. Filter out import and export orders that do not meet the threshold, and retain those that meet the threshold;

[0012] S2. Using RAG technology, we create a large language model experience knowledge base based on the Chinese language model. The steps are as follows:

[0013] S21. Use the embedding capabilities of the large speech model to vectorize the text information in the waybill data.

[0014] S22. Combine the numerical dimension and the vectorized text information to generate a waybill vector.

[0015] S23. Convert the waybills in the import and export waybill group in the historical data into vectors, save the mapping relationship between the import vector and the export vector as a piece of knowledge in the large language model experience knowledge base;

[0016] S3. Use contrastive learning techniques to create an empirical knowledge base based on industry information. This is to compensate for the fact that large language models only have generalized understanding capabilities and are not sensitive to industry information. The steps are as follows:

[0017] S31. Use historical waybill group data to train the model;

[0018] S32. Using the trained model, convert the import and export waybill group information into a comparison vector;

[0019] S33. Calculate the difference between import and export waybills and experience;

[0020] S34. Sort the difference values,

[0021] S4. Matching shipping orders based on rules and experience knowledge base. The steps are as follows:

[0022] S41. For waybills that meet the rules (i.e., those that can be paired with the waybills to be matched), sort them by route angle in ascending order, empty container mileage percentage in descending order, and remaining time interval in ascending order.

[0023] S42. Search the waybill that matches the waybill to be matched from the large language model experience knowledge base as the matching result

[0024] S43. For each matching result in step S42, calculate the similarity with the knowledge in the industry information experience knowledge base; comprehensively use the similarity with the industry information experience knowledge and the similarity with the large language model knowledge to rank;

[0025] S44. Based on the results of step S41 and step S43, prioritize the waybills that meet both the matching rules and experience.

[0026] Compared with the prior art, the present invention has the following beneficial effects:

[0027] 1. This invention recommends matching solutions based on both rules and experience, complementing each other and improving accuracy. It also better fits the work habits of dispatchers, significantly increasing the adoption rate of solutions.

[0028] 2. The rules and experience used in the present invention are automatically adjusted according to the actual waybill matching plan and have the ability to continuously learn.

[0029] 3. The empirical solution of the present invention uses both a large language model and a model trained by contrastive learning. The large language model enables a generalized understanding of Chinese semantics; contrastive learning enables precise matching with business waybill data.

[0030] The large language model is used to compare the similarity of waybills themselves, while contrastive learning determines the similarity of entire pairs of import and export waybills. This two-round comparison and filtering improves query efficiency.

[0031] 4. In the experience matching process of the present invention, the vector fusion solution of the numerical dimension and the text dimension solves the problem of inaccurate numerical similarity judgment of large language models.

[0032] 5. In the experience matching process of the present invention, the inverse geographical transformation and time processing in the comparative learning process solve the problem of insufficient information when using comparative learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a system module diagram of the present invention;

[0034] Figure 2 A diagram showing the learning process of the rule module of the present invention;

[0035] Figure 3 This is a diagram of the matching process of the rule module of the present invention;

[0036] Figure 4 A learning process diagram of the experience module of the present invention;

[0037] Figure 5 This is a diagram of the matching process of the experience module of the present invention; DETAILED DESCRIPTION

[0038] The present invention provides a waybill matching method based on sustainable learning from both rule and experience perspectives. The specific steps are as follows:

[0039] S100. Study of historical waybill group:

[0040] S101. Interface input parameters:

[0041] -Import waybill number;

[0042] -Import container model;

[0043] - Description of the imported goods;

[0044] - Latitude and longitude of the import port;

[0045] -Import customer number;

[0046] - Import customer door point latitude and longitude;

[0047] - Arrival time required by import customers;

[0048] -Export waybill number;

[0049] -Export container model;

[0050] - Description of the exported goods;

[0051] - Latitude and longitude of the export port;

[0052] - Export customer number;

[0053] -Latitude and longitude of export customer gate;

[0054] - Export customers require arrival time.

[0055] S102.Interface return value: None.

[0056] S103. Process description:

[0057] The facade module passes the request to the historical waybill group learning module, and then passes the waybill group information to the rule module and experience module respectively.

[0058] The rule module and experience module will process and calculate according to their respective requirements, and the results will serve as the basis for subsequent matching processing. The results will be saved in the database.

[0059] S200. Synchronization of waybill to be assigned:

[0060] S201. Interface input parameters:

[0061] - Waybill number;

[0062] - Waybill type (import waybill / export waybill);

[0063] -Container model;

[0064] - description of the goods;

[0065] -Port latitude and longitude;

[0066] -Customer number;

[0067] - Customer door point latitude and longitude;

[0068] -Customer requested arrival time.

[0069] S202. Interface return value: None.

[0070] S203. Process description:

[0071] The facade module saves the waybill data to be loaded into the database for use by the rule module and experience module in waybill matching.

[0072] S204. Waybill Matching:

[0073] a. Interface input parameters:

[0074] -Import waybill number.

[0075] b. Interface return value: The matching interface returns information (matching results). A list sorted by matching priority. The structure of each matching result is as follows:

[0076] Table 1. Matching priority sorting list

[0077]

[0078] c. Description of the processing process:

[0079] The facade module passes the request to the waybill matching module, and then passes the import waybill number to the rule module and experience module respectively.

[0080] The rule module and experience module will perform matching according to their respective logics. The waybill matching module integrates the export waybill results matched by the two logics and sorts them according to the comprehensive score.

[0081] The specific steps of the rule module are as follows:

[0082] 1. The calculation steps for the waybill group information are as follows:

[0083] a. Using the Earth's plane distance calculation formula, use the "Import Port Latitude and Longitude" and "Import Customer Door Latitude and Longitude" to calculate the distance between the import waybill's port and the customer door. This distance is recorded as d1, in kilometers.

[0084] The formula is as follows:

[0085] d1 = R*arccos(cos(latitude A)cos(latitude B)cos(longitude A - longitude B)+sin(latitude A)sin(latitude B)

[0086] A represents the longitude and latitude of the import port, and B represents the longitude and latitude of the import customer's door. There is no order between the two. R is the radius of the earth, which is 6371 and is measured in kilometers.

[0087] b. Using the Earth's plane distance calculation formula, use the "Export Port Latitude and Longitude" and "Export Customer Door Latitude and Longitude" to calculate the distance between the export waybill's port and the customer door. This distance is recorded as d2 in kilometers.

[0088] d2 = R*arccos(cos(latitude A)cos(latitude B)cos(longitude A - longitude B)+sin(latitude A)sin(latitude B)

[0089] A represents the latitude and longitude of the export port, and B represents the latitude and longitude of the export customer's door point. There is no order between the two.

[0090] c. Using the Earth's plane distance calculation formula, use the "Import Customer Gate Latitude and Longitude" and "Export Customer Gate Latitude and Longitude" to calculate the distance between the import and export customer gates. This distance is recorded as d3 in kilometers.

[0091] d3 = R*arccos(cos(latitude A)cos(latitude B)cos(longitude A - longitude B)+sin(latitude A)sin(latitude B)

[0092] A represents the longitude and latitude of the import customer's door point, and B represents the longitude and latitude of the export customer's door point.

[0093] d. The ratio of empty tank mileage saved = (d1+d2-d3) / (d1+d2).

[0094] e. Use "Import Customer Door Latitude and Longitude" - "Import Port Latitude and Longitude" as the import waybill vector, recorded as: Use "export customer door latitude and longitude" - "export port latitude and longitude" as the export waybill vector, recorded as: Use the following formula to calculate the angle:

[0095]

[0096] f. The remaining time interval is the effective interval between the "export customer's required arrival time" and the "import customer's required arrival time." Effective here means that the cargo can arrive at the export customer's door in time at a speed of 50 km / h one hour after unloading at the import customer's door. For times that do not fall within the effective time interval, a penalty is added. The formula for calculating the remaining time interval is as follows, where timestamp1 and timestamp2 are the import and export customer's required arrival times, respectively:

[0097]

[0098] Among them, 96 is the penalty value and rst is the remaining time interval.

[0099] g. Save the calculation results to the database. The table structure is as follows:

[0100] Table 2. order_pair_for_rule

[0101] No. Field Name type illustrate 1 id bigint(20) Primary Key 2 import_order_no varchar(32) Import waybill number 3 export_order_no varchar(32) Export waybill number 4 saving_empty_ran_rate double Saving the proportion of empty box mileage 5 angle_degree_of_routes double Route angle 6 time_gap int Remaining time interval

[0102] 2. The threshold calculation process is as follows:

[0103] Since the current data is a set of waybills that have been successfully matched in the past, the matching methods are reasonable. Therefore, it can be guaranteed that:

[0104] The mileage saved by running with an empty tank must be greater than 0.

[0105] The angle between the routes must be acute.

[0106] The remaining time interval must be greater than 0, and no penalty value is added.

[0107] The steps for calculating the route angle threshold are as follows:

[0108] a. Get the minimum and maximum values of the route angle in the order_pair_for_rule table.

[0109] Calculation: Group interval = (maximum value - minimum value) / 20.

[0110] b. Traverse each record in order_pair_for_rule and obtain the route angle value.

[0111] Calculation: Group number = floor((current angle - minimum value) / group distance).

[0112] Count the number of records in each group: add 1 to the count of this group number.

[0113] c. Calculate the threshold value of the number of records:

[0114] threshold = floor(number of records in the order_pair_for_rule table * 0.95).

[0115] d. Traverse in ascending order of group numbers to find the target group number n such that n satisfies the following conditions:

[0116]

[0117] where is the number of records in the m-th group.

[0118] e. When amount < threshold:

[0119] Arrange the elements of the (n + 1)-th group in ascending order and take the element at the (threshold - amount) position.

[0120] The value of this element is the threshold.

[0121] f. When amount = threshold, take the maximum value of the elements in the n-th group as the threshold.

[0122] Steps for calculating the threshold of the proportion of empty container running mileage saved are as follows:

[0123] a. Obtain the minimum value and the maximum value of the proportion of empty container running mileage saved in the order_pair_for_rule table.

[0124] Calculate: group interval = (maximum value - minimum value) / 20.

[0125] b. Traverse each record in order_pair_for_rule to obtain the interval value of the proportion of empty container running mileage saved.

[0126] Calculate: group number = floor((current proportion of empty container running mileage saved - minimum value) / group interval).

[0127] Count the number of records in each group: increment the count for this group number by 1.

[0128] c. Calculate the threshold of the number of records:

[0129] threshold = floor(number of records in the order_pair_for_rule table * 0.95).

[0130] d. Traverse in ascending order of group numbers to find the target group number n such that n satisfies the following conditions:

[0131]

[0132] where is the number of records in the m-th group.

[0133] e. When the amount < threshold:

[0134] Arrange the elements of the (n + 1)-th group in ascending order, and take the element at the (threshold - amount)-th position.

[0135] The value of this element is the threshold.

[0136] f. When the amount = threshold, take the maximum value of the elements in the n-th group as the threshold.

[0137] The steps for calculating the threshold of the remaining time intervals are as follows:

[0138] a. Obtain the minimum value and the maximum value of the remaining time intervals in the order_pair_for_rule table.

[0139] Calculate: Group interval = (maximum value - minimum value) / 20.

[0140] b. Traverse each record in order_pair_for_rule to obtain the remaining time interval value.

[0141] Calculate: Group number = floor((current remaining time interval - minimum value) / group interval).

[0142] Count the number of records in each group: increment the count for this group number by 1.

[0143] c. Calculate the threshold of the number of records:

[0144] threshold = floor(number of records in the order_pair_for_rule table * 0.95).

[0145] d. Traverse in ascending order of the group number to find the target group number n that satisfies the following condition:

[0146]

[0147] where is the number of records in the m-th group.

[0148] e. When the amount < threshold:

[0149] Arrange the elements of the (n + 1)-th group in ascending order, and take the element at the (threshold - amount)-th position.

[0150] The value of this element is the threshold.

[0151] f. When the amount = threshold, take the maximum value of the elements in the n-th group as the threshold.

[0152] After calculating the remaining time interval, route angle, and the threshold for saving the empty box mileage ratio, the data will be saved in the database. The table structure is as follows:

[0153] Table 3. rule_threshold

[0154]

[0155]

[0156] 3. The specific steps for rule-based waybill matching are as follows:

[0157] (1) Based on the import waybill number, obtain the import container model and the import customer's required arrival time. Then obtain the export waybill from the database's pending loading pool. The obtained export waybill must meet the following conditions:

[0158] Export waybill container model = import waybill container model;

[0159] The customer-required arrival time for export waybills is greater than the customer-required arrival time for import waybills.

[0160] (2) Traverse each export waybill and calculate its "saving empty container mileage ratio", "remaining time interval", and "route angle" information compared with the import waybill to be matched. The calculation process is the same as the historical waybill group learning function.

[0161] (3) Obtain the thresholds for the three dimensions of "saving empty container mileage ratio", "remaining time interval", and "route angle" from the rule_threshold table in the database, and filter out the waybills that do not meet the threshold requirements.

[0162] (4) For export waybills that meet the threshold conditions, they are sorted in ascending order according to the route angle, descending order of the proportion of empty container mileage saved, and ascending order of the remaining time interval.

[0163] The specific steps of the experience module are as follows:

[0164] 1. Vectorization of large language models is achieved through embedding. Embedding is the process of converting unstructured information (such as images and text) into vectors. Embedding uses deep learning training to project discrete real-world data onto a high-dimensional data space, reflecting real-world similarities through the distance between data in this space.

[0165] The present invention selects the open source Chinese text embedding model m3e-base to perform the Embedding operation.

[0166] 2. The steps for vectorizing import waybills using a large language model are as follows:

[0167] a. Perform an Embedding operation on the "Import Goods Description" to generate a 508-dimensional vector.

[0168] b. Multiply each latitude and longitude of the "Import Port Latitude and Longitude" and "Import Customer Gate Latitude and Longitude" by 2000 to generate four float numbers.

[0169] c. Increase the 508-dimensional vector from step a by four dimensions, using the four numbers obtained in step b as the values for each dimension. This produces a new 512-dimensional vector. This 512-dimensional vector is the vector corresponding to the import order.

[0170] 3. The steps for vectorizing export waybills using a large language model are as follows:

[0171] a. Perform an Embedding operation on the "Export Goods Description" to generate a 508-dimensional vector.

[0172] b. Multiply each latitude and longitude of the "Export Port Latitude and Longitude" and "Export Customer Gate Latitude and Longitude" by 2000 to generate four float numbers.

[0173] c. Increase the 508-dimensional vector from step a by four dimensions, using the four numbers obtained in step b as the values for each dimension. This produces a new 512-dimensional vector. This 512-dimensional vector is the vector corresponding to the export orders.

[0174] 4. Contrastive learning is a machine learning method that aims to learn useful representations or features by comparing the similarities and differences between samples. Simply put, in a multidimensional representation, similar samples are brought closer together and different samples are pulled apart, so that the multidimensional representation of the samples can be used to represent the characteristic differences between the sample data.

[0175] In contrastive learning, self-supervised learning is generally the mainstream method. Training is performed without counterexamples, which is suitable for the scenario of waybill matching.

[0176] Taking the import and export waybills as a whole, we train a model based on business features using the open-source algorithm ESimCSE. The specific steps are as follows:

[0177] a. Use the reverse geographic transformation function provided by Baidu Maps to convert the "import port longitude and latitude", "import customer door longitude and latitude", "export port longitude and latitude", and "export customer door longitude and latitude" into specific address text information, and save them in the "province, city, district, street, and house number" format, respectively named "import port address", "import customer door address", "export port address", and "export customer door address".

[0178] b. Classify the "import customer required arrival time" and "export customer required arrival time" into three categories: "morning", "afternoon", and "night" according to hourly information and save them as "import time period" and "export time period" respectively.

[0179] c. Subtract the "Import Customer Required Arrival Time" from the "Export Customer Required Arrival Time" to get the time difference in hours.

[0180] d. Use "import port address", "import customer door address", "export port address", "export customer door address", "import time", "export time", "import goods description", and "export goods description" as the content, splice them into a sentence as input to train the model.

[0181] 5. Comparative learning vectorization: The data processing is consistent with the model training process. The calculated "import port address," "import customer point address," "export port address," "export customer point address," "import time period," and "export time period" are combined with the "import goods description" and "export goods description" to form a sentence. This sentence is then passed to the trained model, resulting in a 1536-dimensional vector.

[0182] 6. Save the import and export waybill group and the generated "import waybill vector", "export waybill vector", and "comparative learning vector" into the database as an experience knowledge base. The table structure is as follows:

[0183] Table 4. experience_lib

[0184] No. Field Name type illustrate 1 id bigint(20) Primary Key 2 import_order_no varchar(32) Import waybill number 3 export_order_no varchar(32) Export waybill number 4 import_vector vector(512) Import waybill vector 5 export_vector vector(512) Export waybill vector 6 simcse_vector vector(1536) Waybill group vector for contrastive learning 7 create_datetime timestamp Knowledge creation time

[0185] 7. The steps for the waybill matching function based on experience are as follows:

[0186] (1) Obtain detailed information about the import waybill based on the import waybill number. The steps to quantize the import waybill are as follows:

[0187] a. Perform an Embedding operation on the "Import Goods Description" to generate a 508-dimensional vector.

[0188] b. Multiply each latitude and longitude of the "Import Port Latitude and Longitude" and "Import Customer Gate Latitude and Longitude" by 2000 to generate four float numbers.

[0189] c. Increase the 508-dimensional vector from step a by four dimensions, using the four numbers obtained in step b as the values for each dimension. This produces a new 512-dimensional vector. This 512-dimensional vector is the vector corresponding to the import order.

[0190] (2) Obtain experience similar to that of import waybills. The specific steps are as follows:

[0191] Using this import order vector, find the experience whose Euclidean distance to the import_vector field is less than 1 from the knowledge base table experience_lib. And record the distance as vector_d1

[0192] Euclidean distance formula:

[0193]

[0194] (3) Obtain an export waybill similar to the one in experience from the database’s loading pool. The obtained export waybill must meet the following conditions:

[0195] Export waybill container model = import waybill container model;

[0196] The customer's requested arrival time for export waybills is greater than the customer's requested arrival time for import waybills;

[0197] The Euclidean distance between the vector of the export waybill and the export vector export_vector field in the experience information is less than or equal to 1.

[0198] This distance is recorded as vector_d2.

[0199] (4) Traverse each export waybill in step (3) and calculate the difference between the import and export waybill and the experience. The specific steps are as follows:

[0200] a. Use the reverse geographic transformation function provided by Baidu Maps to convert the "import port longitude and latitude", "import customer door longitude and latitude", "export port longitude and latitude", and "export customer door longitude and latitude" into specific address text information, and save them in the "province, city, district, street, and house number" format, respectively named "import port address", "import customer door address", "export port address", and "export customer door address".

[0201] b. Classify the "import customer required arrival time" and "export customer required arrival time" into three categories: "morning", "afternoon", and "night" according to hourly information and save them as "import time period" and "export time period" respectively.

[0202] c. Subtract the "Import Customer Required Arrival Time" from the "Export Customer Required Arrival Time" to get the time difference in hours.

[0203] d. Use "import port address", "import customer door address", "export port address", "export customer door address", "import time period", "export time period", "import goods description", and "export goods description" as the content and splice them into a sentence.

[0204] e. Then pass this sentence into the trained model to obtain a 1536-dimensional vector.

[0205] f. Calculate the Euclidean distance between the vector obtained in step e and the simcse_vector in the empirical table. This distance is the difference between the import and export waybill and the empirical value. It is denoted as vector_d3

[0206] (5) Using the vector_d1, vector_d2, and vector_d3 values calculated in steps (2) to (4), use the geometric mean as the comprehensive difference value.

[0207]

[0208] (6) For all export orders, sort them in ascending order according to the total difference value total_diff. For export orders with the same total difference value, the experience with more times is given priority, and the latest experience is used as the recommended result for matching.

[0209] The detailed steps of the order matching module are as follows:

[0210] The order matching functions of the rule module and the experience module are called separately to calculate the waybill matching. The export waybill results from the two logic matching are then integrated and sorted according to the comprehensive evaluation score. The sorting rules are as follows:

[0211] First, we prioritize matching results that are based on both rules and experience. Among these results, we use the order of the export waybills in the rule module for recommendation.

[0212] Secondly, recommendations only exist based on the matching results of the experience module. Recommendations are made in the order of experience matching.

[0213] Finally, recommendations only exist based on the matching results of the rule module. Recommendations are made in the order in which the rules are matched.

[0214] The top 10 sorted export waybills are returned as the final result.

[0215] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A waybill matching method based on continuous learning from both rule-based and experience-based perspectives, characterized by: S1. Analyze the import and export waybill groups in the historical data and formulate rules. The steps are as follows: S11. Calculate the data distribution of three dimensions: the percentage of empty-box mileage saved, the remaining time interval, and the route angle; S12. Calculate the thresholds for the three dimensions of the ratio of empty-box mileage saved, the remaining time interval, and the route angle; S13. Filter out import and export orders that do not meet the threshold, and retain those that meet the threshold; S2. Using RAG technology, we create a large language model experience knowledge base based on the Chinese language model. The steps are as follows: S21. Use the embedding capabilities of the large speech model to vectorize the text information in the waybill data. S22. Combine the numerical dimension and the vectorized text information to generate a waybill vector. S23. Convert the waybills in the import and export waybill group in the historical data into vectors, save the mapping relationship between the import vector and the export vector as a piece of knowledge in the large language model experience knowledge base; S3. Use contrastive learning techniques to create an empirical knowledge base based on industry information. This is to compensate for the fact that large language models only have generalized understanding capabilities and are not sensitive to industry information. The steps are as follows: S31. Use historical waybill group data to train the model; S32. Using the trained model, convert the import and export waybill group information into a comparison vector; this vector serves as a piece of knowledge in the industry information experience knowledge base; S33. Calculate the difference between import and export waybills and experience; S34. Sort the difference values, S4. Matching shipping orders based on rules and experience knowledge base. The steps are as follows: S41. For waybills that meet the rules, which are paired with the waybills to be matched, sort them by route angle in ascending order, empty container mileage saved in descending order, and remaining time interval in ascending order. S42. Search the large language model experience knowledge base for a waybill that matches the waybill to be matched as the matching result; the matching result includes the matching result waybill information, the similarity between the waybill to be matched and the large language model experience knowledge, and the similarity between the waybill corresponding to the matching result and the large language model experience knowledge; S43. For each matching result in step S42, calculate the similarity with each piece of knowledge in the experience knowledge base of industry information; comprehensively use the similarity with each piece of knowledge in the experience knowledge base of industry information and the similarity of the experience knowledge of the large language model to sort; S44. Based on the results of step S41 and step S43, prioritize the waybills that meet both the matching rules and experience.

2. The method for matching shipping orders based on continuous learning from both rule-based and experience-based perspectives as claimed in claim 1, characterized in that: The steps for calculating the empty box mileage ratio in S1 are as follows: A1. Using the Earth's plane distance calculation formula, use the "Import Port Latitude and Longitude" and "Import Customer Door Latitude and Longitude" to calculate the distance between the import waybill's port and the customer door. This distance is recorded as d1, in kilometers. The formula is as follows: d1 = R*arcos(cos(latitude A)cos(latitude B)cos(longitude A - longitude B)+sin(latitude A)sin(latitude B) A represents the latitude and longitude of the import port, and B represents the latitude and longitude of the import customer's door. There is no order between the two. R is the radius of the earth, which is 6371 and is expressed in kilometers. B1. Using the Earth's plane distance calculation formula, use the "Export Port Latitude and Longitude" and "Export Customer Door Latitude and Longitude" to calculate the distance between the export waybill's port and the customer door. This distance is recorded as d2, in kilometers. d2=R*arcos(cos(latitude A)cos(latitude B)cos(longitude A-longitude B)+sin(latitude A)sin(latitude B) A represents the latitude and longitude of the export port, and B represents the latitude and longitude of the export customer's door point. There is no order between the two. C1. Calculate the distance between the import and export customer points using the "Import Customer Point Latitude and Longitude" and "Export Customer Point Latitude and Longitude" formulas based on the Earth's plane distance calculation formula. This distance is recorded as d3 in kilometers. d3 = R*arcos(cos(latitude A)cos(latitude B)cos(longitude A - longitude B)+sin(latitude A)sin(latitude B) D1. The ratio of empty tank mileage saved = (d1+d2-d3) / (d1+d2).

3. The method for matching shipping orders based on continuous learning from both rule-based and experience-based perspectives as claimed in claim 1, characterized in that: The remaining time interval in S1 is calculated as follows: This refers to the valid interval between the "Export Customer Required Arrival Time" and the "Import Customer Required Arrival Time." Valid here means that the cargo can arrive at the export customer's door in time at a speed of 50 km / h one hour after unloading at the import customer's door. For times that are not within the valid interval, a penalty value is added. The remaining time interval is calculated as follows, where timestamp1 and timestamp2 are the import and export customer's required arrival times, respectively. Among them, 96 is the penalty value and rst is the remaining time interval.

4. The method for matching shipping orders based on continuous learning from both rule-based and experience-based perspectives as claimed in claim 1, characterized in that: The steps for calculating the route angle in S1 are as follows: Use "Import Customer Door Longitude and Latitude" - "Import Port Longitude and Latitude" as the import waybill vector, recorded as: Use "export customer door latitude and longitude" - "export port latitude and longitude" as the export waybill vector, recorded as: Use the following formula to calculate the angle; 5. The method for matching shipping orders based on continuous learning from both rule-based and experience-based perspectives as claimed in claim 1, characterized in that: S2 uses the embedding capability of the large speech model to vectorize the text information in the waybill data. The steps for vectorizing import waybills are as follows: A2. Perform an embedding operation on "Imported Goods Description" to generate a 508-dimensional vector. B2. Multiply each latitude and longitude in "Import Port Latitude and Longitude" and "Import Customer Gate Latitude and Longitude" by 2000 to generate four float values. C2. Increase the 508-dimensional vector in step A2 by four dimensions, using the four numbers obtained in step B2 as the values for each dimension. This generates a new 512-dimensional vector. This 512-dimensional vector is the vector corresponding to the import order. The steps for quantizing export waybills are as follows: A3. Perform an Embedding operation on the "Export Goods Description" to generate a 508-dimensional vector. B3. Multiply each latitude and longitude in the "Export Port Latitude and Longitude" and "Export Customer Gate Latitude and Longitude" by 2000 to generate four float values. C3. Add four dimensions to the 508-dimensional vector in step A3, using the four numbers obtained in step B3 as the values for each dimension. This generates a new 512-dimensional vector. This 512-dimensional vector is the vector corresponding to the export orders.

6. The method for matching shipping orders based on continuous learning from both rule-based and experience-based perspectives as claimed in claim 1, characterized in that: The calculation steps for establishing the comparison vector in S3 are as follows: A4. Using the inverse geographic transformation function provided by Baidu Maps, convert the "Import Port Latitude and Longitude," "Import Customer Point Latitude and Longitude," "Export Port Latitude and Longitude," and "Export Customer Point Latitude and Longitude" into specific address text information and save them in the "Province, City, District, Street, and House Number" format, respectively named "Import Port Address," "Import Customer Point Address," "Export Port Address," and "Export Customer Point Address." B4. Categorize the "Import Customer Requested Arrival Time" and "Export Customer Requested Arrival Time" by hour into three categories: "Morning," "Afternoon," and "Night," and save them as "Import Time" and "Export Time," respectively. C4. Subtract "Import Customer Requested Arrival Time" from "Export Customer Requested Arrival Time" to calculate the time difference in hours. D4. Use "import port address," "import customer door address," "export port address," "export customer door address," "import time," "export time," "import goods description," and "export goods description" as the content, concatenated into a sentence as input to form a contrast vector for model training.

7. The method for matching shipping orders based on continuous learning from both rule-based and experience-based perspectives as claimed in claim 1, characterized in that: The steps for calculating the difference value in S3 are as follows: A5. Use the reverse geo-conversion function provided by Baidu Maps to convert the "Import Port Latitude and Longitude," "Import Customer Point Latitude and Longitude," "Export Port Latitude and Longitude," and "Export Customer Point Latitude and Longitude" into specific address text information. Save them in the "Province, City, District, Street, and House Number" format, and name them "Import Port Address," "Import Customer Point Address," "Export Port Address," and "Export Customer Point Address," respectively. B5. Categorize the "Import Customer Requested Arrival Time" and "Export Customer Requested Arrival Time" by hour into three categories: "Morning," "Afternoon," and "Night," and save them as "Import Time" and "Export Time," respectively. C5. Subtract "Import Customer Requested Arrival Time" from "Export Customer Requested Arrival Time" to calculate the time difference in hours. D5. Combine "Import Port Address," "Import Customer Door Address," "Export Port Address," "Export Customer Door Address," "Import Time," "Export Time," "Import Goods Description," and "Export Goods Description" into a single sentence. E5. Then pass this sentence into the trained model to obtain a 1536-dimensional vector; F5. Calculate the Euclidean distance between the vector obtained in step E5 and the simcse_vector in the empirical table. This distance is the difference between the import and export waybill and the empirical data, recorded as vector_d3.

Citation Information

Patent Citations

  • Scenarized high-efficiency waybill matching method for reducing no-load rate

    CN116502985A

  • Lane alliance resource scheduling method and device, electronic equipment and storage medium

    CN118552015A