Point of interest data processing method, device, electronic device and storage medium
By matching and updating administrative district information in the point of interest data, the problem of conflict between address and administrative district fields in the point of interest data is solved, data quality and accuracy are improved, and reliable data support is provided for geographic query and positioning functions.
Patent Information
- Application Number
- CN202110602863.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-31
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-05-31
AI Technical Summary
The prior art is difficult to effectively identify and resolve conflicts between address fields and administrative regions in point of interest data, resulting in low quality of point of interest data, affecting query and use.
By obtaining at least one-level administrative region information in the address field in the point of interest data and matching it with the information in the administrative region field in the point of interest data, we obtain the matching result, and then update the interest data based on the matching result, and use the prefix tree to obtain the administrative region Information can improve accuracy and ensure the timeliness and accuracy of administrative region information.
It improves the quality of point-of-interest data, ensures the accuracy of the data, provides reliable data support for location query, positioning and other functions based on point-of-interest data, and reduces the complexity of error identification and correction.
Smart Images

Figure CN113360789B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computers, and specifically relates to a method, device, electronic device and storage medium for processing point of interest data. Background Art
[0002] Point of Interest (POI) refers to all geographical objects that can be abstracted as points in space. Common POIs include schools, subway stations, hospitals, shops, etc. POI data is used to accurately represent real geographical entities in virtual spaces such as maps, providing data support for geography-based query, positioning, display, personalized recommendation and other functions. Therefore, the accuracy and correctness of POI data is the basis for advanced functions.
[0003] However, the sources of POI data are not uniform, which leads to data conflicts between some fields in the POI data. For example, the POI data includes address fields and city fields, where the address field is "Zhongkang Road, Futian District, Shenzhen City" and the city field is "Guangzhou City". In this way, there is a conflict between "Shenzhen City" in the address field and "Guangzhou City" in the city field. This low-quality POI data will affect the query and use of POIs. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for processing point of interest data, which can solve the problem that low-quality point of interest data will affect the query and use of points of interest.
[0005] In a first aspect, an embodiment of the present application provides a method for processing point of interest data, including:
[0006] Acquire point of interest data, wherein the point of interest data includes an address field and an administrative district field;
[0007] Obtain at least one level of administrative district information in the address field;
[0008] Matching the at least one level administrative region information with the information of the administrative region field in the point of interest data to obtain a matching result;
[0009] The point of interest data is updated according to the matching result.
[0010] In a second aspect, an embodiment of the present application provides a device for processing point of interest data, including:
[0011] A first acquisition module, used to acquire point of interest data, wherein the point of interest data includes an address field and an administrative area field;
[0012] A second acquisition module is used to acquire at least one level of administrative district information in the address field;
[0013] A matching module, used for matching the at least one level administrative region information with the information of the administrative region field in the point of interest data to obtain a matching result;
[0014] An updating module is used to update the point of interest data according to the matching result.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0018] In the embodiment of the present application, the point of interest data is first obtained, and then the administrative district information is obtained from the address field in the point of interest data, and the administrative district information is matched with the information of the administrative district field in the point of interest data to obtain a matching result; then, the point of interest data is updated according to the matching result. In this way, errors in the point of interest data can be corrected, the quality of the point of interest data can be improved, and data support can be provided for functions such as location query and positioning based on the point of interest data. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flowchart of an embodiment of a method for processing point of interest data provided by the present application.
[0020] Figure 2 It is a schematic diagram of an embodiment of using a prefix tree to obtain administrative district information provided by the present application.
[0021] Figure 3 It is a schematic diagram of another embodiment provided by the present application for obtaining administrative district information by using a prefix tree.
[0022] Figure 4 It is a schematic diagram of an embodiment of administrative district information conflict provided by this application.
[0023] Figure 5 It is a schematic diagram of another embodiment of administrative district information conflict provided by this application.
[0024] Figure 6 It is a schematic diagram of an embodiment of information processing rules for conflict provided by the present application.
[0025] Figure 7 This is a schematic diagram of an embodiment of the conflict between the province field and the city provided by this application.
[0026] Figure 8 It is a schematic diagram of an embodiment of unified setting of district and county information provided by the present application.
[0027] Fig. 9 It is a flowchart of another embodiment of a method for processing point of interest data provided by the present application.
[0028] Fig.10 It is a structural diagram of an embodiment of a point of interest data processing device provided by the present application.
[0029] Fig.11 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0030] Fig.12 It is a structural schematic diagram of another embodiment of an electronic device provided by the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0032] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0033] Since the sources of POI data vary in quality, the correctness of POI data may be threatened by errors or omissions in latitude and longitude, addresses, administrative divisions, etc. Common errors in POI data include the following:
[0034] 1. The information in the province, city, and district fields in the POI data conflicts with the information in the address field. For example, referring to Table 1, the "Shenzhen City" in the address conflicts with the "Guangzhou City" in the province, city, and district fields.
[0035] Table 1
[0036]
[0037] 2. The longitude and latitude in the POI data conflict with the information in the province, city, and district fields. For example, referring to Table 2, the longitude and latitude are not within the province, city, and district "Futian District, Shenzhen City, Guangdong Province", that is, the longitude and latitude conflict with the province, city, and district information.
[0038] Table 2
[0039]
[0040] 3. The longitude and latitude in the POI data conflict with the information in the address field. For example, referring to Table 3, the longitude and latitude are not in the address of "No. 136, Zhongkang Road, Futian District".
[0041] Table 3
[0042]
[0043] These errors will affect the query and use of the POI data. Therefore, detecting whether these POI data are erroneous is a prerequisite for ensuring that the POI data can be used effectively.
[0044] In the related art, the processing of POI data focuses on geocoding (i.e., generating the corresponding longitude and latitude according to the address in the POI data) and reverse geocoding (i.e., generating the corresponding address according to the longitude and latitude in the POI data). However, the above methods simply trust the information of one field (longitude and latitude or address) and do not detect the conflict between longitude and latitude and address. In fact, there are a large number of POI data, and the locations corresponding to the addresses and longitude and latitude do not match.
[0045] For example, the address is "Zhongkang Road, Futian District, Shenzhen City, Guangdong Province", while the corresponding location of the latitude and longitude is Jinzhong City, Shanxi Province. Although this error can be identified by simple use of geocoding and reverse geocoding, more complex conflicts are difficult to identify. For example, the address in the point of interest data is "Futian District, Shenzhen City, Guangdong Province", and the province, city and district fields are "Guangdong Province", "Guangzhou City", and "Tianhe District" respectively, and the corresponding location of the latitude and longitude is "Yuexiu District, Guangzhou City, Guangdong Province". There is a conflict between these three information sources, and there is no method to define, identify and resolve it.
[0046] In addition, the related technology has a solution for processing point of interest data. However, the solution assumes that the information of the administrative district field in the point of interest data is accurate, and mainly detects the conflict between the longitude and latitude and the address field. Such as the road name, road number, point of interest name, whether the named area in the address is near the longitude and latitude, etc. It does not involve the consistency detection of the information of the administrative district field mentioned above with the address, longitude and latitude and other fields. Only by ensuring that the administrative district information in the address field matches the information in the administrative district field can the quality of the point of interest data be guaranteed, and the points of interest can be better used for data query, positioning, display, personalized recommendation and other functions.
[0047] In order to improve the quality of POI data and provide data support for location query, positioning and other functions, this application provides a POI data processing method. Figure 1 FIG. 1 is a flow chart of an embodiment of a method for processing point of interest data provided by the present application. Figure 1 As shown, including:
[0048] S102, obtaining point of interest data, where the point of interest data includes an address field and an administrative district field.
[0049] Among them, the point of interest data includes not only the address field and the administrative area field (such as the province, city, district and county administrative area fields), but also the following fields: name, address, province, city, district, province code, city code, district code. For example, the point of interest data is shown in Table 4:
[0050] Table 4
[0051]
[0052] The method for processing point of interest data also includes:
[0053] S104, obtaining at least one level of administrative region information in the address field, for example, obtaining information such as province, city, district, and county in the address field;
[0054] S106, matching the at least one level administrative region information with the information of the administrative region field in the point of interest data to obtain a matching result.
[0055] S106 may specifically include: matching each level of administrative district information with the information of the corresponding administrative district field in the point of interest data to obtain a matching result. For example, the province information "Guangdong Province", the city information "Shenzhen City", and the district and county information "Futian District" are obtained from the address field shown in Table 4. In this case, in S106, the province "Guangdong Province" in the address field is matched with the "Guangdong Province" in the province field shown in Table 4 to obtain a matching result. Similarly, the city in the address field is matched with the information in the city field shown in Table 4, and the district and county in the address field is matched with the information in the district field shown in Table 4 to obtain a matching result.
[0056] The method for processing point of interest data also includes:
[0057] S108: Update the point of interest data according to the matching result.
[0058] As an example, S108 may specifically include: when any level of administrative district information does not match the information of the corresponding administrative district field, updating the point of interest data so that in the updated point of interest data, the level of administrative district information matches the information of the corresponding administrative district field.
[0059] In the embodiment of the present application, the point of interest data is first obtained, and then the administrative district information is obtained from the address field in the point of interest data, and the administrative district information is matched with the information of the administrative district field in the point of interest data to obtain a matching result; then, the point of interest data is updated according to the matching result. In this way, errors in the point of interest data can be corrected, the quality of the point of interest data can be improved, and data support can be provided for functions such as location query and positioning based on the point of interest data.
[0060] In one or more embodiments of the present application, S104 may include:
[0061] The information of the address field in the point of interest data is segmented to obtain segmented words; the segmented words are matched with the information corresponding to the nodes on the preset prefix tree, wherein the preset prefix tree includes administrative district information, and the information corresponding to multiple nodes on the same path of the preset prefix tree respectively forms the administrative district information; when the segmented words match the information corresponding to the nodes on the preset prefix tree, the administrative district information is determined according to the segmented words.
[0062] In an embodiment of the present application, the administrative district information in the address field is obtained by means of a prefix tree. Compared with machine learning, deep learning, etc., which use named entity recognition to identify administrative district information, the advantage of using a prefix tree is that it does not require a large amount of labeled data for training. In addition, the use of a prefix tree can ensure the timeliness of obtaining administrative district information. This is because the country's administrative divisions often undergo name changes, mergers, deletions, and other operations. The method of training a machine learning model is difficult to meet the timeliness requirements, and it is possible to extract outdated administrative division information. At the same time, there is also a certain extraction error rate, and weak interference from the data can easily cause a greater impact on the model. For example, the address field includes "Qingyuan Port International School". When the model is used to obtain administrative district information from it, "Qingyuan City" may be erroneously extracted. The present application uses a prefix tree to obtain administrative district information, which can reduce the error rate.
[0063] The prefix tree is constructed based on the latest administrative divisions, so that the extracted administrative division information can be ensured to be the administrative division information currently used by the country, rather than outdated information. In addition, since not all addresses are written in a standardized form, for example, provinces, cities and districts in some addresses appear in abbreviated or miswritten forms. The abbreviations and miswritten forms of some administrative division information are shown in Table 5 below:
[0064] Table 5
[0065] Abbreviation or misspelling of administrative district information Standard way to write administrative district information Shenzhen Shenzhen Guangdong Guangdong Province Guangxi Province Guangxi Zhuang Autonomous Region Inner Mongolia Inner Mongolia Autonomous Region Enshi Prefecture Enshi Tujia and Miao Autonomous Prefecture Aksu Aksu region
[0066] In order to improve the accuracy of obtaining administrative district information from the address field, as an example, determining administrative district information according to the segmentation term may specifically include: when the segmentation term is standardized administrative district information, determining the segmentation term as first-level administrative district information; when the segmentation term is not standardized administrative district information, using the standardized administrative district information corresponding to the segmentation term as first-level administrative district information. Among them, it can be determined whether the segmentation term is standardized administrative district information by querying whether the segmentation term is in Table 5 similar to the above.
[0067] As another example, determining administrative district information according to the segmentation term may specifically include: determining the administrative district information corresponding to the segmentation term according to a node corresponding to information matching the segmentation term in a preset prefix tree.
[0068] like Figure 2 and Figure 3 As shown, the position of the arrow represents the position where the segmentation word is matched in the preset prefix tree. Figure 2 The "Shenzhen" pointed by the arrow in the middle represents the administrative district information determined based on the segmentation terms. Figure 3 The "Shen Enshi Tujia and Miao Autonomous Prefecture" pointed by the middle arrow represents the administrative district information determined based on the participle terms.
[0069] Specific reference Figure 2 , when the segmentation word "Shenzhen" is obtained from the address field, the segmentation word "Shenzhen" matches the "Shenzhen" corresponding to the node in the preset prefix tree. At this time, the leaf node corresponding information "Shenzhen" on the same path as the node is obtained, and the administrative district information is determined to be "Shenzhen". Of course, if the segmentation word "Shenzhen" is obtained from the address field, then the segmentation word "Shenzhen" matches the "Shenzhen" in the preset prefix tree, and the administrative district information is also determined to be "Shenzhen".
[0070] Figure 3 and Figure 2 Similarly, when the segmented words "Enshi Prefecture" or "Enshi Tujia and Miao Autonomous Prefecture" are obtained from the address field, the administrative region information determined based on the prefix tree is "Enshi Tujia and Miao Autonomous Prefecture".
[0071] In this way, the prefix tree can not only achieve full name matching of administrative district information, but also achieve matching of abbreviations and misspellings of administrative district information, thereby improving the accuracy of obtaining administrative district information from the address field.
[0072] In one or more embodiments of the present application, S104 may include:
[0073] Starting from the initial position of the information in the address field, at least one level of administrative district information is obtained in the address field, wherein, when any administrative district information is obtained from the address field, the next level of administrative district information of the administrative district information is obtained from the information in the address field that is located after the administrative district information.
[0074] As an example, an index is compiled for each character in the information of the address field; after obtaining the first-level administrative district information from the address field, the next-level administrative district information after the first-level administrative district information is obtained according to the index of the end character of the first-level administrative district information in the information of the address field.
[0075] Assuming that the information in the address field is "No. 136, Zhongkang Road, Meilin Street, Futian District, Shenzhen City, Guangdong Province", the first character (ie "Guang") at the beginning is numbered 1, the second character (ie "Dong") is numbered 2, and so on.
[0076] Then, the administrative district information is obtained starting from character 1, and the province information "Guangdong Province" is obtained; then, since the province in the address book is generally followed by the city name, according to the index of the end character of "Guangdong Province", the city information "Shenzhen City" that follows "Guangdong Province" is obtained in the information after "Guangdong Province".
[0077] After obtaining the city information "Shenzhen City", since the city information in the address is generally followed by district and county information, according to the index of the end character of "Shenzhen City", the district and county information "Futian District" immediately following "Shenzhen City" is obtained in the information after "Shenzhen City".
[0078] However, when obtaining administrative district information from the address field, there may be a conflict between the two administrative district information obtained, for example, Figure 4 , in from Figure 4 The address field shown in the figure obtains two district names "Jiulong" and "Jiulongpo District", and the positions of these two district names in the address field overlap. Specifically, the position index of "Jiulong" in the address field is the 4th and 5th characters, while the position index of "Jiulongpo District" in the address field is the 4th to 7th characters, and the overlapping positions are the 4th and 5th characters. In addition, Figure 4 There are two district names in the same address field, resulting in conflicts between the two district names "Jiulong" and "Jiulongpo District".
[0079] Refer to Figure 5 , in from Figure 5 The address field shown obtains the district name "Kowloon" and the road name "Kowloon Cheng Road". The positions of the district name and the road name in the address field overlap, resulting in a conflict between the district name and the road name.
[0080] In order to determine whether there is a conflict between administrative district information obtained from the address field, in one or more embodiments of the present application, after S104, the method for processing point of interest data may further include:
[0081] In the case where the number of administrative district information of the at least one first-level administrative district information is multiple, determining whether positions of any two administrative district information in the at least one first-level administrative district information in the address field overlap;
[0082] If there is overlap, the two administrative district information are invalidated, or the administrative district information is re-acquired from the address field based on the two administrative district information, wherein the invalidation processing includes: recording the two administrative district information as invalid administrative district information, or deleting the two administrative district information.
[0083] As an example, the two administrative district information may be a combination of any two of the following administrative district information: province name, city name, district name, street name, road name. In addition, the two administrative district information may also be one of the following: two province names, two city names, two district names, two street names, two road names.
[0084] As an example, when the positions of two administrative district information overlap, the two administrative district information may be recorded as invalid administrative district information, and the invalid administrative district information does not participate in the subsequent matching in S106.
[0085] As another example, when the positions of two administrative district information overlap, the administrative district information can be re-obtained from the address field based on the two administrative district information. For example, the administrative district information with the largest number of characters is obtained from the two administrative district information with overlapping positions, and the administrative district information with the largest number of characters is determined as valid administrative district information, which can participate in the subsequent matching in S106, and the other administrative district information with fewer characters is determined as invalid administrative district information.
[0086] For example, continue to refer to Figure 4 In the case of a conflict between the two district names "Jiulong" and "Jiulongpo District", the district name "Jiulongpo District" with the largest number of characters is selected as the administrative district information to be matched in S106. Figure 5 In the case of a conflict between the district name "Kowloon" and the road name "Kowloon Cheng Road", the road name "Kowloon Cheng Road" with the largest number of characters is selected as the administrative district information participating in the matching in S106.
[0087] The embodiment of the present application can determine whether there is location overlap between the administrative district information obtained from the address field, and in the case of location overlap, invalidate the two administrative district information with overlapping locations. Alternatively, the administrative district information is re-acquired, so that the administrative district information finally obtained is more accurate, and the point of interest data can be updated more accurately to ensure the accuracy of the updated point of interest data.
[0088] In one or more embodiments of the present application, after S104, the method for processing point of interest data may further include:
[0089] Determine whether the administrative district information is in the preset standardized administrative district information database;
[0090] If the administrative district information is not in the standardized administrative district information database, determining whether the administrative district information is in a preset non-standardized administrative district information database;
[0091] When the administrative district information is in a non-standardized administrative district information database, the administrative district information is standardized to obtain standardized administrative district information.
[0092] The standardized administrative region information database contains administrative region information that complies with regulations, and does not contain abbreviations or incorrect information about administrative regions. For example, the standardized administrative region information database contains "Inner Mongolia Autonomous Region" but not the abbreviation "Inner Mongolia". For another example, the standardized administrative region information database contains "Guangxi Zhuang Autonomous Region" but not the incorrect expression "Guangxi Province".
[0093] The information in the non-standardized administrative district information database may be an abbreviation or a misspelling of the administrative district information in Table 5 above.
[0094] When the administrative district information is in the non-standardized administrative district information database, it means that the administrative district information is not standard, and the administrative district information needs to be standardized. As an example, standardizing the administrative district information to obtain standardized administrative district information may specifically include: obtaining standardized administrative district information corresponding to the administrative district information in the correspondence relationship between the preset non-standardized administrative district information and the standardized administrative district information.
[0095] For example, the administrative region information "Guangxi Province" is obtained from the address field. The administrative region information "Guangxi Province" is not in the standardized administrative region information database, but in the non-standardized administrative region information database. Then the standardized administrative region information corresponding to "Guangxi Province" is "Guangxi Zhuang Autonomous Region".
[0096] After the administrative district information is standardized to obtain standardized administrative district information, the standardized administrative district information is used as the administrative district information obtained from the address field and matched with the information of the corresponding administrative district field.
[0097] In an embodiment of the present application, the administrative district information is standardized so that the standardized administrative district information can be used to more accurately identify whether an error occurs in a point of interest.
[0098] In one or more embodiments of the present application, S108 may specifically include:
[0099] In the case that any first administrative district information in at least one level of administrative district information does not match the information of the corresponding administrative district field, the first administrative district information and the information of the corresponding administrative district field are uniformly set according to the preset information setting rules so that the first administrative district information and the information of the corresponding administrative district field after the unified setting match.
[0100] Among them, the pre-configured information processing rules may include: taking the administrative district information obtained from the address field as the basis, specifically, when the first administrative district information does not match the information of the corresponding administrative district field, resetting the information of the corresponding administrative district field according to the first administrative district information.
[0101] Alternatively, the pre-configured information processing rules may include: taking the information of the administrative district field as the basis, specifically, when the first administrative district information does not match the information of the corresponding administrative district field, resetting the first administrative district information according to the information of the administrative district field.
[0102] In addition to uniformly setting the first administrative district information and the information of the corresponding administrative district field, errors in the first administrative district information and the information of the corresponding administrative district field may also be recorded.
[0103] Below through Figure 6 An example is given of how to use the pre-configured information processing rules.
[0104] like Figure 6 As shown, the information of the province field in the point of interest data is "Guangxi Province". After standardization, it is "Guangxi Zhuang Autonomous Region", and the province extracted from the information in the address field is "Guangdong Province". As a result, there is a conflict between the information in the province field and the province in the address field.
[0105] In this case, if the pre-configuration encounters a conflict and the province field is used as the standard, the province name in the province field is directly used as the province used in the subsequent process. If the pre-configuration encounters a conflict and the province in the address field is used as the standard, the province in the address field is directly used as the province used in the subsequent process. If the pre-configuration encounters a conflict and an error needs to be recorded, the error of the conflict between the province field information and the province in the address field information is written to the error recording module.
[0106] In one or more embodiments of the present application, S108 may include:
[0107] In the case where the second administrative district information in the at least one level of administrative district information matches the information of the first field in the point of interest data, determining whether the second administrative district information conflicts with the information of the second field in the point of interest data, wherein the first field is the administrative district field corresponding to the second administrative district information, and the second field is the administrative district field other than the first field;
[0108] If it is determined that there is a conflict, the point of interest data is updated. For example, one of the second administrative district information and the second field information is used as the basis, and the other information is reset so that the two do not conflict.
[0109] Since there may be conflicts between provinces, cities, and counties in the POI data, for example Figure 7 As shown, the information "Guangxi Province" in the province field is standardized into "Guangxi Zhuang Autonomous Region". The standardized information does not match the province "Guangdong Province" in the address field, that is, a province conflict occurs. In this case, assuming that the province field is used as the basis, the province is uniformly set to the province corresponding to the province field, that is, "Guangxi Zhuang Autonomous Region".
[0110] In addition, the information "Nanning City" in the city field does not match the city "Dongguan City" in the address field, that is, a city conflict occurs. In this case, assuming that the address field is used as the basis, the city is uniformly set to the city in the address field, that is, "Dongguan City".
[0111] However, after the unified settings of provinces and cities, it was found that "Dongguan City" was not under the jurisdiction of "Guangxi Zhuang Autonomous Region", that is, there was a conflict between the provinces and cities after the unified settings.
[0112] Through the embodiment of the present application, it can be determined whether the second administrative district information conflicts with the information in the second field in the point of interest data. The second administrative district information can be district or county information, or any administrative district information.
[0113] Among them, determining whether the second administrative district information conflicts with the information of the second field in the point of interest data can specifically include: determining whether one of the two administrative districts is within the jurisdiction of the other administrative district, the two administrative districts include the administrative district corresponding to the second administrative district information and the administrative district corresponding to the second field; when one administrative district is not within the jurisdiction of another administrative district, it can be determined that there is a conflict between the two.
[0114] The following is an exemplary description of the embodiments of the present application.
[0115] In one example, assuming that the second administrative district information is the district or county name in the address, and the information in the first field is the district or county name corresponding to the district or county field, when the district or county name in the address is consistent with the district or county name corresponding to the district or county field, a multi-source trust method can be used to determine whether the district or county name in the address conflicts with the city name or the province name. Among them, the priority of the city is greater than the priority of the province. That is, first determine whether the district or county in the address is within the jurisdiction of the city corresponding to the city field, and then determine whether the district or county in the address is within the jurisdiction of the province corresponding to the province field.
[0116] Use a multi-source trust approach to determine whether the county name in the address conflicts with the city name or province name, including:
[0117] Determine whether the district or county in the address is within the jurisdiction of the city corresponding to the city field. If the district or county in the address is within the jurisdiction of the city corresponding to the city field, the district or county in the address shall prevail and participate in the subsequent process; if the district or county in the address is not within the jurisdiction of the city corresponding to the city field, there is a conflict error in recording the point of interest data;
[0118] If there is no city corresponding to the city field in the POI data, determine whether the district or county in the address is within the jurisdiction of the province corresponding to the province field; if the district or county in the address is within the jurisdiction of the province corresponding to the province field, the district or county in the address shall prevail and participate in the subsequent process; if the district or county in the address is not within the jurisdiction of the province corresponding to the province field, there is a conflict error in recording the POI data;
[0119] If there is neither a city field corresponding to a city nor a province field corresponding to a province in the POI data, it means that there are no more data sources for conflict detection, and the district or county in the address shall prevail.
[0120] The above judgment adopts a multi-source trust approach. When the district and county in the address do not conflict with information from multiple sources, it can be considered that the district and county in the address are trustworthy.
[0121] When a district or county in an address conflicts with information from a certain source (such as a city corresponding to a city field or a province corresponding to a province field), a conflict error in the POI data may be recorded, or output adjustments may be made based on the conflict configuration.
[0122] Adjust output based on conflicting configurations, which may include:
[0123] If the configuration encounters a conflict and the district and county field is used as the basis, the district and county name corresponding to the district and county field will be directly passed as the district and county name in the subsequent process. In addition, the province name, city name and district and county name can be combined to find the corresponding district and county code.
[0124] If the configuration encounters a conflict and an error is recorded, the conflict is recorded, and no further judgment is performed. The error in the POI data and the cause of the error are output.
[0125] In one or more embodiments of the present application, the method for processing point of interest data may further include:
[0126] Determine whether the point of interest data includes an administrative district code, and whether at least one level of administrative district information includes target administrative district information corresponding to the administrative district code;
[0127] When the administrative district code is included in the point of interest data and the target administrative district information is included in at least one level of administrative district information, resetting the other information according to one of the administrative district code and the target administrative district information;
[0128] When the administrative district code is included in the point of interest data and the target administrative district information is not included in at least one level of administrative district information, the target administrative district information is added to the information in the address field according to the administrative district code;
[0129] When the administrative region code is not included in the point of interest data and the target administrative region information is included in at least one level of administrative region information, the administrative region code is added to the point of interest data according to the target administrative region information.
[0130] The following describes an embodiment of the present application by taking the administrative region code as a district or county code as an example.
[0131] like Figure 8 As shown, when the district and county information is obtained from the address field, and the district and county code (hereinafter referred to as the district code) is included in the POI data, the district code is more accurate than the district and county information. For example, the same district and county may have different district and county names due to misspelling or name change. Therefore, the district code is used to search for the corresponding district and county information. If the corresponding district and county information cannot be found, it is possible that the district code is wrong. The district and county information in the address field is used to search for the corresponding district code. If it can be found, the queried district code shall prevail. If it cannot be found, both the district and county information and the district code shall be left blank.
[0132] When there is no district or county information in the address field and the POI data includes an area code, the area code is used to find the corresponding district or county information.
[0133] When there is district and county information in the address field and there is no district code in the POI data, the district and county information is used to find the corresponding district code.
[0134] When there is no district and county information in the address field and no area code in the point of interest data, it means that the district and county information and the area code cannot be set uniformly, and both the district and county information and the area code are left blank.
[0135] The district and county information or the area code can be searched in the preset correspondence between the district and county information and the area code. The data structure of the correspondence between the district and county information and the area code of "Guangdong Province" can be as follows:
[0136] {“Guangdong Province”:{“Shenzhen City”:{“Futian District”:“440304”,“Longgang District”:”440307”,…},
[0137] “Guangzhou”:{“Tianhe District”:”440107”,”Yuexiu District”:”440104”,…}},
[0138] "Hunan Province":{"Changde City":{"Wuling District":"430702","Shimen County":"430726"},
[0139] “Yueyang City”:{“Huarong County”:”430623”,”Junshan District”:”430611”}},…}
[0140] The above is the correspondence between the district and county information and the area code of "Guangdong Province". The data structure of the correspondence between the district and county information and the area code of other provinces is similar to the above structure and will not be repeated here.
[0141] When the province name, city name, and district and county name are known, the corresponding district code can be found in the correspondence between the district and county information and the district code of each province. In this way, the district and county information and the district code are unified. The above unified method can well deal with null values, and does not require district codes or district and county information.
[0142] After unification, the subsequent steps only need to focus on the district and county codes. At the same time, the natural attributes of the district and county codes can easily derive the city code and province code.
[0143] In one or more embodiments of the present application, the point of interest data may also include the longitude and latitude corresponding to the longitude and latitude fields and the administrative district code corresponding to the administrative district code field.
[0144] S108 may include:
[0145] When the administrative district information at each level matches the information in the corresponding administrative district field, the administrative district where the longitude and latitude correspond to is obtained; when the administrative district where the longitude and latitude correspond to is not matched with the administrative district code, the point of interest data is updated. For example, the administrative district where the longitude and latitude correspond to is Tianhe District, Guangzhou, and the administrative district code is the administrative district code of Futian District, Shenzhen. It can be seen that Tianhe District, Guangzhou does not match the administrative district code, and it is determined that the point of interest data is wrong.
[0146] As an example, the administrative region code includes a district or county code.
[0147] In the related art, obtaining the administrative district where the position corresponding to the longitude and latitude is located may specifically include: using the longitude and latitude to search for the district and county where the position corresponding to the longitude and latitude is located in multiple districts and counties. However, this search method requires traversing multiple districts and counties, and the acquisition process is relatively slow.
[0148] In order to improve the efficiency of obtaining the administrative district where the longitude and latitude corresponding position is located, in one or more embodiments of the present application, obtaining the administrative district where the longitude and latitude corresponding position is located may specifically include:
[0149] Search for the target provincial region where the longitude and latitude are located among multiple preset provincial regions, wherein the target provincial region includes multiple municipal regions; search for the target municipal region where the longitude and latitude are located among multiple municipal regions, wherein the target municipal region includes multiple district and county regions; search for the target district and county region where the longitude and latitude are located among multiple district and county regions, and obtain the administrative region where the corresponding position of the longitude and latitude is located.
[0150] The provincial region may be an area formed by a provincial boundary line, or the provincial region may be a circumscribed rectangular area formed based on the leftmost point, the rearmost point, the uppermost point, and the lowermost point on the provincial boundary line. The circumscribed rectangular area may approximately represent the boundary of a province.
[0151] Similarly, the city-level region can be the region formed by the city boundary line or the circumscribed rectangular region of the city boundary line. The district-county level region can be the region formed by the district-county boundary line or the circumscribed rectangular region of the district-county boundary line.
[0152] In the embodiment of the present application, compared with the search method of traversing each district and county in the related art, the hierarchical search method can improve the search efficiency without adding a large amount of additional boundary data. Specifically, the search speed can be increased by 10-15 times.
[0153] In order to better illustrate the method for processing point of interest data provided by this application, Fig. 9 The method for processing point of interest data is illustrated by way of example.
[0154] Fig. 9 FIG. 2 is a flow chart showing another embodiment of a method for processing point of interest data provided by the present application. Fig. 9 As shown, the method for processing point of interest data includes:
[0155] S202, longitude and latitude detection.
[0156] Specifically, S202 may include: performing missing value detection on the longitude and latitude in the interest point data, and if at least one of the longitude and latitude is missing in the interest point data, S216 is executed to write the corresponding missing field and error information into the error recording module. The error situation of the longitude and latitude may be recorded as yes or no, and if the longitude and latitude are wrong, the subsequent steps of filling or checking the longitude and latitude may be skipped.
[0157] The error information recorded by the error recording module is stored in the form of key-value pairs. The specific storage form is as follows:
[0158] {"Error Type A":"Field Name 1",
[0159] "Error Type B": "Field Name 2",
[0160] "Error Type C": "Field Name 3",
[0161] ……}
[0162] The error types recorded by the error logging module are pre-defined error types, and the field names are the field names that come with the data.
[0163] In addition, if the longitude and latitude are not missing, it is determined whether the point where the longitude and latitude are located falls within the national border. If it falls outside the national border, S216 is executed to write the longitude and latitude error information into the error recording module. The error situation of the longitude and latitude can be recorded as yes or no. If the longitude and latitude are wrong, the subsequent steps that require longitude and latitude filling or verification can be skipped.
[0164] The method for processing point of interest data also includes:
[0165] S204, parsing the province, city, district and county in the address field;
[0166] S206, determining whether the province in the province field conflicts with the province in the address field, if there is no conflict, directly executing S208, if there is a conflict, executing S216 and executing S208;
[0167] S208, determining whether the city in the city field conflicts with the city in the address field, if there is no conflict, directly executing S210, if there is a conflict, executing S216 and executing S210;
[0168] S210, unify the district and county in the address field and the district and county code in the district and county code field;
[0169] S212, determining whether the district and county in the district and county field conflict with the district and county in the address field, if there is no conflict, directly executing S214, if there is a conflict, executing S216 and executing S214;
[0170] S214, determining whether the district and county in the district and county field conflict with the longitude and latitude, and if there is no conflict, directly executing S218, and if there is a conflict, executing S216 and S218;
[0171] S216, record errors, for example, record data errors at each step in the processing process, such as province, city, district and county name errors, conflict errors, longitude and latitude errors, etc.;
[0172] S218, liquidation error.
[0173] Among them, S218 specifically includes: obtaining the errors recorded in S216 and summarizing the errors.
[0174] In addition, in S218, if the area code is not empty, it means that the previous tests have passed, and the area name, city code, city name, province code and province name can be inferred based on the area code. The spatial information is unified. The errors related to provinces, cities and districts that have appeared before, such as province name errors, city name errors, etc., can be cleared and cancelled.
[0175] If the area code is empty and the city name is not empty, the city code, province code and province name can be inferred based on the city name. The previous errors related to the province can be cleared and cancelled.
[0176] If the area code and city name are empty, the province code is derived from the province name.
[0177] In this way, by uniformly setting the districts and counties in the address field and the district and county codes in the district and county code field, and inferring the upper-level administrative district information based on the administrative district information, the unification of information such as the address field, administrative district field, and code field in the point of interest data is achieved, and errors in erroneous point of interest data are corrected.
[0178] The method for processing point of interest data also includes:
[0179] S220: Output the error cause according to the error clearing result.
[0180] As an example, in S220, in addition to outputting the error cause, the point of interest data after the error is corrected may also be output.
[0181] For example, the original interest point data is shown in Table 6. After the errors of the original interest point data are corrected, the corrected interest point data is shown in Table 7.
[0182] Table 6
[0183]
[0184] Table 7
[0185]
[0186] In the embodiment of the present application, data with spatial attribute conflicts can be detected quickly and accurately. The problem of incomplete information utilization and information application conflicts in previous data processing is solved, and the data address, field, and longitude and latitude information can be fully utilized for judgment and supplement. Give full play to the value of each field of the data. In addition, a fault-tolerant prefix tree can be used to obtain information such as provinces, cities, districts and counties in the address field, and a multi-source trust method and conflict configuration can be adopted to reduce conflict misidentification, data correction can be performed on weakly conflicting data, and the output method can be flexibly adjusted.
[0187] It should be noted that the execution subject of the interest point data processing method provided in the embodiment of the present application may be an interest point data processing device, or a control module in the interest point data processing device for executing the interest point data processing method. In the embodiment of the present application, the interest point data processing device provided in the embodiment of the present application is described by taking the interest point data processing device executing the interest point data processing method as an example.
[0188] Fig.10 Schematic diagram of a structure of an embodiment of a point of interest data processing device provided by the present application. Fig.10 As shown, the point of interest data processing device 300 includes:
[0189] A first acquisition module 302 is used to acquire point of interest data, where the point of interest data includes an address field and an administrative area field;
[0190] The second acquisition module 304 is used to acquire at least one level of administrative district information in the address field;
[0191] A matching module, used to match at least one level of administrative district information with the information of the administrative district field in the point of interest data to obtain a matching result;
[0192] The updating module 306 is used to update the point of interest data according to the matching result.
[0193] In the embodiment of the present application, the point of interest data is first obtained, and then the administrative district information is obtained from the address field in the point of interest data, and the administrative district information is matched with the information of the administrative district field in the point of interest data to obtain a matching result; then, the point of interest data is updated according to the matching result. In this way, errors in the point of interest data can be corrected, the quality of the point of interest data can be improved, and data support can be provided for functions such as location query and positioning based on the point of interest data.
[0194] In one or more embodiments of the present application, the second acquisition module 304 may include:
[0195] A word segmentation unit, used for segmenting the information of the address field in the point of interest data to obtain segmented words;
[0196] A matching unit, used to match the segmented words with information corresponding to nodes on a preset prefix tree, wherein the preset prefix tree includes administrative district information, and information corresponding to multiple nodes on the same path of the preset prefix tree respectively forms the administrative district information;
[0197] The first determining unit is used to determine the administrative district information according to the segmentation word when the segmentation word matches the information corresponding to the node on the preset prefix tree.
[0198] In one or more embodiments of the present application, the POI data processing device 300 may further include:
[0199] A first determination module is used to determine whether positions of any two administrative district information in the at least one first-level administrative district information in the address field overlap when the number of administrative district information in the at least one first-level administrative district information is multiple;
[0200] The processing module is used to invalidate the two administrative district information if they overlap, or to re-acquire the administrative district information from the address field based on the two administrative district information, wherein the invalidation processing includes: recording the two administrative district information as invalid administrative district information, or deleting the two administrative district information.
[0201] In one or more embodiments of the present application, the POI data processing device 300 may further include:
[0202] A second determination module is used to determine whether the point of interest data includes an administrative district code, and whether at least one level of administrative district information includes target administrative district information corresponding to the administrative district code;
[0203] A setting module, configured to reset the other information according to one of the administrative district code and the target administrative district information, when the administrative district code is included in the point of interest data and the target administrative district information is included in at least one level of administrative district information;
[0204] A first adding module is used to add the target administrative district information to the information in the address field according to the administrative district code when the administrative district code is included in the point of interest data and the target administrative district information is not included in at least one level of administrative district information;
[0205] The second adding module is used to add the administrative district code to the interest point data according to the target administrative district information when the administrative district code is not included in the interest point data and at least one level of administrative district information includes the target administrative district information.
[0206] In one or more embodiments of the present application, the update module 308 may include:
[0207] a second determining unit, configured to determine whether the second administrative district information in the at least one level of administrative district information conflicts with information in a second field in the point of interest data when the second administrative district information matches information in a first field in the point of interest data, wherein the first field is an administrative district field corresponding to the second administrative district information, and the second field is an administrative district field other than the first field;
[0208] The first updating unit is used to update the point of interest data when it is determined that there is a conflict.
[0209] In one or more embodiments of the present application, the point of interest data further includes the longitude and latitude corresponding to the longitude and latitude fields and the administrative district code corresponding to the administrative district code field; the updating module 308 may include:
[0210] The second acquisition unit is used to acquire the administrative district where the corresponding position of the longitude and latitude is located when the administrative district information of each level matches the information of the corresponding administrative district field;
[0211] The second updating unit is used to update the point of interest data when the administrative district where the longitude and latitude corresponding position is located does not match the administrative district code.
[0212] In one or more embodiments of the present application, the administrative region code includes a district or county code; and the second acquisition unit is used to:
[0213] Searching for a target provincial region where the latitude and longitude are located in a plurality of preset provincial regions, wherein the target provincial region includes a plurality of city-level regions;
[0214] Searching for a target city-level area where the latitude and longitude are located in multiple city-level areas, wherein the target city-level area includes multiple district-level areas;
[0215] Find the target district / county level area where the longitude and latitude are located in multiple district / county level areas, and obtain the administrative area where the corresponding position of the longitude and latitude is located.
[0216] The point of interest data processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0217] The POI data processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0218] The point of interest data processing device provided in the embodiment of the present application can achieve Figure 1 or Fig. 9 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0219] The present application also provides an electronic device, such as Fig.11As shown, the electronic device 400 includes a processor 401, a memory 402, and a program or instruction stored in the memory 402 and executable on the processor 401. When the program or instruction is executed by the processor 401, each process of the above-mentioned point of interest data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0220] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0221] Fig.12 A schematic structural diagram of another embodiment of an electronic device provided in the present application.
[0222] like Fig.12 As shown, the electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510 and other components.
[0223] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.12 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0224] The processor 510 is used for:
[0225] Get the point of interest data, which includes the address field and the administrative area field;
[0226] Get at least one level of administrative district information in the address field;
[0227] Matching at least one level of administrative district information with the information of the administrative district field in the point of interest data to obtain a matching result;
[0228] Based on the matching results, the POI data is updated.
[0229] In the embodiment of the present application, the point of interest data is first obtained, and then the administrative district information is obtained from the address field in the point of interest data, and the administrative district information is matched with the information of the administrative district field in the point of interest data to obtain a matching result; then, the point of interest data is updated according to the matching result. In this way, errors in the point of interest data can be corrected, the quality of the point of interest data can be improved, and data support can be provided for functions such as location query and positioning based on the point of interest data.
[0230] In one or more embodiments of the present application, the processor 510 is specifically configured to:
[0231] Segmenting the information in the address field in the point of interest data to obtain segmented words;
[0232] Matching the segmented words with information corresponding to nodes on a preset prefix tree, wherein the preset prefix tree includes administrative district information, and information corresponding to multiple nodes on the same path of the preset prefix tree respectively forms the administrative district information;
[0233] When the segmented word matches the information corresponding to the node on the preset prefix tree, the administrative district information is determined according to the segmented word.
[0234] In one or more embodiments of the present application, the processor 510 is further configured to:
[0235] In the case where the number of administrative district information of the at least one first-level administrative district information is multiple, determining whether positions of any two administrative district information in the at least one first-level administrative district information in the address field overlap;
[0236] If there is overlap, the two administrative district information are invalidated, or the administrative district information is re-acquired from the address field based on the two administrative district information, wherein the invalidation processing includes: recording the two administrative district information as invalid administrative district information, or deleting the two administrative district information.
[0237] In one or more embodiments of the present application, the processor 510 is further configured to:
[0238] Determine whether the point of interest data includes an administrative district code, and whether at least one level of administrative district information includes target administrative district information corresponding to the administrative district code;
[0239] When the administrative district code is included in the point of interest data and the target administrative district information is included in at least one level of administrative district information, resetting the other information according to one of the administrative district code and the target administrative district information;
[0240] When the administrative district code is included in the point of interest data and the target administrative district information is not included in at least one level of administrative district information, the target administrative district information is added to the information in the address field according to the administrative district code;
[0241] When the administrative region code is not included in the point of interest data and the target administrative region information is included in at least one level of administrative region information, the administrative region code is added to the point of interest data according to the target administrative region information.
[0242] In one or more embodiments of the present application, the processor 510 is specifically configured to:
[0243] In the case where the second administrative district information in the at least one level of administrative district information matches the information of the first field in the point of interest data, determining whether the second administrative district information conflicts with the information of the second field in the point of interest data, wherein the first field is the administrative district field corresponding to the second administrative district information, and the second field is the administrative district field other than the first field;
[0244] In the event that a conflict is determined to exist, the point of interest data is updated.
[0245] In one or more embodiments of the present application, the point of interest data further includes the longitude and latitude corresponding to the longitude and latitude field and the administrative district code corresponding to the administrative district code field; the processor 510 is specifically configured to:
[0246] When the administrative district information at each level matches the information of the corresponding administrative district field, the administrative district where the longitude and latitude corresponding position is located is obtained; when the administrative district where the longitude and latitude corresponding position is located does not match the administrative district code, it is determined that an error occurs in the point of interest data.
[0247] In one or more embodiments of the present application, the administrative region code includes a district or county code; the processor 510 is specifically configured to:
[0248] Search for the target provincial region where the longitude and latitude are located among multiple preset provincial regions, wherein the target provincial region includes multiple municipal regions; search for the target municipal region where the longitude and latitude are located among multiple municipal regions, wherein the target municipal region includes multiple district and county regions; search for the target district and county region where the longitude and latitude are located among multiple district and county regions, and obtain the administrative region where the corresponding position of the longitude and latitude is located.
[0249] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (Graphics Processing Unit, GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 509 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 510 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.
[0250] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned point of interest data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0251] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0252] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned point of interest data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0253] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0254] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0255] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0256] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for processing point of interest data, characterized in that: include: Acquire point of interest data, wherein the point of interest data includes an address field and an administrative district field; Obtain at least one level of administrative district information in the address field; Matching the at least one level administrative region information with the information of the administrative region field in the point of interest data to obtain a matching result; According to the matching result, updating the point of interest data; Wherein, updating the point of interest data according to the matching result includes: In a case where the second administrative district information in the at least one level of administrative district information matches the information of the first field in the point of interest data, determining whether one of the two administrative districts is within the jurisdiction of the other administrative district, the two administrative districts including the administrative district corresponding to the second administrative district information and the administrative district corresponding to the second field in the point of interest data, the first field being the administrative district field corresponding to the second administrative district information, and the second field being the administrative district field other than the first field; Determining that a conflict exists between two administrative districts when one administrative district is not within the jurisdiction of another administrative district; If a conflict is determined to exist, the point of interest data is updated.
2. The method according to claim 1, characterized in that The obtaining of at least one level of administrative district information in the address field includes: Performing word segmentation on the information of the address field in the point of interest data to obtain word segmentation terms; Matching the segmented words with information corresponding to nodes on a preset prefix tree, wherein the preset prefix tree includes administrative district information, and information corresponding to multiple nodes on the same path of the preset prefix tree respectively forms the administrative district information; In the case where the segmentation term matches the information corresponding to the node on the preset prefix tree, the administrative district information is determined according to the segmentation term.
3. The method according to claim 1, characterized in that After obtaining at least one level of administrative district information in the address field, the method further includes: In the case that the number of administrative district information of the at least one first-level administrative district information is multiple, determining whether positions of any two administrative district information of the at least one first-level administrative district information in the address field overlap; If there is overlap, the two administrative district information are invalidated, or the administrative district information is reacquired from the address field based on the two administrative district information, wherein the invalidation processing includes: recording the two administrative district information as invalid administrative district information, or deleting the two administrative district information.
4. The method according to claim 1, characterized in that: After obtaining at least one level of administrative district information in the address field, the method further includes: Determine whether the point of interest data includes an administrative region code, and whether the at least one level of administrative region information includes target administrative region information corresponding to the administrative region code; In a case where the administrative region code is included in the point of interest data and the target administrative region information is included in the at least one level of administrative region information, resetting the other information according to one of the administrative region code and the target administrative region information; When the administrative region code is included in the point of interest data and the target administrative region information is not included in the at least one level of administrative region information, adding the target administrative region information to the information in the address field according to the administrative region code; In a case where the administrative region code is not included in the interest point data and the target administrative region information is included in the at least one level of administrative region information, the administrative region code is added to the interest point data according to the target administrative region information.
5. The method according to claim 1, characterized in that: The point of interest data also includes the longitude and latitude corresponding to the longitude and latitude fields and the administrative district code corresponding to the administrative district code field; The updating of the point of interest data according to the matching result includes: When the administrative district information at each level matches the information of the corresponding administrative district field, obtaining the administrative district where the position corresponding to the longitude and latitude is located; When the administrative district where the position corresponding to the longitude and latitude is located does not match the administrative district code, the point of interest data is updated.
6. The method according to claim 5, characterized in that The administrative region code includes the district and county code; The obtaining of the administrative district where the location corresponding to the longitude and latitude is located includes: Searching for a target provincial region where the latitude and longitude are located in a plurality of preset provincial regions, wherein the target provincial region includes a plurality of city-level regions; Searching for a target city-level area where the longitude and latitude are located in the multiple city-level areas, wherein the target city-level area includes multiple district-level areas; The target district / county level area where the longitude and latitude are located is searched in the multiple district / county level areas to obtain the administrative area where the corresponding position of the longitude and latitude is located.
7. A point of interest data processing device, characterized in that: include: A first acquisition module, used to acquire point of interest data, wherein the point of interest data includes an address field and an administrative area field; A second acquisition module is used to acquire at least one level of administrative district information in the address field; A matching module, used for matching the at least one level administrative region information with the information of the administrative region field in the point of interest data to obtain a matching result; An updating module, used for updating the point of interest data according to the matching result; The update module includes: a second determining unit, for determining, when the second administrative district information in the at least one level administrative district information matches the information of the first field in the point of interest data, whether one of the two administrative districts is within the jurisdiction of the other administrative district, the two administrative districts including the administrative district corresponding to the second administrative district information and the administrative district corresponding to the second field in the point of interest data, the first field being the administrative district field corresponding to the second administrative district information, and the second field being the administrative district field other than the first field; and when one administrative district is not within the jurisdiction of the other administrative district, determining that the two administrative districts have a conflict; The first updating unit is used to update the point of interest data when it is determined that there is a conflict.
8. The device according to claim 7, characterized in that The second acquisition module includes: A word segmentation unit, used for segmenting the information of the address field in the point of interest data to obtain segmented words; A matching unit, used for matching the segmented words with information corresponding to nodes on a preset prefix tree, wherein the preset prefix tree includes administrative district information, and information corresponding to multiple nodes on the same path of the preset prefix tree respectively forms the administrative district information; The first determining unit is used to determine the administrative district information according to the segmentation word when the segmentation word matches the information corresponding to the node on the preset prefix tree.
9. The device according to claim 7, characterized in that The device also includes: A first determination module is used to determine whether positions of any two administrative district information in the at least one first-level administrative district information in the address field overlap when the number of administrative district information in the at least one first-level administrative district information is multiple; A processing module is used to invalidate the two administrative district information if there is overlap, or to re-acquire the administrative district information from the address field based on the two administrative district information, wherein the invalidation processing includes: recording the two administrative district information as invalid administrative district information, or deleting the two administrative district information.
10. The device according to claim 7, characterized in that The device also includes: a second determination module, configured to determine whether the point of interest data includes an administrative region code, and whether the at least one level of administrative region information includes target administrative region information corresponding to the administrative region code; A setting module, configured to reset the other information according to one of the administrative area code and the target administrative area information, when the administrative area code is included in the interest point data and the target administrative area information is included in the at least one level of administrative area information; A first adding module is used to add the target administrative district information to the information in the address field according to the administrative district code when the administrative district code is included in the point of interest data and the target administrative district information is not included in the at least one level of administrative district information; The second adding module is used to add the administrative region code to the point of interest data according to the target administrative region information when the administrative region code is not included in the point of interest data and the target administrative region information is included in the at least one level of administrative region information.
11. The device according to claim 7, characterized in that The point of interest data also includes the longitude and latitude corresponding to the longitude and latitude fields and the administrative district code corresponding to the administrative district code field; The update module includes: A second acquisition unit is used to acquire the administrative district where the position corresponding to the longitude and latitude is located when the administrative district information at each level matches the information of the corresponding administrative district field; The second updating unit is used to update the point of interest data when the administrative district where the position corresponding to the longitude and latitude is located does not match the administrative district code.
12. The device according to claim 11, characterized in that The administrative region code includes the district and county code; The second acquisition unit is used for: Searching for a target provincial region where the latitude and longitude are located in a plurality of preset provincial regions, wherein the target provincial region includes a plurality of city-level regions; Searching for a target city-level area where the longitude and latitude are located in the multiple city-level areas, wherein the target city-level area includes multiple district-level areas; The target district / county level area where the longitude and latitude are located is searched in the multiple district / county level areas to obtain the administrative area where the corresponding position of the longitude and latitude is located.
13. An electronic device, characterized in that: The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for processing point of interest data as described in any one of claims 1 to 6.
14. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the method for processing point of interest data as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Information processing method and information processing device
CN110399361A
