An administrative address extraction method, device and equipment and a storage medium

By splitting, deleting, and merging the sequence of administrative address elements, and combining administrative address codes and hierarchical relationships, the problem of extracting the fourth-level administrative address of non-standard addresses in logistics orders was solved, thereby improving the accuracy and efficiency of logistics delivery.

CN115544979BActive Publication Date: 2026-06-26SHENZHEN LEAPFROG NEW TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN LEAPFROG NEW TECH CO LTD
Filing Date
2022-09-30
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies cannot effectively extract administrative level four address information from logistics orders where users have entered non-standard addresses, which increases the difficulty of address resolution and reduces the timeliness and accuracy of logistics delivery.

Method used

By obtaining the sequence of administrative address elements, splitting or deleting them using the administrative address code, and combining the hierarchical relationship, character inclusion relationship, and administrative level of the address elements, the fourth-level administrative address is determined.

Benefits of technology

It improved the accuracy of retrieving administrative level 4 addresses, ensuring the timeliness and accuracy of logistics, and avoiding the impact of duplicate and non-standard address names.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115544979B_ABST
    Figure CN115544979B_ABST
Patent Text Reader

Abstract

The application discloses an administrative address extraction method, device and equipment and a storage medium. The method comprises the following steps: acquiring an administrative address element sequence obtained by matching a preset address element with a current address to be extracted, wherein the administrative address element sequence comprises a plurality of administrative address elements arranged in a matching order, and the administrative address element comprises an administrative address name and an administrative address code; when a plurality of administrative addresses or one administrative address is extracted, performing administrative address element splitting or deleting processing on the administrative address element sequence according to the administrative address code to obtain a new administrative address element sequence; and determining an administrative four-level address corresponding to the new administrative address element sequence according to a preset address element extraction logic. The method disclosed by the application can meet the demand for extracting one or more administrative four-level addresses in different scenarios, improve the correctness of extracting the administrative four-level address, and ensure the timeliness and accuracy of logistics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of address data processing technology, specifically to an administrative address extraction method, apparatus, device, and storage medium. Background Technology

[0002] In the logistics industry, after receiving a customer's order, delivery needs to be made according to the address on the order. With the rapid development of the logistics industry and the continuous increase in order volume, the requirements for the timeliness and accuracy of logistics delivery are also increasing. However, some customers fill in addresses that are not standardized, and using existing address resolution schemes, it is impossible to extract the correct administrative level four address information. This greatly increases the difficulty of address resolution and significantly increases the operating costs of enterprises, thereby reducing the timeliness and accuracy of logistics delivery. Summary of the Invention

[0003] This invention provides an administrative address extraction method, apparatus, device, and storage medium to solve the technical problem in the prior art that the correct administrative fourth-level address information cannot be extracted.

[0004] To address the aforementioned technical problems, in a first aspect, the present invention provides an administrative address extraction method, the method comprising:

[0005] Obtain the sequence of administrative address elements obtained by matching the current address to be extracted with preset address elements, wherein the sequence of administrative address elements includes several administrative address elements arranged in matching order, and the administrative address elements include administrative address name and administrative address code;

[0006] When it is determined to extract multiple or one administrative address, the administrative address element sequence is split or deleted according to the administrative address code to obtain a new administrative address element sequence;

[0007] Based on the preset address element extraction logic, the administrative level four address corresponding to the new administrative address element sequence is determined.

[0008] Optionally, when determining to extract multiple administrative addresses, the administrative address element sequence is split into administrative address elements according to the administrative address code, including:

[0009] Determine the hierarchical relationship between the administrative address elements, and split the administrative address elements that have a hierarchical relationship and are arranged in adjacent positions into the same administrative address element sequence.

[0010] Optionally, when determining to extract an administrative address, the administrative address element sequence is subjected to administrative address element deletion processing according to the administrative address code, including:

[0011] Determine the hierarchical relationship between the administrative address elements, and delete the administrative address elements in the sequence that do not have a hierarchical relationship with the administrative address element in the first position.

[0012] Optionally, based on a preset address element extraction logic, the administrative level four address corresponding to the new administrative address element sequence is determined, including:

[0013] Based on the administrative address name, several administrative address elements in the new administrative address element sequence that have a character inclusion relationship and are arranged in adjacent positions are filtered, and the administrative address element with the most characters in its administrative address name is retained.

[0014] Based on the new administrative address element sequence after filtering, the corresponding administrative level four address is determined.

[0015] Optionally, based on a preset address element extraction logic, the administrative level four address corresponding to the new administrative address element sequence is determined, including:

[0016] Based on the administrative address level determined by the administrative address code, administrative address elements in the new administrative address element sequence that have a higher administrative address level than the administrative address element that appears earlier in the sequence are deleted.

