CN113761087A - Entity association processing method and device and electronic equipment - Google Patents

Entity association processing method and device and electronic equipment Download PDF

Info

Publication number
CN113761087A
CN113761087A CN202010602387.3A CN202010602387A CN113761087A CN 113761087 A CN113761087 A CN 113761087A CN 202010602387 A CN202010602387 A CN 202010602387A CN 113761087 A CN113761087 A CN 113761087A
Authority
CN
China
Prior art keywords
entity
geocode
longitude
target
latitude
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010602387.3A
Other languages
Chinese (zh)
Inventor
邹骞
丁攀
李鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010602387.3A priority Critical patent/CN113761087A/en
Publication of CN113761087A publication Critical patent/CN113761087A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0639Item locations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Remote Sensing (AREA)
  • Navigation (AREA)

Abstract

The application provides an entity association processing method, an entity association processing device and electronic equipment, wherein the method comprises the following steps: a geocode of a first entity and a geocode of a second entity are obtained. And determining a target geocode set covering the association range according to the geocode of the first entity and the association range of the first entity indicated by a user, wherein the target geocode set comprises a plurality of geocodes. Determining whether the geocode of the second entity belongs to the target geocode set. And if the geocode of the second entity belongs to the target geocode set, determining whether the first entity is associated with the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity. By the method and the device, the calculated amount can be greatly reduced, the timeliness is guaranteed, the consumption of resources can be greatly reduced, and meanwhile, the accuracy of the determined correlation result can be guaranteed.

Description

