Address processing method and related device
By performing hierarchical identification and standardization on address fields and combining them with address weight calculation, the problems of low reliability and accuracy in address processing are solved, and efficient and accurate address processing is achieved.
Patent Information
- Application Number
- CN202510286008.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-09-23
AI Technical Summary
In the existing technology, the reliability and accuracy of address processing are low, especially when the address is filled in incorrectly, missing or false, which increases the difficulty and complexity of address processing and affects the quality of related address-based services.
By performing hierarchical identification on the address fields, querying the standard address field set corresponding to the administrative division level, constructing a standardized second address, calculating the address weight, and using the location identification value to evaluate the reliability and accuracy of the address.
It improves the effectiveness and flexibility of address processing, increases the reliability and accuracy of addresses, and ensures the accuracy and credibility of address processing.
Smart Images

Figure CN120687533A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an address processing method and related devices. Background Art
[0002] With the rapid development of information technology, many address-based services have emerged, such as e-commerce services, logistics services, etc. Due to the continuous increase in address usage scenarios, the complexity of address processing is also increasing. For example, the occurrence of address errors, missing addresses, etc., all make address processing more difficult, which also makes the importance of address processing gradually increase. However, with the continuous expansion of the scope of address application and the increasing complexity of address application scenarios, the requirements for address processing are also increasing, which brings certain challenges to address-based services. Summary of the Invention
[0003] In a first aspect, an embodiment of the present application provides an address processing method, including: Performing hierarchical identification on the address field included in the first address to obtain the administrative division level of the address field; According to the administrative division level, query the address database to obtain a standard address field set corresponding to the administrative division level; querying the standard address field set for a first standard address field corresponding to the address field, and constructing a second address based on the first standard address field; Determine a location identifier value corresponding to a second standard address field included in the second address in the first address; the second standard address field includes the first standard address field; An address weight of the second address is calculated according to the location identification value, and a third address is determined in the second address based on the address weight.
[0004] It can be seen that in the embodiment of the present application, the administrative division level of the address field contained in the first address is identified, the first standard address field corresponding to the address field is queried in the standard address field set corresponding to the administrative division level, and the second address is constructed based on the first standard address field. In this way, the address field contained in the first address is standardized through the first standard address field corresponding to the address field, thereby improving the effectiveness of the second address constructed based on the first standard address field. By constructing the second address in real time, the flexibility of constructing the second address is improved. On this basis, the address weight of the second address is calculated according to the location identification value corresponding to the second standard address field contained in the second address in the first address, and the third address is determined in the second address through the address weight of the second address. In this way, the second standard address field contained in the second address is a standardized address field through the second standard address field including the first standard address field. At the same time, the location identification value of the second standard address field is introduced to further evaluate the address weight of the second address, thereby improving the reliability and accuracy of the third address determined in the second address.
[0005] In a second aspect, an embodiment of the present application provides an address processing device, including: A level identification module, configured to perform level identification on the address field included in the first address to obtain the administrative level of the address field; A field set query module, configured to query the address database according to the administrative division level to obtain a standard address field set corresponding to the administrative division level; An address construction module, configured to search the standard address field set for a first standard address field corresponding to the address field, and to construct a second address based on the first standard address field; an identification value determining module, configured to determine a position identification value corresponding to a second standard address field included in the second address in the first address; the second standard address field includes the first standard address field; The address determination module is configured to calculate an address weight of the second address according to the location identification value, and determine a third address in the second address based on the address weight.
[0006] In a third aspect, an embodiment of the present application provides a computer device comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the address processing method described in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing computer-executable instructions, which, when executed by a processor, implement the address processing method as described in the first aspect.
[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the address processing method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments described in this specification. Those skilled in the art can also derive other drawings based on these drawings without inventive work. Figure 1 A flowchart of an address processing method provided in an embodiment of the present application; Figure 2 A flowchart of an address processing method applied to a communication address scenario provided in an embodiment of the present application; Figure 3 A schematic diagram of an address processing device provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0010] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0011] This specification provides an embodiment of an address processing method: Currently, in the process of address processing, a key address participle that matches the preset key address level is often determined from multiple address participles based on the preset key address level and the address level corresponding to the address participle in the address. Then, a candidate address that matches the key address participle is determined from a preset standard library. Since the candidate addresses are set in advance and the candidate addresses are often limited, the reliability of the candidate addresses selected from the preset standard library is low.
[0012] To this end, the address processing method provided in this embodiment performs hierarchical identification on the address field contained in the first address to obtain the administrative division level of the address field, queries the first standard address field corresponding to the address field in the standard address field set corresponding to the administrative division level, and constructs the second address based on the first standard address field. In this way, the address field contained in the first address is standardized through the first standard address field corresponding to the address field, thereby improving the effectiveness of the second address constructed based on the first standard address field, and improving the flexibility of constructing the second address by constructing the second address in real time. On this basis, the address weight of the second address is calculated according to the location identification value corresponding to the second standard address field contained in the second address in the first address, and the third address is determined in the second address through the address weight of the second address. In this way, the second standard address field contained in the second address is made a standardized address field by including the second standard address field of the first standard address field. At the same time, the location identification value of the second standard address field is introduced to further evaluate the address weight of the second address, thereby improving the reliability and accuracy of the third address determined in the second address.
[0013] The address processing method provided in this embodiment can be executed by a terminal or a server, wherein the terminal may include a mobile phone, a laptop computer, an intelligent interactive device, etc., and the server may include an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
[0014] Reference Figure 1 The address processing method provided in this embodiment specifically includes steps S102 to S110.
[0015] Step S102: performing hierarchical identification on the address field included in the first address to obtain the administrative division level of the address field.
[0016] In this embodiment, the first address may include a first communication address or a first correspondence address. The first address may be a first address input by a user, or a first address extracted from a document. The document may include a work order, a courier note and / or resource application materials. In addition, the document may also be other types of documents, such as an academic paper. The first address may be a correct address or an address with an abnormal situation, that is, the first address may be a first abnormal address, such as an erroneous first address, a first address with missing fields and / or a false first address. The first address may be one or more addresses.
[0017] The address fields included in the first address may include address fields obtained by dividing the first address. Specifically, they may be address fields obtained by performing named entity recognition on the first address. For example, if the first address is "Tianjin City, Beijing City, Yubei District, Wangjing Village Committee, Cuigezhuang", the address fields included in the first address obtained by performing named entity recognition on the first address are "Tianjin City", "Beijing City", "Yubei District", "Wangjing Village Committee", and "Cuigezhuang". The first address may include one or more address fields.
[0018] In a specific implementation, named entity recognition may be performed on the first address to obtain the address field contained in the first address, and the address field contained in the first address may be matched with a preset administrative division level to obtain the administrative division level of the address field contained in the first address; Among them, the administrative division level includes the level divided according to administrative regions. The preset administrative division level may include the first administrative division level, the second administrative division level, the third administrative division level, the fourth administrative division level and / or the fifth administrative division level. The first administrative division level may be provincial level, the second administrative division level may be municipal level, the third administrative division level may be district level (county level), the fourth administrative division level may be street level (town level), and the fifth administrative division level may be community level (village level); the first administrative division level > the second administrative division level > the third administrative division level > the fourth administrative division level > the fifth administrative division level.
[0019] Continuing with the above example, we perform hierarchical identification on the address fields "Tianjin City", "Beijing City", "Yubei District", "Wangjing Village Committee", and "Cuigezhuang" contained in the first address, and obtain the administrative division levels of the address fields as follows: "Tianjin City" is the first administrative division level, "Beijing City" is the second administrative division level, "Yubei District" is the third administrative division level, "Wangjing Village Committee" is the fifth administrative division level, and "Cuigezhuang" is the fourth administrative division level.
[0020] During the specific implementation process, the first address can be input into the hierarchical recognition model for hierarchical recognition to obtain the administrative division level of the address field contained in the first address; the hierarchical recognition here can also be to perform named entity recognition on the first address to obtain the address field contained in the first address, and match the address field contained in the first address with the preset administrative division level to obtain the administrative division level of the address field contained in the first address; thereby improving the efficiency of hierarchical recognition through the introduction of the hierarchical recognition model.
[0021] It should be noted that the model structure of the above-mentioned hierarchical recognition model can be BERT (Bidirectional Encoder Representations from Transformers, a pre-trained language model).
[0022] Step S104: query the address database according to the administrative division level to obtain a standard address field set corresponding to the administrative division level.
[0023] The above-mentioned hierarchical identification is performed on the address fields contained in the first address to obtain the administrative division level of the address field. In this step, the standard address field set corresponding to the administrative division level is queried in the address library, so as to realize the subsequent standardization of the address field through the standard address field set; the address library can be used to store the preset administrative division level and the standard address fields under the preset administrative division level, or can be used to store the preset administrative division level and the standard address field set corresponding to the preset administrative division level.
[0024] The standard address field set corresponding to the administrative division level of the address field contained in the first address refers to a set of standard address fields under the administrative division level of the address field contained in the first address. For example, if the administrative division level is the street level, the standard address field set corresponding to the administrative division level refers to a set of standard address fields under the street level, that is, the standard address field set corresponding to the street level.
[0025] In specific implementation, according to the administrative division level of the address field contained in the first address, the standard address field set corresponding to the administrative division level is queried in the address database; using the above example, the administrative division levels of the address field contained in the first address are: "Tianjing City" as the first administrative division level, "Beijing" as the second administrative division level, "Yubei District" as the third administrative division level, "Wangjing Village Committee" as the fifth administrative division level, and "Cuigezhuang" as the fourth administrative division level. According to the administrative division level, the standard address field sets corresponding to the first administrative division level, the second administrative division level, the third administrative division level, the fourth administrative division level and the fifth administrative division level are queried in the address database to obtain.
[0026] In order to improve the richness of the address library, the address library may be updated. Specifically, the address library may be updated periodically or based on an update instruction for the address library. In an optional implementation provided by this embodiment, the address library is updated in the following manner: Performing hierarchical identification on the address field included in the fourth address to obtain the administrative division level of the address field included in the fourth address; If the address field corresponding to the first level in the administrative division level of the address field included in the fourth address is successfully matched in the address database, the address field corresponding to the second level is extracted from the address field included in the fourth address; If the address field corresponding to the second level fails to match in the address library, the address field corresponding to the second level is updated to the address library, and the newly added label is associated with the address field corresponding to the second level.
[0027] The fourth address may include a fourth communication address or a fourth communication address. The fourth address may be a real address, that is, a real address. The fourth address may not contain an error or false field. The execution process of performing hierarchical identification on the address field included in the fourth address is similar to the execution process of performing hierarchical identification on the address field included in the first address. Please refer to it for reference and will not be repeated here. The first level may include the first administrative division level, the second administrative division level and / or the third administrative division level, the first administrative division level may be the provincial level, the second administrative division level may be the municipal level, and the third administrative division level may be the district level (county level), that is, the address field corresponding to the first level may be the address field corresponding to the first administrative division level, the second administrative division level and / or the third administrative division level in the address field contained in the fourth address; the second level may include the fourth administrative division level and / or the fifth administrative division level, the fourth administrative division level may be the street level (town level), and the fifth administrative division level may be the community level (village level), that is, the address field corresponding to the second level may be the address field corresponding to the fourth administrative division level and / or the fifth administrative division level in the address field contained in the fourth address; the newly added label may be a label indicating that the address field corresponding to the second level belongs to a newly added category in the address database; in this way, the comprehensiveness of the address database is improved through the above-mentioned update processing of the address database, and the newly added labels are used to distinguish the standard address fields originally existing in the address database from the newly added standard address fields.
[0028] Specifically, whether the address field corresponding to the first level is successfully matched in the address database can be determined in the following way: the address fields corresponding to the first administrative division level, the second administrative division level and / or the third administrative division level in the address field contained in the fourth address are matched with the address database. If the address fields corresponding to the first administrative division level, the second administrative division level and / or the third administrative division level are successfully matched with the address database, it is determined that the address field corresponding to the first level is successfully matched in the address database.
[0029] In addition, whether the address field corresponding to the first level is successfully matched in the address database can also be determined in the following way: the address fields corresponding to the first administrative division level, the second administrative division level and the third administrative division level in the address field contained in the fourth address are matched with the address database; if any two of the address fields corresponding to the first administrative division level, the second administrative division level and the third administrative division level are successfully matched with the address database, then it is determined that the address field corresponding to the first level is successfully matched in the address database; for example, the fourth address is "Wangjing Village Committee, Cuigezhuang Area, Chaoyang District, Beijing City", and the address fields corresponding to the first administrative division level, the second administrative division level and the third administrative division level in the fourth address are "Beijing City", "Beijing City" and "Chaoyang District" respectively; if any two of the address fields corresponding to "Beijing City", "Beijing City" and "Chaoyang District" are successfully matched in the address database, then it is determined that the address field corresponding to the first level is successfully matched in the address database.
[0030] The address field corresponding to the second level fails to match in the address library, which can be determined in the following way: determine the address field corresponding to the upper administrative division level of the second level in the fourth address, filter the address field to be matched in the address library according to the determined address field, match the address field corresponding to the second level with the address field to be matched, and if the match fails, it is determined that the address field corresponding to the second level fails to match in the address library; in the process of filtering the address field to be matched in the address library according to the determined address field, the address field of the second level under the determined address field can be queried in the address library as the address field to be matched.
[0031] For example, the second level is the fourth administrative division level, the upper administrative division level of the second level is the third administrative division level, and the address field corresponding to the third administrative division level in the fourth address is "Chaoyang District". Then the address field of the fourth administrative division level under "Chaoyang District" is queried in the address library as the address field to be matched. If the address field corresponding to the second level fails to match the address field to be matched, it is determined that the address field corresponding to the second level fails to match in the address library; the matching failure here can be determined when the similarity between the address field corresponding to the second level and the address field to be matched is less than the preset similarity threshold.
[0032] Step S106: querying the standard address field set for a first standard address field corresponding to the address field, and constructing a second address based on the first standard address field.
[0033] The above-mentioned query of the standard address field set corresponding to the administrative division level in the address library, in this step, the first standard address field corresponding to the address field is queried in the standard address field set, and the second address is constructed based on the first standard address field, so as to realize the standardization of the second address through the first standard address field, and realize the standardized conversion from the first address to the second address.
[0034] The first standard address field corresponding to the address field may include a standardized address field corresponding to the address field or a real address field corresponding to the address field, that is, the first standard address field may be a real address field; using the above example, "Tianjin City" is the first administrative division level, "Beijing City" is the second administrative division level, "Yubei District" is the third administrative division level, "Wangjing Village Committee" is the fifth administrative division level, and "Cui Gezhuang" is the fourth administrative division level. The first standard address fields corresponding to the address field "Tianjin City" are "Beijing City" and "Tianjin City", the first standard address field corresponding to the address field "Beijing City" is "Beijing City", the first standard address field corresponding to the address field "Yubei District" is "Yubei District", the first standard address field corresponding to the address field "Cui Gezhuang" is "Cui Gezhuang Area", and the first standard address field corresponding to the address field "Wangjing Village Committee" is "Wangjing Village Committee". The second address may be one or more addresses, the second address may be a second communication address or a second correspondence address, and the second address may include multiple candidate addresses.
[0035] In actual applications, the address fields included in the first address may contain erroneous fields or false fields, resulting in the first address being an erroneous or false address. To address this, in order to correct the first address, the address fields included in the first address may be converted into first standard address fields. Specifically, the first standard address field corresponding to the address field may be queried in the standard address field set corresponding to the administrative division level, and the second address may be constructed based on the first standard address field. In the process of querying the first standard address field corresponding to the address field in the standard address field set corresponding to the administrative division level, the similarity between the address field contained in the first address and each standard address field in the standard address field set can be calculated, and the standard address field with a similarity greater than a similarity threshold is used as the first standard address field corresponding to the address field; in addition, the above-mentioned operation of querying the address database according to the administrative division level to obtain the standard address field set corresponding to the administrative division level and querying the first standard address field corresponding to the address field in the standard address field set can be performed based on a standardization model. Specifically, the address field contained in the first address and the administrative division level of the address field can be input into the standardization model to perform standardization processing on the address field to obtain the first standard address field corresponding to the address field; the model structure of the standardization model can be a DSSM (Deep Structured Semantic Model, a semantic model based on deep learning); In the process of constructing the second address based on the first standard address field, the address database may be queried for a standard address field corresponding to an administrative division level above the administrative division level of the first standard address field, and the queried standard address field and the first standard address field may be combined according to the administrative division level to obtain the second address; the queried standard address field may be the standard address field corresponding to the first standard address field in the address database, and the administrative division level of the queried standard address field may be higher than the administrative division level of the first standard address field; Specifically, the fifth standard address field corresponding to the first administrative division level in the first standard address field can be used as the first candidate address, and the sixth standard address field corresponding to the remaining administrative division levels in the first standard address field is queried in the address database for the seventh standard address field. The seventh standard address field and the sixth standard address field are combined according to the administrative division levels to obtain the second candidate address, and the first candidate address and the second candidate address are used as the second address. The remaining administrative division levels here may include administrative division levels other than the first administrative division level, for example, the remaining administrative division levels may be the second administrative division level, the third administrative division level, the fourth administrative division level and / or the fifth administrative division level. The administrative division level of the sixth standard address field may be lower than the administrative division level of the seventh standard address field. In the process of combining the seventh standard address field and the sixth standard address field according to the administrative division level to obtain the second candidate address, the seventh standard address field and the sixth standard address field may be combined in descending order of the administrative division levels to obtain the second candidate address. Using the above example, the first standard address fields corresponding to the address field "Tianjin City" are "Beijing City" and "Tianjin City", the first standard address field corresponding to the address field "Beijing City" is "Beijing City", the first standard address field corresponding to the address field "Yubei District" is "Yubei District", the first standard address field corresponding to the address field "Cui Gezhuang" is "Cui Gezhuang District", the first standard address field corresponding to the address field "Wangjing Village Committee" is "Wangjing Village Committee", and the fifth standard address fields "Beijing City" and "Tianjin City" corresponding to the first administrative division level in the first standard address field are taken as the two first candidate addresses. The sixth standard address field "Beijing City" corresponding to the second administrative division level in the first standard address field is queried, and the seventh standard address field corresponding to the address database is "Beijing City". According to the administrative division level, "Beijing City" and "Beijing City" are selected as the first candidate addresses. City" is combined to obtain the first second candidate address "Beijing, Beijing City". The sixth standard address field "Yubei District" corresponding to the third administrative division level is queried in the address database, and the seventh standard address field corresponding to it is "Chongqing, Chongqing City". According to the administrative division level, "Chongqing, Chongqing City" and "Yubei District" are combined to obtain the second second candidate address "Chongqing, Chongqing, Yubei District". According to similar operations, the fourth and fifth administrative division levels are queried and combined, and finally the first candidate addresses are "Beijing" and "Tianjin", and the second candidate addresses are "Beijing, Beijing", "Chongqing, Chongqing, Yubei District", "Beijing, Beijing, Chaoyang District, Cuigezhuang Area", and "Beijing, Beijing, Chaoyang District, Cuigezhuang Area, Wangjing Village Committee".
[0036] Step S108: Determine the location identifier value corresponding to the second standard address field included in the second address in the first address.
[0037] The above-mentioned query of the first standard address field corresponding to the address field contained in the first address in the standard address field set, and the construction of the second address based on the first standard address field, in this step, determines the position identification value corresponding to the second standard address field contained in the second address in the first address, so as to perform subsequent weight evaluation of the second address through the position identification value; optionally, the second standard address field includes the first standard address field.
[0038] The position identification value may include the position identification value of the arrangement position corresponding to the second standard address field included in the second address in the first address; optionally, the position identification value includes a starting position identification value and / or an ending position identification value.
[0039] During specific implementation, the position identification value corresponding to the second standard address field contained in the second address in the first address is determined. Specifically, the starting position identification value and / or the ending position identification value corresponding to the second standard address field contained in the second address in the first address can be determined. The position identification value of the address field corresponding to the second standard address field contained in the second address in the first address can also be determined as the position identification value corresponding to the second standard address field in the first address.
[0040] Continuing with the above example, let's take the second address "Wangjing Village Committee, Cuigezhuang District, Beijing, Chaoyang District" as an example. The second standard address field "Cuigezhuang District" contained in the second address has a corresponding starting position identification value of 14 and an ending position identification value of 16 in the first address.
[0041] During the specific execution process, in the process of determining the position identification value corresponding to the second standard address field contained in the second address in the first address, the second standard address field and the first address can be matched. If the match is successful, the position identification value of the address field corresponding to the second standard address field in the first address is used as the position identification value corresponding to the second standard address field in the first address. If the match fails, it is determined that the position identification value of the second standard address field in the first address is empty, which means that there is no position identification value for the second standard address field.
[0042] For example, if the second address is "Beijing, Beijing, Chaoyang District, Cuigezhuang District, Wangjing Village Committee", the second standard address field is matched with the first address, and the successfully matched second standard address fields are "Beijing", "Beijing", "Cuigezhuang District", and "Wangjing Village Committee". The starting position identification value and the ending position identification value of the successfully matched second standard address field in the first address are (0, 2), (3, 5), (14, 16), and (9, 13), respectively. Similarly, the second standard address field contained in the second address is obtained in the first address. The corresponding starting position identification values and ending position identification values in the address are "Beijing (0, 2)", "Tianjin (0, 2)", "Beijing (0, 2), Beijing (3, 5)", "Chongqing (0, 2), Chongqing (3, 5), Yubei District (6, 8)", "Beijing (0, 2), Beijing (3, 5), Chaoyang District (empty), Cuigezhuang District (14, 16)", "Beijing (0, 2), Beijing (3, 5), Chaoyang District (empty), Cuigezhuang District (14, 16), Wangjing Village Committee (9, 13)".
[0043] Step S110 : calculating an address weight of the second address according to the location identification value, and determining a third address in the second address based on the address weight.
[0044] The above-mentioned determination determines the location identification value corresponding to the second standard address field contained in the second address in the first address. In this step, the address weight of the second address is calculated based on the location identification value, and the third address is determined in the second address based on the address weight of the second address. In this way, the second address is evaluated by the location identification value, and the third address is further determined in the second address based on the address weight of the second address obtained by evaluation, thereby improving the effectiveness of the third address.
[0045] The address weight of the second address in this embodiment can be used to characterize the credibility of the second address, that is, it can be an indicator for evaluating the credibility or reliability of the second address, and the address weight of the second address can be the address score of the second address; the third address may include a third communication address or a third correspondence address, and the third address can be a third address corresponding to the first address, that is, it can be a third address obtained by address correction or address error correction of the first address.
[0046] In actual applications, in the first address, there may be a situation where the address field of the lower administrative division level is behind the address field of the higher administrative division level. For example, the address field of the fifth administrative division level is behind the address field of the fourth administrative division level, resulting in the situation where the order of the address fields in the first address is reversed. In view of this, in order to improve the comprehensiveness of the evaluation of the second address, the starting position identification value and the ending position identification value corresponding to the second standard address field contained in the second address in the first address can be introduced to measure the address weight of the second address; the position identification value may include the starting position identification value and the ending position identification value; in an optional implementation manner provided by this embodiment, in the process of calculating the address weight of the second address based on the position identification value, the address weight of the second address is calculated based on the starting position identification value and the ending position identification value corresponding to the second standard address field in the first address. Specifically, the following operations can be performed: Determine the first address field in the second standard address field according to the start position identification value and the end position identification value corresponding to the second standard address field in the first address; The address weight of the second address is calculated based on the hierarchical weight of the administrative division hierarchy of the first address field.
[0047] Among them, the starting position identification value and the ending position identification value corresponding to the second standard address field in the first address may include the starting position identification value and the ending position identification value of the address field corresponding to the second standard address field in the first address, the starting position identification value may be the position identification value of the first field of the address field in the first address, and the ending position identification value may be the position identification value of the last field of the address field in the first address.
[0048] The level weight of the administrative division level of the first address field can be used to represent the importance of the administrative division level during address processing. The level weight can be a level score. Optionally, the level weight of the third administrative division level > the level weight of the second administrative division level > the level weight of the first administrative division level > the level weight of the fourth administrative division level = the level weight of the fifth administrative division level. Because the standard address fields of the fourth and fifth administrative division levels often have the same names, the level weights of the fourth and fifth administrative division levels are reduced. For example, the level weights of the five administrative division levels are 15, 20, 30, 10, and 10, respectively. Optionally, (the level weight of the fourth administrative division level + the level weight of the fifth administrative division level) > the level weight of the first administrative division level.
[0049] On this basis, the second standard address field may include a third standard address field and a fourth standard address field. In an optional implementation provided by this embodiment, in the process of determining the first address field in the second standard address field according to the starting position identifier value and the ending position identifier value corresponding to the second standard address field in the first address, the following operations are performed: Comparing the starting location identifier value corresponding to the third standard address field with the ending location identifier value corresponding to the fourth standard address field; optionally, the administrative division level of the third standard address field is lower than the administrative division level of the fourth standard address field; If the comparison result is that the starting position identification value corresponding to the third standard address field is smaller than the ending position identification value corresponding to the fourth standard address field, the third standard address field is determined to be the first address field.
[0050] Among them, the starting position identification value corresponding to the third standard address field can be the starting position identification value corresponding to the third standard address field in the first address, and the ending position identification value corresponding to the fourth standard address field can be the ending position identification value corresponding to the fourth standard address field in the first address.
[0051] Continuing with the above example, the second address is "Beijing, Beijing, Chaoyang District, Cuigezhuang District, Wangjing Village Committee", and the starting position identification value and ending position identification value corresponding to the second standard address field contained in the second address in the first address are "Beijing (0, 2), Beijing (3, 5), Chaoyang District (empty), Cuigezhuang District (14, 16), Wangjing Village Committee (9, 13)". The starting position identification value corresponding to the third standard address field of the lower administrative division level contained in the second address is compared with the ending position identification value corresponding to the fourth standard address field of the higher administrative division level. In the comparison result, the starting position identification value 9 corresponding to "Wangjing Village Committee" is smaller than the ending position identification value 16 corresponding to "Cuigezhuang District", so "Wangjing Village Committee" is used as the first address field.
[0052] In the process of calculating the address weight of the second address based on the hierarchical weight of the administrative division level of the first address field, the address weight of the second address may be calculated based on the number of fourth standard address fields and the hierarchical weight of the administrative division level of the first address field. In an optional implementation provided by this embodiment, the following operations are specifically performed: Calculating a first parameter based on the number of fourth standard address fields; An address weight of the second address is calculated based on the tier weight and the first parameter.
[0053] Among them, the first parameter can be a first coefficient, and the first parameter can be a value between 0 and 1, that is, the first parameter can be a value within a preset value range. The number of second standard address fields can include the number of fourth standard address fields in the second standard address field. Using the above example, the third standard address field is "Wangjing Village Committee". The starting location identification value 9 corresponding to the third standard address field "Wangjing Village Committee" is only less than the ending location identification value corresponding to "Cui Gezhuang District", and is not less than the first administrative division level Beijing City and the second administrative division level Beijing City, so the number of fourth standard address fields is 1.
[0054] Specifically, in the process of calculating the first parameter according to the number of the fourth standard address fields, the number of the fourth standard address fields may be matched with a preset parameter in the parameter set, and the matched preset parameter may be used as the first parameter; for example, the preset parameter corresponding to the number 1 is 0.5, the preset parameter corresponding to the number 2 is 0.6, the preset parameter corresponding to the number 3 is 0.7, and the preset parameter corresponding to the number 4 is 0.8; In the process of calculating the address weight of the second address based on the hierarchical weight and the first parameter, the product of the hierarchical weight of the administrative division level of the first address field and the first parameter can be calculated, and then the difference between the preset value and the product can be calculated as the address weight of the second address; for example, the preset difference is 0, the product of the hierarchical weight 10 of the first address field-the fifth administrative division level and the first parameter 0.5 is calculated to be 5, and then the difference between the preset value 0 and the product 5 is calculated to be -5 as the address weight of the second address; in this way, the location identification value of the address field of the same administrative division level as the first address field in the first address is introduced into the calculation of the address weight of the second address, and the credibility of the second address is measured by the location identification value, thereby improving the reliability of error correction for the first address.
[0055] In addition, in the process of calculating the address weight of the second address based on the hierarchical weight of the administrative division level of the first address field, the address weight of the second address can also be calculated based on the hierarchical weight of the administrative division level of the first address field and the preset parameters. Specifically, the product of the hierarchical weight and the preset parameter can be calculated, and then the difference between the preset value and the product can be calculated as the address weight of the second address; for example, the preset parameter is 0.8, the product of the hierarchical weight 10 and 0.8 is calculated to be 8, and then the difference between the preset value 0 and the product 8 is calculated to be -8 as the address weight of the second address.
[0056] In actual applications, the field length of the second standard address field is different, and the credibility of the second standard address field may also be different. Whether the second standard address field successfully matches the first standard address field of the address field included in the first address may also lead to different credibility of the second standard address field. To improve the comprehensiveness of the credibility evaluation of the second address, two dimensions can be introduced: the field length of the second standard address field and whether the second standard address field successfully matches the first standard address field of the address field included in the first address. Combined with the location identifier value, the credibility of the second address can be evaluated from three dimensions, that is, the first field weight of the second standard address field can be calculated, and the second field weight of the second standard address field can be determined based on the matching degree of the second standard address field and the first standard address field. In an optional implementation provided by this embodiment, the following operations are also performed: Deleting a target element contained in the second standard address field, and calculating a first field weight of the second standard address field based on the field length of the second standard address field after deletion; optionally, the target element is used to represent the administrative division level of the second standard address field; A second field weight of the second standard address field is determined according to a matching degree between the second standard address field and the first standard address field.
[0057] The first field weight may include the first field weight of the second standard address field contained in the second address; the second field weight may include the second field weight of the second standard address field contained in the second address; the first field weight may be a length weight, that is, a weight used to represent the length of the second standard address field; the second field weight may be a matching weight, that is, a weight used to represent whether the second standard address field matches the first standard address field. The target element may be a target element representing the administrative level of the second standard address field. For example, if the second standard address field is "Beijing City", the target element contained in the second standard address field is "city".
[0058] Specifically, in the process of calculating the first field weight of the second standard address field based on the field length of the second standard address field after the deletion process, the corresponding preset field weight can be queried as the first field weight based on the field length of the second standard address field after the deletion process; for example, the correspondence between the field length and the preset field weight is: the preset field weight corresponding to the field length of 1 is 0, the preset field weight corresponding to the field length of 2 is 0.1, the preset field weight corresponding to the field length of 3 is 0.2, the preset field weight corresponding to the field length of 4 is 0.3, and the preset field weight corresponding to the field length greater than or equal to 5 is 0.4.
[0059] In the process of determining the second field weight of the second standard address field based on the matching degree between the second standard address field and the first standard address field, if the second standard address field matches the first standard address field successfully, the first value can be used as the first field weight of the second standard address field; if the match fails, the second value can be used as the second field weight of the second standard address field; wherein the first value can be any value greater than 0, such as 1, and the second value can be 0.
[0060] In addition, the above-mentioned implementation method of calculating the first field weight and the second field weight can also be replaced by matching the second standard address field with the first standard address field, determining the first field that successfully matches and the second field that fails to match from the second standard address field, deleting the target element contained in the first field, and calculating the first field weight of the first field based on the field length of the first field after deletion, using the first numerical value as the second field weight of the first field, and using the second numerical value as the first field weight and the second field weight of the second field.
[0061] For example, the second address is "Beijing City, Beijing City, Chaoyang District, Cuigezhuang District, Wangjing Village Committee", and the first field of the second standard address field contained in the second address is "Beijing City", "Beijing City", "Cuigezhuang District" and "Wangjing Village Committee", and the second field is "Chaoyang District". The target elements contained in the four first fields of "Beijing City", "Beijing City", "Cuigezhuang District" and "Wangjing Village Committee" are deleted. According to the field lengths of the first fields after deletion, "2", "2", "3", and "2", the first field weights of the successfully matched first fields are calculated to be 0.1, 0.1, 0.2, and 0.1 respectively. 0 is used as the first field weight of the second field "Chaoyang District" that failed to match, 1 is used as the first field weight of the successfully matched first fields "Beijing City", "Beijing City", "Cuigezhuang District" and "Wangjing Village Committee", and 0 is used as the second field weight of the second field "Chaoyang District" that failed to match.
[0062] On this basis, in order to further improve the comprehensiveness of the address weight of each address and evaluate the address weight of the second address from multiple dimensions, in an optional implementation provided by this embodiment, in the process of calculating the address weight of the second address based on the location identifier value, the address weight of the second address is calculated based on the first field weight, the second field weight, and the location identifier value. Specifically, the following operations can be performed: Calculating a first address weight of the second address based on the first field weight and the second field weight; Calculate a second address weight of the second address according to the location identification value; The address weight is calculated according to the first address weight and the second address weight.
[0063] Specifically, in the process of calculating the first address weight of the second address based on the first field weight and the second field weight, the sum of the first field weight and the second field weight can be calculated as the first address weight of the second address; in the process of calculating the second address weight of the second address based on the location identification value of the second standard address field, the first address field can be determined in the second standard address field based on the starting location identification value and the ending location identification value corresponding to the second standard address field contained in the second address, and the address weight of the second address can be calculated based on the hierarchical weight of the administrative division level of the first address field. The specific process of calculating the second address weight of the second address is similar to the specific execution process mentioned in the implementation method of the above-mentioned calculation process of the address weight of the second address. You can refer to it for reading and will not repeat it here; in the process of calculating the address weight based on the first address weight and the second address weight, the sum of the first address weight and the second address weight can be calculated as the address weight.
[0064] Furthermore, in the above process of calculating the first address weight of the second address based on the first field weight and the second field weight, since in actual application scenarios, the second standard address field included in the second address may be a newly added standard address field relative to the address library, and its credibility and reliability are different from the reliability of the original standard address field in the address library, and may be lower than the reliability of the original standard address field. Therefore, in order to improve the accuracy of the first address weight of the second address obtained by subsequent calculation; in an optional implementation manner provided by this embodiment, the following operations are performed: Calculate the weight sum according to the first field weight and the second field weight; If the second standard address field is associated with a newly added tag, the first address weight of the second address is calculated according to the sum of the weights and the second parameter.
[0065] The second parameter may be a second coefficient, and the second parameter may be any value between 0 and 1, such as 0.8.
[0066] Specifically, in the process of calculating the weight sum based on the first field weight and the second field weight, the sum of the first field weight and the second field weight can be calculated as the weight sum, or the sum of the first field weight of the first field, the second field weight and the level weight of the administrative level of the first field can be calculated as the weight sum of the first field, and the second numerical value can be used as the weight sum of the second field. After that, the sum of the weight sums of the first field and the second field contained in the second address can be calculated as the weight sum of the second standard address field contained in the second address; in the process of calculating the first address weight of the second address based on the weight sum and the second parameter, the product of the weight sum and the second parameter can be calculated as the first address weight of the second address; if the second standard address field is not associated with a new label, the weight sum can be used as the first address weight of the second address.
[0067] Continuing with the above example, the second address is "Wangjing Village Committee, Cuigezhuang District, Chaoyang District, Beijing City", and the first field weights of the five second standard address fields contained in the second address are 0.1, 0.1, 0, 0.2, and 0.1, respectively, and the second field weights are 1, 1, 0, 1, and 1, respectively. The administrative division level weights of these five second standard address fields are 15, 20, 30, 10, and 10, respectively. The second address weight of the second address obtained by the above calculation is -8. Assuming that "Wangjing Village Committee" in the second address is associated with a new label, and the other standard address fields are not associated with the new label, then the sum of the weights of the second standard address field "Beijing City" contained in the second address is 15+0.1+1=16.1, and the sum of the weights of "Beijing City" is 2 0+1+0.1=21.1, the sum of the weights of "Chaoyang District" is 0, the sum of the weights of "Cuigezhuang District" is 10+1+0.2=11.2, and the sum of the weights of "Wangjing Village Committee" is 10+1+0.1=11.1. Therefore, the first address weight of this address is 16.1+21.1+11.2+11.1*0.8=57.28. Therefore, based on the first address weight and the second address weight of this address, the second address weight is calculated to be 57.28-8=49.28. Assuming that the address weight of "Beijing, Beijing, Chaoyang District, Cuigezhuang District, Wangjing Village Committee" is the highest, "Beijing, Beijing, Chaoyang District, Cuigezhuang District, Wangjing Village Committee" is used as the third address to achieve correction and error correction of the first address.
[0068] During the specific execution process, in the process of determining the third address in the second address based on the address weight of the second address, the second address can be sorted based on the address weight, and the second address whose sorting position is before the preset position is determined in the sorting result as the third address. The third address can be one or more, for example, the preset position can be an integer of 2 or greater than 2.
[0069] It should be added that, in the process of determining the third address in the second address based on the address weight of the second address, the second address with the highest address weight can also be selected from the second address as the third address. If the number of second addresses with the highest address weight exceeds the quantity threshold, a processing failure reminder is returned; the quantity threshold can be an integer greater than 2. In this way, since the number of second addresses with the highest address weight exceeds the quantity threshold, an error may occur in address processing, that is, an error may occur in address correction, so the result is not output and a processing failure reminder is returned to avoid returning an erroneous result.
[0070] In summary, the address processing method provided in this embodiment first performs hierarchical identification on the address field contained in the first address to obtain the administrative division level of the address field, queries the standard address field set corresponding to the administrative division level in the address library, and constructs the second address based on the first standard address field corresponding to the address field queried in the standard address field set; secondly, deletes the target element contained in the second standard address field contained in the second address, and calculates the first field weight of the second standard address field based on the field length of the second standard address field after deletion, and determines the second field weight of the second standard address field based on the matching degree between the second standard address field and the first standard address field; calculates the first address weight of the second address based on the first field weight and the second field weight, calculates the second address weight of the second address based on the location identifier value corresponding to the second standard address field in the first address, and calculates the address weight of the second address based on the first address weight and the second address weight; finally, determines the third address in the second address based on the address weight, thereby evaluating the second address from three dimensions: field length, matching degree, and location identifier value, improving the comprehensiveness and completeness of the weight evaluation of the second address, and thereby improving the accuracy and reliability of the third address determined from the second address.
[0071] It should be added that each optional implementation method and each feasible execution method in steps S102 to S110 provided in this embodiment can be executed independently as needed, or can be combined and referenced with each other. At the same time, each specific execution step in each optional implementation method or each feasible execution method can also be executed independently or in combination as needed. This embodiment does not make specific limitations on this.
[0072] The following uses the application of an address processing method provided by this embodiment in a communication address scenario as an example to further illustrate the address processing method provided by this embodiment. Figure 2 , an address processing method applied to a communication address scenario, specifically includes the following steps.
[0073] Step S202: performing hierarchical identification on the address field included in the first communication address to obtain the administrative division level of the address field.
[0074] Step S204: query the address database according to the administrative division level to obtain a standard address field set corresponding to the administrative division level.
[0075] Step S206: searching the standard address field set for a first standard address field corresponding to the address field, and constructing a second communication address based on the first standard address field.
[0076] Step S208 , deleting the target element contained in the second standard address field contained in the second communication address, and calculating the first field weight of the second standard address field according to the field length of the deleted second standard address field.
[0077] Step S210 : determining a second field weight of the second standard address field according to a matching degree between the second standard address field and the first standard address field.
[0078] Step S212: Calculate the weight sum according to the first field weight and the second field weight. If the second standard address field is associated with a newly added tag, calculate the first address weight of the second address according to the weight sum and the newly added parameter.
[0079] Step S214: Calculate the second address weight of the second address according to the start location identifier value and the end location identifier value corresponding to the second standard address field in the first communication address.
[0080] Step S216: Calculate the address weight of the second communication address according to the first address weight and the second address weight, and determine the third communication address in the second communication address based on the address weight.
[0081] It should be noted that any one of steps S202 to S216 or any combination of multiple steps can be combined with any one of steps S102 to S110 to form a new implementation method according to the needs of implementation deployment; in addition, according to the needs of actual deployment, any one or multiple technical features can be selected from steps S202 to S216 and combined with any one or multiple technical features provided by steps S102 to S110 to form a new implementation method; or, any one or multiple technical features in steps S202 to S216 can be replaced with any one or multiple technical features provided by steps S102 to S110 to form a new implementation method according to the needs of actual deployment, which will not be repeated here.
[0082] An embodiment of an address processing device provided in this specification is as follows: In the above embodiment, an address processing method is provided, and correspondingly, an address processing device is also provided, which will be described below with reference to the accompanying drawings.
[0083] Reference Figure 3 , which shows a schematic diagram of an address processing device provided by this embodiment.
[0084] Since the device embodiment corresponds to the method embodiment, the description is relatively simple. For the relevant parts, please refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.
[0085] This embodiment provides an address processing device, the device comprising: A level identification module 302 is configured to perform level identification on the address field included in the first address to obtain the administrative level of the address field; A field set query module 304 is configured to query the address database according to the administrative division level to obtain a standard address field set corresponding to the administrative division level; An address construction module 306 is configured to search the standard address field set for a first standard address field corresponding to the address field, and to construct a second address based on the first standard address field; an identification value determining module 308, configured to determine a position identification value corresponding to a second standard address field included in the second address in the first address; the second standard address field includes the first standard address field; The address determination module 310 is configured to calculate an address weight of the second address according to the location identification value, and determine a third address in the second address based on the address weight.
[0086] In one embodiment, the location identifier value includes a starting location identifier value and an ending location identifier value, and the address weight of the second address is calculated according to the location identifier value, which is implemented in the following manner: Determine the first address field in the second standard address field according to the start position identification value and the end position identification value corresponding to the second standard address field in the first address; The address weight of the second address is calculated based on the hierarchical weight of the administrative division hierarchy of the first address field.
[0087] In one embodiment, the second standard address field includes a third standard address field and a fourth standard address field. The first address field is determined in the second standard address field according to the start position identifier value and the end position identifier value corresponding to the second standard address field in the first address, and is implemented in the following manner: Comparing the starting location identifier value corresponding to the third standard address field with the ending location identifier value corresponding to the fourth standard address field; the administrative division level of the third standard address field is lower than the administrative division level of the fourth standard address field; If the comparison result is that the starting position identification value corresponding to the third standard address field is smaller than the ending position identification value corresponding to the fourth standard address field, the third standard address field is determined to be the first address field.
[0088] In one embodiment, the address weight of the second address is calculated based on the hierarchical weight of the administrative division level of the first address field, and is implemented in the following manner: Calculating a first parameter based on the number of fourth standard address fields; An address weight of the second address is calculated based on the tier weight and the first parameter.
[0089] In one embodiment, the address processing device further performs the following operations: Deleting a target element included in the second standard address field, and calculating a first field weight of the second standard address field based on the field length of the second standard address field after deletion; the target element is used to represent the administrative division level of the second standard address field; A second field weight of the second standard address field is determined according to a matching degree between the second standard address field and the corresponding first standard address field.
[0090] In one embodiment, the address weight of the second address is calculated based on the location identifier value, and is implemented in the following manner: Calculating a first address weight of the second address based on the first field weight and the second field weight; Calculate a second address weight of the second address according to the location identification value; The address weight is calculated according to the first address weight and the second address weight.
[0091] In one embodiment, the first address weight of the second address is calculated based on the first field weight and the second field weight, and is implemented as follows: Calculate the weight sum according to the first field weight and the second field weight; If the second standard address field is associated with a newly added tag, the first address weight of the second address is calculated according to the sum of the weights and the second parameter.
[0092] In one embodiment, the address database is updated in the following manner: Performing hierarchical identification on the address field included in the fourth address to obtain the administrative division level of the address field included in the fourth address; If the address field corresponding to the first level in the administrative division level of the address field included in the fourth address is successfully matched in the address database, the address field corresponding to the second level is extracted from the address field included in the fourth address; If the address field corresponding to the second level fails to match in the address library, the address field corresponding to the second level is updated to the address library, and the newly added label is associated with the address field corresponding to the second level.
[0093] In the address processing device provided in this embodiment, the administrative division level of the address field contained in the first address is identified, the first standard address field corresponding to the address field is queried in the standard address field set corresponding to the administrative division level, and the second address is constructed based on the first standard address field. In this way, the address field contained in the first address is standardized through the first standard address field corresponding to the address field, thereby improving the effectiveness of the second address constructed based on the first standard address field. By constructing the second address in real time, the flexibility of constructing the second address is improved. On this basis, the address weight of the second address is calculated according to the location identification value corresponding to the second standard address field contained in the second address in the first address, and the third address is determined in the second address through the address weight of the second address. In this way, the second standard address field contained in the second address is made a standardized address field through the second standard address field including the first standard address field. At the same time, the location identification value of the second standard address field is introduced to further evaluate the address weight of the second address, thereby improving the reliability and accuracy of the third address determined in the second address.
[0094] An embodiment of a computer device provided in this specification is as follows: Corresponding to the above-described address processing method, based on the same technical concept, the embodiment of the present application also provides a first computer device, which is used to execute the above-described address processing method. Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.
[0095] This embodiment provides a computer device, including: like Figure 4As shown, computer devices can vary significantly depending on their configuration or performance. They may include one or more processors 401 and memory 402. Memory 402 may store one or more applications or data. Memory 402 may be either ephemeral or persistent. Applications stored in memory 402 may include one or more modules (not shown), each of which may include a series of computer-executable instructions within the computer device. Furthermore, processor 401 may be configured to communicate with memory 402 to execute the series of computer-executable instructions within memory 402 on the computer device. The computer device may also include one or more power supplies 403, one or more wired or wireless network interfaces 404, one or more input / output interfaces 405, one or more keyboards 406, and the like.
[0096] In a specific embodiment, a computer device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions in the computer device, and the one or more programs are configured to be executed by one or more processors, including computer-executable instructions for performing the following: Performing hierarchical identification on the address field included in the first address to obtain the administrative division level of the address field; According to the administrative division level, query the address database to obtain a standard address field set corresponding to the administrative division level; querying the standard address field set for a first standard address field corresponding to the address field, and constructing a second address based on the first standard address field; Determine a location identifier value corresponding to a second standard address field included in the second address in the first address; the second standard address field includes the first standard address field; An address weight of the second address is calculated according to the location identification value, and a third address is determined in the second address based on the address weight.
[0097] In one embodiment, the location identifier value includes a starting location identifier value and an ending location identifier value, and the address weight of the second address is calculated according to the location identifier value, which is implemented in the following manner: Determine the first address field in the second standard address field according to the start position identification value and the end position identification value corresponding to the second standard address field in the first address; The address weight of the second address is calculated based on the hierarchical weight of the administrative division hierarchy of the first address field.
[0098] In one embodiment, the second standard address field includes a third standard address field and a fourth standard address field. The first address field is determined in the second standard address field according to the start position identifier value and the end position identifier value corresponding to the second standard address field in the first address, and is implemented in the following manner: Comparing the starting location identifier value corresponding to the third standard address field with the ending location identifier value corresponding to the fourth standard address field; the administrative division level of the third standard address field is lower than the administrative division level of the fourth standard address field; If the comparison result is that the starting position identification value corresponding to the third standard address field is smaller than the ending position identification value corresponding to the fourth standard address field, the third standard address field is determined to be the first address field.
[0099] In one embodiment, the address weight of the second address is calculated based on the hierarchical weight of the administrative division level of the first address field, and is implemented in the following manner: Calculating a first parameter based on the number of fourth standard address fields; An address weight of the second address is calculated based on the tier weight and the first parameter.
[0100] In one embodiment, the computer device further performs the following operations: Deleting a target element included in the second standard address field, and calculating a first field weight of the second standard address field based on the field length of the second standard address field after deletion; the target element is used to represent the administrative division level of the second standard address field; A second field weight of the second standard address field is determined according to a matching degree between the second standard address field and the corresponding first standard address field.
[0101] In one embodiment, the address weight of the second address is calculated based on the location identifier value, and is implemented in the following manner: Calculating a first address weight of the second address based on the first field weight and the second field weight; Calculate a second address weight of the second address according to the location identification value; The address weight is calculated according to the first address weight and the second address weight.
[0102] In one embodiment, the first address weight of the second address is calculated based on the first field weight and the second field weight, and is implemented as follows: Calculate the weight sum according to the first field weight and the second field weight; If the second standard address field is associated with a newly added tag, the first address weight of the second address is calculated according to the sum of the weights and the second parameter.
[0103] In one embodiment, the address database is updated in the following manner: Performing hierarchical identification on the address field included in the fourth address to obtain the administrative division level of the address field included in the fourth address; If the address field corresponding to the first level in the administrative division level of the address field included in the fourth address is successfully matched in the address database, the address field corresponding to the second level is extracted from the address field included in the fourth address; If the address field corresponding to the second level fails to match in the address library, the address field corresponding to the second level is updated to the address library, and the newly added label is associated with the address field corresponding to the second level.
[0104] In the computer device provided in this embodiment, the administrative division level of the address field contained in the first address is identified, the first standard address field corresponding to the address field is queried in the standard address field set corresponding to the administrative division level, and the second address is constructed based on the first standard address field. In this way, the address field contained in the first address is standardized through the first standard address field corresponding to the address field, thereby improving the effectiveness of the second address constructed based on the first standard address field. By constructing the second address in real time, the flexibility of constructing the second address is improved. On this basis, the address weight of the second address is calculated according to the location identification value corresponding to the second standard address field contained in the second address in the first address, and the third address is determined in the second address through the address weight of the second address. In this way, the second standard address field contained in the second address is a standardized address field through the second standard address field including the first standard address field. At the same time, the location identification value of the second standard address field is introduced to further evaluate the address weight of the second address, thereby improving the reliability and accuracy of the third address determined in the second address.
[0105] An embodiment of a computer-readable storage medium provided in this specification is as follows: Corresponding to the address processing method described above, based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium.
[0106] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the following process is implemented: Performing hierarchical identification on the address field included in the first address to obtain the administrative division level of the address field; According to the administrative division level, query the address database to obtain a standard address field set corresponding to the administrative division level; querying the standard address field set for a first standard address field corresponding to the address field, and constructing a second address based on the first standard address field; Determine a location identifier value corresponding to a second standard address field included in the second address in the first address; the second standard address field includes the first standard address field; An address weight of the second address is calculated according to the location identification value, and a third address is determined in the second address based on the address weight.
[0107] In the computer-readable storage medium provided in this embodiment, the administrative division level of the address field contained in the first address is identified, the first standard address field corresponding to the address field is queried in the standard address field set corresponding to the administrative division level, and the second address is constructed based on the first standard address field. In this way, the address field contained in the first address is standardized through the first standard address field corresponding to the address field, thereby improving the effectiveness of the second address constructed based on the first standard address field. By constructing the second address in real time, the flexibility of constructing the second address is improved. On this basis, the address weight of the second address is calculated according to the location identification value corresponding to the second standard address field contained in the second address in the first address, and the third address is determined in the second address through the address weight of the second address. In this way, the second standard address field contained in the second address is made a standardized address field by including the second standard address field of the first standard address field. At the same time, the location identification value of the second standard address field is introduced to further evaluate the address weight of the second address, thereby improving the reliability and accuracy of the third address determined in the second address.
[0108] It should be noted that the embodiment of a computer-readable storage medium in this specification and the embodiment of an address processing method in this specification are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.
[0109] An embodiment of a computer program product provided in this specification is as follows: Corresponding to the address processing method described above, based on the same technical concept, an embodiment of the present application also provides a computer program product.
[0110] The computer program product provided in this embodiment includes a computer program. When the computer program is executed by a processor, the following process is implemented: Performing hierarchical identification on the address field included in the first address to obtain the administrative division level of the address field; According to the administrative division level, query the address database to obtain a standard address field set corresponding to the administrative division level; querying the standard address field set for a first standard address field corresponding to the address field, and constructing a second address based on the first standard address field; Determine a location identifier value corresponding to a second standard address field included in the second address in the first address; the second standard address field includes the first standard address field; An address weight of the second address is calculated according to the location identification value, and a third address is determined in the second address based on the address weight.
[0111] In the computer program product provided in this embodiment, the administrative division level of the address field contained in the first address is identified, the first standard address field corresponding to the address field is queried in the standard address field set corresponding to the administrative division level, and the second address is constructed based on the first standard address field. In this way, the address field contained in the first address is standardized through the first standard address field corresponding to the address field, thereby improving the effectiveness of the second address constructed based on the first standard address field. By constructing the second address in real time, the flexibility of constructing the second address is improved. On this basis, the address weight of the second address is calculated according to the location identification value corresponding to the second standard address field contained in the second address in the first address, and the third address is determined in the second address through the address weight of the second address. In this way, the second standard address field contained in the second address is made a standardized address field by including the second standard address field of the first standard address field. At the same time, the location identification value of the second standard address field is introduced to further evaluate the address weight of the second address, thereby improving the reliability and accuracy of the third address determined in the second address.
[0112] It should be noted that the embodiment of a computer program product in this specification and the embodiment of an address processing method in this specification are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.
[0113] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0114] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable test equipment to produce a machine, so that the instructions executed by the processor of the computer or other programmable test equipment generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0116] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable test equipment to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0117] These computer program instructions may also be loaded onto a computer or other programmable test device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process described in the flow. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0118] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0119] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0120] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0121] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0122] The embodiments of the present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0123] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0124] The foregoing description is merely an example of the present invention and is not intended to limit the present invention. Persons skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims herein.
Claims
1. An address processing method, characterized in that: The method comprises: Performing hierarchical identification on the address field included in the first address to obtain the administrative division level of the address field; According to the administrative division level, query the address database to obtain a standard address field set corresponding to the administrative division level; querying the standard address field set for a first standard address field corresponding to the address field, and constructing a second address based on the first standard address field; Determine a location identifier value corresponding to a second standard address field included in the second address in the first address; the second standard address field includes the first standard address field; An address weight of the second address is calculated according to the location identification value, and a third address is determined in the second address based on the address weight.
2. The method according to claim 1, characterized in that The location identification value includes a starting location identification value and an ending location identification value, and calculating the address weight of the second address according to the location identification value includes: determining the first address field in the second standard address field according to the start position identification value and the end position identification value corresponding to the second standard address field in the first address; The address weight of the second address is calculated based on the hierarchical weight of the administrative division level of the first address field.
3. The method according to claim 2, characterized in that The second standard address field includes a third standard address field and a fourth standard address field, and determining the first address field in the second standard address field according to a start position identification value and an end position identification value corresponding to the second standard address field in the first address includes: Comparing the starting location identifier value corresponding to the third standard address field with the ending location identifier value corresponding to the fourth standard address field; the administrative division level of the third standard address field is lower than the administrative division level of the fourth standard address field; If the comparison result is that the starting position identification value corresponding to the third standard address field is smaller than the ending position identification value corresponding to the fourth standard address field, the third standard address field is determined to be the first address field.
4. The method according to claim 3, characterized in that The calculating the address weight of the second address based on the hierarchical weight of the administrative division level of the first address field includes: Calculating a first parameter according to the number of the fourth standard address fields; An address weight of the second address is calculated based on the hierarchy weight and the first parameter.
5. The method according to claim 1, wherein The method further comprises: Deleting a target element included in the second standard address field, and calculating a first field weight of the second standard address field based on the field length of the second standard address field after deletion; the target element is used to represent the administrative division level of the second standard address field; A second field weight of the second standard address field is determined according to a matching degree between the second standard address field and the first standard address field.
6. The method according to claim 5, characterized in that The calculating the address weight of the second address according to the location identification value includes: Calculating a first address weight of the second address according to the first field weight and the second field weight; Calculating a second address weight of the second address according to the location identification value; The address weight is calculated according to the first address weight and the second address weight.
7. The method according to claim 6, characterized in that The calculating the first address weight of the second address according to the first field weight and the second field weight includes: Calculate a weight sum according to the first field weight and the second field weight; If the second standard address field is associated with a newly added tag, the first address weight of the second address is calculated according to the sum of the weights and the second parameter.
8. The method according to claim 1, characterized in that The address database is updated in the following manner: Performing hierarchical identification on the address field included in the fourth address to obtain the administrative division level of the address field included in the fourth address; If the address field corresponding to the first level in the administrative division level of the address field included in the fourth address is successfully matched in the address database, extracting the address field corresponding to the second level from the address field included in the fourth address; If the address field corresponding to the second level fails to match in the address library, the address field corresponding to the second level is updated to the address library, and a new tag is associated with the address field corresponding to the second level.
9. An address processing device, characterized in that: The device comprises: A level identification module, configured to perform level identification on the address field included in the first address to obtain the administrative level of the address field; A field set query module, configured to query the address database according to the administrative division level to obtain a standard address field set corresponding to the administrative division level; An address construction module, configured to search the standard address field set for a first standard address field corresponding to the address field, and to construct a second address based on the first standard address field; an identification value determining module, configured to determine a position identification value corresponding to a second standard address field included in the second address in the first address; the second standard address field includes the first standard address field; The address determination module is configured to calculate an address weight of the second address according to the location identification value, and determine a third address in the second address based on the address weight.
10. A computer device, characterized in that: The device comprises: A processor; and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the address processing method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the address processing method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the address processing method according to any one of claims 1 to 8 when executed by a processor.