Logistics segment code management method and device, equipment and storage medium

By combining named entity recognition and the XGBoost model, waybill data is parsed and predicted, solving the problem of segment code misclassification, improving the efficiency and accuracy of logistics order allocation, and reducing misclassification events.

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

Patent Information

Application Number
CN202511810740.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing technologies lack the ability to predict segment code misclassification in advance, resulting in a high number of misclassified parcels, which affects logistics efficiency. Furthermore, existing linear retrieval methods have long response times, which cannot meet interface response requirements and affect the timeliness of order allocation intervention.

Method used

A named entity recognition model is used to parse and correct waybill data, obtain standardized addresses, and combine historical misclassification data and waybill features to form multi-class feature vectors. These vectors are then input into an XGBoost gradient boosting tree model to predict segment code misclassification risk, and the segment code prediction model parameters and matching rule base are updated.

Benefits of technology

It improved the accuracy of segment code misclassification risk prediction, reduced the occurrence of misclassification events, improved the efficiency and accuracy of logistics order allocation, and met the interface response requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121615631A_ABST
    Figure CN121615631A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of logistics data processing, in particular to a logistics segment code management method and device, equipment and a storage medium. The logistics segment code management method comprises the following steps: firstly, analyzing an original receiving address in waybill data by adopting a named entity recognition model, and carrying out error correction and integration on an address component obtained by analysis to obtain a standardized address; preprocessing the standardized address, the historical misclassification data and the waybill features to obtain multiple types of feature vectors; inputting the multi-class feature vectors into a segment code prediction model based on an XGBoost gradient boosting tree, and outputting a segment code misclassification risk level to obtain misclassification waybill feedback data; and finally, the segment code prediction model parameters and the preset segment code matching rule base are updated according to the miscarriage waybill feedback data, so that the segment code accuracy is improved, the labor cost is reduced, the address change can be adapted in real time, the segment code matching error rate of the new address is reduced, and the rule base does not need to be manually and frequently updated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of logistics data processing technology, and in particular to a logistics segment code management method, apparatus, equipment and storage medium. Background Technology

[0002] In logistics and distribution, segment codes are the core identifiers for accurate order allocation and efficient delivery of parcels. Their accuracy directly impacts logistics transit efficiency and last-mile delivery costs. Currently, in segment code management, recipient addresses often have non-standard formats, which existing fixed rules cannot effectively identify, leading to segment code matching errors. Due to the lack of ability to predict misallocation risks in advance, a large number of misallocated parcels require manual backtracking, which is inefficient. Furthermore, when branches need to query a massive number of misallocated waybills, the existing linear retrieval method by waybill number / address has a long response time, which cannot meet the interface response requirements and affects the timeliness of order allocation intervention.

[0003] It is evident that existing technologies still need improvement and enhancement. Summary of the Invention

[0004] In view of the shortcomings of the prior art, the purpose of this invention is to provide a logistics segment code management method, device, equipment and storage medium, which aims to solve the technical problem in the prior art of lacking advance prediction of segment code misclassification, and the impact on logistics efficiency due to the large number of express parcels with segment code misclassification.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of this invention provides a logistics segment code management method, comprising the following steps: acquiring waybill data; parsing the original recipient address in the waybill data using a named entity recognition model; correcting and integrating the parsed address components to obtain a standardized address; acquiring historical misclassification data and extracting waybill features from the waybill data; preprocessing the standardized address, historical misclassification data, and waybill features to obtain multiple feature vectors; inputting the multiple feature vectors into a segment code prediction model based on an XGBoost gradient boosting tree to output the segment code misclassification risk level to obtain misclassified waybill feedback data; and updating the segment code prediction model parameters and a preset segment code matching rule library based on the misclassified waybill feedback data.

[0006] Optionally, in a first implementation of the first aspect of the present invention, the step of acquiring waybill data, using a named entity recognition model to parse the original recipient address in the waybill data, and correcting and integrating the parsed address components to obtain a standardized address, specifically includes: acquiring waybill data; using a named entity recognition model to parse the original recipient address in the waybill data and extracting address components at each level; using an edit distance algorithm to compare the address components with a logistics-specific dictionary containing multiple standard address terms, and intelligently correcting terms with similarity below a threshold; integrating the corrected address components according to a preset format to output a structured standardized address.

[0007] Optionally, in a second implementation of the first aspect of the present invention, the step of acquiring historical misclassification data and extracting waybill features from waybill data, and preprocessing standardized addresses, historical misclassification data, and waybill features to obtain multiple feature vectors, specifically includes: acquiring historical misclassification data of target outlets, acquiring historical misclassification features from the historical misclassification data of target outlets, and extracting waybill features from waybill data; converting standardized addresses into vectors using a Word2Vec model, and marking addresses containing new area identifiers to obtain address features; and preprocessing address features, historical misclassification features, and waybill features to obtain multiple feature vectors.