[0017] Based on the new sequence of administrative address elements after deletion, the corresponding fourth-level administrative address is determined.

[0018] Optionally, based on a preset address element extraction logic, the administrative level four address corresponding to the new administrative address element sequence is determined, including:

[0019] Based on the administrative address name, administrative address elements with the same administrative address name and adjacent positions in the new administrative address element sequence are merged.

[0020] Based on the new sequence of administrative address elements after merging, the corresponding fourth-level administrative address is determined.

[0021] Optionally, the process may include the following steps before determining the corresponding administrative level four address:

[0022] The administrative address element also includes the administrative address level;

[0023] The administrative address code of the administrative address element with the lowest administrative address level in the new administrative address element sequence after processing is retained, and the administrative address element that appears first is completed based on the administrative address code.

[0024] In a second aspect, the present invention provides an administrative address extraction device, including a sequence acquisition module, a sequence update module and an address determination module;

[0025] The sequence acquisition module is used to acquire an administrative address element sequence obtained by matching preset address elements with the current address to be extracted, wherein the administrative address element sequence includes several administrative address elements arranged in matching order, and the administrative address elements include administrative address name and administrative address code;

[0026] The sequence update module is used to determine whether to extract multiple or one administrative address, and to perform administrative address element splitting or deletion processing on the administrative address element sequence according to the administrative address code to obtain a new administrative address element sequence.

[0027] The address determination module is used to determine the administrative level four address corresponding to the new administrative address element sequence according to the preset address element extraction logic.

[0028] Thirdly, the present invention provides an administrative address extraction device, comprising a memory and a processor, wherein:

[0029] The memory is used to store computer programs;

[0030] The processor is used to read the program in the memory and execute the steps of the administrative address extraction method provided in the first aspect above.

[0031] Fourthly, the present invention provides a computer-readable storage medium having a readable computer program stored thereon, which, when executed by a processor, implements the steps of the administrative address extraction method provided in the first aspect above.

[0032] Compared with the prior art, the administrative address extraction method, apparatus, device, and storage medium provided by the present invention have the following beneficial effects:

[0033] It can meet the needs of extracting one or more administrative level 4 addresses in different scenarios, improve the accuracy of administrative level 4 address extraction, and ensure the timeliness and accuracy of logistics. By retaining the administrative address element with the most characters in the administrative address name, the accuracy of extracting administrative level 4 addresses can be improved. By deleting administrative address elements with higher administrative address levels than the administrative address element that appears earlier in the sequence, the administrative address elements in the administrative level 4 address are sorted according to their administrative address level, ensuring the accuracy of logistics. By merging administrative address elements with the same administrative address name and adjacent positions in the sequence, the duplication of administrative address names in the administrative level 4 address can be avoided. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and not all embodiments. For those skilled in the art, other drawings obtained from these drawings without creative effort are all within the scope of protection of this application.

[0035] Figure 1 This is a flowchart illustrating an administrative address extraction method provided in an embodiment of the present invention;

[0036] Figure 2 This is a schematic diagram of the structure of an administrative address extraction device provided in an embodiment of the present invention;

[0037] Figure 3 This is a schematic diagram of the structure of an administrative address extraction device provided in an embodiment of the present invention;

[0038] Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0040] To make the description of this disclosure more detailed and complete, illustrative descriptions of embodiments and specific examples of the present invention are provided below; however, these are not the only forms of implementing or utilizing the specific embodiments of the present invention. The embodiments cover features of multiple specific embodiments and the methods, steps, and their order for constructing and operating these specific embodiments. However, other specific embodiments may also be used to achieve the same or equivalent functions and step sequences. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.

[0041] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0042] Example 1

[0043] like Figure 1The diagram shown is a flowchart illustrating an administrative address extraction method provided in an embodiment of the present invention. This administrative address extraction method includes the following steps:

[0044] Step S101: Obtain the sequence of administrative address elements obtained by matching the current address to be extracted with preset address elements, wherein the sequence of administrative address elements includes several administrative address elements arranged in matching order, and the administrative address elements include administrative address name and administrative address code;

[0045] The above-mentioned address to be extracted is the address input by the user. Regarding the specific implementation of the above-mentioned address to be extracted, such as format, completeness, and number of addresses contained, the embodiments of the present invention do not impose any limitations.

[0046] The above-mentioned administrative address names and administrative address codes conform to the national standards for administrative divisions and administrative division codes. For example, the above-mentioned administrative address name can be "Guangdong Province" or "Bao'an District"; the administrative address code corresponding to the above-mentioned administrative address name "Bao'an District" is "440306000000".

