Logistics track real-time pushing method and device, equipment and storage medium

By aggregating and correcting logistics trajectory data, and utilizing a multi-scale Transformer model and reinforcement learning strategy, dynamic decision-making push parameters are made, solving the problems of time sequence disorder and network congestion in logistics trajectory push, and achieving efficient and reliable trajectory data push.

CN122134230APending Publication Date: 2026-06-02SHANGHAI DONGPU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI DONGPU INFORMATION TECH CO LTD
Filing Date
2026-02-11
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing logistics trajectory push methods suffer from chaotic timing, inconsistent formats, and fixed push strategies, leading to problems such as timing disorder, information errors, and network congestion during the push process. These methods fail to meet the high precision, high timeliness, and high reliability requirements of smart logistics scenarios.

Method used

By receiving and aggregating the trajectory data stream, identifying and correcting abnormal timestamp trajectory pairs, constructing a time-series correction model using a multi-scale Transformer model, and dynamically deciding on push priorities and parameters based on the target platform status and historical push success rate, trajectory data that meets the time-series logic requirements of the target platform is generated.

Benefits of technology

It achieves precise temporal correction of trajectory data and intelligent dynamic adaptation of push strategies, improving push efficiency and success rate, avoiding platform congestion, and ensuring the accuracy and reliability of trajectory data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134230A_ABST
    Figure CN122134230A_ABST
Patent Text Reader

Abstract

This invention relates to the field of logistics and discloses a method, apparatus, device, and storage medium for real-time push of logistics trajectories. The method is used for adaptive push of logistics trajectories. The method includes: receiving raw logistics trajectory data streams, forming raw trajectory sequences based on single waybills, identifying and correcting abnormal trajectory pairs, and replacing corresponding adjacent trajectory pairs in the raw trajectory sequences to generate corrected trajectory sequences; performing logical verification on the corrected trajectory sequences based on a preset business rule set, and generating target trajectory data upon successful verification; constructing and training a time-series correction model based on a multi-scale Transformer model, inputting the target trajectory data into the time-series correction model to obtain an ordered trajectory sequence and its corresponding time-series confidence; and dynamically deciding the push priority, batch size, and network retry parameters of the ordered trajectory sequence using a pre-trained reinforcement learning strategy network, and generating push instructions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of logistics, and in particular to a method, apparatus, equipment, and storage medium for real-time tracking of logistics trajectories. Background Technology

[0002] With the rapid development of e-commerce and smart logistics, the real-time and accurate tracking of logistics routes has become a core requirement for improving user experience and ensuring the quality of logistics services. Logistics trajectory data includes the location, time, and operational information of the entire process from pickup, transshipment, delivery to receipt. Its real-time push service is directly related to the core interests of e-commerce platforms, logistics companies, and end users—end users need to monitor the real-time status of their goods through trajectory pushes, logistics companies need to rely on push data for capacity scheduling and anomaly management, and e-commerce platforms need to use trajectory information to improve the transparency of order fulfillment.

[0003] Currently, in logistics trajectory push scenarios, the raw trajectory data streams mostly originate from terminal devices at different warehousing, transportation, and delivery nodes. This results in issues such as fragmented data generation, uneven transmission delays, and inconsistent formats, leading to defects in the raw trajectory data, including incorrect timestamps, abnormal intervals between adjacent trajectories, and missing fields. Furthermore, the different timing logic requirements and interface specifications of various target push platforms (such as e-commerce platforms, user query terminals, and logistics management platforms) further increase the difficulty of trajectory data adaptation and push.

[0004] Existing logistics tracking push methods mostly employ simple data filtering and format conversion, lacking precise anomaly correction and timing verification of the original tracking data. This easily leads to problems such as inconsistent tracking timing and incorrect information, impacting user trust and the reputation of logistics services. Furthermore, existing methods often use fixed push strategies, failing to dynamically adjust push parameters based on the target platform's real-time operating status, tracking data confidence, and historical push results. This results in network congestion, push failures, and duplicate pushes, reducing the timeliness and reliability of tracking pushes.

[0005] More importantly, existing technologies lack solutions that balance the accuracy of trajectory timing correction with push efficiency. It is difficult to achieve dynamic adaptation of push priority, batch size and retry strategy while ensuring the accuracy and compliance of trajectory data, and thus cannot meet the core requirements of high accuracy, high timeliness and high reliability of real-time trajectory push in smart logistics scenarios.

[0006] Therefore, existing technologies still need improvement and development. Summary of the Invention

[0007] This invention provides a method, apparatus, device, and storage medium for real-time push of logistics trajectories, used for adaptive push of logistics trajectories.

[0008] The first aspect of this invention provides a real-time logistics trajectory push method, comprising: receiving an original logistics trajectory data stream and aggregating the original logistics trajectory data stream by waybill number to form an original trajectory sequence based on a single waybill; identifying and marking adjacent trajectory pairs in the original trajectory sequence whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs; correcting the abnormal trajectory pairs and replacing the corresponding adjacent trajectory pairs in the original trajectory sequence to generate a corrected trajectory sequence; performing logical verification on the corrected trajectory sequence based on a preset business rule set; if the verification passes, generating target trajectory data that meets the temporal logic requirements of the target platform; constructing and training a temporal correction model based on a multi-scale Transformer model; inputting the target trajectory data into the temporal correction model to obtain a sequence-preserving trajectory sequence and the corresponding temporal confidence; acquiring the real-time status indicators and historical push success rate of the target platform; and, based on the temporal confidence of the sequence-preserving trajectory sequence, the real-time status indicators of the target platform, and the historical push success rate, dynamically deciding the push priority, batch size, and network retry parameters of the sequence-preserving trajectory sequence using a pre-trained reinforcement learning policy network, and generating a push instruction.

[0009] Optionally, in a first implementation of the first aspect of the present invention, receiving the original logistics trajectory data stream and aggregating the original logistics trajectory data stream by waybill number to form an original trajectory sequence per waybill includes: receiving the original trajectory data in a streaming manner, the original trajectory data including waybill number, millisecond-level timestamp and operation description; performing format compliance and integrity verification on the original trajectory data, and generating verification data if the verification passes; grouping the verification data by waybill number to obtain multiple sets, and concatenating the sets to obtain the original trajectory sequence corresponding to each waybill number.

[0010] Optionally, in a second implementation of the first aspect of the present invention, the step of identifying and marking adjacent trajectory pairs in the original trajectory sequence whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs, correcting the abnormal trajectory pairs, and replacing the corresponding adjacent trajectory pairs in the original trajectory sequence to generate a corrected trajectory sequence includes: traversing the original trajectory sequences of each waybill, calculating the timestamp interval of adjacent trajectories, and marking adjacent trajectory pairs whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs; performing logical merging or timestamp fine-tuning on the abnormal trajectory pairs according to predefined correction rules to obtain corrected trajectory pairs; replacing the corresponding adjacent trajectory pairs in the original trajectory sequence with corrected trajectory pairs, and generating a corrected trajectory sequence.

