Region address determination method and device, equipment, storage medium and computer program product
By identifying the address keywords in the target text, determining the regional level, and using the standard regional relationship table to generate the standard address, the incomplete problem of the extraction address information is solved, and the standard regional address is accurately extracted.
Patent Information
- Application Number
- CN202411408366.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art is prone to incomplete problems when extracting address information.
By determining the candidate area address based on the address keywords in the target text, the target area address is determined by the regional level of the candidate area, and the standard area address is generated according to the pre -constructed standard regional relationship table and target area address.
It achieves the accurate extraction of complete standard-level regional addresses from the target text and solves the problem of incomplete address information.
Smart Images

Figure HDA0005079273460000011 
Figure HDA0005079273460000021 
Figure HDA0005079273460000031
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, electronic device, storage medium and computer program product for determining an area address. Background Art
[0002] In many application scenarios, it is necessary to extract address information from the information provided by users, such as delivery address recognition in logistics scenarios, and intelligent customer service identifying addresses from conversation content. Currently, address information can be extracted through regular expressions, word segmentation and part of speech, entity recognition models, etc.
[0003] However, the address information extracted by the current method of extracting address information is prone to incompleteness. Summary of the invention
[0004] The present disclosure provides a method, device, electronic device, storage medium and computer program product for determining an area address.
[0005] One aspect of the present disclosure provides a method for determining a regional address, including: determining a candidate regional address based on an address keyword in a target text; determining a target regional address based on the regional level of the candidate regional address; and generating a standard regional address based on a pre-constructed standard regional relationship table and the target regional address. The method can accurately extract a complete standard-level regional address from the target text.
[0006] In some embodiments, determining the target area address based on the area level of the candidate area address includes: determining the area level of the candidate area address based on a level keyword in the candidate area address, and in response to the same address keyword corresponding to multiple candidate area addresses, disambiguating the multiple candidate area addresses to determine the target area address.
[0007] In some embodiments, disambiguating multiple candidate area addresses to determine a target area address includes: in response to different area levels of the multiple candidate area addresses, determining text positions of the multiple candidate area addresses in the target text; in response to the existence of a candidate area address among the multiple candidate area addresses whose text position covers the text positions of other candidate area addresses, determining the candidate area address as the target area address.
[0008] In some embodiments, disambiguating multiple candidate area addresses to determine the target area address further includes: in response to text positions of the multiple candidate area addresses overlapping with each other, determining a candidate area address with the highest area level among the multiple candidate area addresses as the target area address.
[0009] In some implementations, disambiguating multiple candidate area addresses to determine the target area address includes: in response to the multiple candidate area addresses having the same area level, disambiguating the multiple candidate area addresses to determine the target area address based on other address keywords in the target text.
[0010] In some embodiments, determining the candidate area address based on the address keyword in the target text includes: in response to the presence of a level keyword in the target text, performing full-word matching and omission matching on the target text based on the address keyword to determine the candidate area address; in response to the absence of a level keyword in the target text, performing omission matching on the target text to extract the candidate area address.
[0011] In some embodiments, generating a standard area address based on a pre-constructed standard area relationship table and a target area address includes: correcting the administrative area information in the target area address according to the subordinate relationship between administrative areas at various levels in the standard area relationship table to obtain the standard area address, wherein the standard area address includes first-level administrative area information, second-level administrative area information, and third-level administrative area information.
[0012] Another aspect of the present disclosure provides an area address determination device, including: an extraction module, configured to determine a candidate area address based on an address keyword in a target text; a determination module, configured to determine a target area address based on an area level of the candidate area address; and a generation module, configured to generate a standard area address based on a pre-constructed standard area relationship table and the target area address.
[0013] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement a method for determining a region address as provided in the first aspect.
[0014] Another aspect of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute a method for determining a region address as provided in the first aspect.
[0015] Another aspect of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements a method for determining a region address as provided in the first aspect.
[0016] The method and device for determining an area address provided by the present disclosure determine candidate area addresses based on address keywords in a target text, then determine a target area address based on the area level of the candidate area addresses, and finally generate a standard area address based on a pre-constructed standard area relationship table and the target area address, so that a complete standard-level area address can be extracted from the target text.
[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0019] Figure 1 is an exemplary system architecture diagram in which the present disclosure may be applied;
[0020] Figure 2 is a schematic diagram of a method for determining an area address according to a first embodiment of the present disclosure;
[0021] Figure 3 is a schematic diagram of a method for determining an area address according to a second embodiment of the present disclosure;
[0022] Figure 4 is a schematic diagram of a method for determining an area address according to a third embodiment of the present disclosure;
[0023] Figure 5 is a schematic diagram of a regional address determination device according to a fourth embodiment of the present disclosure;
[0024] Figure 6 The block diagram is a block diagram of an electronic device for implementing the area address determination method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0026] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the area address determination method or area address determination apparatus of the present disclosure can be applied.
[0027] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0028] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, financial applications, computing applications, image applications, video applications, etc.
[0029] The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When the terminal devices 101, 102, 103 are software, they may be installed in the above electronic devices. They may be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0030] The server 105 can provide various services. For example, the server 105 can analyze and process the user voice and action acquired from the terminal devices 101, 102, 103, and generate a processing result (eg, driving a virtual image, etc.).
[0031] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0032] It should be noted that the embodiments of the present disclosure are generally executed by the server 105 , and accordingly, the area address determination device is generally disposed in the server 105 .
[0033] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0034] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for determining an area address according to the present disclosure. The method for determining an area address comprises the following steps:
[0035] Step 201: Determine candidate area addresses based on address keywords in the target text.
[0036] In this embodiment, the execution subject (eg Figure 1 The server 105 shown in FIG. 104 may determine the candidate area address based on the address keywords in the target text. The target text may be a text file that is generated by a user through a terminal device (eg, Figure 1 The information may be input from the terminal devices 101, 102, 103) shown in the figure, or it may be extracted from information on the Internet, which is not limited in the present application.
[0037] The target text is text information containing address keywords, which are words used to indicate regional address information, and may include country names, place names, and administrative district names, etc. For example, the address keyword in the target text "How many people are there in Henan" is "Henan".
[0038] In this embodiment, the candidate area address determined by the execution subject refers to the standard address that matches the address keyword. The standard address is a standard address name provided by an authoritative official. The execution subject can search the Internet for a standard address that matches the address keyword in the target text as a candidate area address. The same address keyword can match one or more standard area addresses. For example, the address keyword "Henan" in the target text "How many people are there in Henan" can match two candidate area addresses, "Henan Province" and "Henan County".
[0039] Step 202: Determine the target area address based on the area level of the candidate area address.
[0040] In this embodiment, after the execution subject obtains the candidate area address, the target area address is determined based on the area level of the candidate area address. The area level includes the first-level area level, the second-level area level, and the third-level area level. For example, when the execution subject obtains only one candidate area address, the candidate area address can be directly determined as the target area address. For another example, when the execution subject obtains multiple candidate area addresses, the target area address can be determined based on the area level of the candidate area address.
[0041] Step 203: Generate a standard area address according to the pre-built standard area relationship table and the target area address.
[0042] In this embodiment, after determining the target area address, the execution subject corrects the administrative area information in the target area address according to the subordinate relationship between administrative areas at all levels in the pre-constructed standard area relationship table to obtain the standard area address.
[0043] In this embodiment, the standard region relationship table contains the relationship between administrative region addresses and administrative region addresses, and the standard region address includes first-level administrative region information, second-level administrative region information, and third-level administrative region information. For example, the first-level administrative region information may be a province, the second-level administrative region information may be a city, and the third-level administrative region information may be a county or district. There is a subordinate relationship between the first-level administrative region information and its corresponding second-level administrative region information, and there is a subordinate relationship between the second-level administrative region and its corresponding third-level administrative region information. The standard region relationship table can be stored in a table, a matrix, a knowledge graph, and the like.
[0044] In this embodiment, the execution subject can complete and / or merge the administrative area information in the target area address according to the subordinate relationship between the administrative area addresses of each level in the pre-constructed standard area relationship table to obtain the standard area address. For example, the target text is "How many people are there in Wuhou District", and the target area address obtained is "Wuhou District". According to the subordinate relationship of "Wuhou District", the target area address is completed to "Sichuan Province-Chengdu City-Wuhou District"; for another example, the target text is "Are there many people from Chengdu Wuhou District who travel to Shanghai on business", and the target area addresses obtained are "Chengdu Province", "Wuhou District", and "Shanghai City". The target area addresses are merged and completed to "Sichuan Province-Chengdu City-Wuhou District" and "Shanghai City-Empty-Empty".
[0045] The regional address determination method provided in this embodiment determines the candidate regional address based on the address keywords in the target text, determines the target regional address based on the regional level of the candidate regional address, and generates the standard regional address based on the pre-built standard regional relationship table and the target regional address. This embodiment extracts the standard regional address from the target text based on the standard regional relationship table, which can be flexibly applied to different business systems as needed, thereby improving the versatility of the standard regional address.
[0046] Further reference Figure 3 , which shows a process 300 of another embodiment of the method for determining an area address according to the present disclosure. The method for determining an area address comprises the following steps:
[0047] Step 301: Determine candidate area addresses based on address keywords in the target text.
[0048] In this embodiment, the specific operation of step 301 is already Figure 2 In the illustrated embodiment, step 201 is introduced in detail and will not be repeated here.
[0049] Step 302: Determine the area level of the candidate area address based on the level keyword in the candidate area address.
[0050] In this embodiment, the execution subject can determine the regional level of the candidate regional address based on the level keyword in the candidate regional address. The level keyword refers to a word used to identify the regional level, and the regional level includes the first-level regional level, the second-level regional level, and the third-level regional level. For example, the level keyword can be "province", "city", "county" and "district", "province" corresponds to the regional level, "city" corresponds to the second-level regional level, and "county" and "district" correspond to the third-level regional level.
[0051] Step 303: In response to the same address keyword corresponding to multiple candidate area addresses, disambiguate the multiple candidate area addresses to determine a target area address.
[0052] In this embodiment, when the above-mentioned execution subject determines that the same address keyword in the target text corresponds to multiple candidate area addresses, it disambiguates the multiple candidate area addresses to determine the target area address. When the address information in the target text is incomplete, the same address keyword in the target text may correspond to multiple candidate area addresses, that is, the problem of ambiguous addresses with the same name will arise. For example, the target text is "How many people are there in Henan", and the candidate area addresses corresponding to the address keyword "Henan" are "Henan Province" and "Henan County". Therefore, this embodiment removes the ambiguous candidate area addresses by disambiguating the candidate area addresses, and uses the unambiguous candidate area addresses as the target area addresses.
[0053] Furthermore, step 303 may adopt the following steps to disambiguate multiple candidate area addresses to determine the target area address:
[0054] Step 3031, in response to the different area levels of the multiple candidate area addresses, determining the text positions of the multiple candidate area addresses in the target text.
[0055] In this embodiment, when the regional levels of multiple candidate regional addresses are different, the text positions of the multiple candidate regional addresses in the target text are first determined. The text position is the position of the address keyword corresponding to the candidate regional address in the target text. In step 301, the text position of the address keyword can be obtained in the process of matching the candidate regional address based on the address keyword in the target text. The text position is expressed in the form of first word position + separator + last word position, wherein the first word position is the position of the first word of the address keyword corresponding to the text position in the target text, and the last word position is the position of the last word of the address keyword corresponding to the text position in the target text. For example, the target text is "How many people are there in Henan", and the address keywords corresponding to the candidate regional addresses "Henan Province" and "Henan County" are both "Henan", so the text positions of the candidate regional addresses "Henan Province" and "Henan County" are both "0-1".
[0056] In this embodiment, after determining the text positions of multiple candidate area addresses in the target text, the above-mentioned execution subject can also determine the relationship between the text positions of the candidate area addresses in the multiple candidate area addresses. Specifically, the execution subject can determine the text position length by the difference between the last word position and the first word position of the text position. When the text position lengths of different candidate area addresses are different, it means that the text position of the candidate area address with the largest text position length covers the text positions of other candidate area addresses that are smaller than the text position length of the candidate area address, and the following step 3032 is executed at this time; when the text position lengths of different candidate area addresses are the same, it means that the text positions of different candidate area addresses overlap with each other, and the following step 3033 is executed at this time.
[0057] Step 3032: In response to the text position of one candidate area address among the multiple candidate area addresses covering the text positions of other candidate area addresses, the candidate area address is determined as the target area address.
[0058] In this embodiment, when the execution subject determines that the text position of one candidate area address among multiple candidate area addresses covers the text position of other candidate area addresses, the candidate area address is determined as the target area address. For example, the target text is "How many people are there in Henan Province", the text position of the candidate area address "Henan Province" is "0-2", and the text position of the candidate area address "Henan County" is "0-1". Since the text position length of the candidate area address "Henan Province" is 2, and the text position length of the candidate area address "Henan County" is 1, the text position length of the candidate area address "Henan Province" is greater than the text position length of the candidate area address "Henan County", and the candidate area address "Henan Province" is determined as the target area address.
[0059] Step 3033: In response to the text positions of the multiple candidate area addresses overlapping with each other, the candidate area address with the highest area level among the multiple candidate area addresses is determined as the target area address.
[0060] In this embodiment, when the execution subject determines that the text positions of multiple candidate area addresses overlap, the candidate area address with the highest area level among the multiple candidate area addresses is determined as the target area address. For another example, the target text is "How many people are there in Henan", the text positions of the candidate area addresses "Henan Province" and "Henan County" are both "0-1", the text position lengths of the two candidate area addresses are both 1, and the text positions of the candidate area addresses "Henan Province" and "Henan County" overlap. At this time, since the area level of the candidate area address "Henan Province" is the first-level area level, and the area level of the candidate area address "Henan County" is the third-level area level, the candidate area address "Henan Province" with a higher area level is determined as the target area address.
[0061] In some optional modes of this embodiment, the above-mentioned disambiguation of multiple candidate area addresses to determine the target area address also includes: in response to the multiple candidate area addresses having the same area level, disambiguating the multiple candidate area addresses to determine the target area address according to other address keywords in the target text. In this embodiment, when the area levels of multiple candidate area addresses are the same, the corresponding relevant candidate area addresses are determined according to other address keywords in the target text, and it is determined whether there is a candidate area address in the multiple candidate area addresses that has a subordinate relationship with the relevant candidate area address. If so, the candidate area address in the subordinate relationship with the relevant candidate area address is determined as the target area address, and if not, all the multiple candidate area addresses are determined as the target area address. For example, the target text is "How many people are there in Xinhua District, Pingdingshan City?", and the candidate area addresses corresponding to the address keyword "Xinhua District" in the target text are "Xinhua District (Pingdingshan City, Henan Province)" and "Xinhua District (Cangzhou City, Hebei Province)". Since the area levels of these two candidate area addresses are both level three, the relevant candidate area address corresponding to another address keyword "Pingdingshan City" in the target text is judged to be "Pingdingshan City". Since the relevant candidate area address "Pingdingshan City" is the parent candidate area address of the candidate area address "Xinhua District (Pingdingshan City, Henan Province)", the candidate area address "Xinhua District (Pingdingshan City, Henan Province)" is determined as the target area address.
[0062] Step 304: Generate a standard area address according to the pre-built standard area relationship table and the target area address.
[0063] In this embodiment, the specific operation of step 304 is already Figure 2 Step 203 is described in detail in the illustrated embodiment and will not be described again here.
[0064] from Figure 3 It can be seen that Figure 2 Compared with the corresponding embodiments, after the regional address determination method in this embodiment determines the candidate regional address from the target text, when the same address keyword in the target text determines multiple candidate regional addresses, the candidate regional addresses can be disambiguated according to the regional levels of the candidate regional addresses, and the ambiguous candidate regional addresses can be removed, which can not only save storage resources but also obtain a more accurate target regional address, and then generate a standard regional address based on the target regional address.
[0065] Further reference Figure 4 , which shows a process 400 of another embodiment of the method for determining an area address according to the present disclosure. The method for determining an area address comprises the following steps:
[0066] In this embodiment, after receiving the target text, the execution subject may also determine whether there is a level keyword in the target text, and if so, execute the following step 401 ; if not, execute the following step 402 .
[0067] Step 401: In response to the presence of a level keyword in a target text, a full-word match and an omitted match are performed on the target text based on an address keyword to determine a candidate area address.
[0068] In this embodiment, when there are level keywords in the target text, based on the address keyword, the target text is first matched with all words according to the standard relationship area table to determine the first candidate area address, and then the target text is matched with omissions according to the standard relationship area table to determine the second candidate area address, and then the first candidate area address and the second candidate area address are merged to determine the candidate area address.
[0069] In the present embodiment, full-word matching means that when there are level keywords such as "province", "city", "county" and "district" in the target text, the regional address information with the level keywords in the target text can be determined as the address keyword. At this time, by matching the address keyword and the administrative area address in the standard relationship area table word by word, the administrative area address that is completely consistent with the address keyword is determined as the candidate area address. For example, the target text is "How many people are there in Xinhua District", and since there is a level keyword "district" in the target text, the target text is matched with full words, and "Xinhua District" is matched according to the standard area relationship table as the address keyword, and the candidate area addresses "Xinhua District (Pingdingshan City, Henan Province)" and "Xinhua District (Cangzhou City, Hebei Province)" are obtained. By matching the target text with full words, the text position of the candidate area address corresponding to the address keyword can be accurately located, which can be used to disambiguate multiple candidate area addresses in step 302.
[0070] In this embodiment, omitted matching means that when there are no level keywords such as "province", "city", "county" and "district" in the target text, the regional address information without the level keywords in the target text can be determined as the address keyword. At this time, when matching the address keyword with the administrative area address in the standard relationship area table, it is only necessary to match the address keyword with the part of the administrative area address that does not contain the level keyword. By performing omitted matching on the target text, as much of the information indicating the regional address in the target text as possible can be extracted as the address keyword for matching, avoiding missing the regional address information due to the lack of level keywords when extracting the candidate regional address from the target text, resulting in incomplete extracted candidate regional addresses.
[0071] Step 402: In response to the absence of the level keyword in the target text, perform omission matching on the target text to extract candidate region addresses.
[0072] In this embodiment, when there is no level keyword in the target text, the target text is directly omit-matched according to the standard region relationship table to determine the candidate region address. For example, the target text is "How many people are there in Henan?" Since there is no level keyword in the target text, the target text is directly omit-matched, and the candidate region addresses are "Henan Province" and "Henan County".
[0073] Step 403: Determine the area level of the candidate area address based on the level keyword in the candidate area address.
[0074] In this embodiment, the specific operation of step 403 is already Figure 3 Step 302 is described in detail in the illustrated embodiment and will not be described again here.
[0075] Step 404: In response to the same address keyword corresponding to multiple candidate area addresses, disambiguate the multiple candidate area addresses to determine a target area address.
[0076] In this embodiment, the specific operation of step 404 is already in Figure 3 Step 303 is described in detail in the illustrated embodiment and will not be described again here.
[0077] Step 405: Generate a standard area address according to the pre-built standard area relationship table and the target area address.
[0078] In this embodiment, the specific operation of step 304 is already Figure 2 Step 203 is described in detail in the illustrated embodiment and will not be described again here.
[0079] from Figure 4 It can be seen that Figure 3 Compared with the corresponding embodiments, the area address determination method in this embodiment, when determining the candidate area address, determines whether there is a level keyword in the target text. According to different judgment results, different methods are adaptively used for different target texts to quickly extract the complete candidate area address from the target text, and then generate a standard area address.
[0080] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for determining a region address. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0081] like Figure 5As shown, the regional address determination device 500 of this embodiment may include a first determination module 501, a second determination module 502 and a generation module 503. The first determination module 501 is configured to determine the candidate regional address based on the address keywords in the target text; the second determination module 502 is configured to determine the target regional address based on the regional level of the candidate regional address; the generation module 503 is configured to generate the standard regional address according to the pre-constructed standard regional relationship table and the target regional address.
[0082] In this embodiment, in the area address determination device 500, the specific processing of the first determination module 501, the second determination module 502 and the generation module 503 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of steps 201 - 203 in the corresponding embodiment are not repeated here.
[0083] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0084] like Figure 6 As shown, the electronic device includes: one or more processors 601, a memory 602, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 601 is taken as an example.
[0085] The memory 602 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the method for determining the regional address provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the method for determining the regional address provided in the present application.
[0086] The memory 602 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the method for determining the area address in the embodiment of the present application (for example, the attached Figure 5The processor 601 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 602, that is, the method for determining the regional address in the above method embodiment is implemented.
[0087] The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device for generating information, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 602 may optionally include a memory remotely arranged relative to the processor 601, and these remote memories may be connected to the electronic device for generating information 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.
[0088] The electronic device of the area address determination method may further include: an input device 603, an output device 604, and a bus 605. The processor 601, the memory 602, the input device 603, and the output device 604 may be connected via the bus 605 or in other ways. Figure 6 The connection via bus 605 is taken as an example.
[0089] The input device 603 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device determined by the area address, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, and other input devices. The output device 604 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
[0090] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0091] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0092] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0093] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0094] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0095] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0096] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for determining an area address, comprising: Determine candidate area addresses based on address keywords in the target text; Determine a target area address based on the area level of the candidate area address; A standard area address is generated according to a pre-constructed standard area relationship table and the target area address.
2. The method according to claim 1, wherein: Determining the target area address based on the area level of the candidate area address includes: Determining the area level of the candidate area address based on the level keyword in the candidate area address; In response to the same address keyword corresponding to multiple candidate area addresses, the multiple candidate area addresses are disambiguated to determine the target area address.
3. The method according to claim 2, wherein: The disambiguating the multiple candidate area addresses to determine the target area address comprises: In response to different region levels of the plurality of candidate region addresses, determining text positions of the plurality of candidate region addresses in the target text; In response to the text position of one candidate area address among the multiple candidate area addresses covering the text positions of other candidate area addresses, the candidate area address is determined as the target area address.
4. The method according to claim 3, wherein: The disambiguating the multiple candidate area addresses to determine the target area address further comprises: In response to the text positions of the multiple candidate area addresses being overlapped with each other, a candidate area address with the highest area level among the multiple candidate area addresses is determined as a target area address.
5. The method according to claim 2, wherein: Disambiguating the multiple candidate area addresses to determine the target area address includes: In response to the multiple candidate area addresses having the same area level, the multiple candidate area addresses are disambiguated according to other address keywords in the target text to determine a target area address.
6. The method according to claim 1, wherein: Determining the candidate area address based on the address keywords in the target text includes: In response to the presence of a level keyword in the target text, performing full-word matching and omitted matching on the target text based on the address keyword to determine a candidate area address; In response to the absence of the level keyword in the target text, omission matching is performed on the target text to extract candidate area addresses.
7. The method according to any one of claims 1 to 6, wherein: The generating of the standard area address according to the pre-built standard area relationship table and the target area address comprises: According to the subordinate relationship between administrative regions at all levels in the standard region relationship table, the administrative region information in the target region address is corrected to obtain a standard region address; The standard area address includes first-level administrative district information, second-level administrative district information and third-level administrative district information.
8. A device for determining an area address, the device comprising: A first determination module is configured to determine a candidate area address based on address keywords in the target text; A second determination module is configured to determine a target area address based on an area level of the candidate area address; The generating module is configured to generate a standard area address according to a pre-built standard area relationship table and the target area address.
9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed 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 method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.