CN116030079A - Geofence partitioning method, device, computer equipment and storage medium - Google Patents

Geofence partitioning method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116030079A
CN116030079A CN202310318869.XA CN202310318869A CN116030079A CN 116030079 A CN116030079 A CN 116030079A CN 202310318869 A CN202310318869 A CN 202310318869A CN 116030079 A CN116030079 A CN 116030079A
Authority
CN
China
Prior art keywords
target
training
geographic
model
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310318869.XA
Other languages
Chinese (zh)
Inventor
曹绍升
周霖
黄海斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Didi Infinity Technology and Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Didi Infinity Technology and Development Co Ltd filed Critical Beijing Didi Infinity Technology and Development Co Ltd
Priority to CN202310318869.XA priority Critical patent/CN116030079A/en
Publication of CN116030079A publication Critical patent/CN116030079A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Instructional Devices (AREA)

Abstract

The application relates to a geofence dividing method, a geofence dividing device, computer equipment and a storage medium. The method comprises the following steps: acquiring target geographic feature data of a target geographic area; inputting the target geographic characteristic data into a pre-trained target fence dividing model, and acquiring a geographic fence dividing result of the target geographic area according to the output of the target fence dividing model; the target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business. The method can effectively improve the effect of the geofence division.

Description

Geofence partitioning method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a geofence dividing method, apparatus, computer device, and storage medium.
Background
Geofencing is a virtual fence-like boundary that characterizes the extent of each divided geographic area after a city or area is divided as desired, and in some projects, geofencing can provide an important basis for downstream tasks.
In the prior art, the above-mentioned geofence-dividing task is generally implemented by adopting a k-means method or a DBSCAN method.
However, the accuracy of the implementation of the geofence dividing task by adopting the k-means method or the DBSCAN method is low at present, so that the geofence dividing effect is poor.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a geofence dividing method, apparatus, computer device, computer readable storage medium, and computer program product that are capable of targeting downstream tasks, with which the effectiveness of geofence division can be effectively improved.
In a first aspect, the present application provides a geofence partitioning method. The method comprises the following steps:
acquiring target geographic feature data of a target geographic area; inputting the target geographic characteristic data into a pre-trained target fence dividing model, and acquiring a geographic fence dividing result of the target geographic area according to the output of the target fence dividing model; the target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business.
In one embodiment, the obtaining target geographic feature data for a target geographic area includes: acquiring target geographic information of the target geographic area; dividing the target geographic area into a plurality of target areas according to the target geographic information, and determining the target geographic feature data according to the area division result.
In one embodiment, determining the target geographic feature data based on the region division results includes: determining target geographic topology data corresponding to the target geographic area according to the area division result, and acquiring area characteristic data of each target area; and taking the target geographic topology data and the regional characteristic data of each target region as the target geographic characteristic data.
In one embodiment, determining the target geographic topology data corresponding to the target geographic area according to the area division result includes: and taking each target area as a target node in the first topological graph, and taking the adjacent target area as a target edge in the first topological graph to acquire the target geographic topological data.
In one embodiment, the acquiring the region characteristic data of each target region includes: acquiring service characteristic values of each target area in a history period to serve as area characteristic data of each target area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the target fence dividing model includes a cascaded target graph neural network model and a target reinforcement learning algorithm model, the target geographic feature data is input into a pre-trained target fence dividing model, and a geofence dividing result of the target geographic region is obtained according to output of the target fence dividing model, including: inputting the target geographic feature data into the target graph neural network model to obtain node features of each target node output by the target graph neural network model; and inputting the node characteristics of each target node into the target reinforcement learning algorithm model, and acquiring a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, inputting node characteristics of each target node into the target reinforcement learning algorithm model, and obtaining a geofence division result of the target geographic area according to output of the target reinforcement learning algorithm model, including: inputting the node characteristics of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model according to the node characteristics of each target node; obtaining the output of the target reinforcement learning algorithm model according to the initial state of the target reinforcement learning algorithm model; and obtaining a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, the training method of the target fence dividing model includes: acquiring training data, wherein the training data comprises training geographic feature data of a training geographic area; training the candidate fence dividing model according to the training geographic characteristic data and the reinforcement learning algorithm to obtain the target fence dividing model; wherein the reward of the reinforcement learning algorithm is derived based on the target parameter.
In one embodiment, acquiring training data includes: acquiring training geographic information of the training geographic area; dividing the training geographic area into a plurality of training areas according to the training geographic information, and determining the training geographic feature data according to the area division result.
In one embodiment, determining the training geographic feature data based on the region division results comprises: determining training geographic topology data corresponding to the training geographic areas according to the area division results, and acquiring area characteristic data of each training area; and taking the training geographic topology data and the regional characteristic data of each training region as the training geographic characteristic data.
In one embodiment, determining training geographic topology data corresponding to the training geographic area according to the area division result includes: and taking each training area as a training node in the second topological graph, and taking the adjacent training areas as training edges in the second topological graph to acquire the training geographic topological data.
In one embodiment, the acquiring the region feature data of each training region includes: acquiring service characteristic values of each training area in a history period to serve as area characteristic data of each training area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the candidate fence dividing model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model, the training of the candidate fence dividing model according to the training geographic feature data and the reinforcement learning algorithm includes: inputting the training geographic feature data into the candidate graph neural network model to obtain node features of each training node output by the candidate graph neural network model; inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm so as to obtain rewards; and adjusting the model parameters of the candidate graph neural network model and the model parameters of the candidate reinforcement learning algorithm model according to the obtained rewards.
In one embodiment, inputting node characteristics of each of the training nodes into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm, rewarding, comprising: inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model according to the node characteristics of each training node; executing an action based on the first state, and acquiring a second state of the candidate reinforcement learning algorithm model after the action is executed; and obtaining rewards according to the first state and the second state.
In one embodiment, the states of the candidate reinforcement learning algorithm model include: statistics of node characteristics of training nodes contained within each of a plurality of candidate geofences.
In one embodiment, the performing an action based on the first state includes: partitioning the training nodes not geofenced to candidate geofences based on the first state; alternatively, the training nodes that have been geofenced are partitioned from the candidate geofence currently in place to another candidate geofence based on the first state.
In a second aspect, the present application also provides a geofence dividing apparatus. The device comprises:
the acquisition module is used for acquiring target geographic characteristic data of a target geographic area;
the execution module is used for inputting the target geographic characteristic data into a pre-trained target fence dividing model and acquiring a geographic fence dividing result of the target geographic area according to the output of the target fence dividing model; the target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business.
In one embodiment, the obtaining module is specifically configured to: acquiring target geographic information of the target geographic area; dividing the target geographic area into a plurality of target areas according to the target geographic information, and determining the target geographic feature data according to the area division result.
In one embodiment, the obtaining module is specifically configured to: determining target geographic topology data corresponding to the target geographic area according to the area division result, and acquiring area characteristic data of each target area; and taking the target geographic topology data and the regional characteristic data of each target region as the target geographic characteristic data.
In one embodiment, the obtaining module is specifically configured to: and taking each target area as a target node in the first topological graph, and taking the adjacent target area as a target edge in the first topological graph to acquire the target geographic topological data.
In one embodiment, the obtaining module is specifically configured to: acquiring service characteristic values of each target area in a history period to serve as area characteristic data of each target area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the execution module is specifically configured to: inputting the target geographic feature data into the target graph neural network model to obtain node features of each target node output by the target graph neural network model; and inputting the node characteristics of each target node into the target reinforcement learning algorithm model, and acquiring a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, the execution module is specifically configured to: inputting the node characteristics of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model according to the node characteristics of each target node; obtaining the output of the target reinforcement learning algorithm model according to the initial state of the target reinforcement learning algorithm model; and obtaining a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, the geofence dividing apparatus further comprises a training module for: acquiring training data, wherein the training data comprises training geographic feature data of a training geographic area; training the candidate fence dividing model according to the training geographic characteristic data and the reinforcement learning algorithm to obtain the target fence dividing model; wherein the reward of the reinforcement learning algorithm is derived based on the target parameter.
In one embodiment, the training module is specifically configured to: acquiring training geographic information of the training geographic area; dividing the training geographic area into a plurality of training areas according to the training geographic information, and determining the training geographic feature data according to the area division result.
In one embodiment, the training module is specifically configured to: determining training geographic topology data corresponding to the training geographic areas according to the area division results, and acquiring area characteristic data of each training area; and taking the training geographic topology data and the regional characteristic data of each training region as the training geographic characteristic data.
In one embodiment, the training module is specifically configured to: and taking each training area as a training node in the second topological graph, and taking the adjacent training areas as training edges in the second topological graph to acquire the training geographic topological data.
In one embodiment, the training module is specifically configured to: acquiring service characteristic values of each training area in a history period to serve as area characteristic data of each training area;
wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the training module is specifically configured to: inputting the training geographic feature data into the candidate graph neural network model to obtain node features of each training node output by the candidate graph neural network model;
inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm so as to obtain rewards;
And adjusting the model parameters of the candidate graph neural network model and the model parameters of the candidate reinforcement learning algorithm model according to the obtained rewards.
In one embodiment, the training module is specifically configured to: inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model according to the node characteristics of each training node;
executing an action based on the first state, and acquiring a second state of the candidate reinforcement learning algorithm model after the action is executed;
and obtaining rewards according to the first state and the second state.
In one embodiment, the states of the candidate reinforcement learning algorithm model include: statistics of node characteristics of training nodes contained within each of a plurality of candidate geofences.
In one embodiment, the training module is specifically configured to: partitioning the training nodes not geofenced to candidate geofences based on the first state; or alternatively, the process may be performed,
the training nodes that have been geofenced are partitioned from the candidate geofence currently in place to another candidate geofence based on the first state.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of any of the above first aspects when the computer program is executed.
In a fourth aspect, the present application also provides a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the first aspects described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the first aspects described above.
According to the geofence dividing method, the device, the computer equipment and the storage medium, the target geofeature data of the target geofence area is firstly obtained, then the target geofeature data is input into the pre-trained target fence dividing model, and the geofence dividing result of the target geofence area is obtained according to the output of the target fence dividing model, wherein the target fence dividing model is trained according to the target parameters, the target parameters are used for representing the execution quality degree of the downstream business of the geofence dividing business, the target geofence dividing method inputs the target geofeature data of the target geofence area into the target fence dividing model, so that the target fence model can output the geofence dividing result of the target geofence area, and the target fence dividing model is trained according to the target parameters and is used for representing the execution quality degree of the downstream business of the geofence dividing business, namely the geofence dividing method provided by the application is based on the downstream business dividing, so that the result of the geofence dividing is more accurate, and the geofence dividing effect can be effectively improved by adopting the geofence dividing method provided by the application.
Drawings
FIG. 1 is a flow diagram of a geofence partitioning method in one embodiment;
FIG. 2 is a flow diagram of obtaining target geographic feature data for a target geographic area in one embodiment;
FIG. 3 is a flow diagram of determining target geographic feature data in one embodiment;
FIG. 4 is a flow diagram of obtaining geofence partitioning results for a target geographic area, in one embodiment;
FIG. 5 is a flowchart of another embodiment for obtaining a geofence partitioning result;
FIG. 6 is a flow diagram of a training method in one embodiment;
FIG. 7 is a flow chart of a training method in another embodiment;
FIG. 8 is a flow chart of a training method in another embodiment;
FIG. 9 is a flow chart of a training method in another embodiment;
FIG. 10 is a flow chart of a training method in another embodiment;
FIG. 11 is a flow diagram of a geofence partitioning method in another embodiment;
FIG. 12 is a block diagram of a geofence dividing device in one embodiment;
FIG. 13 is a block diagram of a geofence-dividing device in another embodiment;
fig. 14 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Geofencing is a virtual fence-like boundary that characterizes the extent of each divided geographic area after a city or area is divided as desired, and in some projects, geofencing can provide an important basis for downstream tasks.
In the prior art, the above-mentioned geofence-dividing task is generally implemented by adopting a k-means method or a DBSCAN method.
However, the accuracy of the implementation of the geofence dividing task by adopting the k-means method or the DBSCAN method is low at present, so that the geofence dividing effect is poor.
In view of this, the present application provides a geofence dividing method that can target downstream tasks, which can effectively improve the effect of geofence division.
The execution subject of the geofencing method provided by the embodiment of the application can be a computer device, and the computer device can be a server.
In one embodiment, as shown in FIG. 1, a geofence partitioning method is provided, comprising the steps of:
and 101, acquiring target geographic characteristic data of a target geographic area.
Alternatively, the target geographic area may be an area to be geofenced, the target geographic feature data may be feature data of the area to be geofenced, for example, in a usage scenario of a driver-by-driver scheduling task, the target geographic feature data may be a supply-to-demand ratio of a driver-by-driver to a user in a certain period of time, and in a usage scenario of a network-to-vehicle scheduling task, the target geographic feature data may be a supply-to-demand ratio of a network-to-vehicle to a user in a certain period of time.
In one possible implementation manner, the target geographic area may be divided according to the obtained geographic information of the target geographic area and the actual requirement by first obtaining some geographic information of the target geographic area, and then obtaining the target geographic feature data of the target geographic area according to the result of the area division.
Step 102, inputting the target geographic feature data into a pre-trained target fence dividing model, and obtaining a geographic fence dividing result of the target geographic region according to output of the target fence dividing model.
The target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business.
Alternatively, the target parameter may be an autocorrelation coefficient ACF.
In one possible implementation manner, since the target fence dividing model is trained according to target parameters, and the target parameters can be used for representing the execution quality of the downstream service of the geofence dividing service, that is, the target fence dividing model is trained by taking the downstream service as a target, the geofence dividing result of the target geographic area output by the target fence dividing model is also divided according to the downstream service.
The target fence training model includes a graph neural Network (Graph Neural Networks, GNN) and a reinforcement learning neural Network (DQN), and the GNN and the DON belong to a cascade relationship in the target fence training model.
The GNN is a connection model, the dependency relationship in the graph is obtained through information transfer among nodes in a network, the GNN can update the state of the node through neighbors with any depth from the node, the state can represent state information, namely structural topological structure information of the graph can be well carved by the GNN, namely, in the process of 'neighbor aggregation', the representing vector of a target node can be influenced by neighbor node information.
The DQN is used in a scenario where interaction with an environment is required, i.e. given a State of the environment, the program selects a corresponding Action (Action) according to a Policy, and the State of the environment changes after executing the Action, i.e. the State is converted into a new State S', and the program obtains an incentive value (Reward) after each Action is executed, i.e. the incentive, and the program adjusts its Policy according to the obtained incentive value, so that the sum of the obtained incentive values is maximum after all steps are executed, i.e. the State reaches a termination State (Terminal).
In one possible implementation, the target geographic feature data may be input into the CNN first, and then the output of the CNN may be input into the DQN, which may output the geofence partitioning result for the target geographic area.
According to the geofence dividing method, the device, the computer equipment and the storage medium, the target geofeature data of the target geofence area is firstly obtained, then the target geofeature data is input into the pre-trained target fence dividing model, and the geofence dividing result of the target geofence area is obtained according to the output of the target fence dividing model, wherein the target fence dividing model is trained according to the target parameters, the target parameters are used for representing the execution quality degree of the downstream business of the geofence dividing business, the target geofence dividing method inputs the target geofeature data of the target geofence area into the target fence dividing model, so that the target fence model can output the geofence dividing result of the target geofence area, and the target fence dividing model is trained according to the target parameters and is used for representing the execution quality degree of the downstream business of the geofence dividing business, namely the geofence dividing method provided by the application is based on the downstream business dividing, so that the result of the geofence dividing is more accurate, and the geofence dividing effect can be effectively improved by adopting the geofence dividing method provided by the application.
In one embodiment, as shown in fig. 2, the acquiring the target geographic feature data of the target geographic area includes the steps of:
step 201, obtaining target geographic information of the target geographic area.
Alternatively, the target geographic information may be road, mountain, river information, or the like.
In one possible implementation, the target geographic information of the target geographic area may be obtained by means of wireless positioning.
In another possible implementation manner, the target geographic information of the target geographic area may also be acquired by means of satellite positioning.
In another possible implementation, the target geographic information for the target geographic area may also be obtained by human manual input.
In another possible implementation, the target geographic information of the target geographic area may also be obtained through algorithmic processing.
And 202, dividing the target geographic area into a plurality of target areas according to the target geographic information, and determining the target geographic feature data according to the area division result.
Alternatively, the target area may be a small area in the target geographic area.
In one possible implementation manner, the small area may be an irregular area, and in a practical application scenario, for example, in a driver scheduling scenario, crossing a mountain or crossing a river may cause inconvenience to a scheduling task, so the target geographic area may be divided into a plurality of target areas according to the target geographic information, that is, based on the target geographic information, the target geographic area may be divided, and some obstacles such as mountain and river may be avoided during the division.
In one embodiment, as shown in fig. 3, the determining the target geographic feature data according to the region division result includes the following steps:
step 301, determining target geographic topology data corresponding to the target geographic area according to the area division result, and obtaining area characteristic data of each target area.
Optionally, the target geographic topology data includes nodes and edges.
The regional characteristic data can be node characteristics, in practical application, a target region can be regarded as a node according to a regional division result, adjacent target regions are regarded as time edges, the regional characteristic data is node characteristic data, and in a driver scheduling scene, the regional characteristic data can be the supply and demand ratio of the target region within the past 24 hours.
In an alternative embodiment, the determining the target geographic topology data corresponding to the target geographic area according to the area division result includes: and taking each target area as a target node in the first topological graph, and taking the adjacent target area as a target edge in the first topological graph to acquire the target geographic topological data.
The target geographic topology data refers to target nodes and target edges.
In an alternative embodiment, the acquiring the region characteristic data of each target region includes: and acquiring the service characteristic value of each target area in the history period to serve as area characteristic data of each target area.
Wherein the service characteristic value is a characteristic value related to the downstream service.
The historical time period may be set in advance by a technician and the service characteristic value may be set according to the downstream service.
In one possible implementation, the service feature value of each target area in the history period may be obtained through history data, for example, in a driver scheduling scenario, the supply-demand ratio of each target area in the past 24 hours may be obtained through history data, where the past 24 hours corresponds to the history period, and the supply-demand ratio corresponds to the service feature value.
Step 302, taking the target geographic topology data and the regional characteristic data of each target region as the target geographic characteristic data.
As described above, the target nodes, the target edges, and the node characteristic data of each target area are regarded as target geographic characteristic data.
In one embodiment, as shown in fig. 4, the target fence dividing model includes a cascaded target graph neural network model and a target reinforcement learning algorithm model, the target geographic feature data is input into a pre-trained target fence dividing model, and a geofence dividing result of the target geographic area is obtained according to the output of the target fence dividing model, and the method includes the following steps:
And step 401, inputting the target geographic feature data into the target graph neural network model to obtain node features of each target node output by the target graph neural network model.
Alternatively, the target graph neural network model may be GNN and the target reinforcement learning algorithm model may be DQN.
The node characteristic of the target node may be the target node vector representation, e.g., an M-dimensional vector of the target node.
In one possible implementation, the target nodes, target edges and region feature data may be input into GNNs, and the GNN model parameters perform model reasoning according to the data, and output node features of each target node.
Step 402, inputting the node characteristics of each target node into the target reinforcement learning algorithm model, and obtaining the geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one possible implementation, since the GNN and the DQN are in a cascade relationship, the DQN takes as input the output of the GNN, i.e., the node characteristics of each target node, and outputs the geofence dividing result for the target area.
In one embodiment, as shown in fig. 5, the inputting the node characteristics of each target node into the target reinforcement learning algorithm model, and obtaining the geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model, includes the following steps:
step 501, inputting the node characteristics of each target node into the target reinforcement learning algorithm model, so as to obtain the initial state of the target reinforcement learning algorithm model according to the node characteristics of each target node.
In one possible implementation, in combination with the foregoing, in the target reinforcement learning algorithm model, it may be assumed that there are N geofences, where State of a fence is an average of vector representations of all nodes in the fence, that is, if there are two target nodes in a certain fence, a target node a and a target node B, then State of the fence is an average of target node characteristics of the target node a and target node characteristics of the target node B, the initial State is State, and the initial State may be divided into two types, for example, there are a plurality of geofences, but the target nodes are not yet allocated to the plurality of geofences, where the initial State of each fence is 0, there are a plurality of geofences, the target nodes have been randomly allocated to each target fence, where the average of node characteristics of the target nodes in each fence is the initial State of each fence, and the initial State of the target reinforcement learning algorithm model is a set of initial states of each fence.
Step 502, obtaining the output of the target reinforcement learning algorithm model according to the initial state of the target reinforcement learning algorithm model.
In one possible implementation, the target reinforcement learning algorithm model performs the geofence area division action based on the initial state of the target reinforcement learning algorithm model, i.e., based on the initial state of each fence.
Step 503, obtaining a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one possible implementation, the target reinforcement learning algorithm model outputs the geofence partitioning result for the target geographic area based on the initial state of the target reinforcement learning algorithm model, i.e., based on the initial state of each fence.
In one embodiment, as shown in fig. 6, the training method of the target fence dividing model includes the following steps:
step 601, obtaining training data, wherein the training data comprises training geographic feature data of a training geographic area.
Alternatively, the training geographic area may be an area selected by a technician at random, or may be an area selected according to training requirements, and the training geographic feature data is feature data of the selected area.
In one possible implementation manner, the training geographic area may be divided according to the obtained geographic information of the training geographic area and actual requirements by first obtaining some geographic information of the training geographic area, and then obtaining the target geographic feature data of the training geographic area according to the result of the area division.
Step 602, training the candidate fence dividing model according to the training geographic feature data and the reinforcement learning algorithm to obtain the target fence dividing model.
Wherein the reward of the reinforcement learning algorithm is derived based on the target parameter.
Alternatively, the target parameter may be an autocorrelation coefficient ACF, and the target parameter may be used to characterize the execution quality of the downstream traffic of the geofence-divided traffic.
The candidate fence model includes a graph neural Network (Graph Neural Networks, GNN) and a reinforcement learning neural Network (DQN), and the GNN and the DQN belong to a cascade relationship in the candidate fence training model.
In one possible implementation, as described above, the DQN has an initial State that changes to a new State S' when an Action is performed, and generates a reward after an Action is performed, i.e. the reward for the DQN is derived from the target parameters during the training phase.
The target fence model refers to a fence model for use in a use process.
In one possible implementation manner, since the target fence dividing model is obtained by training the candidate fence dividing model according to the training geographic feature data and the reinforcement learning algorithm, and the reward of the reinforcement learning algorithm is obtained according to the target parameter, the target parameter can be used for representing the execution quality of the downstream service of the geographic fence dividing service, that is, training the candidate fence dividing model by taking the downstream service as a target, the target fence dividing model can be obtained after training.
In one embodiment, as shown in fig. 7, the acquiring training data includes the steps of:
step 701, obtaining training geographic information of the training geographic area.
Alternatively, the training geographic information may be road, mountain, river information, or the like.
In one possible implementation, the target geographic information of the training geographic area may be obtained by means of wireless positioning.
In another possible implementation, the target geographic information of the training geographic area may also be obtained by means of satellite positioning.
In another possible implementation, the target geographic information for the training geographic area may also be obtained by human manual input.
In another possible implementation, the target geographic information for the training geographic area may also be obtained by algorithmic processing.
Step 702, dividing the training geographic area into a plurality of training areas according to the training geographic information, and determining the training geographic feature data according to the area division result.
Alternatively, the training area may be a small area in the training geographic area.
In one possible implementation manner, the small area may be an irregular area, and in a practical application scenario, for example, in a driver scheduling scenario, crossing a mountain or crossing a river may cause inconvenience to a scheduling task, so the training geographic area may be divided into a plurality of training areas according to the training geographic information, that is, based on the training geographic information, the training geographic information may be divided, and some obstacles such as mountain and river may be avoided during the division.
In one embodiment, as shown in fig. 8, the determining the training geographic feature data according to the region division result includes the following steps:
step 801, determining training geographic topology data corresponding to the training geographic areas according to the area division result, and obtaining area characteristic data of each training area.
Optionally, the training geographic topology data includes nodes and edges.
The regional characteristic data can be node characteristics, in practical application, a target region can be regarded as a node according to a regional division result, adjacent target regions are regarded as time edges, the regional characteristic data is node characteristic data, and in a driver scheduling scene, the regional characteristic data can be the supply and demand ratio of the target region within the past 24 hours.
In an alternative embodiment, the determining the training geographic topology data corresponding to the training geographic area according to the area division result includes: and taking each training area as a training node in the second topological graph, and taking the adjacent training areas as training edges in the second topological graph to acquire the training geographic topological data.
The training geographic topology data refers to training nodes and training edges.
In an alternative embodiment, the acquiring the region feature data of each training region includes: and acquiring the service characteristic value of each training area in the history period to serve as area characteristic data of each training area.
Wherein the service characteristic value is a characteristic value related to the downstream service.
The historical time period may be set in advance by a technician and the service characteristic value may be set according to the downstream service.
In one possible implementation, the service feature value of each training area in the history period may be obtained through historical data, for example, in a driver scheduling scenario, the supply-demand ratio of each training area in the past 24 hours may be obtained through historical data, where the past 24 hours corresponds to the history period and the supply-demand ratio corresponds to the service feature value.
Step 802, taking the training geographic topology data and the regional characteristic data of each training region as the training geographic characteristic data.
As described above, the training nodes, training edges, and node characteristic data of each training area are used as training geographic characteristic data.
In one embodiment, as shown in fig. 9, the candidate fence dividing model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model, and the training of the candidate fence dividing model according to the training geographic feature data and the reinforcement learning algorithm includes the following steps:
step 901, inputting the training geographic feature data into the candidate graph neural network model to obtain node features of each training node output by the candidate graph neural network model.
Alternatively, the candidate graph neural network model may be GNN and the candidate reinforcement learning algorithm model may be DQN.
The node characteristics of the training node may be the training node vector representation, e.g., an M-dimensional vector of the training node.
In one possible implementation, training nodes, training edges, and region feature data may be input into the GNN, and the GNN model parameters perform model reasoning based on the data, outputting node features for each training node.
Step 902, inputting node characteristics of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm, thereby obtaining rewards.
In one possible implementation, before the node characteristics of each training node are input to the DQN, the DQN has an initial state, after the node characteristics of each training node are input to the DQN and a reinforcement learning algorithm is performed, the initial state of the DQN is changed to generate a first state, an initial ACF value can be calculated by the initial state, a first ACF value can be obtained by the first state, and a difference value between the initial ACF value and the first ACF value is the reward.
And 903, adjusting model parameters of the candidate graph neural network model and model parameters of the candidate reinforcement learning algorithm model according to the obtained rewards.
In one possible implementation, the technician may preset an iteration step number, that is, the first output of the DQN will be used as the second input of the CNN, the second output of the CNN will be used as the second input of the DQN, the second output of the DQN will be used as the third input of the CNN, iterating until the iteration step number preset by the technician is reached, and after each iteration, a reward may be calculated, and then the model parameters of the candidate graph neural network model and the model parameters of the candidate reinforcement learning algorithm model are adjusted according to the reward.
In one embodiment, as shown in fig. 10, the node characteristics of each training node are input to the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm for rewarding, comprising the steps of:
step 1001, inputting the node characteristics of each training node to the candidate reinforcement learning algorithm model, so as to obtain a first state of the candidate reinforcement learning algorithm model according to the node characteristics of each training node.
In an alternative embodiment, the states of the candidate reinforcement learning algorithm model include: statistics of node characteristics of training nodes contained within each of a plurality of candidate geofences.
In one possible implementation, in combination with the foregoing, in the candidate reinforcement learning algorithm model, it may be assumed that N geofences exist, where State of a fence is an average of vector representations of all nodes in the fence, that is, if two training nodes exist in a certain fence, training node a and training node B, then State of the fence is an average of training node characteristics of the training node a and training node characteristics of the training node B, the State is State, and the states may be divided into two types, for example, there are a plurality of geofences, but training nodes are not yet allocated to the plurality of geofences, at this time, the State of each fence is 0, and there are a plurality of geofences, and the training nodes are randomly allocated to each geofence, at this time, the average of node characteristics of the training nodes in each fence is the State of each fence, and the State of the candidate reinforcement learning algorithm model is a set of states of the respective fence.
Step 1002, executing an action based on the first state, and obtaining a second state of the candidate reinforcement learning algorithm model after executing the action.
In an alternative embodiment, the performing an action based on the first state includes: partitioning the training nodes not geofenced to candidate geofences based on the first state; alternatively, the training nodes that have been geofenced are partitioned from the candidate geofence currently in place to another candidate geofence based on the first state.
As described above, if the first state is a candidate geofence in which the training node has not been divided, the dividing action is performed, and if the first state is a candidate geofence in which the training node has been divided randomly, the adjusting action is performed, that is, the training node in which the geofence division has been performed is divided from the candidate geofence in which the training node is currently located to another candidate geofence, and after the dividing action or the adjusting action is performed, the state of the candidate reinforcement learning algorithm model is the second state.
Step 1003, obtaining rewards according to the first state and the second state.
In one possible implementation, a first ACF value may be calculated based on a first state and then a second ACF value may be calculated based on a second state, where the difference between the first ACF value and the second ACF value is the reward.
In one embodiment, as shown in FIG. 11, a geofence partitioning method is provided, the method comprising the steps of:
step 1101, obtaining target geographic information of the target geographic area.
Step 1102, dividing the target geographic area into a plurality of target areas according to the target geographic information, and using each target area as a target node in a first topological graph, and using the adjacent target area as a target edge in the first topological graph to acquire the target geographic topological data.
And step 1103, acquiring service characteristic values of the target areas in the history period as area characteristic data of the target areas.
Step 1104, using the target geographic topology data and the regional characteristic data of each target region as the target geographic characteristic data.
Step 1105, inputting the target geographic feature data into the target graph neural network model to obtain node features of each target node output by the target graph neural network model.
Step 1106, inputting the node characteristics of each target node into the target reinforcement learning algorithm model, so as to obtain an initial state of the target reinforcement learning algorithm model according to the node characteristics of each target node.
Step 1107, obtaining the output of the target reinforcement learning algorithm model according to the initial state of the target reinforcement learning algorithm model.
Step 1108, obtaining a geofence division result of the target geographic area according to the output of the target reinforcement learning algorithm model.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a geofence dividing device for realizing the geofence dividing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitations in one or more embodiments of the geofence dividing device provided below can be referred to above for limitations of the geofence dividing method, and will not be described in detail herein.
In one embodiment, as shown in FIG. 12, there is provided a geofence dividing apparatus 1200 comprising: an acquisition module 1201 and an execution module 1202, wherein:
an obtaining module 1201 is configured to obtain target geographic feature data of a target geographic area.
An execution module 1202 for inputting the target geographic feature data into a pre-trained target fence classification model, and obtaining a geofence classification result of the target geographic region according to the output of the target fence classification model; the target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business.
In one embodiment, the obtaining module 1201 is specifically configured to: acquiring target geographic information of the target geographic area; dividing the target geographic area into a plurality of target areas according to the target geographic information, and determining the target geographic feature data according to the area division result.
In one embodiment, the obtaining module 1201 is specifically configured to: determining target geographic topology data corresponding to the target geographic area according to the area division result, and acquiring area characteristic data of each target area; and taking the target geographic topology data and the regional characteristic data of each target region as the target geographic characteristic data.
In one embodiment, the obtaining module 1201 is specifically configured to: and taking each target area as a target node in the first topological graph, and taking the adjacent target area as a target edge in the first topological graph to acquire the target geographic topological data.
In one embodiment, the obtaining module 1201 is specifically configured to: acquiring service characteristic values of each target area in a history period to serve as area characteristic data of each target area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the execution module 1202 is specifically configured to: inputting the target geographic feature data into the target graph neural network model to obtain node features of each target node output by the target graph neural network model; and inputting the node characteristics of each target node into the target reinforcement learning algorithm model, and acquiring a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, the execution module 1202 is specifically configured to: inputting the node characteristics of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model according to the node characteristics of each target node; obtaining the output of the target reinforcement learning algorithm model according to the initial state of the target reinforcement learning algorithm model; and obtaining a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, as shown in FIG. 13, another geofence apparatus 1300 is provided, the geofence apparatus 1300 including a training module 1203 in addition to the modules included in the geofence apparatus 1200.
In one embodiment, the training module 1203 is configured to: acquiring training data, wherein the training data comprises training geographic feature data of a training geographic area; training the candidate fence dividing model according to the training geographic characteristic data and the reinforcement learning algorithm to obtain the target fence dividing model; wherein the reward of the reinforcement learning algorithm is derived based on the target parameter.
In one embodiment, the training module 1203 is specifically configured to: acquiring training geographic information of the training geographic area; dividing the training geographic area into a plurality of training areas according to the training geographic information, and determining the training geographic feature data according to the area division result.
In one embodiment, the training module 1203 is specifically configured to: determining training geographic topology data corresponding to the training geographic areas according to the area division results, and acquiring area characteristic data of each training area; and taking the training geographic topology data and the regional characteristic data of each training region as the training geographic characteristic data.
In one embodiment, the training module 1203 is specifically configured to: and taking each training area as a training node in the second topological graph, and taking the adjacent training areas as training edges in the second topological graph to acquire the training geographic topological data.
In one embodiment, the training module 1203 is specifically configured to: acquiring service characteristic values of each training area in a history period to serve as area characteristic data of each training area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the training module 1203 is specifically configured to: inputting the training geographic feature data into the candidate graph neural network model to obtain node features of each training node output by the candidate graph neural network model; inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm so as to obtain rewards; and adjusting the model parameters of the candidate graph neural network model and the model parameters of the candidate reinforcement learning algorithm model according to the obtained rewards.
In one embodiment, the training module 1203 is specifically configured to: inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model according to the node characteristics of each training node; executing an action based on the first state, and acquiring a second state of the candidate reinforcement learning algorithm model after the action is executed; and obtaining rewards according to the first state and the second state.
In one embodiment, the states of the candidate reinforcement learning algorithm model include: statistics of node characteristics of training nodes contained within each of a plurality of candidate geofences.
In one embodiment, the training module 1203 is specifically configured to: partitioning the training nodes not geofenced to candidate geofences based on the first state; alternatively, the training nodes that have been geofenced are partitioned from the candidate geofence currently in place to another candidate geofence based on the first state.
The various modules in the geofence apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 14. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a geofence partitioning method.
It will be appreciated by those skilled in the art that the structure shown in fig. 14 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: acquiring target geographic feature data of a target geographic area; inputting the target geographic characteristic data into a pre-trained target fence dividing model, and acquiring a geographic fence dividing result of the target geographic area according to the output of the target fence dividing model; the target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business.
In one embodiment, the acquiring the target geographic characteristic data of the target geographic area, the processor when executing the computer program, implements the steps of: acquiring target geographic information of the target geographic area; dividing the target geographic area into a plurality of target areas according to the target geographic information, and determining the target geographic feature data according to the area division result.
In one embodiment, the determining the target geographic feature data based on the region division results, the processor when executing the computer program performs the steps of: determining target geographic topology data corresponding to the target geographic area according to the area division result, and acquiring area characteristic data of each target area; and taking the target geographic topology data and the regional characteristic data of each target region as the target geographic characteristic data.
In one embodiment, the determining the target geographic topology data corresponding to the target geographic area according to the regional division result, the processor when executing the computer program implements the following steps: and taking each target area as a target node in the first topological graph, and taking the adjacent target area as a target edge in the first topological graph to acquire the target geographic topological data.
In one embodiment, the acquiring the region characteristic data of each target region, the processor when executing the computer program implements the steps of: acquiring service characteristic values of each target area in a history period to serve as area characteristic data of each target area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the target fence dividing model includes a cascaded target graph neural network model and a target reinforcement learning algorithm model, the target geographic feature data is input into a pre-trained target fence dividing model, and a geofence dividing result of the target geographic region is obtained according to output of the target fence dividing model, and the processor implements the following steps when executing the computer program: inputting the target geographic feature data into the target graph neural network model to obtain node features of each target node output by the target graph neural network model; and inputting the node characteristics of each target node into the target reinforcement learning algorithm model, and acquiring a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, the node characteristics of each target node are input into the target reinforcement learning algorithm model, and the geofence dividing result of the target geographic area is obtained according to the output of the target reinforcement learning algorithm model, and the processor when executing the computer program realizes the following steps: inputting the node characteristics of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model according to the node characteristics of each target node; obtaining the output of the target reinforcement learning algorithm model according to the initial state of the target reinforcement learning algorithm model; and obtaining a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, the training method of the object fence dividing model, the processor when executing the computer program realizes the following steps: acquiring training data, wherein the training data comprises training geographic feature data of a training geographic area; training the candidate fence dividing model according to the training geographic characteristic data and the reinforcement learning algorithm to obtain the target fence dividing model; wherein the reward of the reinforcement learning algorithm is derived based on the target parameter.
In one embodiment, the acquiring training data, the processor when executing the computer program, implements the steps of: acquiring training geographic information of the training geographic area; dividing the training geographic area into a plurality of training areas according to the training geographic information, and determining the training geographic feature data according to the area division result.
In one embodiment, the training geographic feature data is determined based on the region division results, and the processor when executing the computer program performs the steps of: determining training geographic topology data corresponding to the training geographic areas according to the area division results, and acquiring area characteristic data of each training area; and taking the training geographic topology data and the regional characteristic data of each training region as the training geographic characteristic data.
In one embodiment, the determining training geographic topology data corresponding to the training geographic area according to the regional division result, the processor when executing the computer program implements the following steps: and taking each training area as a training node in the second topological graph, and taking the adjacent training areas as training edges in the second topological graph to acquire the training geographic topological data.
In one embodiment, the acquiring the region feature data of each training region, the processor when executing the computer program implements the steps of: acquiring service characteristic values of each training area in a history period to serve as area characteristic data of each training area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the candidate fence dividing model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model, the candidate fence dividing model being trained according to the training geographic feature data and the reinforcement learning algorithm, the processor implementing the following steps when executing the computer program: inputting the training geographic feature data into the candidate graph neural network model to obtain node features of each training node output by the candidate graph neural network model; inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm so as to obtain rewards; and adjusting the model parameters of the candidate graph neural network model and the model parameters of the candidate reinforcement learning algorithm model according to the obtained rewards.
In one embodiment, the node characteristics of each training node are input to the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm for rewarding, and the processor when executing the computer program implements the steps of: inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model according to the node characteristics of each training node; executing an action based on the first state, and acquiring a second state of the candidate reinforcement learning algorithm model after the action is executed; and obtaining rewards according to the first state and the second state.
In one embodiment, the states of the candidate reinforcement learning algorithm model include: statistics of node characteristics of training nodes contained within each of a plurality of candidate geofences.
In one embodiment, the act of performing the first state based on the processor, when executing the computer program, performs the steps of: partitioning the training nodes not geofenced to candidate geofences based on the first state; alternatively, the training nodes that have been geofenced are partitioned from the candidate geofence currently in place to another candidate geofence based on the first state.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs any of the steps of: acquiring target geographic feature data of a target geographic area; inputting the target geographic characteristic data into a pre-trained target fence dividing model, and acquiring a geographic fence dividing result of the target geographic area according to the output of the target fence dividing model; the target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business.
In one embodiment, the acquiring the target geographic characteristic data of the target geographic area, the computer program when executed by the processor further performs the steps of: acquiring target geographic information of the target geographic area; dividing the target geographic area into a plurality of target areas according to the target geographic information, and determining the target geographic feature data according to the area division result.
In one embodiment, the determining the target geographic feature data based on the region division results, the computer program when executed by the processor further performs the steps of: determining target geographic topology data corresponding to the target geographic area according to the area division result, and acquiring area characteristic data of each target area; and taking the target geographic topology data and the regional characteristic data of each target region as the target geographic characteristic data.
In one embodiment, the determining the target geographic topology data corresponding to the target geographic area according to the regional division result, the computer program when executed by the processor further implements the steps of: and taking each target area as a target node in the first topological graph, and taking the adjacent target area as a target edge in the first topological graph to acquire the target geographic topological data.
In one embodiment, the acquiring the region characteristic data of each of the target regions, the computer program when executed by the processor further performs the steps of: acquiring service characteristic values of each target area in a history period to serve as area characteristic data of each target area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the target fence dividing model includes a cascaded target graph neural network model and a target reinforcement learning algorithm model, the target geographic feature data is input into a pre-trained target fence dividing model, and a geofence dividing result of the target geographic region is obtained according to output of the target fence dividing model, and the computer program when executed by the processor further realizes the following steps: inputting the target geographic feature data into the target graph neural network model to obtain node features of each target node output by the target graph neural network model; and inputting the node characteristics of each target node into the target reinforcement learning algorithm model, and acquiring a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, the node characteristics of each target node are input into the target reinforcement learning algorithm model, and the geofence dividing result of the target geographic area is obtained according to the output of the target reinforcement learning algorithm model, and the computer program when executed by the processor further realizes the following steps: inputting the node characteristics of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model according to the node characteristics of each target node; obtaining the output of the target reinforcement learning algorithm model according to the initial state of the target reinforcement learning algorithm model; and obtaining a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
In one embodiment, the training method of the object fence dividing model, when the computer program is executed by the processor, further realizes the following steps: acquiring training data, wherein the training data comprises training geographic feature data of a training geographic area; training the candidate fence dividing model according to the training geographic characteristic data and the reinforcement learning algorithm to obtain the target fence dividing model; wherein the reward of the reinforcement learning algorithm is derived based on the target parameter.
In one embodiment, the acquiring training data, the computer program when executed by the processor, further performs the steps of: acquiring training geographic information of the training geographic area; dividing the training geographic area into a plurality of training areas according to the training geographic information, and determining the training geographic feature data according to the area division result.
In one embodiment, the determining the training geographic feature data based on the region division results, the computer program when executed by the processor further performs the steps of: determining training geographic topology data corresponding to the training geographic areas according to the area division results, and acquiring area characteristic data of each training area; and taking the training geographic topology data and the regional characteristic data of each training region as the training geographic characteristic data.
In one embodiment, the determining the training geographic topology data corresponding to the training geographic area according to the regional division result, the computer program when executed by the processor further implements the steps of: and taking each training area as a training node in the second topological graph, and taking the adjacent training areas as training edges in the second topological graph to acquire the training geographic topological data.
In one embodiment, the acquiring the region characteristic data of each training region, the computer program when executed by the processor further performs the steps of: acquiring service characteristic values of each training area in a history period to serve as area characteristic data of each training area; wherein the service characteristic value is a characteristic value related to the downstream service.
In one embodiment, the candidate fence dividing model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model, the candidate fence dividing model is trained according to the training geographic feature data and the reinforcement learning algorithm, and the computer program when executed by the processor further implements the steps of: inputting the training geographic feature data into the candidate graph neural network model to obtain node features of each training node output by the candidate graph neural network model; inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm so as to obtain rewards; and adjusting the model parameters of the candidate graph neural network model and the model parameters of the candidate reinforcement learning algorithm model according to the obtained rewards.
In one embodiment, the node characteristics of each of the training nodes are input to the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm for rewarding, and the computer program when executed by the processor further performs the steps of: inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model according to the node characteristics of each training node; executing an action based on the first state, and acquiring a second state of the candidate reinforcement learning algorithm model after the action is executed; and obtaining rewards according to the first state and the second state.
In one embodiment, the states of the candidate reinforcement learning algorithm model include: statistics of node characteristics of training nodes contained within each of a plurality of candidate geofences.
In one embodiment, the performing an action based on the first state, when executed by the processor, further performs the steps of: partitioning the training nodes not geofenced to candidate geofences based on the first state; alternatively, the training nodes that have been geofenced are partitioned from the candidate geofence currently in place to another candidate geofence based on the first state.
In one embodiment, a computer program product is provided. The computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as Static Random access memory (Static Random access memory AccessMemory, SRAM) or dynamic Random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (20)