[0047] The aforementioned administrative address element includes an administrative address name and an administrative address code. The specific implementation of the aforementioned administrative address element can be set according to the specific implementation scenario. This embodiment of the invention does not impose any limitations on this. For example, the aforementioned administrative address element can be "(administrative address name 1, administrative address code 1)", such as "(Bao'an District, 440306000000)"; or "administrative address name 1 administrative address code 1", such as "Bao'an District 440306000000", etc.

[0048] The specific implementation of the above-mentioned administrative address element sequence can be specifically set according to the specific implementation of the above-mentioned administrative address element. For example, the form of the above-mentioned administrative address element sequence can be "(administrative address name 1, administrative address code 1), (administrative address name 2, administrative address code 2)...", where "(administrative address name 1, administrative address code 1)" is an administrative address element.

[0049] It should be noted that the above administrative address element sequence may include not only administrative address elements related to the fourth-level administrative address, but also other address names unrelated to the fourth-level administrative address. However, these other address names do not have corresponding address codes. For example, the above administrative address element sequence could be "(Administrative Address Name 1, Administrative Address Code 1), (Administrative Address Name 2, Administrative Address Code 2), (Administrative Address Name 3, Administrative Address Code 3), (Administrative Address Name 4, Administrative Address Code 4), Other Address Names".

[0050] Step S102: When it is determined that multiple or one administrative address needs to be extracted, the administrative address element sequence is split or deleted according to the administrative address code to obtain a new administrative address element sequence.

[0051] The embodiments of the present invention do not limit the specific implementation of the above-described method for determining and extracting multiple or one administrative addresses. Any implementation method that can determine and extract multiple or one administrative addresses can be applied to the embodiments of the present invention. For example, multiple or one administrative addresses can be determined and extracted by responding to instructions, identifying whether there are multiple administrative addresses by text recognition, or according to preset requirements.

[0052] The aforementioned administrative address elements can form one or more administrative addresses.

[0053] Implementation Method 1: When determining to extract multiple administrative addresses, the administrative address element sequence is split according to the aforementioned administrative address codes to obtain one or more new administrative address element sequences. For example, if the aforementioned administrative address elements include "Guangdong Province, Bao'an District", the administrative address element sequence is split to obtain a new administrative address element sequence of "Guangdong Province, Bao'an District". Similarly, if the aforementioned administrative address elements include "Guangdong Province, Bao'an District, Beijing, Chaoyang District", the administrative address element sequence is split to obtain two new administrative address element sequences: "Guangdong Province, Bao'an District" and "Beijing, Chaoyang District".

[0054] The above-mentioned determination to extract multiple administrative addresses refers to processing the above-mentioned administrative address element sequence for the purpose of extracting multiple administrative addresses, and does not guarantee that multiple new administrative address element sequences will be obtained.

[0055] In the above description of the implementation method, the administrative address codes of all administrative address elements are omitted, and only the administrative address names are used to replace the administrative address elements. The same substitution method may appear in the following description. It is only an abbreviation for the convenience of expression and does not represent a limitation on the administrative address elements. It will not be repeated hereafter.

[0056] It should be noted that the above-mentioned splitting of administrative address elements is to split administrative address elements from the original sequence of administrative address elements into a new sequence of administrative address elements, rather than splitting the internal composition of administrative address elements.

[0057] Implementation Method 2: When determining to extract an administrative address, based on the aforementioned administrative address code, the administrative address element sequence is processed by deleting administrative address elements to obtain a new administrative address element sequence. For example, if the aforementioned administrative address elements include "Guangdong Province, Bao'an District, Beijing, Chaoyang District", then "Guangdong Province, Bao'an District" can be deleted to obtain a new administrative address element sequence of "Beijing, Chaoyang District"; alternatively, "Beijing, Chaoyang District" can be deleted to obtain a new administrative address element sequence of "Guangdong Province, Bao'an District".

[0058] Step S103: Determine the administrative level four address corresponding to the new administrative address element sequence according to the preset address element extraction logic.

[0059] The embodiments of the present invention do not limit the specific implementation of the above-mentioned address element extraction logic. Any implementation of the address element extraction logic that can extract the fourth-level administrative address can be applied to the embodiments of the present invention. For example, the deletion processing logic, the filtering processing logic, the merging processing logic, the sorting position of the administrative address element in the administrative address element sequence, etc.

[0060] As an optional implementation method, determining the administrative level four address corresponding to the above-mentioned new administrative address element sequence includes:

[0061] Output the administrative address names of the administrative address elements in the new sequence of administrative address elements according to their sorting positions, and associate them with the administrative division levels respectively;

[0062] The administrative address code of the last administrative address element in the new administrative address element sequence is retained.