[0011] Optionally, in a third implementation of the first aspect of the present invention, the step of performing logical verification on the corrected trajectory sequence based on a preset business rule set, and generating target trajectory data that meets the timing logic requirements of the target platform if the verification passes, includes: loading a preset business rule set according to the business specifications of the target platform; taking the corrected trajectory sequence as a whole and substituting it into the preset business rule set for full-process logical deduction and consistency check; if the full-process logical deduction and consistency check pass, converting the field format according to the business specifications of the target platform to generate target trajectory data that meets the timing logic requirements of the target platform.

[0012] Optionally, in the fourth implementation of the first aspect of the present invention, the step of constructing and training a time-series correction model based on a multi-scale Transformer model, and inputting the target trajectory data into the time-series correction model to obtain an order-preserving trajectory sequence and the corresponding time-series confidence score, includes: constructing and training a time-series correction model based on a multi-scale Transformer model; encoding the timestamps and trajectory description text in the target trajectory data into time feature vectors and semantic feature vectors, respectively; fusing the time feature vectors and the semantic feature vectors into a fused feature vector, and inputting the fused feature vector into the time-series correction model to obtain an order-preserving trajectory sequence and the corresponding time-series confidence score.

[0013] Optionally, in the fifth implementation of the first aspect of the present invention, the construction and training of the time-series correction model based on the multi-scale Transformer model includes: constructing a main network framework using a Transformer encoder; configuring a parallel multi-scale attention mechanism within the main network framework to form a base model, wherein the multi-scale attention mechanism includes at least a local window attention head and an extended context attention head, wherein the local window attention head is used to model millisecond-level adjacent time-series relationships, and the extended context attention head is used to capture global order stage dependencies; and training and optimizing the base model using a pre-built training dataset to obtain the time-series correction model.

[0014] Optionally, in the sixth implementation of the first aspect of the present invention, the step of obtaining the real-time status indicators and historical push success rate of the target platform, and dynamically deciding the push priority, batch size, and network retry parameters of the ordered trajectory sequence based on the temporal confidence of the ordered trajectory sequence, the real-time status indicators of the target platform, and the historical push success rate, and generating a push instruction using a pre-trained reinforcement learning policy network, includes: obtaining the real-time status indicators and historical push success rate of the target platform, wherein the real-time status indicators include the response latency of the interface and the system load, and combining the response latency of the interface, the system load, and the historical push success rate to form an environment state vector; using the environment state vector and the temporal confidence corresponding to the ordered trajectory sequence as state inputs to the pre-trained reinforcement learning policy network to obtain an action vector output by the pre-trained reinforcement learning policy network, wherein the action vector includes priority weights, batch size, and number of retries; and generating a push instruction according to the ordered trajectory sequence and the corresponding priority weights, batch size, and number of retries.

[0015] A second aspect of the present invention provides a real-time logistics trajectory push device, comprising: an aggregation module, configured to receive an original logistics trajectory data stream and aggregate the original logistics trajectory data stream by waybill number to form an original trajectory sequence based on a single waybill; a correction module, configured to identify and mark adjacent trajectory pairs in the original trajectory sequence whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs, correct the abnormal trajectory pairs, replace the corresponding adjacent trajectory pairs in the original trajectory sequence, and generate a corrected trajectory sequence; and a verification module, configured to perform logical verification on the corrected trajectory sequence based on a preset business rule set, and if the verification passes, generate a symbol... The system includes: target trajectory data that meets the temporal logic requirements of the target platform; a correction module for constructing and training a temporal correction model based on a multi-scale Transformer model, inputting the target trajectory data into the temporal correction model to obtain an ordered trajectory sequence and its corresponding temporal confidence; and a push module for acquiring the real-time status indicators and historical push success rates of the target platform, dynamically deciding the push priority, batch size, and network retry parameters of the ordered trajectory sequence using a pre-trained reinforcement learning policy network based on the temporal confidence of the ordered trajectory sequence, the real-time status indicators of the target platform, and the historical push success rate, and generating push instructions.

[0016] A third aspect of the present invention provides a real-time logistics trajectory push device, comprising: a memory and at least one processor, wherein the memory stores computer-readable instructions, and the memory and the at least one processor are interconnected via a circuit; the at least one processor invokes the computer-readable instructions in the memory to cause the real-time logistics trajectory push device to perform the various steps of the real-time logistics trajectory push method described above.

[0017] A fourth aspect of the present invention provides a computer-readable storage medium storing computer-readable instructions that, when executed on a computer, cause the computer to perform the various steps of the real-time logistics trajectory push method described above.

[0018] The technical solution provided by this invention aggregates the original trajectory data stream by waybill number to achieve unified management of single-way single-trajectory data. Simultaneously, by identifying and correcting abnormal timestamp trajectory pairs, invalid and abnormal data is eliminated at the source, improving the basic quality of the trajectory data. Furthermore, logical verification is performed based on a preset business rule set to ensure that the trajectory data meets the business and timing requirements of the target platform, reducing the risk of data adaptation after push notifications. In addition, a multi-scale Transformer model is innovatively used to construct a timing correction model, generating ordered trajectory sequences and outputting timing confidence scores, accurately ensuring the correctness of the trajectory timing and quantifying trajectory reliability. Moreover, by combining the target platform's real-time status, historical push success rate, and timing confidence scores, a reinforcement learning strategy network is used to dynamically decide push parameters, achieving intelligent dynamic adaptation of the push strategy. This not only improves push efficiency and success rate but also rationally allocates resources according to the platform status, avoiding platform congestion caused by blind push notifications. Attached Figure Description

[0019] Figure 1 This is a first flowchart of a real-time logistics trajectory push method provided in an embodiment of the present invention; Figure 2 This is a second flowchart of the real-time logistics trajectory push method provided in an embodiment of the present invention; Figure 3 This is a third flowchart of the real-time logistics trajectory push method provided in the embodiments of the present invention; Figure 4 This is a fourth flowchart of the real-time logistics trajectory push method provided in the embodiments of the present invention; Figure 5 The fifth flowchart of the real-time logistics trajectory push method provided in the embodiments of the present invention; Figure 6 The sixth flowchart of the real-time logistics trajectory push method provided in the embodiments of the present invention; Figure 7 This is a schematic diagram of the structure of the real-time logistics trajectory push device provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of a real-time logistics trajectory push device provided in an embodiment of the present invention. Detailed Implementation

[0020] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The first embodiment of a real-time logistics trajectory push method according to the present invention includes: S101. Receive the original logistics trajectory data stream and aggregate the original logistics trajectory data stream by waybill number to form an original trajectory sequence based on a single waybill.

[0022] It is understood that the executing entity of this invention can be a real-time logistics trajectory push device, a terminal, or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.