1. A geofence dividing method, the method comprising:
acquiring target geographic feature data of a target geographic area;
inputting the target geographic feature data into a pre-trained target fence dividing model, and acquiring a geographic fence dividing result of the target geographic region according to output of the target fence dividing model;
the target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business.
2. The method of claim 1, wherein the obtaining target geographic feature data for a target geographic area comprises:
acquiring target geographic information of the target geographic area;
dividing the target geographic area into a plurality of target areas according to the target geographic information, and determining the target geographic feature data according to an area division result.
3. The method of claim 2, wherein determining the target geographic feature data based on the region division results comprises:
determining target geographic topology data corresponding to the target geographic areas according to the area division result, and acquiring area characteristic data of each target area;
and taking the target geographic topology data and the regional characteristic data of each target region as the target geographic characteristic data.
4. The method according to claim 3, wherein determining the target geographic topology data corresponding to the target geographic area according to the area division result includes:
and taking each target area as a target node in a first topological graph, and taking the adjacent target areas as target edges in the first topological graph to acquire the target geographic topological data.
5. A method according to claim 3, wherein said obtaining region characteristic data for each of said target regions comprises:
acquiring service characteristic values of each target area in a history period to serve as area characteristic data of each target area;
wherein the service characteristic value is a characteristic value related to the downstream service.
6. The method of claim 1, wherein the target geofence classification model comprises a cascaded target graph neural network model and a target reinforcement learning algorithm model, the inputting the target geographic feature data into a pre-trained target geofence classification model, and obtaining geofence classification results for the target geographic region from an output of the target geofence classification model, comprising:
inputting the target geographic feature data into the target graph neural network model to obtain node features of each target node output by the target graph neural network model;
and inputting the node characteristics of each target node into the target reinforcement learning algorithm model, and acquiring a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
7. The method of claim 6, wherein inputting the node characteristics of each of the target nodes into the target reinforcement learning algorithm model and obtaining the geofence partitioning result for the target geographic area based on the output of the target reinforcement learning algorithm model comprises:
inputting the node characteristics of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model according to the node characteristics of each target node;
obtaining the output of the target reinforcement learning algorithm model according to the initial state of the target reinforcement learning algorithm model;
and obtaining a geofence dividing result of the target geographic area according to the output of the target reinforcement learning algorithm model.
8. The method of claim 1, wherein the training method of the target fence partitioning model comprises:
acquiring training data, wherein the training data comprises training geographic feature data of a training geographic area;
training the candidate fence dividing model according to the training geographic characteristic data and the reinforcement learning algorithm to obtain the target fence dividing model;
Wherein, rewards of the reinforcement learning algorithm are obtained according to the target parameters.
9. The method of claim 8, wherein the acquiring training data comprises:
acquiring training geographic information of the training geographic area;
dividing the training geographic area into a plurality of training areas according to the training geographic information, and determining the training geographic feature data according to the area division result.
10. The method of claim 9, wherein said determining said training geographic feature data based on regional division results comprises:
determining training geographic topology data corresponding to the training geographic areas according to the area division result, and acquiring area characteristic data of each training area;
and taking the training geographic topology data and the regional characteristic data of each training region as the training geographic characteristic data.
11. The method of claim 10, wherein determining training geographic topology data corresponding to the training geographic area based on the region division result comprises:
and taking each training area as a training node in a second topological graph, and taking the adjacent training areas as training edges in the second topological graph to acquire the training geographic topological data.
12. The method of claim 10, wherein the acquiring the region feature data for each of the training regions comprises:
acquiring service characteristic values of the training areas in a history period to serve as area characteristic data of the training areas;
wherein the service characteristic value is a characteristic value related to the downstream service.
13. The method of claim 11, wherein the candidate fence partitioning model comprises a candidate graph neural network model and a candidate reinforcement learning algorithm model, the training the candidate fence partitioning model according to the training geographic feature data and reinforcement learning algorithm comprising:
inputting the training geographic feature data into the candidate graph neural network model to obtain node features of the training nodes output by the candidate graph neural network model;
inputting node characteristics of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm so as to obtain rewards;
and adjusting the model parameters of the candidate graph neural network model and the model parameters of the candidate reinforcement learning algorithm model according to the obtained rewards.
14. The method of claim 13, wherein said inputting node characteristics of each of said training nodes into said candidate reinforcement learning algorithm model to execute said reinforcement learning algorithm for rewarding, comprising:
inputting the node characteristics of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model according to the node characteristics of each training node;
executing an action based on the first state, and acquiring a second state of the candidate reinforcement learning algorithm model after the action is executed;
and obtaining rewards according to the first state and the second state.
15. The method of claim 14, wherein the state of the candidate reinforcement learning algorithm model comprises: statistics of node characteristics of training nodes contained within each of a plurality of candidate geofences.
16. The method of claim 14, wherein the performing an action based on the first state comprises:
partitioning training nodes not geofenced to candidate geofences based on the first state; or alternatively, the process may be performed,
The training nodes that have been geofenced are partitioned from the candidate geofence currently in place to another candidate geofence based on the first status.
17. A geofence dividing apparatus, the apparatus comprising:
the acquisition module is used for acquiring target geographic characteristic data of a target geographic area;
the execution module is used for inputting the target geographic characteristic data into a pre-trained target fence dividing model and acquiring a geographic fence dividing result of the target geographic area according to the output of the target fence dividing model;
the target fence dividing model is trained according to target parameters, and the target parameters are used for representing the execution quality of downstream business of the geofence dividing business.
18. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 16 when the computer program is executed.
19. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 16.
20. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 16.
CN202310318869.XA 2023-03-29 2023-03-29 Geofence partitioning method, device, computer equipment and storage medium Pending CN116030079A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310318869.XA CN116030079A (en) 2023-03-29 2023-03-29 Geofence partitioning method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310318869.XA CN116030079A (en) 2023-03-29 2023-03-29 Geofence partitioning method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116030079A true CN116030079A (en) 2023-04-28

