Address resolution and label generation method and device, equipment and storage medium

By building an NLP model and setting a dynamic response timeout threshold, combined with preprocessing and keyword library matching, the semantic ambiguity and resource waste problems of recipient address resolution in the logistics system are solved, and efficient and low-cost address resolution and label generation are achieved.

CN120706408APending Publication Date: 2025-09-26SHANGHAI DONGPU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510771008.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing logistics system, the parsing of recipient addresses relies on keyword matching technology, which has problems such as semantic ambiguity, static rule limitations, and excessively high computing resources and costs. There is a lack of efficient and dynamic solutions that combine semantic understanding.

Method used

Build an NLP model and set a dynamic update response timeout threshold. Reduce invalid data through preprocessing and keyword library matching. Call the NLP model and generate labels only when the match is successful.

Benefits of technology

It improves the accuracy of recipient address parsing, reduces the use of computing resources, optimizes the processing flow, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706408A_ABST
    Figure CN120706408A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of logistics data processing, in particular to an address resolution and label generation method and device, equipment and a storage medium. The address resolution and label generation method comprises the following steps: constructing an NLP model, and dynamically updating a response timeout threshold value for an interface of the NLP model; obtaining order data, and preprocessing the order data to obtain preprocessed data; receiving information in the preprocessed data is matched with a keyword library, and a matching result is obtained; and if the matching result is successful, inputting the successfully matched receiving information into the NLP model to obtain an analysis result, and generating a label according to the analysis result. According to the method, a large model is called only when necessary through a keyword triggering mechanism, and compared with full-amount calling, resource consumption is reduced by 90% or above. And meanwhile, setting an overtime threshold value for the large model interface, and automatically switching to the original process after overtime. In addition, data source adaptation is added, and data integrity and processing efficiency are guaranteed by filtering non-target order sources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of logistics data processing technology, and in particular to an address resolution and label generation method, device, equipment and storage medium. Background Art

[0002] In existing logistics systems, parsing of delivery addresses usually relies on keyword matching technology, that is, extracting keywords (such as "home delivery" and "collection point") through predefined rules or regular expressions, and directly generating labels based on the keywords. However, this method has the following defects: First, there is semantic ambiguity: when there are reverse meanings or complex expressions in the address text ("Do not deliver to the door"), traditional keyword matching is prone to misjudgment; second, there are limitations of static rules: it cannot adapt to the emerging forms of user demand expression, and the rule base needs to be updated frequently; third, there is a contradiction between cost and efficiency: if a large model is fully called to parse the address, although the accuracy can be improved, the computing resources and cost costs are too high. In response to the above problems, the existing technology has not yet proposed an efficient solution that can control costs and dynamically combine semantic understanding. Summary of the Invention

[0003] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide an address resolution and label generation method, apparatus, device and storage medium, aiming to improve the accuracy of recipient address resolution and reduce the computing resources occupied by large models.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] A first aspect of the present invention provides an address resolution and label generation method, comprising the following steps: constructing an NLP model, dynamically updating a response timeout threshold for an interface of the NLP model; obtaining order data, preprocessing the order data, and obtaining preprocessed data; matching the recipient information in the preprocessed data with a keyword library to obtain a matching result; if the matching result is successful, inputting the successfully matched recipient information into the NLP model to obtain an analysis result, and generating a label based on the analysis result.

[0006] Optionally, in a first implementation method of the first aspect of the present invention, the constructing of the NLP model is to dynamically update the response timeout threshold of the interface of the NLP model, specifically including: obtaining historical order data as training data, the historical order data including the delivery address, the corresponding user intention label and the relevant business scenario description; standardizing the training data and inputting them into multiple pre-trained basic models respectively to adjust the pre-trained basic models to obtain multiple optimization models; integrating multiple optimization models to obtain an NLP model that calculates the analysis results based on the output results of multiple optimization models.

[0007] Optionally, in a second implementation of the first aspect of the present invention, the obtaining of order data, preprocessing of the order data, and obtaining of preprocessed data specifically include: obtaining order data, filtering the order data according to a pre-built order source whitelist or blacklist, and obtaining filtered data; verifying the filtered data, and repairing or discarding the data that fails the verification; and formatting the verified data to obtain preprocessed data.