[0023] In this embodiment, a streaming data receiving architecture is established, connecting to the logistics trajectory data collection terminal to continuously receive raw logistics trajectory data streams uploaded from multiple waybills and nodes. The data streams include core information such as waybill numbers, timestamps, trajectory locations, and operation descriptions. A waybill number indexing mechanism is designed to classify and aggregate the received raw logistics trajectory data streams by waybill number. For trajectory data with the same waybill number, initial unordered aggregation is performed by timestamp, forming raw trajectory sequences based on individual waybills. Each sequence corresponds to a unique waybill number and includes all raw trajectory data from shipment to the present. Simultaneously, a unique data identifier is established for each raw trajectory sequence, recording metadata such as data reception time and data volume, facilitating traceability and processing in subsequent stages and ensuring the integrity and independence of individual waybill trajectory data.

[0024] S102. Identify and mark adjacent trajectory pairs in the original trajectory sequence whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs, and replace the corresponding adjacent trajectory pairs in the original trajectory sequence after correcting the abnormal trajectory pairs to generate a corrected trajectory sequence.

[0025] In this embodiment, the preset timestamp interval threshold can be configured according to the logistics business scenario, such as 500 milliseconds. Adjacent trajectory pairs with calculated interval values ​​less than this threshold are marked as abnormal trajectory pairs. The marking information includes the abnormality type and trajectory data location. For the marked abnormal trajectory pairs, according to the logistics trajectory generation logic, a correction method of logical merging or timestamp fine-tuning is adopted. Abnormalities caused by duplicate collection and erroneous upload are merged, and abnormalities caused by timestamp collection deviation are precisely fine-tuned to obtain corrected trajectory pairs. Finally, the corresponding abnormal trajectory pairs in the original trajectory sequence are replaced with corrected trajectory pairs, and the sequences are re-integrated to form a corrected trajectory sequence for each waybill. After the replacement, the sequence is traversed a second time to confirm that there are no uncorrected abnormal trajectory pairs.

[0026] S103. Perform logical verification on the corrected trajectory sequence based on the preset business rule set. If the verification is successful, generate target trajectory data that meets the timing logic requirements of the target platform.

[0027] In this embodiment, a preset business rule set is constructed in advance based on the logistics trajectory business specifications and temporal logic requirements of the target platform. This preset business rule set includes verification rules such as the sequential logic of trajectory operations, the rationality of trajectory points, and the standardization of field formats. The corrected trajectory sequence is input as a whole into the rule verification engine. The engine performs a full-process logical deduction and consistency check on the trajectory sequence according to the preset business rule set, verifying whether the trajectory conforms to the sequential logic of logistics operations such as delivery, pickup, transportation, delivery, and signing, as well as the matching of trajectory points and operation descriptions. If the verification fails, the process returns to the previous step for re-verification and correction; if the verification passes, the field format conversion module is activated to standardize and convert the fields of the corrected trajectory sequence according to the target platform's field naming, data type, and format requirements, generating target trajectory data that conforms to the target platform's temporal logic requirements.

[0028] S104. Construct and train a time-series correction model based on a multi-scale Transformer model, input the target trajectory data into the time-series correction model, and obtain the order-preserving trajectory sequence and the corresponding time-series confidence.

[0029] In this embodiment, a time-series correction model is constructed and trained based on a multi-scale Transformer model. This model integrates temporal and semantic feature encoding capabilities, enabling it to accurately capture the temporal relationships and business logic of logistics trajectories. The time-series correction model corrects and optimizes the temporal sequence of the target trajectory data, generating a time-correct, order-preserving trajectory sequence. Simultaneously, based on the completeness, temporal consistency, and semantic rationality of the trajectory data, it calculates and outputs the corresponding time-series confidence score. The confidence score ranges from 0 to 1; a higher score indicates stronger temporal reliability of the trajectory sequence, providing a quantitative basis for subsequent push decisions.

[0030] S105. Obtain the real-time status indicators and historical push success rate of the target platform. Based on the temporal confidence of the ordered trajectory sequence, the real-time status indicators of the target platform, and the historical push success rate, use a pre-trained reinforcement learning strategy network to dynamically decide the push priority, batch size, and network retry parameters of the ordered trajectory sequence, and generate push instructions.

[0031] In this embodiment, a platform status acquisition module is built to acquire real-time status indicators of the target platform, including interface response latency, system CPU / memory load, and network bandwidth usage. Simultaneously, it retrieves historical logistics trajectory push success rate data from the platform, normalizes the real-time status indicators according to a preset algorithm, and integrates them with the historical push success rate to form an environment state vector. The environment state vector and the time-series confidence corresponding to the ordered trajectory sequence are used as joint state inputs to a pre-trained reinforcement learning policy network. The reinforcement learning policy network learns from historical push data and dynamically determines push parameters based on the current state. Finally, the output includes decision results such as push priority, batch size, and number of network retries. Based on these results, push priorities are assigned to the ordered trajectory sequences of each waybill, the number of waybills pushed in each batch is set, retry parameters for network requests are configured, and all decision parameters are integrated to generate standardized push instructions. These instructions include core information such as the execution object, execution parameters, and execution time.

[0032] This embodiment provides a real-time logistics trajectory push method. It aggregates the original trajectory data stream by waybill number to achieve unified management of single-way single-trajectory data. Simultaneously, by identifying and correcting abnormal timestamp trajectory pairs, it eliminates invalid and abnormal data at the source, improving the basic quality of the trajectory data. Furthermore, it relies on a preset business rule set for logical verification to ensure that the trajectory data meets the business and timing requirements of the target platform, reducing the risk of data adaptation after push. In addition, it innovatively employs a multi-scale Transformer model to construct a timing correction model, generating ordered trajectory sequences and outputting timing confidence scores, accurately ensuring the correctness of the trajectory timing and quantifying trajectory reliability. Moreover, by combining the target platform's real-time status, historical push success rate, and timing confidence scores, it uses a reinforcement learning strategy network to dynamically decide push parameters, achieving intelligent dynamic adaptation of the push strategy. This improves push efficiency and success rate, and can rationally allocate resources according to the platform status, avoiding platform congestion caused by blind pushes.

[0033] Please see Figure 2 The second embodiment of the real-time logistics trajectory push method in this invention includes: S201. Receive raw trajectory data in streaming mode. The raw trajectory data includes waybill number, millisecond-level timestamp, and operation description.

[0034] In this embodiment, a raw trajectory data receiving module based on a streaming computing framework is built. It is configured with a dedicated communication interface with the logistics trajectory collection terminal (such as logistics node barcode scanning devices or transport vehicle positioning devices), supporting mainstream transmission protocols such as TCP / IP and MQTT to achieve real-time data exchange with the collection terminal. The module continuously receives raw trajectory data uploaded by the collection terminal using a streaming processing method, ensuring real-time data reception and adapting to the business characteristics of logistics trajectories being generated in real-time with logistics node operations. The raw trajectory data is transmitted uniformly according to a preset format, including at least three core fields: waybill number, millisecond-level timestamp, and operation description. It may also include extended fields such as trajectory location, operator, and equipment number. The raw trajectory data receiving module performs initial caching of the received data; the caching time is configurable to avoid data loss due to network fluctuations.

