Data processing method and device
By extracting the time and space characteristics of the transportation path and using a double-layer capsule network, combining the characteristics of nodes and sub-paths, the transportation time of multimodal transport is predicted, and the problem of inaccurate ETA prediction in the prior art is solved, and more accurate and flexible is achieved Shipping time forecast.
Patent Information
- Application Number
- CN202411186580.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-15
AI Technical Summary
In the complex scenario of multimodal transport, it is difficult for the prior art to accurately predict the time of cargo transportation (ETA) because the actual logistics process and structure of the transportation network are ignored, resulting in inaccurate prediction results.
By obtaining the path data of the transportation path, the time and spatial characteristics of the node and sub-path are extracted, and inputting them into the double-layer capsule network for training, combining the node residence time and sub-path transportation time, predicting the total transportation time of the transportation path, taking into account risk factors Influence.
It realizes more accurate transportation time prediction, is close to the real situation of the multimodal transport model, improves the accuracy and flexibility of prediction, and adapts to the dynamic changes of complex international logistics networks.
Smart Images

Figure CN118966943A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a data processing method and device. Background Art
[0002] In logistics and transportation, predicting the time required for cargo transportation (Estimated Time of Arrival, ETA) is an important factor in improving the user's logistics experience. Usually, in ETA prediction, the route characteristics related to each transportation route and transportation time are determined, and the route characteristics are used to predict the transportation time of the transportation route in the future.
[0003] For complex scenarios of multimodal transport, it is easy to ignore the actual logistics process and structure of the multimodal transport network when making ETA predictions, resulting in inaccurate ETA prediction results. Summary of the invention
[0004] In view of this, the present disclosure provides a data processing method and device.
[0005] According to a first aspect of the present disclosure, a data processing method is provided, including: acquiring path data of a transport path; performing feature extraction on the path data to obtain a first feature and a second feature, wherein the first feature represents time information and spatial information of multiple nodes in the transport path, and the second feature represents time information and spatial information of a subpath between two adjacent nodes in the transport path; simultaneously inputting the first feature and the second feature into a double-layer capsule network to obtain a first comprehensive feature and a second comprehensive feature, wherein the first feature is input through a first branch in the double-layer capsule network, and the second feature is input through a second branch in the double-layer capsule network; and determining the transport time of the transport path according to the first comprehensive feature and the second comprehensive feature.
[0006] According to an embodiment of the present disclosure, feature extraction is performed on path data to obtain a first feature and a second feature, including: determining the first data and the second data from the path data, wherein the first data represents type information of nodes and sub-paths in at least one labeled data pair, and the second data represents time information of nodes and sub-paths in at least one labeled data pair, and the labeled data pair represents two adjacent nodes in the transportation path and the sub-path therebetween; based on the first data and the second data, determining a first feature corresponding to multiple nodes in the transportation path and a second feature corresponding to at least one sub-path, wherein the first feature is obtained by linearly mapping and aggregating features of multiple nodes in at least one labeled data pair, and the second feature is obtained by linearly mapping and aggregating features of at least one sub-path in at least one labeled data pair.
[0007] According to an embodiment of the present disclosure, the transportation time of the transportation path is determined according to the first comprehensive feature and the second comprehensive feature, including: according to the first comprehensive feature, at least determining the residence time of multiple nodes of the transportation path; according to the second comprehensive feature, determining the transportation time of at least one sub-path of the transportation path; determining the transportation time of the transportation path according to the residence times of multiple nodes and the transportation time of at least one sub-path.
[0008] According to an embodiment of the present disclosure, the transportation time of a transportation path is determined based on the detention time of multiple nodes and the transportation time of at least one sub-path, including: determining at least one risk time in the transportation path, the risk time characterizing the time impact of risk data on the transportation time of the transportation path; determining the transportation time of the transportation path based on at least one risk time, the detention time of each node and the transportation time of each sub-path.
[0009] According to an embodiment of the present disclosure, determining at least one risk time in a transportation path includes: acquiring risk data of the transportation path; determining a first risk time of each node in the transportation path and a second risk time of each sub-path based on the risk data; and determining the risk time of the transportation path based on the first risk time and the second risk time.
[0010] According to an embodiment of the present disclosure, a double-layer capsule network is trained by the following operations: obtaining a first feature and a second feature of a plurality of sample data; simultaneously inputting the first feature and the second feature into the double-layer capsule network to obtain a first comprehensive feature and a second comprehensive feature corresponding to each training transport path, and determining a predicted transport time of the training transport path according to the first comprehensive feature and the second comprehensive feature; calculating a loss according to the predicted transport time and the historical transport time of a plurality of training transport paths; updating a weight parameter of each branch in the double-layer capsule network through a relevant algorithm according to the loss; iterating the training process until the updated weight parameters converge to obtain a double-layer capsule network; wherein the two branches in the double-layer capsule network share some parameters.
[0011] According to an embodiment of the present disclosure, obtaining first features and second features of a plurality of sample data includes: obtaining a plurality of sample data, wherein the plurality of sample data include a plurality of training transport paths and a historical transport time of each training transport path, each training transport path includes first data and second data, the first data represents a plurality of nodes corresponding to each training transport path and a detention time of each node, and the second data represents at least one subpath corresponding to each training transport path and a transport time of each subpath; determining a first feature and a second feature corresponding to each training transport path based on the plurality of sample data, wherein the first feature represents time information and spatial information of a plurality of nodes in the transport path, and the second feature represents time information and spatial information of a subpath between two adjacent nodes in the transport path.
[0012] According to an embodiment of the present disclosure, obtaining first features and second features of multiple sample data includes: determining first data and second data from multiple sample data, wherein the first data represents type information of nodes and sub-paths in at least one labeled data pair, and the second data represents time information of nodes and sub-paths in at least one labeled data pair, and the labeled data pair represents two adjacent nodes in a transportation path and a sub-path therebetween; determining first features corresponding to multiple nodes in the transportation path and second features corresponding to at least one sub-path based on the first data and the second data, wherein the first feature is obtained by linearly mapping and aggregating features of multiple nodes in at least one labeled data pair, and the second feature is obtained by linearly mapping and aggregating features of at least one sub-path in at least one labeled data pair.
[0013] According to an embodiment of the present disclosure, based on the loss, the weight parameters of each branch in the double-layer capsule network are updated by a related algorithm, including: based on the loss, using a back propagation algorithm to calculate the gradient of the loss function for each parameter in the double-layer capsule network. The back propagation algorithm calculates the gradient layer by layer from the network output layer to the input layer through the chain rule to obtain the gradient value of each parameter for the loss function; based on the calculated gradient, the weight parameters are updated using the gradient descent method.
[0014] A second aspect of the present disclosure provides a data processing device, including: an acquisition module, used to acquire path data of a transportation path; an extraction module, used to perform feature extraction on the path data to obtain a first feature and a second feature, wherein the first feature represents the time information and spatial information of multiple nodes in the transportation path, and the second feature represents the time information and spatial information of a subpath between two adjacent nodes in the transportation path; a processing module, used to input the first feature and the second feature into a double-layer capsule network at the same time to obtain a first comprehensive feature and a second comprehensive feature, wherein the first feature is input through a first branch in the double-layer capsule network, and the second feature is input through a second branch in the double-layer capsule network; and a determination module, used to determine the transportation time of the transportation path according to the first comprehensive feature and the second comprehensive feature.
[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0017] Figure 1 A schematic diagram schematically shows a transport route of a multimodal transport mode according to an embodiment of the present disclosure;
[0018] Figure 2 A flowchart schematically shows a data processing method according to an embodiment of the present disclosure;
[0019] Figure 3 A flowchart of feature extraction of path data according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 4A A flowchart of a method for determining the transportation time of a transportation path according to another embodiment of the present disclosure is schematically shown;
[0021] Figure 4B A schematic diagram schematically illustrates the transport time of a transport path according to another embodiment of the present disclosure;
[0022] Figure 5 A flowchart of a method for determining the transportation time of a transportation path according to another embodiment of the present disclosure is schematically shown;
[0023] Figure 6 A flowchart of a method for determining risk time according to another embodiment of the present disclosure is schematically shown;
[0024] Figure 7 A flowchart of a double-layer capsule network training method according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 8 The structure diagram of a double-layer capsule network according to an embodiment of the present disclosure is schematically shown;
[0026] Fig. 9 The schematic diagram of a double-layer capsule network according to an embodiment of the present disclosure is shown;
[0027] Fig.10 The schematic diagram shows a data processing method according to an embodiment of the present disclosure;
[0028] Fig.11 The structure block diagram of a data processing device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0029] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0030] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0031] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0032] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0033] The embodiments of the present disclosure provide a data processing method and device. Before introducing the technical solutions provided by the embodiments of the present disclosure, the related technologies involved in the present disclosure are first described.
[0034] In logistics and transportation, predicting the time required for cargo transportation (Estimated Time of Arrival, ETA) is an important factor in improving the user's logistics experience. Usually, in ETA prediction, the route characteristics related to each transportation route and transportation time are determined, and the route characteristics are used to predict the transportation time of the transportation route in the future.
[0035] In an international logistics transportation system dominated by multimodal transport, a transportation route usually includes multiple paths with different transportation modes, for example, an air transport path, a train transport path, a car transport path and stops at different transfer points.
[0036] For the complex scenarios of international multimodal transport, when making ETA forecasts, it is easy to ignore the actual logistics process and structure of the multimodal transport network, resulting in inaccurate ETA forecast results.
[0037] Specifically, in the international logistics and transportation system dominated by multimodal transport, with the gradual improvement of the transparency, resilience and delivery customer satisfaction requirements of the global supply chain logistics network, the ability to predict the estimated arrival time of transportation in advance, reliably and accurately has become an important requirement for enterprises in the industry to enhance their competitiveness. However, accurately and reliably predicting ETA has always been a complex technical problem involving multi-source data and dynamic scenarios, especially for the complex scenarios of international multimodal transport, which is a difficult problem to be broken through in many international logistics management.
[0038] Figure 1 A schematic diagram of a transport route of a multimodal transport mode according to an embodiment of the present disclosure is schematically shown.
[0039] International multimodal transport mode refers to a mode of combined transport in which goods are loaded into containers and transported in multiple stages and by multiple modes. Figure 1 In a multimodal transport mode, after the product is processed in the factory and sent out, it can be transported to a collection center (for example, a warehouse), and then further transferred to the departure port, or directly to the departure port. At the departure port, it can be transported to the arrival port by land, air or water transport, and at the arrival port it can be directly transferred to the destination, or it can be further transferred to a collection center (for example, a warehouse), and then transferred from the collection center to the destination. Therefore, the international multimodal transport mode has the following characteristics:
[0040] ① Different characteristics of various modes of transport: For this kind of multimodal cargo transportation, the transportation span is large, different transportation sections adopt different modes of transport, various modes of transport have different characteristics, and the calculation of transportation time is also diverse and complicated.
[0041] ② Complex characteristics of passing through multiple nodes: The characteristics of passing through multiple nodes are diverse, including the unloading, loading, assembly, and transshipment of cargo containers. The node residence time is difficult to calculate accurately and uniformly.
[0042] ③ The diversity of transport arrangements affects the distribution of time: multimodal transport links also cover scheduled transport and irregular and flexibly arranged transport, which leads to peaks in the distribution of node transport time and periodicity that is difficult to accurately define.
[0043] ④ The dynamics and complexity of the global transportation network: In global transportation, we must also consider the inevitable restrictions of transporting goods, facilities and regulations, environmental protection regulations, and customs. These restrictions are complex and are also affected by the dynamic changes of the global transportation network. There will also be emergencies such as transportation interruptions that affect the actual transportation time.
[0044] In related technologies, ETA prediction methods are mainly divided into two categories: manual calculation methods based on traditional strategies and machine learning algorithm methods.
[0045] 1) Manual calculation method based on traditional strategies and fixed data:
[0046] Traditional ETA calculations for multimodal freight transport generally rely on experienced manual calculations. Taking the global transportation system of a product to be transported as an example, the estimated arrival time is calculated cumulatively based on the coarse-grained timeliness of each route maintained by each carrier and operation and maintenance personnel. The results calculated by this type of method rely entirely on fixed timeliness data, which is quite different from the actual dynamic situation. In addition, whenever there is a new combination of transportation routes, it is necessary to manually add maintenance timeliness, which is also based on rough manual estimates.
[0047] 2) Data-driven machine learning algorithms:
[0048] With the development of artificial intelligence technology, scenarios where such complex factors interact with each other and are difficult to calculate manually are gradually applying machine learning methods to learn the relationship between various influencing factors. The scenario problem of estimated arrival time prediction is also very suitable for machine learning methods. Commonly used machine learning methods are generally driven by historical data, that is, using sufficient historical transportation tracking time data, selecting statistical regression models (Logistic-Regression-based model), general deep learning time series network models (Transformer-based model), etc., to predict ETA results. However, this kind of pure data-driven implementation idea is often less effective in multimodal cargo transportation scenarios, because multimodal transport links include not only the first type: rigid time intervals between nodes, but also the second type: elastic retention time of the nodes themselves, and the third type: uncertain buffer time will be added for some situations, such as some additional services (storage, etc.) and emergency warning situations. Among them, the method based on machine learning algorithms is mainly a single historical data training-driven method.
[0049] Therefore, the manual calculation method has low computational efficiency and low accuracy for ETA prediction results, which is not conducive to practical application. Pure data-driven machine learning methods ignore the actual logistics process and structure of the multimodal transport network, fail to fully model the above time components, mix the three types of time, average the node's own time to the time interval between nodes for combined prediction, and cannot respond quickly to uncertain additional buffer time and reflect it in the final prediction results. The modeling method of ETA prediction usually ignores the particularity of multimodal transport business (large time span, many nodes along the way, and possible detention at the node), blurs the detention time of the node itself, flattens the modeling of the multimodal transport route nodes, and directly applies the regression model to average the time within the node to the time between nodes, resulting in the final prediction result ignoring the impact of node-related variables on the detention time.
[0050] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations.
[0051] Capsule network is a vector neural network. It consists of a series of layers, called "capsule layers", and each capsule layer consists of multiple "capsules". Each capsule is a group of neurons, which use capsules to represent the existence and attributes of features. Capsules are connected by dynamic routing, and low-level feature information is transferred to high-level feature representation through dynamic routing mechanism, so as to better capture the spatial relationship and changes of features.
[0052] The embodiment of the present disclosure provides a data processing method, including: obtaining path data of a transportation path; performing feature extraction on the path data to obtain a first feature and a second feature, wherein the first feature represents the time information and spatial information of multiple nodes in the transportation path, and the second feature represents the time information and spatial information of a subpath between two adjacent nodes in the transportation path; inputting the first feature and the second feature into a double-layer capsule network at the same time to obtain a first comprehensive feature and a second comprehensive feature, wherein the first feature is input through a first branch in the double-layer capsule network, and the second feature is input through a second branch in the double-layer capsule network; determining the transportation time of the transportation path according to the first comprehensive feature and the second comprehensive feature. For the multimodal transport mode, nodes and routes belong to different dimensions. The double-layer capsule network can fully simulate the interaction relationship between the node-route dual dimension and the final ETA value under the multimodal transport mode and its own self-action relationship, thereby obtaining a more accurate prediction result of the transportation time of the transportation route.
[0053] The following will be passed Figure 2~Figure 10 The data processing method of the disclosed embodiment is described in detail.
[0054] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.
[0055] like Figure 2 As shown, the data processing method of this embodiment includes operations S210 to S240.
[0056] In operation S210 , path data of a transportation path is acquired.
[0057] For example, the path data of the transport route indicates the departure place, destination, several transit places during the transport process, the mode of transport between each two places, and the delivery time of the goods. For example, it may include a transport route starting from City A at 10:00 am, air transport to City B, then transporting from City B to City C by road, and then transporting from City C to City D by ship.
[0058] The transportation path corresponding to the departure place and the destination may have one transportation path or multiple transportation paths. The transit points between each transportation path may be repeated or not, but the departure place and the destination are the same.
[0059] In operation S220, feature extraction is performed on the path data to obtain a first feature and a second feature, wherein the first feature represents time information and spatial information of multiple nodes in the transportation path, and the second feature represents time information and spatial information of a subpath between two adjacent nodes in the transportation path.
[0060] Exemplarily, a node represents multiple locations in a transportation path. For example, it may include: departure point (A), destination (D) and transit point (B and C). A sub-path represents the mode of transportation between two adjacent locations in a transportation path. For example, it may include: air transportation from A to B, road transportation from B to C, and ship transportation from C to D.
[0061] The time information and spatial information of a node can represent the geographical location information and transportation time information of the node. For example, cargo S is expected to be shipped at 12:00 at the departure place (A).
[0062] The time information and space information of the sub-path can represent the geographical location information, transportation time information and transportation mode of the nodes in the sub-path. For example, cargo S is expected to be shipped from A to B by air at 12:00.
[0063] The origin, destination, several transit points during the transportation of the goods S, and the mode of transportation between each two points. For example, it can include departure from city A and air transportation to city B.
[0064] In operation S230, the first feature and the second feature are simultaneously input into the double-layer capsule network to obtain a first comprehensive feature and a second comprehensive feature, wherein the first feature is input through a first branch in the double-layer capsule network, and the second feature is input through a second branch in the double-layer capsule network.
[0065] Exemplarily, the double-layer capsule network includes a first branch and a second branch in parallel. Each branch corresponds to a capsule network. The first feature is input into the capsule network of the first branch and a first comprehensive feature is output, and the second feature is input into the capsule network of the second branch and a second comprehensive feature is output. The capsule network of the first branch and the capsule network of the second branch share some parameters, and the capsule network of each branch can comprehensively analyze the results of the input feature analysis of the capsule networks of multiple branches (the first branch and the second branch) to obtain a comprehensive feature corresponding to the capsule network of the branch.
[0066] In operation S240, a transportation time of the transportation route is determined according to the first comprehensive feature and the second comprehensive feature.
[0067] In some embodiments, the path data of the transportation path to be predicted, for example, the path data may include the departure point, destination, several transit points during the transportation process, the transportation method between each two points, and the delivery time. Feature extraction is performed on the path data to obtain the first feature (node-related feature in the transportation path) and the second feature (sub-path-related feature in the transportation path). The first feature is input into the first branch of the double-layer capsule network to obtain the first comprehensive feature, and the second feature is input into the second branch of the double-layer capsule network to obtain the second comprehensive feature. The transportation time corresponding to the transportation path to be predicted is predicted by the first comprehensive feature and the second comprehensive feature.
[0068] It is understandable that for multimodal transport mode, nodes and routes belong to different dimensions. Considering the independence and correlation between node holding temporal interval and lane transit interval and their corresponding characteristic attributes, the double-layer capsule network can fully simulate the interaction relationship between the node-route dual dimension and the final ETA value under the multimodal transport mode and its own self-action relationship, so as to obtain a more accurate prediction result of the transport route transit time.
[0069] Figure 3 The flowchart of feature extraction for path data according to an embodiment of the present disclosure is schematically shown.
[0070] As described above, in operation S220, feature extraction is performed on the path data to obtain a first feature and a second feature. In one possible implementation, Figure 3 As shown, the operation may further include operation S221 to operation S222.
[0071] In operation S221, first data and second data are determined from the path data, wherein the first data represents type information of nodes and sub-paths in at least one marked data pair, the second data represents time information of nodes and sub-paths in at least one marked data pair, and the marked data pair represents two adjacent nodes in the transportation path and the sub-path therebetween.
[0072] In operation S222, based on the first data and the second data, a first feature corresponding to multiple nodes in the transportation path and a second feature corresponding to at least one sub-path are determined, wherein the first feature is obtained by linearly mapping and aggregating features of multiple nodes in at least one labeled data pair, and the second feature is obtained by linearly mapping and aggregating features of at least one sub-path in at least one labeled data pair.
[0073] Specifically, the path data is first grouped according to the category features and the continuous features to obtain the first data and the second data respectively. For example, the first data may include: node type, geographical location, transportation mode, and carrier route. The second data may include: the residence time of the node and the transportation time of the sub-path. The first data and the second data are respectively input into their respective corresponding encoders for encoding. At the same time, the node-route (for example, AB air transport) data pairs in each transportation path are constructed with the node as the index. The encoded first data, second data, and node-route data pairs are linearly mapped to the common output embedding matrix to obtain the aggregated node features (first features) and aggregated route features (second features) of each transportation path.
[0074] Figure 4A The flowchart of a method for determining the transportation time of a transportation route according to another embodiment of the present disclosure is schematically shown. Figure 4B A schematic diagram schematically illustrates the transportation time of a transportation path according to another embodiment of the present disclosure.
[0075] As described above, in operation S240, the transportation time of the transportation path is determined based on the first comprehensive feature and the second comprehensive feature. Figure 4A As shown, the operation may further include operation S241 to operation S243.
[0076] In operation S241, at least a plurality of node stay times of the transportation path are determined according to the first comprehensive feature.
[0077] In operation S242, a transportation time of at least one sub-route of the transportation route is determined based on the second comprehensive feature.
[0078] In operation S243, a transportation time of the transportation path is determined according to the plurality of node stay times and the transportation time of at least one sub-path.
[0079] In some embodiments, Figure 4B As shown, in the transport path of the multimodal transport mode, the transport time may include multiple node dwelling times and multiple sub-path transport times. The node dwelling time indicates the necessary time for the goods to stay at the node when they are delivered, for example, it may be the unloading or loading time of a container loaded with goods.
[0080] The first comprehensive feature is used to predict the retention time of multiple nodes in the transportation path, and the second comprehensive feature is used to predict the transportation time of one or more sub-paths in the transportation path. The retention time of the corresponding node in the transportation path is added to the transportation time of the sub-path to predict the transportation time of the transportation path.
[0081] Furthermore, based on the predicted node detention time and sub-path transportation time, the segment transportation time corresponding to each node-route data pair in the transportation path is obtained respectively, and finally the segment transportation time of multiple node-line data pairs corresponding to the transportation path is added up to obtain the transportation time of the transportation path.
[0082] In other embodiments, the retention time of each node and the transportation time of each sub-path may be directly added multiple times to obtain the transportation time of the transportation path.
[0083] It can be understood that the node retention time and sub-path transportation time in the transportation path are predicted separately, which clarifies the time impact of various factors affecting the transportation time in the transportation path of the multimodal transport mode. This makes the prediction of transportation time closer to the actual situation of the multimodal transport mode and obtains more accurate prediction results.
[0084] In other embodiments, the first comprehensive feature can also be used to determine the reason why the goods are delayed at each node. For example, when the goods are delivered through a node water transport port, the delay at the node is usually caused by loading and unloading cargo containers. The second comprehensive feature can also be used to determine whether the goods incur additional costs during the sub-path delivery process. For example, when the goods are delivered by road, highway tolls are likely to be incurred.
[0085] Figure 5 The flowchart of a method for determining the transportation time of a transportation route according to another embodiment of the present disclosure is schematically shown.
[0086] As described above, in operation S243, the transportation time of the transportation path is determined according to the multiple node retention times and the transportation time of at least one sub-path. Figure 5 As shown, the operation may further include operation S310 to operation S320.
[0087] In operation S310 , at least one risk time in a transportation path is determined, where the risk time represents a time impact caused by risk data on a transportation time of the transportation path.
[0088] In operation S320, a transportation time of the transportation path is determined according to at least one risk time, the detention time of each node, and the transportation time of each sub-path.
[0089] It should be known that during the transportation of goods, sometimes factors such as weather, facilities, regulations, etc. may affect the normal transportation of goods, thus affecting the transportation time of goods.
[0090] In some embodiments, the risk data corresponding to the transportation path is monitored in real time to predict the impact of the risk data on the transportation time (risk time). Finally, the risk time, the node detention time and the transportation time of the sub-path are added together to obtain the transportation time of the path.
[0091] It is understandable that in the process of transport time prediction, the impact of risk factors of the transport route on the transport time is introduced, so as to predict the transport time more accurately.
[0092] Figure 6 The flowchart of a method for determining risk time according to another embodiment of the present disclosure is schematically shown.
[0093] As described above, in operation S310, at least one risk time in the transportation path is determined. In one possible implementation, Figure 6 As shown, the operation may further include operation S311 to operation S313.
[0094] In operation S311, risk data of the transportation path is acquired.
[0095] In operation S312, a first risk time of each node in the transportation path and a second risk time of each sub-path are determined according to the risk data.
[0096] In operation S313, a risk time of the transportation route is determined according to the first risk time and the second risk time.
[0097] Specifically, in order to improve the resilience and dynamic adaptive ability of the prediction system, the external relevant data of the risk warning module of the global supply chain network is connected. The risk data related to the target time and space (nodes and sub-paths) are obtained in real time through the risk warning module. According to the risk data, the time impact of the risk data on the relevant node detention time (first risk time) is calculated, and the time impact of the risk data on the relevant sub-path transportation time (second risk time) is calculated. According to the first risk time of the relevant node, the node detention time is modified (the original detention time is added to the first risk time) to obtain the calibrated node detention time. The transportation time of the sub-path is modified (the original sub-path transportation time is added to the second risk time) to obtain the calibrated sub-path transportation time. The calibrated node detention time is added to the calibrated sub-path transportation time to obtain the calibrated transportation time corresponding to the transportation path.
[0098] Furthermore, the node retention time and sub-path transportation time in the node-route data pair corresponding to the risk data can be calibrated and output to obtain the segment transportation time corresponding to the calibrated node-route data pair. The segment transportation time corresponding to the calibrated node-route data pair in the transportation path is summed to obtain the transportation time of the path.
[0099] It can be understood that the spatiotemporal data structure of the node-route data pair ensures that risk interruption can be directly affected by node index lookup to predict the transportation time.
[0100] Figure 7 The flowchart of the double-layer capsule network training method according to an embodiment of the present disclosure is schematically shown. Figure 8 The structure diagram of a double-layer capsule network according to an embodiment of the present disclosure is schematically shown. Fig. 9 The schematic diagram shows a principle diagram of a double-layer capsule network according to an embodiment of the present disclosure.
[0101] As mentioned above, for the training of a two-layer capsule network. In one possible implementation, Figure 7 As shown, it may include operations S410 to S450.
[0102] In operation S410 , first features and second features of a plurality of sample data are acquired.
[0103] In operation S420, the first feature and the second feature are simultaneously input into the double-layer capsule network to obtain the first comprehensive feature and the second comprehensive feature corresponding to each training transportation path, and the predicted transportation time of the training transportation path is determined according to the first comprehensive feature and the second comprehensive feature.
[0104] In operation S430 , a loss is calculated based on the predicted transportation time and the historical transportation time of the plurality of training transportation routes.
[0105] In operation S440, according to the loss, the weight parameters of each branch in the double-layer capsule network are updated through a relevant algorithm.
[0106] In operation S450, the training process is iterated until the updated weight parameters converge, and a double-layer capsule network is obtained.
[0107] Among them, the two branches in the double-layer capsule network share some parameters.
[0108] Specifically, each sample data represents the path data of a historical transportation path, and the first feature (fused node feature) and the second feature (fused sub-path feature) are extracted from each sample data.
[0109] Reference Figure 8The structure of the double-layer capsule network includes the first branch and the second branch, and each branch includes the initial capsule layer (low-level capsule) and the high-order capsule layer (high-order capsule). The specific algorithm learning process is as follows:
[0110] Reference Figure 8 and Fig. 9 , the first feature is input into the first branch of the double-layer capsule network, and the second feature is input into the second branch of the double-layer capsule network.
[0111] First branch: input the first feature ,Two-layer capsule, dynamic routing coefficient , weight .
[0112] Second branch: input the second feature ,Two-layer capsule, dynamic routing coefficient , weight .
[0113] in, Share some parameters.
[0114] The dynamic routing network is a key component of the capsule network, which is used to connect capsules at different levels. The basic idea is to use the output of the low-level capsule as the input of the high-level capsule, and the connection weights between the two layers are updated through iterations to automatically learn the relationship between capsules. In the double-layer capsule network structure, combined with the special structure of the double branches, the connection weights are increased to actively learn the relationship between different features between nodes and lines, while considering the overall feature trend through the compression function of the dynamic routing.
[0115] Step 1: Initialize routing coefficients and weight matrices:
[0116]
[0117]
[0118]
[0119] in and represents the relationship between the i-th low-level capsule (v) and the j-th high-level capsule ( ) is initialized to 0; and represents the softened routing coefficient (normalized routing coefficient / coupling coefficient) between the i-th low-level capsule and the j-th high-level capsule in the first branch and the second branch, and is initialized as , N is the number of low-level capsules; weight initialization uses Gaussian distribution initialization method .
[0120] It should be noted that, in the embodiment of the present disclosure, the total number of low-level capsules and high-level capsules is the same, that is, N.
[0121] Step 2: Calculate the output part of the low-level capsule to the high-level capsule of each branch separately:
[0122]
[0123]
[0124] in, is the i-th low-level capsule of the first branch, and its value is the feature of the previous input; It is the contribution output of the i-th bottom-level capsule of the first branch to the j-th high-level capsule; the first branch is expressed similarly.
[0125] Step 3: Summarize and calculate the high-level capsule values of each branch separately:
[0126]
[0127]
[0128] Step 4: Update the routing coefficients:
[0129]
[0130]
[0131]
[0132]
[0133] in, The function represents the normalization of the routing coefficient.
[0134] Step 5: Calculate the output layer capsule of each branch separately:
[0135]
[0136]
[0137] in, Indicates the residence time of the node corresponding to each sample data, Indicates the transportation time of the sub-path corresponding to each sample data, The function represents the linear cumulative sum function of the vector elements; The function represents the squeeze activation function: .
[0138] Step 6: Combine prediction outputs:
[0139]
[0140] in, Represents the predicted transportation time corresponding to the sample data.
[0141] Step 7: Calculate the loss:
[0142]
[0143] in, represents the output prediction value of input sample t, Then represents the true label value of sample t, and M represents the total number of samples.
[0144] Step 8: Update the weight parameters by back propagation through the gradient descent method:
[0145]
[0146]
[0147] in is the learning rate.
[0148] Step 9: Repeat Step 2-Step 8 until convergence.
[0149] The fused node spatiotemporal feature vector (first feature) and route spatiotemporal feature vector (second feature) are input into two groups of capsule networks respectively, and then pass through the primary capsule layer and the high-level capsule layer in turn. Considering the independent correlation between the spatiotemporal information of nodes and routes, the weight parameter matrices of the two groups of capsule networks are shared, and the dynamic routing algorithm is applied to synchronously update the capsule weights. The forward update is iterated, and the scalar values are output respectively after the squeezing function. The MAE loss function is designed to measure the error between the numerical value after weight accumulation and the true value, and then the accumulated network weight parameters are updated by backpropagation.
[0150] It is understandable that for multimodal transport mode, nodes and routes belong to different dimensions, but related technologies usually treat their impact on end-to-end ETA in the same way. The double-layer capsule network makes special modifications to the node-route spatiotemporal data based on the single cluster network, so that it can fully simulate the interaction relationship between the node-route dual dimension and the final ETA value in the multimodal transport mode and its own internal interaction relationship.
[0151] In some embodiments, operation S410, obtaining the first feature and the second feature of the plurality of sample data, may include the following operations:
[0152] Acquire multiple sample data, wherein the multiple sample data include multiple training transport paths and historical transport time of each training transport path, each training transport path includes first data and second data, the first data represents multiple nodes corresponding to each training transport path and the residence time of each node, and the second data represents at least one sub-path corresponding to each training transport path and the transport time of each sub-path.
[0153] Based on multiple sample data, a first feature and a second feature corresponding to each training transport path are determined, wherein the first feature represents time information and spatial information of multiple nodes in the transport path, and the second feature represents time information and spatial information of a subpath between two adjacent nodes in the transport path.
[0154] Specifically, for extracting the first feature and the second feature from each sample data, reference may be made to the above operation S220, which will not be described in detail here.
[0155] In some embodiments, operation S410, obtaining the first feature and the second feature of the plurality of sample data, may include the following operations:
[0156] Determine first data and second data from multiple sample data, wherein the first data represents type information of nodes and sub-paths in at least one labeled data pair, the second data represents time information of nodes and sub-paths in at least one labeled data pair, and the labeled data pair represents two adjacent nodes in the transportation path and the sub-path therebetween.
[0157] Based on the first data and the second data, a first feature corresponding to multiple nodes in the transportation path and a second feature corresponding to at least one sub-path are determined, wherein the first feature is obtained by linearly mapping and aggregating features of multiple nodes in at least one labeled data pair, and the second feature is obtained by linearly mapping and aggregating features of at least one sub-path in at least one labeled data pair.
[0158] Specifically, two encoders are used to process the continuous variable features and categorical variable features in the sample data respectively: a continuous variable encoder and a categorical variable encoder.
[0159] Suppose we have a data set X containing n samples, and the continuous variable of the sample can be expressed as , the type variable of the sample can be expressed as ,in is the number of all category indices of this type of variable. The goal is to encode all features into dimensional feature vector. The encoding process is as follows:
[0160] (1) Continuous variable coding:
[0161] For samples , given a continuous variable input , through a fully connected layer and the weight matrix and the bias vector Mapping to output vector :
[0162]
[0163] (2) Categorical variable encoding:
[0164] For sample i, given a certain type of variable input as a category index , through a lookup table in an embedding layer Mapping to output vector :
[0165]
[0166] Among them, here Indicates the first The corresponding embedding vector of each row.
[0167] Based on the node-route spatiotemporal data model described previously, the labeled data pairs of nodes and routes have been obtained. The encoded features of the node-route data pair of each sample will be linearly mapped respectively, and the mapping output is the aggregated node feature (first comprehensive feature) and the aggregated route feature (second comprehensive feature).
[0168] For example, suppose the node feature matrix output by the encoding layer is: , we select K node feature columns for linear combination:
[0169]
[0170] Among them, the weight matrix , bias
[0171] Then the output of the linear mapping layer is: , the second feature ,use At the same time, it serves as the input of different branches of the double-layer capsule network.
[0172] It can be understood that compared with directly using the encoding feature Z, the introduction of the linear mapping layer can, on the one hand, learn the linear combination between the input features and enhance the expressiveness of the model; on the other hand, the linear combination can reduce the number of features input to the capsule network and reduce the complexity of the model; at the same time, the parameters of the linear mapping layer can be trained together with the capsule network, making the linear combination more conducive to downstream tasks.
[0173] In some embodiments, operation S440, updating the weight parameter of each branch in the double-layer capsule network by a related algorithm according to the loss, may include:
[0174] Based on the loss, the back propagation algorithm is used to calculate the gradient of the loss function for each parameter in the double-layer capsule network. The back propagation algorithm calculates the gradient layer by layer from the network output layer to the input layer through the chain rule to obtain the gradient value of each parameter for the loss function;
[0175] According to the calculated gradient, the weight parameters are updated using the gradient descent method.
[0176] Specifically, for extracting the first feature and the second feature in each sample data, reference may be made to the above steps 7 to 9, which will not be repeated here.
[0177] Fig.10 The schematic diagram shows a principle diagram of a data processing method according to an embodiment of the present disclosure.
[0178] The data processing method of the embodiment of the present disclosure includes two parts in its specific implementation structure: a data processing part and a model network part.
[0179] The data processing part includes data collection, data cleaning and feature selection.
[0180] Specifically, the path data of the transport path is obtained, the duplicate data in the path data is deleted, and the path data is uniformly formatted. The cleaned path data is divided according to the category feature and the continuous feature to obtain the first data and the second data respectively. For example, the first data may include: node type, geographical location, transportation mode, and carrier line. The second data may include: the retention time of the node and the transportation time of the sub-path. The first data and the second data are then input into the model network part for further processing.
[0181] Reference Fig.10 The model network part includes four layers of network, input layer and output layer. The four layers of network are: input layer, encoding layer, merge layer, capsule network layer, calibration layer and output layer.
[0182] The encoding layer is used to encode the first data and the second data respectively. The aggregation layer is used to linearly map the encoded features (encoded first data and second data) of the node-route data pair of each transportation path, and map and output the aggregated node features (first features) and the aggregated route features (second features). The two branches of the capsule network layer process the first feature and the second feature respectively to obtain the first comprehensive feature and the second comprehensive feature, and predict the node's residence time based on the first comprehensive feature, and the transportation time of the sub-path based on the second comprehensive feature. The node's residence time is added to the transportation time of the sub-path to predict the transportation time of the transportation path. The calibration layer is used to analyze the risk data obtained by the risk warning module to obtain the risk time, modify the corresponding items by mapping the node and route index, and the calibrated prediction value finally passes through the fully connected layer and outputs the final predicted estimated arrival time.
[0183] It can be understood that the method of the embodiment of the present disclosure is more in line with the actual operational characteristics of multimodal transport, by fully learning the independent correlation between nodes and routes in the transportation process, that is, by fully fitting the mutual influence relationship of various possible factors between nodes and the relationship of the node's own retention time interval through the model. And by introducing the risk monitoring system to directly affect the delay warning of nodes and routes to the post-processing of the verification layer, it can finally predict ETA more accurately, flexibly, quickly and adaptively end-to-end.
[0184] Based on the above data processing method, the present disclosure also provides a data processing device. Fig.11 The device is described in detail.
[0185] Fig.11 The structure block diagram of a data processing device according to an embodiment of the present disclosure is schematically shown.
[0186] like Fig.11 As shown, the data processing device 500 of this embodiment includes an acquisition module 510 , an extraction module 520 , a processing module 530 and a determination module 540 .
[0187] The acquisition module 510 is used to acquire the path data of the transportation path. In one embodiment, the acquisition module 510 can be used to perform the operation S210 described above, which will not be described in detail here.
[0188] The extraction module 520 is used to extract features from the path data to obtain a first feature and a second feature, wherein the first feature represents the time information and spatial information of multiple nodes in the transportation path, and the second feature represents the time information and spatial information of a sub-path between two adjacent nodes in the transportation path. In one embodiment, the extraction module 520 can be used to perform the operation S220 described above, which will not be repeated here.
[0189] The processing module 530 is used to input the first feature and the second feature into the double-layer capsule network at the same time to obtain the first comprehensive feature and the second comprehensive feature, wherein the first feature is input through the first branch in the double-layer capsule network, and the second feature is input through the second branch in the double-layer capsule network. In one embodiment, the processing module 530 can be used to perform the operation S230 described above, which will not be repeated here.
[0190] The determination module 540 is used to determine the transportation time of the transportation route according to the first comprehensive feature and the second comprehensive feature. In one embodiment, the determination module 540 can be used to perform the operation S240 described above, which will not be repeated here.
[0191] According to an embodiment of the present disclosure, any multiple modules among the acquisition module 510, the extraction module 520, the processing module 530 and the determination module 540 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 510, the extraction module 520, the processing module 530 and the determination module 540 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 510, the extraction module 520, the processing module 530 and the determination module 540 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0192] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0193] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data processing method, comprising: Obtaining route data for transportation routes; Extracting features from the path data to obtain a first feature and a second feature, wherein the first feature represents time information and spatial information of a plurality of nodes in the transportation path, and the second feature represents time information and spatial information of a sub-path between two adjacent nodes in the transportation path; Inputting the first feature and the second feature into a double-layer capsule network at the same time to obtain a first comprehensive feature and a second comprehensive feature, wherein the first feature is input through a first branch in the double-layer capsule network, and the second feature is input through a second branch in the double-layer capsule network; The transportation time of the transportation route is determined according to the first comprehensive feature and the second comprehensive feature.
2. According to the method of claim 1, the step of extracting features from the path data to obtain the first feature and the second feature comprises: Determine first data and second data from the path data, wherein the first data represents type information of the node and the sub-path in at least one labeled data pair, and the second data represents time information of the node and the sub-path in at least one labeled data pair, and the labeled data pair represents two adjacent nodes in the transportation path and the sub-path therebetween; Based on the first data and the second data, determine the first feature corresponding to multiple nodes in the transportation path and the second feature corresponding to at least one sub-path, wherein the first feature is obtained by linearly mapping and aggregating the features of the multiple nodes in the at least one labeled data pair, and the second feature is obtained by linearly mapping and aggregating the features of the at least one sub-path in the at least one labeled data pair.
3. The method according to claim 1, wherein determining the transportation time of the transportation route according to the first comprehensive feature and the second comprehensive feature comprises: Determine at least the retention time of multiple nodes of the transportation path according to the first comprehensive feature; determining at least a transport time of at least one sub-route of the transport route based on the second comprehensive feature; The transportation time of the transportation path is determined according to the plurality of node stay times and the transportation time of the at least one sub-path.
4. The method according to claim 3, wherein determining the transportation time of the transportation path according to the plurality of node retention times and the transportation time of the at least one sub-path comprises: determining at least one risk time in the transportation path, the risk time representing a time impact of risk data on a transportation time of the transportation path; The transportation time of the transportation path is determined according to the at least one risk time, the detention time of each of the nodes, and the transportation time of each of the sub-paths.
5. The method according to claim 4, wherein determining at least one risk time in the transportation path comprises: Obtaining risk data of the transportation route; Determine, according to the risk data, a first risk time for each node in the transportation path and a second risk time for each sub-path; The risk time of the transportation route is determined according to the first risk time and the second risk time.
6. According to the method of claim 1, the double-layer capsule network is trained by the following operations: Acquire a first feature and a second feature of a plurality of sample data; Inputting the first feature and the second feature into the double-layer capsule network at the same time to obtain a first comprehensive feature and a second comprehensive feature corresponding to each of the training transportation routes, and determining a predicted transportation time of the training transportation route according to the first comprehensive feature and the second comprehensive feature; calculating a loss based on the predicted transportation time and historical transportation time of the plurality of training transportation routes; According to the loss, updating the weight parameters of each branch in the double-layer capsule network through a relevant algorithm; Iterate the training process until the updated weight parameters converge to obtain the double-layer capsule network; Among them, the two branches in the double-layer capsule network share some parameters.
7. The method according to claim 6, wherein obtaining the first feature and the second feature of the plurality of sample data comprises: Acquire a plurality of sample data, wherein the plurality of sample data include a plurality of training transport routes and a historical transport time of each of the training transport routes, each of the training transport routes includes first data and second data, the first data representing a plurality of nodes corresponding to each of the training transport routes and a retention time of each of the nodes, and the second data representing at least one sub-route corresponding to each of the training transport routes and a transport time of each of the sub-route; Based on the multiple sample data, a first feature and a second feature corresponding to each of the training transport paths are determined, wherein the first feature represents the time information and spatial information of multiple nodes in the transport path, and the second feature represents the time information and spatial information of a subpath between two adjacent nodes in the transport path.
8. The method according to claim 6 or 7, wherein obtaining the first feature and the second feature of the plurality of sample data comprises: Determine first data and second data from the plurality of sample data, wherein the first data represents type information of the node and the sub-path in at least one labeled data pair, the second data represents time information of the node and the sub-path in at least one labeled data pair, and the labeled data pair represents two adjacent nodes in the transportation path and the sub-path therebetween; Based on the first data and the second data, determine the first feature corresponding to multiple nodes in the transportation path and the second feature corresponding to at least one sub-path, wherein the first feature is obtained by linearly mapping and aggregating the features of the multiple nodes in the at least one labeled data pair, and the second feature is obtained by linearly mapping and aggregating the features of the at least one sub-path in the at least one labeled data pair.
9. The method according to claim 6, wherein the weight parameters of each branch in the double-layer capsule network are updated by a related algorithm according to the loss, comprising: According to the loss, a back propagation algorithm is used to calculate the gradient of the loss function for each parameter in the double-layer capsule network. The back propagation algorithm calculates the gradient layer by layer from the network output layer to the input layer through the chain rule to obtain the gradient value of each parameter for the loss function; According to the calculated gradient, the weight parameters are updated using the gradient descent method.
10. A data processing device, comprising: An acquisition module, used for acquiring path data of a transportation path; An extraction module, configured to perform feature extraction on the path data to obtain a first feature and a second feature, wherein the first feature represents time information and spatial information of a plurality of nodes in the transportation path, and the second feature represents time information and spatial information of a subpath between two adjacent nodes in the transportation path; a processing module, configured to simultaneously input the first feature and the second feature into a double-layer capsule network to obtain a first comprehensive feature and a second comprehensive feature, wherein the first feature is input through a first branch in the double-layer capsule network, and the second feature is input through a second branch in the double-layer capsule network; and A determination module is used to determine the transportation time of the transportation route according to the first comprehensive feature and the second comprehensive feature.
