Address recognition method, electronic device and storage medium
Through the combination of the address recognition model and the sequence labeling model, the problem of address library dependence and address sequence adjustment in the prior art is solved, and accurate identification of complex addresses and hierarchical structure restoration is achieved.
Patent Information
- Application Number
- CN202210887589.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-07-26
AI Technical Summary
Existing address recognition methods rely on the integrity of the address library and cannot identify place names that are not in the library. In spoken expressions, deep learning models are difficult to deal with the inversion of address order and correct problems.
The address recognition model is used to identify the text to be identified, input it verbatim into the address library to find the second administrative level, adjust the order of the address text, combine the sequence of the sequence labeling model segmentation and sorting place names, and use the address language model for audio transliteration and address library verification.
It realizes accurate identification of complex address text and hierarchical structure restoration, improving the accuracy and adaptability of address recognition, especially adjusting address sequence in spoken expressions.
Smart Images

Figure CN115168546B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of address recognition, and particularly relates to an address recognition method, an electronic device, and a storage medium. Background Art
[0002] The existing written address recognition methods mainly include: 1. The method based on address library matching. This method first needs to collect addresses across the country, construct a place name index through data structures such as prefix trees, save the hierarchical structure between place names in a graph database such as Neo4j, and when matching an address from a text, first use the place name index to find all place names in the text one by one, then use the graph database to restore the hierarchical structure between place names, and finally output the place names in hierarchical order as the final address.
[0003] 2. The method based on a deep learning model of sequence labeling. This method first obtains a batch of text data to be recognized in a corresponding scenario, then labels the place names in the text, uses the labeled data to train a sequence labeling model, and after the model training is completed, the model can be used to recognize all place names in the input text, and then according to certain rules, such as the suffix of the place name, sort and restore the hierarchical structure of the recognized place names, and finally output the sorted address.
[0004] The inventor found that: for the method based on address library matching, the disadvantage is that the matching based on the place name index highly depends on the integrity of the address library, and place names not in the address library cannot be recognized at all, and the cost of constructing the hierarchical structure between place names is extremely high; for the method based on the deep learning model of sequence labeling, the disadvantage is that without the support of the address library, it cannot well solve the situation where the order of addresses at all levels is reversed in spoken language and the situation of address correction. Summary of the Invention
[0005] Embodiments of the present invention aim to solve at least one of the above technical problems.
[0006] In a first aspect, an embodiment of the present invention provides an address recognition method, including: checking whether a first administrative level in a preset address library exists in a text to be recognized; if no first administrative level exists in the text to be recognized, inputting the text to be recognized character by character into an address recognition model, where the address recognition model is used to recognize address text in the text to be recognized and adjust the order of the address text; obtaining at least one character output by the address recognition model, and checking whether a second administrative level corresponding to the at least one character exists in the preset address library; if a second administrative level corresponding to the at least one character exists, selecting the next character output by the address recognition model in the second administrative level until the output is completed; if no second administrative level corresponding to the at least one character exists, using the original output of the address recognition model.
[0007] In a second aspect, an embodiment of the present invention provides an electronic device, which includes: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute any one of the above address recognition methods of the present invention.
[0008] In a third aspect, an embodiment of the present invention provides a storage medium, in which one or more programs including execution instructions are stored, and the execution instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) for executing any one of the above address recognition methods of the present invention.
[0009] In a fourth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer is enabled to execute any one of the above address recognition methods.
[0010] In the embodiment of the present invention, by inputting the text to be recognized that does not have the first administrative level into the address recognition model for recognition, and searching for the corresponding second administrative level in the preset address library, it is possible to recognize the complex address text in the text to be recognized and accurately restore the hierarchical structure of the address. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0012] Figure 1 It is a flowchart of an embodiment of the address recognition method of the present invention;
[0013] Figure 2 It is a flowchart of another embodiment of the address recognition method of the present invention;
[0014] Figure 3 It is a flowchart of still another embodiment of the address recognition method of the present invention;
[0015] Figure 4 It is a schematic diagram of the network structure of the address recognition model of the address recognition method provided by an embodiment of the present invention;
[0016] Figure 5 It is a flowchart of an address recognition process provided by an embodiment of the present invention;
[0017] Figure 6 This is a schematic structural diagram of an embodiment of the electronic device of the present invention. Detailed implementation manners
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0019] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other.
[0020] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media including storage devices.
[0021] In the present invention, "module", "device", "system", etc. refer to relevant entities applied to a computer, such as hardware, a combination of hardware and software, software, or software in execution. Specifically, for example, a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable component, an execution thread, a program, and / or a computer. Also, an application program or a script program running on a server, and the server may both be components. One or more components may be in an execution process and / or thread, and the components may be localized on one computer and / or distributed between two or more computers, and may be run by various computer-readable media. The components may also communicate through local and / or remote processes according to a signal having one or more data packets, for example, a signal from data interacting with another component in a local system, a distributed system, and / or a signal interacting with other systems through a network on the Internet.
[0022] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising" and "including" not only include those elements, but also other elements not explicitly listed, or elements inherent to such a process, method, article, or device. Without further limitation, an element defined by the statement "comprising..." does not exclude the existence of additional identical elements in the process, method, article, or device that includes the said element.
[0023] An embodiment of the present invention provides an address recognition method, which can be applied to an electronic device. The electronic device can be a computer, a server, or other electronic products, etc., and the present invention does not make any limitation thereto.
[0024] Please refer to Figure 1 , which shows an address recognition method provided by an embodiment of the present invention.
[0025] As Figure 1 shown, in step 101, check whether there is a first administrative level in the preset address library in the text to be recognized;
[0026] In step 102, if there is no first administrative level in the text to be recognized, input the text to be recognized character by character into the address recognition model, where the address recognition model is used to recognize the address text in the text to be recognized and adjust the order of the address text;
[0027] In step 103, obtain at least one character output by the address recognition model, and check whether there is a second administrative level corresponding to the at least one character in the preset address library;
[0028] In step 104, if there is a second administrative level corresponding to the at least one character, select the next character output by the address recognition model in the second administrative level until the output is completed;
[0029] In step 105, if there is no second administrative level corresponding to the at least one character, use the original output of the address recognition model.
[0030] In this embodiment, for step 101, check whether there is a place name of the first administrative level in the preset address library in the text to be recognized. The text to be recognized is the voice information input by the user, and the voice information is converted into text. Then, search for the place name of the first administrative level corresponding to the address in the text in the preset address database, and confirm whether there is a place name of the first administrative level corresponding to the address in the text in the preset address database. The first administrative level is a place name at the provincial or municipality directly under the Central Government level.
[0031] After that, for step 102, if there is no place name of any first administrative level in the text to be recognized, input the text to be recognized character by character into the address recognition model. The address recognition model is used to recognize the address text in the text to be recognized and adjust the order of the address text. For example, if no place name of the first administrative level corresponding to the place name in the recognized text is found in the preset address database, all the characters in the recognized text are input into the address recognition model for recognition. The address recognition model can recognize the characters that are addresses in the recognized text, and the address recognition model can also sort the recognized address text, and the address order can be set.
[0032] After that, for step 103, obtain the result after recognition by the recognition model. The recognition result contains at least one character. Search in the preset address library to check whether there is a place name of the second administrative level corresponding to the at least one character. The second administrative level is a place name below the prefecture-level city, including prefecture-level cities, counties, districts, etc.
[0033] Then, for step 104, if there is a place name of the second administrative level corresponding to the recognition result of the at least one character in the preset address library, select the next character in the recognition result of the address recognition model from the place names of the second administrative level for output until all outputs are completed. For example, if a corresponding place name can be found and the place name is the same as the previously recognized place name of the first administrative level, then in the next step, select from the next characters of the found place name through the recognition result of the address recognition model; finally, for step 105, if there is no place name of the second administrative level corresponding to the recognition result of the at least one character in the preset address library, directly output the recognition result of the address recognition model, and the recognition result contains at least one character.
[0034] The method of the embodiment of the present application can recognize the complex address text in the text to be recognized and accurately restore the hierarchical structure of the address by inputting the text to be recognized without the first administrative level into the address recognition model for recognition and searching for the place name of the second administrative level corresponding to the recognition result in the preset address library.
[0035] In some alternative embodiments, the text to be recognized is the text after audio transcription input by the user. If any first administrative level exists in the text to be recognized, the audio transcription text is re-transcribed based on the preset address library corresponding to any first administrative level to obtain a re-transcribed text. For example, if there is a place name corresponding to any first administrative level of the text to be recognized in the preset address library, the audio transcription text input by the user is re-transcribed through the preset address library corresponding to any first administrative level. That is, if a place name corresponding to any first administrative level of the text to be recognized is found in the preset address library, the corresponding language model is selected to re-transcribe the audio input by the user.
[0036] The method of the embodiment of the present application can make the address recognition in the audio input by the user more accurate by re-transcribing the audio input by the user after finding the first administrative level corresponding to the text to be recognized.
[0037] Please refer to Figure 2 , which shows another address recognition method provided by an embodiment of the present invention. Among them, the text to be recognized is the audio transcription text, and this flowchart mainly shows the flowchart of the steps further defined after "finding whether there is a first administrative level in the preset address library in step 101" in flowchart Figure 1 .
[0038] As Figure 2 shown, in step 201, the re-transcribed text is input into the address recognition model word by word;
[0039] In step 202, at least one word output by the address recognition model is obtained, and it is checked whether there is a second administrative level corresponding to the at least one word in the preset address library.
[0040] In this embodiment, for step 201, the re-transcribed text obtained after transcription is input into the address recognition model word by word for recognition, and the recognition result is output, where the recognition result of the address recognition model contains at least one word; for step 202, at least one word in the recognition result output by the address recognition model is obtained, and it is checked whether there is a second administrative level corresponding to the at least one word in the preset address library. For example, the words in the recognition result output by the address recognition model are searched in the address library to determine whether there is an address such as a prefecture-level city or a county / district corresponding to the at least one word in the recognition result in the address library.
[0041] The method of the embodiment of the present application inputs the re-transcribed text into the address recognition model for recognition, and searches for the second administrative level corresponding to the recognition result of the address recognition model in the address library, which can improve the accuracy of address recognition for complex addresses.
[0042] In some alternative embodiments, if there is a second administrative level corresponding to at least one character and the second administrative level is located in the preset address library corresponding to the first administrative level, select the next character output by the address recognition model in the second administrative level until the output is completed. For example, if a second administrative level corresponding to the recognition result of the address recognition model is found in the preset address library, and the second administrative level is located in the address library corresponding to the first administrative level, then select the next character in the recognition result of the address recognition model in the address text of the second administrative level until the output is completed. That is, if the place name of the corresponding second administrative level can be found in the preset address library, directly select from the next character of the place name found in the recognition result output by the address recognition model.
[0043] The method of the embodiment of the present application can achieve a more accurate search for the valid address in the recognition text by confirming that there is a second administrative level corresponding to the recognition result of the address recognition model in the address library, and the second administrative level is located in the address library corresponding to the first administrative level.
[0044] In some alternative embodiments, if there is no second administrative level corresponding to at least one character or there is a second administrative level corresponding to at least one character but the second administrative level is not located in the preset address library corresponding to the first administrative level, use the original output of the address recognition model. For example, if a second administrative level corresponding to the recognition result of the address recognition model is not found in the preset address library, or there is a corresponding second administrative level and the second administrative level does not correspond to the address library of the first administrative level, that is, the second administrative level does not correspond to the first administrative level, then adopt the original recognition result of the address recognition model and output the original recognition result.
[0045] Please refer to Figure 3 again, which shows another address recognition method provided by an embodiment of the present invention. This flowchart mainly shows the flowchart of the steps further defined for the flowchart Figure 1
[0046] As Figure 3 shown, in step 301, obtain the address text output by the address recognition model;
[0047] In step 302, segment the address text and identify the first administrative level and the second administrative level existing in the address text.
[0048] In this embodiment, for step 301, obtain the address text in the address recognition model, where the address text contains the text of one or more addresses. For step 302, use the sequence labeling model to segment the address text output by the address recognition module, identify each address therein, confirm whether the address in the address text is an address of the first administrative level or the second administrative level, and sort multiple address texts, and the sorting method is sorted according to the administrative level.
[0049] The method of the embodiment of the present application segments and sorts the addresses in the address text, and can more clearly distinguish the administrative structure of the addresses in the address text.
[0050] In some optional embodiments, perform consistency verification on the first administrative level and the second administrative level. For example, after segmenting and sorting the addresses in the address text and confirming the administrative level, verify the addresses of the first administrative level and the second administrative level to confirm whether the addresses of the first administrative level and the second administrative level are legal addresses.
[0051] In some optional embodiments, use the address language model to transcribe the audio to obtain the audio transcription text. Among them, the address language model includes an acoustic model and language models corresponding to multiple cities and provinces. For example, according to the voice information input by the user, the address language model transcribes the voice information of the user into the corresponding language text, and the address language recognition model can recognize multiple cities and the corresponding provinces.
[0052] It should be noted that the address recognition method of the present application is based on the address library matching method and the deep learning model method based on sequence labeling. The sequence labeling model in the deep learning model method is used to replace the place name indexing method in the address library matching method to identify the place names in the text, and then use the address library to restore the hierarchical structure of the identified place names. For the place names not in the address library, the rules in the deep learning model method based on sequence labeling are still used to determine the hierarchy of the place names. At the same time, an address recognition model is introduced. This technology is often used to handle translation problems and it is not easy to think that it can be applied to address recognition problems. The translation scenario also often needs to handle the problem that the order of the input sequence and the output sequence is inconsistent.
[0053] The present invention relates to the following several modules, including an audio transcription text module, which is responsible for transcribing the input audio into text and includes an acoustic model and language models corresponding to multiple cities and provinces; an address library module, which is used to assist in address recognition and verify the legality of the address. Because it only plays an auxiliary role, the integrity of the address library is not required; an address recognition module, which is used to recognize the address text in the audio transcription text and adjust the order of the input addresses; a place name recognition module, which uses a sequence labeling model to segment the address text output by the address recognition module and identify each place name therein.
[0054] The speech recognition module provided by this application: transcribes audio into text:
[0055] 1) Use a general address language model for transcription: The general language model contains address text data from all over the country. It can recognize place names at the provincial and prefecture-level cities well, but due to the huge number of place names in the country, it cannot recognize fine-grained small place names well. Moreover, the homophone situation of place names across the country is relatively serious, making it difficult to distinguish.
[0056] For example, Hongshan District (Wuhan City, Hubei Province) and Hongshan District (Chifeng City, Inner Mongolia Autonomous Region) are difficult to distinguish solely by voice because they have the same pronunciation.
[0057] 2) If in the recognized text of the previous step, if provinces and prefecture-level cities can be matched, then check whether there is a corresponding independent model.
[0058] 3) If there is an independent model, then use the independent model to perform another audio transcription. Because it is limited to the scope of a city at this time, place name recognition will be relatively more accurate.
[0059] For example: When the user says "Guanshan Street, Hongshan District, Wuhan City, Hubei Province", using the place name model of Wuhan City, Hubei Province for recognition will only output Hongshan District, rather than Hongshan District (Inner Mongolia).
[0060] If there is no independent model, then follow the recognition text result of the general model.
[0061] Please refer to Figure 4 , which shows the schematic diagram of the address recognition model network structure of the address recognition method of the present invention.
[0062] As Figure 4 shown, extract the address information in the text and divide it into levels.
[0063] Use the seq2seq model to extract the address in the text and optimize the result in combination with the address library information. The seq2seq network structure diagram is as Figure 4 .
[0064] 1: The text input is "I am in Hongshan District, Wuhan City";
[0065] 2: The seq2seq model will generate "Wu", "Han", "City", "Hong", "Shan", "District" character by character
[0066] 3: After generating "Hong", it will search the address library for place names starting with "Hong" in Wuhan City, Hubei Province. Suppose "Hongshan District / Hongfu Hotel / Hongwu Road" are found, then the next character after "Hong" can only be selected from "Shan, Fu, Wu".
[0067] Identifying the address hierarchy structure using a sequence labeling model: The addresses extracted by the above model are fed into the sequence labeling model to identify the address hierarchy structure.
[0068] For example, "Guanshan Sub-district, Hongshan District, Wuhan City, Hubei Province" => Province = Hubei Province, City = Wuhan City, District = Hongshan District, Sub-district = Guanshan Sub-district.
[0069] Please refer to Figure 5 , which shows the implementation flowchart of the address recognition method of the present invention.
[0070] As Figure 5 shown, 1. Use a general address language model to transcribe the input audio into text.
[0071] 2. Match the province and city in the text through the address library. If the province and city are matched, then verify the consistency of the province and city, and select the combination with the matched province and city.
[0072] 3. If the province and city are matched in the previous step, then select the corresponding language model to re-transcribe the text. If not, skip this step.
[0073] 4. Input the text output in the previous step word by word into the Seq2seq (address recognition model) model, and look up each word output by the Seq2seq model in the address library. If the corresponding place name can be found and the place name is consistent with the previously recognized city and province, then the output of the next step of the Seq2seq model is selected from the next word of the found place name. If the corresponding place name cannot be found, then the original output of the Seq2seq model is still used in the next step, and finally a more regular address text is output.
[0074] 5. Use the sequence labeling model to identify each place name in the address text output in the previous step and output them in the original order.
[0075] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a combination of a series of actions. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention. In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0076] In some embodiments, the embodiments of the present invention provide a non-volatile computer-readable storage medium, in which one or more programs including execution instructions are stored. The execution instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to execute any one of the above address recognition methods of the present invention.
[0077] In some embodiments, the embodiments of the present invention further provide a computer program product. The computer program product includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer is enabled to execute any one of the above address recognition methods.
[0078] In some embodiments, the embodiments of the present invention further provide an electronic device, which includes: at least one processor, and a memory communicatively connected to the at least one processor. Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the address recognition method.
[0079] Figure 6 It is a schematic diagram of the hardware structure of an electronic device for executing the address recognition method provided by another embodiment of the present application. As Figure 6 shown, the device includes:
[0080] One or more processors 610 and a memory 620, Figure 6 Taking one processor 610 as an example.
[0081] The device for executing the address recognition method may further include: an input device 630 and an output device 640.
[0082] The processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or other means, Figure 6 Taking the connection by a bus as an example.
[0083] The memory 620, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the address recognition method in the embodiments of the present application. The processor 610 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in the memory 620, that is, implements the address recognition method in the above method embodiments.
[0084] The memory 620 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the address recognition device, etc. In addition, the memory 620 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 620 may optionally include a memory remotely provided with respect to the processor 610, and these remote memories may be connected to the address recognition device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0085] The input device 630 may receive input digital or character information and generate signals related to user settings and function control of the address recognition device. The output device 640 may include a display device such as a display screen.
[0086] The one or more modules are stored in the memory 620 and, when executed by the one or more processors 610, execute the address recognition method in any of the above method embodiments.
[0087] The above product may execute the method provided in the embodiments of the present application and has function modules and beneficial effects corresponding to the execution of the method. For technical details not described in detail in this embodiment, reference may be made to the method provided in the embodiments of the present application.
[0088] The electronic device in the embodiments of the present application exists in various forms, including but not limited to:
[0089] (1) Mobile communication devices: These devices are characterized by having mobile communication functions and mainly aim to provide voice and data communication. Such terminals include: smart phones, multimedia phones, functional phones, and low-end phones, etc.
[0090] (2) Ultra-mobile personal computer devices: These devices belong to the category of personal computers, have computing and processing functions, and generally also have the characteristic of mobile Internet access. Such terminals include: PDAs, MIDs, and UMPC devices, etc.
[0091] (3) Portable entertainment devices: These devices can display and play multimedia content. Such devices include: audio and video players, handheld game consoles, e-books, and smart toys and portable in-vehicle navigation devices.
[0092] (4) Other airborne electronic devices with data interaction functions, such as in-vehicle device installed on a vehicle.
[0093] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the relevant technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An address recognition method, comprising: Checking whether a first administrative level in a preset address library exists in the text to be recognized; If none of the first administrative levels exist in the text to be recognized, inputting the text to be recognized character by character into an address recognition model, where the address recognition model is used to recognize the address text in the text to be recognized and adjust the order of the address text, and the address recognition model is a Seq2seq model; Obtaining at least one character output by the address recognition model, and checking whether a second administrative level corresponding to the at least one character exists in the preset address library, where the second administrative level includes at least place names below the prefecture-level city, including prefecture-level cities, counties, and districts, and the corresponding second administrative level has the same place name as the previously recognized first administrative level place name; If a second administrative level corresponding to the at least one character exists, selecting the next character in the recognition result of the address recognition model in the second administrative level for output until the output is completed; If no second administrative level corresponding to the at least one character exists, using the original output of the address recognition model, where the original output of the address recognition model is the original recognition result of the address recognition model.
2. The method according to claim 1, wherein, The text to be recognized is a text transcribed from audio. After checking whether a first administrative level in a preset address library exists in the text to be recognized, the method further includes: If any first administrative level exists in the text to be recognized, retranscribing the audio-transcribed text based on the preset address library corresponding to the any first administrative level to obtain a retranscribed text.
3. The method according to claim 2, the method further includes: Inputting the retranscribed text character by character into the address recognition model; Obtaining at least one character output by the address recognition model, and checking whether a second administrative level corresponding to the at least one character exists in the preset address library.
4. The method according to claim 3, the method further includes: If a second administrative level corresponding to the at least one character exists and the second administrative level is in the preset address library corresponding to the first administrative level, selecting the next character output by the address recognition model in the second administrative level until the output is completed.
5. The method according to claim 3, the method further includes: If no second administrative level corresponding to the at least one character exists or a second administrative level corresponding to the at least one character exists but the second administrative level is not in the preset address library corresponding to the first administrative level, using the original output of the address recognition model.
6. The method according to claim 1, the method further includes: Obtaining the address text output by the address recognition model; Segmenting the address text and recognizing the first administrative level and the second administrative level existing in the address text.
7. The method according to claim 6, further includes: Performing consistency verification on the first administrative level and the second administrative level.
8. The method according to claim 1, wherein Before checking whether a first administrative level in a preset address library exists in the text to be recognized, the method further includes: The audio is transcribed using an address language model to obtain an audio transcription text, where the address language model includes an acoustic model and language models corresponding to multiple cities and provinces.
9. An electronic device, comprising: At least one processor, and a memory communicatively connected to the at least one processor, where the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1 to 8.
10. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Chinese address identification method and device
CN110275940A
Address information resolution method, apparatus and device, and storage medium
WO2022134592A1