[0035] S202. Perform format compliance and integrity verification on the original trajectory data. If the verification passes, generate verification data.

[0036] In this embodiment, a data validation rule base is pre-built, including format compliance rules and integrity rules. The format compliance rules specify the data type, length, and format requirements of each field (e.g., millisecond-level timestamps are 13 digits, and waybill numbers are a fixed 20 characters). The integrity rules specify that core fields (waybill number, timestamp, and operation description) are non-empty fields. The original trajectory data is input into the validation engine line by line. The engine validates each data line according to the rule base, checking whether each field meets the format requirements and whether any core fields are missing. Data that fails validation is marked as an anomaly and discarded, while an anomaly log is recorded. For data that passes validation, validation data with a validation pass flag is generated. The validation data retains all valid information from the original trajectory data and adds metadata such as validation time and validation node.

[0037] S203. Group the verification data by waybill number to obtain multiple sets, and then concatenate the sets to obtain the original trajectory sequence corresponding to each waybill number.

[0038] In this embodiment, a unique hash value is assigned to each unique waybill number, establishing a mapping relationship between waybill numbers and data storage addresses. The generated verification data is grouped by waybill number, and the storage address corresponding to each waybill number is quickly located using a hash index. All verification data for the same waybill number are aggregated to the same storage address. For the aggregated verification data of the same waybill number, no timestamp sorting is performed; instead, the data is concatenated according to the data receiving order to form an original trajectory sequence corresponding to each waybill. Each original trajectory sequence includes all original trajectory data that has passed verification for that waybill. A data directory is established for each original trajectory sequence, recording information such as the amount of trajectory data included in the sequence, the earliest / latest receiving time, and the waybill number. It also supports quick retrieval of the corresponding original trajectory sequence by waybill number.

[0039] In this embodiment, raw trajectory data is received in a streaming manner, which is suitable for the business characteristics of real-time generation and continuous uploading of logistics trajectories. This ensures the real-time and continuous nature of data reception, prevents data backlog, and eliminates invalid data with format errors or missing key fields in advance through format compliance and integrity checks. This improves data quality from the source and avoids invalid data entering subsequent processing stages, thus preventing resource waste. In addition, the data that passes the verification is accurately grouped using the waybill number as the sole aggregation dimension, achieving effective separation of multiple waybill trajectory data and forming an independent raw trajectory sequence for each waybill. This ensures that the trajectory data of each sequence belongs to the same waybill and there is no cross-waybill data mixing.

[0040] Please see Figure 3 A third embodiment of a real-time logistics trajectory push method according to the present invention includes: S301. Traverse the original trajectory sequence of each waybill, calculate the timestamp interval between adjacent trajectories, and mark adjacent trajectory pairs with timestamp intervals less than the preset timestamp interval threshold as abnormal trajectory pairs.

[0041] In this embodiment, a trajectory sequence traversal algorithm is developed to iterate through all adjacent trajectory data pairs in the original trajectory sequence of each waybill, forming a set of adjacent trajectory pairs for the preceding and following trajectories. For each adjacent trajectory pair, millisecond-level timestamps are extracted from the preceding and following trajectory data. The time interval between the two timestamps is accurately calculated using a timestamp difference calculation method, preserving the millisecond-level precision of the calculation result. Based on the collection frequency and business characteristics of the logistics trajectory, a preset timestamp interval threshold (configurable to 300-1000 milliseconds) is established. The calculated time interval is compared with the preset timestamp interval threshold. If the interval is less than the preset timestamp interval threshold, the adjacent trajectory pair is marked as an abnormal trajectory pair. Simultaneously, the position of the abnormal trajectory pair in the original trajectory sequence, the specific values ​​of the two timestamps, and the interval are recorded to form an abnormal trajectory pair marking table for subsequent correction processing.

[0042] S302. For abnormal trajectory pairs, perform logical merging or timestamp fine-tuning according to predefined correction rules to obtain corrected trajectory pairs.

[0043] In this embodiment, common causes of timestamp anomalies during logistics trajectory collection are identified, and a predefined rule library for correcting abnormal trajectory pairs is constructed. This rule library specifies correction methods for different anomaly scenarios, primarily including logical merging and timestamp fine-tuning. For abnormal trajectory pairs caused by repeated device collection or multiple uploads of the same operation, logical merging is used, retaining one valid trajectory data and removing duplicate data. The timestamp of the merged trajectory data is taken as the median of the original two timestamps or the initial collection value. For anomalies caused by device time calibration deviations or collection delays resulting in excessively small timestamp intervals, timestamp fine-tuning is used. Based on the minimum time interval of logistics operations, the timestamp of the subsequent trajectory is fine-tuned to above a preset timestamp interval threshold, ensuring that the fine-tuned timestamp interval conforms to business logic. Based on the information in the abnormal trajectory pair marking table, the correction rule library is matched, and corresponding correction operations are performed on each abnormal trajectory pair to obtain corrected trajectory pairs. The correction method and the numerical changes before and after correction are recorded.

[0044] S303. Replace the corresponding adjacent trajectory pairs in the original trajectory sequence with the corrected trajectory pairs, and generate the corrected trajectory sequence.

[0045] In this embodiment, a corrected trajectory sequence is generated through replacement: based on the location information of abnormal trajectory pairs recorded in the abnormal trajectory pair marking table, the corresponding abnormal trajectory pairs in the original trajectory sequence are located. The located abnormal trajectory pairs are directly replaced with corrected trajectory pairs. During the replacement process, other trajectory data in the original trajectory sequence remains unchanged to ensure the overall structure and data integrity of the trajectory sequence. After the replacement is completed, a second traversal check is performed on the replaced trajectory sequence to recalculate the timestamp interval of all adjacent trajectory pairs, confirming that no abnormal trajectory pairs are missed. If any uncorrected abnormal trajectory pairs are found, they are immediately supplemented and corrected. The trajectory sequence that has finally been replaced and has no abnormalities is marked as a corrected trajectory sequence. Meta-information such as correction completion identifier, correction time, and number of abnormalities handled is added to each corrected trajectory sequence, and it is stored in association with the original trajectory sequence for easy subsequent traceability and verification.

[0046] In this embodiment, by traversing the original trajectory sequence and calculating the interval between adjacent timestamps, abnormal trajectory pairs with timestamp intervals less than a preset timestamp interval threshold can be accurately identified. The preset timestamp interval threshold can be flexibly configured according to the logistics business scenario to adapt to different trajectory collection frequency requirements. At the same time, predefined correction rules for abnormal trajectory pairs are adopted, such as logical merging or timestamp fine-tuning. The correction method conforms to the actual generation logic of logistics trajectories, avoiding trajectory distortion caused by over-correction and ensuring that the corrected trajectory data conforms to the actual logistics business. In addition, by directly replacing the abnormal trajectory pairs in the original trajectory sequence and generating the corrected trajectory sequence, the integrity and continuity of the trajectory sequence are guaranteed, and there is no data loss or redundancy after replacement.