[0008] Optionally, in a third implementation of the first aspect of the present invention, the matching of the receiving information in the preprocessed data with the keyword library to obtain a matching result specifically includes: constructing a keyword library, continuously updating the keyword library using a dynamic update mechanism, and matching the receiving information in the preprocessed data with the keyword library using a regular expression to obtain a first matching result; if the first matching result is unsuccessful, calculating the string similarity between the receiving information in the preprocessed data and the keywords in the keyword library using an edit distance algorithm; determining whether the character similarity exceeds a preset similarity threshold to obtain a second matching result; if the character similarity is greater than or equal to the preset similarity threshold, the second matching result is a successful match.

[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the keyword library is constructed, a dynamic update mechanism is used to continuously update the keyword library, and a regular expression is used to match the receiving information in the preprocessed data with the keyword library to obtain a first matching result, specifically including: constructing a traditional Chinese keyword library and a simplified Chinese keyword library, and dynamically updating the traditional Chinese keyword library and the simplified Chinese keyword library according to newly acquired business feedback and newly emerging address intent types; using a simplified and traditional font conversion algorithm to convert the receiving information in the preprocessed data into simplified and traditional to obtain font conversion data; using a regular expression to match the font conversion data with the traditional Chinese keyword library or the simplified Chinese keyword library to obtain a first matching result.

[0010] Optionally, in a fifth implementation of the first aspect of the present invention, if the matching result is successful, the successfully matched recipient information is input into the NLP model to obtain an analysis result, and a label is generated based on the analysis result, specifically including: if the matching result is successful, the successfully matched recipient information is standardized to obtain standardized data, the standardized data is divided into blocks to obtain multiple address fragments; the multiple address fragments are respectively input into the NLP model to obtain multiple output results; the multiple output results are integrated to obtain an analysis result, and a label is generated based on the analysis result.

[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the integration of multiple output results to obtain analysis results and the generation of labels based on the analysis results specifically include: integrating multiple output results using a voting mechanism or a weighted average method to obtain analysis results; establishing label generation rules, and generating labels based on the label generation rules and the analysis results; if the analysis result shows an abnormality, taking the matching result as the final result, and generating a label based on the final result.

[0012] The second aspect of the present invention provides an address resolution and label generation device, including: a construction module for constructing an NLP model and dynamically updating the response timeout threshold for the interface of the NLP model; a preprocessing module for acquiring order data, preprocessing the order data, and obtaining preprocessed data; a matching module for matching the receiving information in the preprocessed data with a keyword library to obtain a matching result; and a generation module for inputting the successfully matched receiving information into the NLP model if the matching result is successful, obtaining an analysis result, and generating a label based on the analysis result.

[0013] Optionally, in a first implementation method of the second aspect of the present invention, the construction module includes: an acquisition unit, used to acquire historical order data as training data, the historical order data including the delivery address, the corresponding user intention label and the relevant business scenario description; an adjustment unit, used to standardize the training data and input it into multiple pre-trained basic models respectively to adjust the pre-trained basic models to obtain multiple optimization models; an integration unit, used to integrate multiple optimization models to obtain an NLP model that calculates the analysis results based on the output results of multiple optimization models.

[0014] Optionally, in a second implementation of the second aspect of the present invention, the preprocessing module includes: a filtering unit, used to obtain order data, filter the order data according to a pre-built order source whitelist or blacklist, and obtain filtered data; a verification unit, used to verify the filtered data, and repair or discard the data that fails the verification; and a format conversion unit, used to convert the format of the verified data to obtain preprocessed data.

[0015] Optionally, in a third implementation of the second aspect of the present invention, the matching module includes: a first matching unit, used to construct a keyword library, adopt a dynamic update mechanism to continuously update the keyword library, and adopt a regular expression to match the receiving information in the preprocessed data with the keyword library to obtain a first matching result; a second matching unit, used to adopt an edit distance algorithm to calculate the string similarity between the receiving information in the preprocessed data and the keywords in the keyword library if the first matching result is unsuccessful; a judgment unit, used to judge whether the character similarity exceeds a preset similarity threshold to obtain a second matching result; if the character similarity is greater than or equal to the preset similarity threshold, the second matching result is a successful match.

[0016] Optionally, in a fourth implementation of the second aspect of the present invention, the first matching unit includes: an updating subunit, used to construct a traditional Chinese keyword library and a simplified Chinese keyword library, and dynamically update the traditional Chinese keyword library and the simplified Chinese keyword library according to newly acquired business feedback and newly emerging address intent types; a conversion subunit, used to use a traditional and simplified Chinese font conversion algorithm to convert the receiving information in the preprocessed data into traditional and simplified Chinese to obtain font conversion data; a matching subunit, used to use a regular expression to match the font conversion data with the traditional Chinese keyword library or the simplified Chinese keyword library to obtain a first matching result.

[0017] Optionally, in a fifth implementation of the second aspect of the present invention, the generation module includes: a processing unit, which is used to standardize the successfully matched recipient information if the matching result is successful, obtain standardized data, and block the standardized data to obtain multiple address fragments; an input unit, which is used to input the multiple address fragments into the NLP model respectively to obtain multiple output results; and an analysis unit, which is used to integrate the multiple output results to obtain analysis results and generate labels based on the analysis results.

[0018] Optionally, in a sixth implementation of the second aspect of the present invention, the analysis unit includes: a calculation subunit, used to integrate multiple output results using a voting mechanism or a weighted average method to obtain an analysis result; a generation subunit, used to establish a label generation rule, and generate a label according to the label generation rule and the analysis result; an exception handling subunit, used to take the matching result as the final result if the analysis result shows an exception, and generate a label according to the final result.

[0019] A third aspect of the present invention provides an address resolution and label generation device, comprising a memory and at least one processor, wherein the memory stores computer-readable instructions; the at least one processor calls the computer-readable instructions in the memory to execute the various steps of the address resolution and label generation method as described above.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the various steps of the above-mentioned address resolution and label generation method.

[0021] Beneficial effect: The present invention provides an address resolution and label generation method, which first constructs an NLP model and dynamically updates the response timeout threshold for the interface of the NLP model to avoid long-term invalid calls of the large model and consumption of resources; then obtains order data, preprocesses the order data, removes invalid data and improves data quality to obtain preprocessed data; then matches the receipt information in the preprocessed data with the keyword library to obtain a matching result, and then decides whether to call the NLP model based on the matching result, avoiding full calls and greatly reducing the use of computing resources; if the matching result is successful, the successfully matched receipt information is input into the NLP model to obtain an analysis result, and a label is generated based on the analysis result. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A first flow chart of the address resolution and label generation method provided by an embodiment of the present invention;

[0023] Figure 2 A second flow chart of the address resolution and label generation method provided by an embodiment of the present invention;

[0024] Figure 3 A third flow chart of the address resolution and label generation method provided by an embodiment of the present invention;

[0025] Figure 4 A fourth flow chart of the address resolution and label generation method provided by an embodiment of the present invention;

[0026] Figure 5 A fifth flow chart of the address resolution and label generation method provided by an embodiment of the present invention;

[0027] Figure 6 A sixth flow chart of the address resolution and label generation method provided by an embodiment of the present invention;

[0028] Figure 7 A seventh flow chart of the address resolution and label generation method provided by an embodiment of the present invention;

[0029] Figure 8 A schematic diagram of the structure of an address resolution and label generation device provided by an embodiment of the present invention;

[0030] Figure 9 Another structural diagram of the address resolution and label generation device provided by an embodiment of the present invention;

[0031] Figure 10 A schematic diagram of the structure of an address resolution and label generation device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The present invention provides an address resolution and label generation method, apparatus, device, and storage medium. This method first constructs an NLP model and dynamically updates its interface response timeout threshold to prevent long-term invalid calls to the large model, which wastes resources. The method then preprocesses the acquired order data, removing invalid data to improve data quality. The recipient information in the preprocessed data is then matched with a keyword library, and the matching result determines whether to call the NLP model, avoiding full calls and effectively conserving computing resources. If a match is successful, the corresponding recipient information is then input into the NLP model to obtain analysis results and generate labels, achieving optimized resource utilization and an efficient processing flow.

[0033] The terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.

[0034] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the address resolution and label generation method in the embodiment of the present invention includes:

[0035] S101. Build an NLP model and dynamically update the response timeout threshold for the NLP model interface;

[0036] S102. Obtain order data, preprocess the order data, and obtain preprocessed data;

[0037] S103. Match the recipient information in the preprocessed data with the keyword library to obtain a matching result;

[0038] S104. If the matching result is successful, the matching recipient information is input into the NLP model to obtain the analysis result, and a label is generated based on the analysis result.

[0039] Natural language processing (NLP) models are computer models designed to understand and process human language. They are trained using large amounts of text data, using this data to learn language patterns, structure, and semantic information. They can understand the meaning of words and sentences in specific contexts, as well as the logical relationships between different statements. By training with logistics data, they can also accurately understand the textual logic of received messages.

[0040] In this embodiment, to prevent invalid NLP model calls from consuming computing resources for a long time, a response timeout threshold is set after the NLP model is built. This response timeout threshold is set based on the average response time of the large model interface and business requirements. For example, if the average response time of the large model interface is 2 seconds under normal circumstances, the timeout threshold can be set to 5 seconds to account for factors such as network fluctuations.

[0041] Preferably, the response timeout threshold can be dynamically adjusted according to the actual operation situation. Specifically, the response time distribution of the large model (NLP model) interface can be obtained, and then an adaptive algorithm (weighted average algorithm based on historical data) can be used to calculate and update the appropriate timeout threshold.

[0042] During the order data acquisition stage, the order data also needs to be preprocessed to reduce the occupation of computing resources by invalid data, thereby improving the overall response time and reducing the waste of computing resources.

[0043] The preprocessed data includes recipient information (such as the recipient address). When calling the NLP model for analysis, this embodiment first uses the keyword library and the recipient information for preliminary filtering, and only triggers the NLP model call when the match is successful, thereby avoiding full calculation, saving computing resources, and improving response speed.

[0044] Once a match is successful, the NLP model is called. If the call time exceeds the preset response timeout threshold, a rollback mechanism is triggered, automatically switching to the original process. During the switching process, data integrity and consistency are guaranteed, and relevant timeout information, including the timeout period and input address, is recorded.

[0045] After the large model is successfully invoked, the recipient information is fed into the NLP model. Using its powerful semantic understanding capabilities, the NLP model analyzes the input address and outputs the analysis results. Based on these results, a user intent tag is generated. For example, the NLP model outputs the result "Call before delivery" and, based on this result, a "Phone call before delivery" tag is generated.

[0046] See also Figure 2 The second embodiment of the address resolution and label generation method in the embodiment of the present invention includes:

[0047] S201. Obtain historical order data as training data, wherein the historical order data includes a delivery address, a corresponding user intent label, and a description of a related business scenario;

[0048] S202. The training data is standardized and respectively input into a plurality of pre-trained basic models to adjust the pre-trained basic models to obtain a plurality of optimized models;

[0049] S203. Integrate multiple optimization models to obtain an NLP model that calculates analysis results based on output results of the multiple optimization models.

[0050] In this example, a suitable pre-trained NLP model, such as BERT or the GPT series, is selected as the base model and fine-tuned based on a large amount of address-related corpus. This address-related corpus can be obtained in large quantities from historical order data and used as training data. Historical order data not only includes the delivery address, but also the corresponding user intent labels and relevant business scenario descriptions, making it an excellent data source for model fine-tuning training.

[0051] Before inputting the training data into the model, the complete address data used to match keywords needs to be standardized, such as removing special characters, unifying the address format (unifying different street name abbreviations into a standard form), converting to lowercase letters, etc.

[0052] In order to improve the accuracy of the final model's intent recognition, this embodiment further adopts an integrated learning method to first train multiple different optimization models, and then fuse the output results of multiple different optimization models to obtain a final NLP model.

[0053] Specifically, different optimization models can be obtained by selecting different base models for training, or by training with different data sets, thereby obtaining optimization models with different performances. Different models can also be obtained by adjusting model parameters.

[0054] See also Figure 3 The third embodiment of the address resolution and label generation method in the embodiment of the present invention includes:

[0055] S301. Obtain order data, filter the order data according to the pre-built order source whitelist or blacklist, and obtain filtered data;

[0056] S302. Verify the filtered data and repair or discard the data that fails the verification;

[0057] S303. Perform format conversion on the verified data to obtain pre-processed data.

[0058] In this embodiment, the acquired order data is first filtered to remove data that does not require analysis, thereby avoiding the need to call the full model. The filtering mechanism can utilize a whitelist or blacklist of order sources. Order data that falls on the whitelist undergoes further verification and format conversion before finally calling the model for analysis. If a blacklist is used, only order data on the blacklist is filtered.

[0059] The filtered order data is further validated, including format and field integrity checks. Any data that doesn't meet the requirements is discarded or repaired. A data backup and recovery mechanism is also established, with regular order data backups to prevent data loss.

[0060] After the verification is completed, the data format is converted so that the order data is converted into a format that conforms to the input model to avoid analysis errors caused by format inconsistency.

[0061] See also Figure 4 The fourth embodiment of the address resolution and label generation method in the embodiment of the present invention includes:

[0062] S401 builds a keyword library, uses a dynamic update mechanism to continuously update the keyword library, uses regular expressions, matches the recipient information in the preprocessed data with the keyword library, and obtains a first matching result;

[0063] S402. If the first matching result is unsuccessful, the edit distance algorithm is used to calculate the string similarity between the recipient information in the preprocessed data and the keyword in the keyword library;

[0064] S403. Determine whether the character similarity exceeds a preset similarity threshold, and obtain a second matching result. If the character similarity is greater than or equal to the preset similarity threshold, the second matching result is a successful match.

[0065] In this embodiment, after the keyword library is constructed, by continuously updating the keyword library, it can be effectively ensured that the content of the keyword library can keep up with the development of the times. In addition to some common terms, some substitute words and trendy terms will continue to appear with the development of language and culture. By continuously updating the keyword library, it can be ensured that newly emerging synonyms can also be matched successfully.

[0066] When matching, first use regular expressions to match the recipient information with the keyword library. Regular expressions are suitable for quickly matching some keywords with fixed structures and obvious characteristics (such as the self-pickup cabinet address containing a specific format number).

[0067] If regular expression matching fails, the edit distance algorithm is used for further matching. For keywords with similar meanings but slightly different wordings (such as "call for delivery" and "call before delivery"), the edit distance algorithm calculates the string similarity and then compares it with a pre-set similarity threshold to determine whether a match is successful.

[0068] When the recipient address successfully matches the keyword pre-filtering phase, the large model is called. To avoid false triggers, a secondary confirmation mechanism can be set up, such as manually checking some of the content of the matching address, or using other auxiliary rules (such as the number of matching keywords and the position of keywords in the address) to further verify whether the large model is really needed.

[0069] See also Figure 5 The fifth embodiment of the address resolution and label generation method in the embodiment of the present invention includes:

[0070] S501 builds a traditional Chinese keyword library and a simplified Chinese keyword library, and dynamically updates the traditional Chinese keyword library and the simplified Chinese keyword library based on newly acquired business feedback and emerging address intent types;

[0071] S502 uses a simplified and traditional font conversion algorithm to convert the recipient information in the preprocessed data into simplified and traditional fonts to obtain font conversion data;

[0072] S503. Use regular expressions to match the font conversion data with the traditional Chinese keyword library or the simplified Chinese keyword library to obtain a first matching result.

[0073] In areas where Chinese is spoken, simplified and traditional Chinese characters often appear simultaneously. Conventional keyword libraries can only recognize one font, making the other font ineffective for matching. To avoid this problem, this embodiment constructs both a traditional and a simplified Chinese keyword library, effectively handling situations where simplified and traditional Chinese characters appear simultaneously.

[0074] After the construction is completed, it is necessary to continuously obtain business feedback and newly emerging address intent types, so as to dynamically update the traditional Chinese keyword library and the simplified Chinese keyword library to ensure that the keyword library is not outdated.

[0075] When performing conversion between traditional and simplified Chinese, mature conversion algorithms (such as dictionary-based algorithms) can be used to achieve bidirectional conversion between traditional and simplified Chinese. Specifically, addresses are converted between traditional and simplified Chinese during data input and output to ensure the system can correctly handle addresses in different fonts. Furthermore, the conversion process is quality-monitored, with regular checks on conversion accuracy and timely correction of conversion errors.

[0076] See also Figure 6 The sixth embodiment of the address resolution and label generation method in the embodiment of the present invention includes:

[0077] S601. If the matching result is successful, the matching recipient information is standardized to obtain standardized data, and the standardized data is divided into blocks to obtain multiple address fragments;

[0078] S602. Input multiple address fragments into the NLP model respectively to obtain multiple output results;

[0079] S603. Integrate multiple output results to obtain analysis results, and generate labels based on the analysis results.

[0080] In this embodiment, standardization processing includes removing special characters, unifying address formats (unifying different street name abbreviations into a standard form), converting to lowercase letters, etc. To improve the processing efficiency of the model, this embodiment also performs block processing on the address data, dividing long addresses into multiple shorter segments. The block-processed address segments can be easily processed in parallel. In addition, the computational complexity of short segments is relatively low, and the model can complete the processing of each segment at a faster speed. Multiple segments can be input into different parts of the model simultaneously or processed on multiple computing units. This can fully utilize computing resources and further improve processing speed. After block processing, the model can first extract local information from each short segment. By integrating the processing results of each segment, the global address information can be comprehensively considered. This processing method can capture local features in the address (such as detailed information on a certain street segment) while also grasping the complete semantics of the address as a whole.

[0081] See also Figure 7 The seventh embodiment of the address resolution and label generation method in the embodiment of the present invention includes:

[0082] S701. Integrate multiple output results using a voting mechanism or weighted average to obtain analysis results;

[0083] S702. Establish label generation rules, and generate labels based on the label generation rules and analysis results;

[0084] S703. If the analysis result shows an abnormality, the matching result is taken as the final result, and a label is generated based on the final result.

[0085] Specifically, if a voting mechanism is used to integrate multiple output results, the following method is used: if multiple models output analysis results separately, the analysis result with the most results is used as the final result. If a weighted average method is used to integrate multiple output results, each model is weighted to obtain a comprehensive score, and the result with the highest score is used as the final analysis result.

[0086] The voting mechanism can integrate the opinions of multiple models, avoiding the bias or errors that may exist in a single model. The weighted average method can fully utilize the advantages of different models, giving higher weight to important and more accurate models, making the combined analysis results more accurate.

[0087] After obtaining the analysis results, the system generates tags according to pre-set rules. For example, if the large model returns "Call before delivery," the tag "Phone contact required before delivery" is generated; if it returns "Pickup locker," the tag "Pickup locker" is generated. For more complex intent results, the tag content can be further refined. For example, if the large model returns "Delivery within a specific time period," the system combines the time information in the address and generates a tag that includes the specific time period, such as "Delivery between 18:00 and 20:00 on weekdays."

[0088] Exception handling: When the large model returns "Other" or an exception occurs, the system reverts to the original keyword matching result. The system also records the exception, including the time of the exception, input address, and error message returned by the large model, for subsequent analysis and optimization. Frequent exceptions can automatically trigger model retraining or keyword library adjustments.

[0089] The above describes the address resolution and label generation method in the embodiment of the present invention. The following describes the address resolution and label generation device in the embodiment of the present invention. Figure 8 In one embodiment of the present invention, an apparatus for address resolution and label generation includes:

[0090] A construction module 10 is used to build an NLP model and dynamically update a response timeout threshold for an interface of the NLP model;

[0091] The preprocessing module 20 is used to obtain order data, preprocess the order data, and obtain preprocessed data;

[0092] A matching module 30 is used to match the recipient information in the pre-processed data with the keyword library to obtain a matching result;

[0093] The generation module 40 is used to input the successfully matched recipient information into the NLP model if the matching result is successful, obtain the analysis result, and generate a label according to the analysis result.

[0094] See also Figure 9 In one embodiment of the present invention, an apparatus for address resolution and label generation includes:

[0095] A construction module 10 is used to build an NLP model and dynamically update a response timeout threshold for an interface of the NLP model;

[0096] The preprocessing module 20 is used to obtain order data, preprocess the order data, and obtain preprocessed data;

[0097] A matching module 30 is used to match the recipient information in the pre-processed data with the keyword library to obtain a matching result;

[0098] A generation module 40 is configured to input the matching receipt information into the NLP model if the matching result is successful, obtain an analysis result, and generate a label based on the analysis result;

[0099] In this embodiment, the building block 10 includes:

[0100] An acquisition unit 11 is configured to acquire historical order data as training data, wherein the historical order data includes a delivery address, a corresponding user intent label, and a related business scenario description;

[0101] An adjustment unit 12 is used to standardize the training data and input the data into a plurality of pre-trained basic models to adjust the pre-trained basic models to obtain a plurality of optimized models;

[0102] Integration unit 13, used to integrate multiple optimization models to obtain an NLP model that calculates analysis results based on the output results of multiple optimization models

[0103] In this embodiment, the pre-processing module 20 includes:

[0104] The filtering unit 21 is used to obtain order data and filter the order data according to a pre-built whitelist or blacklist of order sources to obtain filtered data;

[0105] A verification unit 22 is used to verify the filtered data and repair or discard the data that fails the verification;

[0106] The format conversion unit 23 is used to convert the format of the verified data to obtain pre-processed data;

[0107] In this embodiment, the matching module 30 includes:

[0108] A first matching unit 31 is configured to construct a keyword library, continuously update the keyword library using a dynamic update mechanism, and match the recipient information in the pre-processed data with the keyword library using a regular expression to obtain a first matching result;

[0109] The second matching unit 32 is configured to calculate the string similarity between the recipient information in the pre-processed data and the keywords in the keyword library using an edit distance algorithm if the first matching result is unsuccessful;

[0110] The judging unit 33 is used to judge whether the character similarity exceeds a preset similarity threshold, and obtain a second matching result. If the character similarity is greater than or equal to the preset similarity threshold, the second matching result is a successful match;

[0111] In this embodiment, the first matching unit 31 includes:

[0112] An updating subunit 311 is used to construct a traditional Chinese keyword library and a simplified Chinese keyword library, and dynamically update the traditional Chinese keyword library and the simplified Chinese keyword library according to newly acquired business feedback and newly emerged address intent types;

[0113] The conversion subunit 312 is configured to convert the received information in the pre-processed data into traditional and simplified Chinese using a traditional and simplified Chinese font conversion algorithm to obtain font conversion data;

[0114] A matching subunit 313 is configured to match the font conversion data with a traditional Chinese keyword library or a simplified Chinese keyword library using a regular expression to obtain a first matching result;

[0115] In this embodiment, the generating module 40 includes:

[0116] The processing unit 41 is configured to, if the matching result is successful, normalize the matching recipient information to obtain normalized data, and divide the normalized data into blocks to obtain multiple address segments;

[0117] An input unit 42, configured to input multiple address segments into the NLP model to obtain multiple output results;

[0118] An analysis unit 43 is configured to integrate the multiple output results to obtain analysis results and generate labels based on the analysis results;

[0119] In this embodiment, the analysis unit 43 includes:

[0120] The calculation subunit 431 is used to integrate multiple output results using a voting mechanism or a weighted average method to obtain an analysis result;

[0121] A generation subunit 432 is used to establish a label generation rule and generate a label according to the label generation rule and the analysis result;

[0122] The exception handling subunit 433 is used to, if the analysis result shows an exception, take the matching result as the final result and generate a label according to the final result.

[0123] The address resolution and label generation device of the present invention first constructs an NLP model and dynamically adjusts its interface response timeout threshold to prevent the large model from wasting resources due to long-term meaningless calls. Then, by preprocessing the collected order data, useless data is eliminated, thereby improving the data quality. Subsequently, the receiving information contained in the preprocessed data is matched with the keyword library, and the matching results are used to determine whether to call the NLP model, thereby avoiding calling it in full and cleverly saving computing resources. If the match is successful, the corresponding receiving information is input into the NLP model, and a label is generated after obtaining the analysis results, thereby achieving the goal of optimizing resource allocation and efficiently processing the entire process.

[0124] The above is a detailed description of the address resolution and label generation device in the embodiment of the present invention from the perspective of modular functional entities. The following is a detailed description of the address resolution and label generation device in the embodiment of the present invention from the perspective of hardware processing.

[0125] Figure 10 A schematic structural diagram of an address resolution and label generation device provided in an embodiment of the present invention, wherein the address resolution and label generation device 900 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 910 (for example, one or more processors) and a memory 920, and one or more storage media 930 (for example, one or more mass storage devices) storing application programs 933 or data 932. Among them, the memory 920 and the storage medium 930 may be temporary storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the address resolution and label generation device 900. Furthermore, the processor 910 may be configured to communicate with the storage medium 930, and execute a series of instruction operations in the storage medium 930 on the address resolution and label generation device 900 to implement the steps of the address resolution and label generation method provided in the above-mentioned method embodiments.

[0126] The address resolution and label generation device 900 may further include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input and output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 10 The structure of the address resolution and label generation device shown does not constitute a limitation to the address resolution and label generation device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0127] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, cause the computer to execute the steps of the address resolution and label generation method.

[0128] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the above-described equipment or device can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0129] If the integrated unit is implemented in the form of 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 is essentially 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. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program code.