[0063] The aforementioned Level 4 administrative addresses conform to the national administrative division standards, including at least one of the four administrative division levels: province, city, district / county, and town / township / street, as well as the administrative address code corresponding to the lowest administrative division level. For example, a Level 4 administrative address includes: 'Province': 'Guangdong Province', 'City': 'Shenzhen City', 'District': 'Bao'an District', 'adcode': '440306000000', where the adcode is the administrative address code.

[0064] It should be noted that when determining to extract multiple administrative addresses, the final number of administrative level 4 addresses obtained is consistent with the number of new administrative address element sequences obtained; when determining to extract only one administrative address, a final administrative level 4 address is obtained.

[0065] The embodiments of the present invention can meet the needs of extracting one or more administrative level 4 addresses in different scenarios, improve the accuracy of extracting administrative level 4 addresses, and ensure the timeliness and accuracy of logistics.

[0066] It should be noted that the embodiments of the present invention do not limit the specific implementation of the above-mentioned method of obtaining the administrative address element sequence by matching the preset address elements of the current address to be extracted. Any implementation method that can obtain the above-mentioned administrative element sequence can be applied to the embodiments of the present invention, such as trie, administrative address database matching, etc.

[0067] As an optional implementation, the above-mentioned method of obtaining an administrative address element sequence by matching preset address elements of the current address to be extracted includes:

[0068] Construct an address dictionary that includes administrative level four address information; the administrative level four address information includes administrative address code, administrative address name, and address latitude and longitude information.

[0069] In some implementation scenarios, information such as the administrative address name, and / or administrative address affiliation, and / or administrative address level, and / or administrative address code of a Level 4 administrative address may change. By constructing an address dictionary for Level 4 administrative addresses, the address dictionary can be directly modified in implementation scenarios where the aforementioned Level 4 administrative address information changes. This facilitates rapid maintenance of Level 4 administrative address information and avoids errors in Level 4 administrative address extraction due to failure to respond promptly to updates.

[0070] Based on the address dictionary, construct an address information object (addressInfo) that includes the above-mentioned administrative level four address information, and construct an AC automaton dictionary tree;

[0071] In constructing the AC automaton dictionary tree, the abbreviation and full name of the administrative address name are determined. The abbreviation and full name of the administrative address name are used as words to construct the AC automaton dictionary tree. The words corresponding to the abbreviation and full name of the administrative address name of the same administrative address are set to point to the same address information object.

[0072] Using administrative address names to determine the abbreviation and full name, such as the full name of Beijing Municipality being Beijing Municipality and the abbreviation being Beijing; and the full name of Xinjiang Uygur Autonomous Region being Xinjiang Uygur Autonomous Region and the abbreviation being Xinjiang, can improve the accuracy of matching administrative addresses at the fourth level.

[0073] The administrative level 4 address information in the AC automaton trie is used as a preset address element; the preset address element is matched against the current address to be extracted; if the text in the AC automaton trie matches the word, the matched word and the attributes of the corresponding address information object are returned; the attributes include administrative address code, administrative address name, address longitude, address latitude, and administrative address level; based on the returned word and address information object, the administrative address name and administrative address code of the address are parsed and returned as the administrative address element sequence.

[0074] In some embodiments, when determining to extract multiple administrative addresses, the administrative address element sequence is split into administrative address elements according to the aforementioned administrative address code, including:

[0075] Determine the hierarchical relationship between the above administrative address elements, and split the administrative address elements that have a hierarchical relationship and are arranged in adjacent positions into the same administrative address element sequence.

[0076] In one specific embodiment, when determining to extract multiple administrative addresses, the hierarchical relationship between the aforementioned administrative address elements is determined, that is, the hierarchical relationship between the administrative address names among the aforementioned administrative address elements is determined. If there is a hierarchical relationship between the multiple administrative address elements and their sorting positions are adjacent, then these administrative address elements are split into the same administrative address element sequence; if the aforementioned administrative address elements contain multiple non-hierarchical administrative address elements, then the multiple non-hierarchical administrative address elements are split into different administrative address element sequences respectively.

[0077] If multiple administrative address elements have a subordinate relationship in terms of administrative division, that is, the first administrative address element belongs to or is subordinate to the second administrative address element, for example, Shenzhen belongs to Guangdong Province, or Guangdong Province is subordinate to Shenzhen, or multiple administrative address elements are the same, for example, two administrative address elements are both Shenzhen, then there is a subordinate relationship between the above multiple administrative address elements, which will not be elaborated further.

[0078] Specifically, the numbers at different positions in the above-mentioned administrative address codes represent administrative addresses at different administrative division levels. If the numbers at the positions representing administrative addresses at the same administrative division level are the same in the administrative address codes of several administrative address elements, it is determined that the above-mentioned administrative address elements have a subordinate relationship, which will not be elaborated further.

