Data processing method and device, computer equipment and storage medium
By building a node connection graph and filtering nodes that meet the conditions, the problem of low efficiency in determining non-overlapping areas in spatial data is solved, and efficient area processing and error reduction are achieved.
Patent Information
- Application Number
- CN202310533379.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
AI Technical Summary
In the practical application of spatial data, the process of selecting non-overlapping areas from multiple regions based on the heat attribute is low efficiency, easy to introduce analysis errors, and the prior art is difficult to effectively improve the efficiency of non-overlapping areas determination.
By constructing a node connection graph, using the regional heat and spatial overlap relationship, nodes that are not connected through the connection edges are selected, and search nodes that meet the regional heat filtering conditions are determined, thereby determining non-overlapping areas.
The processing efficiency of non-overlapping area determination is improved, analysis errors are reduced, and accurate processing of spatial data is achieved.
Smart Images

Figure CN118941574A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] Spatial data, also known as geometric data, is used to represent information about the location, shape, size distribution, and other aspects of an object. It is a quantitative description of things and phenomena that exist in the real world and have positioning significance. Spatial data has been widely used in various industries and sectors of society, such as urban planning, transportation, banking, and medical care. The region composed of spatial data can carry continuous attributes, such as the heat value attribute obtained by statistics based on the amount of spatial data. The attributes carried by the region can accurately analyze and process the spatial data from the perspective of the overall data.
[0003] In the actual application of spatial data, the regional division method for spatial data is not spatially mutually exclusive, that is, the regions often overlap with each other, and each region can carry its own continuous attributes, such as its own heat attribute. As a result, when analyzing and processing each region based on the heat attribute, the overlap between regions is likely to introduce analysis errors. However, the current selection process of non-overlapping regions from multiple regions based on the heat attribute is inefficient. Summary of the invention
[0004] Based on this, it is necessary to provide a data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of non-overlapping area determination in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a data processing method. The method comprises:
[0006] Determine multiple regions divided based on spatial data, and obtain regional heat of each of the multiple regions; the regional heat is used to characterize the heat of the spatial data included in the region;
[0007] A node connection graph is constructed by constructing multiple regions, the regional heat of each of the multiple regions, and the spatial overlapping relationship between each region in the multiple regions; each node in the node connection graph represents each region, each node attribute of each node represents the regional heat of each region, and the connection edges between each node represent the spatial overlapping relationship between each region;
[0008] Search each node in the node connection graph according to the regional heat screening condition to obtain multiple search nodes; the search nodes are not connected by connecting edges, and the overall heat of each search node meets the regional heat screening condition; the overall heat is used to represent the regional heat represented by the node attributes of each search node;
[0009] A plurality of non-overlapping regions are obtained according to the regions respectively represented by the search nodes in the plurality of regions; the plurality of non-overlapping regions are used to process the spatial data.
[0010] In a second aspect, the present application also provides a data processing device. The device comprises:
[0011] A region determination module is used to determine multiple regions divided based on spatial data, and obtain the regional heat of each of the multiple regions; the regional heat is used to characterize the heat of the spatial data included in the region;
[0012] A node connection graph construction module is used to construct a node connection graph through multiple regions, the regional heat of each of the multiple regions, and the spatial overlapping relationship between each of the multiple regions; each node in the node connection graph represents each region, each node attribute of each node represents the regional heat of each region, and the connection edges between each node represent the spatial overlapping relationship between each region;
[0013] A search node acquisition module is used to search for each node in the node connection graph according to the regional heat screening condition to obtain multiple search nodes; the search nodes are not connected by connecting edges, and the overall heat of each search node meets the regional heat screening condition; the overall heat is used to represent the regional heat represented by the node attributes of each search node;
[0014] The non-overlapping area determination module is used to obtain multiple non-overlapping areas according to the areas represented by each search node in the multiple areas; the multiple non-overlapping areas are used to process the spatial data.
[0015] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above data processing method when executing the computer program.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps in the above data processing method when executed by a processor.
[0017] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the above data processing method are implemented.
[0018] The above-mentioned data processing method, device, computer equipment, storage medium and computer program product, for multiple areas divided based on spatial data, construct a node connection graph through multiple areas, the regional heat of each of the multiple areas and the spatial overlapping relationship between each of the multiple areas, each node in the node connection graph represents each area, each node attribute of each node represents the regional heat of each area, the connecting edges between each node represent the spatial overlapping relationship between each area, and search for each node in the node connection graph according to the regional heat filtering condition to obtain multiple search nodes that are not connected by connecting edges and whose overall heat meets the regional heat filtering condition, and determine multiple non-overlapping areas represented by each search node from multiple areas. During the data processing process, a node connection graph is constructed according to multiple regions, the regional heat of each of the multiple regions, and the spatial overlapping relationship between each of the multiple regions, so that each node in the node connection graph represents each region, each node attribute of each node represents the regional heat of each region, and the connection edge between each node represents the spatial overlapping relationship between each region, so that each node in the node connection graph can be searched according to the regional heat filtering condition, and multiple non-overlapping regions that do not overlap and whose overall heat meets the regional heat filtering condition can be determined from multiple regions by searching for nodes that are not connected by connecting edges and whose overall heat meets the regional heat filtering condition. The node connection relationship and node attributes in the node connection graph can be used to determine the region, which can effectively improve the processing efficiency of non-overlapping region determination. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 An application environment diagram of a data processing method in an embodiment;
[0020] Figure 2 is a flow chart of a data processing method in one embodiment;
[0021] Figure 3 is a schematic diagram of multiple regions in one embodiment;
[0022] Figure 4 A schematic diagram of a region mapping process in one embodiment;
[0023] Figure 5 A schematic diagram of multiple area mappings in one embodiment;
[0024] Figure 6 A schematic diagram of a node search result in one embodiment;
[0025] Figure 7 A schematic diagram of a non-overlapping area determination result in one embodiment;
[0026] Figure 8 A schematic diagram of a node search process in one embodiment;
[0027] Fig. 9 A schematic diagram of three regions in one embodiment;
[0028] Fig.10 is a schematic diagram of the selected non-overlapping area;
[0029] Fig.11 A schematic diagram of selecting a non-overlapping area in one embodiment;
[0030] Fig.12 A schematic diagram of a traffic hotspot area before screening in one embodiment;
[0031] Fig.13 A schematic diagram of a traffic hotspot area after screening in one embodiment;
[0032] Fig.14 is a structural block diagram of a data processing device in one embodiment;
[0033] Fig.15 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0035] The data processing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. Specifically, the server 104 can obtain various spatial data from the terminal. The spatial data may include traffic travel data, and the terminal 102 uploads the location data in the traffic trajectory as spatial data to the server 104 during the traffic travel. The server 104 can determine multiple areas obtained based on the spatial data, and perform statistics on the spatial data included in each area to obtain the regional heat of each area. For multiple areas obtained based on spatial data, the server 104 can construct a node connection graph through multiple areas, the regional heat of each of the multiple areas, and the spatial overlapping relationship between each area in the multiple areas. Each node in the node connection graph represents each area, and each node attribute of each node represents the regional heat of each area. The connection edge between each node represents the spatial overlapping relationship between each area. The server 104 searches for each node in the node connection graph according to the regional heat screening condition, obtains multiple search nodes that are not connected by connecting edges and whose overall heat meets the regional heat screening condition, and determines multiple non-overlapping areas represented by each search node from multiple areas. For the multiple non-overlapping areas determined, the server 104 can send the multiple non-overlapping areas to the terminal 102, so that the terminal 102 processes the spatial data based on the multiple non-overlapping areas obtained, such as the terminal 102 can highlight the multiple non-overlapping areas in the electronic map to highlight the multiple non-overlapping areas in the electronic map.
[0036] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, cloud security, host security and other network security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 102 and the server 104 can be directly or indirectly connected via wired or wireless communication.
[0037] In one embodiment, Figure 2As shown, a data processing method is provided, which is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0038] Step 202, determine multiple regions divided based on spatial data, and obtain regional heat of each of the multiple regions; the regional heat is used to characterize the heat of the spatial data included in the region.
[0039] Among them, spatial data can be used to represent the location, shape, size distribution and other information of an object. It is a quantitative description of things and phenomena with positioning significance in the real world. According to the different storage organization and processing methods of maps in computer systems, as well as the geometric characteristics of spatial data itself, spatial data can be divided into graphic data and image data. In different application scenarios, spatial data can be used to represent different information of different objects. For example, spatial data can include the authorized positioning data of the terminal during the traffic process, and can also include the data of each pixel point in the medical image. The region is a spatial range obtained based on the division of spatial data, and can be specifically obtained by dividing the space to which the spatial data belongs. In practical applications, according to the different requirements of different application scenarios, the division methods of multiple regions can be different. The region is divided according to the space to which the spatial data belongs, and the spatial data can be classified into different regions according to the distribution position. Heat can be used to represent the attributes of spatial data, such as the amount of data and frequency of spatial data, that is, heat can be obtained by statistics of spatial data. By performing statistics on the spatial data included in each region, the regional heat of each region can be obtained, that is, the regional heat can be used to characterize the heat of the spatial data included in the corresponding region, such as specifically the amount of spatial data included in the region.
[0040] Specifically, the server can determine multiple areas, and multiple areas are areas that need to be screened for non-overlapping areas. Multiple areas can be obtained based on spatial data. Specifically, the server can determine the space to which the spatial data belongs, and divide the space to which it belongs, so as to obtain multiple areas. In actual application, each area can be divided into equal shapes and sizes, or it can be flexibly divided according to different shapes and sizes. For example, when the spatial data includes positioning data, the space to which the positioning data belongs is the real three-dimensional space, and the real three-dimensional space can be divided to obtain multiple areas. In a specific application, when the positioning data is two-dimensional data, the space to which the positioning data belongs can be a two-dimensional map, and multiple map areas can be obtained by dividing the two-dimensional map. When dividing the two-dimensional map, it can be flexibly divided according to the actual map elements in the map, such as it can be flexibly divided based on different buildings, administrative areas, terrains and other elements. For example, different communities can be divided into different areas, a school can be divided into an area, a building can be divided into an area, a tourist attraction range can be divided into an area, and so on.
[0041] For the determined multiple regions, the server can determine the spatial data included in each region, that is, the various spatial data can be divided into various regions according to their distribution. The server can determine the heat of the spatial data included in each region, and specifically can perform statistics on the spatial data included in each region, such as counting the total number of spatial data included in each region to obtain the regional heat of each region. The generation of regional heat can be set according to actual needs, such as the total number of spatial data statistics can be used as the regional heat, and the weighted average number of spatial data included in the region can also be used as the regional heat.
[0042] Step 204, constructing a node connection graph through multiple regions, the regional heat of each of the multiple regions, and the spatial overlapping relationship between each of the multiple regions; each node in the node connection graph represents each region, each node attribute of each node represents the regional heat of each region, and the connection edges between each node represent the spatial overlapping relationship between each region.
[0043] Among them, multiple regions are obtained by dividing the space to which the spatial data belongs, and the division of regions is diverse and not necessarily mutually exclusive, that is, there is overlap between the regions. The spatial overlap relationship is used to describe the overlapping relationship between two regions. When there is spatial overlap between different regions, the spatial overlap relationship between different regions is considered to exist. If there is no spatial overlap between different regions, it can be considered that there is no overlapping relationship between different regions. The spatial overlap relationship between different regions can be determined based on the spatial contours of different regions. When the spatial contour of a region is inside another region, it is considered that the two regions have spatial overlap.
[0044] The node connection graph is a graph built based on different nodes. Different nodes can be connected through edges to represent the association relationship between the connected nodes. In the node connection graph, nodes are used to represent regions, that is, regions are mapped to nodes in the node connection graph. A region can be mapped to one node or multiple nodes; node attributes are attribute information carried by nodes, and node attributes are used to represent the regional heat of the region represented by the corresponding node, that is, the heat of the region is mapped to the node attributes of the node; connecting edges refer to edges connecting different nodes, and connecting edges are used to represent the spatial overlap relationship between the corresponding two nodes, that is, when two different nodes are connected by connecting edges, it indicates that there is a spatial overlap relationship between the two different nodes, so whether there is a spatial overlap relationship between different regions can be determined by the presence or absence of connecting edges between nodes.
[0045] Specifically, the server can map multiple regions, their respective regional heats, and the spatial overlap between regions in multiple regions to construct a node connection graph. The specific server can map regions into nodes, map regional heats into node attributes, and map the spatial overlap between nodes into connecting edges connecting different nodes. Through the constructed node connection graph, the relationship between multiple regions and the regional heat of multiple regions can be intuitively characterized.
[0046] Step 206, search for each node in the node connection graph according to the regional heat filtering condition to obtain multiple search nodes; the search nodes are not connected by connecting edges, and the overall heat of each search node meets the regional heat filtering condition; the overall heat is used to represent the regional heat represented by the node attributes of each search node.
[0047] Among them, the regional heat screening condition is a condition for screening each region based on the regional heat. The regional heat screening condition can be flexibly set according to the actual application needs, such as including regional heat thresholds, regional heat maximization conditions, etc. The nodes in the node connection graph represent regions. By searching each node in the node connection graph, a search for multiple regions can be achieved. The search node is a node searched according to the regional heat screening condition. The search nodes are not connected by connecting edges, that is, there is no spatial overlap between the regions represented by the search nodes; the overall heat of each search node meets the regional heat screening condition. The overall heat is used to represent the regional heat represented by the node attributes of each search node. It can be obtained according to the regional heat represented by the node attributes of each search node. Specifically, it can be obtained by summing the regional heat represented by the node attributes of each search node, that is, the overall heat of each search node is the sum of the regional heat of the region represented by each search node.
[0048] Specifically, the server can obtain pre-set regional heat filtering conditions, and different business needs can correspond to different regional heat filtering conditions. The server can determine the business needs according to the business scenario, and obtain the corresponding regional heat filtering conditions based on the business needs, and search for each node in the node connection graph according to the regional heat filtering conditions to search for multiple search nodes. The multiple search nodes are not connected by connecting edges, that is, there is no spatial overlap between the regions represented by each search node. Furthermore, the overall heat of the multiple search nodes meets the regional heat filtering conditions, and the overall heat of the multiple search nodes can represent the regional heat represented by the node attributes of each search node.
[0049] Step 208, obtaining a plurality of non-overlapping regions according to the regions respectively represented by the search nodes in the plurality of regions; the plurality of non-overlapping regions are used to process the spatial data.
[0050] Among them, the non-overlapping area is the area represented by the search node obtained from the node connection graph. There is no spatial overlap relationship between multiple non-overlapping areas, that is, there is no spatial overlap between any two non-overlapping areas. Specifically, the server can perform inverse mapping for each search node obtained by the search, that is, determine the area represented by each search node, and use the area represented by each search node as a non-overlapping area, thereby determining multiple non-overlapping areas from multiple areas. For the multiple non-overlapping areas determined, the server can be used for processing of spatial data, such as using the spatial data in multiple non-overlapping areas for positioning recommendation, heat analysis and other processing.
[0051] In a specific application, such as Figure 3As shown, in a region, six areas are divided, namely area A1, area A2, area A3, area A4, area A5 and area A6, and each area can have a different regional heat. Among them, area A1 has spatial overlap with area A2, area A3 and area A6 respectively; area A2 has spatial overlap with area A1 and area A3 respectively; area A3 has spatial overlap with area A1, area A2, area A4 and area A5 respectively; area A4 has spatial overlap with area A3; area A5 has spatial overlap with area A3; area A6 has spatial overlap with area A1. Further, as Figure 4 As shown in , the regions are mapped, specifically mapping the regions into nodes; mapping the overlapping relationships of the regions into edges connecting the nodes; and mapping the heat values of the regions into node weights. Figure 5 As shown, in the node connection graph constructed based on regions A1 to A6, region A1 is represented by node a1, region A2 is represented by node a2, region A3 is represented by node a3, region A4 is represented by node a4, region A5 is represented by node a5, and region A6 is represented by node a6; the spatial overlapping relationship between regions is mapped into the interconnected edges between nodes in the node connection graph; and the heat value of the region is mapped into the node attribute of the node. The server filters each node in the node connection graph according to the regional heat filtering condition. For example, it can filter according to the condition of selecting the region with the largest overall heat to obtain multiple search nodes. Figure 6 As shown, the multiple search nodes screened in the node connection graph include node a2, node a4, node a5 and node a6, among which node a1 and node a3 represented by dotted lines do not belong to the search nodes. It can be seen that the searched nodes a2, node a4, node a5 and node a6 are not connected by connecting edges. The server determines multiple non-overlapping areas represented by each search node from multiple areas based on the searched search nodes. Figure 7 As shown, node a2 represents area A2, node a4 represents area A4, node a5 represents area A5, and node a6 represents area A6. The areas filled with lines are multiple non-overlapping areas screened from area A1 to area A6. There is no spatial overlapping relationship between the non-overlapping areas, and the overall heat of the multiple non-overlapping areas is the maximum value, so that multiple non-overlapping areas can be accurately and quickly determined from multiple areas. The server can perform various processing such as hot spot analysis, positioning recommendation, and traffic diversion based on the multiple non-overlapping areas.
[0052] In the above data processing method, for multiple regions divided based on spatial data, a node connection graph is constructed through multiple regions, the regional heat of each region and the spatial overlapping relationship between each region in the multiple regions. Each node in the node connection graph represents each region, and each node attribute of each node represents the regional heat of each region. The connecting edges between each node represent the spatial overlapping relationship between each region. According to the regional heat filtering condition, each node in the node connection graph is searched to obtain multiple search nodes that are not connected by connecting edges and whose overall heat meets the regional heat filtering condition, and multiple non-overlapping regions represented by each search node are determined from the multiple regions. During the data processing process, a node connection graph is constructed according to multiple regions, the regional heat of each of the multiple regions, and the spatial overlapping relationship between each of the multiple regions, so that each node in the node connection graph represents each region, each node attribute of each node represents the regional heat of each region, and the connection edge between each node represents the spatial overlapping relationship between each region, so that each node in the node connection graph can be searched according to the regional heat filtering condition, and multiple non-overlapping regions that do not overlap and whose overall heat meets the regional heat filtering condition can be determined from multiple regions by searching for nodes that are not connected by connecting edges and whose overall heat meets the regional heat filtering condition. The node connection relationship and node attributes in the node connection graph can be used to determine the region, which can effectively improve the processing efficiency of non-overlapping region determination.
[0053] In one embodiment, the node attributes include weight attributes; a node connection graph is constructed through multiple regions, the regional heat of each of the multiple regions, and the spatial overlapping relationship between each of the multiple regions, including: mapping each of the multiple regions separately to obtain the mapped nodes corresponding to each region; mapping the regional heat of each region to the weight attribute of the mapped node corresponding to each region; obtaining the spatial overlapping relationship between the regions, and determining the connecting edges between the mapped nodes corresponding to each region according to the spatial overlapping relationship; constructing a node connection graph based on the mapped nodes corresponding to each region, the weight attributes, and the connecting edges between the mapped nodes corresponding to each region.
[0054] The weight attribute is used as the weight of the node, and the weight of the node represents the regional heat of the corresponding area. Specifically, the regional heat of each area is mapped to the weight attribute of the node. The connecting edge is used to connect nodes. For nodes representing areas with spatial overlapping relationships, they are connected through connecting edges to represent the spatial overlapping relationship between the corresponding areas.
[0055] Specifically, the server maps each of the multiple regions separately to map each region into a node. Specifically, each region can be mapped into a node, even if the region corresponds to the node one-to-one; each region can also be mapped into multiple nodes, so that one region corresponds to multiple nodes. The server maps the regional heat of each region to map the regional heat into the weight attribute of each mapped node corresponding to each region. The server obtains the spatial overlapping relationship between each region. The spatial overlapping relationship between each region can be analyzed in advance for each region, such as the spatial overlapping relationship between each region can be obtained based on the spatial contour of each region. The server maps the spatial overlapping relationship between each region to map it into the connection edge between nodes. The server constructs a node connection graph matching multiple regions based on the nodes and weight attributes obtained after mapping, and the connection edges between the nodes corresponding to the mapped nodes in each region. The nodes, node weight attributes, and connection edges between nodes in the node connection graph can intuitively characterize the relationship between each region and the regions.
[0056] In this embodiment, the server maps areas into nodes, maps area heat into weight attributes, maps spatial overlapping relationships into connecting edges between nodes, and constructs a node connection graph based on the mapped nodes, weight attributes, and connecting edges between each node. It can thus perform node searches based on the node connection graph to determine non-overlapping areas, which can effectively improve the processing efficiency of determining non-overlapping areas.
[0057] In one embodiment, the spatial overlapping relationship between the regions is obtained, and the connection edges between the mapped nodes corresponding to the regions are determined according to the spatial overlapping relationship, including: constructing a spatial index for each region; performing spatial queries based on the spatial index of each region to obtain the spatial overlapping relationship between each region and the regions other than the region itself; and constructing the connection edges between the mapped nodes corresponding to the regions according to the spatial overlapping relationship between the regions.
[0058] Among them, spatial index refers to a data structure arranged in a certain order according to the position and shape of spatial objects or a certain spatial relationship between spatial objects, which contains summary information of spatial objects, such as the object's identifier, circumscribed rectangle, and pointer to the spatial object entity. Through spatial index, the overlapping relationship between various regions can be analyzed quickly and accurately. Spatial query is to use spatial index to recall overlapping regions, and spatial query can determine the spatial overlapping relationship between various regions.
[0059] Specifically, for multiple regions, the server constructs a respective spatial index for each region, and performs spatial query based on the spatial index of each region. The server can perform spatial query based on the spatial index of each region, and obtain the spatial overlap relationship between each region and the regions other than its own region. Based on the determined spatial overlap relationship, the server can build connection edges between the corresponding mapped nodes of each region. Specifically, for two regions with spatial overlap, the nodes mapped by the two regions can be connected through connection edges.
[0060] In this embodiment, the server performs spatial query by constructing a spatial index of the area to determine the spatial overlapping relationship between each area in multiple areas. The spatial overlapping relationship between each area can be analyzed quickly and accurately, thereby ensuring the accuracy of the constructed node connection graph, which is conducive to improving the processing efficiency of determining non-overlapping areas.
[0061] In one embodiment, Figure 8 As shown, the node search process is to search for each node in the node connection graph according to the regional heat screening condition, and obtain multiple search nodes, including:
[0062] Step 802, determining a particle swarm including at least one particle constructed based on each node in the node connection graph; the position of the particle in the particle swarm is used to represent the node selection result for each node in the node connection graph.
[0063] Among them, Particle Swarm Optimization (PSO) is an evolutionary computing method that originated from the study of bird flock predation behavior. Its essence is to use the information sharing of individuals in the group to enable the entire group to obtain an approximate optimal solution in the problem-solving space. Each particle has its own position, and the goal is to find an approximate optimal position to maximize the objective function. Since the classic particle swarm algorithm is for continuous function optimization problems, the discrete binary particle swarm algorithm (BPSO) was proposed in related fields. The position of the particles is limited to 0 or 1, so that the particle swarm algorithm can optimize problems defined in binary discrete space.
[0064] Particles are constructed based on each node in the node connection graph. Specifically, particles can be constructed based on whether each node is selected or not. For example, if the region includes 5 and the mapped nodes are 5, each node has a selection or not. If selected, it is 1, and if not selected, it is 0, so that five-dimensional data can be obtained, such as 10110, which means that the first node, the third node and the fourth node are selected, while the second node and the fifth node are not selected, so that 10110 can be used as the position of the particle, which can characterize the selection of each node. A particle swarm is a particle set obtained based on at least one particle. Through multiple iterative updates of particles in the particle swarm, the required non-overlapping areas can be determined from multiple areas based on the particle swarm optimization algorithm.
[0065] Specifically, the server determines a particle group including at least one particle, and the particle is constructed based on each node in the node connection graph. Specifically, at least one particle can be generated based on each node mapping in the node connection graph according to a pre-set mapping method. For each particle, the position of the particle can be used to represent the node selection result of each node in the node connection graph. That is, for each node in the node connection graph, if the node is selected, the position of the corresponding example can be set to 1; if it is not selected, it is set to 0, so that the selection of each node can be represented by the position of the particle.
[0066] Step 804, for each particle in the particle swarm, iteratively update based on the position, speed, self-reference position and global reference position of the targeted particle to obtain the iteratively updated position of the targeted particle; the self-reference position is obtained by filtering from the historical position of the targeted particle according to the regional heat filtering condition; the global reference position is obtained by filtering from the historical position of each particle in the particle swarm according to the regional heat filtering condition.
[0067] Among them, the self-reference position is the optimal position obtained by screening the historical positions of the targeted particles according to the regional heat screening conditions, that is, in the historical iterative update process of the targeted particles, the particles will be in different positions. The regional heat screening conditions can be used to judge each position, so as to determine the optimal position as the self-reference position. Similarly, for each particle in the particle swarm, the optimal position of all particles can be used as the global reference position of the particle swarm, and the global reference position can be screened from the historical positions of each particle in the particle swarm according to the regional heat screening conditions. The speed of the particle is used to characterize the degree of position change of the particle during the iterative update process.
[0068] Specifically, for each particle in the particle swarm, the server can obtain the position, velocity and own reference position of the targeted particle. The server can also obtain the global reference position of the particle swarm. The server iteratively updates the position of the targeted particle based on the position, velocity, own reference position and global reference position of the targeted particle to obtain the iteratively updated position of the targeted particle.
[0069] Step 806, when it is determined that the global reference position update condition is met based on the fitness of the iteratively updated position, the own reference position and the global reference position are updated respectively based on the iteratively updated position; the fitness is obtained based on the regional heat represented by the node attributes of each selected node in the node selection result represented by the iteratively updated position.
[0070] Among them, fitness is used to evaluate the quality of the particle's position, so as to control the iterative update of the particle. The definition of fitness can be flexibly set according to actual needs, such as being obtained according to the regional heat represented by the node attributes of the selected nodes in the node selection result represented by the particle's position. Specifically, the sum of the regional heat represented by the node attributes of the selected nodes in the node selection result represented by the particle's position can be used as the fitness of the particle's position, so that the position of each particle can be evaluated by the fitness until the optimal position is searched, that is, the position with the largest sum of the regional heat represented by the node attributes of the selected nodes in the node selection result can be determined, and multiple non-overlapping areas can be determined based on the position. The global reference position update condition is used to determine whether the global reference position needs to be updated. For example, when the fitness of the updated position exceeds the fitness of the current global reference position, the current global reference position can be updated.
[0071] Specifically, the server can determine the fitness of the iteratively updated position, specifically, it can determine the selected nodes in the node selection result represented by the iteratively updated position, and determine the regional heat represented by the node attributes of each selected node, and obtain the fitness of the iteratively updated position through each regional heat, such as the sum of each regional heat can be used as the fitness of the iteratively updated position. The server obtains a pre-set global reference position update condition, and determines through the global reference position update condition and the fitness of the iteratively updated position to determine whether it is necessary to update the global reference position. For example, the global reference position update condition may include that the fitness of the iteratively updated position exceeds the fitness of the global reference position, that is, when the fitness of the iteratively updated position exceeds the fitness of the global reference position, it is considered that the global reference position update condition is met, and the server can update its own reference position and the global reference position based on the iteratively updated position, such as the iteratively updated position can replace its own reference position and the global reference position respectively.
[0072] Step 808, continue to perform iterative updating based on the iteratively updated position, iteratively updated speed, updated own reference position and updated global reference position until the iterative updating is completed, and obtain the global reference position of the particle at the end of the iterative updating.
[0073] Specifically, the server can obtain the iteratively updated speed of the particle, and continue to perform iterative updates through the iteratively updated position, the iteratively updated speed, the updated own reference position and the updated global reference position. Specifically, the iterative update can be continued to update the position of the particle again. At the end of the iterative update, if the number of iterations reaches the iteration number threshold, or all iterations are completed, the server can end the iterative update and obtain the global reference position of the particle at the end of the iterative update.
[0074] Step 810, obtaining a plurality of search nodes according to the selected nodes in the node selection result represented by the global reference position of each particle in the particle swarm at the end of iterative update.
[0075] Specifically, the server can obtain the global reference position of each particle in the particle swarm at the end of iterative update, and parse the global reference position to determine the selected node in the node selection result represented by the global reference position, thereby obtaining multiple search nodes according to each selected node.
[0076] In this embodiment, the server determines a particle swarm including at least one particle constructed based on each node in the node connection graph. For each particle in the particle swarm, the server performs iterative updates based on the position, speed, own reference position and global reference position of the targeted particle to obtain the iteratively updated position of the targeted particle. When the fitness of the iteratively updated position determines that the global reference position update condition is satisfied, the server updates its own reference position and the global reference position based on the iteratively updated position respectively, and continues to perform iterative updates based on the iteratively updated position, the iteratively updated speed, the updated own reference position and the updated global reference position until the iterative update ends, and obtains the global reference position of the targeted particle at the end of the iterative update. Finally, multiple search nodes are obtained according to the selected nodes in the node selection result represented by the global reference position of each particle in the particle swarm at the end of the iterative update, so that accurate and efficient node search can be performed from the node connection graph based on the particle swarm optimization algorithm, which is conducive to improving the processing efficiency of non-overlapping area determination.
[0077] In one embodiment, for each particle in a particle swarm, an iterative update is performed based on the position, velocity, own reference position and global reference position of the targeted particle to obtain the iteratively updated position of the targeted particle, including: for each particle in the particle swarm, obtaining the position, velocity and own reference position of the targeted particle; obtaining the global reference position of the particle swarm and the position of the particle to which the global reference position belongs; determining the iteratively updated position of the targeted particle based on the position, velocity, own reference position, global reference position and the position of the particle to which the global reference position belongs.
[0078] The particle belonging to the global reference position refers to the example in which each particle in the particle swarm appears at the global reference position during the iteration process, that is, the global reference position is determined according to the best position of all examples in the particle swarm, and the particle that appears at the global reference position is the particle belonging to the global reference position.
[0079] Specifically, for each particle in the particle swarm, the server can obtain the position, speed and self-reference position of the targeted particle, and the global reference position of the particle swarm. For the global reference position, the server can determine the source of the global reference position, that is, determine which particle the global reference position comes from, and determine the position of the particle from which the global reference position comes, that is, determine the position of the particle to which the global reference position belongs. The server iteratively updates based on the position, speed, self-reference position, global reference position and the position of the particle to which the global reference position belongs, and obtains the iteratively updated position of the targeted particle.
[0080] In this embodiment, the server combines the position, speed, own reference position, global reference position and the position of the particle to which the global reference position belongs to obtain the iteratively updated position of the targeted particle, and can refer to multi-dimensional information to update the position, which is beneficial to ensure the effectiveness of each updated position, thereby facilitating the rapid determination of the optimal position, thereby improving the processing efficiency of determining the non-overlapping area.
[0081] In one embodiment, the iteratively updated position of the targeted particle is determined based on the position, speed, own reference position, global reference position and the position of the particle to which the global reference position belongs, including: calculating the iteratively updated speed of the targeted particle based on the position, speed, own reference position, global reference position and the position of the particle to which the global reference position belongs; performing position mapping according to the iteratively updated speed to obtain the iteratively updated position of the targeted particle.
[0082] The position of the particle is determined based on the velocity of the particle. When the position of the particle is updated, the velocity of the particle can be updated, and the updated position of the particle can be obtained based on the updated velocity. Specifically, the server calculates the iteratively updated velocity of the targeted particle based on the position, velocity, its own reference position, the global reference position, and the position of the particle to which the global reference position belongs. Through the iteratively updated velocity, the server maps the iteratively updated position of the targeted particle.
[0083] In this embodiment, the server can effectively update the position of the particle by determining the updated speed of the particle and determining the updated position based on the updated speed, which is conducive to improving the rapid determination of the optimal position, thereby improving the processing efficiency of non-overlapping area determination.
[0084] In one embodiment, the data processing method also includes: determining the node selection update results for each node in the node connection graph represented by the iteratively updated position; determining the updated selected nodes in the node selection update results; when the updated selected nodes are connected through connecting edges in the node connection graph, reconfiguring the iteratively updated position to obtain the configured position; when the configured position is not connected through connecting edges in the node connection graph, using the configured position as the iteratively updated position.
[0085] The node selection update result is the node selection result of each node in the node connection graph represented by the iteratively updated position; the updated selected node is the selected node in the node selection result of each node in the node connection graph represented by the iteratively updated position. The configured position is the position for the particle to be reconfigured.
[0086] Specifically, the server can determine the iteratively updated position to determine whether the iteratively updated position is valid. Specifically, the server determines the node selection update result of each node in the node connection graph represented by the iteratively updated position, and determines the updated selected node in the node selection update result. For each updated selected node, the server can search and determine in the node connection graph to determine whether the updated selected node has a relationship of being connected through a connection edge in the node connection graph, that is, to determine whether each updated selected node is not connected through a connection edge. If the server determines that the updated selected node has a relationship of being connected through a connection edge in the node connection graph, it indicates that the iteratively updated position is invalid, and there is an overlap between the areas determined according to the iteratively updated position, which needs to be abandoned. The server can reconfigure the iteratively updated position, such as reinitializing the position for the particle to obtain the configured position. For the reconfigured position, the server can make a judgment. When it is determined that the configured position is not connected through a connection edge in the node connection graph, the server can use the configured position as the iteratively updated position to perform subsequent iterative update processing based on the iteratively updated position.
[0087] In this embodiment, for the iteratively updated position, the server determines the validity of the iteratively updated position. When it is determined that the iteratively updated position is invalid, the server can reconfigure it and use the configured position as the iteratively updated position for subsequent iterative update processing, thereby being able to promptly discard invalid data that occurs during the iterative update, avoiding subsequent invalid node searches, and effectively improving the processing efficiency of determining non-overlapping areas.
[0088] In one embodiment, when it is determined that the global reference position update condition is met based on the fitness of the iteratively updated position, the self-reference position and the global reference position are updated respectively based on the iteratively updated position, including: determining the selected node in the node selection result represented by the iteratively updated position; calculating the fitness of the iteratively updated position based on the sum of the regional heat represented by the node attributes of each of the selected nodes; when the fitness of the iteratively updated position is greater than the fitness of the global reference position, using the iteratively updated position as the updated self-reference position and the updated global reference position.
[0089] Among them, the fitness is obtained according to the sum of the regional heat represented by the node attributes of each selected node, so as to update the global reference position through the fitness, so that the global reference position with the largest fitness can be searched in continuous iterative updates, that is, to determine the selected nodes with the largest sum of regional heat.
[0090] Specifically, the server can parse the iteratively updated position to determine the selected nodes in the node selection result represented by the iteratively updated position. For each selected node, the server can determine the regional heat represented by the respective node attributes. The regional heat of each selected node can be summed, and the server sums the regional heat of each selected node to obtain the fitness of the iteratively updated position. The server can query the fitness of the global reference position, and compare the fitness of the iteratively updated position with the fitness of the global reference position. When it is determined that the fitness of the iteratively updated position is greater than the fitness of the global reference position, it indicates that the iteratively updated position is better than the current global reference position. The server uses the iteratively updated position as the updated reference position and the updated global reference position, thereby updating the global reference position to ensure the optimality of the global reference position. After the iterative update is completed, the search node can be determined based on the global reference position, and the corresponding non-overlapping area can be further determined.
[0091] In this embodiment, the server determines the selected node in the node selection result represented by the iteratively updated position, obtains the fitness of the iteratively updated position according to the sum of the regional heat represented by the node attributes of the selected nodes, and compares the fitness of the iteratively updated position with the fitness of the global reference position. When the fitness of the iteratively updated position is greater than the fitness of the global reference position, the server uses the iteratively updated position as its own updated reference position and the updated global reference position, thereby realizing timely updating of the global reference position and ensuring the accuracy of non-overlapping area determination.
[0092] In one embodiment, the data processing method further includes: constructing a particle swarm including at least one particle, configuring the initial velocity of each particle in the particle swarm; for each particle in the particle swarm, performing node selection from each node in the node connection graph to obtain a node selection result; each selected node in the node selection result is not connected by a connecting edge in the node connection graph; generating an initial position of the targeted particle according to each selected node in the node selection result; and performing iterative updating based on the initial position, initial velocity, self-reference position and global reference position of each particle in the particle swarm.
[0093] Among them, the initial speed is the speed configured for each particle when constructing the particle swarm, which can be randomly configured within the speed range. The node selection result is the result of node selection from each node in the node connection graph, and the selected nodes are not connected by connecting edges in the node connection graph. The initial position is the position configured for the particle, which can be generated based on the selected node.
[0094] Specifically, the server can construct a particle swarm, which includes at least one particle. For each particle in the particle swarm, the server can configure the initial velocity of each particle. For each particle in the particle swarm, the server selects nodes from each node in the node connection graph, and specifically needs to select nodes that are not connected by connecting edges in the node connection graph to obtain node selection results. The server generates the initial position of the targeted particle based on each selected node in the node selection result. The specific server can distinguish the selection results of all nodes by different field positions, and characterize the selection results of the corresponding nodes by the value of the field. If the node is selected, it is set to 1, and if the node is not selected, it is set to 0, so as to obtain a position with the same dimension as the number of nodes, and the selected regions corresponding to the particle can be determined based on the position. The server performs iterative updates based on the initial position, initial velocity, self-reference position and global reference position of each particle in the particle swarm. After the iterative update, the server can continue the subsequent iterative update based on the iteratively updated position, velocity, self-reference position and global reference position until the iterative update ends.
[0095] In this embodiment, the server configures the initial velocity and initial position of each particle in the constructed particle swarm, and iteratively updates the initial velocity, initial position, own reference position and global reference position of the particle. It can perform accurate and efficient node search in the node connection graph based on the particle swarm optimization algorithm, which is beneficial to improving the processing efficiency of determining non-overlapping areas.
[0096] In one embodiment, for each particle in the particle swarm, node selection is performed from each node in the node connection graph to obtain a node selection result, including: for each particle in the particle swarm, a node selection set for the particle is constructed; each node in the node connection graph is matched with a node in the node selection set for connection relationship to obtain a connection relationship matching result; the node that is not connected by a connection edge indicated by the connection relationship matching result is added to the node selection set as a selected node according to the node selection constraint condition; and the node selection result is obtained according to the node selection set of each particle in the particle swarm.
[0097] The node selection set is a set of nodes selected for particles, and the connection relationship matching result is used to characterize the relationship between each node and the selected nodes, that is, to determine whether there is a connection edge between each node and the selected nodes. The node selection constraint condition is used to constrain the addition of nodes, which can be set as a random probability condition to increase the diversity of the initial positions of various particles.
[0098] Specifically, for each particle in the particle swarm, the server constructs a corresponding node selection set, and matches each node in the node connection graph with the nodes in the node selection set to obtain a connection relationship matching result. For nodes whose connection relationship matching results indicate that they are not connected through connecting edges, the server obtains the node selection constraint conditions, and after further screening according to the node selection constraint conditions, adds them to the node selection set as selected nodes. After obtaining the node selection set of each particle, the server obtains the node selection result according to the node selection set of each particle in the particle swarm.
[0099] In this embodiment, the server selects nodes by constructing a node selection set and constrains node addition through node selection constraints, which can increase the diversity of the initial positions of different particles and avoid updating each particle with the same initial position, which is conducive to accelerating the convergence of iterative updates, thereby improving the processing efficiency of determining non-overlapping areas.
[0100] In one embodiment, the regional heat screening condition includes regional heat and maximization condition; searching each node in the node connection graph according to the regional heat screening condition to obtain multiple search nodes, including: searching a node set in the node connection graph to obtain multiple node sets; each node in each node set is not connected by connecting edges; according to the regional heat represented by the node attributes of each node in each node set, the overall heat of each node set is obtained; according to the overall heat and regional heat of each node set and the maximization condition, the search node set with the largest overall heat value is screened out from multiple node sets; and multiple search nodes are obtained according to each node included in the search node set.
[0101] Among them, the regional heat screening conditions include regional heat and maximization conditions, that is, the node search is performed according to the condition of maximum regional heat to ensure that the sum of regional heats of the determined non-overlapping areas is the maximum value. The node set is a set of nodes searched in the node connection graph, and each node in the node set is not connected by connecting edges. The overall heat is calculated based on the regional heat represented by the node attributes of each node. Specifically, the overall heat of the node set can be obtained based on the sum of the regional heat represented by the node attributes of each node.
[0102] Specifically, the server can perform a node set search in a node connection graph to obtain multiple node sets, and within each node set, the nodes are not connected by connecting edges. For each node set, the server determines the regional heat represented by the node attributes of each node in the node set, and obtains the overall heat of the node set based on the regional heat represented by the node attributes of each node. Specifically, the overall heat of the node set can be obtained based on the sum of the regional heat represented by the node attributes of each node. The server determines the overall heat of each node set by the regional heat and the maximization condition to filter out the search node set with the largest overall heat value from multiple node sets, that is, the server combines the nodes with the largest overall heat values in multiple node sets as the search node set. The server obtains multiple search nodes based on the nodes included in the search node set, and thus searches out multiple search nodes by means of the search node set.
[0103] In this embodiment, the server searches for multiple node sets in the node connection graph, and screens out the search node set with the largest overall heat value based on the overall heat of each node combination, and obtains multiple search nodes based on the nodes included in the search node set. Thus, multiple search nodes are searched out by searching the node set, which can ensure the validity of the search nodes and thus ensure the accuracy of the non-overlapping areas.
[0104] In one embodiment, the data processing method further includes: obtaining a global area map to which the multiple areas belong; and displaying the multiple non-overlapping areas in a hotspot display manner in the global area map.
[0105] The global area map refers to a map that marks multiple areas. Specifically, different forms of spatial data can correspond to different forms of global area maps. For example, when the spatial data is traffic positioning data, the global area map can be an electronic map; when the spatial data is pixel data, the global area map can be an image, such as a medical scan image. The hotspot display method refers to a display method in which multiple non-overlapping areas are highlighted as hotspots in the global area map.
[0106] Specifically, the server may obtain a global region map to which the multiple regions belong, and display the multiple non-overlapping regions in a hotspot display manner in the global region map. For example, each non-overlapping region may be filled with the same highlight color in the global region map to intuitively display each non-overlapping region as a hotspot.
[0107] In this embodiment, the server displays multiple non-overlapping areas in a hotspot display manner in a global area map to which the multiple areas belong, and can intuitively display the determined non-overlapping areas in the global area map, which is convenient for users to view and analyze.
[0108] In one embodiment, the spatial data includes traffic location data; each area includes a traffic hotspot area; the regional heat includes traffic heat; obtaining a global regional map to which multiple areas belong includes: obtaining a global electronic map to which multiple areas belong.
[0109] Among them, traffic travel location data refers to the location data that users pass through during their travel in traffic application scenarios, and can specifically be positioning data within a certain time range authorized by the user. Traffic hotspot areas can be target areas, such as areas in urban areas where users have frequent travel behaviors and large traffic flows, which are key analysis areas for urban traffic planning and management. Traffic travel heat is used for the locations of areas where users tend to travel, that is, traffic travel heat can be obtained based on the amount of data statistics of positioning data. Specifically, the server obtains a global electronic map to which multiple areas belong, and covers each traffic hotspot area in the global electronic map.
[0110] Furthermore, in the global area map, multiple non-overlapping areas are displayed in a hotspot display manner, including: in the global electronic map, multiple non-overlapping areas are displayed in a display manner that matches the traffic travel heat.
[0111] Specifically, the server determines a display method that matches the traffic heat, which may be a display method of adding a busy mark, a mark method of adding a warning color, etc. The display method can be set according to actual needs. In the global electronic map, the server intuitively displays multiple non-overlapping areas in a display method that matches the traffic heat.
[0112] In this embodiment, the server displays multiple non-overlapping areas in a global electronic map to which the multiple areas belong in a display manner that matches the traffic travel popularity, and can intuitively display the determined non-overlapping areas in the global electronic map, making it easier for users to make targeted traffic travel arrangements.
[0113] The present application also provides an application scenario, and the application scenario applies the above data processing method. Specifically, the application of the data processing method in the application scenario is as follows:
[0114] Spatial data may be part attribute data of an organism, and regions may be regions divided for parts of an organism, specifically, regions divided in a medical scan image. The server may obtain a medical scan image, determine multiple regions in the medical scan image, and determine the regional heat of each of the multiple regions. The regional heat may be a statistical result of the number of various objects such as tissues and cells for the parts. The server constructs a node connection graph through multiple regions, the regional heat of each of the multiple regions, and the spatial overlapping relationship between each of the multiple regions. Each node in the node connection graph represents each region, each node attribute of each node represents the regional heat of each region, and the connection edges between each node represent the spatial overlapping relationship between each region. Each node in the node connection graph is searched according to the regional heat screening condition to obtain multiple search nodes that are not connected by the connection edge and whose overall heat meets the regional heat screening condition, and multiple non-overlapping regions represented by each search node are determined from the multiple regions, so that multiple non-overlapping regions can be divided in the medical scan image and highlighted.
[0115] The present application also provides an application scenario, and the application scenario applies the above data processing method. Specifically, the application of the data processing method in the application scenario is as follows:
[0116] In the actual business of spatial data mining, it often happens that the contours of the basic spatial units are not spatially mutually exclusive, but overlap with each other, and the spatial contours have a continuous heat value attribute. If in actual business needs, it is necessary to select several non-overlapping areas from the overlapping area and maximize the sum of the heat values of the selected areas, this problem is defined as the maximum heat non-overlapping area selection in this embodiment. In addition, an attribute value of an input area as a component of the optimization target can also be optimized for other types of attributes.
[0117] For the above maximum heat non-overlapping region selection problem, a simple and intuitive solution is to define a result set, sort all regions from high to low according to heat value, and make judgments in turn: if the region does not overlap with any region in the result set, then put the region into the result set, otherwise skip the region. However, this idea obviously has problems. Here is a simple counterexample: Fig. 9As shown in the figure, suppose there are three regions, region A, region B, and region C. The heat value of region A is 1000, the heat value of region B is 2000, and the heat value of region C is 1500. Region A overlaps with region B, region B overlaps with region C, and region A and region C do not overlap. According to the previous intuitive idea, region B with the highest heat value is selected first. However, since region B overlaps with both region A and region C, region A and region C cannot be selected after region B is selected. Fig.10 As shown in , only region B is selected from region A, region B, and region C, resulting in the sum of the heat values of the finally selected regions being only 2000. Fig.11 As shown in the figure, the optimal solution should be to select areas A and C that do not overlap each other, so that the sum of the heat values of the final selected areas is 2500, which is greater than the sum of the heat values of the above intuitive ideas. The above counterexamples can prove that the above intuitive ideas are not feasible.
[0118] Based on this, the present embodiment provides a data processing method, which regards regions as nodes in a graph, the overlapping relationships between regions as edges in the graph, and the heat values as the weights of the nodes in the graph, thereby constructing a point weighted undirected graph, and transforming the maximum heat non-overlapping region selection problem into a maximum point weighted independent set problem, thereby introducing a binary particle swarm algorithm to solve the problem, so that the selection of the maximum heat non-overlapping region can be achieved. Specifically, the data processing method provided in the present embodiment relates to a maximum heat non-overlapping region selection method based on a binary particle swarm algorithm. On the one hand, the overlapping spatial relationships between regions are identified through spatial retrieval and spatial analysis, and the regions are regarded as nodes in the graph, the overlapping relationships between regions are regarded as edges in the graph, and the heat values are regarded as the weights of the nodes in the graph, thereby constructing a point weighted undirected graph, and transforming the maximum heat non-overlapping region selection problem into a maximum point weighted independent set problem. Among them, the independent set refers to the set of non-adjacent vertices in a graph, and the maximum weighted vertex independent set (MaxWVIS) is to find the independent set of points that maximize the sum of the weights in an undirected graph with weighted points. Generally speaking, except for the maximum weighted vertex independent set on a bipartite graph, which can be solved by a polynomial time algorithm, in other cases, the maximum weighted vertex independent set is an NP-hard problem.
[0119] On the other hand, for the NP-difficult maximum heat non-overlapping area selection problem, the maximum sum of the heat values of the selected area is used as the optimization objective function, and the binary particle swarm algorithm is introduced to solve it. At the same time, a set of random generation algorithms for the initial reasonable position of the particle swarm is designed for the problem itself, and finally the approximate optimal solution of the problem is obtained, and the set of selected areas is obtained. The data processing method provided in this embodiment can be applied to the selection of the maximum heat non-overlapping area and similar problems, and automatically solves the approximate optimal solution, so as to select a subset of areas that do not overlap in space and have the highest heat sum. Among them, particle swarm optimization is an evolutionary computing method derived from the study of bird flock predation behavior. Its essence is to use the information sharing of individuals in the group to enable the entire group to obtain an approximate optimal solution in the problem-solving space. Each particle has its own position, and the goal is to find the approximate optimal position to maximize the objective function. Since the classic particle swarm algorithm is for continuous function optimization problems, a discrete binary particle swarm algorithm was proposed in the relevant field, and the position of the particle is limited to 0 or 1, so that the particle swarm algorithm can optimize the problem defined in the binary discrete space. In addition, in addition to the binary particle swarm algorithm, the maximum point weight independent set can also obtain an approximate optimal solution through other swarm intelligence algorithms such as genetic algorithm.
[0120] Specifically, the data processing method provided in this embodiment involves the construction of a point weighted undirected graph. The purpose of this processing is to regard the region as a node (Vertex) in the graph, and the overlapping relationship between regions (if any) as an edge (Edge) in the graph. The node is weighted, and the weight is the heat value of the corresponding region. Since the overlapping relationship between regions is bidirectional, the edge is an undirected edge, so that a point weighted undirected graph is constructed according to the spatial overlapping relationship between regions.
[0121] Construct a point weighted undirected graph based on the input information. Since the overlap between regions is rare, that is, a region is likely to have spatial overlap with only a few regions, rather than almost all the remaining regions. Therefore, the point weighted undirected graph to be constructed can be considered as a sparse graph, and a hash table Graph is defined to store the point weighted undirected graph to be constructed. It is initialized to empty, and then each region is traversed. For the region with the unique identifier (ID) R, the hash table Graph[R] is defined as an empty array. Specifically, first, a spatial index is constructed. In order to determine whether the regional outline overlaps with other regional outlines, a large number of spatial queries are required. Therefore, it is necessary to construct the spatial index of each regional outline based on the input region by one of the methods such as quadtree, R tree, R* tree, etc.; further, traverse each region, for the region with unique identifier (ID) R, perform spatial query based on the spatial index to recall the list of other regional outlines that may overlap with the spatial outline of region R, that is, the location is near the spatial outline of the region with unique identifier (ID) R, and analyze the other regional outlines in the list in turn: In addition, the unique identifier (ID) of the other region to be analyzed is recorded as O, and O is required to be not equal to R, otherwise it is skipped, and the spatial relationship between the spatial outline of the region with unique identifier (ID) R and the spatial outline of the region with unique identifier (ID) O is judged to determine whether the spatial outlines overlap. The ST_Intersects function in spatial databases such as PostGIS and ArcGIS can be used to implement the judgment. If it is found that the region with unique identifier (ID) O overlaps with the region with unique identifier (ID) R, O is added to the Graph[R] array. Follow the above steps to traverse all areas and complete the construction of the point weighted undirected graph.
[0122] Furthermore, for the transformation of the maximum point weighted independent set problem, after constructing the point weighted undirected graph Graph, the original problem can be transformed into the following maximum point weighted independent set problem on the graph Graph: find the following set of points, that is, the set of regions, the points in the set are not adjacent to each other, that is, there is no spatial overlap between regions, and the sum of the weights of the points is maximized, that is, the heat value of the region is maximized.
[0123] Furthermore, for the problem solving process based on binary particle swarm algorithm, the binary particle swarm algorithm is introduced to solve the maximum point weight independent set problem converted from the original problem. First, let the number of regions be N, the number of particles in the particle swarm be S, and define the position of the i-th particle (1<=i<=S) in the k-th iteration in the N-dimensional search space as shown in the following formula (1):
[0124]
[0125] in, The value of is 0 or 1, which means that the nth region is selected (when the value is 1), or the nth region is not selected (when the value is 0).
[0126] At the same time, the speed of the i-th particle (1<=i<=S) in the k-th iteration is defined as shown in the following formula (2):
[0127]
[0128] in, The value of is [-V max , V max ], that is, the speed must be within the speed threshold V max within the positive and negative range.
[0129] The best position that the i-th particle has experienced up to the current iteration is shown in the following formula (3):
[0130]
[0131] in, The meaning and It is consistent and also represents whether the nth area is selected, with a value of 0 or 1.
[0132] The best position experienced by all particles in the particle swarm up to the current iteration is shown in the following formula (4):
[0133]
[0134] in, Indicates the best position Whether the nth region in is selected, b is the index of the particle with the best position in history, and the quality of the position is defined by the fitness, that is, the fitness of the position is the best in history until the current iteration.
[0135] The fitness of a particle is defined as the sum of the heat values of the selected areas in the area selection scheme corresponding to the particle position information. That is, the higher the sum of the heat values of the selected areas in a particle position information, the higher the fitness of the particle. However, the area selection scheme of the particle must be reasonable. That is, if there are two areas in the particle that overlap with each other according to the point weighted undirected graph Graph, then the particle is invalid and its fitness is set to zero.
[0136] Specifically, first, initialize k = 0, and initialize the positions of all particles in a particle swarm of size S. In the original particle swarm algorithm, they are generally randomly generated. In this technical solution, in order to adapt to the problem of this technical solution, the randomly generated solution needs to be reasonable, that is, there is no overlap between the selected areas in the particle position information. Therefore, a random initialization position scheme is proposed. The scheme is to initialize the position and speed of each particle according to the following steps: define the selected set subres of the particle; sort the heat of all areas from high to low; for each area in the high to low traversal sorting, domain, if the region does not overlap with any region in the selected set subres, according to the point weighted undirected graph Graph, a random probability of β, for example, β = 0.7, 0 < β < 1, is used to decide whether to add the region to the subres set; if the region overlaps with a region in the selected set subres, according to the point weighted undirected graph Graph, it is skipped; after traversing all regions, the initial position of the particle is generated according to the selected set subres, and the initial velocity of the particle in each dimension (corresponding to each region) is initialized as [-V max , V max ] Random consecutive numbers in the interval.
[0137] Furthermore, for each particle in the particle swarm, the sum of the heat of the selected area and the area with a position coordinate value of 1 on the corresponding dimension is calculated based on its position information as the fitness of the particle, and the best position experienced by the particle itself is updated based on this. and the best position experienced by the entire particle swarm And the index b of the particle corresponding to the best position. The best position experienced by the particle itself can be updated only when the sum of the heat of the selected area corresponding to the current particle position information is greater than its own historical maximum value. The best position experienced by the entire particle swarm can be updated only when the sum of the heat of the selected area corresponding to the current particle position information is greater than the historical maximum value of the entire particle swarm. And the index b of the particle corresponding to the best position.
[0138] Furthermore, let the number of iterations k = k + 1, and update the speed and position of each particle as follows. Update the speed value of each dimension of the particle speed in a particle according to the following formula (5):
[0139]
[0140] Among them, n represents the nth dimension of velocity, that is, corresponding to the nth area, w is the inertia weight, which can generally be taken as w=1, c1 and c2 are learning factors, corresponding to the degree of learning of the particle about its own optimal point and the global optimal point respectively, and r1 and r2 are random numbers between 0 and 1.
[0141] When the velocity of a dimension is greater than V max When , the velocity of this dimension is set to V max , when the velocity of a dimension is less than -V max When , set the velocity of this dimension to -V max Generate a random number r between 0 and 1 and update the position of the particle, as shown in the following formula (6):
[0142]
[0143] in, is the updated position, and the sigmoid function is defined as shown in the following formula (7):
[0144]
[0145] After updating the particle position according to the above steps, check whether the particle position is reasonable, that is, check whether there is no overlap between the areas selected in the particle position information. If there is overlap, then the position is invalid and the position of the invalid particle needs to be randomly generated and updated.
[0146] After updating the positions of all particles in the particle swarm, calculate the sum of the heat of the area with a position coordinate value of 1 in the corresponding dimension for each particle in the particle swarm based on its position information, the corresponding selected area, as the fitness of the particle, and update the best position experienced by the particle itself based on this. and the best position experienced by the entire particle swarm And the index b of the particle corresponding to the best position is processed as above.
[0147] If the current number of iterations k reaches the preset maximum number of iterations, the algorithm terminates and returns the best historical position of the entire particle swarm. As the region selection scheme, for the nth dimension of the position, if the value is 1, it means that the region is selected, and if the value is 0, it means that the region is not selected. If the current iteration number k does not reach the preset maximum iteration number, the algorithm continues to update the particle speed and position until the non-overlapping region is selected according to the global optimal solution obtained by the binary particle swarm algorithm.
[0148] The method for selecting the maximum heat non-overlapping area based on the binary particle swarm algorithm proposed in this embodiment regards the areas as nodes in a graph, the overlapping relationships between areas as edges in the graph, and the heat values as weights of the nodes in the graph, thereby constructing a point weighted undirected graph, transforming the maximum heat non-overlapping area selection problem into a maximum point weight independent set problem, thereby introducing a binary particle swarm algorithm to solve the problem, and defining a method for randomly initializing or reinitializing particle positions, thereby realizing the selection of the maximum heat non-overlapping area. Compared with the manual selection method, the method is scientific, quantitative, repeatable, and time-saving and labor-saving.
[0149] In a specific application, the scenario is to filter the hot area results generated in traffic data mining. By mining traffic flow data through spatial basic units with contours such as blocks and areas of interest (AOI, Area Of Interest), a number of hot traffic areas with relatively active travel activities can be mined. There is a traffic travel heat value in each area. However, there is spatial overlap between hot traffic areas. If displayed on a visualization system, there will be problems such as unsightly visualization effects and information loss due to mutual occlusion between areas. If the results are analyzed, there will be problems such as repeated calculation of some data due to overlapping spatial contours between areas. The above shortcomings all lead to the need to further filter the mining results based on the above technical solution proposed in this embodiment. After screening, a subset of hot traffic areas with no overlap between areas is obtained, and the sum of the traffic travel heat values of the filtered hot traffic areas is made as large as possible, so that the screening results are representative of the hot traffic areas. Fig.12 As shown in the figure, among all the hot traffic areas before filtering a certain place, it can be seen that there are some overlapping areas in the three circular boxes, which affects the visualization effect and data analysis effect. Fig.13 As shown, after screening for traffic hotspots, the overlapping areas in the three circular boxes are removed and the heat of the retained areas is as large as possible.
[0150] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0151] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.
[0152] In one embodiment, Fig.14 As shown, a data processing device 1400 is provided, comprising: a region determination module 1402, a node connection graph construction module 1404, a search node acquisition module 1406, and a non-overlapping region determination module 1408, wherein:
[0153] The region determination module 1402 is used to determine multiple regions divided based on spatial data, and obtain the regional heat of each of the multiple regions; the regional heat is used to represent the heat based on the statistics of the spatial data included in the region;
[0154] The node connection graph construction module 1404 is used to construct a node connection graph through multiple regions, the regional heat of each of the multiple regions, and the spatial overlap relationship between each of the multiple regions; each node in the node connection graph represents each region, each node attribute of each node represents the regional heat of each region, and the connection edges between each node represent the spatial overlap relationship between each region;
[0155] The search node acquisition module 1406 is used to search for each node in the node connection graph according to the regional heat screening condition to obtain multiple search nodes; the search nodes are not connected by connecting edges, and the overall heat of each search node meets the regional heat screening condition; the overall heat is used to represent the regional heat represented by the node attributes of each search node;
[0156] The non-overlapping region determination module 1408 is used to obtain multiple non-overlapping regions according to the regions represented by each search node in the multiple regions; the multiple non-overlapping regions are used to process the spatial data.
[0157] In one embodiment, the node attributes include weight attributes; the node connection graph construction module 1404 is also used to map each of the multiple regions separately to obtain the mapped nodes corresponding to each region; map the regional heat of each region to the weight attribute of the mapped node corresponding to each region; obtain the spatial overlapping relationship between each region, and determine the connecting edges between the mapped nodes corresponding to each region according to the spatial overlapping relationship; construct a node connection graph based on the mapped nodes corresponding to each region, the weight attributes and the connecting edges between the mapped nodes corresponding to each region.
[0158] In one embodiment, the node connection graph construction module 1404 is also used to construct a spatial index for each area; perform spatial queries based on the spatial index of each area in each area to obtain the spatial overlapping relationship between each area and the areas other than its own area; and construct the connection edges between the mapped nodes corresponding to each area according to the spatial overlapping relationship between the areas.
[0159] In one embodiment, the search node acquisition module 1406 is further used to determine a particle swarm including at least one particle constructed based on each node in the node connection graph; the position of the particle in the particle swarm is used to represent the node selection result of each node in the node connection graph; for each particle in the particle swarm, iteratively update is performed based on the position, speed, own reference position and global reference position of the targeted particle to obtain the iteratively updated position of the targeted particle; the own reference position is obtained by filtering from the historical position of the targeted particle according to the regional heat filtering condition; the global reference position is obtained by filtering from the historical position of each particle in the particle swarm according to the regional heat filtering condition; when the iteratively updated The fitness of the new position determines that it meets the global reference position update condition, and the self-reference position and the global reference position are updated respectively based on the iteratively updated position; the fitness is obtained according to the regional heat represented by the node attributes of the selected nodes in the node selection result represented by the iteratively updated position; the iterative update is continued based on the iteratively updated position, the iteratively updated speed, the updated self-reference position and the updated global reference position until the iterative update is completed, and the global reference position of the particle at the end of the iterative update is obtained; according to the selected nodes in the node selection result represented by the global reference position of each particle in the particle swarm at the end of the iterative update, a plurality of search nodes are obtained.
[0160] In one embodiment, the search node acquisition module 1406 is also used to obtain the position, speed and own reference position of each particle in the particle swarm; obtain the global reference position of the particle swarm and the position of the particle to which the global reference position belongs; and determine the position of the targeted particle after iterative update based on the position, speed, own reference position, global reference position and the position of the particle to which the global reference position belongs.
[0161] In one embodiment, the search node acquisition module 1406 is also used to calculate the iteratively updated speed of the targeted particle based on the position, speed, its own reference position, the global reference position and the position of the particle to which the global reference position belongs; and perform position mapping according to the iteratively updated speed to obtain the iteratively updated position of the targeted particle.
[0162] In one embodiment, it also includes a position reconfiguration module, which is used to determine the node selection update results for each node in the node connection graph represented by the iteratively updated position; determine the updated selected nodes in the node selection update results; when the updated selected nodes are connected through connecting edges in the node connection graph, reconfigure the iteratively updated position to obtain the configured position; when the configured position is not connected through connecting edges in the node connection graph, use the configured position as the iteratively updated position.
[0163] In one embodiment, the search node acquisition module 1406 is also used to determine the selected node in the node selection result represented by the iteratively updated position; calculate the fitness of the iteratively updated position based on the sum of the regional heat represented by the node attributes of each of the selected nodes; when the fitness of the iteratively updated position is greater than the fitness of the global reference position, the iteratively updated position is used as the updated self-reference position and the updated global reference position.
[0164] In one embodiment, an initialization module is further included, which is used to construct a particle swarm including at least one particle, configure the initial velocity of each particle in the particle swarm; for each particle in the particle swarm, select nodes from each node in the node connection graph to obtain a node selection result; each selected node in the node selection result is not connected by a connecting edge in the node connection graph; according to each selected node in the node selection result, an initial position of the targeted particle is generated; and iterative updates are performed based on the initial position, initial velocity, self-reference position and global reference position of each particle in the particle swarm.
[0165] In one embodiment, the initialization module is further used to construct a node selection set for each particle in the particle swarm; match the connection relationship of each node in the node connection graph with the nodes in the node selection set to obtain a connection relationship matching result; add the nodes that are not connected by the connection edges indicated by the connection relationship matching result to the node selection set as selected nodes according to the node selection constraint condition; and obtain the node selection result according to the node selection set of each particle in the particle swarm.
[0166] In one embodiment, the regional heat screening condition includes regional heat and maximization condition; the search node acquisition module 1406 is also used to search for a node set in the node connection graph to obtain multiple node sets; each node in each node set is not connected by connecting edges; the overall heat of each node set is obtained based on the regional heat represented by the node attributes of each node in each node set; based on the overall heat and regional heat of each node set and the maximization condition, the search node set with the largest overall heat value is screened out from multiple node sets; multiple search nodes are obtained based on each node included in the search node set.
[0167] In one embodiment, a display module is further included, which is used to obtain a global area map to which the multiple areas belong; in the global area map, the multiple non-overlapping areas are displayed in a hotspot display manner.
[0168] In one embodiment, the spatial data includes traffic location data; each area includes a traffic hotspot area; the regional heat includes traffic heat; the display module is also used to obtain a global electronic map to which multiple areas belong; in the global electronic map, multiple non-overlapping areas are displayed in a display manner that matches the traffic heat.
[0169] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0170] In one embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.15 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the data processing method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing method is implemented.
[0171] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0172] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0173] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0174] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0176] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0177] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. The above-mentioned embodiments only express several implementation methods of the present application, and their descriptions are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of this application. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present application, several deformations and improvements can be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the attached claims.
Claims
1. A data processing method, characterized in that: The method comprises: Determine a plurality of regions divided based on spatial data, and obtain regional heat of each of the plurality of regions; the regional heat is used to characterize the heat of the spatial data included in the region; A node connection graph is constructed by constructing the multiple regions, the respective regional heats of the multiple regions, and the spatial overlapping relationship between the multiple regions; each node in the node connection graph represents each region, each node attribute of each node represents the respective regional heat of each region, and the connection edges between each node represent the spatial overlapping relationship between the regions; Searching each node in the node connection graph according to the regional heat screening condition to obtain a plurality of search nodes; each of the search nodes is not connected by a connecting edge, and the overall heat of each of the search nodes meets the regional heat screening condition; the overall heat is used to represent the regional heat represented by the node attributes of each of the search nodes; A plurality of non-overlapping regions are obtained according to the regions respectively represented by the search nodes in the plurality of regions; the plurality of non-overlapping regions are used to process the spatial data.
2. The method according to claim 1, characterized in that: The node attribute includes a weight attribute; the node connection graph is constructed by the multiple regions, the region heat of each of the multiple regions, and the spatial overlapping relationship between each of the multiple regions, including: Mapping each of the multiple regions respectively to obtain a mapped node corresponding to each of the regions; Mapping the regional heat of each region into a weight attribute of the mapped node corresponding to each region; Obtaining a spatial overlapping relationship between the regions, and determining a connection edge between the mapped nodes corresponding to the regions according to the spatial overlapping relationship; A node connection graph is constructed based on the nodes mapped to the respective regions, the weight attributes and the connection edges between the nodes mapped to the respective regions.
3. The method according to claim 2, characterized in that The obtaining of the spatial overlapping relationship between the regions, and determining the connection edges between the mapped nodes corresponding to the regions according to the spatial overlapping relationship, includes: Constructing a spatial index for each of the regions; Based on the spatial index of each region in the respective regions, spatial queries are performed respectively to obtain the spatial overlapping relationship between each region and the regions in the respective regions excluding the region itself; According to the spatial overlapping relationship between the regions, connection edges between the mapped nodes corresponding to the regions are constructed.
4. The method according to claim 1, characterized in that: The searching for each node in the node connection graph according to the regional heat screening condition to obtain multiple search nodes includes: Determine a particle swarm including at least one particle constructed based on each node in the node connection graph; the position of the particle in the particle swarm is used to represent the node selection result of each node in the node connection graph; For each particle in the particle swarm, iterative updating is performed based on the position, speed, self-reference position and global reference position of the targeted particle to obtain the iteratively updated position of the targeted particle; the self-reference position is obtained by filtering from the historical positions of the targeted particle according to the regional heat filtering condition; the global reference position is obtained by filtering from the historical positions of each particle in the particle swarm according to the regional heat filtering condition; When it is determined that the global reference position update condition is met according to the fitness of the iteratively updated position, the self reference position and the global reference position are updated respectively based on the iteratively updated position; the fitness is obtained according to the regional heat represented by the node attributes of each selected node in the node selection result represented by the iteratively updated position; Continue to perform iterative updating based on the iteratively updated position, iteratively updated speed, updated own reference position and updated global reference position until the iterative updating is completed, and obtain the global reference position of the particle at the end of the iterative updating; A plurality of search nodes are obtained according to the selected nodes in the node selection result represented by the global reference position of each particle in the particle swarm at the end of iterative update.
5. The method according to claim 4, characterized in that The iterative updating of each particle in the particle group based on the position, velocity, self-reference position and global reference position of the particle to obtain the iteratively updated position of the particle includes: For each particle in the particle group, obtaining the position, velocity and self-reference position of the targeted particle; Obtaining a global reference position of the particle swarm and the position of the particle to which the global reference position belongs; Based on the position, the speed, the own reference position, the global reference position and the position of the particle to which the global reference position belongs, the iteratively updated position of the targeted particle is determined.
6. The method according to claim 5, characterized in that The step of determining the iteratively updated position of the particle based on the position, the speed, the own reference position, the global reference position, and the position of the particle to which the global reference position belongs comprises: Based on the position, the speed, the own reference position, the global reference position and the position of the particle to which the global reference position belongs, calculate and obtain the iteratively updated speed of the particle; Position mapping is performed according to the iteratively updated speed to obtain the iteratively updated position of the particle.
7. The method according to claim 4, characterized in that The method further comprises: Determine a node selection update result for each node in the node connection graph represented by the iteratively updated position; Determine the update selected node in the node selection update result; When the updated selected nodes are connected via connecting edges in the node connection graph, reconfiguring the iteratively updated positions to obtain the configured positions; When the configured position is not connected through a connection edge in the node connection graph, the configured position is used as the iteratively updated position.
8. The method according to claim 4, characterized in that When determining that a global reference position update condition is satisfied according to the fitness of the iteratively updated position, updating the own reference position and the global reference position respectively based on the iteratively updated position includes: Determine a selected node in a node selection result of the iteratively updated position representation; Calculating the fitness of the iteratively updated position according to the sum of the regional heats represented by the node attributes of each of the selected nodes; When the fitness of the iteratively updated position is greater than the fitness of the global reference position, the iteratively updated position is used as the updated self-reference position and the updated global reference position.
9. The method according to claim 4, characterized in that The method further comprises: Constructing a particle swarm including at least one particle, and configuring an initial velocity of each particle in the particle swarm; For each particle in the particle group, node selection is performed from each node in the node connection graph to obtain a node selection result; each selected node in the node selection result is not connected by a connection edge in the node connection graph; Generating an initial position of the targeted particle according to each selected node in the node selection result; Iterative updating is performed based on the initial position, initial velocity, self-reference position and global reference position of each particle in the particle group.
10. The method according to claim 9, characterized in that The step of selecting nodes from the nodes in the node connection graph for each particle in the particle swarm to obtain a node selection result includes: For each particle in the particle swarm, construct a node selection set for the particle; Match the connection relationship of each node in the node connection graph with the nodes in the node selection set to obtain a connection relationship matching result; The nodes that are not connected by the connection edges indicated by the connection relationship matching result are added to the node selection set as selected nodes according to the node selection constraint condition; A node selection result is obtained according to the node selection set of each particle in the particle swarm.
11. The method according to claim 1, characterized in that: The regional heat screening condition includes regional heat and a maximization condition; the searching for each node in the node connection graph according to the regional heat screening condition to obtain a plurality of search nodes includes: Performing a node set search in the node connection graph to obtain a plurality of node sets; each node in each of the node sets is not connected by a connection edge; Obtaining the overall heat of each of the node sets according to the regional heat represented by the node attributes of each node in each of the node sets; According to the overall heat of each of the node sets, the regional heat and the maximization condition, a search node set with the largest overall heat value is screened out from the multiple node sets; A plurality of search nodes are obtained according to each node included in the search node set.
12. The method according to any one of claims 1 to 11, characterized in that: The method further comprises: Obtaining a global region map to which the multiple regions belong; In the global area map, the multiple non-overlapping areas are displayed in a hotspot display manner.
13. The method according to claim 12, characterized in that The spatial data includes traffic location data; each of the regions includes a traffic hotspot area; the regional heat includes traffic heat; The obtaining of the global area map to which the multiple areas belong includes: Obtaining a global electronic map to which the multiple areas belong; In the global area map, displaying the multiple non-overlapping areas in a hotspot display manner includes: In the global electronic map, the multiple non-overlapping areas are displayed in a display manner that matches the traffic travel popularity.
14. A data processing device, characterized in that: The device comprises: A region determination module, used to determine a plurality of regions divided based on spatial data, and obtain the region heat of each of the plurality of regions; the region heat is used to characterize the heat of the spatial data included in the region; A node connection graph construction module is used to construct a node connection graph through the multiple regions, the respective regional heats of the multiple regions, and the spatial overlapping relationship between the multiple regions; each node in the node connection graph represents each region, each node attribute of each node represents the respective regional heat of each region, and the connection edges between each node represent the spatial overlapping relationship between each region; A search node acquisition module is used to search for each node in the node connection graph according to a regional heat screening condition to obtain a plurality of search nodes; each of the search nodes is not connected by a connection edge, and the overall heat of each of the search nodes meets the regional heat screening condition; the overall heat is used to represent the regional heat represented by the node attributes of each of the search nodes; The non-overlapping area determination module is used to obtain multiple non-overlapping areas according to the areas represented by each of the search nodes in the multiple areas; the multiple non-overlapping areas are used to process the spatial data.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
Citation Information
Patent Citations
Air traffic control mid-term conflict detection method and device
CN106601033A
Image semantic segmentation method and device of chaotic back propagation graph neural network
CN115761240A
Region Weighting Mehtod Based on Spatial LocationInformaiton for Relevance Feedback in Image SearchEngine
KR1020080018631A
Associating Spatial Point Sets
US20200380704A1
Associating spatial point sets with candidate correspondences
US20200394444A1
