A logistics transportation cost accounting method, system, device and medium
By integrating order demand and dynamic cost data, constructing multi-stage features and using machine learning models, the problem of neglecting factors in traditional logistics and transportation cost accounting is solved, enabling accurate cost prediction and dynamic adjustment, and improving operational efficiency and transparency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI MOULI TECHNOLOGY CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional logistics transportation cost accounting methods fail to fully consider dynamic factors during transportation, such as changes in road conditions, differences in toll fees, and labor costs, resulting in inaccurate accounting results that affect the decision-making of logistics transportation platforms, cargo owners, and carriers.
By integrating cargo owner order demand information with real-time dynamic cost data, the characteristics of the pickup, transportation, and delivery stages are constructed. Multilayer perceptrons and recurrent neural networks are used for encoding, and combined with quantile regression models and preset fine-tuning models, an accurate cost prediction and adjustment mechanism is generated. The interaction effects of each stage are considered to achieve refined and dynamic cost prediction.
It enables accurate prediction of logistics and transportation costs, reduces abnormal quotes, improves operational efficiency and transparency, provides cargo owners and carriers with more reasonable and reliable pricing services, and optimizes resource allocation and cost control.
Smart Images

Figure CN121581740B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of cost accounting, specifically to a method, system, equipment, and medium for calculating logistics and transportation costs. Background Technology
[0002] With the rapid development of the logistics industry, logistics and transportation have become increasingly important in economic activities. They connect all aspects of production and consumption, promoting the circulation of goods and economic growth. Efficient and accurate logistics and transportation cost accounting is crucial for all parties involved, including logistics platforms, shippers, and carriers. Accurate cost accounting helps shippers plan costs rationally and enables carriers to better manage operating costs and improve economic efficiency. Simultaneously, for logistics platforms, accurate cost accounting helps improve service quality and market competitiveness.
[0003] There are several traditional methods for calculating logistics transportation costs. One common method is to calculate costs based on the weight or volume of the goods. This method is simple and direct but doesn't consider other factors during transportation. Another method determines costs based on fixed routes and transportation distances, ignoring potential changes in road conditions and toll differences during transport. These traditional methods have significant drawbacks. They often fail to adequately consider order demand information and dynamic cost data, leading to inaccurate calculations. They cannot flexibly adjust to dynamic factors such as real-time road tolls, congestion, and labor costs, making the calculated costs difficult to reflect actual transportation costs and causing confusion for logistics platforms, shippers, and carriers in their decision-making. Summary of the Invention
[0004] This application provides a method, system, equipment, and medium for calculating logistics transportation costs, which can more accurately calculate logistics transportation costs, take into account multiple influencing factors, improve the accuracy and reliability of cost prediction, and provide cost optimization suggestions.
[0005] The first aspect of this application provides a method for calculating logistics transportation costs, applied to a logistics transportation platform, the method comprising:
[0006] The system receives order demand information from shippers and dynamic cost data from carriers. It then correlates and merges the order demand information and the dynamic cost data to obtain fused data. Based on the fused data, it constructs characteristics for the pickup stage, transportation stage, delivery stage, and manual operation. The order demand information includes cargo type, weight, volume, origin, destination, time requirement, and cargo attributes. The dynamic cost data includes toll / congestion status, labor costs, and vehicle type information for each road segment.
[0007] The first predicted cost is obtained by the pickup cost prediction sub-model based on the pickup stage characteristics, the second predicted cost is obtained by the transportation cost prediction sub-model based on the transportation stage characteristics, and the third predicted cost is obtained by the delivery cost prediction sub-model based on the delivery stage characteristics. Based on the preset pricing standard and the workload in the order, the manual operation cost is calculated.
[0008] The first predicted cost, the second predicted cost, the third predicted cost, and the manual operation cost are input as features into a preset fine-tuning model to obtain a preliminary predicted total cost. The preset fine-tuning model is used to adjust the total cost based on the interaction effect between the costs of each stage.
[0009] Using a preset quantile regression model, the median cost, the first target quantile cost, and the second target quantile cost are predicted based on the fused data. A price range is determined based on the first target quantile cost, the second target quantile cost, and a preset buffer coefficient. It is then determined whether the preliminary predicted total cost is within the price range. The first target quantile cost is less than the predicted median cost, and the second target quantile cost is greater than the predicted median cost.
[0010] If the preliminary total cost is not within the price range, the median of the predicted cost is used as the final total cost; if the preliminary total cost is within the price range, the preliminary total cost is used as the final total cost.
[0011] By adopting the above technical solutions, a refined and modular breakdown and prediction of total freight costs is achieved, far exceeding the extensive model of traditional fixed rates. Integrating real-time dynamic cost data allows quotations to reflect current market and road conditions, rather than being based on static historical data, thus more closely aligning with actual costs. It effectively avoids the problem of abnormally high or low quotations due to accidental prediction biases (outliers), making quotations more robust. It helps logistics platforms and carriers understand cost structures more accurately, thereby achieving better resource allocation and cost control. It provides valuable data insights for platform operations, which can be used to optimize route planning, dynamically adjust pricing strategies at different times, and guide carriers to choose more economical modes of transportation. It provides shippers with more reasonable, transparent, and competitive quotations, improving their experience; and provides carriers with quotations closer to actual costs, ensuring their profits and increasing carrier loyalty.
[0012] Optionally, constructing pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes:
[0013] Data on traffic congestion index, severe weather impact factors, and regional events are collected. The real-time weight of each edge in the spatiotemporal graph of the logistics network is calculated using a dynamic weight function. Based on the real-time weights, the Dijkstra algorithm is used to search for the minimum cost path from the origin to the destination.
[0014] Extract path features from the minimum cost path, including the proportion of highway mileage and the predicted duration of congested road sections. Concatenate the path features with vehicle type, real-time oil or electricity price, and cargo density into a tensor, and input it into a graph convolutional network to generate a transportation stage feature embedding vector.
[0015] The historical throughput and facility capacity of all logistics hubs in the spatiotemporal graph of the logistics network are encoded into node feature vectors through a multilayer perceptron. The path mileage and road grade in the spatiotemporal graph of the logistics network are encoded into edge feature vectors through a recurrent neural network. The node feature vectors and edge feature vectors are input into the spatiotemporal graph attention network to calculate the dynamic association weights between nodes and output the spatiotemporal dependency feature matrix.
[0016] The spatiotemporal dependent feature matrix and the transportation stage feature embedding vector are fused using a gating fusion mechanism to obtain a fused feature vector, and the fused feature vector is then layer-normalized to generate transportation stage features.
[0017] By adopting the above technical solutions, real-time perception of traffic conditions, weather, and emergencies (such as large-scale events and accidents) can be achieved, ensuring that route planning results closely match the current real-world situation. Three distinct types of data—geospatial information (route mileage, congested sections), physical asset attributes (vehicle type, cargo density), and real-time market information (oil prices, electricity prices)—are unified within a single framework (tensor). This is crucial for achieving accurate cost prediction. Multilayer perceptrons (MLP) and recurrent neural networks (RNNs) are used to encode logistics hubs (nodes) and transportation routes (edges), capturing their static attributes and dynamic time-series patterns (such as historical throughput trends).
[0018] Optionally, constructing pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes:
[0019] The service tags in the order demand information are parsed to identify the required manual operation type, which includes loading and unloading, packing, reinforcement, and carrying upstairs.
[0020] By analyzing cargo images or videos uploaded by cargo owners using computer vision technology, the physical attributes of the cargo are identified, including irregularity of shape, fragility markings, and surface protection requirements.
[0021] The text description input by the user is parsed using natural language processing technology to extract the complexity parameters of the operating environment, which include floor height, narrowness of passage, and limitations of loading and unloading tools.
[0022] Based on the type of manual operation, the physical properties of the goods, and the complexity parameters of the operating environment, the corresponding complexity level is matched from the preset complexity classification rules;
[0023] Workload parameters are generated based on cargo weight, volume, and the complexity level. Manual operation features are then generated based on the workload parameters and the manual operation type.
[0024] By employing the aforementioned technical solutions, key information is extracted from users' unstructured text, capturing complex situations not covered by standard options. This significantly improves the efficiency and accuracy of information collection, reducing errors caused by poor communication or misunderstandings. All previously identified parameters (operation type, physical attributes, environmental parameters) are matched against a pre-defined, unified rule base to output a standardized complexity level, addressing the core pain point of ambiguous and subjective definitions of operational complexity in the industry. Combining the objective attributes of the goods (weight, volume) and the complexity level, an algorithmic model generates a workload parameter representing the required time and effort cost. This enables refined management and resource scheduling of manual operation tasks.
[0025] Optionally, constructing pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes:
[0026] Semantic segmentation is performed on the origin and destination in the order demand information to extract address attributes, which include floor height, elevator configuration status and area type attributes.
[0027] Based on the address attribute and the weight, volume, and cargo attributes in the fused data, an operation difficulty coefficient is generated;
[0028] The address attribute and the operation difficulty coefficient are cross-encoded to generate a terminal operation feature group;
[0029] The end-operation feature set is concatenated with the weight and volume to form a multi-dimensional feature vector, which serves as a feature for the pickup stage or the delivery stage.
[0030] By adopting the above technical solution, unstructured text addresses are transformed into structured attribute tags with clear business meaning, providing reliable and unified basic data for subsequent quantitative calculations. Multi-factor fusion decision-making based on the attributes of the goods themselves and the operating environment enables refined and quantitative modeling of operating costs. Feature encoding captures and explicitly expresses the complex nonlinear interactions between features, significantly improving the convergence speed and prediction accuracy of the machine learning model, enabling the model to understand business logic faster and more accurately.
[0031] Optionally, determining the price range based on the first target quantile cost, the second target quantile cost, and the preset buffer coefficient includes:
[0032] When the operation difficulty coefficient is greater than a preset threshold, the first target quantile cost is adjusted according to the operation difficulty coefficient to obtain the third target quantile cost, and the first adjustment difference is determined according to the first target quantile cost and the third target quantile cost.
[0033] When the duration of a regional event exceeds a preset duration, the second target quantile cost is adjusted according to the duration of the regional event to obtain the fourth target quantile cost, and the second adjustment difference is determined based on the second target quantile cost and the fourth target quantile cost.
[0034] The preset buffer coefficient is determined based on the first adjustment difference, the second adjustment difference, the median of the predicted cost, and the basic buffer coefficient.
[0035] The lower limit is determined based on the third target quantile cost and the preset buffer coefficient, the upper limit is determined based on the fourth target quantile cost and the preset buffer coefficient, and the price range is determined based on the upper limit and the lower limit.
[0036] By adopting the above technical solutions, changes in the internal and external environment (operational difficulty, regional events) can be sensed and quantified, and decisions can be made automatically accordingly. The generated price range and its buffer zone are dynamic and change in real time, rather than remaining static, allowing it to keep pace with market trends. Through a dynamic buffer mechanism, the pricing model's resilience to interference is enhanced, ensuring its stability and reliability even in complex and uncertain environments. By proactively capturing market opportunities and increasing revenue while controlling costs, profit optimization is achieved.
[0037] Optionally, the method further includes:
[0038] If the preliminary total cost is not within the price range, calculate the normalized deviation score between the preliminary total cost and the nearest boundary of the price range;
[0039] The features of the pickup stage, transportation stage, delivery stage, and manual operation are concatenated into a comprehensive feature vector, and the comprehensive feature vector is input into a pre-trained deep autoencoder model to calculate the feature reconstruction error.
[0040] The Monte Carlo dropout technique is used to perform multiple forward propagation calculations on the preset fine-tuning model during the inference phase. Each propagation randomly deactivates some neurons to obtain the probability distribution of the preliminary predicted total cost. The prediction variance is then calculated based on the probability distribution.
[0041] Based on the preset decision matrix, and combined with the normalized bias score, the feature reconstruction error, and the prediction variance, the anomaly types are classified into data source anomalies, model uncertainty anomalies, or composite anomalies.
[0042] By adopting the above technical solutions, and integrating rule-based inspection, unsupervised feature reconstruction, and supervised model uncertainty estimation, the simple judgment of normal or abnormal status is upgraded to a comprehensive and quantifiable evaluation system based on deviation scores (business rules), reconstruction errors (data quality), and prediction variance (model confidence). This system not only detects anomalies but also intelligently infers the most likely source of the anomalies (data problems or model problems), providing a clear direction for subsequent actions.
[0043] Optionally, the method further includes:
[0044] After determining the final total cost, an attribution algorithm based on gradient integral is used to quantify the contribution of each feature among the pickup stage features, transportation stage features, delivery stage features and manual operation features to the final total cost, and to identify a preset number of core cost drivers with the highest contribution values.
[0045] Multiple counterfactual samples are generated by a generative adversarial network, each counterfactual sample representing a virtual order adjusted for one or more of the core cost drivers;
[0046] The virtual total cost of the counterfactual sample is calculated, and the virtual total cost is compared with the final total cost to generate cost optimization suggestions for cargo owners.
[0047] By employing the aforementioned technical solutions, the key factors (i.e., core cost drivers) with the greatest impact on total cost can be automatically and objectively identified from dozens or even hundreds of features. This avoids the subjectivity and limitations of guesswork based on human experience, transforming cost analysis from vague qualitative descriptions to precise quantitative analyses. In the real world, experimenting with adjusting core cost drivers (such as changing transportation methods or altering delivery time windows) is extremely costly and risky. Generative adversarial networks (GANs) can create numerous virtual testbeds in the digital world, testing the effectiveness of various optimization strategies at zero cost and zero risk. They can systematically generate samples of various feature combinations, exploring which factors and to what extent changes yield the greatest cost-effectiveness. This is more efficient and comprehensive than manual enumeration. It provides shippers with clear, data-supported optimization options, enabling them to make informed cost-benefit trade-offs.
[0048] A second aspect of this application provides a logistics transportation cost calculation system, including a feature module, a prediction module, an adjustment module, a judgment module, and an execution module, wherein:
[0049] The feature module is configured to receive order demand information from the shipper and dynamic cost data from the carrier, and to associate and fuse the order demand information and the dynamic cost data to obtain fused data. Based on the fused data, features for the pickup stage, transportation stage, delivery stage, and manual operation are constructed. The order demand information includes cargo type, weight, volume, origin, destination, time requirement, and cargo attributes. The dynamic cost data includes toll / congestion status of each road segment, labor costs, and vehicle type information.
[0050] The prediction module is configured to obtain a first predicted cost based on the characteristics of the pickup stage through a pickup cost prediction sub-model, a second predicted cost based on the characteristics of the transportation stage through a transportation cost prediction sub-model, and a third predicted cost based on the characteristics of the delivery stage through a delivery cost prediction sub-model. Based on a preset pricing standard and the workload in the order, it calculates the manual operation cost.
[0051] The adjustment module is configured to input the first predicted cost, the second predicted cost, the third predicted cost, and the manual operation cost as features into a preset fine-tuning model to obtain a preliminary predicted total cost. The preset fine-tuning model is used to adjust the total cost based on the interaction effect between the costs of each stage.
[0052] The judgment module is configured to use a preset quantile regression model to predict the median cost, the first target quantile cost, and the second target quantile cost based on the fused data; determine the price range based on the first target quantile cost, the second target quantile cost, and a preset buffer coefficient; and determine whether the preliminary predicted total cost is within the price range, wherein the first target quantile cost is less than the predicted median cost, and the second target quantile cost is greater than the predicted median cost.
[0053] The execution module is configured to use the median of the predicted cost as the final total cost if the preliminary predicted total cost is not within the price range, and to use the preliminary predicted total cost as the final total cost if the preliminary predicted total cost is within the price range.
[0054] A third aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any of the foregoing.
[0055] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed, perform the method described in any of the preceding descriptions.
[0056] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:
[0057] 1. By integrating cargo owner order demand with real-time dynamic cost data and constructing multiple transportation stage characteristics, it achieves refined and dynamic modeling and prediction of costs in all aspects of logistics (pickup, transportation, delivery, and labor), overcoming the shortcomings of traditional static pricing.
[0058] 2. By combining phased sub-model prediction with fine-tuning model, the accuracy of overall cost prediction is significantly improved, which not only ensures the professional calculation of costs at each stage, but also takes into account the interaction effects between stages through fine-tuning model.
[0059] 3. It innovatively utilizes a quantile regression model to predict cost distribution and generate a reasonable price range. By intelligently comparing and deciding between the preliminary predicted total cost and this range, it automatically selects the optimal result (preliminary predicted value or median), effectively avoiding abnormal pricing and ensuring the robustness and reasonableness of the final cost.
[0060] 4. It can quickly generate reliable quotes, reducing manual calculation costs and disputes, improving the operational efficiency of the logistics platform, and providing cargo owners and carriers with more transparent, fair and credible pricing services. Attached Figure Description
[0061] Figure 1 This is a flowchart illustrating a method for calculating logistics transportation costs disclosed in an embodiment of this application;
[0062] Figure 2 This is a schematic diagram of a logistics transportation cost calculation system disclosed in an embodiment of this application;
[0063] Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.
[0064] Explanation of reference numerals in the attached figures: 201, Feature module; 202, Prediction module; 203, Adjustment module; 204, Judgment module; 205, Execution module; 301, Processor; 302, Communication bus; 303, User interface; 304, Network interface; 305, Memory. Detailed Implementation
[0065] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0066] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0067] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0068] This embodiment discloses a method for calculating logistics and transportation costs. Figure 1 This is a flowchart illustrating a method for calculating logistics transportation costs disclosed in an embodiment of this application, applied to a logistics transportation platform, such as... Figure 1 As shown, the method includes the following steps:
[0069] S101. Receive order demand information from the cargo owner and dynamic cost data from the carrier, and correlate and merge the order demand information and the dynamic cost data to obtain fused data. Construct pickup stage characteristics, transportation stage characteristics, delivery stage characteristics, and manual operation characteristics based on the fused data. The order demand information includes cargo type, weight, volume, origin, destination, time requirement, and cargo attributes. The dynamic cost data includes toll / congestion status of each road segment, labor costs, and vehicle type information.
[0070] S102. The first predicted cost is obtained through the pickup cost prediction sub-model based on the pickup stage characteristics, the second predicted cost is obtained through the transportation cost prediction sub-model based on the transportation stage characteristics, and the third predicted cost is obtained through the delivery cost prediction sub-model based on the delivery stage characteristics. Based on the preset pricing standard and the workload in the order, the manual operation cost is calculated.
[0071] S103. Input the first predicted cost, the second predicted cost, the third predicted cost, and the manual operation cost as features into the preset fine-tuning model to obtain the preliminary predicted total cost. The preset fine-tuning model is used to adjust the total cost based on the interaction effect between the costs of each stage.
[0072] S104. Using a preset quantile regression model, predict the median cost, the first target quantile cost, and the second target quantile cost based on the fused data. Determine the price range based on the first target quantile cost, the second target quantile cost, and a preset buffer coefficient. Determine whether the preliminary predicted total cost is within the price range. The first target quantile cost is less than the predicted median cost, and the second target quantile cost is greater than the predicted median cost.
[0073] S105. If the preliminary total cost is not within the price range, the median of the predicted cost is used as the final total cost; if the preliminary total cost is within the price range, the preliminary total cost is used as the final total cost.
[0074] The shipper provides specific order requirements (such as cargo type, weight, and origin), while the carrier provides real-time dynamic cost data (such as road conditions, fuel prices, and labor costs). Combining static order requirements with dynamic cost data creates fused data that comprehensively describes the transportation task, forming the foundation for all subsequent precise calculations. Based on this fused data, feature sets are constructed to meet the needs of different calculation stages; this is a prerequisite for the effective operation of machine learning models. Features for the pickup stage include pickup address, floor, elevator availability, and cargo portability. Features for the transportation stage include distance, route congestion, fuel or electricity prices, and cargo type (whether it is fragile, etc.). Features for the delivery stage include destination area type (whether it is remote) and requirements for carrying items upstairs. Features for manual operations include identifiers indicating the need for loading, unloading, and packing services.
[0075] Three pre-trained machine learning models are used to accurately predict costs at different stages. The pickup cost sub-model outputs the first predicted cost based on pickup stage characteristics, the transportation cost sub-model outputs the second predicted cost based on transportation stage characteristics, and the delivery cost sub-model outputs the third predicted cost based on delivery stage characteristics. Labor costs are calculated using a rule-based approach. The system directly calculates a fixed labor operation cost based on the clearly defined workload in the order (e.g., loading and unloading 100 items) and a preset pricing standard (e.g., 5 yuan per item). The sum of the predictions from the three sub-models and the labor operation cost does not necessarily equal the final total cost, as there may be synergistic or discount effects between stages (e.g., an order including both pickup and transportation may have a more favorable total price than purchasing both services separately). The role of the preset fine-tuning model (e.g., a lightweight linear regression model) is to learn these inter-stage interaction effects, fine-tuning the simple summation result to obtain a more accurate preliminary prediction of the total cost.
[0076] The system uses a pre-defined quantile regression model (such as LightGBM) to predict the median cost (the predicted median cost, i.e., the most likely price) and the range of price fluctuations. In this embodiment, the first target quantile cost is the 5th quantile (lower limit), and the second target quantile cost is the 95th quantile (upper limit). To increase the system's fault tolerance, instead of directly using the upper and lower limits of the quantiles as the judgment criteria, a pre-defined buffer coefficient k (e.g., k=10) is introduced. Price range = [first target quantile cost - k, second target quantile cost + k]. This range is a reasonable cost range for the current order, derived from a large amount of historical data. If the initial predicted total cost is within the price range, it indicates that the cost conforms to historical patterns and business expectations, and is considered reasonable, thus being adopted as the final total cost. If the initial predicted total cost is not within the price range, it indicates that the prediction result is abnormal (possibly due to input errors, new situations not seen by the model, market changes, etc.). In this case, the predicted median cost is used as the final total cost. This reflects the system's automatic correction capability and effectively avoids obviously unreasonable pricing.
[0077] Optionally, constructing pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes:
[0078] Data on traffic congestion index, severe weather impact factors, and regional events are collected. The real-time weight of each edge in the spatiotemporal graph of the logistics network is calculated using a dynamic weight function. Based on the real-time weights, the Dijkstra algorithm is used to search for the minimum cost path from the origin to the destination.
[0079] Extract path features from the minimum cost path, including the proportion of highway mileage and the predicted duration of congested road sections. Concatenate the path features with vehicle type, real-time oil or electricity price, and cargo density into a tensor, and input it into a graph convolutional network to generate a transportation stage feature embedding vector.
[0080] The historical throughput and facility capacity of all logistics hubs in the spatiotemporal graph of the logistics network are encoded into node feature vectors through a multilayer perceptron. The path mileage and road grade in the spatiotemporal graph of the logistics network are encoded into edge feature vectors through a recurrent neural network. The node feature vectors and edge feature vectors are input into the spatiotemporal graph attention network to calculate the dynamic association weights between nodes and output the spatiotemporal dependency feature matrix.
[0081] The spatiotemporal dependent feature matrix and the transportation stage feature embedding vector are fused using a gating fusion mechanism to obtain a fused feature vector, and the fused feature vector is then layer-normalized to generate transportation stage features.
[0082] Real-time data collection of external factors affecting transportation costs includes traffic congestion indices, adverse weather factors (such as heavy rain and fog leading to reduced vehicle speed and increased risk), and regional event data (such as large-scale events and road closures or detours due to construction). A dynamic network is constructed: the logistics network is abstracted as a spatiotemporal graph, where nodes are geographical locations (such as cities and hubs), and edges are transportation routes. The key innovation lies in the fact that the real-time weight of the edges is no longer just distance, but a comprehensive cost calculated through a dynamic weighting function (e.g., weight = distance + congestion time cost + weather risk cost + event-related additional costs). Route search: using Dijkstra's algorithm, the path with the lowest real-time cost from the origin to the destination is searched on the constructed dynamic network. From the calculated minimum-cost path, key path features are extracted, such as the proportion of highway mileage (affecting toll fees and fuel consumption) and the predicted duration of congested road sections (affecting time and labor costs). Feature concatenation: Heterogeneous data such as path features, vehicle type (e.g., trucks, refrigerated trucks), real-time fuel or electricity prices (representing energy costs), and cargo density (affecting load and loading schemes) are concatenated into a unified tensor. Graph Convolutional Network Encoding: This tensor is input into a Graph Convolutional Network (GCN). GCN excels at handling graph-structured data, learning the relationships between nodes (path features at this location) and neighboring nodes (features of adjacent locations). Through GCN, the system automatically learns and generates embedding vectors representing the comprehensive cost characteristics of this specific path under various constraints. Multilayer Perceptron (MLP) is used to encode the static attributes (historical throughput, facility capacity) of logistics hubs (nodes) into feature vectors. Recurrent Neural Network (RNN) is used to encode the temporal attributes (path mileage, road grade) of paths (edges) into feature vectors. RNN excels at handling sequential data and can capture historical trends. The feature vectors of nodes and edges are input into a spatiotemporal graph attention network. This network can simultaneously capture the spatial and temporal dependencies of the network. Space: Calculates the dynamic association weights between any two nodes (attention mechanism). For example, congestion at the Shanghai hub may significantly impact the scheduling of the Suzhou hub, even if they are not directly adjacent. Time: Considers the influence of historical states on the current moment. The final output is a spatiotemporal dependent feature matrix, which globally and dynamically reflects the health status and potential bottlenecks of the entire logistics network. Gating Fusion Mechanism: A gating mechanism (similar to the gates in LSTM) is used to fuse the transportation stage feature embedding vectors and the spatiotemporal dependent feature matrix. This mechanism acts like a small decision-maker, selectively and dynamically controlling the information to be retained and ignored, achieving a fusion effect of 1+1>2. Layer normalization is applied to the fused feature vectors to stabilize their data distribution, accelerating the training and convergence process of subsequent models and improving generalization performance.
[0083] Optionally, constructing pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes:
[0084] The service tags in the order demand information are parsed to identify the required manual operation type, which includes loading and unloading, packing, reinforcement, and carrying upstairs.
[0085] By analyzing cargo images or videos uploaded by cargo owners using computer vision technology, the physical attributes of the cargo are identified, including irregularity of shape, fragility markings, and surface protection requirements.
[0086] The text description input by the user is parsed using natural language processing technology to extract the complexity parameters of the operating environment, which include floor height, narrowness of passage, and limitations of loading and unloading tools.
[0087] Based on the type of manual operation, the physical properties of the goods, and the complexity parameters of the operating environment, the corresponding complexity level is matched from the preset complexity classification rules;
[0088] Workload parameters are generated based on cargo weight, volume, and the complexity level. Manual operation features are then generated based on the workload parameters and the manual operation type.
[0089] Read the service options selected or specified by the user in the order (e.g., "Needs to be carried upstairs", "Needs to be packed", "Needs to load and unload heavy equipment") to obtain one or more clear lists of manual operation types (e.g., loading and unloading, packing, carrying upstairs). This is the most direct demand information. Utilize computer vision algorithms to analyze images or videos uploaded by the shipper to automatically identify physical attributes of the goods that are readable by the human eye but previously unknown to the system. Shape irregularity: Determine whether the goods are standard cubes / cuboids or irregularly shaped (e.g., furniture, machine parts), which affects the difficulty of handling and loading. Fragility markings: Identify whether there are "fragile" labels or patterns, or infer their fragility based on the item category (e.g., glassware). Surface protection requirements: Identify the surface material of the goods (e.g., smooth piano surface, leather sofa) to determine if additional protective measures (blankets, foam, etc.) are needed. Use natural language processing technology to understand unstructured text in the user-filled remarks or address information (e.g., "Address is on the 6th floor of an old residential building with no elevator", "The road in front of the warehouse is too narrow for trucks to enter"), and extract key operational environment complexity parameters. Floor Height: Extracts the specific floor number to determine if an elevator is available. Passageway Narrowness: Determines the narrowness of doorways, corridors, and staircases. Loading / Unloading Tool Restrictions: Determines whether forklifts, hydraulic pallet trucks, or manual handling are possible. The system has a built-in pre-defined complexity grading rule base, based on historical data (e.g., {High cargo irregularity & No elevator floors > 3 floors} → Complexity Level = High). The system takes "Operation Type," "Physical Attributes," and "Environmental Parameters" as inputs and matches them against the complexity grading rule base to arrive at a comprehensive complexity level (e.g., Simple, Medium, Complex, Extremely Complex). This step is crucial for transforming qualitative information into semi-quantitative indicators. The system combines the cargo's basic physical attributes (weight, volume) with the complexity level and calculates the required manpower or time parameters (e.g., standard working hours, workload score) using a pre-defined algorithm model. Combine the list of operation types and workload parameters to form a complete and structured manual operation feature, for example: {Operation type: [loading and unloading, carrying upstairs], workload parameter: 4.5 (standard working hours)}.
[0090] Optionally, constructing pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes:
[0091] Semantic segmentation is performed on the origin and destination in the order demand information to extract address attributes, which include floor height, elevator configuration status and area type attributes.
[0092] Based on the address attribute and the weight, volume, and cargo attributes in the fused data, an operation difficulty coefficient is generated;
[0093] The address attribute and the operation difficulty coefficient are cross-encoded to generate a terminal operation feature group;
[0094] The end-operation feature set is concatenated with the weight and volume to form a multi-dimensional feature vector, which serves as a feature for the pickup stage or the delivery stage.
[0095] Natural Language Processing (NLP) or Geographic Information System (GIS) technologies are used to perform deep analysis on the origin and destination information in order requirements (e.g., "15th Floor, Zhongguancun Building, Haidian District, Beijing" or "Building 6, Room 502, an old residential area in Pudong New Area, Shanghai") to obtain structured address attributes. Floor height and elevator configuration status are also considered: for example, {Floor: 5, Elevator: None}, {Floor: 20, Elevator: Available}, {Floor: 1, Elevator: Not Applicable}. This is the most critical factor affecting the workload of moving operations. Area type attributes are also included: for example, {Area Type: Commercial Office Building}, {Area Type: Old Residential Area}, {Area Type: Industrial Park}. Different area types have different access difficulties, parking convenience, and operational standards. Unstructured text addresses are then transformed into standardized, quantifiable indicators that computers can understand and calculate. The operational difficulty coefficient is calculated by combining address attributes and cargo attributes (including weight, volume, and other possible attributes such as whether it is fragile, requires refrigeration, or has a special shape) from the fused data using predefined rules, formulas, or a trained lightweight model. A simple linear formula might be: Operational Difficulty Coefficient = Weight Factor * Weight + Volume Factor * Volume + Floor Factor * Number of Floors - Elevator Convenience Factor (where elevator status is converted to a numerical value). The operational difficulty coefficient comprehensively represents the difficulty of moving the cargo to the given address. Higher values indicate more difficult, time-consuming, and costly operations. Feature cross-coding is then performed on the address attributes and operational difficulty coefficient to generate end-operation feature sets. Feature cross-coding is a feature engineering technique used to discover and explicitly express potential interactions between different features. For example, simply knowing "the area type is a residential area" and "high difficulty coefficient" is insufficient. The model might need to know whether "high difficulty coefficient in a residential area" and "high difficulty coefficient in an office building" have different meanings. Feature cross-coding creates new features such as "area type_residential area * high difficulty coefficient". Commonly used techniques include multinomial features and business knowledge-based combinations. The end-operation feature set not only contains raw information but also interactive information between features. The end-operation feature set (containing cross-information on address and difficulty) is concatenated with the weight and volume of the goods to form a complete, multi-dimensional feature vector. This final feature vector serves as the feature for either the pickup or delivery stage (depending on whether the input address is the origin or destination).
[0096] Optionally, determining the price range based on the first target quantile cost, the second target quantile cost, and the preset buffer coefficient includes:
[0097] When the operation difficulty coefficient is greater than a preset threshold, the first target quantile cost is adjusted according to the operation difficulty coefficient to obtain the third target quantile cost, and the first adjustment difference is determined according to the first target quantile cost and the third target quantile cost.
[0098] When the duration of a regional event exceeds a preset duration, the second target quantile cost is adjusted according to the duration of the regional event to obtain the fourth target quantile cost, and the second adjustment difference is determined based on the second target quantile cost and the fourth target quantile cost.
[0099] The preset buffer coefficient is determined based on the first adjustment difference, the second adjustment difference, the median of the predicted cost, and the basic buffer coefficient.
[0100] The lower limit is determined based on the third target quantile cost and the preset buffer coefficient, the upper limit is determined based on the fourth target quantile cost and the preset buffer coefficient, and the price range is determined based on the upper limit and the lower limit.
[0101] The system first determines the difficulty of the current task. If the difficulty exceeds a preset threshold, the original minimum reference price (first target quantile cost) is deemed no longer applicable and needs to be adjusted upwards. The adjustment is positively correlated with the difficulty coefficient; the greater the difficulty, the larger the adjustment. The new minimum price after the adjustment is called the third target quantile cost. For example, the original minimum price is 20 yuan. However, if the destination is experiencing severe traffic congestion (high operational difficulty), the system will adjust the minimum price to 25 yuan (third target quantile cost). The system then assesses the duration of regional impact events. If the event lasts for a sufficiently long time (exceeding the preset duration), it indicates that the regional impact event has a significant and lasting impact on this order, and the original maximum reference price (second target quantile cost) also needs to be adjusted. Generally, the longer the event lasts, the tighter the supply and demand, and the higher the price ceiling will be. The new maximum price after the adjustment is called the fourth target quantile cost. The difference between the first and third target quantile costs is used as the first adjustment difference, and the difference between the second and fourth target quantile costs is used as the second adjustment difference. The system needs a larger buffer coefficient to widen the price range and accommodate greater uncertainty and risk. It might be a formula like this: Preset Buffer Coefficient = Base Buffer Coefficient + (First Adjustment Difference + Second Adjustment Difference) / Median Forecast Cost. For example, if the base buffer coefficient is 0.1, the first adjustment difference is 5 yuan, the second adjustment difference is 15 yuan, and the median forecast is 40 yuan, then the dynamic buffer coefficient = 0.1 + (5 + 15) / 40 = 0.1 + 0.5 = 0.6. This indicates high volatility, with the buffer coefficient increasing significantly from 0.1 to 0.6. The final price range is generated using the adjusted price benchmark and the dynamically calculated buffer coefficient. Lower limit = Third target quantile cost * (1 - Preset Buffer Coefficient). Upper limit = Fourth target quantile cost * (1 + Preset Buffer Coefficient). The final result is a price range [lower limit, upper limit] based on the adjusted price and elastically expanded according to market volatility.
[0102] Optionally, the method further includes:
[0103] If the preliminary total cost is not within the price range, calculate the normalized deviation score between the preliminary total cost and the nearest boundary of the price range;
[0104] The features of the pickup stage, transportation stage, delivery stage, and manual operation are concatenated into a comprehensive feature vector, and the comprehensive feature vector is input into a pre-trained deep autoencoder model to calculate the feature reconstruction error.
[0105] The Monte Carlo dropout technique is used to perform multiple forward propagation calculations on the preset fine-tuning model during the inference phase. Each propagation randomly deactivates some neurons to obtain the probability distribution of the preliminary predicted total cost. The prediction variance is then calculated based on the probability distribution.
[0106] Based on the preset decision matrix, and combined with the normalized bias score, the feature reconstruction error, and the prediction variance, the anomaly types are classified into data source anomalies, model uncertainty anomalies, or composite anomalies.
[0107] Normalized Deviation Score: If the initial predicted total cost is outside the price range, the system calculates a score to measure its deviation. Normalization means that this score is processed so that deviations of different magnitudes and ranges can be compared. For example, deviations of 100 yuan from the upper limit and 100 yuan from the lower limit may have the same absolute score value. This score directly reflects the degree of conflict between the prediction result and business expectations. The larger the score, the more abnormal the prediction is at the business level. Features from various logistics stages (such as pick-up address, cargo weight, transportation distance, weather, delivery person ID, operation time, etc.) are combined into a comprehensive feature vector. An autoencoder is an unsupervised learning model that learns the inherent patterns and distributions of input data through compression and reconstruction. The comprehensive feature vector of the current order is input into this trained autoencoder, which outputs a reconstructed feature vector. Reconstruction error is the difference between the original input and the reconstructed output (such as mean squared error). If the feature pattern of the current order differs significantly from most normal orders seen by the model (e.g., extremely light cargo but extremely long transportation distance, or a clearly incorrect feature value), the autoencoder cannot reconstruct it well, resulting in a large reconstruction error. High reconstruction error indicates that the input data itself may be anomalous, rare, or highly noisy (anomalous data source). Typically, "dropout" techniques are only used during the training phase to prevent overfitting. The innovation of Monte Carlo dropout lies in enabling dropout during the inference (prediction) phase as well. This means that when making multiple predictions on the same data, the model's network structure differs slightly and randomly each time. After multiple (e.g., 100) forward propagations, 100 slightly different predictions are obtained. These values form a probability distribution. The variance of this distribution is used as a measure of uncertainty. High prediction variance indicates that the model is highly uncertain about this prediction. This could be because it encountered a pattern not covered in the training data, or the input features are near the model's decision boundary; this is called model uncertainty anomaly. The pre-defined decision matrix is a judgment table defined by rules or logic. For example, a high reconstruction error, but with potentially high or low prediction variance and bias scores, suggests the problem likely lies in the input data (i.e., anomalous data source); a high prediction variance, but a normal reconstruction error, suggests the data itself appears fine, but the model doesn't handle it and lacks confidence in its predictions (i.e., model uncertainty anomaly); all three metrics are high. This indicates that not only was there anomalous data encountered, but the model was also unable to handle it, resulting in a serious violation of business rules (compound anomaly).
[0108] Optionally, the method further includes:
[0109] After determining the final total cost, an attribution algorithm based on gradient integral is used to quantify the contribution of each feature among the pickup stage features, transportation stage features, delivery stage features and manual operation features to the final total cost, and to identify a preset number of core cost drivers with the highest contribution values.
[0110] Multiple counterfactual samples are generated by a generative adversarial network, each counterfactual sample representing a virtual order adjusted for one or more of the core cost drivers;
[0111] The virtual total cost of the counterfactual sample is calculated, and the virtual total cost is compared with the final total cost to generate cost optimization suggestions for cargo owners.
[0112] Gradient integral-based attribution algorithms (such as SHAP or Integrated Gradients) are a technique from the field of interpretable AI. In complex machine learning models (such as those used to predict costs), they can precisely reverse engineer to calculate the contribution of each input feature (such as distance, weight, or waiting time) to the final output (total cost) when the model makes decisions. Each specific feature among pickup, transportation, delivery, and manual operation features (such as waiting time, transportation distance, cargo weight, or special handling requirements) is assigned a numerical value, precisely indicating how much it increases or decreases costs. The features with the highest identified contributions (e.g., the top 3 or top 5) are used as core cost drivers; these are the most critical factors leading to the high cost of the order. Generative adversarial networks (GANs) are powerful AI generative models, typically used to create realistic images and videos. Here, they are cleverly used to generate virtual yet realistic order data. The system creates counterfactual virtual orders that are almost identical to the original orders, with only minor adjustments to a few core cost drivers (e.g., reducing the delivery wait time from 2 hours to 30 minutes; removing the "special packaging" requirement). This results in a large number of virtual orders (counterfactual samples) representing the optimized scenario. The system then recalculates the virtual total cost of these virtual orders following the steps described above, compares this virtual total cost with the actual final total cost of the order, and outputs cost optimization suggestions for shippers. For example, suggestions might include: "If you can keep the delivery appointment wait time within 30 minutes, your total cost for this type of order is expected to decrease by 15%," "Does your cargo require such high-specification customized packaging? Standard packaging is expected to save 50 yuan per order," and "Centering the shipping location at warehouse A instead of scattered warehouses B and C to reduce pickup mileage is expected to reduce transportation costs by 10%."
[0113] This embodiment also discloses a system for calculating logistics and transportation costs. Figure 2This is a schematic diagram of a logistics transportation cost calculation system disclosed in an embodiment of this application, as shown below. Figure 2 As shown, the system includes a feature module 201, a prediction module 202, an adjustment module 203, a judgment module 204, and an execution module 205, wherein:
[0114] The feature module 201 is configured to receive order demand information from the shipper and dynamic cost data from the carrier, and to associate and fuse the order demand information and the dynamic cost data to obtain fused data. Based on the fused data, features of the pickup stage, transportation stage, delivery stage, and manual operation are constructed. The order demand information includes cargo type, weight, volume, origin, destination, time requirement, and cargo attributes. The dynamic cost data includes toll / congestion status of each road segment, labor costs, and vehicle type information.
[0115] Prediction module 202 is configured to obtain a first predicted cost based on the characteristics of the pickup stage through a pickup cost prediction sub-model, a second predicted cost based on the characteristics of the transportation stage through a transportation cost prediction sub-model, and a third predicted cost based on the characteristics of the delivery stage through a delivery cost prediction sub-model, and calculate manual operation costs based on preset pricing standards and workload in the order.
[0116] The adjustment module 203 is configured to input the first predicted cost, the second predicted cost, the third predicted cost, and the manual operation cost as features into a preset fine-tuning model to obtain a preliminary predicted total cost. The preset fine-tuning model is used to adjust the total cost based on the interaction effect between the costs of each stage.
[0117] The judgment module 204 is configured to use a preset quantile regression model to predict the median cost, the first target quantile cost, and the second target quantile cost based on the fused data, determine the price range based on the first target quantile cost, the second target quantile cost, and a preset buffer coefficient, and determine whether the preliminary predicted total cost is within the price range, wherein the first target quantile cost is less than the predicted median cost, and the second target quantile cost is greater than the predicted median cost.
[0118] The execution module 205 is configured to use the median of the predicted cost as the final total cost if the preliminary predicted total cost is not within the price range, and to use the preliminary predicted total cost as the final total cost if the preliminary predicted total cost is within the price range.
[0119] Optionally, the feature module 201 is configured to:
[0120] Data on traffic congestion index, severe weather impact factors, and regional events are collected. The real-time weight of each edge in the spatiotemporal graph of the logistics network is calculated using a dynamic weight function. Based on the real-time weights, the Dijkstra algorithm is used to search for the minimum cost path from the origin to the destination.
[0121] Extract path features from the minimum cost path, including the proportion of highway mileage and the predicted duration of congested road sections. Concatenate the path features with vehicle type, real-time oil or electricity price, and cargo density into a tensor, and input it into a graph convolutional network to generate a transportation stage feature embedding vector.
[0122] The historical throughput and facility capacity of all logistics hubs in the spatiotemporal graph of the logistics network are encoded into node feature vectors through a multilayer perceptron. The path mileage and road grade in the spatiotemporal graph of the logistics network are encoded into edge feature vectors through a recurrent neural network. The node feature vectors and edge feature vectors are input into the spatiotemporal graph attention network to calculate the dynamic association weights between nodes and output the spatiotemporal dependency feature matrix.
[0123] The spatiotemporal dependent feature matrix and the transportation stage feature embedding vector are fused using a gating fusion mechanism to obtain a fused feature vector, and the fused feature vector is then layer-normalized to generate transportation stage features.
[0124] Optionally, the feature module 201 is configured to:
[0125] The service tags in the order demand information are parsed to identify the required manual operation type, which includes loading and unloading, packing, reinforcement, and carrying upstairs.
[0126] By analyzing cargo images or videos uploaded by cargo owners using computer vision technology, the physical attributes of the cargo are identified, including irregularity of shape, fragility markings, and surface protection requirements.
[0127] The text description input by the user is parsed using natural language processing technology to extract the complexity parameters of the operating environment, which include floor height, narrowness of passage, and limitations of loading and unloading tools.
[0128] Based on the type of manual operation, the physical properties of the goods, and the complexity parameters of the operating environment, the corresponding complexity level is matched from the preset complexity classification rules;
[0129] Workload parameters are generated based on cargo weight, volume, and the complexity level. Manual operation features are then generated based on the workload parameters and the manual operation type.
[0130] Optionally, the feature module 201 is configured to:
[0131] Semantic segmentation is performed on the origin and destination in the order demand information to extract address attributes, which include floor height, elevator configuration status and area type attributes.
[0132] Based on the address attribute and the weight, volume, and cargo attributes in the fused data, an operation difficulty coefficient is generated;
[0133] The address attribute and the operation difficulty coefficient are cross-encoded to generate a terminal operation feature group;
[0134] The end-operation feature set is concatenated with the weight and volume to form a multi-dimensional feature vector, which serves as a feature for the pickup stage or the delivery stage.
[0135] Optionally, the determination module 204 is configured to:
[0136] When the operation difficulty coefficient is greater than a preset threshold, the first target quantile cost is adjusted according to the operation difficulty coefficient to obtain the third target quantile cost, and the first adjustment difference is determined according to the first target quantile cost and the third target quantile cost.
[0137] When the duration of a regional event exceeds a preset duration, the second target quantile cost is adjusted according to the duration of the regional event to obtain the fourth target quantile cost, and the second adjustment difference is determined based on the second target quantile cost and the fourth target quantile cost.
[0138] The preset buffer coefficient is determined based on the first adjustment difference, the second adjustment difference, the median of the predicted cost, and the basic buffer coefficient.
[0139] The lower limit is determined based on the third target quantile cost and the preset buffer coefficient, the upper limit is determined based on the fourth target quantile cost and the preset buffer coefficient, and the price range is determined based on the upper limit and the lower limit.
[0140] Optionally, the system further includes an analysis module configured for:
[0141] If the preliminary total cost is not within the price range, calculate the normalized deviation score between the preliminary total cost and the nearest boundary of the price range;
[0142] The features of the pickup stage, transportation stage, delivery stage, and manual operation are concatenated into a comprehensive feature vector, and the comprehensive feature vector is input into a pre-trained deep autoencoder model to calculate the feature reconstruction error.
[0143] The Monte Carlo dropout technique is used to perform multiple forward propagation calculations on the preset fine-tuning model during the inference phase. Each propagation randomly deactivates some neurons to obtain the probability distribution of the preliminary predicted total cost. The prediction variance is then calculated based on the probability distribution.
[0144] Based on the preset decision matrix, and combined with the normalized bias score, the feature reconstruction error, and the prediction variance, the anomaly types are classified into data source anomalies, model uncertainty anomalies, or composite anomalies.
[0145] Optionally, the system also includes a suggestion module configured for:
[0146] After determining the final total cost, an attribution algorithm based on gradient integral is used to quantify the contribution of each feature among the pickup stage features, transportation stage features, delivery stage features and manual operation features to the final total cost, and to identify a preset number of core cost drivers with the highest contribution values.
[0147] Multiple counterfactual samples are generated by a generative adversarial network, each counterfactual sample representing a virtual order adjusted for one or more of the core cost drivers;
[0148] The virtual total cost of the counterfactual sample is calculated, and the virtual total cost is compared with the final total cost to generate cost optimization suggestions for cargo owners.
[0149] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0150] This embodiment also discloses an electronic device, as shown in the reference. Figure 3 The electronic device may include: at least one processor 301, at least one communication bus 302, user interface 303, network interface 304, and at least one memory 305.
[0151] The communication bus 302 is used to enable communication between these components.
[0152] The user interface 303 may include a display screen and a camera. Optional user interfaces may also include standard wired interfaces and wireless interfaces.
[0153] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0154] The processor 301 may include one or more processing cores. The processor connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory, and by calling data stored in memory. Optionally, the processor may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.
[0155] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory may include a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor. Figure 3 As shown, a memory, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for calculating logistics transportation costs.
[0156] exist Figure 3In the electronic device shown, the user interface is mainly used to provide an input interface for the user and to obtain the user input data; while the processor can be used to call an application program stored in the memory that calculates a logistics transportation cost. When executed by one or more processors, the electronic device executes one or more methods as described in the above embodiments.
[0157] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the disclosure in this specification. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.
Claims
1. A method for calculating logistics transportation costs, characterized in that, Applied to a logistics and transportation platform, the method includes: The system receives order demand information from shippers and dynamic cost data from carriers. It then correlates and merges the order demand information and the dynamic cost data to obtain fused data. Based on the fused data, it constructs characteristics for the pickup stage, transportation stage, delivery stage, and manual operation. The order demand information includes cargo type, weight, volume, origin, destination, time requirement, and cargo attributes. The dynamic cost data includes toll / congestion status, labor costs, and vehicle type information for each road segment. The first predicted cost is obtained by the pickup cost prediction sub-model based on the pickup stage characteristics, the second predicted cost is obtained by the transportation cost prediction sub-model based on the transportation stage characteristics, and the third predicted cost is obtained by the delivery cost prediction sub-model based on the delivery stage characteristics. Based on the preset pricing standard and the workload in the order, the manual operation cost is calculated. The first predicted cost, the second predicted cost, the third predicted cost, and the manual operation cost are input as features into a preset fine-tuning model to obtain a preliminary predicted total cost. The preset fine-tuning model is used to adjust the total cost based on the interaction effect between the costs of each stage. Using a preset quantile regression model, the median cost, the first target quantile cost, and the second target quantile cost are predicted based on the fused data. A price range is determined based on the first target quantile cost, the second target quantile cost, and a preset buffer coefficient. It is then determined whether the preliminary predicted total cost is within the price range. The first target quantile cost is less than the predicted median cost, and the second target quantile cost is greater than the predicted median cost. If the preliminary total cost is not within the price range, the median of the predicted cost is used as the final total cost; if the preliminary total cost is within the price range, the preliminary total cost is used as the final total cost. The construction of pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes: The service tags in the order demand information are parsed to identify the required manual operation type, which includes loading and unloading, packing, reinforcement, and carrying upstairs. By analyzing cargo images or videos uploaded by cargo owners using computer vision technology, the physical attributes of the cargo are identified, including irregularity of shape, fragility markings, and surface protection requirements. The text description input by the user is parsed using natural language processing technology to extract the complexity parameters of the operating environment, which include floor height, narrowness of passage, and limitations of loading and unloading tools. Based on the type of manual operation, the physical properties of the goods, and the complexity parameters of the operating environment, the corresponding complexity level is matched from the preset complexity classification rules; Workload parameters are generated based on the cargo weight, volume, and complexity level. Manual operation features are then generated based on the workload parameters and the manual operation type. The construction of pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes: Semantic segmentation is performed on the origin and destination in the order demand information to extract address attributes, which include floor height, elevator configuration status and area type attributes. Based on the address attribute and the weight, volume, and cargo attributes in the fused data, an operation difficulty coefficient is generated; The address attribute and the operation difficulty coefficient are cross-encoded to generate a terminal operation feature group; The end-operation feature set is concatenated with the weight and volume to form a multi-dimensional feature vector, which serves as the feature for the pickup stage or the delivery stage. The step of determining the price range based on the first target quantile cost, the second target quantile cost, and the preset buffer coefficient includes: When the operation difficulty coefficient is greater than a preset threshold, the first target quantile cost is adjusted according to the operation difficulty coefficient to obtain the third target quantile cost, and the first adjustment difference is determined according to the first target quantile cost and the third target quantile cost. When the duration of a regional event exceeds a preset duration, the second target quantile cost is adjusted according to the duration of the regional event to obtain the fourth target quantile cost, and the second adjustment difference is determined based on the second target quantile cost and the fourth target quantile cost. The preset buffer coefficient is determined based on the first adjustment difference, the second adjustment difference, the median of the predicted cost, and the basic buffer coefficient. The lower limit is determined based on the third target quantile cost and the preset buffer coefficient, the upper limit is determined based on the fourth target quantile cost and the preset buffer coefficient, and the price range is determined based on the upper limit and the lower limit.
2. The method for calculating logistics transportation costs according to claim 1, characterized in that, The construction of pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes: Data on traffic congestion index, severe weather impact factors, and regional events are collected. The real-time weight of each edge in the spatiotemporal graph of the logistics network is calculated using a dynamic weight function. Based on the real-time weights, the Dijkstra algorithm is used to search for the minimum cost path from the origin to the destination. Extract path features from the minimum cost path, including the proportion of highway mileage and the predicted duration of congested road sections. Concatenate the path features with vehicle type, real-time oil or electricity price, and cargo density into a tensor, and input it into a graph convolutional network to generate a transportation stage feature embedding vector. The historical throughput and facility capacity of all logistics hubs in the spatiotemporal graph of the logistics network are encoded into node feature vectors through a multilayer perceptron. The path mileage and road grade in the spatiotemporal graph of the logistics network are encoded into edge feature vectors through a recurrent neural network. The node feature vectors and edge feature vectors are input into the spatiotemporal graph attention network to calculate the dynamic association weights between nodes and output the spatiotemporal dependency feature matrix. The spatiotemporal dependent feature matrix and the transportation stage feature embedding vector are fused using a gating fusion mechanism to obtain a fused feature vector, and the fused feature vector is then layer-normalized to generate transportation stage features.
3. The method for calculating logistics transportation costs according to claim 1, characterized in that, The method further includes: If the preliminary total cost is not within the price range, calculate the normalized deviation score between the preliminary total cost and the nearest boundary of the price range; The features of the pickup stage, transportation stage, delivery stage, and manual operation are concatenated into a comprehensive feature vector, and the comprehensive feature vector is input into a pre-trained deep autoencoder model to calculate the feature reconstruction error. The Monte Carlo dropout technique is used to perform multiple forward propagation calculations on the preset fine-tuning model during the inference phase. Each propagation randomly deactivates some neurons to obtain the probability distribution of the preliminary predicted total cost. The prediction variance is then calculated based on the probability distribution. Based on the preset decision matrix, and combined with the normalized bias score, the feature reconstruction error, and the prediction variance, the anomaly types are classified into data source anomalies, model uncertainty anomalies, or composite anomalies.
4. The method for calculating logistics transportation costs according to claim 1, characterized in that, The method further includes: After determining the final total cost, an attribution algorithm based on gradient integral is used to quantify the contribution of each feature among the pickup stage features, transportation stage features, delivery stage features and manual operation features to the final total cost, and to identify a preset number of core cost drivers with the highest contribution values. Multiple counterfactual samples are generated by a generative adversarial network, each counterfactual sample representing a virtual order adjusted for one or more of the core cost drivers; The virtual total cost of the counterfactual sample is calculated, and the virtual total cost is compared with the final total cost to generate cost optimization suggestions for cargo owners.
5. A logistics transportation cost accounting system, characterized in that, It includes a feature module, a prediction module, an adjustment module, a judgment module, and an execution module, among which: The feature module is configured to receive order demand information from the shipper and dynamic cost data from the carrier, and to associate and fuse the order demand information and the dynamic cost data to obtain fused data. Based on the fused data, features for the pickup stage, transportation stage, delivery stage, and manual operation are constructed. The order demand information includes cargo type, weight, volume, origin, destination, time requirement, and cargo attributes. The dynamic cost data includes toll / congestion status of each road segment, labor costs, and vehicle type information. The prediction module is configured to obtain a first predicted cost based on the characteristics of the pickup stage through a pickup cost prediction sub-model, a second predicted cost based on the characteristics of the transportation stage through a transportation cost prediction sub-model, and a third predicted cost based on the characteristics of the delivery stage through a delivery cost prediction sub-model. Based on a preset pricing standard and the workload in the order, it calculates the manual operation cost. The adjustment module is configured to input the first predicted cost, the second predicted cost, the third predicted cost, and the manual operation cost as features into a preset fine-tuning model to obtain a preliminary predicted total cost. The preset fine-tuning model is used to adjust the total cost based on the interaction effect between the costs of each stage. The judgment module is configured to use a preset quantile regression model to predict the median cost, the first target quantile cost, and the second target quantile cost based on the fused data; determine the price range based on the first target quantile cost, the second target quantile cost, and a preset buffer coefficient; and determine whether the preliminary predicted total cost is within the price range, wherein the first target quantile cost is less than the predicted median cost, and the second target quantile cost is greater than the predicted median cost. The execution module is configured to use the median of the predicted cost as the final total cost if the preliminary predicted total cost is not within the price range, and to use the preliminary predicted total cost as the final total cost if the preliminary predicted total cost is within the price range. The construction of pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes: The service tags in the order demand information are parsed to identify the required manual operation type, which includes loading and unloading, packing, reinforcement, and carrying upstairs. By analyzing cargo images or videos uploaded by cargo owners using computer vision technology, the physical attributes of the cargo are identified, including irregularity of shape, fragility markings, and surface protection requirements. The text description input by the user is parsed using natural language processing technology to extract the complexity parameters of the operating environment, which include floor height, narrowness of passage, and limitations of loading and unloading tools. Based on the type of manual operation, the physical properties of the goods, and the complexity parameters of the operating environment, the corresponding complexity level is matched from the preset complexity classification rules; Workload parameters are generated based on the cargo weight, volume, and complexity level. Manual operation features are then generated based on the workload parameters and the manual operation type. The construction of pickup stage features, transportation stage features, delivery stage features, and manual operation features based on the fused data includes: Semantic segmentation is performed on the origin and destination in the order demand information to extract address attributes, which include floor height, elevator configuration status and area type attributes. Based on the address attribute and the weight, volume, and cargo attributes in the fused data, an operation difficulty coefficient is generated; The address attribute and the operation difficulty coefficient are cross-encoded to generate a terminal operation feature group; The end-operation feature set is concatenated with the weight and volume to form a multi-dimensional feature vector, which serves as the feature for the pickup stage or the delivery stage. The step of determining the price range based on the first target quantile cost, the second target quantile cost, and the preset buffer coefficient includes: When the operation difficulty coefficient is greater than a preset threshold, the first target quantile cost is adjusted according to the operation difficulty coefficient to obtain the third target quantile cost, and the first adjustment difference is determined according to the first target quantile cost and the third target quantile cost. When the duration of a regional event exceeds a preset duration, the second target quantile cost is adjusted according to the duration of the regional event to obtain the fourth target quantile cost, and the second adjustment difference is determined based on the second target quantile cost and the fourth target quantile cost. The preset buffer coefficient is determined based on the first adjustment difference, the second adjustment difference, the median of the predicted cost, and the basic buffer coefficient. The lower limit is determined based on the third target quantile cost and the preset buffer coefficient, the upper limit is determined based on the fourth target quantile cost and the preset buffer coefficient, and the price range is determined based on the upper limit and the lower limit.
6. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions. Both the user interface and the network interface are used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-4.