[0008] Optionally, in the third implementation of the first aspect of the present invention, the preprocessing of address features, historical misclassification features, and waybill features to obtain multi-class feature vectors specifically includes: for numerical features among address features, historical misclassification features, and waybill features, using the min-max normalization method to map their values ​​to the [0,1] interval; for categorical features, using one-hot encoding to convert them into numerical vectors, where each category corresponds to a binary bit, and if the category exists, the corresponding bit is 1, otherwise it is 0; for marker features, directly converting them into binary values ​​of 0 or 1 to obtain multi-class feature vectors.

[0009] Optionally, in the fourth implementation of the first aspect of the present invention, the step of inputting multiple feature vectors into a segment code prediction model based on an XGBoost gradient boosting tree and outputting a segment code misclassification risk level to obtain misclassified waybill feedback data specifically includes: inputting multiple feature vectors into a segment code prediction model based on an XGBoost gradient boosting tree and outputting a total score; converting the total score into a misclassification probability value according to a predetermined score-probability mapping relationship; converting the misclassification probability value into a risk level according to a preset risk level classification threshold, outputting the segment code misclassification risk level, and obtaining misclassified waybill feedback data.

[0010] Optionally, in the fifth implementation of the first aspect of the present invention, the step of updating the segment code prediction model parameters and the preset segment code matching rule library based on the misclassified waybill feedback data specifically includes: counting the number of newly added misclassified waybill feedback data; updating the model parameters when the cumulative number of newly added misclassified waybill feedback data reaches a threshold; calculating the interval time since the last update; updating the model parameters when the interval time reaches a threshold; using the FTRL-Proximal algorithm to adjust the feature weights of the segment code prediction model based on the misclassified waybill feedback data; and updating the preset segment code matching rule library based on the misclassified waybill feedback data.

[0011] Optionally, in the sixth implementation of the first aspect of the present invention, the step of updating the preset segment code matching rule library based on the feedback data of the misclassified waybill specifically includes: counting the number of times each address keyword is manually corrected based on the feedback data of the misclassified waybill, and determining whether the results of multiple consecutive manual corrections are consistent; if the results of multiple consecutive manual corrections are consistent, and the number of consecutive corrections reaches a threshold, marking the mapping relationship between the manually corrected address keywords and the corresponding segment codes as a high-confidence rule; and updating the mapping relationship between the manually corrected address keywords and the corresponding segment codes to the segment code matching rule library to replace the original rule.

[0012] A second aspect of the present invention provides a logistics segment code management device, comprising: a parsing module for acquiring waybill data, parsing the original recipient address in the waybill data using a named entity recognition model, correcting and integrating the parsed address components to obtain a standardized address; a preprocessing module for acquiring historical misclassification data, extracting waybill features from the waybill data, preprocessing the standardized address, historical misclassification data, and waybill features to obtain multiple feature vectors; a prediction module for inputting the multiple feature vectors into a segment code prediction model based on an XGBoost gradient boosting tree, outputting a segment code misclassification risk level to obtain misclassified waybill feedback data; and an update module for updating the segment code prediction model parameters and a preset segment code matching rule library based on the misclassified waybill feedback data.

[0013] Optionally, in the first implementation of the second aspect of the present invention, the parsing module includes: a parsing unit, used to acquire waybill data, and use a named entity recognition model to parse the original recipient address in the waybill data and extract address components at each level; an error correction unit, used to use an edit distance algorithm to compare the address components with a logistics-specific dictionary containing multiple standard address terms, and intelligently correct terms with similarity below a threshold; and an integration unit, used to integrate the corrected address components according to a preset format and output a structured standardized address.

[0014] Optionally, in a second implementation of the second aspect of the present invention, the preprocessing module includes: an extraction submodule, used to acquire historical misclassification data of the target network point, acquire historical misclassification features from the historical misclassification data of the target network point, and extract waybill features from the waybill data; a conversion submodule, used to convert standardized addresses into vectors using a Word2Vec model, and mark addresses containing new area identifiers to obtain address features; and a preprocessing submodule, used to preprocess the address features, historical misclassification features, and waybill features to obtain multiple feature vectors.

[0015] Optionally, in a third implementation of the second aspect of the present invention, the preprocessing submodule includes: a numerical mapping unit, used to map the values ​​of numerical features in address features, historical misclassification features, and waybill features to the [0,1] interval using the min-max normalization method; a category conversion unit, used to convert categorical features into numerical vectors using one-hot encoding, where each category corresponds to a binary bit, and the corresponding bit is 1 if the category exists, otherwise it is 0; and a label conversion unit, used to directly convert label features into binary values ​​of 0 or 1 to obtain multi-class feature vectors.

[0016] Optionally, in a fourth implementation of the second aspect of the present invention, the prediction module includes: a prediction unit, used to input multi-class feature vectors into a segment code prediction model based on an XGBoost gradient boosting tree, and output a total score; a score conversion unit, used to convert the total score into a misclassification probability value according to a predetermined score-probability mapping relationship; and a probability conversion unit, used to convert the misclassification probability value into a risk level according to a preset risk level classification threshold, and output a segment code misclassification risk level to obtain misclassified waybill feedback data.