[0079] As one implementation method, the aforementioned administrative address elements include "Guangdong Province, Bao'an District, Beijing, Chaoyang District". When determining to extract multiple administrative addresses, the aforementioned administrative address element sequence is split into administrative address elements to obtain a first new administrative address element sequence including "Guangdong Province, Bao'an District" and a second new administrative address element sequence including "Beijing, Chaoyang District".

[0080] As another implementation method, the aforementioned administrative address elements include "Beijing, Guangdong, Shenzhen, Bao'an District, Hangcheng Subdistrict, Beijing, Chaoyang District". When determining to extract multiple administrative addresses, the above administrative address element sequence is split into administrative address elements to obtain a third new administrative address element sequence including "Beijing", a fourth new administrative address element sequence including "Guangdong, Shenzhen, Bao'an District, Hangcheng Subdistrict", and a fifth new administrative address element sequence including "Beijing, Chaoyang District".

[0081] In this embodiment of the invention, administrative address elements that have a subordinate relationship and are arranged in adjacent positions in the above-mentioned administrative address element sequence are split into the same administrative address element sequence, which can accurately extract multiple administrative addresses.

[0082] In some embodiments, when determining to extract an administrative address, administrative address element deletion processing is performed on the administrative address element sequence based on the aforementioned administrative address code, including:

[0083] Determine the hierarchical relationship between the above administrative address elements, and delete the administrative address elements in the above administrative address element sequence that do not have a hierarchical relationship with the administrative address element that is first in the sequence.

[0084] In one specific embodiment, when determining the extraction of an administrative address, the hierarchical relationship between the aforementioned administrative address elements, that is, the hierarchical relationship between the administrative address names among the aforementioned administrative address elements, is considered. If, in the sequence of administrative address elements, there exists an administrative address element that does not have a hierarchical relationship with the administrative address element in the first position of the sequence, then that administrative address element is deleted.

[0085] As one implementation method, the aforementioned administrative address elements include "Guangdong Province, Beijing, Bao'an District". When determining to extract an administrative address, the aforementioned administrative address elements are deleted. Among the aforementioned administrative address elements, the first administrative address name is Guangdong Province, and the second administrative address name is Beijing. Since Beijing is not subordinate to Guangdong Province, this administrative address element is deleted, resulting in a new sequence of administrative address elements, which includes "Guangdong Province, Bao'an District".

[0086] This invention eliminates interfering administrative address elements in the above-mentioned administrative address element sequence by deleting administrative address elements that do not have a subordinate relationship with the administrative address element in the first position of the sequence.

[0087] In some embodiments, the administrative level four address corresponding to the new administrative address element sequence is determined according to a preset address element extraction logic, including:

[0088] Based on the above administrative address names, several administrative address elements in the above new administrative address element sequence that have character inclusion relationships and are arranged in adjacent positions are filtered out, and the administrative address element with the most characters in its administrative address name is retained.

[0089] Based on the newly filtered sequence of administrative address elements, the corresponding fourth-level administrative address is determined.

[0090] It should be noted that the above character inclusion relationship may include administrative division levels that are not included. For example, "Hongjiang City" and "Hongjiang Management District". Although "Hongjiang Management District" does not include the administrative division level "city" of "Hongjiang City", there is still a character inclusion relationship.

[0091] As one implementation method, if the new administrative address element sequence includes "Hunan Province, Huaihua City, Hongjiang City, Hongjiang Management District, Xinjie Subdistrict", and "Hongjiang City" and "Hongjiang Management District" in the new administrative address element sequence have a character inclusion relationship and are arranged in adjacent positions, then the administrative address element with the most characters in the address name is taken, that is, "Hongjiang Management District" is retained. Then the corresponding fourth-level administrative address can include 'Province': 'Hunan Province', 'City': 'Huaihua City', 'District': 'Hongjiang Management District', 'Town': 'Xinjie Subdistrict'.

[0092] This invention improves the accuracy of extracting fourth-level administrative addresses by retaining the administrative address element with the most characters in the administrative address name.

[0093] In some embodiments, the administrative level four address corresponding to the new administrative address element sequence is determined according to a preset address element extraction logic, including:

[0094] Based on the administrative address level determined by the above administrative address code, administrative address elements in the above new administrative address element sequence that have a higher administrative address level than the administrative address element that appears earlier in the sequence are deleted.

[0095] Based on the newly generated sequence of administrative address elements after deletion, the corresponding fourth-level administrative address is determined.