[0047] Please see Figure 4 A fourth embodiment of a real-time logistics trajectory push method according to the present invention includes: S401. Load the preset business rule set according to the business specifications of the target platform.

[0048] In this embodiment, a pre-defined business rule set is constructed based on the target platform's business specifications, temporal logic requirements, and data usage scenarios for logistics trajectory data, combined with the common trajectory operation logic in the logistics industry. The pre-defined business rule set includes three core rule categories: first, business sequence logic rules, which clearly stipulate that logistics trajectories must follow the basic operational sequence of delivery, pickup, trunk transportation, branch delivery, and customer signature, prohibiting logical reversal; second, trajectory consistency rules, which clearly stipulate that trajectory points and operation descriptions must match, and trajectory operations within the same waybill cannot contradict each other; and third, basic field rules, which clearly define the field value ranges and data validity requirements for trajectory data. The business rule set is written into a standardized rule language that can be recognized by the verification engine and stored in a rule base. When logical verification is required, the verification engine directly loads the pre-defined business rule set from the rule base, supporting flexible modification and updates of the rule set to adapt to changes in the target platform's business specifications.

[0049] S402. Treat the corrected trajectory sequence as a whole and substitute it into the preset business rule set to perform full-process logical deduction and consistency check.

[0050] In this embodiment, the corrected trajectory sequence of a single waybill is treated as a whole business process and input into the rule verification engine. The engine initiates a full-process logic deduction mechanism, verifying the logical relationships of each trajectory data and the overall sequence according to the chronological development of the logistics business. First, the overall business sequence logic of the trajectory sequence is verified to check for any reversal of the operation order. Then, each trajectory data is individually verified for consistency, checking whether the trajectory points match the operation description and the equipment number matches the operation scenario. Finally, the field values ​​of the trajectory data are checked to ensure they are within the preset range and whether there are any invalid values. During the verification process, any logical problems found are precisely marked, including the problem type, the location of the problematic trajectory in the sequence, and the specific rule violated. If no logical problems are found, the logic verification is considered successful. If a problem is found, the process returns to the corrected trajectory sequence generation stage for re-verification and correction.

[0051] S403. If the full-process logic deduction and consistency check pass, the field format is converted according to the business specifications of the target platform to generate target trajectory data that meets the timing logic requirements of the target platform.

[0052] In this embodiment, for the corrected trajectory sequence that has passed logical verification, the field formats are converted according to the business specifications of the target platform, including field names, data types, field lengths, and format specifications (such as the display format of timestamps and the coordinate format of trajectory points). During the conversion, according to the field mapping relationship, the original field names and data formats in the corrected trajectory sequence are converted into the standard forms required by the target platform. For example, the original operation time field is converted into the trajectory time field of the target platform, the millisecond-level timestamp is converted into the YYYY-MM-DDHH:MM:SS format required by the target platform, and the original string format of latitude and longitude coordinates is converted into the numeric format required by the target platform. During the conversion process, all valid business information of the trajectory data is retained, and no information is deleted or tampered with. After the conversion is completed, the generated data is format verified to confirm that it fully complies with the field requirements of the target platform. Finally, target trajectory data that meets the timing logic requirements of the target platform is generated, providing input for the subsequent timing correction stage.

[0053] In this embodiment, a preset business rule set is loaded according to the target platform's business specifications. The preset business rule set is highly compatible with the target platform's requirements, avoiding the problem of verification standards being out of sync with platform requirements. Moreover, the correction trajectory sequence is treated as a whole for full-process logical deduction and consistency checks, rather than verifying individual trajectories. This effectively ensures the overall business logic and temporal consistency of the trajectory sequence, ensuring that the trajectory data conforms to the operational sequence of logistics business. Finally, after verification, the field format is converted according to the target platform's specifications, achieving standardized adaptation of the trajectory data. No secondary processing by the target platform is required, improving the usability of the data after push.

[0054] Please see Figure 5 A fifth embodiment of a real-time logistics trajectory push method according to the present invention includes: S501. Construct and train a time-series correction model based on a multi-scale Transformer model; In this embodiment, a time-series correction model is constructed and trained based on a multi-scale Transformer model, including: constructing a main network framework using a Transformer encoder; configuring a parallel multi-scale attention mechanism within the main network framework to form a base model, wherein the multi-scale attention mechanism includes at least a local window attention head and an extended context attention head, wherein the local window attention head is used to model millisecond-level adjacent temporal relationships, and the extended context attention head is used to capture global order stage dependencies; and training and optimizing the base model using a pre-built training dataset to obtain the time-series correction model.

[0055] In this embodiment, the classic Transformer encoder is used as the main network framework. Within this framework, a parallel multi-scale attention mechanism is configured, including at least two independent attention heads: a local window attention head and an extended context attention head. The local window attention head sets a fixed small window size and performs attention calculations only on a few adjacent trajectory data points in the trajectory sequence, accurately modeling millisecond-level adjacent temporal relationships and capturing trajectory change patterns over a short period. The extended context attention head removes the window limitation and performs global attention calculations on the entire trajectory sequence of the waybill, capturing the dependencies of the entire business stage from shipment to receipt, aligning with the overall logic of logistics operations. The outputs of the two attention heads are concatenated and fused, mapped to a fixed-dimensional feature vector through a linear layer, achieving dual extraction of local and global trajectory features.

[0056] In this embodiment, a pre-constructed logistics trajectory training dataset is built. This dataset includes a large amount of logistics trajectory data labeled with both correct and incorrect time series, covering different logistics business scenarios and waybill types to ensure the diversity and representativeness of the dataset. The training dataset is divided into training, validation, and test sets in an 8:1:1 ratio. The training set data is input into the integrated base model. The model is iteratively trained using stochastic gradient descent, with the accuracy of time series correction as the loss function. During training, the model performance is monitored in real-time using the validation set, and hyperparameters such as learning rate and batch size are adjusted. After training, the model's performance is evaluated using the test set. If the evaluation metrics meet the preset requirements, the final time series correction model is obtained; otherwise, the network structure and hyperparameters are readjusted, and training and optimization continue.

[0057] S502. Encode the timestamps and trajectory description text in the target trajectory data into time feature vectors and semantic feature vectors, respectively.

[0058] In this embodiment, a time feature encoding submodule is constructed. For high-precision millisecond-level timestamps of logistics trajectories, it integrates positional encoding and periodic encoding techniques. First, the timestamp is converted into a relative timestamp (based on the timestamp of the first trajectory in the sequence). Then, periodic encoding maps the relative timestamp to sine and cosine functions to capture the periodic features of time, such as day, hour, minute, and second. Simultaneously, positional encoding captures the absolute and relative position information of the timestamp within the sequence. Finally, the timestamp is converted into a fixed-dimensional time feature vector including multi-dimensional time information. A semantic feature encoding submodule is also constructed. Targeting the logistics business characteristics of the trajectory description text, it is fine-tuned based on a lightweight pre-trained text model. First, the text is segmented and stop word removed. The segmentation results are converted into word vectors. Then, local features of the text are extracted through convolutional and pooling layers. Contextual logical features of the text are extracted through a bidirectional LSTM. Finally, a fixed-dimensional semantic feature vector including operational logic and business scenarios is generated. Both encoding submodules are designed with a pluggable structure, supporting subsequent independent optimization and updates.