[0017] Optionally, in the fifth implementation of the second aspect of the present invention, the update module includes: a first update unit, used to count the number of newly added misclassified waybill feedback data, and update the model parameters when the cumulative number of newly added misclassified waybill feedback data reaches a threshold; a second update unit, used to calculate the interval time since the last update, and update the model parameters when the interval time reaches a threshold; an adjustment unit, used to adjust the feature weights of the segment code prediction model according to the misclassified waybill feedback data using the FTRL-Proximal algorithm; and a rule update unit, used to update the preset segment code matching rule library according to the misclassified waybill feedback data.

[0018] Optionally, in the sixth implementation of the second aspect of the present invention, the rule update unit includes: a judgment subunit, used to count the number of times each address keyword is manually corrected based on the feedback data of the misclassified waybill, and to determine whether the results of multiple consecutive manual corrections are consistent; a marking subunit, used to mark the mapping relationship between the manually corrected address keyword and the corresponding segment code as a high-confidence rule if the results of multiple consecutive manual corrections are consistent and the number of consecutive corrections reaches a threshold; and a replacement subunit, used to update the mapping relationship between the manually corrected address keyword and the corresponding segment code to the segment code matching rule base to replace the original rule.

[0019] A third aspect of the present invention provides a logistics segment code management device, including 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 execute the various steps of the logistics segment code management method described above.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium storing computer-readable instructions, wherein the computer-readable instructions, when executed by a processor, implement the various steps of the logistics segment code management method described above.

[0021] Beneficial Effects: This invention provides a logistics segment code management method. First, a named entity recognition model is used to parse the original recipient address in the waybill data. The parsed address components are then corrected and integrated to obtain standardized addresses, providing data with a unified format, conformity to standards, and accurate content for subsequent analysis and processing. Next, historical misclassification data is acquired, and waybill features are extracted from the waybill data. Then, the standardized addresses, historical misclassification data, and waybill features are preprocessed to obtain multiple feature vectors, providing multi-faceted features for model prediction. This allows for more comprehensive consideration of factors during prediction, thereby improving prediction accuracy. These feature vectors are input into a segment code prediction model based on an XGBoost gradient boosting tree. The output score of the segment code prediction model is ultimately converted into a segment code misclassification risk level, enabling branch personnel to quickly identify misclassification risks and intervene accordingly. Finally, based on manually processed feedback data from misclassified waybills, the parameters of the segment code prediction model and the preset segment code matching rule base are updated, improving model performance and reducing the occurrence of segment code mismatches. Attached Figure Description

[0022] Figure 1 This is a first flowchart of a logistics segment code management method provided in an embodiment of the present invention; Figure 2 This is a second flowchart of the logistics segment code management method provided in an embodiment of the present invention; Figure 3This is a third flowchart of the logistics segment code management method provided in an embodiment of the present invention; Figure 4 This is a fourth flowchart of the logistics segment code management method provided in an embodiment of the present invention; Figure 5 The fifth flowchart of the logistics segment code management method provided in the embodiments of the present invention; Figure 6 The sixth flowchart of the logistics segment code management method provided in the embodiments of the present invention; Figure 7 The seventh flowchart of the logistics segment code management method provided in the embodiments of the present invention; Figure 8 A schematic diagram of a logistics segment code management device provided in an embodiment of the present invention; Figure 9 This is another structural schematic diagram of the logistics segment code management device provided in an embodiment of the present invention; Figure 10 This is a schematic diagram of the structure of the logistics segment code management device provided in an embodiment of the present invention. Detailed Implementation

[0023] This invention provides a method, apparatus, device, and storage medium for logistics segment code management. First, it uses a named entity recognition model to accurately parse the original recipient address, then performs error correction and standardization integration to solve the problem of non-standard address formats at the source, laying a high-quality data foundation for subsequent processing. Next, based on historical misclassification data, waybill characteristics, and standardized addresses, a comprehensive feature vector is formed and input into an XGBoost gradient boosting tree prediction model to predict segment code misclassification scores. Furthermore, it outputs an intuitive misclassification risk level, helping branch personnel quickly locate high-risk waybills and conduct timely targeted interventions, effectively reducing misclassification occurrences. Subsequently, iterative updates to the model parameters and segment code matching rule base are achieved through manual processing of feedback data, dynamically optimizing model performance and rule adaptability, thereby significantly reducing the segment code matching misalignment rate, reducing manual backtracking costs, and improving the efficiency and accuracy of logistics order allocation.

[0024] 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 comprises 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.

[0025] 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 the logistics segment code management method in this invention includes: S101. Obtain waybill data, use a named entity recognition model to parse the original recipient address in the waybill data, and correct and integrate the parsed address components to obtain a standardized address; S102. Obtain historical misclassification data and extract waybill features from waybill data. Preprocess standardized addresses, historical misclassification data and waybill features to obtain multiple feature vectors. S103. Input the multi-class feature vectors into the segment code prediction model based on XGBoost gradient boosting tree, output the segment code misclassification risk level, and obtain the misclassified waybill feedback data; S104. Based on the feedback data of misclassified waybills, update the segment code prediction model parameters and the preset segment code matching rule library.