[0096] As an optional implementation, the aforementioned administrative address level is determined by the aforementioned administrative address code. Different positions of the digits in the aforementioned administrative address code represent administrative addresses at different administrative division levels. If a position is filled with 0, it indicates that an administrative address at that administrative division level does not exist. For example, an administrative address code ending with 10 zeros corresponds to an administrative address level of 0, representing an administrative division level of province or municipality; ending with 8 zeros corresponds to an administrative address level of 1, representing an administrative division level of prefecture-level city; ending with 6 zeros corresponds to an administrative address level of 2, representing an administrative division level of county-level city, county, or district; and ending with other digits corresponds to an administrative address level of 3, representing an administrative division level of town, township, or street.

[0097] As one implementation method, if the new administrative address element sequence includes "Guangdong Province, Bao'an District, Shenzhen City", in which the first administrative address name is Guangdong Province, the second administrative address name is Bao'an District, and the third administrative address name is Shenzhen City, and Shenzhen City has a higher administrative address level than Bao'an District, and Shenzhen City is deleted, then the corresponding fourth-level administrative address can include 'Province': 'Guangdong Province', 'District': 'Bao'an District'.

[0098] In this embodiment of the invention, by deleting administrative address elements with higher administrative address levels than the preceding administrative address elements in the new administrative address element sequence, the resulting corresponding administrative level four addresses can be sorted according to administrative address level, which is beneficial to the accuracy of logistics delivery.

[0099] In some embodiments, the administrative level four address corresponding to the new administrative address element sequence is determined according to a preset address element extraction logic, including:

[0100] Based on the above administrative address names, administrative address elements with the same administrative address name and adjacent positions in the above new administrative address element sequence are merged.

[0101] Based on the newly merged sequence of administrative address elements, the corresponding fourth-level administrative address is determined.

[0102] It should be noted that the embodiments of the present invention do not limit the number of the above-mentioned adjacent administrative address elements, which can be two or more.

[0103] As one implementation method, if the new administrative address element sequence includes "Beijing, Beijing, Beijing, Chaoyang District, Chaoyang District, Wangjing Subdistrict", then administrative address elements with the same administrative address name and adjacent positions in the above new administrative address element sequence are merged. Several Beijings are merged into one until the next different administrative address name "Chaoyang District" appears. Similarly, several Chaoyang Districts are merged into one until the next different administrative address name "Wangjing Subdistrict" appears. The corresponding fourth-level administrative address can include 'Province': 'Beijing', 'City': 'Beijing', 'District': 'Chaoyang District', 'Town': 'Wangjing Subdistrict'.

[0104] This invention avoids duplication of administrative address names in the fourth-level administrative address by merging administrative address elements with the same name and adjacent positions in the new administrative address element sequence.

[0105] It should be noted that the address element filtering logic, address element deletion logic, and address element merging logic in the above-described embodiments can be combined in specific ways according to the specific implementation situation to obtain more embodiments. The present invention does not impose any limitation on the number or order of the combined logic.

[0106] As another implementation method, if the administrative address element sequence includes "Guangdong Province, Shenzhen City, Bao'an District, Beijing City, Beijing City, Chaoyang District", when extracting multiple administrative addresses from the administrative address element sequence, the hierarchical relationship between several administrative address elements in the above administrative address element sequence is determined, and administrative address elements with hierarchical relationship and adjacent positions in the above administrative address element sequence are split into the same administrative address element sequence, thus obtaining a new administrative address element sequence "Guangdong Province, Shenzhen City, Bao'an District" and another new administrative address element sequence "Beijing City, Beijing City, Chaoyang District". In "Beijing City, Beijing City, Chaoyang District", administrative address elements with the same administrative address name and adjacent positions are merged, then the two Beijing cities are merged into one, and the new administrative address element sequence "Beijing City, Beijing City, Chaoyang District" can be represented by the following fourth-level administrative address: 'Province': 'Beijing', 'City': 'Beijing City', 'District': 'Chaoyang District'.

[0107] In some embodiments, the process of determining the corresponding administrative level four address further includes:

[0108] The aforementioned administrative address elements also include administrative address levels;

[0109] In the newly processed sequence of administrative address elements, retain the administrative address code of the lowest-ranking administrative address element, and use this administrative address code to complete the administrative address elements that appear earlier in the sequence.

[0110] As an optional implementation, the administrative address name of the administrative address element that appears first in the sequence is completed based on the administrative address code.

[0111] The numbers in different positions of the above administrative address codes represent administrative addresses at different administrative division levels. Therefore, the administrative address elements that appear first in the sequence can be completed based on the administrative address codes.

[0112] The processed new administrative address element sequence can be a sequence of new administrative address elements after filtering, or a sequence of new administrative address elements after deletion, or a sequence of new administrative address elements after merging, or a sequence of new administrative address elements after any two of the above processing methods, or a sequence of new administrative address elements after all three of the above processing methods.

