Order address tag generation method and device, medium and equipment

By using the keyword matching model of the BERT word segmentation model and attention mechanism, combined with the Seq2Seq tag generation model, the order address data is automatically processed, and the analysis problems in complex address formats and multi-language environments are solved, efficient and accurate address tag generation is achieved, and user experience and business adaptability are improved.

CN120470075APending Publication Date: 2025-08-12SHANGHAI DONGPU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510488419.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-08-12

Smart Images

  • Figure CN120470075A_ABST
    Figure CN120470075A_ABST
Patent Text Reader

Abstract

The invention provides an order address tag generation method and device, a medium and equipment. The order address tag generation method comprises the steps of obtaining order address data; preprocessing the obtained order address data to obtain preprocessed order address data; performing word segmentation processing on an address by using a word segmentation model according to the preprocessed order address data to obtain an address sequence after word segmentation; carrying out keyword matching on the address sequence subjected to word segmentation by utilizing a keyword matching model; and generating a corresponding address tag according to a keyword matching result by utilizing a tag generation model. According to the method, the order address can be automatically processed from data acquisition to address tag generation, and specifically, complex address information can be efficiently processed, key information can be extracted and accurate matching can be performed based on an address word segmentation model based on BERT and a keyword matching model based on an attention mechanism; and the label generation model based on Seq2Seq can intelligently generate the address label according to the matching result, so that the manual operation is reduced, and the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of order address label generation, and in particular to a method, device, medium and equipment for generating an order address label. Background Art

[0002] With the rapid growth of e-commerce and online shopping, address management in order processing is becoming increasingly important. Accurate address information is not only crucial for ensuring delivery efficiency and customer satisfaction, but also the foundation for intelligent logistics and supply chain management. In modern order management systems, automated address label extraction and generation plays a vital role in improving operational efficiency and accuracy.

[0003] Today, although many systems provide basic functions for address input and storage, they still face problems with low address parsing accuracy and efficiency when dealing with complex address formats and diverse language environments, and the order data processing process needs to be further optimized. Summary of the Invention

[0004] The main purpose of the present invention is to solve the technical problem in the prior art of low accuracy and efficiency of address resolution when processing complex address formats and diverse language environments.

[0005] A first aspect of the present invention provides a method for generating an order address label, comprising: Get order address data; Preprocessing the acquired order address data to obtain preprocessed order address data; The pre-processed order address data is segmented using a word segmentation model to obtain a segmented address sequence. Use the keyword matching model to perform keyword matching on the segmented address sequence; Utilize the label generation model to generate corresponding address labels based on the keyword matching results.

[0006] Optionally, in a first implementation of the first aspect of the present invention, obtaining order address data includes: The order management system publishes the order address data as a message to the Kafka message queue; Obtain order address data in the Kafka message queue through continuous polling; During each polling, check whether new order address data is obtained in the Kafka message queue. When there is new order address data in the Kafka message queue, obtain the new order address data in the Kafka message queue.

[0007] Optionally, in a second implementation of the first aspect of the present invention, preprocessing the acquired order address data to obtain preprocessed order address data includes: Filtering the acquired order address data to remove order address data that does not meet preset requirements, thereby obtaining filtered order address data; Convert the traditional Chinese addresses in the filtered order address data into simplified Chinese addresses; The converting the traditional Chinese address in the filtered order address data into a simplified Chinese address includes: converting the traditional Chinese address in the order address data into a simplified Chinese address based on a traditional-simplified Chinese mapping table.

[0008] Optionally, in a third implementation of the first aspect of the present invention, the pre-processed order address data is segmented using a segmentation model to obtain segmented address details, including: Build an address segmentation model based on BERT and train the built address segmentation model to obtain a trained address segmentation model; The pre-processed order address data is tokenized, and then the tokenized order address data is input into the trained address segmentation model for segmentation processing to obtain the segmented address sequence.

[0009] Optionally, in a fourth implementation of the first aspect of the present invention, performing keyword matching on the segmented address information using a keyword matching model includes: Build a keyword matching model based on the attention mechanism; Define the keyword sequence, and calculate the relevance score of the segmented address sequence and keyword sequence through the keyword matching model; the relevance score outputs the matching probability through the fully connected layer and activation function, and the keyword with a matching probability greater than the threshold is selected as the final keyword matching result.

[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the step of generating a corresponding address label based on a keyword matching result using a label generation model includes: Build a Seq2Seq-based label generation model based on RNN or Transformer architecture; Obtain keyword matching results and their corresponding address label data, and construct a training set, a validation set, and a test set based on the obtained keyword matching results and their corresponding address label data; The Seq2Seq-based label generation model is trained using the training set, and the parameters of the Seq2Seq-based label generation model are adjusted by minimizing the loss between the predicted label and the true label to obtain a trained Seq2Seq-based label generation model; the trained Seq2Seq-based label generation model is verified and tested using the validation set and the test set; The keyword matching results based on the pre-processed order address data are input into the trained Seq2Seq-based label generation model to generate the corresponding address label; The corresponding address labels generated use greedy search or constrained search strategy to select the optimal output label sequence.

[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the method further includes: pushing the address tag to a downstream system; The pushing of the address tag to the downstream system includes: pushing the address tag to the downstream system by calling an HTTP interface and sending a message through a message queue.

[0012] A second aspect of the present invention provides an order address label generating device, comprising: Order acquisition module, used to obtain order address data; A preprocessing module, used to preprocess the acquired order address data to obtain preprocessed order address data; The word segmentation module is used to segment the pre-processed order address data using the word segmentation model to obtain the segmented address sequence; A matching module is used to perform keyword matching on the segmented address sequence using a keyword matching model; The label generation module is used to generate corresponding address labels based on the keyword matching results using the label generation model.

[0013] Optionally, in a first implementation of the second aspect of the present invention, the order acquisition module includes: The order management system publishes the order address data as a message to the Kafka message queue; Obtain order address data in the Kafka message queue through continuous polling; During each polling, check whether new order address data is obtained in the Kafka message queue. When there is new order address data in the Kafka message queue, obtain the new order address data in the Kafka message queue.

[0014] Optionally, in a second implementation of the second aspect of the present invention, the preprocessing module includes: The filtering submodule is used to filter the acquired order address data, filter out the order address data that does not meet the preset requirements, and obtain the filtered order address data; The address conversion submodule is used to convert the traditional Chinese addresses in the filtered order address data into simplified Chinese addresses; The address conversion submodule includes: converting the traditional Chinese address in the order address data into a simplified Chinese address based on a traditional and simplified Chinese mapping table.

[0015] Optionally, in a third implementation of the second aspect of the present invention, the word segmentation module includes: The address segmentation model construction submodule is used to build an address segmentation model based on BERT and train the constructed address segmentation model to obtain a trained address segmentation model; The word segmentation processing submodule is used to perform a tokenization operation on the pre-processed order address data, and then input the tokenized order address data into the trained address word segmentation model for word segmentation processing to obtain the segmented address sequence.

[0016] Optionally, in a fourth implementation of the second aspect of the present invention, the matching module includes: Keyword matching model construction submodule, used to build a keyword matching model based on the attention mechanism; The matching result acquisition submodule is used to define the keyword sequence and calculate the relevance score of the segmented address sequence and keyword sequence through the keyword matching model; the relevance score outputs the matching probability through the fully connected layer and activation function, and the keyword with a matching probability greater than the threshold is selected as the final keyword matching result.

[0017] Optionally, in a fifth implementation of the second aspect of the present invention, the label generation module includes: The label generation model construction submodule is used to build a Seq2Seq-based label generation model based on the RNN or Transformer architecture; The data set construction submodule is used to obtain keyword matching results and their corresponding address label data, and to construct a training set, a validation set, and a test set based on the obtained keyword matching results and their corresponding address label data; A training submodule is configured to train the Seq2Seq-based label generation model using the training set, adjust the parameters of the Seq2Seq-based label generation model by minimizing the loss between the predicted label and the true label, and obtain a trained Seq2Seq-based label generation model; and verify and test the trained Seq2Seq-based label generation model using the validation set and the test set; The output label sequence submodule is used to generate corresponding address labels based on the keyword matching results of the preprocessed order address data and the trained Seq2Seq-based label generation model; the generated corresponding address labels use greedy search or constrained search strategy to select the optimal output label sequence.

[0018] Optionally, in a sixth implementation of the second aspect of the present invention, the system further comprises: a push module, configured to push the address tag to a downstream system; The pushing of the address tag to the downstream system includes: pushing the address tag to the downstream system by calling an HTTP interface and sending a message through a message queue.

[0019] A third aspect of the present invention provides an electronic device, comprising a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the electronic device to execute the various steps of the order address label generation method described above.

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

[0021] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention can automatically process order addresses, from data acquisition to address label generation. Specifically, the BERT-based address segmentation model and the attention-based keyword matching model can efficiently process complex address information, extract key information, and perform accurate matching. The Seq2Seq-based label generation model can intelligently generate address labels based on matching results, reducing manual operations and improving work efficiency. 2. The present invention supports dynamic updating of keyword libraries and continuously optimizes models through online learning mechanisms to adapt to changing business needs; 3. The present invention can effectively filter out order source data that is not required for matching, reduce invalid data processing, and improve overall performance; 4. The present invention can generate accurate and standardized address labels, which can significantly improve user experience, thereby increasing customer satisfaction and further enhancing customer trust and loyalty to the platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings: Figure 1This is a first flow chart of the method for generating an order address label provided in an embodiment of the present invention.

[0023] Figure 2 This is a second flow chart of the method for generating an order address label provided in an embodiment of the present invention.

[0024] Figure 3 This is a third flow chart of the method for generating an order address label provided in an embodiment of the present invention.

[0025] Figure 4 A schematic structural diagram of an order address label generating device provided in an embodiment of the present invention.

[0026] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The embodiment of the present invention provides a method, system, medium and device for generating order address labels, including: obtaining order address data; preprocessing the obtained order address data to obtain preprocessed order address data; using a word segmentation model to segment the preprocessed order address data to obtain a segmented address sequence; using a keyword matching model to perform keyword matching on the segmented address sequence; using a label generation model to generate a corresponding address label based on the keyword matching results. The present invention solves the technical problem in the prior art of low address resolution accuracy and efficiency when processing complex address formats and diverse language environments. The terms "first," "second," "third," "fourth," and so on (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 shown 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 elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, product, or apparatus.

[0028] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the method for generating an order address label in the embodiment of the present invention includes: 101. Get order address data; In this embodiment, the order management system publishes the order address data as a message to the Kafka message queue; Obtain order address data in the Kafka message queue through continuous polling.

[0029] This embodiment obtains data through continuous polling. This real-time nature can ensure that the address label of the order is generated in the shortest time, thereby improving the overall efficiency of order processing.

[0030] 102. Preprocess the acquired order address data to obtain preprocessed order address data; In this embodiment, the acquired order address data is filtered to filter out order address data that does not meet preset requirements, thereby obtaining filtered order address data; Convert the traditional Chinese addresses in the filtered order address data into simplified Chinese addresses.

[0031] This embodiment filters the order address data to ensure that the system only processes valid addresses that meet the requirements, which helps to reduce errors and inconsistent label generation.

[0032] 103. The pre-processed order address data is segmented using a segmentation model to obtain a segmented address sequence; In this embodiment, an address segmentation model is constructed based on BERT, and the constructed address segmentation model is trained to obtain a trained address segmentation model; The pre-processed order address data is tokenized, and then the tokenized order address data is input into the trained address segmentation model for segmentation processing to obtain the segmented address sequence.

[0033] The address segmentation model built based on BERT in this embodiment can better understand the context and provide more accurate segmentation results. This effect improves the accuracy of the keyword matching stage, allowing addresses of different formats to be correctly processed.

[0034] 104. Use the keyword matching model to perform keyword matching on the segmented address sequence; In this embodiment, a keyword matching model is constructed based on the attention mechanism; Define the keyword sequence, and calculate the relevance score of the segmented address sequence and keyword sequence through the keyword matching model; the relevance score outputs the matching probability through the fully connected layer and activation function, and the keyword with a matching probability greater than the threshold is selected as the final keyword matching result.

[0035] The keyword matching model of this embodiment is based on the attention mechanism, which can dynamically focus on key information in the input sequence, enhance the model's ability to capture the correlation between addresses and keywords, and improve the matching accuracy.

[0036] 105. Use the label generation model to generate corresponding address labels based on the keyword matching results.

[0037] In this embodiment, a Seq2Seq-based label generation model is constructed based on an RNN or Transformer architecture; and the constructed Seq2Seq-based label generation model is trained to obtain a trained Seq2Seq-based label generation model; The keyword matching results based on the preprocessed order address data are input into the trained Seq2Seq-based label generation model to generate corresponding address labels; the generated corresponding address labels use greedy search or constrained search strategy to select the optimal output label sequence.

[0038] This embodiment generates address labels using a Seq2Seq model based on an RNN or Transformer architecture. This model can process contextual information and provide more flexible and intelligent label generation in diverse order address scenarios. This feature is particularly suitable for the automated generation of complex addresses, better adapting to diverse needs. Furthermore, by using greedy or constrained search strategies to select the optimal output label sequence, the model can generate labels that better align with actual semantics and logic, ensuring output accuracy.

[0039] See also Figure 2 The second embodiment of the method for generating an order address label according to the embodiment of the present invention includes: 201. Get order address data; In this embodiment, order address data is obtained through continuous polling based on a Kafka message queue that already stores order address data. During each poll, the Kafka message queue is checked for new order address data. If new order address data is available in the Kafka message queue, the new order address data in the Kafka message queue is obtained. This embodiment can process new order address data published by the Kafka message queue in real time, improving response speed.

[0040] 202. Preprocess the acquired order address data to obtain preprocessed order address data; In this embodiment, the acquired order address data is subjected to filtering and denoising to obtain processed order address data. The filtering process includes determining filtering rules based on business requirements, such as determining the order source based on Kafka message metadata or specific fields in the order data, and filtering orders from specific channels or time ranges. The traditional Chinese addresses in the filtered order address data are converted into simplified Chinese addresses, specifically, the traditional Chinese addresses in the order address data are converted into simplified Chinese addresses based on a traditional-simplified Chinese character mapping table, wherein the traditional-simplified Chinese character mapping table records the correspondence between traditional Chinese characters and simplified Chinese characters.

[0041] 203. The pre-processed order address data is segmented using a segmentation model to obtain a segmented address sequence; 204. Using a keyword matching model to perform keyword matching on the segmented address sequence; 205. Using the label generation model, generate corresponding address labels according to the keyword matching results; In this embodiment, a Seq2Seq-based label generation model is constructed based on the RNN or Transformer architecture; Obtain keyword matching results and their corresponding address label data, and construct a training set, a validation set, and a test set based on the obtained keyword matching results and their corresponding address label data; The Seq2Seq-based label generation model is trained using the training set, and the parameters of the Seq2Seq-based label generation model are adjusted by minimizing the loss between the predicted label and the true label to obtain a trained Seq2Seq-based label generation model; the trained Seq2Seq-based label generation model is verified and tested using the validation set and the test set; The keyword matching results of the pre-processed order address data are input into the trained Seq2Seq-based label generation model to generate the corresponding address labels; the generated corresponding address labels use greedy search or constrained search strategy to select the optimal output label sequence; 206. Push the address tag to the downstream system; In this embodiment, the push method is selected according to the downstream system interface requirements; in this embodiment, the address tag is pushed to the downstream system by calling the HTTP interface and sending messages through the message queue.

[0042] This embodiment uses a BERT-based address segmentation model and an attention-based keyword matching model to efficiently process complex address information, extract key information, and perform precise matching. The Seq2Seq-based label generation model can intelligently generate address labels based on matching results, reducing manual intervention and improving processing efficiency.

[0043] See also Figure 3 A third embodiment of the method for generating an order address label according to the present invention includes: 301. Obtain order address data based on the Kafka message queue of unified order v2; In this embodiment, Kafka is a high-throughput distributed publish-subscribe messaging system; Unified Order v2 publishes order address data as messages to a specific topic in Kafka. Specifically, select a suitable Kafka client: select the corresponding Kafka client based on the programming language used by the project. For example, in Java projects, the Java client officially provided by Apache Kafka is commonly used; in Python, the kafka-python library is used; configure Kafka consumers: configuring consumers requires specifying the address of the Kafka cluster and the name of the topic to be subscribed; you can also set some other parameters, such as the consumer group, which is used to identify the group to which the consumer belongs, for load balancing and fault recovery. Polling to obtain data: Pull messages from Kafka through continuous polling. During each poll, check whether new messages have arrived and process the acquired messages.

[0044] 302. Filter out order source data that does not need to be matched, and convert the received traditional Chinese addresses into simplified Chinese addresses; In this embodiment, filtering rules are determined based on business needs, such as determining the source of orders based on Kafka message metadata or specific fields of order data, and filtering orders from specific channels or time ranges.

[0045] Traditional-to-simplified conversion is based on a predefined mapping table that records the correspondence between traditional and simplified Chinese characters. In Python, this conversion is implemented using the opencc library, which supports multiple conversion modes. In Java, the HanLP library, a natural language processing toolkit with integrated natural language processing capabilities, can be used.

[0046] 303. Use the BERT-based address segmentation model to segment the address and extract key information from the address; In this embodiment, BERT is a pre-trained language model based on the Transformer architecture that can learn text contextual semantic information and performs well in natural language processing tasks. The BERT-based address segmentation model is obtained by fine-tuning the pre-trained BERT model for address data. First, a large amount of address data is collected and key information such as province, city, district, and street is annotated, and then divided into training, validation, and test sets. Then, based on the pre-trained BERT model, an output layer suitable for the segmentation task is added. The model is then trained using the training set, and the parameters are continuously adjusted to optimize the model's performance on the validation set. After training, the address is first tokenized and then input into the model to obtain the prediction result. Finally, the result is parsed to extract the key information.

[0047] 304. Use the keyword matching model based on the attention mechanism to perform keyword matching on the segmented address. First, perform keyword matching on the original address. If the match fails, perform a secondary match on the converted simplified Chinese address. In this embodiment, the attention mechanism enables the model to dynamically focus on different parts of the input sequence when processing sequential data. In the keyword matching model, the attention mechanism helps the model capture information related to addresses and keywords. A keyword matching model based on the attention mechanism is constructed, with the input being a segmented address sequence and a keyword sequence. The attention mechanism calculates the relevance score, and then outputs the matching result through a fully connected layer and activation function. During matching, the original address is first segmented and input into the model to match the keyword set. If the match probability exceeds the set threshold, the result is successful. If it fails, the simplified Chinese address is segmented and matched again.

[0048] 305. Use a Seq2Seq-based label generation model to generate corresponding address labels based on the keyword matching results; In this embodiment, the Seq2Seq model is used for sequence-to-sequence conversion tasks and consists of an encoder and a decoder. The encoder encodes the input sequence into a fixed-length vector, from which the decoder generates the target sequence. Keyword matching results and their corresponding address label data are first collected and divided into training, validation, and test sets. A Seq2Seq model is then constructed using an RNN (such as an LSTM or GRU) or Transformer architecture. The model is then trained using the training set, and parameters are adjusted by minimizing the loss between predicted and true labels. Finally, the keyword matching results are input to the encoder, and the encoded state is input to the decoder to generate address labels. Greedy search or beam search strategies can be used to select the optimal output label sequence.

[0049] 306. Push the generated address label to the downstream system; In this embodiment, when the address tag is pushed to the downstream system, a push method is selected according to the interface requirements of the downstream system, and common methods include HTTP interface calling and message queue sending.

[0050] The above describes the method for generating an order address label in an embodiment of the present invention. The following describes the device for generating an order address label in an embodiment of the present invention. Figure 4 In one embodiment of the present invention, an order address label generating device includes: Order acquisition module 401, used to obtain order address data; In this embodiment, the order acquisition module 401 includes: The order management system publishes the order address data as a message to the Kafka message queue; Obtain order address data in the Kafka message queue through continuous polling; During each polling, check whether new order address data is obtained in the Kafka message queue. When there is new order address data in the Kafka message queue, obtain the new order address data in the Kafka message queue.

[0051] A preprocessing module 402 is used to preprocess the acquired order address data to obtain preprocessed order address data; In this embodiment, the pre-processing module 402 includes: The filtering submodule 4021 is used to filter the acquired order address data, filter out order address data that does not meet preset requirements, and obtain filtered order address data; The address conversion submodule 4022 is used to convert the traditional Chinese addresses in the filtered order address data into simplified Chinese addresses; The address conversion submodule 4022 includes: converting the traditional Chinese address in the order address data into a simplified Chinese address based on the traditional and simplified Chinese mapping table.

[0052] The word segmentation module 403 is used to segment the pre-processed order address data using the word segmentation model to obtain a segmented address sequence; In this embodiment, the word segmentation module 403 includes: The address segmentation model construction submodule 4031 is used to construct an address segmentation model based on BERT and train the constructed address segmentation model to obtain a trained address segmentation model; The word segmentation processing submodule 4032 is used to perform a tokenize operation on the pre-processed order address data, and then input the tokenized order address data into the trained address word segmentation model for word segmentation processing to obtain a segmented address sequence.

[0053] Matching module 404, used to perform keyword matching on the segmented address sequence using a keyword matching model; In this embodiment, the matching module 404 includes: A keyword matching model construction submodule 4041 is used to construct a keyword matching model based on an attention mechanism; The matching result acquisition submodule 4042 is used to define the keyword sequence and calculate the relevance score of the segmented address sequence and the keyword sequence through the keyword matching model; the relevance score outputs the matching probability through the fully connected layer and activation function, and the keyword with a matching probability greater than the threshold is selected as the final keyword matching result.

[0054] The label generation module 405 is used to generate a corresponding address label according to the keyword matching result using the label generation model.

[0055] In this embodiment, the label generation module 405 includes: The label generation model construction submodule 4051 is used to build a Seq2Seq-based label generation model based on the RNN or Transformer architecture; The data set construction submodule 4052 is used to obtain keyword matching results and their corresponding address label data, and to construct a training set, a validation set, and a test set based on the obtained keyword matching results and their corresponding address label data; The training submodule 4053 trains the Seq2Seq-based label generation model using the training set, adjusts the parameters of the Seq2Seq-based label generation model by minimizing the loss between the predicted label and the true label, and obtains a trained Seq2Seq-based label generation model; and verifies and tests the trained Seq2Seq-based label generation model using the validation set and the test set. The output label sequence submodule 4054 is used to generate corresponding address labels based on the keyword matching results of the preprocessed order address data and input the trained Seq2Seq-based label generation model; the generated corresponding address labels use a greedy search or constrained search strategy to select the optimal output label sequence.

[0056] Push module 406, for pushing address labels to downstream systems; In this embodiment, the push module 406 includes: pushing the address tag to the downstream system through HTTP interface call and message queue sending.

[0057] above Figure 4 The order address label generating device in the embodiment of the present invention is described in detail from the perspective of modular functional entities, and the electronic device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0058] Figure 5is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 700 may vary significantly due to different configurations or performance, and may include one or more processors (central processing units, CPUs) 710 (for example, one or more processors), a memory 720, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 733 or data 732. The memory 720 and storage medium 730 may be either transient or persistent storage. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations on the electronic device 700. Furthermore, the processor 710 may be configured to communicate with the storage medium 730 to execute the series of instruction operations in the storage medium 730 on the electronic device 700.

[0059] The electronic device 700 may further include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 750, and / or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 5 The illustrated electronic device structure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0060] 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 order address label generation method.

[0061] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0062] 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, or the portion 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 for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0063] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating an order address label, characterized in that: include: Get order address data; Preprocessing the acquired order address data to obtain preprocessed order address data; The pre-processed order address data is segmented using a word segmentation model to obtain a segmented address sequence; Use the keyword matching model to perform keyword matching on the address sequence after word segmentation; Utilize the label generation model to generate corresponding address labels based on the keyword matching results.