[0026] In this embodiment, by establishing a real-time data transmission channel, the system can automatically collect waybill data covering basic fields such as waybill number, recipient information, detailed address, estimated delivery time, and calculated initial segment code. The original address, provided by the shipper, often contains typos, omissions, or extra characters, leading to subsequent address recognition issues. By using a named entity recognition model to pre-parse the original address, longer addresses can be broken down, and each part can be analyzed for errors. After correcting any erroneous parts, the components are reassembled to obtain a standardized address, improving the accuracy of subsequent order splitting.

[0027] After processing the address, this embodiment further predicts the potential segment code matching error risk of the standardized address. Even after standardization, errors can still occur in the original address. Specifically, this invention analyzes historical misclassification data, waybill data, and standardized addresses, then uses a trained segment code prediction model to obtain an error risk score, which is then converted into a segment code error risk level, thus more intuitively reflecting the segment code misclassification risk. To improve the prediction accuracy of the segment code prediction model, key features need to be extracted from historical misclassification data, waybill data, and standardized addresses. For example, waybill features are extracted from waybill data, and misclassified code segments are extracted from historical misclassification data. After preprocessing, multiple feature vectors are formed. The segment code prediction model based on XGBoost gradient boosting trees calculates the risk score based on the feature importance learned during training, using these multiple feature vectors. The system converts the score into a segment code misclassification risk level. When branch staff see a segment code misclassification risk, they will verify and modify high-risk waybills according to the prompts, preventing waybill misclassification in advance, and upload the misclassified waybill feedback data to the system.

[0028] Based on feedback data from misclassified waybills, the system automatically updates the parameters of the segment code prediction model, thereby continuously optimizing the model. Furthermore, the system continuously updates the segment code matching rule base based on the feedback data, reducing segment code matching errors caused by address name changes, historical errors, etc., thus minimizing waybill misclassification.

[0029] To address the issue that existing linear retrieval methods based on tracking number / address have long response times when branches need to query a massive number of misclassified waybills, failing to meet interface response requirements and impacting the timeliness of waybill intervention, this embodiment also establishes an inverted index for keywords such as street and community / neighborhood in the recipient address, mapping each keyword to a list of waybill IDs containing that keyword. The index uses an incremental update mechanism. For precise query fields such as waybill number and branch code, a hash index is constructed and associated with a Bloom filter to achieve rapid existence verification before querying, improving the invalid query filtering rate.

[0030] Please see Figure 2 The second embodiment of the logistics segment code management method in this invention includes: S201. Obtain waybill data, use the named entity recognition model to parse the original recipient address in the waybill data, and extract the address components at each level; S202. The edit distance algorithm is used to compare the address component with a logistics-specific dictionary containing multiple standard address terms, and intelligent error correction is performed on terms with similarity below the threshold. S203. Integrate the corrected address components according to the preset format and output a structured, standardized address.

[0031] In this embodiment, a named entity recognition model based on the BERT-BiLSTM-CRF architecture is specifically used to parse the original recipient address and extract address components at each level. The named entity recognition model is trained on multiple logistics address data labeled with entities such as province, city, district, street, community / residential area, and house number, which can achieve high-precision extraction of address components at each level, providing structurally clear and semantically accurate basic data for subsequent address standardization and segment code matching. The named entity recognition model comprises three modules: BERT, BiLSTM, and CRF. BERT, relying on large-scale general corpus pre-training and a bidirectional Transformer attention mechanism, can deeply capture the ambiguity, abbreviation heterogeneity, and contextual dependencies in address text. BiLSTM, targeting the hierarchical sequence characteristics of address text (such as the ordered structure of province-city-district-street-house number), uses a forward and backward bidirectional recurrent neural network to fully capture the contextual relationships between address components, effectively compensating for BERT's shortcomings in capturing local dependencies in long sequences and improving the continuous recognition capability of hierarchical address components. CRF applies global constraints to the output label sequence, learning the transfer rules between address entity labels (e.g., after the label "xx province", it can only transfer to the label "yy city", and cannot directly transfer to the labels "street" or "AA city"), avoiding label prediction results that violate the address hierarchy logic, accurately correcting the problem of ambiguous entity boundaries, and ensuring that the identified address components conform to the hierarchical specifications of logistics addresses.

[0032] After extracting address components at each level, an edit distance algorithm is used to compare the extracted address components with a logistics-specific dictionary containing multiple standard address terms. Terms with similarity below a threshold (e.g., below 0.8) undergo intelligent error correction. For example, for the address component "Building 12, Unit 3, Room 502," its format is highly similar to the format recorded in the logistics-specific dictionary for that community, so intelligent error correction is not triggered. Finally, the results are integrated and processed according to a unified format (e.g., province + city + district + street + detailed address) to output a structured, standardized address.

[0033] Please see Figure 3 The third embodiment of the logistics segment code management method in this invention includes: S301. Obtain historical misclassification data of the target network, extract historical misclassification features from the historical misclassification data of the target network, and extract waybill features from the waybill data; S302. Convert the standardized address into a vector using the Word2Vec model, and mark the address containing the new region identifier to obtain address features; S303. Preprocess the address features, historical misclassification features, and waybill features to obtain multiple feature vectors.

