A method and device for associating electricity user information
By obtaining the target user ID and electricity address of the electricity user in the power information system, it is judged whether there is a matching building in the building geographical information database, and the candidate building is determined, which solves the problem of difficulty in locating the location of electricity users. , improving business processing efficiency and customer satisfaction.
Patent Information
- Application Number
- CN202111488059.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-12-07
Smart Images

Figure CN114153932B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for associating electricity user information. Background Art
[0002] The current power information system only maintains the location of power equipment and the address information of power users. When power users call 95598 to report faults, handle business, etc., the system cannot quickly locate the location of the power user through the user's mobile phone number or the power user number provided by the user, which leads to timeout of user business processing and reduced customer satisfaction. Therefore, how to quickly determine the location of power users is a problem that needs to be solved in this field. Summary of the invention
[0003] The technical problem to be solved by the present invention is how to quickly locate the position of electricity users, and to provide a method and device for associating electricity user information, which can associate existing building geographic information with electricity users, thereby quickly determining the position of electricity users.
[0004] In order to solve the above technical problem, the first aspect of the present invention discloses a method for associating electricity user information, the method comprising:
[0005] Obtain a target user ID of a target electricity user;
[0006] Based on the target user identifier, obtaining a target electricity address of the target electricity user in an electricity address database, wherein the electricity address database includes user identifiers of multiple electricity users and their corresponding structured electricity addresses;
[0007] Determine whether there is a target building matching the target electricity address of the target electricity user in a building geographic information database, wherein the building geographic information database includes structured address information of multiple buildings;
[0008] If there is a target building matching the target electricity address of the target electricity user in the building geographic information database, an association relationship between the target electricity user and the target building is created.
[0009] As an optional implementation, in the first aspect of the present invention, the building geographic information database further includes fence coordinate information of a plurality of buildings, wherein the fence coordinate information is fence longitude and latitude coordinate information;
[0010] The method further comprises:
[0011] If there is no target building matching the target electricity address of the target electricity user in the building address database, obtaining the electricity coordinates of the target electricity user, wherein the electricity address is the electricity longitude and latitude address;
[0012] Based on the building geographic information database, determine at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold, and obtain a candidate building set;
[0013] Determine, based on the fence coordinate information of the plurality of buildings included in the building geographic information database, a polygonal fence corresponding to each of the candidate buildings in the candidate building set;
[0014] Determine whether there is a target candidate building in the candidate building set, wherein the polygonal fence corresponding to the target candidate building includes the power coordinates of the target power user;
[0015] If the target candidate building exists in the candidate building set, an association relationship between the target electricity user and the target candidate building is created.
[0016] As an optional implementation manner, in the first aspect of the present invention, the determining whether there is a target candidate building in the candidate building set includes:
[0017] For each candidate building in the candidate building set;
[0018] Draw a ray with the power consumption coordinates of the target power user as the endpoint, and the ray has at least one intersection with the polygonal fence corresponding to the candidate building;
[0019] Obtaining the number of intersections between the ray and the polygonal fence corresponding to the candidate building;
[0020] Determining whether the number of intersection points is an even number;
[0021] If the number of intersection points is an even number, the candidate building is determined to be a target candidate building.
[0022] As an optional implementation, in the first aspect of the present invention, before determining, based on the building geographic information database, at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold, the method further includes:
[0023] Determine the corresponding building center coordinates of each building in the building geographic information database according to the fence coordinate information of each building in the building geographic information database;
[0024] The determining, based on the building geographic information database, at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold comprises:
[0025] For each building in the building geographic information database,
[0026] Determine whether the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold;
[0027] If the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold, the building is determined as a candidate building.
[0028] As an optional implementation manner, in the first aspect of the present invention, the obtaining of the electricity usage coordinates of the target electricity user includes:
[0029] Obtaining a target electric device identifier matched with the target electric user;
[0030] Acquire the coordinates of the target electric device based on the target electric device identifier;
[0031] Determining the coordinates of the target power-consuming device as the power-consuming coordinates of the target power-consuming user;
[0032] or,
[0033] The power consumption coordinates of the target power user are acquired based on the user terminal of the target power user.
[0034] As an optional implementation manner, in the first aspect of the present invention, before acquiring the target electricity address of the target electricity user in the electricity address database based on the target user identifier, the method further includes:
[0035] Acquiring electricity usage address information of multiple electricity users, wherein the electricity usage address information of the electricity users is unstructured data;
[0036] For each of the electricity user's electricity address information, analyzing the electricity user's electricity address information to obtain the electricity user's electricity address structured information, and storing the electricity user's electricity address structured information in the electricity address database;
[0037] Before determining whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database, the method further includes:
[0038] For any building, the structured address information of the building and the fence coordinate information of the building are obtained based on the GIS system;
[0039] The structured address information of the building and the fence coordinate information of the building are stored in a building address database.
[0040] As an optional implementation, in the first aspect of the present invention, the building geographic information database further includes fence coordinate information of a plurality of buildings, wherein the fence coordinate information is fence longitude and latitude coordinate information;
[0041] After the association relationship between the target electricity user and the target building is created, the method further includes:
[0042] Acquire target fence coordinate information of the target building based on a building geographic information database;
[0043] Determine the target building center coordinates corresponding to the target building according to the target fence coordinate information of the target building;
[0044] The center coordinates of the target building are determined as the coordinates of the target electricity user.
[0045] A second aspect of the present invention discloses a device for associating electricity user information, the device comprising:
[0046] An identification acquisition module is used to acquire a target user identification of a target electricity user;
[0047] An address acquisition module, configured to acquire a target electricity address of the target electricity user from an electricity address database based on the target user identifier, wherein the electricity address database includes user identifiers of multiple electricity users and their corresponding structured electricity addresses;
[0048] A first determination module is used to determine whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database, wherein the building geographic information database includes structured address information of multiple buildings;
[0049] The first association module is used to create an association relationship between the target electricity user and the target building if the first judgment module determines that there is a target building matching the target electricity address of the target electricity user in the building geographic information database.
[0050] As an optional implementation, in the second aspect of the present invention, the building geographic information database further includes fence coordinate information of a plurality of buildings, wherein the fence coordinate information is fence longitude and latitude coordinate information;
[0051] The device also includes:
[0052] A coordinate acquisition module, used for acquiring the electricity coordinates of the target electricity user when the first judgment module determines that there is no target building matching the target electricity address of the target electricity user in the building address database, wherein the electricity address is the electricity latitude and longitude address;
[0053] A first determination module is used to determine, based on the building geographic information database, at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold, to obtain a candidate building set;
[0054] A second determination module is used to determine the polygonal fence corresponding to each candidate building in the candidate building set based on the fence coordinate information of the multiple buildings included in the building geographic information database;
[0055] A second judgment module is used to judge whether there is a target candidate building in the candidate building set, wherein the polygonal fence corresponding to the target candidate building includes the power consumption coordinates of the target power user;
[0056] The second associating module is configured to create an association relationship between the target electricity user and the target candidate building if the second judging module judges that the target candidate building exists in the candidate building set.
[0057] As an optional implementation manner, in the second aspect of the present invention, the second judgment module judges whether there is a target candidate building in the candidate building set in a manner comprising:
[0058] For each candidate building in the candidate building set;
[0059] Draw a ray with the power consumption coordinates of the target power user as the endpoint, and the ray has at least one intersection with the polygonal fence corresponding to the candidate building;
[0060] Obtaining the number of intersections between the ray and the polygonal fence corresponding to the candidate building;
[0061] Determining whether the number of intersection points is an even number;
[0062] If the number of intersection points is an even number, the candidate building is determined to be a target candidate building.
[0063] As an optional implementation, in the second aspect of the present invention, the first determination module is further used to: determine the corresponding building center coordinates of each of the buildings in the building geographic information database according to the fence coordinate information of each building in the building geographic information database before executing the step of determining at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold based on the building geographic information database;
[0064] The first determination module determines, based on the building geographic information database, at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold, including:
[0065] For each building in the building geographic information database,
[0066] Determine whether the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold;
[0067] If the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold, the building is determined as a candidate building.
[0068] As an optional implementation, in the second aspect of the present invention, the coordinate acquisition module acquires the power consumption coordinates of the target power user in the following manner:
[0069] Obtaining a target electric device identifier matched with the target electric user;
[0070] Acquire the coordinates of the target electric device based on the target electric device identifier;
[0071] Determining the coordinates of the target power-consuming device as the power-consuming coordinates of the target power-consuming user;
[0072] or,
[0073] The power consumption coordinates of the target power user are acquired based on the user terminal of the target power user.
[0074] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0075] A first storage module is used for the address acquisition module to acquire the electricity address information of multiple electricity users before acquiring the target electricity address of the target electricity user in the electricity address database based on the target user identifier, wherein the electricity address information of the electricity users is unstructured data; for each of the electricity address information of the electricity user, the electricity address information of the electricity user is analyzed to obtain the electricity address structured information of the electricity user, and the electricity address structured information of the electricity user is stored in the electricity address database;
[0076] The second storage module is used for obtaining the structured address information of any building and the fence coordinate information of the building based on the GIS system before the first judgment module determines whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database; and storing the structured address information of the building and the fence coordinate information of the building in the building address database.
[0077] As an optional implementation, in the second aspect of the present invention, the building geographic information database further includes fence coordinate information of a plurality of buildings, wherein the fence coordinate information is fence longitude and latitude coordinate information;
[0078] The first association module is further used for:
[0079] After executing the creation of the association relationship between the target electricity user and the target building, acquiring target fence coordinate information of the target building based on a building geographic information database;
[0080] Determine the target building center coordinates corresponding to the target building according to the target fence coordinate information of the target building;
[0081] The center coordinates of the target building are determined as the coordinates of the target electricity user.
[0082] The third aspect of the present invention discloses another device for associating electricity user information, the device comprising:
[0083] A memory storing executable program code;
[0084] a processor coupled to the memory;
[0085] The processor calls the executable program code stored in the memory to execute the method for associating electricity user information disclosed in the first aspect of the present invention.
[0086] A fourth aspect of the present invention discloses a computer storable medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the method for associating electricity user information disclosed in the first aspect of the present invention.
[0087] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0088] In the embodiment of the present invention, by obtaining the target user identification of the target power user, the structured target power address of the target power user is obtained in the power address database; it is determined whether there is a target building matching the structured target power address of the target power user in the building geographic information database; if there is a target building matching the structured target power address of the target power user in the building geographic information database, an association relationship between the target power user and the target building is created. It can be seen that the implementation of the present invention can establish a direct association relationship between the geographic information of an existing building and the power user, and then the location of the power user can be quickly determined through the geographic information of the existing building. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0090] Figure 1 It is a flowchart of a method for associating electricity user information disclosed in an embodiment of the present invention;
[0091] Figure 2 It is a flowchart diagram of another method for associating electricity user information disclosed in an embodiment of the present invention;
[0092] Figure 3 It is a structural schematic diagram of a device for associating electricity user information disclosed in an embodiment of the present invention;
[0093] Figure 4 It is a structural schematic diagram of another device for associating electricity user information disclosed in an embodiment of the present invention;
[0094] Figure 5 It is a structural schematic diagram of another device for associating electricity user information disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0095] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0096] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.
[0097] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0098] The present invention discloses a method and device for associating information of electricity users, which can establish a direct association relationship between geographic information of existing buildings and electricity users, and further can quickly determine the location of electricity users through the geographic information of existing buildings. Detailed descriptions are given below.
[0099] Embodiment 1
[0100] See also Figure 1 , Figure 1 This is a flow chart of a method for associating electricity user information disclosed in an embodiment of the present invention. Figure 1 The method for associating electricity user information described above can be applied to a mobile terminal or a server, and the embodiment of the present invention does not limit this. Figure 1 As shown, the method for associating electricity user information may include the following operations:
[0101] S101: Obtain a target user identifier of a target electricity user.
[0102] In the embodiment of the present invention, when the location of the target electricity user cannot be directly determined, the target user identifier of the target electricity user is determined. The target user identifier may be a pre-assigned user code to determine the unique identification information of the target user.
[0103] S102. Based on the target user identifier, obtain a target electricity usage address of the target electricity user in an electricity usage address database, wherein the electricity usage address database includes user identifiers of multiple electricity users and their corresponding structured electricity usage addresses.
[0104] In the embodiment of the present invention, the target electricity usage address of the target electricity user is queried according to the determined target user identifier, and the target electricity usage address is a structured electricity usage address.
[0105] In the embodiment of the present invention, optionally, based on the target user identifier, before obtaining the target power user's target power user address in the power user address database, the method further includes constructing the power user address database. Specifically, the following steps are included:
[0106] Acquire electricity usage address information of multiple electricity users, wherein the electricity usage address information of the electricity users is unstructured data;
[0107] For each electricity user's electricity address information, the electricity address information of the electricity user is analyzed to obtain the electricity address structured information of the electricity user, and the electricity address structured information of the electricity user is stored in the electricity address database.
[0108] In an optional embodiment of the present invention, electricity address information input by multiple electricity users is obtained, and the electricity address information input by the electricity users is unstructured data, such as No. *, Hongcun, Luohu District, Guangdong Province. The electricity address information input by the electricity user is structured, and a machine learning recognition algorithm can be used in combination with a reference address dictionary to recognize text data to obtain hierarchical data of the electricity address, such as province, city, district, county, street, community, road, road number, community, building number, house number, etc. For example, the electricity address information after structuring is: Guangdong Province, Luohu District, Hongcun, No. *, and missing information can also be completed. The electricity address structured information of the electricity user is stored in the electricity address database.
[0109] It can be seen that the implementation of this optional embodiment can structure the address information input by the user to facilitate query and storage.
[0110] S103, determining whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database, wherein the building geographic information database includes structured address information of multiple buildings. If it is determined that there is a target building matching the target electricity address of the target electricity user in the building geographic information database, executing step S104.
[0111] In the embodiment of the present invention, according to the target electricity address of the target electricity user, it is determined whether the structured address information of each building stored in the building geographic information database matches the target structured electricity address of the target electricity user. If they match, step S104 can be executed.
[0112] In the embodiment of the present invention, optionally, before determining whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database, the method further includes constructing a building geographic information database:
[0113] For any building, the structured address information of the building and the fence coordinate information of the building are obtained based on the GIS system;
[0114] The structured address information of the building and the fence coordinate information of the building are stored in a building address database.
[0115] In an optional embodiment of the present invention, the address information and fence coordinate information of multiple buildings can be obtained through the geographic information GIS system, wherein the fence coordinate information is the fence longitude and latitude coordinate information. The structured address information of the building can be obtained by performing the same structured processing method as the structured processing of the electricity user address. The structured address information and fence coordinate information of multiple buildings are stored in a database to obtain a building address database.
[0116] It can be seen that the implementation of this optional embodiment can structure the address information of the building to facilitate subsequent matching queries.
[0117] S104: Create an association relationship between the target electricity user and the target building.
[0118] In an embodiment of the present invention, when the building structured address information of the target building matches the target structured electricity address of the target electricity user, an association relationship is established between the target electricity user and the target building, and the location of the target electricity user is quickly determined through the geographic information of the target building.
[0119] In the embodiment of the present invention, optionally, after step S104 creates an association relationship between the target electricity user and the target building, the method further includes:
[0120] Acquire target fence coordinate information of the target building based on the building geographic information database;
[0121] Determine the target building center coordinates corresponding to the target building according to the target fence coordinate information of the target building;
[0122] The center coordinates of the target building are determined as the coordinates of the target electricity user.
[0123] In an optional embodiment of the present invention, the coordinates of the target electricity user can be quickly located through the central coordinates of the target building associated with the target electricity user.
[0124] It can be seen that the implementation Figure 1 The method for associating electricity user information shown can establish a direct association relationship between the geographic information of existing buildings and electricity users, and further can quickly determine the location of electricity users through the geographic information of existing buildings.
[0125] Embodiment 2
[0126] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of another method for associating electricity user information disclosed in an embodiment of the present invention. Figure 2 As shown, the method for associating electricity user information may include the following operations:
[0127] S201: Obtain a target user identifier of a target electricity user.
[0128] S202. Based on the target user identifier, obtain a target power usage address of the target power user in a power usage address database, wherein the power usage address database includes user identifiers of multiple power users and their corresponding structured power usage addresses.
[0129] S203, determining whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database, wherein the building geographic information database includes structured address information of multiple buildings. If it is determined that there is a target building matching the target electricity address of the target electricity user in the building geographic information database, then executing step S104.
[0130] S204: Create an association relationship between the target electricity user and the target building.
[0131] In the embodiment of the present invention, for other detailed descriptions of steps S201 to S204, please refer to the detailed description of steps S101 to S104 in the first embodiment, which will not be described in detail in the embodiment of the present invention.
[0132] In the embodiment of the present invention, if step S203 determines that there is no target building matching the target electricity address of the target electricity user in the building address database, step S205 is executed.
[0133] S205. Obtain the electricity usage coordinates of the target electricity user, wherein the electricity usage address is the electricity usage latitude and longitude address.
[0134] In an embodiment of the present invention, when there is no target building matching the target electricity user's target electricity address in the building address database, it is impossible to directly create an association relationship between the target electricity user and the building. In this case, it is necessary to obtain the electricity coordinates of the target electricity user.
[0135] In the embodiment of the present invention, optionally, the method of obtaining the power consumption coordinates of the target power user in step S205 specifically includes:
[0136] Obtain the target power-consuming device identifier matched by the target power-consuming user;
[0137] Acquire the coordinates of the target electric device based on the target electric device identifier;
[0138] Determine the coordinates of the target power-consuming device as the power-consuming coordinates of the target power-consuming user;
[0139] or,
[0140] The power consumption coordinates of the target power user are acquired based on the user terminal of the target power user.
[0141] In an optional embodiment of the present invention, the location information of the power-using equipment is stored in the power information system, and the target power user corresponds to the target power device one by one. The power consumption latitude and longitude coordinates of the target power user can be determined based on the latitude and longitude coordinates of the target power device. In another optional implementation, the current location of the target power user can be regarded as the target power consumption location, and the power consumption latitude and longitude coordinates of the target power user can be determined based on the GPS positioning function of the user terminal.
[0142] It can be seen that by implementing this optional embodiment, the electricity usage coordinate information of the target electricity user can be determined, which can be used as an indicator for locating the position of the target electricity user.
[0143] S206. Based on the building geographic information database, determine at least one candidate building whose power consumption coordinate distance from the target power user is less than or equal to a preset threshold, and obtain a candidate building set.
[0144] In the embodiment of the present invention, after the power usage coordinates of the target power user are obtained, it is necessary to determine the candidate buildings that may be associated with the target power user through the power usage coordinates.
[0145] In the embodiment of the present invention, optionally, before determining, based on the building geographic information database, at least one candidate building whose power consumption coordinate distance from the target power user is less than or equal to a preset threshold, the method further includes:
[0146] According to the fence coordinate information of each building in the building geographic information database, the corresponding building center coordinates of each building in the building geographic information database are determined.
[0147] The building geographic information database stores the fence coordinate information of the building, which cannot be directly used to determine the distance between the target power user's power coordinates. Therefore, before determining the candidate building, it is necessary to determine the building center coordinates corresponding to each building in the building geographic information database. Based on the building fence coordinate information, the building center coordinates corresponding to the building can be calculated through mathematical calculation.
[0148] In the embodiment of the present invention, further optionally, step S206 determines at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold based on the building geographic information database, including:
[0149] For each building in the building geographic information database,
[0150] Determine whether the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold;
[0151] If the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold, the building is determined as a candidate building.
[0152] In an optional embodiment of the present invention, the distance between the power consumption coordinates of the target power user and the building center coordinates corresponding to each building is calculated to determine whether the distance is less than or equal to a preset threshold. The preset threshold can be selected manually or obtained through machine learning analysis. When the distance is less than or equal to the preset threshold, the building whose distance is less than or equal to the preset threshold can be determined as a candidate building.
[0153] It can be seen that by implementing this optional embodiment, a set of candidate buildings that may be related to the target electricity user can be determined.
[0154] S207, determining a polygonal fence corresponding to each candidate building in the candidate building set based on fence coordinate information of multiple buildings included in the building geographic information database;
[0155] S208, determining whether there is a target candidate building in the candidate building set, wherein the polygonal fence corresponding to the target candidate building includes the electricity coordinates of the target electricity user; if the target candidate building exists in the candidate building set, executing step S209.
[0156] In the embodiment of the present invention, based on the fence coordinate information of the building and the power consumption coordinates of the target power user, a target candidate building associated with the target power user can be determined.
[0157] In the embodiment of the present invention, optionally, S208 determines whether there is a target candidate building in the candidate building set, including the following steps:
[0158] For each candidate building in the candidate building set;
[0159] Draw a ray with the electricity coordinates of the target electricity user as the endpoint, and the ray has at least one intersection with the polygonal fence corresponding to the candidate building;
[0160] Obtain the number of intersections between the ray and the polygonal fence corresponding to the candidate building;
[0161] Determine whether the number of intersection points is an even number;
[0162] If the number of intersection points is even, the candidate building is determined to be the target candidate building.
[0163] In an optional embodiment of the present invention, the target candidate building can be determined by the relative relationship between the target power user's electricity coordinate point and the polygonal fence of the candidate building. Specifically, there are two relative positional relationships between the point and the polygon, the point is located inside the polygon, or the point is located outside the polygon. A ray is made with the target power user's electricity coordinates as the endpoint, so that there is at least one intersection between the made ray and the polygonal fence corresponding to any candidate building. The number of intersections between the made ray and the polygonal fence corresponding to the candidate building is obtained. When the number of intersections is an even number, it indicates that the target power user's electricity coordinate point is within the polygonal fence corresponding to the candidate building; when the number of intersections is an odd number, it indicates that the target power user's electricity coordinate point is outside the polygonal fence corresponding to the candidate building. When the target power user's electricity coordinate point is within the polygonal fence corresponding to the candidate building, the candidate building can be determined as the target candidate building.
[0164] It can be seen that by implementing this optional embodiment, a set of target candidate buildings related to the target electricity user can be determined through the relative position relationship between the point and the polygon.
[0165] S209: Create an association relationship between the target electricity user and the target candidate building.
[0166] In an embodiment of the present invention, after determining the target candidate building associated with the target power user based on the power usage coordinates of the target power user, an association relationship between the target power user and the target candidate building can be created, and then the location of the target power user can be quickly determined through the geographic information of the target candidate building.
[0167] It can be seen that the implementation Figure 2The method for associating electricity user information shown can establish a direct association relationship between the geographic information of existing buildings and electricity users, and further can quickly determine the location of electricity users through the geographic information of existing buildings.
[0168] Embodiment 3
[0169] See also Figure 3 , Figure 3 FIG. 1 is a schematic diagram of the structure of another device for associating electricity user information disclosed in an embodiment of the present invention. Figure 3 As shown, the device for associating the electricity user information includes: an identification acquisition module 301 , an address acquisition module 302 , a first judgment module 303 , and a first association module 304 .
[0170] The identification acquisition module 301 is used to acquire the target user identification of the target electricity user.
[0171] In the embodiment of the present invention, when the location of the target electricity user cannot be directly determined, the target user identifier of the target electricity user is determined. The target user identifier may be a pre-assigned user code to determine the unique identification information of the target user.
[0172] The address acquisition module 302 is used to acquire a target electricity usage address of a target electricity user from an electricity usage address database based on a target user identifier, wherein the electricity usage address database includes user identifiers of multiple electricity users and their corresponding structured electricity usage addresses.
[0173] In the embodiment of the present invention, the target electricity usage address of the target electricity user is queried according to the determined target user identifier, and the target electricity usage address is a structured electricity usage address.
[0174] In an embodiment of the present invention, optionally, the device also includes a first storage module, which is used for the address acquisition module to obtain electricity address information of multiple electricity users based on the target user identifier before obtaining the target electricity address of the target electricity user in the electricity address database, wherein the electricity address information of the electricity users is unstructured data; for each electricity user's electricity address information, the electricity address information of the electricity user is analyzed to obtain structured electricity address information of the electricity user, and the structured electricity address information of the electricity user is stored in the electricity address database.
[0175] In an optional embodiment of the present invention, electricity address information input by multiple electricity users is obtained, and the electricity address information input by the electricity users is unstructured data, such as No. *, Hongcun, Luohu District, Guangdong Province. The electricity address information input by the electricity user is structured, and a machine learning recognition algorithm can be used in combination with a reference address dictionary to recognize text data to obtain hierarchical data of the electricity address, such as province, city, district, county, street, community, road, road number, community, building number, house number, etc. For example, the electricity address information after structuring is: Guangdong Province, Luohu District, Hongcun, No. *, and missing information can also be completed. The electricity address structured information of the electricity user is stored in the electricity address database.
[0176] It can be seen that the implementation of this optional embodiment can structure the address information input by the user to facilitate query and storage.
[0177] The first judgment module 303 is used to determine whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database, wherein the building geographic information database includes structured address information of multiple buildings; the building geographic information database also includes fence coordinate information of multiple buildings, wherein the fence coordinate information is fence latitude and longitude coordinate information.
[0178] In the embodiment of the present invention, according to the target electricity address of the target electricity user, it is determined whether the structured address information of each building stored in the building geographic information database matches the target structured electricity address of the target electricity user.
[0179] In an embodiment of the present invention, optionally, the device also includes a second storage module, which is used for obtaining, for any building, structured address information of the building and fence coordinate information of the building based on the GIS system before the first judgment module determines whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database; and storing the structured address information of the building and the fence coordinate information of the building in the building address database.
[0180] In an optional embodiment of the present invention, the address information and fence coordinate information of multiple buildings can be obtained through the geographic information GIS system, wherein the fence coordinate information is the fence longitude and latitude coordinate information. The structured address information of the building can be obtained by performing the same structured processing method as the structured processing of the electricity user address. The structured address information and fence coordinate information of multiple buildings are stored in a database to obtain a building address database.
[0181] It can be seen that the implementation of this optional embodiment can structure the address information of the building to facilitate subsequent matching queries.
[0182] The first associating module 304 is configured to create an association relationship between the target power user and the target building if the first determining module 303 determines that there is a target building in the building geographic information database that matches the target power user's target power address.
[0183] In an embodiment of the present invention, when the building structured address information of the target building matches the target structured electricity address of the target electricity user, an association relationship is established between the target electricity user and the target building, and the location of the target electricity user is quickly determined through the geographic information of the target building.
[0184] In the embodiment of the present invention, optionally, the first associating module 304 is further configured to:
[0185] After creating an association relationship between the target electricity user and the target building, obtaining target fence coordinate information of the target building based on the building geographic information database;
[0186] Determine the target building center coordinates corresponding to the target building according to the target fence coordinate information of the target building;
[0187] The center coordinates of the target building are determined as the coordinates of the target electricity user.
[0188] In an optional embodiment of the present invention, the coordinates of the target electricity user can be quickly located through the central coordinates of the target building associated with the target electricity user.
[0189] It can be seen that the implementation Figure 3 The device for associating electricity user information shown can establish a direct association relationship between the geographic information of existing buildings and electricity users, and further can quickly determine the location of electricity users through the geographic information of existing buildings.
[0190] In the embodiment of the present invention, optionally, please refer to Figure 4 , Figure 4 FIG. 1 is a flow chart of another method for associating electricity user information disclosed in an embodiment of the present invention. Figure 4 As shown, the device further includes: a coordinate acquisition module 305 , a first determination module 306 , a second determination module 307 , a second judgment module 308 , and a second association module 309 .
[0191] The coordinate acquisition module 305 is used to obtain the electricity coordinates of the target electricity user when the first judgment module 304 determines that there is no target building matching the target electricity address of the target electricity user in the building address database, wherein the electricity address is the electricity latitude and longitude address.
[0192] In an optional embodiment of the present invention, when there is no target building matching the target electricity user's target electricity address in the building address database, it is impossible to directly create an association relationship between the target electricity user and the building. In this case, it is necessary to obtain the electricity coordinates of the target electricity user.
[0193] In an optional embodiment of the present invention, further optionally, the coordinate acquisition module 305 acquires the power consumption coordinates of the target power user in the following manner:
[0194] Obtain the target power-consuming device identifier matched by the target power-consuming user;
[0195] Acquire the coordinates of the target electric device based on the target electric device identifier;
[0196] Determine the coordinates of the target power-consuming device as the power-consuming coordinates of the target power-consuming user;
[0197] or,
[0198] The power consumption coordinates of the target power user are acquired based on the user terminal of the target power user.
[0199] In an optional embodiment of the present invention, the location information of the power-using equipment is stored in the power information system, and the target power user corresponds to the target power device one by one. The power consumption latitude and longitude coordinates of the target power user can be determined based on the latitude and longitude coordinates of the target power device. In another optional implementation, the current location of the target power user can be regarded as the target power consumption location, and the power consumption latitude and longitude coordinates of the target power user can be determined based on the GPS positioning function of the user terminal.
[0200] It can be seen that by implementing this optional embodiment, the electricity usage coordinate information of the target electricity user can be determined, which can be used as an indicator for locating the position of the target electricity user.
[0201] The first determination module 306 is used to determine at least one candidate building whose power consumption coordinate distance from the target power user is less than or equal to a preset threshold based on the building geographic information database, and obtain a candidate building set.
[0202] In an optional embodiment of the present invention, after obtaining the power usage coordinates of the target power user, it is necessary to determine the candidate buildings that may be associated with the target power user through the power usage coordinates.
[0203] In an optional embodiment of the present invention, further optionally, the first determination module 306 is also used to determine the corresponding building center coordinates of each building in the building geographic information database according to the fence coordinate information of each building in the building geographic information database before executing the determination of at least one candidate building whose electricity coordinate distance from the target electricity user is less than or equal to a preset threshold based on the building geographic information database.
[0204] The building geographic information database stores the fence coordinate information of the building, which cannot be directly used to determine the distance between the target power user's power coordinates. Therefore, before determining the candidate building, it is necessary to determine the building center coordinates corresponding to each building in the building geographic information database. Based on the building fence coordinate information, the building center coordinates corresponding to the building can be calculated through mathematical calculation.
[0205] In an optional embodiment of the present invention, further optionally, the first determining module 306 determines at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold based on the building geographic information database, including:
[0206] For each building in the building geographic information database,
[0207] Determine whether the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold;
[0208] If the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold, the building is determined as a candidate building.
[0209] In an optional embodiment of the present invention, the distance between the power consumption coordinates of the target power user and the building center coordinates corresponding to each building is calculated to determine whether the distance is less than or equal to a preset threshold. The preset threshold can be selected manually or obtained through machine learning analysis. When the distance is less than or equal to the preset threshold, the building whose distance is less than or equal to the preset threshold can be determined as a candidate building.
[0210] It can be seen that by implementing this optional embodiment, a set of candidate buildings that may be related to the target electricity user can be determined.
[0211] The second determining module 307 is used to determine the polygonal fence corresponding to each candidate building in the candidate building set based on the fence coordinate information of multiple buildings included in the building geographic information database.
[0212] The second judgment module 308 is used to judge whether there is a target candidate building in the candidate building set, wherein the polygonal fence corresponding to the target candidate building includes the electricity coordinates of the target electricity user.
[0213] In the embodiment of the present invention, based on the fence coordinate information of the building and the power consumption coordinates of the target power user, a target candidate building associated with the target power user can be determined.
[0214] In the embodiment of the present invention, further optionally, the second determination module 308 determines whether there is a target candidate building in the candidate building set in the following manner:
[0215] For each candidate building in the candidate building set;
[0216] Draw a ray with the electricity coordinates of the target electricity user as the endpoint, and the ray has at least one intersection with the polygonal fence corresponding to the candidate building;
[0217] Obtain the number of intersections between the ray and the polygonal fence corresponding to the candidate building;
[0218] Determine whether the number of intersection points is an even number;
[0219] If the number of intersection points is even, the candidate building is determined to be the target candidate building.
[0220] In an optional embodiment of the present invention, the target candidate building can be determined by the relative relationship between the target power user's electricity coordinate point and the polygonal fence of the candidate building. Specifically, there are two relative positional relationships between the point and the polygon, the point is located inside the polygon, or the point is located outside the polygon. A ray is made with the target power user's electricity coordinates as the endpoint, so that there is at least one intersection between the made ray and the polygonal fence corresponding to any candidate building. The number of intersections between the made ray and the polygonal fence corresponding to the candidate building is obtained. When the number of intersections is an even number, it indicates that the target power user's electricity coordinate point is within the polygonal fence corresponding to the candidate building; when the number of intersections is an odd number, it indicates that the target power user's electricity coordinate point is outside the polygonal fence corresponding to the candidate building. When the target power user's electricity coordinate point is within the polygonal fence corresponding to the candidate building, the candidate building can be determined as the target candidate building.
[0221] It can be seen that by implementing this optional embodiment, a set of target candidate buildings related to the target electricity user can be determined through the relative position relationship between the point and the polygon.
[0222] The second associating module 309 is configured to create an association relationship between the target electricity user and the target candidate building if the second judging module 308 judges that there is a target candidate building in the candidate building set.
[0223] In an embodiment of the present invention, after determining the target candidate building associated with the target power user based on the power usage coordinates of the target power user, an association relationship between the target power user and the target candidate building can be created, and then the location of the target power user can be quickly determined through the geographic information of the target candidate building.
[0224] It can be seen that the implementation Figure 4The method for associating electricity user information shown can establish a direct association relationship between the geographic information of existing buildings and electricity users, and further can quickly determine the location of electricity users through the geographic information of existing buildings.
[0225] Embodiment 4
[0226] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the structure of another device for associating electricity user information disclosed in an embodiment of the present invention. Figure 5 As shown, the device associated with the electricity user information may include:
[0227] A memory 501 storing executable program codes;
[0228] a processor 502 coupled to the memory 501;
[0229] The processor 502 calls the executable program code stored in the memory 501 to execute the steps in the method for associating electricity user information described in the first embodiment of the present invention or the second embodiment of the present invention.
[0230] Embodiment 5
[0231] An embodiment of the present invention discloses a computer storable medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps in the method for associating electricity user information described in Embodiment 1 or Embodiment 2 of the present invention.
[0232] Embodiment 6
[0233] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the method for associating electricity user information described in Embodiment 1 or Embodiment 2.
[0234] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0235] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0236] Finally, it should be noted that the method and device for associating electricity user information disclosed in the embodiments of the present invention disclose only the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for associating electricity user information, characterized in that: The method comprises: Obtain a target user ID of a target electricity user; Based on the target user identifier, obtaining a target electricity address of the target electricity user in an electricity address database, wherein the electricity address database includes user identifiers of multiple electricity users and their corresponding structured electricity addresses; Determine whether there is a target building matching the target electricity address of the target electricity user in a building geographic information database, wherein the building geographic information database includes structured address information of multiple buildings and fence coordinate information of multiple buildings, wherein the fence coordinate information is fence latitude and longitude coordinate information; If there is a target building matching the target electricity address of the target electricity user in the building geographic information database, then creating an association relationship between the target electricity user and the target building; If there is no target building matching the target electricity address of the target electricity user in the building geographic information database, then the electricity coordinates of the target electricity user are obtained, wherein the electricity address is the electricity longitude and latitude address; based on the building geographic information database, at least one candidate building whose distance from the electricity coordinates of the target electricity user is less than or equal to a preset threshold is determined to obtain a candidate building set; based on the fence coordinate information of multiple buildings included in the building geographic information database, a polygonal fence corresponding to each candidate building in the candidate building set is determined; For each candidate building in the candidate building set, a ray is drawn with the electricity coordinates of the target electricity user as the endpoint, and there is at least one intersection between the ray and the polygonal fence corresponding to the candidate building; the number of intersections between the ray and the polygonal fence corresponding to the candidate building is obtained; and it is determined whether the number of intersections is an even number; if the number of intersections is an even number, the candidate building is determined to be a target candidate building, wherein the polygonal fence corresponding to the target candidate building includes the electricity coordinates of the target electricity user; If the target candidate building exists in the candidate building set, then establishing an association relationship between the target electricity user and the target candidate building; Wherein, before determining at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold based on the building geographic information database, the method further includes: Determine the building center coordinates corresponding to each building in the building geographic information database according to the fence coordinate information of each building in the building geographic information database; And, determining at least one candidate building whose power coordinate distance from the target power user is less than or equal to a preset threshold based on the building geographic information database includes: For each building in the building geographic information database, Determine whether the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold; If the distance between the building center coordinates corresponding to the building and the power consumption coordinates of the target power user is less than or equal to a preset threshold, the building is determined as a candidate building.
2. The method for associating electricity user information according to claim 1, characterized in that: The obtaining of the power consumption coordinates of the target power user comprises: Obtaining a target electric device identifier matched with the target electric user; Acquire the coordinates of the target electric device based on the target electric device identifier; Determining the coordinates of the target power-consuming device as the power-consuming coordinates of the target power-consuming user; or, The power consumption coordinates of the target power user are acquired based on the user terminal of the target power user.
3. The method for associating electricity user information according to claim 1 or 2, characterized in that: Before acquiring the target electricity address of the target electricity user in the electricity address database based on the target user identifier, the method further includes: Acquiring electricity usage address information of multiple electricity users, wherein the electricity usage address information of the electricity users is unstructured data; For each of the electricity user's electricity address information, analyzing the electricity user's electricity address information to obtain the electricity user's electricity address structured information, and storing the electricity user's electricity address structured information in the electricity address database; Before determining whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database, the method further includes: For any building, the structured address information of the building and the fence coordinate information of the building are obtained based on the GIS system; The structured address information of the building and the fence coordinate information of the building are stored in a building address database.
4. The method for associating electricity user information according to claim 1, characterized in that: The building geographic information database also includes fence coordinate information of multiple buildings, wherein the fence coordinate information is fence latitude and longitude coordinate information; After the association relationship between the target electricity user and the target building is created, the method further includes: Acquire target fence coordinate information of the target building based on a building geographic information database; Determine the target building center coordinates corresponding to the target building according to the target fence coordinate information of the target building; The center coordinates of the target building are determined as the coordinates of the target electricity user.
5. A device for associating electricity user information, characterized in that: The device is used to execute the method for associating electricity user information according to any one of claims 1 to 4, and the device includes: An identification acquisition module is used to acquire a target user identification of a target electricity user; An address acquisition module, configured to acquire a target electricity address of the target electricity user from an electricity address database based on the target user identifier, wherein the electricity address database includes user identifiers of multiple electricity users and their corresponding structured electricity addresses; A first determination module is used to determine whether there is a target building matching the target electricity address of the target electricity user in the building geographic information database, wherein the building geographic information database includes structured address information of multiple buildings; The first association module is used to create an association relationship between the target electricity user and the target building if the first judgment module determines that there is a target building matching the target electricity address of the target electricity user in the building geographic information database.
6. A device for associating electricity user information, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method for associating electricity user information as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are called, they are used to execute the method for associating electricity user information as described in any one of claims 1-4.