[0113] As one implementation method, if the processed new administrative address element sequence includes "(Guangdong Province, 440000000000), (Bao'an District, 440306000000)", retaining the administrative address code of the lowest administrative address level administrative address element, then the above new administrative address element sequence becomes "Guangdong Province, Bao'an District, 440306000000". Based on the administrative address code 440306000000 corresponding to Bao'an District, the administrative address element at the beginning of the sequence is completed, then the above new administrative address element sequence becomes "Guangdong Province, Shenzhen City, Bao'an District, 440306000000". The corresponding fourth-level administrative address includes 'Province': 'Guangdong Province', 'City': 'Shenzhen City', 'District': 'Bao'an District', 'adcode': '440306000000'.

[0114] As another implementation, null characters are used to supplement the other administrative address names of the above-mentioned administrative level four address. That is, if a certain administrative level four address includes 'province': 'Guangdong Province', 'city': 'Shenzhen City', 'district': 'Bao'an District', 'adcode': '440306000000', the above-mentioned administrative level four address can also be 'province': 'Guangdong Province', 'city': 'Shenzhen City', 'district': 'Bao'an District', 'town': 'None', 'adcode': '440306000000'.

[0115] As another implementation, administrative address names in the administrative address element sequence that are unrelated to the fourth-level administrative address can be retained or deleted. For example, if the administrative address element sequence includes "Beijing, Beijing, Chaoyang District, Chaoyang District, Wangjing Street, Wangjing SOHO Tower 3", then the corresponding fourth-level administrative address can include 'Province': 'Beijing', 'City': 'Beijing', 'District': 'Chaoyang District', 'Town': 'Wangjing Street', 'Wangjing SOHO Tower 3', 'adcode': '110105026000'; the corresponding fourth-level administrative address can also include 'Province': 'Beijing', 'City': 'Beijing', 'District': 'Chaoyang District', 'Town': 'Wangjing Street', 'adcode': '110105026000'.

[0116] In this embodiment of the invention, by retaining the administrative address code of the lowest administrative address element in the newly processed administrative address element sequence, and supplementing the administrative address element at the beginning of the sequence with the administrative address code, the fourth-level administrative address can be made more complete.

[0117] In practice, some users' addresses are not standardized. For example, the address may contain province / city conflicts, multiple provinces / municipalities, or abbreviations. Existing administrative address extraction schemes cannot retrieve the correct administrative address information. This invention provides an administrative address extraction method. It obtains an administrative address element sequence by matching preset address elements to the current address to be extracted. When determining whether to extract multiple or one administrative address, it splits or deletes administrative address elements from the sequence based on the administrative address code to obtain a new sequence. According to preset address element extraction logic, it determines the corresponding administrative address level four address. This allows for the extraction of correct administrative address information, improving the timeliness and accuracy of logistics delivery. Due to specific business needs, it may be desirable to extract both single and multiple addresses for addresses containing multiple provinces / municipalities. This invention enables both single and multiple address extraction, improving the efficiency of administrative address extraction.

[0118] Example 2

[0119] Based on the above administrative address extraction method, such as Figure 2 The diagram shown is a structural schematic of an administrative address extraction device provided in an embodiment of the present invention. The administrative address extraction device 20 includes a sequence acquisition module 21, a sequence update module 22, and an address determination module 23.

[0120] The sequence acquisition module 21 is used to acquire an administrative address element sequence obtained by matching preset address elements with the current address to be extracted, wherein the administrative address element sequence includes several administrative address elements arranged in matching order, and the administrative address elements include administrative address name and administrative address code;

[0121] The sequence update module 22 is used to determine that when extracting multiple or one administrative address, it performs administrative address element splitting or deletion processing on the administrative address element sequence according to the administrative address code to obtain a new administrative address element sequence;

[0122] The address determination module 23 is used to determine the administrative level four address corresponding to the new administrative address element sequence according to the preset address element extraction logic.

[0123] For other details regarding the implementation of the above technical solution by each module in the above administrative address extraction device, please refer to the description of the administrative address extraction method provided in the above-mentioned embodiments of the invention, which will not be repeated here.

[0124] Example 3

[0125] Based on the above administrative address extraction method, such as Figure 3 The diagram shown is a structural schematic of an administrative address extraction device according to an embodiment of the present invention. The administrative address extraction device 30 includes a processor 31 and a memory 32 coupled to the processor 31. The memory 32 stores a computer program, which, when executed by the processor 31, causes the processor 31 to perform the steps of the administrative address extraction method in the above embodiment.

[0126] For other details regarding the implementation of the above technical solution by the processor 31 in the above-mentioned administrative address extraction device, please refer to the description in the administrative address extraction method provided in the above-mentioned embodiments of the invention, which will not be repeated here.