[0034] In this embodiment, the historical misclassification data of the target network point includes the misclassification rate of the two-segment code and the misclassification rate of the three-segment code of the target delivery network point in the past 7 days, as well as the number of historical waybills with the same address type as the current waybill. The waybill features include the waybill source type as normal shipment, returned shipment, forwarded shipment, the difference between the platform record time and the Yunda system record time when the order is generated, and the range of waybill weight.

[0035] The standardized address is converted into a 128-dimensional numerical vector using the Word2Vec model. After marking whether the address contains new area identifiers such as newly created or temporary, the resulting address features include structured address components and their Word2Vec encoded vectors, as well as markers indicating whether the address contains special identifiers such as newly created or temporary. Finally, the extracted features are preprocessed and converted into a format that can be quickly recognized by the model, thus obtaining multi-class feature vectors.

[0036] Please see Figure 4 The fourth embodiment of the logistics segment code management method in this invention includes: S401. For numerical features in address features, historical misclassification features, and waybill features, the min-max standardization method is used to map their values ​​to the [0,1] interval; S402. For categorical features, one-hot encoding is used to convert them into numerical vectors, where each category corresponds to a binary bit. If the category exists, the corresponding bit is 1, otherwise it is 0. S403. For labeled features, directly convert them into binary values ​​of 0 or 1 to obtain multi-class feature vectors.

[0037] In this embodiment, the following preprocessing method is adopted for the various types of features obtained. For numerical features, the min-max normalization method is used to map their values ​​to the [0,1] interval to eliminate the influence of different magnitudes on model calculation. If the input is directly input, the model will be overly biased towards features with large magnitudes and ignore features with small magnitudes but key features. This avoids convergence oscillations caused by magnitude differences during gradient calculation and accelerates the convergence speed of model training. For categorical features, one-hot encoding is used to convert them into numerical vectors, where each category corresponds to a binary bit. If the category exists, the corresponding bit is 1, otherwise it is 0. One-hot encoding represents categories through binary vectors, which not only preserves the integrity of all category information, but also avoids model bias caused by spurious order relationships. It is especially suitable for category features without priority in logistics scenarios (such as no priority among express delivery brands A, B, and C). For labeled features, they are directly converted into binary values ​​of 0 or 1. By converting numerical, categorical, and labeled features into numerical vectors of a unified format, the problem that XGBoost gradient boosting trees cannot directly process non-numerical features is solved.

[0038] By standardizing the format of feature vectors, data noise (such as computational interference caused by differences in magnitude and semantic misunderstandings caused by category coding bias) can be reduced, enabling the model to focus on the intrinsic relationship between core features and misclassification risk, thereby improving the accuracy of misclassification risk prediction.

[0039] Please see Figure 5 The fifth embodiment of the logistics segment code management method in this invention includes: S501. Input the multi-class feature vectors into the segment code prediction model based on XGBoost gradient boosting tree, and output the total score; S502. Based on the predetermined mapping relationship between scores and probabilities, convert the total score into a misclassification probability value; S503. Based on the preset risk level classification threshold, convert the misclassification probability value into a risk level, output the segment code misclassification risk level, and obtain the misclassified waybill feedback data.

[0040] In this embodiment, after multiple feature vectors are input into the segment code prediction model based on XGBoost gradient boosting trees, they undergo the following processing: The model calls the internally stored multiple decision tree structures for calculation: starting from the first decision tree, each feature value in the feature vector is compared with the splitting threshold of the root node of the tree to determine whether the sample enters the left or right subtree, and then compared with the threshold of the next level node in turn until the leaf node is reached, and the prediction score of the leaf node is recorded; this process is repeated to traverse all decision trees, and the prediction scores output by each tree are accumulated to obtain the total score. In this process, the splitting logic of each tree is determined based on the feature importance learned in the training phase, and features that have a significant impact on segment code misclassification are given priority for node splitting.

[0041] The model's total score is converted into a misclassification probability value, based on the score-probability mapping relationship determined during the training phase. Finally, according to a preset risk level classification threshold, the probability value is mapped to a specific segment code misclassification risk level. By transforming the abstract score into a "probability of misclassification," branch staff can intuitively judge the quantifiable degree of waybill misclassification risk, which is more valuable than a simple score. For example, preset thresholds can classify probability values ​​into high, medium, and low risk levels (e.g., probability ≥ 0.8 is high risk, 0.3-0.8 is medium risk, and ≤ 0.3 is low risk), eliminating the need for branch staff to interpret complex probability values. After the segment code misclassification risk level is output to the branch staff, they will manually process waybills with high risk according to the prompts and send misclassified waybill feedback data to the system.

[0042] Please see Figure 6 The sixth embodiment of the logistics segment code management method in this invention includes: S601. Count the number of newly added misclassified waybill feedback data. When the cumulative number of newly added misclassified waybill feedback data reaches the threshold, update the model parameters. S602. Calculate the time interval since the last update. When the time interval reaches the threshold, update the model parameters. S603. The FTRL-Proximal algorithm is used to adjust the feature weights of the segment code prediction model based on the feedback data of misclassified waybills. S604. Update the preset segment code matching rule library based on the feedback data of misclassified waybills.

