Dynamic tag data management method, device and equipment and storage medium
By performing multi-dimensional filtering and coding similarity calculation on logistics trajectory data, the system dynamically determines whether a package has a misdelivery label, solving the problem of insufficient precision in misdelivery identification in existing logistics systems. This achieves automated and precise label management, improving logistics service quality and user experience.
Patent Information
- Application Number
- CN202610446501.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-07
- Publication Date
- 2026-07-10
AI Technical Summary
In existing logistics order management systems, the management of misdelivered item tags relies on static judgment logic, which fails to effectively identify abnormal trajectory data. This results in insufficient precision in misdelivery identification, an inability to adapt to dynamic business needs, high system resource consumption, high manual review costs, and difficulty in controlling false signatures and misdelivery issues.
By acquiring logistics trajectory data, performing multi-dimensional data filtering and coding similarity calculation, and utilizing pre-trained coding similarity calculation models and tag status prediction models, we can dynamically determine whether a package has a misdelivery tag, optimize the similarity threshold, and achieve automated and precise tag management.
It improves the accuracy of misdelivered package identification, reduces invalid labeling and system resource consumption, lowers the cost of manual verification, improves logistics service quality and user experience, and realizes dynamic management of label status and full-chain traceability.
Smart Images

Figure CN122367326A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent logistics technology, and in particular to a dynamic tag data management method, apparatus, device, and storage medium. Background Technology
[0002] In the process of digital development in the logistics industry, parcel collection at designated stations and parcel redelivery have become typical scenarios for last-mile delivery. Verifying the association between collection points and target locations is a core step in avoiding misdelivery and improving delivery service quality. Currently, in logistics order management systems, misdelivery label management largely relies on static judgment logic, simply matching station codes to complete labeling and cancellation operations. This lack of pre-emptive anomaly detection of logistics trajectory data makes it prone to label distortion due to missing trajectory fields, incorrect formatting, and other invalid data. Furthermore, traditional station code matching uses precise comparison methods, failing to consider actual situations such as code input deviations, easily leading to missed or incorrect misdelivery detection, indicating a significant lack of refinement in misdelivery identification.
[0003] Furthermore, the existing label management system struggles to adapt to the dynamic business needs of parcel redelivery. It lacks unified standards for the entire lifecycle management of labeling, cancellation, and relabeling. Particularly in scenarios where parcels are redelivered after label cancellation and then misdelivered again, issues such as accidental deletion of 4601 system label records and missing verification of labeling and cancellation times easily arise, making it difficult to trace label status. The system lacks a data prediction model, passively executing label operations without the ability to predict label status changes based on historical data. This leads to a large number of invalid labels, consuming system resources and increasing manual verification costs. Ultimately, this makes it difficult to effectively control issues such as false signatures and misdeliveries, significantly impacting the platform's logistics service quality and user experience. Summary of the Invention
[0004] In order to overcome the shortcomings of the prior art, the present invention aims to provide a dynamic label data management method, device, equipment and storage medium, which aims to improve the accuracy of package misdelivery identification and improve last-mile delivery efficiency.
[0005] The first aspect of this invention provides a dynamic tag data management method, comprising: acquiring logistics trajectory data of a current parcel order and a preset similarity threshold; performing data filtering processing on the logistics trajectory data to obtain target data; acquiring scanning station codes and terminal station codes based on the target data, and acquiring a network point code list based on the terminal station codes; calculating the similarity value between the scanning station code and each network point code in the network point code list to obtain multiple similarity values; determining the highest similarity value based on the multiple similarity values, and comparing the highest similarity value with the similarity threshold; when the highest similarity value is less than or equal to the similarity threshold, determining whether the current parcel order has a misdelivery tag, obtaining a determination result, and tagging the current parcel order based on the determination result to obtain a tagged parcel order.
[0006] Optionally, in a first implementation of the first aspect of the present invention, the step of performing data filtering processing on the logistics trajectory data to obtain target data includes: acquiring preset business rules; performing data filtering processing on the logistics trajectory data based on the business rules to obtain compliant data; using a missing value statistical detection algorithm to perform field integrity detection processing on the compliant data and filtering out complete data; using a format rule verification algorithm to perform encoding format legality detection processing on the complete data and filtering out legal data; using an outlier detection algorithm to perform timestamp reasonableness detection processing on the legal data and filtering out reasonable data; and using a hash matching algorithm to perform trajectory association validity detection processing on the reasonable data and filtering out the target data.
[0007] Optionally, in a second implementation of the first aspect of the present invention, obtaining the network point code list based on the terminal station code includes: obtaining a preset empty judgment rule; performing an empty judgment check on the terminal station code based on the empty judgment rule; and obtaining the network point code list corresponding to the terminal station code when the terminal station code is not empty.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the step of calculating the similarity value between the scanning site code and each netcode in the netcode list to obtain multiple similarity values includes: obtaining a pre-trained code similarity calculation model, the code similarity calculation model including an edit distance calculation module and a normalization module, the edit distance calculation module and the normalization module being connected; calculating the edit distance between the scanning site code and each netcode in the netcode list based on the edit distance calculation module to obtain multiple edit distances; and inputting each edit distance into the normalization module for normalization processing to obtain multiple similarity values.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the step of tagging the current package order based on the judgment result to obtain a tagged package order includes: when the judgment result indicates that the current package order has a misdelivered label, updating the misdelivered time corresponding to the misdelivered label to obtain the tagged package order; when the judgment result indicates that the current package order does not have a misdelivered label, performing misdelivered label tagging processing on the current package order to obtain the tagged package order.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, after tagging the current package order to obtain a tagged package order, the method further includes: obtaining a pre-trained tag state prediction model; inputting the feature dataset of the tagged package order into the tag state prediction model to perform tag state prediction and obtain a prediction result; and optimizing the similarity threshold based on the prediction result.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the label status prediction model includes a temporal feature encoding module, a misdelivery trend learning module, and a label status prediction output module, wherein the temporal feature encoding module, the misdelivery trend learning module, and the label status prediction output module are connected sequentially; the step of inputting the feature dataset of the marked package order into the label status prediction model to predict the label status and obtain the prediction result includes: performing temporal feature encoding processing on the feature dataset based on the temporal feature encoding module to obtain a temporal feature sequence; performing time series dependency mining processing on the temporal feature sequence based on the misdelivery trend learning module to obtain a misdelivery trend feature vector; and performing misdelivery trend prediction processing on the misdelivery trend feature vector based on the label status prediction output module to obtain the prediction result.
[0012] A second aspect of the present invention provides a dynamic tag data management device, comprising: a data acquisition module for acquiring logistics trajectory data of a current parcel order and a preset similarity threshold; a data filtering module for performing data filtering processing on the logistics trajectory data to obtain target data; an encoding acquisition module for acquiring scanning station codes and terminal station codes based on the target data, and acquiring a network point code list based on the terminal station codes; a similarity calculation module for calculating the similarity value between the scanning station code and each network point code in the network point code list, thereby obtaining multiple similarity values; a comparison module for determining the highest similarity value based on the multiple similarity values, and comparing the highest similarity value with the similarity threshold; and a tagging module for determining whether the current parcel order has a misdelivery tag when the highest similarity value is less than or equal to the similarity threshold, obtaining a judgment result, and tagging the current parcel order based on the judgment result to obtain a tagged parcel order.
[0013] A third aspect of the present invention provides a dynamic tag data management device, the dynamic tag data management device comprising: a memory and at least one processor, the memory storing instructions; the at least one processor calling the instructions in the memory to cause the dynamic tag data management device to perform the various steps of the dynamic tag data management method described in any of the preceding claims.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the dynamic tag data management method described in any of the preceding claims.
[0015] In the technical solution of this invention, the logistics trajectory data of the current parcel order and a preset similarity threshold are first obtained. The logistics trajectory data is then filtered to obtain target data. Based on the target data, the scanning station code and the terminal station code are obtained, and a list of outlet codes is obtained based on the terminal station code. Next, the similarity value between the scanning station code and each outlet code in the list of outlet codes is calculated to obtain multiple similarity values. Based on the multiple similarity values, the highest similarity value is determined. The highest similarity value is compared with the similarity threshold. When the highest similarity value is less than or equal to the similarity threshold, it is determined whether the current parcel order has a misdelivery tag. The judgment result is obtained, and the current parcel order is tagged based on the judgment result to obtain a tagged parcel order. This aims to improve the accuracy of parcel misdelivery identification and improve the efficiency of last-mile delivery. Attached Figure Description
[0016] Figure 1 This is a first flowchart of a dynamic tag data management method provided in an embodiment of the present invention; Figure 2 This is a second flowchart of the dynamic tag data management method provided in an embodiment of the present invention; Figure 3 A third flowchart of the dynamic tag data management method provided in this embodiment of the invention; Figure 4 This is a fourth flowchart of the dynamic tag data management method provided in an embodiment of the present invention; Figure 5 The fifth flowchart of the dynamic tag data management method provided in the embodiments of the present invention; Figure 6 The sixth flowchart of the dynamic tag data management method provided in the embodiments of the present invention; Figure 7 The seventh flowchart of the dynamic tag data management method provided in the embodiments of the present invention; Figure 8This is a schematic diagram of the structure of the dynamic tag data management device provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the structure of a dynamic tag data management device provided in an embodiment of the present invention. Detailed Implementation
[0017] This invention provides a method, apparatus, device, and storage medium for dynamic tag data management. In this invention, the terms "first," "second," "third," "fourth," etc. (if present)," in the specification, claims, and accompanying drawings 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 a sequence other than that 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 device 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 devices.
[0018] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the dynamic tag data management method in this invention includes: 101. Obtain the logistics trajectory data of the current package order and the preset similarity threshold; In this embodiment, the logistics trajectory data is a full-volume parcel flow scanning record obtained from real-time consumption of the internal network logistics trajectory data source. It includes core fields such as parcel tracking number, scanning timestamp, scanning station code, and end-point station code. Subsequently, data with specific conditions needs to be filtered according to business rules, and multi-dimensional anomaly detection is performed using the isolated forest algorithm to remove invalid data such as missing fields, incorrect formats, inconsistent time logic, and mismatches between parcel tracking numbers and trajectory information. This yields valid data that can be used for misdelivery risk identification, providing a foundation for station code matching and tag management. The similarity threshold is a preset critical value for station code matching, used to define the degree of matching between the scanning station code and the codes in the network point code list. When the calculated maximum similarity is higher than this threshold, it is determined that the station matches, and there is no risk of misdelivery; when the maximum similarity is lower than or equal to this threshold, it is determined that the station does not match, and there is a risk of misdelivery, proceeding to the tag status judgment stage. The setting of this threshold needs to comprehensively consider the actual situation of code entry deviations in the business scenario, the statistical analysis results of historical misdelivery samples and tag judgment accuracy, and the need to balance system resource consumption and manual review costs.
[0019] 102. Perform data filtering processing on the logistics trajectory data to obtain target data; In this embodiment, the data filtering process for logistics trajectory data to obtain target data follows a multi-dimensional, hierarchical process: First, preset business rules are obtained, and the original logistics trajectory data is initially filtered based on these rules, retaining trajectory data that conforms to specific business scenarios to obtain compliant data. Then, a missing value detection algorithm is used to perform field integrity checks on the compliant data, eliminating invalid data with missing core fields to obtain complete data. Next, a format rule verification algorithm is used to check the encoding format legality of the complete data, filtering out abnormal data whose encoding character length and format do not conform to the specifications to obtain legal data. Then, an outlier detection algorithm is used to check the timestamp rationality of the legal data, excluding abnormal data with logical errors in scanning time to obtain reasonable data. Finally, a hash matching algorithm is used to check the trajectory association validity of the reasonable data, eliminating invalid data where the package tracking number does not match the trajectory information, resulting in target data that can be used for subsequent site coding matching and tag management. Through the coordinated efforts of business rule filtering and multi-algorithm detection, invalid and abnormal information in the logistics trajectory data can be eliminated layer by layer, avoiding distortion in subsequent tag judgments caused by problems such as missing fields, format errors, time logic confusion, and trajectory association failure, thus ensuring the accuracy and reliability of the target data.
[0020] 103. Obtain the scanning site code and the terminal site code based on the target data, and obtain the network point code list based on the terminal site code; In this embodiment, the scanning station code and the final destination station code are obtained based on the target data. The final destination station code is the identifier of the target final destination station to which the package should be delivered, and the scanning station code is the identifier of the station where the package was actually scanned. Both provide the core coding basis for subsequent station matching and misdelivery risk identification. Then, a preset empty judgment rule is obtained, and the final destination station code is checked for emptyness based on the rule. When the final destination station code is not empty, the standardized interface of the basic information center is called to initiate a query request with the final destination station code as the input parameter to obtain the network point code list corresponding to the final destination station. This list is a set of all legal network point identifiers within the jurisdiction of the final destination station, which is used for subsequent similarity matching with the scanning station code to determine whether the package has a misdelivery risk. When the final destination station code is empty, station code matching and misdelivery risk verification cannot be carried out. The system directly connects to the order labeling system to query whether there is a misdelivery label for the current package order. If there is, the label cancellation operation is performed to clear the invalid abnormal label. If there is no label, no label operation is performed, and the process ends directly. By extracting core codes from target data, the reliability and accuracy of the source of misdelivery verification codes are ensured. The verification mechanism based on empty judgment rules avoids subsequent query anomalies and judgment distortions caused by empty terminal station codes, improving the robustness and completeness of the process. By obtaining the network station code list through standardized interfaces, the precise association between terminal stations and managed network stations is achieved, providing a complete reference benchmark for subsequent station code similarity matching. This effectively supports the accurate identification of misdelivery risks, while ensuring the standardization and consistency of data acquisition, avoiding errors caused by manual input deviations. This provides solid coding data support for the dynamic label management system, helping to improve the precision of misdelivery identification and the quality of logistics services.
[0021] 104. Calculate the similarity value between the scanning site code and each network code in the network code list to obtain multiple similarity values; In this embodiment, the similarity value between the scan site code and each net code in the net code list is calculated. First, a pre-trained code similarity calculation model needs to be obtained. This model consists of an edit distance calculation module and a normalization module that are interconnected. First, the scan site code and each code in the net code list are standardized, the capitalization of the codes is unified, invalid characters are removed and the code length is supplemented. Then, the edit distance between the scan site code and each net code is calculated based on the edit distance calculation module, and multiple edit distance results are obtained. Then, each edit distance is input into the normalization module for normalization processing, and the edit distance is converted into a similarity value between 0 and 1. The higher the value, the higher the code matching degree. Finally, multiple similarity values are obtained. This calculation method, based on the Levenshtein edit distance algorithm, can adapt to actual business scenarios such as encoding input deviations and character format differences. It avoids the problems of missed and false judgments that are easily caused by traditional comparison methods. Through standardized processing and normalization transformation, it ensures the consistency and comparability of similarity values, providing accurate and reliable quantitative basis for subsequent extraction of the maximum similarity value and misdelivery risk assessment. This effectively improves the precision of misdelivery identification, while providing solid data support for the dynamic label management system, reducing invalid labeling behavior, lowering system resource consumption and manual review costs, and further improving the platform's logistics service quality and user experience.
[0022] 105. Determine the highest similarity value based on multiple similarity values, and compare the highest similarity value with the similarity threshold; In this embodiment, a highest similarity value is determined based on multiple similarity values. This highest similarity value is then compared with a similarity threshold. First, the maximum value is extracted from all calculated similarity values. This maximum value represents the highest degree of matching between the scanned site code and each code in the network point code list. Then, this maximum value is quantitatively compared with a preset similarity threshold. If the highest similarity value is greater than the threshold, the site is considered a match, and the package has no risk of misdelivery. If the highest similarity value is less than or equal to the threshold, the site is considered a mismatch, and the package has a risk of misdelivery. This comparison mechanism, based on quantified similarity values, can adapt to actual business scenarios such as code entry deviations and character format differences. It avoids the omissions and misjudgments that are easily caused by traditional comparison methods. By clearly defining the boundary between no risk of misdelivery and risk of misdelivery through the threshold, it achieves automated and refined identification of misdelivery risk. This ensures the accuracy and reliability of misdelivery judgment, reduces invalid process execution, improves label management efficiency, reduces system resource consumption and manual review costs, provides accurate decision-making basis for subsequent label status operations, and improves logistics service quality and user experience.
[0023] 106. When the highest similarity value is less than or equal to the similarity threshold, determine whether the current package order has a misdelivery tag, obtain the determination result, and mark the current package order based on the determination result to obtain a marked package order.
[0024] In this embodiment, when the highest similarity value is less than or equal to the similarity threshold, it is determined that the current package order has a risk of misdelivery. The system then queries the order tagging system to see if the current package order already has a misdelivery tag, obtaining the judgment result. If the judgment result indicates that the current package order has a misdelivery tag, the misdelivery time corresponding to the misdelivery tag is updated, resulting in a tagged package order. If the judgment result indicates that the current package order does not have a misdelivery tag, the current package order is tagged with a misdelivery tag, resulting in a tagged package order. This approach can adapt to dynamic business scenarios such as package redelivery, avoiding tag redundancy and data distortion caused by repeated tagging. By updating the misdelivery time, the tag status is dynamically continued, or a new tag is added to initially identify the risk of misdelivery, ensuring a high degree of matching between the tag status and the actual package delivery situation. Simultaneously, it provides accurate time dimensions and status basis for subsequent logistics quality inspection, manual review, and problem tracing, improving the refinement and automation level of tag management, reducing invalid operations, lowering system resource consumption and manual review costs, and improving logistics service quality and user experience.
[0025] In this embodiment, when the highest similarity value is greater than the similarity threshold, it is determined that the delivery station of the current package order complies with the business specifications and there is no risk of misdelivery. At this time, it continues to query whether there is a misdelivery label for the current package order. If there is, the misdelivery label cancellation operation is directly performed to clear the invalid abnormal mark. If there is no label, no label operation is performed and the current process is completed directly. This avoids label redundancy and data distortion caused by repeated labeling and retention of invalid labels, and always ensures that the label status is highly matched with the actual delivery status of the package.
[0026] In this embodiment, when a package has had its misdelivery label removed, if a redelivery trajectory is triggered, the system automatically repeats the previous full data processing and misdelivery verification process to conduct a new round of misdelivery risk assessment for the package. If, after verification, the package again meets the misdelivery assessment criteria and there is currently no corresponding misdelivery label, the system performs an automatic re-labeling operation, re-adding the misdelivery label to the package in the order labeling system. Simultaneously, following the core rules for label retention in the 4601 system, the system does not delete or modify existing label cancellation records and related misdelivery label information. The system automatically verifies the order of the re-labeling time and the label cancellation time in the 4601 system, using the timestamp as the basis for judgment. If the re-labeling time is later than the cancellation time, the re-labeling is deemed valid, the 4601 system information is retained, and the new label status is synchronized to the downstream system. If the labeling time is earlier than the cancellation time, the labeling is deemed invalid, the operation is terminated, and an exception log is recorded. After re-labeling is completed, the new label status, labeling time, and historical records in the 4601 system are associated and archived, achieving end-to-end traceability of label status changes. This processing mechanism ensures the integrity and standardization of label history records, avoids the problem of accidental deletion of historical data caused by relabeling, and ensures the effectiveness and compliance of relabeling operations through a timestamp verification mechanism. At the same time, it realizes full-link traceability of label status changes, provides complete data basis for logistics problem investigation, responsibility definition and service quality optimization, further improves the closed-loop nature and reliability of the dynamic label management system, and enhances the level of refined control of logistics services and user experience.
[0027] Please see Figure 2 In this embodiment of the invention, the step of performing data filtering processing on the logistics trajectory data to obtain target data includes: 201. Obtain preset business rules, and perform data filtering processing on the logistics trajectory data based on the business rules to obtain compliant data; 202. The missing value statistical detection algorithm is used to perform field integrity detection on the compliant data, and complete data is filtered out; 203. The complete data is subjected to encoding format legality detection processing using a format rule verification algorithm, and legal data is filtered out; 204. An outlier detection algorithm is used to perform timestamp validity checks on the legitimate data, and reasonable data is selected. 205. Use a hash matching algorithm to perform trajectory association validity detection on the reasonable data, and filter out the target data.
[0028] In this embodiment, the business rules are preset trajectory screening and judgment conditions for the core business scenarios of last-mile delivery station collection and parcel redelivery. They are used to identify target trajectory data that need to be verified for misdelivery. These rules are comprehensively set based on the actual business process of last-mile delivery, the scenario characteristics of station collection and parcel redelivery, the core business requirements for misdelivery identification, system data processing specifications, and historical misdelivery trajectory statistical characteristics. They include multiple limiting conditions such as scan type, trajectory identification field, and business scenario marking. Based on the business rules, the logistics trajectory data is filtered to obtain compliant data. This step requires real-time consumption of all trajectory data from the internal network logistics trajectory data source. According to the preset business rules, trajectory data that meets the specific business scenario is filtered, and only the trajectories that meet the business conditions are retained for subsequent processing. This can effectively exclude routine circulation trajectories such as transit and sorting that are unrelated to last-mile misdelivery verification, greatly reduce the scope of subsequent data processing, and improve data processing efficiency and the targeting of misdelivery identification.
[0029] In this embodiment, a missing value statistical detection algorithm is used to perform field integrity checks on compliant data, filtering out complete data. Specifically, a counting-based missing value statistical algorithm can be used to traverse core fields, count the number of missing fields, and remove invalid data with missing core fields to obtain complete data. Next, a format rule verification algorithm is used to perform encoding format legality checks on the complete data, filtering out valid data. Specifically, a regular expression matching algorithm can be used to verify the character length and format specifications of the terminal station code and the network point code, filtering out abnormal data that does not conform to the preset specifications. Then, an outlier detection algorithm is used to perform timestamp reasonableness checks on the valid data, filtering out reasonable data. Specifically, an Isolation Forest algorithm can be used to perform anomaly detection on the trajectory scanning time, identifying logical errors such as time reversal and interval anomalies, and removing invalid data with timestamp anomalies. Finally, a hash matching algorithm is used to perform trajectory association validity checks on the reasonable data, filtering out target data. Specifically, a hash mapping-based matching algorithm can be used to construct hash key-value pairs between the package tracking number and trajectory information, verify the consistency of the association between the two, and remove invalid data where the package tracking number and trajectory information do not match. By combining business rule filtering with multi-algorithm detection, invalid and abnormal information in logistics trajectory data is eliminated layer by layer. This avoids distortion in subsequent label judgments caused by issues such as missing fields, format errors, chaotic time logic, and failed trajectory associations, ensuring the accuracy and reliability of target data. At the same time, each step adopts targeted algorithms to achieve refined data quality control, which not only adapts to the needs of specific business scenarios but also effectively improves the accuracy of subsequent misdelivery identification, reduces the occupation of system resources by invalid data, and lowers the cost of manual review.
[0030] Please see Figure 3In this embodiment of the invention, obtaining the network address code list based on the terminal site code includes: 301. Obtain the preset null detection rules; 302. Perform a null check on the terminal station code based on the aforementioned null detection rule; 303. When the terminal station code is not empty, obtain the list of network station codes corresponding to the terminal station code.
[0031] In this embodiment, the null judgment rule is a pre-set null value judgment standard for the end station code, which is used to verify whether the code has a valid business value. The rule is comprehensively set based on the business definition of the logistics end station code, data storage specifications, core logic of misdelivery verification, and statistical characteristics of historical null value data. It clearly determines whether the end station code is a valid non-null value, covering scenarios such as judging whether the code is a blank string, null pointer, or meaningless placeholder.
[0032] In this embodiment, the terminal station code is checked for emptiness based on the empty judgment rule. The terminal station code needs to be extracted from the compliant trajectory data after anomaly detection. The verification is carried out according to the preset empty judgment rule. If the terminal station code is empty, it directly jumps to the subsequent label status judgment and operation stage, directly querying whether there is a misdelivered label for the current package order. If it exists, the label cancellation operation is performed. If it does not exist, no label is applied and the process ends. If the terminal station code is not empty, the standardized interface of the basic information center is called to initiate a query request with the terminal station code as input parameter to obtain the network point code list corresponding to the terminal station. This list is a set of all legal network point identifiers within the jurisdiction of the terminal station, which is used for subsequent similarity matching with the scanned station code to identify the risk of misdelivery. By implementing clear rules for checking for empty values, we avoid interface query anomalies and subsequent judgment logic confusion caused by empty terminal site codes, ensuring the robustness and stability of the process. At the same time, we designed a direct jump processing mechanism for empty value scenarios to avoid invalid process execution and improve the overall data processing efficiency. In non-empty scenarios, we obtain the network code list through standardized interfaces, realizing the accurate association between terminal sites and managed network sites, providing a complete reference benchmark for subsequent misdelivery identification, and ensuring the accuracy and precision of misdelivery judgment.
[0033] Please see Figure 4 In this embodiment of the invention, the step of calculating the similarity value between the scanning site code and each network code in the network code list to obtain multiple similarity values includes: 401. Obtain a pre-trained encoding similarity calculation model, wherein the encoding similarity calculation model includes an edit distance calculation module and a normalization module, and the edit distance calculation module and the normalization module are connected; 402. Calculate the edit distance between the scanned site code and each dot code in the dot code list based on the edit distance calculation module to obtain multiple edit distances; 403. Input each edit distance into the normalization module for normalization processing to obtain multiple similarity values.
[0034] In this embodiment, the pre-trained encoding similarity calculation model is built on a lightweight training framework based on the Python Levenshtein library and the scikit-learn framework, or a modular network structure is built using PyTorch. It consists of an interconnected edit distance calculation module and a normalization module. The training process requires collecting historical logistics station encoding samples, covering multiple encoding pairs such as normal matching, encoding input deviation, and misdelivery scenarios. The samples are standardized by unifying the capitalization of the encoding, removing invalid characters, and supplementing the encoding digits. The edit distance of the sample pairs is calculated based on the Levenshtein edit distance algorithm. The edit distance is normalized to a similarity value ranging from 0 to 1. The historical misdelivery judgment results are used as supervision labels. The normalization weights and threshold parameters are adjusted through cross-validation to optimize the model's tolerance to encoding differences and adapt to actual business scenarios such as encoding input deviation and character format differences. Finally, the model pre-training is completed.
[0035] In this embodiment, based on the model, the scanning site code and each code in the network point code list are first standardized. Then, the edit distance between the scanning site code and each network point code is calculated using the edit distance calculation module, resulting in multiple edit distance results. Subsequently, each edit distance is input into the normalization module for normalization, converting the edit distance into a similarity value ranging from 0 to 1. A higher value indicates a higher code matching degree, ultimately yielding multiple similarity values. This calculation method and subsequent processing mechanism can adapt to actual business scenarios such as code input deviations and character format differences, avoiding the omissions and misjudgments that are easily caused by traditional precise comparison methods. Standardization and normalization conversion ensure the consistency and comparability of similarity values.
[0036] Please see Figure 5 In this embodiment of the invention, the step of tagging the current package order based on the judgment result to obtain a tagged package order includes: 501. When the judgment result indicates that the current package order has a misdelivered label, update the misdelivered time corresponding to the misdelivered label to obtain the marked package order; 502. When the judgment result is that there is no misdelivery label for the current package order, the current package order is marked with a misdelivery label to obtain the marked package order.
[0037] In this embodiment, when the highest similarity value is greater than the similarity threshold, it is determined that the scanning site code belongs to the list of network codes associated with the terminal site, and there is no risk of misdelivery of the package. At this time, it is checked whether there is a misdelivery label for the current package order. If there is, the label cancellation operation is performed, the process ends after the system record is completed, and if there is no label, no label operation is performed and the process ends directly.
[0038] In this embodiment, when the highest similarity value is less than or equal to the similarity threshold, it is determined that the scanned site code does not belong to the list of network codes associated with the terminal site, and the package is at risk of being misdelivered. Then, it is queried whether the current package order has a misdelivered label to obtain the judgment result. If the judgment result is that the current package order has a misdelivered label, the misdelivery time corresponding to the misdelivered label is updated to obtain a marked package order; if the judgment result is that the current package order does not have a misdelivered label, the current package order is marked with a misdelivered label to obtain a marked package order. Furthermore, if the terminal site code is empty, site matching verification cannot be performed. The system directly queries whether the current package order has a misdelivered label. If it exists, the label cancellation operation is performed; if it does not exist, no label is applied, and the process ends. This processing mechanism is fully adaptable to dynamic business scenarios such as parcel redelivery and parcel collection at delivery stations. It achieves refined label management through multi-branch judgment, promptly clearing invalid labels when there is no risk of misdelivery to avoid label redundancy and data distortion. When there is a risk of misdelivery, it dynamically continues the label status by updating the misdelivery time or adding a new label to complete the initial identification of the misdelivery risk. At the same time, it has designed direct label processing logic for scenarios where the last-mile station code is empty, ensuring the integrity and robustness of the process operation. It always ensures that the label status is highly matched with the actual delivery status of the parcel, providing a basis for subsequent logistics quality inspection, manual review and problem tracing, improving the automation level and efficiency of label management, reducing invalid operations, and reducing system resource consumption and manual review costs.
[0039] Please see Figure 6 In this embodiment of the invention, after tagging the current package order to obtain a tagged package order, the process further includes: 601. Obtain the pre-trained label state prediction model; 602. Input the feature dataset of the marked package order into the tag status prediction model to predict the tag status and obtain the prediction result; 603. Optimize the similarity threshold based on the prediction results.
[0040] In this embodiment, a pre-trained tag status prediction model is obtained. This model is built based on time series analysis and can be implemented using algorithm frameworks such as ARIMA or LSTM. Its training process requires the collection of historical training data, including historical trajectory data from the logistics intranet, historical marking and cancellation records of suspected misdelivered tags, frequency and time data of package redelivery, misdelivery rate statistics for different end-point stations and network points, and verification data of packages collected by delivery stations. The model is trained using package tracking number, station code, delivery time, and current tag status as core features. The model output dimensions include the probability of redelivering a single package, the possibility of a tag being re-marked after cancellation, the trend of misdelivery rate changes for different network points and end-point stations, and the predicted duration of tag status. Subsequently, the feature dataset of marked package orders is input into the tag status prediction model to perform tag status prediction, outputting prediction results including the probability of redelivering a single package, the possibility of a tag being re-marked after cancellation, the trend of misdelivery rate changes for different network points and end-point stations, and the predicted duration of tag status. Based on the prediction results, the similarity threshold is optimized, and the quantitative judgment criteria and corresponding optimization strategies for high and low misdelivery rates are clarified. For network points and terminal sites with low misdelivery rate trends, the misdelivery rate change trend output by the model is used to identify areas where the misdelivery rate is consistently lower than the preset benchmark value. The similarity judgment threshold is appropriately increased to expand the tolerance for code matching, reduce invalid labeling triggered by minor code differences, and reduce system resource consumption. For network points and terminal sites with high misdelivery rate trends, the misdelivery rate change trend output by the model is used to identify areas where the misdelivery rate is consistently higher than the preset benchmark value or the triggering frequency is abnormal. A manual review step is added to form a double verification with the system's automatic labeling, improving the accuracy of misdelivery identification. At the same time, for packages with high re-delivery and high probability of secondary labeling, the frequency of consumption and verification of their trajectory data is increased to achieve real-time monitoring. Based on the label life cycle prediction, the monitoring priority of canceled tagged packages that have not triggered re-delivery for a long time is reduced to save system resources. The optimized strategies are synchronized to trajectory consumption, code verification, label labeling and cancellation, etc., to form a closed-loop dynamic label management system. By using a pre-trained time series prediction model, accurate prediction of label status change trends is achieved, breaking through the limitations of passive execution in traditional label management. Based on the prediction results, the similarity threshold and multi-dimensional management strategies are dynamically optimized. This not only adapts to the differences in misdelivery risk at different sites and balances the accuracy of misdelivery identification with system resource consumption, but also enables precise control over high-risk packages and sites, while reducing resource consumption in low-risk scenarios, thus comprehensively improving the intelligence and refinement of label management.
[0041] Please see Figure 7In this embodiment of the invention, the label status prediction model includes a temporal feature encoding module, a misdelivery trend learning module, and a label status prediction output module, which are sequentially connected. The step of inputting the feature dataset of the marked package orders into the label status prediction model to predict the label status and obtain the prediction result includes: 701. Based on the time-series feature encoding module, perform time-series feature encoding processing on the feature dataset to obtain a time-series feature sequence; 702. Based on the mis-investment trend learning module, perform time series dependency mining processing on the time series feature sequence to obtain the mis-investment trend feature vector; 703. Based on the label status prediction output module, perform mis-projection trend prediction processing on the mis-projection trend feature vector to obtain the prediction result.
[0042] In this embodiment, a pre-trained label status prediction model is obtained. This model consists of a time-series feature encoding module, a misdelivery trend learning module, and a label status prediction output module connected in sequence. During its training phase, historical training data is collected. Data sources include historical trajectory data from the logistics intranet, historical marking and cancellation records of suspected misdelivered labels, frequency and time data of package redelivery, misdelivery rate statistics for different end-point stations and outlets, and verification data of packages collected by delivery stations. A feature dataset is constructed using package tracking number, station code, delivery time, and current label status as core features. Model pre-training is completed based on time series algorithm frameworks such as ARIMA or LSTM. Subsequently, the feature dataset of labeled package orders is input into the label status prediction model. First, the time-series feature encoding module performs time-series feature encoding processing on the feature dataset, transforming discrete features such as package tracking number and station code with continuous features such as delivery time and label status into a unified time-series feature sequence, achieving time-series alignment and structured expression of multi-source features. Next, based on the misdelivery trend learning module, time series dependency mining is performed on the temporal feature sequence. By capturing the long-term dependency relationship between package delivery behavior, station misdelivery patterns, and tag status changes at different time steps, a misdelivery trend feature vector is extracted. This vector encapsulates core information such as the probability of package redelivery, the possibility of tag re-labeling, the trend of station misdelivery rate changes, and the tag lifespan. Finally, based on the tag status prediction output module, the misdelivery trend feature vector is processed for misdelivery trend prediction, outputting prediction results including the probability of redelivery of a single package, the possibility of tag re-labeling after cancellation, the trend of misdelivery rate changes at different network points and end stations, and the predicted tag lifespan. This modular model structure realizes refined encoding of temporal features and deep mining of time series dependencies, accurately capturing the dynamic changes in logistics operations and providing a forward-looking predictive basis for tag management.
[0043] The dynamic tag data management method in the embodiments of the present invention has been described above. The dynamic tag data management device in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 8 One embodiment of the dynamic tag data management device in this invention includes: Data acquisition module 801: used to acquire the logistics trajectory data of the current package order and the preset similarity threshold; Data filtering module 802: used to perform data filtering processing on the logistics trajectory data to obtain target data; Encoding acquisition module 803: used to acquire scanning site codes and terminal site codes based on the target data, and to acquire a list of outlet codes based on the terminal site codes; Similarity calculation module 804: used to calculate the similarity value between the scanning site code and each network code in the network code list, and obtain multiple similarity values; Comparison module 805: used to determine the highest similarity value based on multiple similarity values, and compare the highest similarity value with the similarity threshold; Tagging module 806: When the highest similarity value is less than or equal to the similarity threshold, it determines whether the current package order has a misdelivered label, obtains the determination result, and performs tagging processing on the current package order based on the determination result to obtain a tagged package order.
[0044] Based on the same ideas as the methods in the above embodiments, the apparatus provided in this application can implement the methods in the above embodiments.
[0045] above Figure 8 The dynamic tag data management device in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The dynamic tag data management device in this embodiment of the invention will be described in detail from the perspective of hardware processing.
[0046] Figure 9This is a schematic diagram of the structure of a dynamic tag data management device 900 provided in an embodiment of the present invention. The dynamic tag data management device 900 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 910 (e.g., one or more processors) and a memory 920, and one or more storage media 930 (e.g., one or more mass storage devices) for storing application programs 933 or data 932. The memory 920 and storage media 930 can be temporary or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the dynamic tag data management device 900. Furthermore, the processor 910 may be configured to communicate with the storage media 930 and execute the series of instruction operations in the storage media 930 on the dynamic tag data management device 900 to implement the steps of the dynamic tag data management method provided in the above-described method embodiments.
[0047] The dynamic tag data management device 900 may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input / output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 9 The illustrated structure of the dynamic tag data management device does not constitute a limitation on the dynamic tag data management device. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0048] The present 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, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a dynamic tag data management method.
[0049] 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.
[0050] 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.
[0051] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A dynamic tag data management method, characterized in that, include: Obtain the logistics trajectory data of the current package order and the preset similarity threshold; The logistics trajectory data is filtered to obtain the target data; Based on the target data, obtain the scanning site code and the terminal site code, and based on the terminal site code, obtain the network point code list; Calculate the similarity value between the scanning site code and each network code in the network code list to obtain multiple similarity values; The highest similarity value is determined based on multiple similarity values, and the highest similarity value is compared with the similarity threshold. When the highest similarity value is less than or equal to the similarity threshold, it is determined whether the current package order has a misdelivery tag, a judgment result is obtained, and the current package order is tagged based on the judgment result to obtain a tagged package order.
2. The dynamic tag data management method according to claim 1, characterized in that, The process of filtering the logistics trajectory data to obtain target data includes: Obtain preset business rules, and perform data filtering processing on the logistics trajectory data based on the business rules to obtain compliant data; The missing value statistical detection algorithm is used to perform field integrity detection on the compliant data, and complete data is filtered out. The complete data is subjected to encoding format legality detection processing using a format rule verification algorithm, and legal data is filtered out. An outlier detection algorithm is used to perform timestamp validity checks on the legitimate data, and reasonable data is then selected. A hash matching algorithm is used to perform trajectory association validity detection on the reasonable data, and the target data is then selected.
3. The dynamic tag data management method according to claim 1, characterized in that, The process of obtaining the network address code list based on the terminal site code includes: Obtain the preset null detection rules; The terminal station code is checked for emptiness based on the aforementioned empty detection rules; When the terminal station code is not empty, obtain the list of network station codes corresponding to the terminal station code.
4. The dynamic tag data management method according to claim 1, characterized in that, The similarity value between the scanned site code and each network code in the network code list is calculated to obtain multiple similarity values, including: Obtain a pre-trained encoding similarity calculation model, which includes an edit distance calculation module and a normalization module, and the edit distance calculation module and the normalization module are connected; Based on the edit distance calculation module, the edit distance between the scanned site code and each network code in the network code list is calculated to obtain multiple edit distances; Each edit distance is input into the normalization module for normalization processing to obtain multiple similarity values.
5. The dynamic tag data management method according to claim 1, characterized in that, The step of tagging the current package order based on the judgment result to obtain a tagged package order includes: When the determination result indicates that the current package order has a misdelivered label, the misdelivery time corresponding to the misdelivered label is updated to obtain the marked package order; When the determination result is that there is no misdelivery label for the current package order, the current package order is marked with a misdelivery label to obtain the marked package order.
6. The dynamic tag data management method according to claim 1, characterized in that, After tagging the current package order to obtain the tagged package order, the process further includes: Obtain a pre-trained label state prediction model; The feature dataset of the marked package orders is input into the label status prediction model to predict the label status and obtain the prediction result; The similarity threshold is optimized based on the prediction results.
7. The dynamic tag data management method according to claim 6, characterized in that, The label status prediction model includes a temporal feature encoding module, a misdelivery trend learning module, and a label status prediction output module, which are sequentially connected. The step of inputting the feature dataset of the marked package orders into the label status prediction model to predict the label status and obtain the prediction result includes: The time-series feature encoding module is used to perform time-series feature encoding on the feature dataset to obtain a time-series feature sequence. Based on the mis-investment trend learning module, the time series feature sequence is subjected to time series dependency mining processing to obtain the mis-investment trend feature vector. The mis-projection trend prediction is performed on the mis-projection trend feature vector based on the label state prediction output module to obtain the prediction result.
8. A dynamic tag data management device, characterized in that, include: Data acquisition module: used to acquire the logistics trajectory data of the current package order and the preset similarity threshold; Data filtering module: used to filter the logistics trajectory data to obtain target data; Encoding acquisition module: used to acquire scanning site codes and terminal site codes based on the target data, and to acquire a list of outlet codes based on the terminal site codes; Similarity calculation module: used to calculate the similarity value between the scanning site code and each network code in the network code list, and obtain multiple similarity values; Comparison module: used to determine the highest similarity value based on multiple similarity values, and compare the highest similarity value with the similarity threshold; Tagging module: When the highest similarity value is less than or equal to the similarity threshold, it determines whether the current package order has a misdelivery tag, obtains the determination result, and performs tagging processing on the current package order based on the determination result to obtain a tagged package order.
9. A dynamic tag data management device, characterized in that, The dynamic tag data management device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the dynamic tag data management device to perform the steps of the dynamic tag data management method as claimed in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the steps of the dynamic tag data management method as described in any one of claims 1-7.