[0127] The processor 31 can also be called a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip with signal processing capabilities. The processor 31 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or the processor 31 can be any conventional processor.

[0128] Example 4

[0129] like Figure 4 The diagram illustrates the structure of a computer-readable storage medium according to an embodiment of the present invention. The computer-readable storage medium 40 stores a readable computer program 41. This computer program 41 can be stored in the storage medium as a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks or optical disks, ROM (Read-Only Memory), RAM (Random Access Memory), or terminal devices such as computers, servers, mobile phones, and tablets.

[0130] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0131] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0132] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0133] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0134] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0135] The technical solutions provided in this application have been described in detail above. Specific examples have been used in this application to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

[0136] This application is described with reference to flowchart illustrations and / or block diagrams of the methods, apparatus, and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0137] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for extracting administrative addresses, characterized in that, include: Obtain an administrative address element sequence obtained by matching the current address to be extracted with preset address elements, wherein the administrative address element sequence includes several administrative address elements arranged in matching order, and the administrative address elements include administrative address name and administrative address code, and several of the administrative address elements constitute one or more administrative addresses; When it is determined to extract multiple or one administrative address, the administrative address element sequence is split or deleted according to the administrative address code to obtain a new administrative address element sequence; Based on the preset address element extraction logic, the administrative level four address corresponding to the new administrative address element sequence is determined.

2. The administrative address extraction method according to claim 1, characterized in that, When multiple administrative addresses are determined to be extracted, the administrative address element sequence is split into administrative address elements according to the administrative address code, including: Determine the hierarchical relationship between the administrative address elements, and split the administrative address elements that have a hierarchical relationship and are arranged in adjacent positions into the same administrative address element sequence.

3. The administrative address extraction method according to claim 1, characterized in that, When determining to extract an administrative address, the administrative address element sequence is subjected to administrative address element deletion processing based on the administrative address code, including: Determine the hierarchical relationship between the administrative address elements, and delete the administrative address elements in the sequence that do not have a hierarchical relationship with the administrative address element in the first position.

4. The administrative address extraction method according to claim 1, characterized in that, Based on the preset address element extraction logic, the administrative level four address corresponding to the new administrative address element sequence is determined, including: Based on the administrative address name, several administrative address elements in the new administrative address element sequence that have a character inclusion relationship and are arranged in adjacent positions are filtered, and the administrative address element with the most characters in its administrative address name is retained. Based on the new administrative address element sequence after filtering, the corresponding administrative level four address is determined.

5. The administrative address extraction method according to claim 1, characterized in that, Based on the preset address element extraction logic, the administrative level four address corresponding to the new administrative address element sequence is determined, including: Based on the administrative address level determined by the administrative address code, administrative address elements in the new administrative address element sequence that have a higher administrative address level than the administrative address element that appears earlier in the sequence are deleted. Based on the new sequence of administrative address elements after deletion, the corresponding fourth-level administrative address is determined.

6. The administrative address extraction method according to claim 1, characterized in that, Based on the preset address element extraction logic, the administrative level four address corresponding to the new administrative address element sequence is determined, including: Based on the administrative address name, administrative address elements with the same administrative address name and adjacent positions in the new administrative address element sequence are merged. Based on the new sequence of administrative address elements after merging, the corresponding fourth-level administrative address is determined.

7. The administrative address extraction method according to any one of claims 4 to 6, characterized in that, Before determining the corresponding administrative level four address, the following steps are also included: The administrative address element also includes the administrative address level; The administrative address code of the administrative address element with the lowest administrative address level in the new administrative address element sequence after processing is retained, and the administrative address element that appears first is completed based on the administrative address code.

8. An administrative address retrieval device, characterized in that, It includes a sequence acquisition module, a sequence update module, and an address determination module; The sequence acquisition module is used to acquire an administrative address element sequence obtained by matching preset address elements with the current address to be extracted. The administrative address element sequence includes several administrative address elements arranged in matching order. Each administrative address element includes an administrative address name and an administrative address code. Several administrative address elements constitute one or more administrative addresses. The sequence update module is used to determine whether to extract multiple or one administrative address, and to perform administrative address element splitting or deletion processing on the administrative address element sequence according to the administrative address code to obtain a new administrative address element sequence. The address determination module is used to determine the administrative level four address corresponding to the new administrative address element sequence according to the preset address element extraction logic.

9. An administrative address retrieval device, characterized in that, Includes memory and processor, wherein: The memory is used to store computer programs; The processor is used to read the computer program in the memory and execute the steps of the administrative address extraction method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a readable computer program that, when executed by a processor, implements the steps of the administrative address extraction method as described in any one of claims 1 to 7.