[0043] In this embodiment, feedback data from manually processed misclassified waybills serves as the core driver for updating the segment code prediction model and the segment code matching rule base. The feedback data for misclassified waybills includes the manually corrected corrected segment code, address supplementary information, and processing result tags. For updating the model, this embodiment sets up dual trigger conditions; meeting either one triggers the update: For example, it can be set to automatically initiate the model parameter update process when the cumulative amount of newly added valid feedback data reaches 100. By limiting the cumulative amount of feedback data, it ensures that the model update has sufficient sample support, avoids parameter adjustment deviations caused by insufficient feedback data, and reduces the risk of model overfitting. Individual feedback data may have randomness (such as special handling cases of individual sites), but after accumulating a certain amount, it can reflect general misclassification patterns.

[0044] It also sets the system to automatically initiate the model parameter update process when a full two-hour interval has elapsed since the last update. This prevents the model from becoming outdated due to a lack of sufficient feedback data over a long period, ensuring that the model can adapt to the dynamic changes in the logistics scenario in a timely manner.

[0045] During updates, the sparsity regularization property of the FTRL-Proximal algorithm dynamically adjusts the feature weights of the XGBoost model, strengthening the decision weights of high-impact features. Logistics scenarios have high feature dimensions (such as address components, waybill attributes, historical misclassification records, etc.), and some features may only be effective in specific scenarios. The sparsity regularization of FTRL-Proximal automatically suppresses the weights of low-contribution features, strengthens core features that significantly affect segment code misclassification, reduces the interference of redundant features on model decisions, and allows the model to focus on core patterns. Furthermore, the FTRL-Proximal algorithm can adjust feature weights in real time based on the latest feedback data (correct segment codes, address supplementary information) (e.g., increasing the weight of newly appearing address features like "a certain new town street"), allowing the model to quickly learn misclassification patterns in new scenarios and achieve performance iteration without full retraining.

[0046] Please see Figure 7 The seventh embodiment of the logistics segment code management method in this invention includes: S701. Based on the feedback data of misclassified waybills, count the number of times each address keyword is manually corrected, and determine whether the results of multiple consecutive manual corrections are consistent; S702. If the results of manual correction remain consistent multiple times and the number of consecutive times reaches a threshold, the mapping relationship between the manually corrected address keywords and the corresponding segment codes is marked as a high-confidence rule. S703. Update the mapping relationship between manually corrected address keywords and corresponding segment codes to the segment code matching rule base to replace the original rules.

[0047] In logistics scenarios, new address keywords (such as newly built residential areas, administrative division adjustments, and street name changes) or segment code mapping adjustments of existing addresses frequently appear. Through continuous consistency verification with manual correction, these new requirements and rules can be quickly incorporated into the system without the need for complex manual review processes, enabling the rule base to respond to address changes in real time.

[0048] In this embodiment, a confidence-based cumulative update logic is adopted for the segment code matching rule base: when the manual correction result of a certain address keyword is consistent for 5 consecutive times, the system automatically includes the mapping relationship between the keyword and the corresponding segment code into the rule base, ensuring that the mapping relationship included in the rule base is a stable and correct rule that conforms to the actual business scenario, avoiding pollution of the segment code matching rule base due to individual erroneous corrections, and thus preventing batch misclassification; at the same time, it is marked as a high-confidence rule, replacing the original conflicting rules, and this type of rule can be called first when matching segment codes.

[0049] Meanwhile, after the rule base is updated, it is synchronized to the management system of each branch in real time through the middle platform interface, ensuring that the new rules take effect within 10 minutes, realizing the real-time adaptation of segment code rules to address changes, and avoiding misclassification differences caused by inconsistent rule versions among different branches.

[0050] The logistics segment code management method in the embodiments of the present invention has been described above. The logistics segment code management device in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 8 One embodiment of the logistics segment code management device in this invention includes: Parsing module 10 is used to obtain waybill data. It uses a named entity recognition model to parse the original recipient address in the waybill data, and performs error correction and integration on the parsed address components to obtain a standardized address. Preprocessing module 20 is used to acquire historical misclassification data and extract waybill features from waybill data. It preprocesses standardized addresses, historical misclassification data and waybill features to obtain multiple feature vectors. Prediction module 30 is used to input multi-class feature vectors into the segment code prediction model based on XGBoost gradient boosting tree, output the segment code misclassification risk level, and obtain misclassified waybill feedback data. The update module 40 is used to update the segment code prediction model parameters and the preset segment code matching rule library based on the feedback data of misclassified waybills.