[0059] In this embodiment, millisecond-level timestamps are input to the time feature encoding submodule. The module first normalizes the timestamps to eliminate the influence of numerical range differences. Then, it captures the periodic features of day, hour, minute, and second through periodic encoding, and captures the relative temporal relationship between the timestamp and other timestamps in the sequence through relative position encoding. Finally, a fixed-dimensional time feature vector is generated, which includes all time information such as the absolute value, periodicity, and relative position of the timestamp. Trajectory description text (such as in branch pickup or trunk line transportation) is input to the semantic feature encoding submodule. The semantic feature encoding submodule performs word segmentation and vectorization on the text. It extracts business logic and operational features from the text through a pre-trained text encoding layer, generating a fixed-dimensional semantic feature vector. The vector includes all semantic information such as the type of trajectory operation, business scenario, and logical relationships.

[0060] S503. The temporal feature vector and the semantic feature vector are fused into a fused feature vector, and the fused feature vector is input into the time series correction model to obtain the order-preserving trajectory sequence and the corresponding time series confidence.

[0061] In this embodiment, the temporal feature vector and semantic feature vector are fused into a fused feature vector. This fused feature vector is then input into the multi-scale Transformer framework in its original order. The framework uses a multi-scale attention mechanism to model the temporal and semantic relationships between trajectories, reordering and correcting trajectories with disordered temporal sequences to generate a sequence of pre-ordered trajectories that fully conforms to the logistics business logic. Simultaneously, the temporal correction model, based on the temporal consistency, semantic rationality, and feature fusion degree of the trajectory data, outputs a temporal confidence score corresponding one-to-one with the pre-ordered trajectory sequence using a preset confidence calculation algorithm. The closer the confidence score is to 1, the higher the temporal reliability of the trajectory sequence.

[0062] In this embodiment, a temporal correction model is constructed and trained based on a multi-scale Transformer model. Leveraging the attention mechanism of the Transformer, it accurately captures the temporal relationships of trajectory data. Simultaneously, timestamps and trajectory description text are encoded into feature vectors, achieving refined extraction of temporal and semantic features and avoiding correction errors caused by feature confounding. Furthermore, feature fusion integrates the two types of vectors into a fused feature vector, enabling the model to consider both the numerical relationship of timestamps and the logical relationship of business semantics during temporal correction, significantly improving the accuracy of temporal correction. In addition, after correction, not only is an order-preserving trajectory sequence generated, but the corresponding temporal confidence score is also output, quantifying the temporal reliability of the trajectory sequence and providing a key quantitative indicator for subsequent intelligent push decision-making.

[0063] Please see Figure 6 The sixth embodiment of a real-time logistics trajectory push method according to the present invention includes: S601. Obtain the real-time status indicators and historical push success rate of the target platform. The real-time status indicators include the response latency of the interface and the system load. Combine the response latency of the interface, the system load and the historical push success rate to form an environment status vector.

[0064] In this embodiment, a multi-dimensional platform status acquisition module is built. Through the target platform's open interfaces and monitoring tools, core real-time status indicators of the platform are collected in real time, mainly including interface response latency, system CPU load rate, system memory load rate, and network bandwidth utilization. The acquisition frequency is consistent with the trajectory processing frequency to ensure the real-time nature of the status data. Simultaneously, historical logistics trajectory push data from the target platform over a recent period (e.g., 24 hours) is retrieved. Historical push success rates are calculated based on dimensions such as waybill type and push time, eliminating push failures caused by issues with the trajectory data itself, ensuring that the success rate accurately reflects the platform's push processing capabilities. The collected real-time status indicators are normalized, converting indicators with different dimensions and value ranges into standardized values ​​of 0-1. The normalized real-time status indicators are then concatenated with the historical push success rate in a preset order to construct an environmental status vector that comprehensively reflects the target platform's operational status. The vector dimension is fixed, facilitating processing by the reinforcement learning strategy network.

[0065] S602. The environment state vector and the temporal confidence corresponding to the order-preserving trajectory sequence are used as state inputs to the pre-trained reinforcement learning policy network to obtain the action vector output by the pre-trained reinforcement learning policy network. The action vector includes priority weights, batch size and number of retries.

[0066] In this embodiment, the constructed environmental state vector and the temporal confidence corresponding to the ordered trajectory sequence are concatenated to form a joint state vector, which serves as the input to the pre-trained reinforcement learning policy network. This reinforcement learning policy network is built based on the Deep Deterministic Policy Gradient (DDPG) algorithm and pre-trained using a large amount of historical logistics trajectory push data. The network has learned the optimal push strategy under different platform states. After receiving the joint state vector, the network extracts state features through convolutional and fully connected layers, dynamically decides push parameters based on feature values, and finally outputs a fixed-dimensional action vector. The action vector includes three core decision parameters: first, priority weight, a value between 0 and 1, where a higher value indicates a higher push priority for the ordered trajectory sequence; second, batch size, a positive integer representing the number of waybills pushed to the target platform in each batch; and third, retry count, an integer between 0 and 5, representing the number of network request retries after a trajectory push failure. The output of the action vector corresponds one-to-one with the joint state vector, ensuring that each ordered trajectory sequence has suitable push parameters.

[0067] S603. Generate push instructions based on the sequence of preserving trajectory, the corresponding priority weight, batch size, and number of retries.

[0068] In this embodiment, the action vectors output by the reinforcement learning policy network are analyzed to extract three core parameters for each order-preserving trajectory sequence: push priority weight, batch push size, and network retries. First, all order-preserving trajectory sequences to be pushed are sorted according to their priority weights, and push priorities are assigned from high to low weight. Trajectory sequences with high confidence and good platform status receive high priority and are pushed first. Next, the sorted order-preserving trajectory sequences are processed in batches according to the batch size parameter. The number of waybills in each batch strictly matches the batch size determined by the decision to avoid platform congestion due to excessively large batches. Finally, a corresponding number of network retries is configured for each batch of trajectories. High-priority trajectories can be configured with a higher number of retries, while low-priority trajectories can be configured with a lower number of retries. Based on the above decision results, combined with information such as the waybill number and trajectory data storage address of the order-preserving trajectory sequences to be pushed, a standardized push instruction is generated. The push instruction is written in a format supported by the target platform and includes core information such as execution identifier, waybill list, push priority, batch size, number of retries, and execution time. The instruction can be directly recognized and executed by the push execution module.

[0069] In this embodiment, real-time status indicators such as interface response latency and system load of the target platform are acquired in real time. Combined with historical push success rate, this comprehensively reflects the current operating status of the platform and its historical push performance, providing a comprehensive environmental basis for decision-making. Moreover, by using the environmental state vector and the temporal confidence of the ordered trajectory sequence as joint state input, the push decision considers both the platform's carrying capacity and the importance and reliability of the trajectory data, achieving dual adaptation of platform status and data quality. In addition, by dynamically deciding the push priority, batch size, and network retry parameters through a reinforcement learning strategy network, the push strategy can be adjusted in real time according to changes in platform status. When the platform load is high, the push batch is reduced and the priority of high-confidence trajectories is increased; when the platform status is good, the push batch is increased and the push efficiency is improved. At the same time, the retry parameters are reasonably configured to reduce the pressure on the platform from invalid retries.

[0070] The above describes the real-time logistics trajectory push method in the embodiments of the present invention. The following describes the apparatus in the embodiments of the present invention. Please refer to [link / reference]. Figure 7 The implementation methods of the real-time logistics trajectory push device in this embodiment of the invention include: The aggregation module 701 is used to receive the original logistics trajectory data stream and aggregate the original logistics trajectory data stream according to the waybill number to form an original trajectory sequence based on a single waybill. The correction module 702 is used to identify and mark adjacent trajectory pairs in the original trajectory sequence whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs. After correcting the abnormal trajectory pairs, the corresponding adjacent trajectory pairs in the original trajectory sequence are replaced to generate a corrected trajectory sequence. The verification module 703 is used to perform logical verification on the modified trajectory sequence based on a preset business rule set. If the verification is successful, target trajectory data that meets the timing logic requirements of the target platform is generated. The correction module 704 is used to construct and train a time-series correction model based on a multi-scale Transformer model, input the target trajectory data into the time-series correction model, and obtain the order-preserving trajectory sequence and the corresponding time-series confidence. The push module 705 is used to obtain the real-time status indicators and historical push success rate of the target platform. Based on the temporal confidence of the ordered trajectory sequence, the real-time status indicators of the target platform, and the historical push success rate, it uses a pre-trained reinforcement learning policy network to dynamically decide the push priority, batch size, and network retry parameters of the ordered trajectory sequence, and generates push instructions.

[0071] In this embodiment, the aggregation module 701 includes: a receiving unit 7011, used to receive raw trajectory data in a streaming manner, the raw trajectory data including waybill number, millisecond-level timestamp and operation description; a verification unit 7012, used to verify the format compliance and integrity of the raw trajectory data, and generate verification data if the verification passes; and an aggregation unit 7013, used to group the verification data by waybill number to obtain multiple sets, and to concatenate the sets to obtain the raw trajectory sequence corresponding to each waybill number.

[0072] In this embodiment, the correction module 702 includes: a calculation unit 7021, used to traverse the original trajectory sequence of each waybill, calculate the timestamp interval between adjacent trajectories, and mark adjacent trajectory pairs with timestamp intervals less than a preset timestamp interval threshold as abnormal trajectory pairs; a correction unit 7022, used to logically merge or fine-tune the timestamps of the abnormal trajectory pairs according to predefined correction rules to obtain corrected trajectory pairs; and a replacement unit 7023, used to replace the corresponding adjacent trajectory pairs in the original trajectory sequence with corrected trajectory pairs and generate a corrected trajectory sequence.

[0073] In this embodiment, the verification module 703 includes: a first acquisition unit 7031, used to load a preset business rule set according to the business specifications of the target platform; a verification unit 7032, used to take the corrected trajectory sequence as a whole and substitute it into the preset business rule set to perform full-process logical deduction and consistency check; and a conversion unit 7033, used to convert the field format according to the business specifications of the target platform when the logical verification passes, and generate target trajectory data that meets the timing logic requirements of the target platform.

[0074] In this embodiment, the correction module 704 includes: a construction unit 7042, used to construct and train a time-series correction model based on a multi-scale Transformer model; an encoding unit 7042, used to encode the timestamps and trajectory description text in the target trajectory data into time feature vectors and semantic feature vectors, respectively; and a correction unit 7043, used to fuse the time feature vectors and the semantic feature vectors into a fused feature vector, and input the fused feature vector into the time-series correction model to obtain an order-preserving trajectory sequence and the corresponding time-series confidence.

[0075] In this embodiment, the push module 705 includes: a second acquisition unit 7051, used to acquire the real-time status indicators and historical push success rate of the target platform, wherein the real-time status indicators include the response latency of the interface and the system load, and the interface response latency, system load and historical push success rate are combined to form an environment state vector; a decision unit 7052, used to take the environment state vector and the time-series confidence corresponding to the order-preserving trajectory sequence as state input to a pre-trained reinforcement learning policy network to obtain an action vector output by the pre-trained reinforcement learning policy network, wherein the action vector includes priority weights, batch size and number of retries; and a push unit 7053, used to generate a push instruction according to the order-preserving trajectory sequence and the corresponding priority weights, batch size and number of retries.

[0076] In this embodiment, the original trajectory data stream is aggregated by waybill number to achieve unified management of single-way single-trajectory data. Simultaneously, by identifying and correcting abnormal timestamp trajectory pairs, invalid and abnormal data is eliminated at the source, improving the basic quality of the trajectory data. Furthermore, logical verification is performed based on a preset business rule set to ensure that the trajectory data meets the business and timing requirements of the target platform, reducing the risk of data adaptation after push notifications. In addition, a multi-scale Transformer model is innovatively used to construct a timing correction model, generating ordered trajectory sequences and outputting timing confidence scores, accurately ensuring the correctness of the trajectory timing and quantifying trajectory reliability. Moreover, by combining the target platform's real-time status, historical push success rate, and timing confidence scores, a reinforcement learning strategy network is used to dynamically decide push parameters, achieving intelligent dynamic adaptation of the push strategy. This improves push efficiency and success rate, and also allows for reasonable resource allocation based on platform status, avoiding platform congestion caused by blind push notifications.

[0077] Figure 7 The structure of the real-time logistics trajectory push device shown does not constitute a limitation on the real-time logistics trajectory push device, and can implement the steps of the real-time logistics trajectory push method provided in the above-described method embodiments.

[0078] above Figure 7The real-time logistics trajectory push device in this embodiment of the invention is described in detail from the perspective of modular functional entities. The real-time logistics trajectory push device in this embodiment of the invention is described in detail from the perspective of hardware processing.

[0079] Figure 8 This is a schematic diagram of the structure of a real-time logistics trajectory push device provided in an embodiment of the present invention. The device 800 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 833 or data 832. The memory 820 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown), each module may include a series of instruction operations on the device 800. Furthermore, the processor 810 may be configured to communicate with the storage media 830 and execute the series of instruction operations in the storage media on the device 800.

[0080] Device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input / output interfaces 860, and / or one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.

[0081] This invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a real-time logistics trajectory push method.

[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0083] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0084] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for real-time push of logistics trajectory, characterized in that, The real-time logistics tracking push method includes: Receive the raw logistics trajectory data stream and aggregate the raw logistics trajectory data stream by waybill number to form a raw trajectory sequence based on a single waybill; Identify and mark adjacent trajectory pairs in the original trajectory sequence whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs. After correcting the abnormal trajectory pairs, replace the corresponding adjacent trajectory pairs in the original trajectory sequence to generate a corrected trajectory sequence. The corrected trajectory sequence is logically verified based on a preset business rule set. If the verification passes, target trajectory data that meets the timing logic requirements of the target platform is generated. A time-series correction model is constructed and trained based on a multi-scale Transformer model. The target trajectory data is input into the time-series correction model to obtain the order-preserving trajectory sequence and the corresponding time-series confidence. The system acquires the real-time status indicators and historical push success rates of the target platform. Based on the temporal confidence of the ordered trajectory sequence, the real-time status indicators of the target platform, and the historical push success rates, it uses a pre-trained reinforcement learning policy network to dynamically determine the push priority, batch size, and network retry parameters of the ordered trajectory sequence, and generates push instructions.

2. The real-time logistics trajectory push method according to claim 1, characterized in that, The process of receiving the original logistics trajectory data stream and aggregating it by waybill number to form an original trajectory sequence based on a single waybill includes: The raw trajectory data is received in a streaming manner. The raw trajectory data includes the waybill number, millisecond-level timestamp, and operation description. The original trajectory data is validated for format compliance and integrity. If the validation passes, validation data is generated. The verification data is grouped by waybill number to obtain multiple sets, and the sets are then concatenated to obtain the original trajectory sequence corresponding to each waybill number.

3. The real-time logistics trajectory push method according to claim 1, characterized in that, The process of identifying and marking adjacent trajectory pairs in the original trajectory sequence whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs, correcting the abnormal trajectory pairs, and replacing the corresponding adjacent trajectory pairs in the original trajectory sequence to generate a corrected trajectory sequence includes: Traverse the original trajectory sequence of each waybill, calculate the timestamp interval between adjacent trajectories, and mark adjacent trajectory pairs with timestamp intervals less than a preset timestamp interval threshold as abnormal trajectory pairs; For the abnormal trajectory pairs, logical merging or timestamp fine-tuning is performed according to predefined correction rules to obtain corrected trajectory pairs; The corresponding adjacent trajectory pairs in the original trajectory sequence are replaced with corrected trajectory pairs, and a corrected trajectory sequence is generated.

4. The real-time logistics trajectory push method according to claim 1, characterized in that, The step involves performing logical verification on the corrected trajectory sequence based on a preset business rule set. If the verification passes, target trajectory data that meets the timing logic requirements of the target platform is generated, including: Load the preset business rule set according to the target platform's business specifications; The corrected trajectory sequence is taken as a whole and substituted into the preset business rule set for full-process logical deduction and consistency check. If the entire process logic deduction and consistency check pass, the field format will be converted according to the business specifications of the target platform to generate target trajectory data that meets the timing logic requirements of the target platform.

5. The real-time logistics trajectory push method according to claim 1, characterized in that, The time-series correction model, constructed and trained based on a multi-scale Transformer model, inputs the target trajectory data into the time-series correction model to obtain the order-preserving trajectory sequence and the corresponding time-series confidence, including: A time-series correction model was constructed and trained based on a multi-scale Transformer model. The timestamps and trajectory description text in the target trajectory data are encoded into time feature vectors and semantic feature vectors, respectively. The temporal feature vector and the semantic feature vector are fused into a fused feature vector, and the fused feature vector is input into the temporal correction model to obtain the order-preserving trajectory sequence and the corresponding temporal confidence.

6. The real-time logistics trajectory push method according to claim 5, characterized in that, The time-series correction model built and trained based on the multi-scale Transformer model includes: The main network framework is built using a Transformer encoder; A parallel multi-scale attention mechanism is configured within the main network framework to form a basic model. The multi-scale attention mechanism includes at least a local window attention head and an extended context attention head. The local window attention head is used to model millisecond-level adjacent temporal relationships, and the extended context attention head is used to capture global waybill stage dependencies. The base model is trained and optimized using a pre-built training dataset to obtain a time-corrected model.

7. The real-time logistics trajectory push method according to claim 1, characterized in that, The process involves acquiring the real-time status indicators and historical push success rates of the target platform, and based on the temporal confidence of the ordered trajectory sequence, the real-time status indicators of the target platform, and the historical push success rates, dynamically deciding the push priority, batch size, and network retry parameters of the ordered trajectory sequence using a pre-trained reinforcement learning policy network, and generating push instructions, including: The real-time status indicators and historical push success rate of the target platform are obtained. The real-time status indicators include the response latency of the interface and the system load. The interface response latency, system load and historical push success rate are combined to form an environment status vector. The environmental state vector and the temporal confidence corresponding to the order-preserving trajectory sequence are used as state inputs to a pre-trained reinforcement learning policy network to obtain an action vector output by the pre-trained reinforcement learning policy network. The action vector includes priority weights, batch size, and number of retries. The push instruction is generated based on the ordered trajectory sequence and the corresponding priority weight, batch size, and number of retries.

8. A real-time logistics trajectory push device, characterized in that, include: The aggregation module is used to receive the raw logistics trajectory data stream and aggregate the raw logistics trajectory data stream according to the waybill number to form a raw trajectory sequence with each waybill as the unit; The correction module is used to identify and mark adjacent trajectory pairs in the original trajectory sequence whose timestamp interval is less than a preset timestamp interval threshold as abnormal trajectory pairs. After correcting the abnormal trajectory pairs, the corresponding adjacent trajectory pairs in the original trajectory sequence are replaced to generate a corrected trajectory sequence. The verification module is used to perform logical verification on the corrected trajectory sequence based on a preset business rule set. If the verification is successful, target trajectory data that meets the timing logic requirements of the target platform is generated. The correction module is used to build and train a time-series correction model based on a multi-scale Transformer model. The target trajectory data is input into the time-series correction model to obtain the order-preserving trajectory sequence and the corresponding time-series confidence. The push module is used to obtain the real-time status indicators and historical push success rate of the target platform. Based on the temporal confidence of the ordered trajectory sequence, the real-time status indicators of the target platform, and the historical push success rate, it uses a pre-trained reinforcement learning policy network to dynamically decide the push priority, batch size, and network retry parameters of the ordered trajectory sequence, and generates push instructions.

9. A real-time logistics tracking device, characterized in that, It includes a memory and at least one processor, wherein the memory stores computer-readable instructions; The at least one processor invokes the computer-readable instructions in the memory to perform the steps of the real-time logistics trajectory push method as described in any one of claims 1-7.

10. A computer-readable storage medium storing computer-readable instructions thereon, characterized in that, When the computer-readable instructions are executed by the processor, they implement the steps of the real-time logistics trajectory push method as described in any one of claims 1-7.