Entity association processing method and device and electronic equipment
Technical Field
The present application relates to internet technologies, and in particular, to a method and an apparatus for entity association processing, and an electronic device.
Background
With the continuous development of internet technology, internet-based commodity sales modes are generated. The selling mode is mainly embodied in online and offline combination, online data are used for enabling offline retail scenes, online users can provide more personalized services for the users through online user portrait and behavior preference data, and online users can depict more accurate portraits of preference through online data and offline data. In the internet-based commodity sales scenario, how to associate an online user with an offline entity based on location is an important content. For example, when a user needs to complete a portrait of an offline store, the offline store and an online user need to be associated based on location, so as to find online users who consume the offline store or appear in a certain range around the offline store, and the portrait of the offline store is determined by using user portraits of the online users.
In the prior art, longitude and latitude can be used for direct correlation. Specifically, when a user entity or a location entity such as a store needs to be searched within a certain range (for example, 1 km, 3 km, 5 km, etc.), a city information association abbreviation calculation range is used first, and then, a longitude and latitude distance calculation formula is used to directly calculate the associated user entity or the location entity within the certain range.
However, using the prior art method results in poor computational timeliness.
Disclosure of Invention
The application provides an entity association processing method, an entity association processing device and electronic equipment, which are used for solving the problem of poor calculation timeliness caused by the fact that the entity association is calculated by using longitude and latitude in the prior art.
In a first aspect, the present application provides an entity association processing method, including:
the method comprises the steps of obtaining a geocode of a first entity and a geocode of a second entity, wherein the geocode of the first entity is obtained based on longitude and latitude information of the first entity, and the geocode of the second entity is obtained in advance based on the longitude and latitude information of the second entity.
And determining a target geocode set covering the association range according to the geocode of the first entity and the association range of the first entity indicated by a user, wherein the target geocode set comprises a plurality of geocodes.
Determining whether the geocode of the second entity belongs to the target geocode set.
And if the geocode of the second entity belongs to the target geocode set, determining whether the first entity is associated with the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity.
In one possible implementation, the determining, according to the geocode of the first entity and an association range indicated by a user, a target geocode set of the first entity within the association range includes:
determining an initial geocode based on the geocode of the first entity and the association range.
And expanding the initial geocode to obtain the target geocode set, wherein the sum of the area ranges covered by the geocodes in the target geocode set is larger than or equal to the association range.
In a possible implementation manner, the expanding the initial geocode to obtain the target geocode set includes:
adding the initial geocode to the target geocode set.
And circularly executing the following steps until the area range covered by each geographic code in the target geographic code set is greater than or equal to the association range.
Selecting at least one extended geocode from the neighborhood geocodes of the initial geocode, respectively taking each extended geocode as a new geocode, and adding the extended geocode into the target geocode set.
In one possible implementation, the selecting at least one extended geocode from the neighborhood geocodes of the initial geocode includes:
selecting a preset number of extended geocodes from the neighborhood geocodes of the initial geocode, wherein the preset number is smaller than the number of the neighborhood geocodes.
In one possible implementation, the determining an initial geocode according to the geocode of the first entity and the association range includes:
and selecting a code with a preset digit from the geocodes of the first entity as the initial geocode according to the association range, wherein the preset digit is smaller than the digit of the geocode of the first entity.
In a possible implementation manner, before the obtaining the geocode of the first entity and the geocode of the second entity, the method further includes:
and determining the geocode of the first entity according to the latitude and longitude information of the first entity.
And determining the geocode of the second entity according to the latitude and longitude information of the second entity.
In a possible implementation manner, the determining the geocode of the first entity according to the latitude and longitude information of the first entity includes:
and performing code conversion on the latitude and longitude information of the first entity to obtain the geocode of the first entity.
In a possible implementation manner, the determining whether the first entity is associated with the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity includes:
and determining the distance between the first entity and the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity.
And if the distance between the first entity and the second entity is less than or equal to the distance represented by the association range, determining that the first entity is associated with the second entity.
In one possible implementation, the method further includes:
and if the first entity is associated with the second entity, determining an entity portrait of the first entity according to an entity portrait of the second entity.
In a second aspect, the present application provides an entity association processing apparatus, including:
the system comprises an acquisition module and a processing module, wherein the acquisition module is used for acquiring a geocode of a first entity and a geocode of a second entity, the geocode of the first entity is obtained based on longitude and latitude information of the first entity, and the geocode of the second entity is obtained based on longitude and latitude information of the second entity in advance.
The processing module is used for determining a target geocode set covering the association range according to the geocode of the first entity and the association range of the first entity indicated by a user, wherein the target geocode set comprises a plurality of geocodes; and determining whether the geocode of the second entity belongs to the target geocode set; and if the geocode of the second entity belongs to the target geocode set, determining whether the first entity is associated with the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity.
In a possible implementation manner, the processing module is specifically configured to:
determining an initial geocode according to the geocode of the first entity and the association range; and expanding the initial geocode to obtain the target geocode set, wherein the sum of the area ranges covered by the geocodes in the target geocode set is larger than or equal to the association range.
In a possible implementation manner, the processing module is specifically configured to:
adding the initial geocode to the target geocode set; circularly executing the following steps until the area range covered by each geographic code in the target geographic code set is larger than or equal to the association range: selecting at least one extended geocode from the neighborhood geocodes of the initial geocode, respectively taking each extended geocode as a new geocode, and adding the extended geocode into the target geocode set.
In a possible implementation manner, the processing module is specifically configured to:
selecting a preset number of extended geocodes from the neighborhood geocodes of the initial geocode, wherein the preset number is smaller than the number of the neighborhood geocodes.
In a possible implementation manner, the processing module is specifically configured to:
and selecting a code with a preset digit from the geocodes of the first entity as the initial geocode according to the association range, wherein the preset digit is smaller than the digit of the geocode of the first entity.
In one possible implementation, the processing module is further configured to:
and determining the geocode of the first entity according to the latitude and longitude information of the first entity.
And determining the geocode of the second entity according to the latitude and longitude information of the second entity.
In a possible implementation manner, the processing module is specifically configured to:
and performing code conversion on the latitude and longitude information of the first entity to obtain the geocode of the first entity.
In a possible implementation manner, the processing module is specifically configured to:
determining the distance between the first entity and the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity; and if the distance between the first entity and the second entity is less than or equal to the distance represented by the association range, determining that the first entity is associated with the second entity.
In a possible implementation manner, the processing module is specifically configured to:
and if the first entity is associated with the second entity, determining an entity portrait of the first entity according to an entity portrait of the second entity.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing program instructions.
A processor for calling and executing the program instructions in the memory to perform the method steps of the first aspect.
In a fourth aspect, the present application provides a readable storage medium having stored thereon a computer program for executing the method of the first aspect.
According to the entity association processing method, the entity association processing device and the electronic equipment, based on the geographic codes obtained through pre-calculation, all second entities in the association range can be screened out only by performing simple calculation of generating a target geographic code set and comparing the geographic codes, and further, whether the screened second entities are associated with the first entities or not can be accurately judged based on longitude and latitude information. Since the data magnitude of all the screened second entities in the association range is greatly reduced compared with all users in the prior art, the calculation amount required when judging whether to associate with the first entity based on the longitude and latitude information can also be greatly reduced compared with the prior art. Therefore, the calculation amount can be greatly reduced, the timeliness is guaranteed, the resource consumption can be greatly reduced, and meanwhile, the accuracy of the determined correlation result can be guaranteed.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram of a scene of a position entity representation;
fig. 2 is a schematic flowchart of an entity association processing method according to an embodiment of the present application;
FIG. 3 is a diagram of a GeoHash encoding scheme;
fig. 4 is a schematic flowchart of an entity association processing method according to an embodiment of the present application;
FIG. 5 is an exemplary diagram of an expansion of an initial geocode by a neighborhood geocode;
fig. 6 is a block diagram of an entity association processing apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device 700 according to an embodiment of the present disclosure.
Detailed Description
In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The prior art can use latitude and longitude for direct association between entities. Specifically, when a user entity or a location entity associated with the user entity or the location entity needs to be found within a certain range (for example, 1 km, 3 km, 5 km, etc.), a calculation range of the city information associated abbreviation is firstly used, and then, the associated user entity or the location entity within the certain range is directly calculated through a longitude and latitude distance calculation formula.
In an actual application scenario, the data volume of a user entity may reach hundred million levels, the data volume of a location entity may reach million levels, after first association through a city, when calculation is performed based on a longitude and latitude distance calculation formula in the city, a cartesian product mode is adopted, and the mode can cause data inclination, so that the calculation timeliness is poor. In addition, in some large cities, the population and facilities are large, so that the collected data of the position entity and the user entity are large, the intermediate data generated by adopting Cartesian product calculation is overlarge, and the resource consumption is excessive and the calculation cost is overhigh.
In consideration of the problems of poor calculation timeliness, excessive resource consumption and high calculation cost caused by directly calculating the association between the entities based on the longitude and latitude distance calculation formula in the prior art, the embodiment of the application screens out candidate associated entities based on the geocoding of the entities, and then determines the accurate association relationship for the candidate associated entities by utilizing the longitude and latitude information, so that the calculation amount can be remarkably reduced, the calculation timeliness is improved, and meanwhile, the accuracy of the association result can be ensured.
The method of the embodiment of the application can be applied to scenes such as position entity portrayal, offline store site selection evaluation, user portrayal and the like. The following description will take two scenarios, namely, a location entity image and an offline store site selection evaluation as examples.
FIG. 1 is a schematic diagram of a location entity representation, as shown in FIG. 1, for an offline store located at a fixed geographic location, a representation of the store may be generated based on representations of users who consume the store and representations of users who often appear within 3 kilometers of the store. In this scenario, the scheme of the embodiment of the present application may be used to determine the user who consumes to the store and the user who appears within 3 kilometers of the store, that is, determine the user associated with the store. After the associated users are identified, a representation of the store is generated based on the representations of the users.
In the scene of online store location evaluation, for an address to be evaluated located at a certain fixed geographic position, whether the address is suitable for being used as an online store can be evaluated according to the traffic of people within 5 kilometers around the address. In this scenario, the scheme of the embodiment of the present application may be used to determine users within 5 kilometers of the address, that is, to determine users associated with the address. After the associated users are determined, the number, consumption types and the like of the users are subjected to statistical analysis, and whether the users are suitable for being used as addresses of off-line stores or not is evaluated according to the result of the statistical analysis.
Fig. 2 is a flowchart of an entity association processing method provided in an embodiment of the present application, where an execution subject of the method may be an electronic device with computing processing capability, such as a server. As shown in fig. 2, the method includes:
s201, acquiring a geocode of a first entity and a geocode of a second entity, wherein the geocode of the first entity is acquired based on longitude and latitude information of the first entity, and the geocode of the second entity is acquired in advance based on longitude and latitude information of the second entity.
Alternatively, the first entity and the second entity may be any type of entity. Illustratively, the first entity is a location entity and the second entity is a user entity; or the first entity is a position entity and the second entity is a position entity; or the first entity is a user entity and the second entity is a location entity.
In the embodiment of the application, the user entity can refer to an online user, and the information of the user entity can be obtained through the online operation process of the user. For example, when the user logs in the online platform, the location where the user is located at the time is obtained, and the location may be used as the information of the user entity. The location further entity may refer to an offline entity, such as a store, hospital, cell, etc.
In the embodiment of the present application, the first entity may be a processing object in an application scenario of the present application, for example, an offline store in the location entity representation scenario and an offline store in the offline store site selection evaluation scenario. The second entity is an entity that needs to be associated with the first entity to determine whether the second entity is associated with the first entity. Therefore, when the present application is applied to the foregoing various scenarios, the first entity remains unchanged, and the second entities are continuously transformed to determine whether each second entity is associated with the first entity.
Before executing the step, the geocode of the first entity and the geocode of the second entity can be obtained in advance based on the latitude and longitude information of the first entity and the latitude and longitude information of the second entity. The process may be performed in advance in batches. Illustratively, the longitude and latitude information of users using a certain online platform is counted every day, and the process is executed on the counted users in batch to obtain the geocodes of all the users. The process may be performed independently of a certain application scenario, e.g. every day. When the incidence relation of the entity needs to be determined in a certain scene, the geocode of the entity can be directly used, and the geocode does not need to be acquired based on the longitude and latitude information in the scene. Furthermore, when the embodiment of the present application is executed, all users may be used as the second entities, and whether each user is associated with the first entity is determined one by one, or, all users may be first screened according to a city, and users belonging to a certain city are used as the second entities, and whether the second entities are associated with the first entity is determined one by one.
Alternatively, the geocode of the first entity and the geocode of the second entity may be a GeoHash code, respectively.
S202, according to the geocode of the first entity and the association range of the first entity indicated by the user, determining a target geocode set of the first entity in the association range, wherein the target geocode set comprises a plurality of geocodes.
The association range of the first entity indicated by the user is used for indicating the range to which the user associated with the first entity belongs. The "user" herein refers to a user who is responsible for completing a service in a specific application scenario. For example, in the above-described location entity representation scenario, a "user" may be responsible for completing the user of the entity representation. The user indicates an associated range, for example 3 km, indicating that the user wishes to identify users within 3 km of the surrounding area of the outlet store.
As mentioned above, the geocodes for all users in a city, for example, are available in advance, and the user indicates an associated range of 3 kilometers, for example, indicating that the user wishes to find a user within 3 kilometers of the first entity. The method determines whether a certain online user, i.e. a second entity, belongs to an online user within a range of 3 kilometers around a first entity based on a geocode of the first entity and an association range, e.g. 3 kilometers, indicated by the user, and if so, indicates whether the online user is associated with the first entity.
Alternatively, the geocoding of an entity may represent a geographic area of a particular size in which the entity is located. In the embodiments of the present application, the scheme of the present application is described below by taking a GeoHash code as an example, but it should be understood that other codes that identify a geographic area of a specific size by using a one-dimensional code may also be used in the present application.
Fig. 3 is a schematic diagram of a GeoHash coding method, and as shown in fig. 3, it is assumed that a city includes 9 rectangular regions, and each region may have a specific GeoHash code, for example, WX4ER, WX4G2, WX4G3, and the like illustrated in fig. 3. Taking the rectangular area corresponding to WX4ER as an example, all points in the rectangular area, i.e. all longitude and latitude coordinates, share the code WX4 ER. The length of the character string of the GeoHash code can be flexibly selected according to the requirement, and the longer the length of the character string is, the smaller the region range which can be expressed is, namely, the more accurate the character string is. Illustratively, a 5-bit code can represent a rectangular region of 10 square kilometers in extent, and a 6-bit code can represent a rectangular region of about 0.34 square kilometers in extent.
In this step, based on the geocode of the first entity and the association range of the first entity indicated by the user, a target geocode set capable of covering the association range can be determined. Specifically, the set includes a plurality of geocodes, and the regions represented by the geocodes are spliced to form a region, which can cover the association range.
S203, determining whether the geocode of the second entity belongs to the target geocode set.
As described above, the target geocode set includes a plurality of geocodes, when determining whether the geocode of the second entity belongs to the target geocode set, the geocode of the second entity may be compared with each geocode in the set, and if the geocode of the second entity is the same as the string of a geocode in the set, the geocode of the second entity may be determined to belong to the target geocode set.
It should be noted that, when determining the target geocode set based on the geocode of the first entity, it may be that, as described in the following embodiments, a preset number of codes are selected from the geocodes of the first entity to be expanded to obtain the target geocode set, in which case, the geocodes in the target geocode set each include the preset number of bits. Accordingly, when determining whether the geocode of the second entity belongs to the target geocode set, it may be determined whether a code of a preset number of bits in the geocode of the second entity belongs to the target geocode set. For example, if the geocode in the target geocode set is the first 6 geocodes in the 12 geocode set, the first 6 geocodes in the geocode of the second entity may be obtained, and if the first 6 geocodes are the same as a geocode in the target geocode set, it is determined that the geocode of the second entity belongs to the target geocode set.
S204, if the geocode of the second entity belongs to the target geocode set, determining whether the first entity is associated with the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity.
The target geocode set comprises a plurality of geocodes, each geocode can represent a rectangular area, the association range of the first entity indicated by the user refers to a circular range around the first entity, therefore, when the target geocode set covers the association range, the association range is actually exceeded, therefore, a certain second entity possibly belongs to the range of the target geocode set but exceeds the association range, therefore, in the step, based on the longitude and latitude information of the first entity and the longitude and latitude information of the second entity, whether the second entity is an entity in the association range can be determined more accurately, namely whether the second entity is associated with the first entity.
The above steps S201-S204 illustrate the process of determining whether a first entity is associated with a second entity. In a specific application scenario, it may need to determine whether a first entity is associated with a second entity of millions, and if the determination is performed by using a distance calculation method directly using latitude and longitude information in the prior art, problems of poor timeliness, resource waste and the like may be caused by a huge calculation amount.
In this embodiment, based on the pre-calculated geocode, only simple calculations of generating the target geocode set and comparing the geocodes need to be performed, so that all the second entities in the association range can be screened out, and further, for the screened out second entities, whether the second entities are associated with the first entity or not can be accurately judged based on the latitude and longitude information. Since the data magnitude of all the screened second entities in the association range is greatly reduced compared with all users in the prior art, the calculation amount required when judging whether to associate with the first entity based on the longitude and latitude information can also be greatly reduced compared with the prior art. Therefore, the calculation amount can be greatly reduced through the embodiment, the timeliness is ensured, the resource consumption can be greatly reduced, and meanwhile, the accuracy of the determined correlation result can be ensured.
Fig. 4 is a flowchart of an entity association processing method provided in the embodiment of the present application, and as shown in fig. 4, an alternative way of determining the coverage target geocode set in step S202 includes:
s401, determining an initial geocode according to the geocode of the first entity and the association range.
Taking the example of the geocode being the GeoHash code, the GeoHash code obtained based on the latitude and longitude information may be a 12-bit hash code. As described above, the larger the number of bits of the geocode, the smaller the range of representation, and the smaller the number of bits, the larger the range of representation. The target geocode set finally obtained in this embodiment is expanded from the initial geocode, and therefore, a proper size of the initial geocode needs to be selected, so as to avoid that the neighborhood geocode which needs to be calculated in the expansion process is too much and the target geocode set is too large due to too much initial geocode digits, and avoid that the code coverage is too large and the error is too large due to too little initial geocode digits.
In view of the above, as an alternative implementation, a code with a preset number of bits may be selected from the geocodes of the first entity as the initial geocode based on the association range. Wherein the predetermined number of bits is less than the number of bits of the geocode of the first entity.
Optionally, the encoding of the preset number of bits is encoding of a continuous number of bits. For example, the first 6 bits of the 12-bit GeoHash code.
For example, if the association range is large, a code with a smaller number of bits may be selected as the initial geocode. If the association range is smaller, a code with a larger number of bits may be selected as the initial geocode.
By the method, reasonable initial geocoding suitable for the scene can be selected, and the complexity of subsequent operation can be reduced.
S402, expanding the initial geocode to obtain the target geocode set, wherein the sum of the area ranges covered by the geocodes in the target geocode set is larger than or equal to the association range.
And expanding the initial geocode, wherein the obtained target geocode set is centered on the initial geocode. The initial geocode may represent a location of the first entity, and thus, by expanding the initial geocode, a target geocode set centered on the initial geocode is obtained, i.e., a geographic area centered on the first entity covering the associated range is obtained.
An alternative way of expanding the initial geocode to obtain the target geocode set in step S402 is described below.
Optionally, the target geocode set may be obtained by expanding in a loop processing manner.
First, the initial geocode is added into a target geocode set.
Further, the following steps are executed in a loop until the area range covered by each geographic code in the target geographic code set is greater than or equal to the association range:
and selecting at least one expanded geocode from the neighborhood geocodes of the initial geocode, respectively taking each expanded geocode as a new initial geocode, and adding the expanded geocode into the target geocode set.
Before the embodiment is executed, the target geocode set may be an empty set, and when the embodiment is executed, the initial geocode is added to the target geocode set. And then, continuously expanding the initial geocode as a new initial geocode, continuously expanding each new initial geocode, adding the geocodes obtained by expansion into the target geocode set every time when the expanded geocode is obtained by expansion in the process, and not expanding the geocode when the area range represented by the spliced geocodes in the target geocode set is larger than or equal to the association range.
The neighborhood geocode of the initial geocode is an area which is constructed by taking the geographic area corresponding to the initial geocode as the center.
Fig. 5 is an exemplary diagram of the initial geocode being extended by the neighborhood geocode, and as described in fig. 5, assuming that the initial geocode is code 0, then code 1, code 2, code 3, code 4, code 5, code 6, code 7, and code 8 are all neighborhood codes for code 0.
It should be understood that the neighborhood of the geographic region to which the initial geocode corresponds is the geographic region to which the neighborhood geocode corresponds.
Taking a certain cycle in the cycle process as an example, when the extended geocode is selected from the neighborhood geocodes of the initial geocode of the cycle, all the neighborhood geocodes may be selected as the extended geocode, or a part of the neighborhood geocodes may be selected as the extended geocode.
As an alternative implementation, a preset number of extended geocodes may be selected from the neighborhood geocodes of the initial geocode, where the preset number is smaller than the number of the neighborhood geocodes.
In this alternative embodiment, with continued reference to fig. 5, assuming the initial geocode is code 0, then its overall neighborhood geocode includes: the method comprises the steps of encoding 1, encoding 2, encoding 3, encoding 4, encoding 5, encoding 6, encoding 7 and encoding 8, namely 8 neighborhood geocodes are total, 4 neighborhood geocodes (specifically, encoding 1, encoding 3, encoding 5 and encoding 7) can be selected from the 8 neighborhood geocodes to be used as extended geocodes, and then the 4 extended geocodes are respectively used as new initial geocodes to be extended.
By selecting a part of preset number of codes from all neighborhood geocodes as the extended geocode, the calculation amount during neighborhood extension can be greatly reduced, and meanwhile, the region range represented by the preset number of codes can still represent the expected region range, so that the accuracy of the calculation result cannot be influenced while the calculation amount is greatly reduced by the processing mode.
The following describes a process of obtaining a geocode of an entity based on latitude and longitude information of the entity before the above step S201.
It should be noted that, in the implementation, the geocoding of the entity obtained based on the latitude and longitude information of the entity may be performed in large-scale batch. The following embodiments are described by taking only the first entity and the second entity as examples.
Optionally, the geocode of the first entity may be determined according to the latitude and longitude information of the first entity, and the geocode of the second entity may be determined according to the latitude and longitude information of the second entity.
Taking the first entity as an example, the longitude and latitude information of the first entity may be subjected to code conversion to obtain the geocode of the first entity.
Specifically, the longitude and latitude information of the entity is two-dimensional data, and the one-dimensional geocode can be obtained by mapping the two-dimensional data. Taking geocoding as the above GeoHash code as an example, geocoding can be a character string, and the character string is stored and calculated, so that the storage capacity and the calculation amount can be greatly reduced.
Optionally, before obtaining the geocode of the entity according to the longitude and latitude information of the entity, the longitude and latitude information of the entity may be collected first.
In one example, for a user entity, the latitude and longitude information acquisition mode is: the longitude and latitude information is classified according to longitude and latitude information collected by equipment when a user browses an online platform and the like and according to longitude and latitude distribution and user browsing time distribution. And the distribution of the user browsing time uses nine am to seven pm as working time, and nine pm to eight am as home time, and after abnormal values are removed, clustering the longitude and latitude of the two stages by adopting a clustering method, and obtaining the longitude and latitude coordinates of the cluster center, so as to obtain the residential area longitude and latitude information and the working ground latitude information of the user. When the intelligent control system is used, the latitude and longitude information of the residential place and/or the latitude and longitude information of the working place can be selected according to the requirements of an actual scene. For the location entity, the latitude and longitude information acquisition mode may be: the map is obtained and analyzed off-line through a map crawling technology, or the map is directly provided by a service party in a specific application scene.
Fig. 6 is a block diagram of an entity association processing apparatus according to an embodiment of the present application, and as shown in fig. 6, the apparatus includes:
the obtaining module 601 is configured to obtain a geocode of a first entity and a geocode of a second entity, where the geocode of the first entity is obtained based on latitude and longitude information of the first entity, and the geocode of the second entity is obtained in advance based on latitude and longitude information of the second entity.
A processing module 602, configured to determine, according to a geocode of the first entity and an association range of the first entity indicated by a user, a target geocode set covering the association range, where the target geocode set includes multiple geocodes; and determining whether the geocode of the second entity belongs to the target geocode set; and if the geocode of the second entity belongs to the target geocode set, determining whether the first entity is associated with the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity.
In an optional implementation, the processing module 602 is specifically configured to:
determining an initial geocode according to the geocode of the first entity and the association range; and expanding the initial geocode to obtain the target geocode set, wherein the sum of the area ranges covered by the geocodes in the target geocode set is larger than or equal to the association range.
In an optional implementation, the processing module 602 is specifically configured to:
adding the initial geocode to the target geocode set; circularly executing the following steps until the area range covered by each geographic code in the target geographic code set is larger than or equal to the association range: selecting at least one extended geocode from the neighborhood geocodes of the initial geocode, respectively taking each extended geocode as a new geocode, and adding the extended geocode into the target geocode set.
In an optional implementation, the processing module 602 is specifically configured to:
selecting a preset number of extended geocodes from the neighborhood geocodes of the initial geocode, wherein the preset number is smaller than the number of the neighborhood geocodes.
In an optional implementation, the processing module 602 is specifically configured to:
and selecting a code with a preset digit from the geocodes of the first entity as the initial geocode according to the association range, wherein the preset digit is smaller than the digit of the geocode of the first entity.
In an alternative embodiment, the processing module 602 is further configured to:
determining the geocode of the first entity according to the latitude and longitude information of the first entity; and determining the geocode of the second entity according to the latitude and longitude information of the second entity.
In an optional implementation, the processing module 602 is specifically configured to:
and performing code conversion on the latitude and longitude information of the first entity to obtain the geocode of the first entity.
In an optional implementation, the processing module 602 is specifically configured to:
determining the distance between the first entity and the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity; and if the distance between the first entity and the second entity is less than or equal to the distance represented by the association range, determining that the first entity is associated with the second entity.
In an optional implementation, the processing module 602 is specifically configured to:
and if the first entity is associated with the second entity, determining an entity portrait of the first entity according to an entity portrait of the second entity.
The entity association processing apparatus provided in the embodiment of the present application may perform the method steps in the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the determining module may be a processing element separately set up, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the function of the determining module is called and executed by a processing element of the apparatus. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when some of the above modules are implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can call program code. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Fig. 7 is a schematic structural diagram of an electronic device 700 according to an embodiment of the present disclosure. As shown in fig. 7, the electronic device may include: the system comprises a processor 71, a memory 72, a communication interface 73 and a system bus 74, wherein the memory 72 and the communication interface 73 are connected with the processor 71 through the system bus 74 and complete mutual communication, the memory 72 is used for storing computer execution instructions, the communication interface 73 is used for communicating with other devices, and the processor 71 implements the scheme of the embodiment shown in fig. 2 to 5 when executing the computer program.
The system bus mentioned in fig. 7 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The memory may comprise Random Access Memory (RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor may be a general-purpose processor, including a central processing unit CPU, a Network Processor (NP), and the like; but also a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
Optionally, an embodiment of the present application further provides a storage medium, where instructions are stored in the storage medium, and when the storage medium is run on a computer, the storage medium causes the computer to execute the method according to the embodiment shown in fig. 2 to 5.
Optionally, an embodiment of the present application further provides a chip for executing the instruction, where the chip is configured to execute the method in the embodiment shown in fig. 2 to 5.
The embodiment of the present application further provides a program product, where the program product includes a computer program, where the computer program is stored in a storage medium, and the computer program can be read from the storage medium by at least one processor, and when the computer program is executed by the at least one processor, the method of the embodiment shown in fig. 2 to 5 may be implemented.
In the embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and following related objects are in a relationship of "division". "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for convenience of description and distinction and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiment of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. An entity association processing method, comprising:
acquiring a geocode of a first entity and a geocode of a second entity, wherein the geocode of the first entity is obtained based on longitude and latitude information of the first entity, and the geocode of the second entity is obtained in advance based on the longitude and latitude information of the second entity;
determining a target geocode set covering the association range according to the geocode of the first entity and the association range of the first entity indicated by a user, wherein the target geocode set comprises a plurality of geocodes;
determining whether the geocode of the second entity belongs to the target geocode set;
and if the geocode of the second entity belongs to the target geocode set, determining whether the first entity is associated with the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity.
2. The method of claim 1, wherein the determining the target geocode set of the first entity within the association range according to the geocode of the first entity and a user-indicated association range comprises:
determining an initial geocode according to the geocode of the first entity and the association range;
and expanding the initial geocode to obtain the target geocode set, wherein the sum of the area ranges covered by the geocodes in the target geocode set is larger than or equal to the association range.
3. The method of claim 2, wherein said expanding the initial geocode to obtain the target set of geocodes comprises:
adding the initial geocode to the target geocode set;
circularly executing the following steps until the area range covered by each geographic code in the target geographic code set is larger than or equal to the association range:
selecting at least one extended geocode from the neighborhood geocodes of the initial geocode, respectively taking each extended geocode as a new geocode, and adding the extended geocode into the target geocode set.
4. The method of claim 3, wherein selecting at least one extended geocode from the neighborhood geocodes of the initial geocode comprises:
selecting a preset number of extended geocodes from the neighborhood geocodes of the initial geocode, wherein the preset number is smaller than the number of the neighborhood geocodes.
5. The method of any of claims 2-4, wherein determining an initial geocode based on the geocode of the first entity and the association range comprises:
and selecting a code with a preset digit from the geocodes of the first entity as the initial geocode according to the association range, wherein the preset digit is smaller than the digit of the geocode of the first entity.
6. The method of any of claims 1-5, wherein prior to obtaining the geocode of the first entity and the geocode of the second entity, further comprising:
determining the geocode of the first entity according to the latitude and longitude information of the first entity;
and determining the geocode of the second entity according to the latitude and longitude information of the second entity.
7. The method of claim 6, wherein determining the geocode of the first entity based on the latitude and longitude information of the first entity comprises:
and performing code conversion on the latitude and longitude information of the first entity to obtain the geocode of the first entity.
8. The method of any one of claims 1-7, wherein determining whether the first entity is associated with the second entity based on the latitude and longitude information of the first entity and the latitude and longitude information of the second entity comprises:
determining the distance between the first entity and the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity;
and if the distance between the first entity and the second entity is less than or equal to the distance represented by the association range, determining that the first entity is associated with the second entity.
9. The method according to any one of claims 1-8, further comprising:
and if the first entity is associated with the second entity, determining an entity portrait of the first entity according to an entity portrait of the second entity.
10. An entity association processing apparatus, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a geocode of a first entity and a geocode of a second entity, the geocode of the first entity is obtained based on longitude and latitude information of the first entity, and the geocode of the second entity is obtained based on longitude and latitude information of the second entity in advance;
the processing module is used for determining a target geocode set covering the association range according to the geocode of the first entity and the association range of the first entity indicated by a user, wherein the target geocode set comprises a plurality of geocodes; and the number of the first and second groups,
determining whether the geocode of the second entity belongs to the target geocode set; and the number of the first and second groups,
and if the geocode of the second entity belongs to the target geocode set, determining whether the first entity is associated with the second entity according to the longitude and latitude information of the first entity and the longitude and latitude information of the second entity.
11. An electronic device, comprising:
a memory for storing program instructions;
a processor for invoking and executing program instructions in said memory for performing the method steps of any of claims 1-9.
12. A readable storage medium, characterized in that a computer program is stored in the readable storage medium for performing the method of any of claims 1-9.
CN202010602387.3A 2020-06-29 2020-06-29 Entity association processing method and device and electronic equipment Pending CN113761087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010602387.3A CN113761087A (en) 2020-06-29 2020-06-29 Entity association processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010602387.3A CN113761087A (en) 2020-06-29 2020-06-29 Entity association processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113761087A true CN113761087A (en) 2021-12-07

Family

ID=78785454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010602387.3A Pending CN113761087A (en) 2020-06-29 2020-06-29 Entity association processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113761087A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407213A (en) * 2015-07-31 2017-02-15 阿里巴巴集团控股有限公司 Geographic position-based information retrieval method, device and system
WO2017177916A1 (en) * 2016-04-12 2017-10-19 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for determining point of interest

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407213A (en) * 2015-07-31 2017-02-15 阿里巴巴集团控股有限公司 Geographic position-based information retrieval method, device and system
WO2017177916A1 (en) * 2016-04-12 2017-10-19 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for determining point of interest
US20180080794A1 (en) * 2016-04-12 2018-03-22 Beijing Didi Infinity Technology And Development C O., Ltd. Systems and methods for determining a point of interest
CN109074370A (en) * 2016-04-12 2018-12-21 北京嘀嘀无限科技发展有限公司 The system and method for determining point of interest

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吕雪锋;程承旗;: "基于地球剖分的空间信息区位标识", 高技术通讯, no. 04, 15 April 2014 (2014-04-15) *

Similar Documents

Publication Publication Date Title
CN110009486B (en) Method, system, equipment and computer readable storage medium for fraud detection
CN111163072A (en) Method and device for determining characteristic value in machine learning model and electronic equipment
CN112434188A (en) Data integration method and device for heterogeneous database and storage medium
CN112818216A (en) Client recommendation method and device, electronic equipment and storage medium
CN114329312A (en) Network asset data evaluation method and device, electronic equipment and storage medium
CN111443899A (en) Element processing method and device, electronic equipment and storage medium
CN108920326B (en) Method and device for determining time-consuming abnormity of system and electronic equipment
CN115190010B (en) Distributed recommendation method and device based on software service dependency relationship
CN110019193A (en) Similar account number recognition methods, device, equipment, system and readable medium
CN113761087A (en) Entity association processing method and device and electronic equipment
CN115905864A (en) Abnormal data detection model training method and device and computer equipment
CN113495845B (en) Data testing method and device, electronic equipment and storage medium
CN113434436B (en) Test case generation method and device, electronic equipment and storage medium
CN113744033A (en) Order estimation method and device
CN113326064A (en) Method for dividing business logic module, electronic equipment and storage medium
CN113505765A (en) Age prediction method and device based on user head portrait and electronic equipment
US8554757B2 (en) Determining a score for a product based on a location of the product
CN112988907A (en) Information adjusting method, system, electronic equipment and storage medium
CN113076451A (en) Abnormal behavior recognition and risk model library establishing method and device and electronic equipment
CN113282624B (en) Rule matching method, device, electronic equipment and storage medium
CN116501993B (en) House source data recommendation method and device
CN115994203B (en) AI-based data annotation processing method, system and AI center
CN114579573B (en) Information retrieval method, information retrieval device, electronic equipment and storage medium
CN114611146A (en) User privacy data protection method and device, computer equipment and storage medium
CN116204296A (en) Algorithm execution method, device, computer equipment and storage medium of monitoring system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination