Address matching method and device and computer equipment
By using the detection network in the address matching technology to correct spelling and sorting errors in the address text, the problem of low error correction accuracy in the existing technology is solved and more efficient address matching is achieved.
Patent Information
- Application Number
- CN202410759049.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-06
AI Technical Summary
In existing address matching technology, the error correction accuracy of address text is low, resulting in low matching efficiency and inability to effectively handle spelling errors and sorting errors.
A detection network is used, including two gated recurrent unit GRU networks in opposite directions, to detect and correct spelling errors and sorting errors in the initial address text, generate the target address text, and match it with the preset index.
It improves the error correction accuracy of address text, improves the efficiency of address matching, can correct spelling errors and sorting errors at the same time, and significantly improves the accuracy of matching.
Smart Images

Figure CN118606492A
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to an address matching method, apparatus, and computer device. Background Art
[0002] Address matching refers to the process of matching a user-provided address against an existing address database to determine the best or most similar match. With the rise of the instant delivery industry, address matching and location-based positioning have become essential capabilities for various online sales platforms. However, in specific use cases, such as when customers fill out their addresses, the input often contains issues such as non-standard addresses, resulting in order delays and inability to place orders, impacting business development and customer perception. Traditional address search focuses on analyzing text to extract data feature vectors and searching based on similarity in data features. This is susceptible to textual noise from the search criteria entered by the user. Previously, noise reduction in address search focused primarily on spelling errors, with little attention paid to the logical order of the text. This resulted in low address text correction accuracy and, in turn, low matching efficiency.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] The embodiments of the present application provide an address matching method, apparatus, and computer device to at least solve the technical problem in the related art of low efficiency of address matching due to low error correction accuracy of address text.
[0005] According to one aspect of an embodiment of the present application, an address matching method is provided, comprising: receiving an initial address text; detecting the initial address text using a detection network to obtain incorrect word segmentations in the initial address text, wherein the incorrect word segmentations include misspelled word segmentations and incorrectly sorted word segmentations, and the detection network comprises two gated recurrent unit (GRU) networks in opposite directions; correcting the incorrect word segmentations to obtain a target address text, matching the target address text with a preset index to obtain a matching result, wherein the matching result indicates whether the target address text corresponds to the preset index.
[0006] Optionally, a detection network is used to detect the initial address text to obtain incorrect word segmentations in the initial address text, including: segmenting the initial address text to obtain multiple word segmentations; embedding the multiple word segmentations to obtain multiple embedding vectors; using a first GRU network in the detection network to forward process the multiple embedding vectors to obtain forward hidden state data, and using a second GRU network in the detection network to backward process the multiple embedding vectors to obtain backward hidden state data; combining the forward hidden state data and the backward hidden state data to obtain a feature vector for representing contextual relationships and semantic information; and determining the incorrect word segmentations in the initial address text based on the feature vector.
[0007] Optionally, determining the incorrect segmentation words in the initial address text according to the feature vector includes: determining the error probability of each segmentation word in the initial address text based on the feature vector; and determining the segmentation word whose error probability is higher than a first preset value as the incorrect segmentation word.
[0008] Optionally, the erroneous word segmentation is corrected to obtain the target address text, including: obtaining the coverage rate corresponding to the erroneous word segmentation, the coverage rate is used to indicate the coverage degree of the word segmentation; masking the embedding vector corresponding to the erroneous word segmentation according to the coverage rate of each erroneous word segmentation to obtain the masked embedding vector; and correcting the masked embedding vector using a preset error correction model to obtain the target address text.
[0009] Optionally, a preset error correction model is used to correct the masked embedding vector to obtain the target address text, including: using the preset error correction model to fill the masked embedding vector with the embedding vector corresponding to the corrected correct word segmentation to obtain the corrected address text; using the preset error correction model to fill in the corrected address text to obtain the target address text.
[0010] Optionally, a preset error correction model is used to fill in the corrected address text to obtain the target address text, including: performing word segmentation on the corrected address text to obtain multiple target words; adding target identifiers between the multiple target words to segment the multiple target words; using the preset error correction model to evaluate the continuous probability of the multiple target words after segmentation to obtain the continuous probability between each target word; adding a covering identifier between two target words whose continuous probability is lower than a second preset value; and using the preset error correction model to fill in the missing text at the position of the covering identifier to obtain the target address text.
[0011] Optionally, the target address text is matched with a preset index to obtain a matching result, including: segmenting the target address text to obtain a segmented text; performing feature extraction on the segmented text to obtain a target feature vector; using the target feature vector to match multiple preset indexes, and selecting an index with a similarity higher than a third preset value to determine as the matching result.
[0012] According to another aspect of an embodiment of the present application, an address matching device is also provided, including: a receiving module for receiving an initial address text; a detection module for detecting the initial address text using a detection network to obtain incorrect word segmentations in the initial address text, wherein the incorrect word segmentations include: incorrectly spelled word segmentations and incorrectly sorted word segmentations, and the detection network includes two gated recurrent unit (GRU) networks in opposite directions; a matching module for correcting the incorrect word segmentations to obtain a target address text, matching the target address text with a preset index to obtain a matching result, and the matching result indicates whether the target address text corresponds to the preset index.
[0013] According to another aspect of the embodiments of the present application, a computer device is provided, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the above-mentioned address matching method.
[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned address matching method by running the computer program.
[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, which implement the above-mentioned address matching method when executed by a processor.
[0016] In an embodiment of the present application, an initial address text is received; a detection network is used to detect the initial address text to obtain incorrect segmentations in the initial address text, wherein the incorrect segmentations include misspelled segmentations and incorrectly sorted segmentations, and the detection network includes two gated recurrent unit (GRU) networks in opposite directions; the incorrect segmentations are corrected to obtain a target address text, and the target address text is matched with a preset index to obtain a matching result, wherein the matching result indicates whether the target address text corresponds to the preset index, thereby achieving the purpose of correcting not only misspelled segmentations but also incorrectly sorted segmentations, thereby achieving the technical effect of improving the error correction accuracy of the address text, and further solving the technical problem in the related art of low efficiency of address matching due to low error correction accuracy of the address text. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a hardware structure block diagram of a computer terminal for implementing an address matching method according to an embodiment of the present application;
[0019] Figure 2 is a flow chart of an address matching method according to an embodiment of the present application;
[0020] Figure 3 It is a structural diagram of an address matching device according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] The information collected in the embodiments of the present application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or reject the automated decision results; if the user chooses to reject, the expert decision-making process will be entered.
[0024] In the related art, the method for address matching is: correcting the spelling of the address entered by the user; performing Chinese word segmentation on the corrected text; extracting features from the segmented text, and using the feature vector to perform similarity matching with a pre-built index. Since the related art only performs splicing correction, the correction accuracy is low.
[0025] In order to solve the problems existing in the related art, the embodiment of the present application provides an address matching method, which can be run on Figure 1 In the computer terminal shown, the computer terminal is explained below.
[0026] The address matching method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG1 shows a hardware structure block diagram of a computer terminal for implementing an address matching method. Figure 1 As shown, the computer terminal 10 may include one or more (illustrated by 102a, 102b, ..., 102n in the figure) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0027] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10. As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0028] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the address matching method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above-mentioned address matching method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The transmission module 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission module 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission module 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.
[0030] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0031] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.
[0032] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of an address matching method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] Figure 2 is a flow chart of an address matching method according to an embodiment of the present application. Figure 2 As shown, the method includes the following steps:
[0034] Step S202: Receive the initial address text.
[0035] In the above step S202, the initial address text is the text input by the user.
[0036] Step S204: Use a detection network to detect the initial address text, and obtain the wrongly segmented words in the initial address text. Among them, the wrongly segmented words include: misspelled segmented words and wrongly sorted segmented words. The detection network includes two Gated Recurrent Unit (GRU) networks with opposite directions.
[0037] In the above step S204, the detection network can be one of the networks in a preset model. It can be understood that the preset model includes a detection network and a preset error correction model. The detection network is used to detect the wrongly segmented words in the initial address text, and the error correction model is used to perform error correction processing on the wrongly segmented words.
[0038] It should be noted that a misspelled segmented word refers to a word with a spelling error itself. For example, "mail" is misspelled as "youji". A wrongly sorted segmented word refers to an incorrect logical order of words. For example, "Store N in Place M" is misspelled as "Store M in Place N", etc.
[0039] Step S206: Correct the wrongly segmented words to obtain the target address text, and match the target address text with a preset index to obtain a matching result. The matching result indicates whether the target address text corresponds to the preset index.
[0040] In the above step S206, the preset index is the address information pre-stored in the database. In an actual application scenario, after receiving the address input by the user, it is necessary to match the address input by the user with the address pre-stored in the database, and then find the address information pre-stored in the database according to the matching result, and further perform processing, such as: generating an order or issuing a shipping instruction to the warehouse corresponding to the pre-stored address information, etc.
[0041] It should be noted that the training data of the preset model consists of two parts. One part is used for logical error correction. Using the standard address data as the correct result, segment the correct result, and adjust the logical order of the segmented text as the result before processing, so as to train the error correction model. One part is used for spelling error correction. The correct spelling data in the address data should be used as the corrected result. For the correct spelling data, randomly replace it with homophonic words, and use the replaced address data as the data before correction.
[0042] In some embodiments of the present application, the address matching system utilizes error correction capabilities to provide immediate prompts and correction suggestions when users make input errors, enabling users to quickly and accurately obtain valid matching results. This improves the user experience and reduces the frustration and confusion users experience during address input. Address data often contains input errors, spelling errors, or logical errors. Error correction capabilities can automatically correct these errors during the matching process, revising the input address to the correct form and improving matching accuracy.
[0043] Through the above steps S202 to S206, the purpose of correcting not only misspelled segmented words but also incorrectly sorted segmented words is achieved, thereby achieving the technical effect of improving the accuracy of address text correction, thereby solving the technical problem in the related art of low address matching efficiency due to low address text correction accuracy. Detailed description is given below.
[0044] In step S202 of the above-mentioned address matching method, a detection network is used to detect the initial address text to obtain incorrect word segmentations in the initial address text, including: segmenting the initial address text to obtain multiple word segmentations; embedding the multiple word segmentations to obtain multiple embedding vectors; using a first GRU network in the detection network to forward process the multiple embedding vectors to obtain forward hidden state data, and using a second GRU network in the detection network to backward process the multiple embedding vectors to obtain backward hidden state data; combining the forward hidden state data and the backward hidden state data to obtain a feature vector for representing contextual relationships and semantic information; and determining the incorrect word segmentations in the initial address text based on the feature vector.
[0045] Among them, the specific process of determining the incorrect segmentation in the initial address text according to the feature vector includes: determining the error probability of each segmentation in the initial address text based on the feature vector; and determining the segmentation whose error probability is higher than a first preset value as the incorrect segmentation.
[0046] Specifically, the initial address text is input into the detection network in the preset model. The two GRU networks in opposite directions in the detection network calculate the data after each word embedding processing. The two GRU networks in opposite directions each obtain a hidden state data. The hidden state data in opposite directions can enable the model to have the ability to "connect context", making it have a stronger understanding of the overall text, and finally calculate the error probability of each word in the text.
[0047] In the above-mentioned address matching method, the process of correcting the erroneous segmentation and obtaining the target address text includes: obtaining the coverage rate corresponding to the erroneous segmentation, where the coverage rate is used to indicate the coverage degree of the segmentation; masking the embedding vector corresponding to the erroneous segmentation according to the coverage rate of each erroneous segmentation to obtain the masked embedding vector; and correcting the masked embedding vector using a preset error correction model to obtain the target address text.
[0048] It should be noted that the masked embedding vector can be determined by the following formula:
[0049] p×eMask+(1-p)×a
[0050] Where p represents the coverage rate of incorrect segmentation, eMask represents the masking operation, and a represents the embedding vector to be masked.
[0051] It can be understood that the higher the coverage rate, the higher the degree of coverage. When the coverage rate is 1, it is full coverage. The embedded vector after soft masking is input into the preset error correction model to fill in the masked data to achieve the purpose of preliminary correction of typos.
[0052] In some embodiments of the present application, the preset model may be a Soft-Masked BERT model, and the BERT model is a Bidirectional Encoder Representations from Transformers (deep bidirectional pre-trained transformer based on semantic understanding).
[0053] In an embodiment of the present application, a preset error correction model is used to correct the masked embedding vector to obtain the target address text, including: using the preset error correction model to fill the masked embedding vector with the embedded vector corresponding to the corrected correct word segmentation to obtain the corrected address text; using the preset error correction model to fill in the corrected address text to obtain the target address text.
[0054] In an optional manner, a preset error correction model is used to fill in the corrected address text to obtain the target address text, including: performing word segmentation on the corrected address text to obtain multiple target words; adding target identifiers between the multiple target words to segment the multiple target words; using the preset error correction model to evaluate the continuous probability of the multiple target words after segmentation to obtain the continuous probability between each target word; adding a covering identifier between two target words whose continuous probability is lower than a second preset value; and using the preset error correction model to fill in the missing text at the position of the covering identifier to obtain the target address text.
[0055] Specifically, the corrected address text is supplemented with missing text such as affixes, and a preset error correction model is used to normalize different expressions of the same address.
[0056] In an optional method, the corrected address text is first segmented into Chinese words to obtain multiple target words, and target markers are added between the words. Then, the NSP (Next Sentence Prediction) task of the BERT model is used to analyze the text continuity between the target words. For target words with low text continuity probability, masking markers are added between the words. Finally, the MLM (Masked Language Model) in the BERT model is used to fill in the masked text to supplement the missing text.
[0057] In some embodiments of the present application, the process of matching the target address text with a preset index to obtain a matching result includes: segmenting the target address text to obtain a segmented text; performing feature extraction on the segmented text to obtain a target feature vector; using the target feature vector to match multiple preset indexes, and selecting an index with a similarity higher than a third preset value to determine as a matching result.
[0058] For example: the initial address text is "ACED Store". After being processed by the preset model, the target address text is obtained: "Store E, D Shopping Plaza, District C, City B, Province A".
[0059] It should be noted that the word segmentation vocabulary should include address information at all levels to avoid incorrect division of addresses at all levels during word segmentation.
[0060] Figure 3 is a structural diagram of an address matching device according to an embodiment of the present application, such as Figure 3 As shown, the device includes:
[0061] Receiving module 30, for receiving the initial address text;
[0062] a detection module 32 configured to detect the initial address text using a detection network to obtain incorrect segmented words in the initial address text, wherein the incorrect segmented words include misspelled segmented words and incorrectly sorted segmented words, and the detection network includes two gated recurrent unit (GRU) networks in opposite directions;
[0063] The matching module 34 corrects the erroneous word segmentation to obtain a target address text, and matches the target address text with a preset index to obtain a matching result, where the matching result indicates whether the target address text corresponds to the preset index.
[0064] Through the receiving module 30, the detection module 32 and the matching module 34 in the above-mentioned address matching device, the purpose of not only correcting misspelled segmented words but also correcting incorrectly sorted segmented words is achieved, thereby achieving the technical effect of improving the error correction accuracy of the address text, and further solving the technical problem in the related art of low efficiency of address matching due to low error correction accuracy of the address text.
[0065] The detection module 32 in the above-mentioned address matching device includes: a detection submodule, which is used to use a detection network to detect the initial address text and obtain incorrect word segmentations in the initial address text, including: segmenting the initial address text to obtain multiple word segmentations; embedding the multiple word segmentations to obtain multiple embedding vectors; using the first GRU network in the detection network to forward process the multiple embedding vectors to obtain forward hidden state data, and using the second GRU network in the detection network to backward process the multiple embedding vectors to obtain backward hidden state data; combining the forward hidden state data and the backward hidden state data to obtain a feature vector for representing contextual relationship and semantic information; and determining the incorrect word segmentations in the initial address text based on the feature vector.
[0066] The detection submodule includes: a determination unit, which is used to determine the incorrect segmentation words in the initial address text according to the feature vector, including: determining the error probability of each segmentation word in the initial address text based on the feature vector; and determining the segmentation word whose error probability is higher than a first preset value as the incorrect segmentation word.
[0067] The matching module 34 in the above-mentioned address matching device includes: an error correction submodule, which is used to correct the erroneous segmentation to obtain the target address text, including: obtaining the coverage rate corresponding to the erroneous segmentation, and the coverage rate is used to indicate the coverage degree of the segmentation; masking the embedding vector corresponding to the erroneous segmentation according to the coverage rate of each erroneous segmentation to obtain the masked embedding vector; and using a preset error correction model to correct the masked embedding vector to obtain the target address text.
[0068] The error correction submodule includes: an error correction unit, which is used to correct the masked embedding vector using a preset error correction model to obtain the target address text, including: using the preset error correction model to fill the masked embedding vector with the embedded vector corresponding to the corrected correct word segmentation to obtain the corrected address text; using the preset error correction model to fill the corrected address text to obtain the target address text.
[0069] The error correction unit includes: an error correction subunit, which is used to use a preset error correction model to fill in the corrected address text to obtain the target address text, including: performing word segmentation on the corrected address text to obtain multiple target words; adding target identifiers between the multiple target words to segment the multiple target words; using the preset error correction model to evaluate the continuous probability of the multiple target words after segmentation to obtain the continuous probability between each target word; adding a cover identifier between two target words whose continuous probability is lower than a second preset value; using the preset error correction model to fill in the missing text at the position of the cover identifier to obtain the target address text.
[0070] The matching module 34 in the above-mentioned address matching device also includes: a matching submodule, which is used to match the target address text with a preset index to obtain a matching result, including: segmenting the target address text to obtain a segmented text; performing feature extraction on the segmented text to obtain a target feature vector; using the target feature vector to match multiple preset indexes, and selecting an index with a similarity higher than a third preset value to determine as a matching result.
[0071] It should be noted that Figure 3 The address matching device shown is used to perform Figure 2 The address matching method shown in the figure, therefore the relevant explanations in the above address matching method are also applicable to the address matching device, and will not be repeated here.
[0072] An embodiment of the present application further provides a computer device, comprising: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and is used to execute the above-mentioned address matching method.
[0073] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned address matching method by running the computer program.
[0074] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the address matching method in the present application are implemented.
[0075] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the address matching method in the present application.
[0076] An embodiment of the present application further provides a computer program, which, when executed by a processor, implements the steps of the address matching method in the present application.
[0077] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0078] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0079] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0080] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0081] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0082] 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 application 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, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0083] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An address matching method, characterized in that: include: Receive initial address text; Using a detection network to detect the initial address text, to obtain incorrect segmented words in the initial address text, wherein the incorrect segmented words include: incorrectly spelled segmented words and incorrectly sorted segmented words, and the detection network includes two gated recurrent unit (GRU) networks in opposite directions; The erroneous word segmentation is corrected to obtain a target address text, and the target address text is matched with a preset index to obtain a matching result, wherein the matching result indicates whether the target address text corresponds to the preset index.
2. The method according to claim 1, characterized in that The initial address text is detected using a detection network to obtain incorrect segmented words in the initial address text, including: Segmenting the initial address text to obtain multiple segmented words; Embedding the multiple word segments to obtain multiple embedding vectors; Using the first GRU network in the detection network to perform forward processing on the multiple embedding vectors to obtain forward hidden state data, and using the second GRU network in the detection network to perform backward processing on the multiple embedding vectors to obtain backward hidden state data; Combining the forward hidden state data with the backward hidden state data to obtain a feature vector for representing contextual relationship and semantic information; The incorrect word segmentations in the initial address text are determined according to the feature vector.
3. The method according to claim 2, characterized in that Determining incorrect word segmentations in the initial address text according to the feature vector includes: Determining the error probability of each word segment in the initial address text based on the feature vector; The word segmentation whose error probability is higher than a first preset value is determined as the erroneous word segmentation.
4. The method according to claim 1, characterized in that Correct the wrong word segmentation to obtain the target address text, including: Obtaining a coverage rate corresponding to the wrong participle, where the coverage rate is used to indicate the coverage degree of the participle; Mask the embedding vector corresponding to each incorrect word according to the masking rate of the incorrect word to obtain the masked embedding vector; The masked embedding vector is corrected using a preset error correction model to obtain the target address text.
5. The method according to claim 4, characterized in that The masked embedding vector is corrected using a preset error correction model to obtain the target address text, including: The masked embedding vector is filled with the embedding vector corresponding to the corrected correct word segmentation using a preset error correction model to obtain the corrected address text; The corrected address text is filled using a preset error correction model to obtain the target address text.
6. The method according to claim 5, characterized in that The corrected address text is filled using a preset error correction model to obtain the target address text, including: Performing word segmentation processing on the corrected address text to obtain multiple target words; adding a target identifier between the multiple target words to segment the multiple target words; Using the preset error correction model to evaluate the continuous probability of the multiple target words after segmentation, to obtain the continuous probability between each target word; Adding a cover mark between two target words whose consecutive probability is lower than a second preset value; The preset error correction model is used to fill in the missing text at the position of the covering mark to obtain the target address text.
7. The method according to claim 1, characterized in that Matching the target address text with a preset index to obtain a matching result includes: Segmenting the target address text to obtain a segmented text; Performing feature extraction on the segmented text to obtain a target feature vector; The target feature vector is used to match multiple preset indexes, and an index with a similarity higher than a third preset value is selected as a matching result.
8. An address matching device, characterized in that: include: A receiving module, used for receiving an initial address text; A detection module, configured to detect the initial address text using a detection network to obtain incorrect segmented words in the initial address text, wherein the incorrect segmented words include: incorrectly spelled segmented words and incorrectly sorted segmented words, and the detection network includes two gated recurrent unit (GRU) networks in opposite directions; The matching module is used to correct the erroneous word segmentation to obtain a target address text, and match the target address text with a preset index to obtain a matching result, wherein the matching result indicates whether the target address text corresponds to the preset index.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory is used to store program instructions; The processor is connected to the memory, and is used to execute the address matching method described in any one of claims 1 to 7.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the address matching method according to any one of claims 1 to 7 by running the computer program.
11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the address matching method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Address text recognition method and device, medium and electronic equipment
CN111695355A