[0051] Please see Figure 9 One embodiment of the logistics segment code management device in this invention includes: Parsing module 10 is used to obtain waybill data. It uses a named entity recognition model to parse the original recipient address in the waybill data, and performs error correction and integration on the parsed address components to obtain a standardized address. Preprocessing module 20 is used to acquire historical misclassification data and extract waybill features from waybill data. It preprocesses standardized addresses, historical misclassification data and waybill features to obtain multiple feature vectors. Prediction module 30 is used to input multi-class feature vectors into the segment code prediction model based on XGBoost gradient boosting tree, output the segment code misclassification risk level, and obtain misclassified waybill feedback data. The update module 40 is used to update the segment code prediction model parameters and the preset segment code matching rule library based on the feedback data of misclassified waybills. In this embodiment, the parsing module 10 includes: Parsing unit 11 is used to obtain waybill data, and uses a named entity recognition model to parse the original recipient address in the waybill data and extract address components at each level. The error correction unit 12 is used to compare the address component with a logistics-specific dictionary containing multiple standard address terms using an edit distance algorithm, and to intelligently correct words with similarity below a threshold. Integration unit 13 is used to integrate the error-corrected address components according to a preset format and output a structured standardized address; In this embodiment, the preprocessing module 20 includes: Extraction submodule 21 is used to obtain historical misclassification data of the target network, extract historical misclassification features from the historical misclassification data of the target network, and extract waybill features from the waybill data; The conversion submodule 22 is used to convert the standardized address into a vector using the Word2Vec model and to mark the address containing the new region identifier to obtain address features; Preprocessing submodule 23 is used to preprocess address features, historical misclassification features, and waybill features to obtain multiple feature vectors; In this embodiment, the preprocessing submodule 23 includes: The numerical mapping unit 231 is used to map the values ​​of numerical features in address features, historical misclassification features and waybill features to the [0,1] interval using the min-max normalization method. The category conversion unit 232 is used to convert categorical features into numerical vectors using one-hot encoding, where each category corresponds to a binary bit. If the category exists, the corresponding bit is 1, otherwise it is 0. The label conversion unit 233 is used to directly convert labeled features into binary values ​​of 0 or 1 to obtain multi-class feature vectors; In this embodiment, the prediction module 30 includes: Prediction unit 31 is used to input multi-class feature vectors into the segment code prediction model based on XGBoost gradient boosting tree and output the total score; The score conversion unit 32 is used to convert the total score into a misclassification probability value according to a predetermined score-probability mapping relationship; The probability conversion unit 33 is used to convert the misclassification probability value into a risk level according to the preset risk level classification threshold, and output the segment code misclassification risk level to obtain the misclassified waybill feedback data. In this embodiment, the update module 40 includes: The first update unit 41 is used to count the number of newly added misclassified waybill feedback data. When the cumulative number of newly added misclassified waybill feedback data reaches the threshold, the model parameters are updated. The second update unit 42 is used to calculate the interval time since the last update. When the interval time reaches the threshold, the model parameters are updated. Adjustment unit 43 is used to adjust the feature weights of the segment code prediction model based on the feedback data of misclassified waybills using the FTRL-Proximal algorithm. The rule update unit 44 is used to update the preset segment code matching rule library based on the feedback data of the misclassified waybill; In this embodiment, the rule update unit 44 includes: Judgment subunit 441 is used to count the number of times each address keyword is manually corrected based on the feedback data of misclassified waybills, and to determine whether the results of multiple consecutive manual corrections are consistent. The tagging subunit 442 is used to mark the mapping relationship between the manually corrected address keywords and the corresponding segment codes as a high-confidence rule if the manual correction results are consistent multiple times and the number of consecutive times reaches a threshold. Replacement subunit 443 is used to update the mapping relationship between manually corrected address keywords and corresponding segment codes to the segment code matching rule base, so as to replace the original rules.

[0052] The logistics segment code management device of this invention performs deep analysis of the original recipient address of waybills based on a named entity recognition model, accurately extracting address components at various levels such as province, city, district, and street. Through intelligent error correction and structured integration processing, it generates standardized addresses with uniform format, standard specifications, and accurate information, laying a high-quality data foundation for subsequent analysis and processing. Secondly, it simultaneously collects historical misclassification records and full waybill data, extracting multi-dimensional waybill features. Standardized preprocessing is then applied to the standardized address, historical misclassification features, and waybill features to generate multi-dimensional feature vectors, achieving full coverage of prediction dimensions and providing comprehensive feature support for the model, thereby improving the accuracy of misclassification risk prediction. Subsequently, the aforementioned multi-dimensional feature vectors are input into an XGBoos-based system. The segment code prediction model constructed using gradient boosting trees maps the comprehensive score output by the model to the segment code misclassification risk level, facilitating branch staff to quickly identify high-risk waybills and promptly carry out targeted interventions, thereby reducing misclassification events from the source. Finally, the segment code prediction model parameters and the preset segment code matching rule base are dynamically updated using manually processed feedback data of misclassified waybills as the core driver, achieving both continuous iterative optimization of model performance and reducing the probability of segment code mismatch through dynamic updates of the rule base.

[0053] The above describes the logistics segment code management device in the embodiments of the present invention from the perspective of modular functional entities. The following describes the logistics segment code management device in the embodiments of the present invention from the perspective of hardware processing.

[0054] Figure 10 This is a schematic diagram of a logistics segment code management device 900 provided in an embodiment of the present invention. The logistics segment code 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 logistics segment code 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 logistics segment code management device 900 to implement the steps of the logistics segment code management method provided in the above-described method embodiments.

[0055] The logistics segment code 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 10 The illustrated logistics segment code management device structure does not constitute a limitation on the logistics segment code management device. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0056] 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 the logistics segment code management method.

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