Family

ID=86074445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310318869.XA Pending CN116030079A (en) 2023-03-29 2023-03-29 Geofence partitioning method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116030079A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150088792A1 (en) * 2013-09-25 2015-03-26 Google Inc. Learning Geofence Models Directly
CN110674834A (en) * 2018-07-03 2020-01-10 百度在线网络技术(北京)有限公司 Geo-fence identification method, device, equipment and computer-readable storage medium
CN110765219A (en) * 2019-08-05 2020-02-07 上海晶赞融宣科技有限公司 Geo-fence generation method and device, computer equipment and storage medium
CN111680730A (en) * 2020-06-01 2020-09-18 中国第一汽车股份有限公司 Method and device for generating geographic fence, computer equipment and storage medium
CN112261584A (en) * 2020-10-13 2021-01-22 恒大新能源汽车投资控股集团有限公司 Geographic fence determination method and device and electronic equipment
CN112686727A (en) * 2020-12-31 2021-04-20 北京三快在线科技有限公司 Order processing method and device based on scene, storage medium and electronic equipment
WO2021248607A1 (en) * 2020-06-10 2021-12-16 深圳大学 Deep reinforcement learning-based taxi dispatching method and system
US20220124543A1 (en) * 2021-06-30 2022-04-21 Oner Orhan Graph neural network and reinforcement learning techniques for connection management
US11373062B1 (en) * 2021-01-29 2022-06-28 EMC IP Holding Company LLC Model training method, data processing method, electronic device, and program product
CN114943407A (en) * 2022-04-02 2022-08-26 北京三快在线科技有限公司 Area planning method, device, equipment, readable storage medium and program product

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150088792A1 (en) * 2013-09-25 2015-03-26 Google Inc. Learning Geofence Models Directly
CN110674834A (en) * 2018-07-03 2020-01-10 百度在线网络技术(北京)有限公司 Geo-fence identification method, device, equipment and computer-readable storage medium
CN110765219A (en) * 2019-08-05 2020-02-07 上海晶赞融宣科技有限公司 Geo-fence generation method and device, computer equipment and storage medium
CN111680730A (en) * 2020-06-01 2020-09-18 中国第一汽车股份有限公司 Method and device for generating geographic fence, computer equipment and storage medium
WO2021248607A1 (en) * 2020-06-10 2021-12-16 深圳大学 Deep reinforcement learning-based taxi dispatching method and system
CN112261584A (en) * 2020-10-13 2021-01-22 恒大新能源汽车投资控股集团有限公司 Geographic fence determination method and device and electronic equipment
CN112686727A (en) * 2020-12-31 2021-04-20 北京三快在线科技有限公司 Order processing method and device based on scene, storage medium and electronic equipment
US11373062B1 (en) * 2021-01-29 2022-06-28 EMC IP Holding Company LLC Model training method, data processing method, electronic device, and program product
US20220124543A1 (en) * 2021-06-30 2022-04-21 Oner Orhan Graph neural network and reinforcement learning techniques for connection management
CN114943407A (en) * 2022-04-02 2022-08-26 北京三快在线科技有限公司 Area planning method, device, equipment, readable storage medium and program product

Similar Documents

Publication Publication Date Title
CN110765320B (en) Data processing method, device, storage medium and computer equipment
CN110245980B (en) Method and equipment for determining target user excitation form based on neural network model
US20210312295A1 (en) Information processing method, information processing device, and information processing program
CN109976901A (en) A kind of resource regulating method, device, server and readable storage medium storing program for executing
CN113572697A (en) Load balancing method based on graph convolution neural network and deep reinforcement learning
Štula et al. Continuously self-adjusting fuzzy cognitive map with semi-autonomous concepts
CN116542296A (en) Model training method and device based on federal learning and electronic equipment
CN114116705A (en) Method and device for determining contribution value of participants in joint learning
Alahakoon Controlling the spread of dynamic self organising maps
CN113347249A (en) Operation loading method, device and equipment
CN116030079A (en) Geofence partitioning method, device, computer equipment and storage medium
Guo et al. Dynamic modification neural network model for short-term traffic prediction
CN117215789A (en) Resource allocation method and device for data processing task and computer equipment
CN117057445A (en) Model optimization method, system and device based on federal learning framework
CN111539517A (en) Graph convolution neural network generation method based on graph structure matrix characteristic vector
Foroni et al. Adaptive and statistical expectations in a renewable resource market
CN113609785B (en) Federal learning super-parameter selection system and method based on Bayesian optimization
CN110210885A (en) Excavate method, apparatus, equipment and the readable storage medium storing program for executing of potential customers
CN114298319A (en) Method and device for determining joint learning contribution value, electronic equipment and storage medium
Mendelssohn A systematic approach to determining mean-variance tradeoffs when managing randomly varying populations
CN114116740A (en) Method and device for determining contribution degree of participants in joint learning
CN116739077B (en) Multi-agent deep reinforcement learning method and device based on course learning
CN111027709A (en) Information recommendation method and device, server and storage medium
CN116614830B (en) Network element optimization method, device, computer equipment and storage medium
CN112953845B (en) Distributed system flow control method and device

Legal Events

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