2. The method for generating an order address label according to claim 1, wherein: The obtaining of order address data includes: The order management system publishes the order address data as a message to the Kafka message queue; Obtain order address data in the Kafka message queue through continuous polling; During each polling, check whether new order address data is obtained in the Kafka message queue. When there is new order address data in the Kafka message queue, obtain the new order address data in the Kafka message queue.

3. The method for generating an order address label according to claim 1, wherein: The preprocessing of the acquired order address data to obtain the preprocessed order address data includes: Filtering the acquired order address data to filter out order address data that does not meet preset requirements, thereby obtaining filtered order address data; Convert the traditional Chinese addresses in the filtered order address data into simplified Chinese addresses; The converting the traditional Chinese address in the filtered order address data into a simplified Chinese address includes: converting the traditional Chinese address in the order address data into a simplified Chinese address based on a traditional-simplified Chinese mapping table.

4. The method for generating an order address label according to claim 1, wherein: The pre-processed order address data is segmented using a segmentation model to obtain segmented address details, including: Build an address segmentation model based on BERT and train the built address segmentation model to obtain a trained address segmentation model; The pre-processed order address data is tokenized, and then the tokenized order address data is input into the trained address segmentation model for segmentation processing to obtain the segmented address sequence.

5. The method for generating an order address label according to claim 1, wherein: The keyword matching model is used to perform keyword matching on the segmented address information, including: Build a keyword matching model based on the attention mechanism; Define the keyword sequence, and calculate the relevance score of the segmented address sequence and keyword sequence through the keyword matching model; the relevance score outputs the matching probability through the fully connected layer and activation function, and the keyword with a matching probability greater than the threshold is selected as the final keyword matching result.

6. The method for generating an order address label according to claim 1, wherein: The tag generation model is used to generate corresponding address tags according to the keyword matching results, including: Build a Seq2Seq-based label generation model based on RNN or Transformer architecture; Obtain keyword matching results and their corresponding address label data, and construct a training set, a validation set, and a test set based on the obtained keyword matching results and their corresponding address label data; The Seq2Seq-based label generation model is trained using the training set, and the parameters of the Seq2Seq-based label generation model are adjusted by minimizing the loss between the predicted label and the true label to obtain a trained Seq2Seq-based label generation model; the trained Seq2Seq-based label generation model is verified and tested using the validation set and the test set; The keyword matching results based on the pre-processed order address data are input into the trained Seq2Seq-based label generation model to generate the corresponding address label; The corresponding address labels generated use greedy search or constrained search strategy to select the optimal output label sequence.

7. The method for generating an order address label according to claim 1, wherein: The method further includes: pushing the address tag to a downstream system; The pushing of the address tag to the downstream system includes: pushing the address tag to the downstream system by calling an HTTP interface and sending a message through a message queue.

8. An order address label generating device, characterized in that: include: Order acquisition module, used to obtain order address data; A preprocessing module, used to preprocess the acquired order address data to obtain preprocessed order address data; The word segmentation module is used to segment the pre-processed order address data using the word segmentation model to obtain the segmented address sequence; A matching module is used to perform keyword matching on the segmented address sequence using a keyword matching model; The label generation module is used to generate corresponding address labels based on the keyword matching results using the label generation model.

9. An electronic device comprising a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instructions in the memory to enable the electronic device to execute the various steps of the order address label generation method according to any one of claims 1 to 7.

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