[0058] 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.

[0059] It is understood that those skilled in the art can make equivalent substitutions or modifications to the technical solution and inventive concept of the present invention, and all such substitutions or modifications should fall within the protection scope of the appended claims.

Claims

1. A logistics section code management method characterized by, The method comprises the following steps: obtaining waybill data, using a named entity recognition model to analyze the original recipient address in the waybill data, correcting and integrating the address components obtained by analysis to obtain a standardized address; obtaining historical misclassification data, and extracting waybill features from the waybill data, preprocessing the standardized address, the historical misclassification data and the waybill features to obtain a multi-class feature vector; inputting the multi-class feature vector into a segment code prediction model based on XGBoost gradient boosting tree, outputting a segment code misclassification risk level to obtain misclassified waybill feedback data; updating the segment code prediction model parameters and the preset segment code matching rule library according to the misclassified waybill feedback data.

2. The logistics section code management method according to claim 1, characterized by, The method comprises the following steps: obtaining waybill data, using a named entity recognition model to analyze the original recipient address in the waybill data, extracting address components at each level; using an edit distance algorithm to compare the address components with a logistics-specific dictionary containing multiple standard address words, and intelligently correcting words with a similarity lower than a threshold value; integrating the corrected address components according to a preset format and outputting a structured standardized address.

3. The logistics section code management method according to claim 1, characterized by, The method comprises the following steps: obtaining target network point historical misclassification data, obtaining historical misclassification features from the target network point historical misclassification data, and extracting waybill features from the waybill data; converting the standardized address into a vector using a Word2Vec model and marking addresses containing new region identifiers to obtain address features; preprocessing the address features, the historical misclassification features and the waybill features to obtain a multi-class feature vector.

4. The logistics section code management method according to claim 3, characterized by, The method comprises the following steps: for numerical features in the address features, the historical misclassification features and the waybill features, using a min-max normalization method to map their values to the [0, 1] interval; for categorical features, using one-hot encoding to convert them into numerical vectors, where each category corresponds to a binary bit, and the presence of the category corresponds to a bit of 1, otherwise 0; for labeled features, directly converting them into binary values of 0 or 1 to obtain a multi-class feature vector.

5. The logistics section code management method according to claim 1, characterized by, The method comprises the following steps: inputting the multi-class feature vector into a segment code prediction model based on XGBoost gradient boosting tree, outputting a total score; converting the total score into a misclassification probability value according to a predetermined score-probability mapping relationship; converting the misclassification probability value into a risk level according to a preset risk level division threshold, outputting a segment code misclassification risk level to obtain misclassified waybill feedback data.

6. The logistics section code management method according to claim 1, characterized by, The updating the segment code prediction model parameters and the preset segment code matching rule library according to the mis-sorting consignment note feedback data specifically comprises: The number of newly added mis-sorting consignment note feedback data is counted, and when the cumulative number of newly added mis-sorting consignment note feedback data reaches a threshold, the model parameters are updated; The interval time length since the last update is calculated, and when the interval time length reaches a threshold, the model parameters are updated; The FTRL-Proximal algorithm is used to adjust the feature weights of the segment code prediction model according to the mis-sorting consignment note feedback data; The preset segment code matching rule library is updated according to the mis-sorting consignment note feedback data.

7. The logistics section code management method according to claim 6, characterized by, The updating the segment code matching rule library according to the mis-sorting consignment note feedback data specifically comprises: The number of newly added mis-sorting consignment note feedback data is counted, and when the cumulative number of newly added mis-sorting consignment note feedback data reaches a threshold, the model parameters are updated; The interval time length since the last update is calculated, and when the interval time length reaches a threshold, the model parameters are updated; The FTRL-Proximal algorithm is used to adjust the feature weights of the segment code prediction model according to the mis-sorting consignment note feedback data; 8. A logistics section code management apparatus characterized by comprising: The preset segment code matching rule library is updated according to the mis-sorting consignment note feedback data. Comprise: The parsing module is used to obtain consignment note data, and a named entity recognition model is used to parse the original delivery address in the consignment note data, and the address components obtained by parsing are corrected and integrated to obtain a standardized address; The preprocessing module is used to obtain historical mis-sorting data, and extract consignment note features from the consignment note data, and pre-process the standardized address, historical mis-sorting data and consignment note features to obtain multi-class feature vectors; The prediction module is used to input the multi-class feature vectors into a segment code prediction model based on XGBoost gradient boosting tree, and output a segment code mis-sorting risk level to obtain mis-sorting consignment note feedback data; 9. A logistics section code management apparatus characterized by comprising: The updating module is used to update the segment code prediction model parameters and the preset segment code matching rule library according to the mis-sorting consignment note feedback data. Comprise a memory and at least one processor, the memory has computer readable instructions stored therein; 10. A computer-readable storage medium having stored thereon computer-readable instructions, wherein, The at least one processor invokes the computer readable instructions in the memory to perform the steps of the logistics segment code management method of any one of claims 1-7. The computer readable instructions are executed by the processor to implement the steps of the logistics segment code management method of any one of claims 1-7.