[0130] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and inventive concept of the present invention, and all these changes or substitutions should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for address resolution and label generation, characterized in that: The steps include: Build an NLP model and dynamically update the response timeout threshold for the NLP model interface; Obtain order data, preprocess the order data, and obtain preprocessed data; Match the recipient information in the pre-processed data with the keyword library to obtain matching results; If the matching result is successful, the matching recipient information is input into the NLP model to obtain the analysis result, and a label is generated based on the analysis result.

2. The address resolution and label generation method according to claim 1, wherein: The NLP model is constructed to dynamically update the response timeout threshold for the NLP model interface, specifically including: Obtain historical order data as training data, wherein the historical order data includes the delivery address, the corresponding user intent label, and the relevant business scenario description; The training data is standardized and input into multiple pre-trained basic models respectively to adjust the pre-trained basic models and obtain multiple optimized models; Integrate multiple optimization models to obtain an NLP model that calculates analysis results based on the output results of the multiple optimization models.

3. The address resolution and label generation method according to claim 1, wherein: The obtaining of order data and preprocessing of the order data to obtain preprocessed data specifically includes: Obtain order data, filter the order data based on a pre-built whitelist or blacklist of order sources, and obtain filtered data; Verify the filtered data and repair or discard the data that fails the verification; Perform format conversion on the verified data to obtain preprocessed data.

4. The address resolution and label generation method according to claim 1, wherein: The matching of the receiving information in the pre-processed data with the keyword library to obtain a matching result specifically includes: Build a keyword library, use a dynamic update mechanism to continuously update the keyword library, use regular expressions to match the recipient information in the pre-processed data with the keyword library to obtain the first matching result; If the first matching result is unsuccessful, the edit distance algorithm is used to calculate the string similarity between the recipient information in the pre-processed data and the keywords in the keyword library; It is determined whether the character similarity exceeds a preset similarity threshold to obtain a second matching result. If the character similarity is greater than or equal to the preset similarity threshold, the second matching result is a successful match.

5. The address resolution and label generation method according to claim 4, characterized in that: The method of constructing a keyword library, continuously updating the keyword library using a dynamic update mechanism, and matching the received information in the pre-processed data with the keyword library using a regular expression to obtain a first matching result specifically includes: Build a traditional Chinese keyword library and a simplified Chinese keyword library, and dynamically update them based on newly acquired business feedback and emerging address intent types; Using a simplified and traditional font conversion algorithm, the receiving information in the pre-processed data is converted into simplified and traditional fonts to obtain font conversion data; The font conversion data is matched with the traditional Chinese keyword library or the simplified Chinese keyword library using a regular expression to obtain a first matching result.

6. The address resolution and label generation method according to claim 1, wherein: If the matching result is successful, the matching recipient information is input into the NLP model to obtain the analysis result, and a label is generated based on the analysis result, specifically including: If the matching result is successful, the matching recipient information is normalized to obtain normalized data, and the normalized data is divided into blocks to obtain multiple address fragments; Input multiple address fragments into the NLP model separately to obtain multiple output results; Integrate multiple output results to obtain analysis results, and generate labels based on the analysis results.

7. The address resolution and label generation method according to claim 6, wherein: The integration of multiple output results to obtain analysis results and the generation of labels based on the analysis results specifically include: Use voting mechanism or weighted average method to integrate multiple output results to obtain analysis results; Establish label generation rules and generate labels based on the label generation rules and analysis results; If the analysis result shows an abnormality, the matching result is taken as the final result, and a label is generated based on the final result.

8. An address resolution and label generation device, characterized in that: include: A construction module is used to build an NLP model and dynamically update the response timeout threshold for the NLP model interface; A preprocessing module is used to obtain order data, preprocess the order data, and obtain preprocessed data; The matching module is used to match the receiving information in the pre-processed data with the keyword library to obtain matching results; The generation module is used to input the matching receipt information into the NLP model if the matching result is successful, obtain the analysis result, and generate a label based on the analysis result.

9. An address resolution and label generation device, characterized in that: comprising a memory and at least one processor, wherein the memory has computer-readable instructions stored therein; The at least one processor calls the computer-readable instructions in the memory to execute each step of the address resolution and label generation method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the address resolution and label generation method according to any one of claims 1 to 7 are implemented.