Geofence division method and device, computer device and storage medium

CN116030079BActive Publication Date: 2026-10-27BEIJING DIDI INFINITY TECH & DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310318869.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2026-10-27
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

[0004]然而,由于目前采用k-means方法或DBSCAN方法实现地理围栏划分任务的准确性较低,进而使得地理围栏划分的效果较差

Benefits of technology

[0041]上述地理围栏划分方法、装置、计算机设备和存储介质,先获取目标地理区域的目标地理特征数据,再将该目标地理特征数据输入至预先训练的目标围栏划分模型中,并根据该目标围栏划分模型的输出获取该目标地理区域的地理围栏划分结果,其中,该目标围栏划分模型是根据目标参数进行训练的,该目标参数用于表征地理围栏划分业务的下游业务的执行优劣程度,本申请提供的地理围栏划分方法,将目标地理区域的目标地理特征数据输入至目标围栏划分模型中,以使得目标围栏模型可以输出目标地理区域的地理围栏划分结果,由于该目标围栏划分模型是根据目标参数进行训练的,且该目标参数用于表征地理围栏划分业务的下游业务的执行优劣程度,也即是本申请提供的地理围栏划分方法是基于下游业务划分的,所以划分的结果更加准确,采用本申请提供的地理围栏划分方法可以有效的提高地理围栏划分的效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116030079B_ABST
    Figure CN116030079B_ABST
Patent Text Reader

Abstract

The application relates to a geographic fence division method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining target geographic feature data of a target geographic area; inputting the target geographic feature data into a pre-trained target fence division model, and obtaining a geographic fence division result of the target geographic area according to the output of the target fence division model; wherein the target fence division model is trained according to target parameters, and the target parameters are used to represent the execution degree of a downstream service of a geographic fence division service. The method can effectively improve the effect of geographic fence division.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a geofencing method, apparatus, computer equipment, and storage medium. Background Technology

[0002] A geofence is a virtual boundary, similar to a fence, used to represent the extent of each geographical area after a city or region has been divided according to requirements. In some projects, geofences can provide important information for downstream tasks.

[0003] In existing technologies, the k-means method or DBSCAN method is usually used to achieve the above-mentioned geofencing task.

[0004] However, the accuracy of current k-means or DBSCAN methods for geofencing is low, resulting in poor geofencing performance. Summary of the Invention

[0005] Therefore, it is necessary to provide a geofencing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can target downstream tasks to address the above-mentioned technical problems. Using this method, the geofencing effect can be effectively improved.

[0006] Firstly, this application provides a method for geofencing. The method includes: Obtain target geographic feature data for the target geographic region; input the target geographic feature data into a pre-trained target fence partitioning model, and obtain the geofencing result for the target geographic region based on the output of the target fence partitioning model; wherein, the target fence partitioning model is trained based on target parameters, which are used to characterize the performance of downstream services in the geofencing business.

[0007] In one embodiment, obtaining target geographic feature data of a target geographic region includes: obtaining target geographic information of the target geographic region; dividing the target geographic region into multiple target regions based on the target geographic information; and determining the target geographic feature data based on the region division results.

[0008] In one embodiment, determining the target geographic feature data based on the regional division results includes: determining the target geographic topology data corresponding to the target geographic region based on the regional division results, and obtaining the regional feature data of each target region; and using the target geographic topology data and the regional feature data of each target region as the target geographic feature data.

[0009] In one embodiment, determining the target geographic topology data corresponding to the target geographic region based on the region division result includes: taking each target region as a target node in a first topology graph and taking adjacent target regions as target edges in the first topology graph to obtain the target geographic topology data.

[0010] In one embodiment, obtaining the regional feature data of each target region includes: obtaining the business feature values ​​of each target region within a historical time period as the regional feature data of each target region; wherein the business feature values ​​are feature values ​​related to the downstream business.

[0011] In one embodiment, the target fence partitioning model includes a cascaded target graph neural network model and a target reinforcement learning algorithm model. The target geographic feature data is input into the pre-trained target fence partitioning model, and the geofencing result of the target geographic region is obtained based on the output of the target fence partitioning model. This includes: inputting the target geographic feature data into the target graph neural network model to obtain the node features of each target node output by the target graph neural network model; inputting the node features of each target node into the target reinforcement learning algorithm model, and obtaining the geofencing result of the target geographic region based on the output of the target reinforcement learning algorithm model.

[0012] In one embodiment, the node features of each target node are input into the target reinforcement learning algorithm model, and the geofencing result of the target geographical region is obtained based on the output of the target reinforcement learning algorithm model. This includes: inputting the node features of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model based on the node features of each target node; obtaining the output of the target reinforcement learning algorithm model based on the initial state of the target reinforcement learning algorithm model; and obtaining the geofencing result of the target geographical region based on the output of the target reinforcement learning algorithm model.

[0013] In one embodiment, the training method for the target fence partitioning model includes: acquiring training data, which includes training geographic feature data of a training geographic region; training a candidate fence partitioning model based on the training geographic feature data and a reinforcement learning algorithm to obtain the target fence partitioning model; wherein the reward of the reinforcement learning algorithm is obtained based on the target parameters.

[0014] In one embodiment, acquiring training data includes: acquiring training geographic information of the training geographic region; dividing the training geographic region into multiple training regions based on the training geographic information; and determining the training geographic feature data based on the region division results.

[0015] In one embodiment, determining the training geographic feature data based on the region division result includes: determining the training geographic topology data corresponding to the training geographic region based on the region division result, and obtaining the regional feature data of each training region; and using the training geographic topology data and the regional feature data of each training region as the training geographic feature data.

[0016] In one embodiment, determining the training geographic topology data corresponding to the training geographic region based on the region division result includes: using each training region as a training node in the second topology graph and using adjacent training regions as training edges in the second topology graph to obtain the training geographic topology data.

[0017] In one embodiment, obtaining the regional feature data of each training region includes: obtaining the business feature values ​​of each training region within a historical time period as the regional feature data of each training region; wherein the business feature values ​​are feature values ​​related to the downstream business.

[0018] In one embodiment, the candidate fence partitioning model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model. Training the candidate fence partitioning model based on 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 the node features of each training node output by the candidate graph neural network model; inputting the node features of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward; and adjusting the model parameters of the candidate graph neural network model and the candidate reinforcement learning algorithm model based on the obtained reward.

[0019] In one embodiment, inputting the node features of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward includes: inputting the node features of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model based on the node features of each training node; executing an action based on the first state and obtaining a second state of the candidate reinforcement learning algorithm model after the action is executed; and obtaining a reward based on the first state and the second state.

[0020] In one embodiment, the state of the candidate reinforcement learning algorithm model includes: statistical information on the node features of the training nodes contained within each of the multiple candidate geofences.

[0021] In one embodiment, the action based on the first state includes: assigning training nodes that have not been geofenced to candidate geofences based on the first state; or, assigning training nodes that have been geofenced to another candidate geofence based on the first state.

[0022] Secondly, this application also provides a geofencing device. The device includes: The acquisition module is used to acquire target geographic feature data of the target geographic area; The execution module is used to input the target geographic feature data into a pre-trained target fence partitioning model, and obtain the geofencing result of the target geographic area based on the output of the target fence partitioning model; wherein, the target fence partitioning model is trained based on target parameters, which are used to characterize the execution quality of downstream services of geofencing business.

[0023] In one embodiment, the acquisition module is specifically used to: acquire target geographic information of the target geographic region; divide the target geographic region into multiple target regions based on the target geographic information; and determine the target geographic feature data based on the region division results.

[0024] In one embodiment, the acquisition module is specifically used to: determine the target geographic topology data corresponding to the target geographic region based on the regional division result, and acquire the regional feature data of each target region; and use the target geographic topology data and the regional feature data of each target region as the target geographic feature data.

[0025] In one embodiment, the acquisition module is specifically used to: treat each target region as a target node in a first topology graph and treat adjacent target regions as target edges in the first topology graph, so as to acquire the target geographic topology data.

[0026] In one embodiment, the acquisition module is specifically used to: acquire the business characteristic values ​​of each target region within a historical time period, as regional characteristic data of each target region; wherein the business characteristic values ​​are characteristic values ​​related to the downstream business.

[0027] In one embodiment, the execution module is specifically used to: input the target geographic feature data into the target graph neural network model to obtain the node features of each target node output by the target graph neural network model; input the node features of each target node into the target reinforcement learning algorithm model, and obtain the geofencing result of the target geographic area based on the output of the target reinforcement learning algorithm model.

[0028] In one embodiment, the execution module is specifically configured to: input the node features of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model based on the node features of each target node; obtain the output of the target reinforcement learning algorithm model based on the initial state of the target reinforcement learning algorithm model; and obtain the geofencing result of the target geographical region based on the output of the target reinforcement learning algorithm model.

[0029] In one embodiment, the geofencing device further includes a training module, which is configured to: acquire training data, including training geographic feature data of the training geographic region; train the candidate geofencing model based on the training geographic feature data and a reinforcement learning algorithm to obtain the target geofencing model; wherein the reward of the reinforcement learning algorithm is obtained based on the target parameters.

[0030] In one embodiment, the training module is specifically used to: acquire training geographic information of the training geographic region; divide the training geographic region into multiple training regions based on the training geographic information; and determine the training geographic feature data based on the region division results.

[0031] In one embodiment, the training module is specifically used to: determine the training geographic topology data corresponding to the training geographic region based on the region division result, and obtain the regional feature data of each training region; and use the training geographic topology data and the regional feature data of each training region as the training geographic feature data.

[0032] In one embodiment, the training module is specifically used to: use each training region as a training node in the second topology graph, and use adjacent training regions as training edges in the second topology graph, in order to obtain the training geographic topology data.

[0033] In one embodiment, the training module is specifically used to: obtain the business feature values ​​of each training region within a historical time period, as regional feature data of each training region; Among them, the characteristic value of this business is the characteristic value related to the downstream business.

[0034] In one embodiment, the training module is specifically used to: input the training geographic feature data into the candidate graph neural network model to obtain the node features of each training node output by the candidate graph neural network model; The node features of each training node are input into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward. The model parameters of the candidate graph neural network model and the candidate reinforcement learning algorithm model are adjusted based on the rewards obtained.

[0035] In one embodiment, the training module is specifically used to: input the node features of each training node into the candidate reinforcement learning algorithm model, so as to obtain the first state of the candidate reinforcement learning algorithm model based on the node features of each training node. Based on the first state, an action is executed, and the second state of the candidate reinforcement learning algorithm model after the action is executed is obtained; The reward is obtained based on the first state and the second state.

[0036] In one embodiment, the state of the candidate reinforcement learning algorithm model includes: statistical information on the node features of the training nodes contained within each of the multiple candidate geofences.

[0037] In one embodiment, the training module is specifically configured to: assign training nodes that have not undergone geofencing to candidate geofences based on the first state; or... Based on this first state, the training node that has already undergone geofencing will be reassigned from its current candidate geofencing to another candidate geofencing.

[0038] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform any of the steps described in the first aspect above.

[0039] Fourthly, this application also provides a computer-readable storage medium. This computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements any of the steps described in the first aspect above.

[0040] Fifthly, this application also provides a computer program product. This computer program product includes a computer program that, when executed by a processor, implements any of the steps described in the first aspect above.

[0041] The aforementioned geofencing method, apparatus, computer equipment, and storage medium first acquire target geographic feature data of the target geographic area, then input the target geographic feature data into a pre-trained target geofencing model, and obtain the geofencing result of the target geographic area based on the output of the target geofencing model. The target geofencing model is trained based on target parameters, which characterize the performance of downstream services in the geofencing process. The geofencing method provided in this application inputs the target geographic feature data of the target geographic area into the target geofencing model, enabling the model to output the geofencing result of the target geographic area. Since the target geofencing model is trained based on target parameters, and these target parameters characterize the performance of downstream services in the geofencing process, the geofencing method provided in this application is based on downstream services, resulting in more accurate geofencing results. Using the geofencing method provided in this application can effectively improve the geofencing performance. Attached Figure Description

[0042] Figure 1 This is a flowchart illustrating a geofencing method in one embodiment; Figure 2 This is a flowchart illustrating the process of obtaining target geographic feature data of a target geographic region in one embodiment. Figure 3 This is a flowchart illustrating the process of determining target geographic feature data in one embodiment; Figure 4 This is a flowchart illustrating the process of obtaining geofencing results for a target geographic area in one embodiment; Figure 5 This is a flowchart illustrating the process of obtaining geofencing delineation results in another embodiment; Figure 6 This is a flowchart illustrating the training method in one embodiment; Figure 7 This is a flowchart illustrating the training method in another embodiment; Figure 8 This is a flowchart illustrating the training method in another embodiment; Figure 9 This is a flowchart illustrating the training method in another embodiment; Figure 10 This is a flowchart illustrating the training method in another embodiment; Figure 11 This is a flowchart illustrating the geofencing method in another embodiment; Figure 12 This is a structural block diagram of a geofencing device in one embodiment; Figure 13This is a structural block diagram of a geofencing device in another embodiment; Figure 14 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0044] A geofence is a virtual boundary, similar to a fence, used to represent the extent of each geographical area after a city or region has been divided according to requirements. In some projects, geofences can provide important information for downstream tasks.

[0045] In existing technologies, the k-means method or DBSCAN method is usually used to achieve the above-mentioned geofencing task.

[0046] However, the accuracy of current k-means or DBSCAN methods for geofencing is low, resulting in poor geofencing performance.

[0047] In view of this, this application provides a geofencing method that can target downstream tasks, which can effectively improve the geofencing effect.

[0048] The geofencing method provided in this application can be executed by a computer device, which can be a server.

[0049] In one embodiment, such as Figure 1 As shown, a geofencing method is provided, including the following steps: Step 101: Obtain target geographic feature data for the target geographic area.

[0050] Optionally, the target geographic area can be the area to be geofenced, and the target geographic feature data can be the feature data of the area to be geofenced. For example, in the use case of a chauffeur dispatch task, the target geographic feature data can be the supply and demand ratio of chauffeur drivers and users within a certain time period. In the use case of a ride-hailing dispatch task, the target geographic feature data can be the supply and demand ratio of ride-hailing vehicles and users within a certain time period.

[0051] In one possible approach, one can first acquire some geographic information about the target geographic region, then divide the target geographic region based on the acquired geographic information and actual needs, and finally acquire the target geographic feature data of the target geographic region based on the results of the regional division.

[0052] Step 102: Input the target geographic feature data into the pre-trained target fence partitioning model, and obtain the geofencing result of the target geographic area based on the output of the target fence partitioning model.

[0053] The target fence partitioning model is trained based on target parameters, which are used to characterize the performance of downstream services in the geofencing partitioning business.

[0054] Optionally, the target parameter can be the autocorrelation coefficient (ACF).

[0055] In one possible implementation, since the target fence partitioning model is trained based on target parameters, which can be used to characterize the performance of downstream services in the geofencing business, that is, the target fence partitioning model is trained with downstream services as the target, the geofencing results of the target geographic area output by the target fence partitioning model are also based on the downstream services.

[0056] The target fence training model includes a graph neural network (GNN) and a reinforcement learning neural network (Deep Q Network, DQN), and the GNN and DQN are cascaded in the target fence training model.

[0057] This GNN is a connection model that obtains the dependencies in the graph by passing information between nodes in the network. This GNN can update the state of a node by looking at its neighbors at any depth. This state can represent state information. In other words, this GNN can well characterize the structural topology information of the graph. That is, in the process of "neighbor aggregation", the representation vector of the target node will be affected by the information of the neighboring nodes.

[0058] DQN is often used in scenarios that require interaction with the environment. Given a state of the environment, the program selects a corresponding action according to a certain policy. After executing this action, the state of the environment will change, that is, the state will be transformed into a new state S'. After each action is executed, the program will receive a reward. The program will adjust its policy based on the size of the reward value to maximize the sum of the reward values ​​obtained after all steps are executed, that is, when the state reaches the terminal state.

[0059] In one possible implementation, the target geographic feature data can be first input into the CNN, and then the output of the CNN can be input into the DQN, which can then output the geofencing result of the target geographic area.

[0060] The aforementioned geofencing method, apparatus, computer equipment, and storage medium first acquire target geographic feature data of the target geographic area, then input the target geographic feature data into a pre-trained target geofencing model, and obtain the geofencing result of the target geographic area based on the output of the target geofencing model. The target geofencing model is trained based on target parameters, which characterize the performance of downstream services in the geofencing process. The geofencing method provided in this application inputs the target geographic feature data of the target geographic area into the target geofencing model, enabling the model to output the geofencing result of the target geographic area. Since the target geofencing model is trained based on target parameters, and these target parameters characterize the performance of downstream services in the geofencing process, the geofencing method provided in this application is based on downstream services, resulting in more accurate geofencing results. Using the geofencing method provided in this application can effectively improve the geofencing performance.

[0061] In one embodiment, such as Figure 2 As shown, the process of obtaining target geographic feature data for a target geographic area includes the following steps: Step 201: Obtain the target geographic information of the target geographic area.

[0062] Optionally, the target geographic information can be road, mountain, river, etc.

[0063] In one possible implementation, target geographic information of the target geographic area can be obtained through wireless positioning.

[0064] In another possible approach, the target geographic information of the target geographic area can be obtained through satellite positioning.

[0065] In another possible approach, the target geographic information of the target geographic area can be obtained through manual input.

[0066] In another possible implementation, the target geographic information of the target geographic area can also be obtained through algorithmic processing.

[0067] Step 202: Divide the target geographic region into multiple target regions based on the target geographic information, and determine the target geographic feature data based on the region division results.

[0068] Optionally, the target area can be a small region within the target geographic area.

[0069] In one possible implementation, the small area can be an irregular area. In practical application scenarios, such as the dispatching of designated drivers, crossing mountains or rivers can cause inconvenience to the dispatching task. Therefore, the target geographical area can be divided into multiple target areas based on the target geographical information. That is, the division is based on the target geographical information, and obstacles such as mountains and rivers can be avoided during the division.

[0070] In one embodiment, such as Figure 3 As shown, determining the target geographic feature data based on the regional division results includes the following steps: Step 301: Determine the target geographic topology data corresponding to the target geographic region based on the regional division results, and obtain the regional feature data of each target region.

[0071] Optionally, the target geographic topology data includes nodes and edges.

[0072] The regional feature data can be node features. In practical applications, the target area can be regarded as a node based on the result of the regional division, and the adjacent target areas can be regarded as time edges. The regional feature data is also the node feature data. In the scenario of chauffeur dispatching, the regional feature data can be the supply and demand ratio of the target area in the past 24 hours.

[0073] In an optional embodiment, determining the target geographic topology data corresponding to the target geographic region based on the region division result includes: treating each target region as a target node in a first topology graph and treating adjacent target regions as target edges in the first topology graph to obtain the target geographic topology data.

[0074] The target geographic topology data refers to the target node and the target edge.

[0075] In an optional embodiment, obtaining the regional feature data of each target region includes: obtaining the business feature values ​​of each target region within a historical time period as the regional feature data of each target region.

[0076] Among them, the characteristic value of this business is the characteristic value related to the downstream business.

[0077] This historical time period can be set in advance by technical personnel, and this business characteristic value can be set according to downstream business.

[0078] In one possible implementation, business characteristic values ​​of each target area within a historical period can be obtained through historical data. For example, in the scenario of chauffeur dispatch, the supply-demand ratio of each target area in the past 24 hours can be obtained through historical data. In this scenario, the past 24 hours correspond to the historical time period, and the supply-demand ratio corresponds to the business characteristic value.

[0079] Step 302: Use the target geographic topology data and the regional feature data of each target area as the target geographic feature data.

[0080] As mentioned above, this means that the target nodes, target edges, and node feature data of each target area are used as target geographic feature data.

[0081] In one embodiment, such as Figure 4 As shown, the target fence partitioning model includes a cascaded target graph neural network model and a target reinforcement learning algorithm model. The target geographic feature data is input into the pre-trained target fence partitioning model, and the geofencing result of the target geographic area is obtained based on the output of the target fence partitioning model. This includes the following steps: Step 401: Input the target geographic feature data into the target graph neural network model to obtain the node features of each target node output by the target graph neural network model.

[0082] Optionally, the target graphical neural network model can be a GNN, and the target reinforcement learning algorithm model can be a DQN.

[0083] The node features of the target node can be represented by a vector of the target node, such as an M-dimensional vector of the target node.

[0084] In one possible implementation, the target node, target edge, and region feature data can be input into the GNN. The GNN model parameters perform model inference based on the above data and output the node features of each target node.

[0085] Step 402: Input the node features of each target node into the target reinforcement learning algorithm model, and obtain the geofencing result of the target geographical area based on the output of the target reinforcement learning algorithm model.

[0086] In one possible implementation, since the GNN and the DQN are cascaded, the DQN will take the output of the GNN as input, that is, take the node features of each target node as input, and output the geofencing result of the target area.

[0087] In one embodiment, such as Figure 5 As shown, the method involves inputting the node features of each target node into the target reinforcement learning algorithm model, and obtaining the geofencing result of the target geographical region based on the output of the target reinforcement learning algorithm model, including the following steps: Step 501: Input the node features of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model based on the node features of each target node.

[0088] In one possible implementation, combining the above description, in this target reinforcement learning algorithm model, it can be assumed that there are N geofences. The State of a geofence is the average of the vector representations of all nodes within the geofence. That is, if there are two target nodes, target node A and target node B, in a certain geofence, then the State of that geofence is the average of the target node features of target node A and the target node features of target node B. This initial state is the State. This initial state can be divided into two types. For example, there are multiple geofences, but the target nodes have not yet been assigned to multiple geofences. At this time, the initial state of each geofence is 0. There are also multiple geofences, and the target nodes have been randomly assigned to each target geofence. At this time, the average of the node features of the target nodes in each geofence is the initial state of each geofence. The initial state of this target reinforcement learning algorithm model is the set of the initial states of each geofence.

[0089] Step 502: Based on the initial state of the target reinforcement learning algorithm model, obtain the output of the target reinforcement learning algorithm model.

[0090] In one possible implementation, the objective reinforcement learning algorithm model can perform geofencing region division based on the initial state of the objective reinforcement learning algorithm model, that is, based on the initial state of each fence.

[0091] Step 503: Obtain the geofencing result of the target geographic area based on the output of the target reinforcement learning algorithm model.

[0092] In one possible implementation, the target reinforcement learning algorithm model can output the geofencing result of the target geographical area based on the initial state of the target reinforcement learning algorithm model, that is, based on the initial state of each fence.

[0093] In one embodiment, such as Figure 6 As shown, the training method for this target fence partitioning model includes the following steps: Step 601: Obtain training data, which includes training geographic feature data of the training geographic region.

[0094] Optionally, the training geographic area can be a region randomly selected by technicians, or it can be a region selected according to training needs, and the training geographic feature data is the feature data of the selected region.

[0095] In one possible approach, one can first acquire some geographic information about the training geographic region, then divide the training geographic region according to the acquired geographic information and actual needs, and finally acquire the target geographic feature data of the training geographic region based on the results of the region division.

[0096] Step 602: Train the candidate fence partitioning model based on the training geographic feature data and reinforcement learning algorithm to obtain the target fence partitioning model.

[0097] The reward of this reinforcement learning algorithm is obtained based on the target parameter.

[0098] Optionally, the target parameter can be the autocorrelation coefficient (ACF), which can be used to characterize the performance of downstream services in the geofencing business.

[0099] The candidate fence model includes graph neural networks (GNNs) and deep Q networks (DQNs), and the GNN and DQN are cascaded in the candidate fence training model.

[0100] In one possible implementation, as described above, the DQN has an initial state, State. After an action is executed, the initial state State becomes a new state S'. After an action is executed, a reward is generated. That is, during the training phase, the reward of the DQN is obtained based on the target parameters.

[0101] The target fence delineation model refers to the fence delineation model used in the process of use.

[0102] In one possible implementation, since the target fence partitioning model is trained by the candidate fence partitioning model based on the training geographic feature data and the reinforcement learning algorithm, and the reward of the reinforcement learning algorithm is obtained based on the target parameter, which can be used to characterize the performance of the downstream business of the geofencing business, that is, the candidate fence partitioning model is trained with the downstream business as the target, the target fence partitioning model can be obtained after training.

[0103] In one embodiment, such as Figure 7 As shown, obtaining training data includes the following steps: Step 701: Obtain the training geographic information for the training geographic region.

[0104] Optionally, the training geographic information can be road, mountain, river, etc.

[0105] In one possible implementation, the target geographic information of the training geographic area can be obtained through wireless positioning.

[0106] In another possible approach, the target geographic information of the training geographic area can be obtained through satellite positioning.

[0107] In another possible approach, the target geographic information for the training geographic area can be obtained through manual input.

[0108] In another possible implementation, the target geographic information of the training geographic area can also be obtained through algorithmic processing.

[0109] Step 702: Divide the training geographic region into multiple training regions based on the training geographic information, and determine the training geographic feature data based on the region division results.

[0110] Optionally, the training area can be a small region within the training geographic area.

[0111] In one possible implementation, the small area can be an irregular area. In practical application scenarios, such as the dispatching of designated drivers, crossing mountains or rivers can cause inconvenience to the dispatching task. Therefore, the training geographic area can be divided into multiple training areas based on the training geographic information. That is, the division is based on the training geographic information, and obstacles such as mountains and rivers can be avoided during the division.

[0112] In one embodiment, such as Figure 8 As shown, determining the training geographic feature data based on the regional division results includes the following steps: Step 801: Determine the training geographic topology data corresponding to the training geographic region based on the regional division results, and obtain the regional feature data of each training region.

[0113] Optionally, the training geographic topology data includes nodes and edges.

[0114] The regional feature data can be node features. In practical applications, the target area can be regarded as a node based on the result of the regional division, and the adjacent target areas can be regarded as time edges. The regional feature data is also the node feature data. In the scenario of chauffeur dispatching, the regional feature data can be the supply and demand ratio of the target area in the past 24 hours.

[0115] In an optional embodiment, determining the training geographic topology data corresponding to the training geographic region based on the region division result includes: using each training region as a training node in the second topology graph and using adjacent training regions as training edges in the second topology graph to obtain the training geographic topology data.

[0116] The training geographic topology data refers to the training nodes and training edges.

[0117] In an optional embodiment, obtaining the regional feature data of each training region includes: obtaining the business feature values ​​of each training region within a historical time period as the regional feature data of each training region.

[0118] Among them, the characteristic value of this business is the characteristic value related to the downstream business.

[0119] This historical time period can be set in advance by technical personnel, and this business characteristic value can be set according to downstream business.

[0120] In one possible implementation, business characteristic values ​​of each training region within a historical time period can be obtained through historical data. For example, in the scenario of chauffeur dispatching, the supply-demand ratio of each training region in the past 24 hours can be obtained through historical data. In this scenario, the past 24 hours correspond to the historical time period, and the supply-demand ratio corresponds to the business characteristic value.

[0121] Step 802: Use the training geographic topology data and the regional feature data of each training region as the training geographic feature data.

[0122] As mentioned above, the training nodes, training edges, and node feature data of each training region are used as training geographic feature data.

[0123] In one embodiment, such as Figure 9As shown, the candidate fence partitioning model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model. The candidate fence partitioning model is trained based on the training geographic feature data and the reinforcement learning algorithm, including the following steps: Step 901: Input the training geographic feature data into the candidate graph neural network model to obtain the node features of each training node output by the candidate graph neural network model.

[0124] Optionally, the candidate graph neural network model can be a GNN, and the candidate reinforcement learning algorithm model can be a DQN.

[0125] The node features of the training node can be represented by a vector, such as an M-dimensional vector of the training node.

[0126] In one possible implementation, training nodes, training edges, and region feature data can be input into a GNN. The GNN model parameters perform model inference based on the above data and output the node features of each training node.

[0127] Step 902: Input the node features of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward.

[0128] In one possible implementation, before the node features of each training node are input into the DQN, the DQN has an initial state. After the node features of each training node are input into the DQN and the reinforcement learning algorithm is executed, the initial state of the DQN will change, generating a first state. An initial ACF value can be calculated from the initial state, and a first ACF value can be obtained from the first state. The difference between the initial ACF value and the first ACF value is the reward.

[0129] Step 903: Adjust the model parameters of the candidate graph neural network model and the candidate reinforcement learning algorithm model based on the obtained reward.

[0130] In one possible implementation, the technician can preset a number of iteration steps. 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, and the second output of the DQN will be used as the third input of the CNN. This process continues until the preset number of iteration steps is reached. After each iteration, a reward can be calculated, and the model parameters of the candidate graph neural network model and the candidate reinforcement learning algorithm model can be adjusted based on the reward.

[0131] In one embodiment, such as Figure 10As shown, the node features of each training node are input into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward, including the following steps: Step 1001: Input the node features of each training node into the candidate reinforcement learning algorithm model to obtain the first state of the candidate reinforcement learning algorithm model based on the node features of each training node.

[0132] In an optional embodiment, the state of the candidate reinforcement learning algorithm model includes: statistical information on the node features of the training nodes contained within each of the multiple candidate geofences.

[0133] In one possible implementation, based on the above description, in this candidate reinforcement learning algorithm model, it can be assumed that there are N geofences. The State of a geofence is the average of the vector representations of all nodes within the geofence. That is, if there are two training nodes, training node A and training node B, in a certain geofence, then the State of that geofence is the average of the training node features of training node A and training node features of training node B. This state can be divided into two types. For example, there are multiple geofences, but the training nodes have not yet been assigned to multiple geofences. At this time, the state of each geofence is 0. There are also multiple geofences, and the training nodes have been randomly assigned to each geofence. At this time, the average of the node features of the training nodes in each geofence is the state of each geofence. The state of this candidate reinforcement learning algorithm model is the set of the states of each geofence.

[0134] Step 1002: Execute an action based on the first state, and obtain the second state of the candidate reinforcement learning algorithm model after the action is executed.

[0135] In one optional embodiment, the action based on the first state includes: assigning training nodes that have not been geofenced to candidate geofences based on the first state; or, assigning training nodes that have been geofenced to another candidate geofence based on the first state.

[0136] As mentioned above, if the first state is that the training node has not yet been assigned to a candidate geofence, then the assignment action is performed. If the first state is that the training node has been randomly assigned to a candidate geofence, then the adjustment action is performed, that is, the training node that has been assigned to a geofence is assigned from its current candidate geofence to another candidate geofence. After the assignment action or adjustment action is completed, the state of the candidate reinforcement learning algorithm model is the second state.

[0137] Step 1003: Obtain the reward based on the first state and the second state.

[0138] In one possible implementation, a first ACF value can be calculated based on a first state, and a second ACF value can be calculated based on a second state. The difference between the first ACF value and the second ACF value is the reward.

[0139] In one embodiment, such as Figure 11 As shown, a geofencing method is provided, which includes the following steps: Step 1101: Obtain the target geographic information of the target geographic area.

[0140] Step 1102: Divide the target geographic area into multiple target areas based on the target geographic information, use each target area as a target node in the first topology graph, and use adjacent target areas as target edges in the first topology graph to obtain the target geographic topology data.

[0141] Step 1103: Obtain the business characteristic values ​​of each target area within the historical time period, as the regional characteristic data of each target area.

[0142] Step 1104: Use the target geographic topology data and the regional feature data of each target area as the target geographic feature data.

[0143] Step 1105: Input the target geographic feature data into the target graph neural network model to obtain the node features of each target node output by the target graph neural network model.

[0144] Step 1106: Input the node features of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model based on the node features of each target node.

[0145] Step 1107: Based on the initial state of the target reinforcement learning algorithm model, obtain the output of the target reinforcement learning algorithm model.

[0146] Step 1108: Obtain the geofencing result of the target geographic area based on the output of the target reinforcement learning algorithm model.

[0147] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0148] Based on the same inventive concept, this application also provides a geofencing device for implementing the geofencing method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more geofencing device embodiments provided below can be found in the limitations of the geofencing method described above, and will not be repeated here.

[0149] In one embodiment, such as Figure 12 As shown, a geofencing device 1200 is provided, including: an acquisition module 1201 and an execution module 1202, wherein: The acquisition module 1201 is used to acquire target geographic feature data of the target geographic area.

[0150] The execution module 1202 is used to input the target geographic feature data into a pre-trained target fence partitioning model, and obtain the geofencing result of the target geographic area based on the output of the target fence partitioning model; wherein, the target fence partitioning model is trained based on target parameters, which are used to characterize the execution quality of downstream services of geofencing services.

[0151] In one embodiment, the acquisition module 1201 is specifically used to: acquire target geographic information of the target geographic region; divide the target geographic region into multiple target regions based on the target geographic information; and determine the target geographic feature data based on the region division results.

[0152] In one embodiment, the acquisition module 1201 is specifically used to: determine the target geographic topology data corresponding to the target geographic region based on the regional division result, and acquire the regional feature data of each target region; and use the target geographic topology data and the regional feature data of each target region as the target geographic feature data.

[0153] In one embodiment, the acquisition module 1201 is specifically used to: take each target area as a target node in the first topology graph and take adjacent target areas as target edges in the first topology graph to obtain the target geographic topology data.

[0154] In one embodiment, the acquisition module 1201 is specifically used to: acquire the business characteristic values ​​of each target area within a historical time period, as regional characteristic data of each target area; wherein the business characteristic values ​​are characteristic values ​​related to the downstream business.

[0155] In one embodiment, the execution module 1202 is specifically used to: input the target geographic feature data into the target graph neural network model to obtain the node features of each target node output by the target graph neural network model; input the node features of each target node into the target reinforcement learning algorithm model, and obtain the geofencing result of the target geographic area based on the output of the target reinforcement learning algorithm model.

[0156] In one embodiment, the execution module 1202 is specifically used to: input the node features of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model based on the node features of each target node; obtain the output of the target reinforcement learning algorithm model based on the initial state of the target reinforcement learning algorithm model; and obtain the geofencing result of the target geographical region based on the output of the target reinforcement learning algorithm model.

[0157] In one embodiment, such as Figure 13 As shown, another geofencing device 1300 is provided, which includes, in addition to the modules included in geofencing device 1200, a training module 1203.

[0158] In one embodiment, the training module 1203 is configured to: acquire training data, the training data including training geographic feature data of the training geographic region; train the candidate fence partitioning model based on the training geographic feature data and a reinforcement learning algorithm to obtain the target fence partitioning model; wherein the reward of the reinforcement learning algorithm is obtained based on the target parameters.

[0159] In one embodiment, the training module 1203 is specifically used to: acquire training geographic information of the training geographic region; divide the training geographic region into multiple training regions based on the training geographic information; and determine the training geographic feature data based on the region division results.

[0160] In one embodiment, the training module 1203 is specifically used to: determine the training geographic topology data corresponding to the training geographic region based on the regional division result, and obtain the regional feature data of each training region; and use the training geographic topology data and the regional feature data of each training region as the training geographic feature data.

[0161] In one embodiment, the training module 1203 is specifically used to: use each training region as a training node in the second topology graph, and use adjacent training regions as training edges in the second topology graph, in order to obtain the training geographic topology data.

[0162] In one embodiment, the training module 1203 is specifically used to: obtain the business feature values ​​of each training region within a historical time period, as regional feature data of each training region; wherein the business feature values ​​are feature values ​​related to the downstream business.

[0163] In one embodiment, the training module 1203 is specifically configured to: input the training geographic feature data into the candidate graph neural network model to obtain the node features of each training node output by the candidate graph neural network model; input the node features of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward; and adjust 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 reward.

[0164] In one embodiment, the training module 1203 is specifically configured to: input the node features of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model based on the node features of each training node; execute an action based on the first state and obtain a second state of the candidate reinforcement learning algorithm model after the action is executed; and obtain a reward based on the first state and the second state.

[0165] In one embodiment, the state of the candidate reinforcement learning algorithm model includes: statistical information on the node features of the training nodes contained within each of the multiple candidate geofences.

[0166] In one embodiment, the training module 1203 is specifically used to: assign training nodes that have not been geofenced to candidate geofences based on the first state; or, assign training nodes that have been geofenced to another candidate geofence based on the first state.

[0167] Each module in the aforementioned geofencing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0168] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 14 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the 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 stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a geofencing method.

[0169] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0170] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring target geographic feature data of a target geographic area; inputting the target geographic feature data into a pre-trained target fence partitioning model, and obtaining the geofencing result of the target geographic area based on the output of the target fence partitioning model; wherein the target fence partitioning model is trained based on target parameters, which are used to characterize the performance quality of downstream services in the geofencing business.

[0171] In one embodiment, when the processor executes a computer program to acquire target geographic feature data of a target geographic region, it performs the following steps: acquiring target geographic information of the target geographic region; dividing the target geographic region into multiple target regions based on the target geographic information; and determining the target geographic feature data based on the region division results.

[0172] In one embodiment, when the processor executes a computer program to determine the target geographic feature data based on the regional division results, it performs the following steps: determining the target geographic topology data corresponding to the target geographic region based on the regional division results, and obtaining the regional feature data of each target region; and using the target geographic topology data and the regional feature data of each target region as the target geographic feature data.

[0173] In one embodiment, when the processor executes a computer program to determine the target geographic topology data corresponding to the target geographic region based on the regional division result, it performs the following steps: taking each target region as a target node in the first topology graph and taking adjacent target regions as target edges in the first topology graph to obtain the target geographic topology data.

[0174] In one embodiment, when the processor executes a computer program to acquire the regional feature data of each target region, it performs the following steps: acquiring the business feature values ​​of each target region within a historical period as regional feature data of each target region; wherein the business feature values ​​are feature values ​​related to the downstream business.

[0175] In one embodiment, the target fence partitioning model includes a cascaded target graph neural network model and a target reinforcement learning algorithm model. The target geographic feature data is input into the pre-trained target fence partitioning model, and the geofencing result of the target geographic region is obtained based on the output of the target fence partitioning model. When the processor executes the computer program, it performs the following steps: inputting the target geographic feature data into the target graph neural network model to obtain the node features of each target node output by the target graph neural network model; inputting the node features of each target node into the target reinforcement learning algorithm model, and obtaining the geofencing result of the target geographic region based on the output of the target reinforcement learning algorithm model.

[0176] In one embodiment, the node features of each target node are input into the target reinforcement learning algorithm model, and the geofencing result of the target geographical region is obtained based on the output of the target reinforcement learning algorithm model. When the processor executes the computer program, it implements the following steps: inputting the node features of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model based on the node features of each target node; obtaining the output of the target reinforcement learning algorithm model based on the initial state of the target reinforcement learning algorithm model; and obtaining the geofencing result of the target geographical region based on the output of the target reinforcement learning algorithm model.

[0177] In one embodiment, the training method for the target fence partitioning model includes the following steps when the processor executes a computer program: acquiring training data, which includes training geographic feature data of a training geographic region; training a candidate fence partitioning model based on the training geographic feature data and a reinforcement learning algorithm to obtain the target fence partitioning model; wherein the reward of the reinforcement learning algorithm is obtained based on the target parameters.

[0178] In one embodiment, when the processor executes a computer program to acquire training data, it performs the following steps: acquiring training geographic information of the training geographic region; dividing the training geographic region into multiple training regions based on the training geographic information; and determining the training geographic feature data based on the region division results.

[0179] In one embodiment, the processor executes a computer program to determine the training geographic feature data based on the regional division results, and performs the following steps: determining the training geographic topology data corresponding to the training geographic region based on the regional division results, and obtaining the regional feature data of each training region; and using the training geographic topology data and the regional feature data of each training region as the training geographic feature data.

[0180] In one embodiment, when the processor executes a computer program to determine the training geographic topology data corresponding to the training geographic region based on the regional division result, it performs the following steps: using each training region as a training node in the second topology graph and using adjacent training regions as training edges in the second topology graph to obtain the training geographic topology data.

[0181] In one embodiment, when the processor executes a computer program to obtain the regional feature data of each training region, it performs the following steps: obtaining the business feature values ​​of each training region within a historical time period as the regional feature data of each training region; wherein the business feature values ​​are feature values ​​related to the downstream business.

[0182] In one embodiment, the candidate fence partitioning model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model. The candidate fence partitioning model is trained based on the training geographic feature data and the reinforcement learning algorithm. When the processor executes the computer program, it performs the following steps: inputting the training geographic feature data into the candidate graph neural network model to obtain the node features of each training node output by the candidate graph neural network model; inputting the node features of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward; and adjusting the model parameters of the candidate graph neural network model and the candidate reinforcement learning algorithm model based on the obtained reward.

[0183] In one embodiment, the node features of each training node are input into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward. When the processor executes the computer program, it implements the following steps: inputting the node features of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model based on the node features of each training node; executing an action based on the first state and obtaining a second state of the candidate reinforcement learning algorithm model after the action is executed; and obtaining a reward based on the first state and the second state.

[0184] In one embodiment, the state of the candidate reinforcement learning algorithm model includes: statistical information on the node features of the training nodes contained within each of the multiple candidate geofences.

[0185] In one embodiment, the action is performed based on the first state. When the processor executes the computer program, it implements the following steps: assigning training nodes that have not been geofenced to candidate geofences based on the first state; or assigning training nodes that have been geofenced to another candidate geofence based on the first state.

[0186] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the above-described steps: acquiring target geographic feature data of a target geographic area; inputting the target geographic feature data into a pre-trained target fence partitioning model, and acquiring the geofencing result of the target geographic area based on the output of the target fence partitioning model; wherein the target fence partitioning model is trained based on target parameters, which are used to characterize the performance quality of downstream services of the geofencing service.

[0187] In one embodiment, when the computer program is executed by the processor, it further performs the following steps in acquiring the target geographic feature data of the target geographic region: acquiring the target geographic information of the target geographic region; dividing the target geographic region into multiple target regions based on the target geographic information; and determining the target geographic feature data based on the region division results.

[0188] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the target geographic feature data corresponding to the target geographic region based on the region division result, and obtaining the regional feature data of each target region; and using the target geographic topology data and the regional feature data of each target region as the target geographic feature data.

[0189] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: taking each target region as a target node in the first topology graph and taking adjacent target regions as target edges in the first topology graph to obtain the target geographic topology data.

[0190] In one embodiment, when the computer program is executed by the processor, it further implements the following steps in acquiring the regional feature data of each target area: acquiring the business feature values ​​of each target area in a historical period as the regional feature data of each target area; wherein the business feature values ​​are feature values ​​related to the downstream business.

[0191] In one embodiment, the target fence partitioning model includes a cascaded target graph neural network model and a target reinforcement learning algorithm model. The target geographic feature data is input into the pre-trained target fence partitioning model, and the geofencing result of the target geographic region is obtained based on the output of the target fence partitioning model. When the computer program is executed by the processor, it further implements the following steps: inputting the target geographic feature data into the target graph neural network model to obtain the node features of each target node output by the target graph neural network model; inputting the node features of each target node into the target reinforcement learning algorithm model, and obtaining the geofencing result of the target geographic region based on the output of the target reinforcement learning algorithm model.

[0192] In one embodiment, the node features of each target node are input into the target reinforcement learning algorithm model, and the geofencing result of the target geographical region is obtained based on the output of the target reinforcement learning algorithm model. When the computer program is executed by the processor, it further implements the following steps: inputting the node features of each target node into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model based on the node features of each target node; obtaining the output of the target reinforcement learning algorithm model based on the initial state of the target reinforcement learning algorithm model; and obtaining the geofencing result of the target geographical region based on the output of the target reinforcement learning algorithm model.

[0193] In one embodiment, the training method for the target fence partitioning model, when the computer program is executed by the processor, further includes the following steps: acquiring training data, which includes training geographic feature data of the training geographic region; training the candidate fence partitioning model based on the training geographic feature data and a reinforcement learning algorithm to obtain the target fence partitioning model; wherein the reward of the reinforcement learning algorithm is obtained based on the target parameters.

[0194] In one embodiment, when the computer program is executed by the processor, the acquisition of training data further includes the following steps: acquiring training geographic information of the training geographic region; dividing the training geographic region into multiple training regions based on the training geographic information; and determining the training geographic feature data based on the region division results.

[0195] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the training geographic topology data corresponding to the training geographic region based on the regional division result, and obtaining the regional feature data of each training region; and using the training geographic topology data and the regional feature data of each training region as the training geographic feature data.

[0196] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: using each training region as a training node in the second topology graph and using adjacent training regions as training edges in the second topology graph to obtain the training geographic topology data.

[0197] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: acquiring the business feature values ​​of each training region within a historical time period as the regional feature data of each training region; wherein the business feature values ​​are feature values ​​related to the downstream business.

[0198] In one embodiment, the candidate fence partitioning model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model. The candidate fence partitioning model is trained based on the training geographic feature data and the reinforcement learning algorithm. When the computer program is executed by the processor, it further performs the following steps: inputting the training geographic feature data into the candidate graph neural network model to obtain the node features of each training node output by the candidate graph neural network model; inputting the node features of each training node into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward; and adjusting the model parameters of the candidate graph neural network model and the candidate reinforcement learning algorithm model based on the obtained reward.

[0199] In one embodiment, the node features of each training node are input into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward. When the computer program is executed by the processor, it further implements the following steps: inputting the node features of each training node into the candidate reinforcement learning algorithm model to obtain a first state of the candidate reinforcement learning algorithm model based on the node features of each training node; executing an action based on the first state and obtaining a second state of the candidate reinforcement learning algorithm model after the action is executed; and obtaining a reward based on the first state and the second state.

[0200] In one embodiment, the state of the candidate reinforcement learning algorithm model includes: statistical information on the node features of the training nodes contained within each of the multiple candidate geofences.

[0201] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: assigning training nodes that have not been geofenced to candidate geofences based on the first state; or assigning training nodes that have been geofenced to another candidate geofence based on the first state.

[0202] In one embodiment, a computer program product is provided. The computer program product includes a computer program that, when executed by a processor, implements the steps described in any of the above embodiments.

[0203] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0204] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0205] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for delineating geographic fences, characterized in that, The method includes: Obtain target geographic information for the target geographic region, including road information, mountain information, and river information; The target geographic region is divided into multiple target regions based on the target geographic information. The target geographic topology data corresponding to the target geographic region is determined based on the regional division results. The regional feature data of each target region is obtained. The regional feature data is the supply and demand ratio of ride-hailing vehicles and users in the target region during a historical time period. The target geographic topology data and the regional feature data of each target region are used as the target geographic feature data; The target geographic feature data is input into the target graph neural network model to obtain the node features of each target node in the target geographic topology data output by the target graph neural network model; The node features of each target node are input into the target reinforcement learning algorithm model, and the geofencing result of the target geographical area is obtained according to the output of the target reinforcement learning algorithm model. The cascaded target graph neural network model and the target reinforcement learning algorithm model constitute the target geofencing model. The target geofencing model is trained according to target parameters, which are used to characterize the performance of downstream services of geofencing.

2. The method according to claim 1, characterized in that, The step of determining the target geographic topology data corresponding to the target geographic region based on the regional division results includes: Each target region is used as a target node in the first topology graph, and adjacent target regions are used as target edges in the first topology graph to obtain the target geographic topology data.

3. The method according to claim 1, characterized in that, The acquisition of regional feature data for each of the target regions includes: Obtain the business characteristic values ​​of each target region within a historical time period, and use them as the regional characteristic data of each target region; The business characteristic value is a characteristic value related to the downstream business.

4. The method according to claim 1, characterized in that, The step of inputting the node features of each target node into the target reinforcement learning algorithm model, and obtaining the geofencing result of the target geographical region based on the output of the target reinforcement learning algorithm model, includes: The node features of each target node are input into the target reinforcement learning algorithm model to obtain the initial state of the target reinforcement learning algorithm model based on the node features of each target node. Based on the initial state of the target reinforcement learning algorithm model, the output of the target reinforcement learning algorithm model is obtained; The geofencing result of the target geographic region is obtained based on the output of the target reinforcement learning algorithm model.

5. The method according to claim 1, characterized in that, The training method for the target fence partitioning model includes: Acquire training data, which includes training geographic feature data of the training geographic region; The candidate fence partitioning model is trained based on the training geographic feature data and reinforcement learning algorithm to obtain the target fence partitioning model; The reward of the reinforcement learning algorithm is obtained based on the target parameters.

6. The method according to claim 5, characterized in that, The acquisition of training data includes: Obtain the training geographic information of the training geographic region; The training geographic region is divided into multiple training regions based on the training geographic information, and the training geographic feature data is determined based on the region division results.

7. The method according to claim 6, characterized in that, The step of determining the training geographic feature data based on the regional division results includes: Based on the regional division results, determine the training geographic topology data corresponding to the training geographic region, and obtain the regional feature data of each training region; The training geographic topology data and the regional feature data of each training region are used as the training geographic feature data.

8. The method according to claim 7, characterized in that, The step of determining the training geographic topology data corresponding to the training geographic region based on the region division results includes: Each of the training regions is used as a training node in the second topology graph, and adjacent training regions are used as training edges in the second topology graph to obtain the training geographic topology data.

9. The method according to claim 7, characterized in that, The step of obtaining the regional feature data of each of the training regions includes: Obtain the business feature values ​​of each training region within a historical time period, and use them as the regional feature data of each training region; The business characteristic value is a characteristic value related to the downstream business.

10. The method according to claim 8, characterized in that, The candidate fence partitioning model includes a candidate graph neural network model and a candidate reinforcement learning algorithm model. Training the candidate fence partitioning model based on the training geographic feature data and the reinforcement learning algorithm includes: The training geographic feature data is input into the candidate graph neural network model to obtain the node features of each training node output by the candidate graph neural network model; The node features of each of the training nodes are input into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward; The model parameters of the candidate graph neural network model and the model parameters of the candidate reinforcement learning algorithm model are adjusted based on the obtained rewards.

11. The method according to claim 10, characterized in that, The step of inputting the node features of each of the training nodes into the candidate reinforcement learning algorithm model to execute the reinforcement learning algorithm and obtain a reward includes: The node features of each training node are input into the candidate reinforcement learning algorithm model to obtain the first state of the candidate reinforcement learning algorithm model based on the node features of each training node. Execute an action based on the first state, and obtain the second state of the candidate reinforcement learning algorithm model after the action is executed; A reward is obtained based on the first state and the second state.

12. The method according to claim 11, characterized in that, The state of the candidate reinforcement learning algorithm model includes: statistical information on the node features of the training nodes contained in each of the multiple candidate geofences.

13. The method according to claim 11, characterized in that, The action performed based on the first state includes: Based on the first state, training nodes that have not undergone geofencing are assigned to candidate geofencing; or... Based on the first state, the training node that has already undergone geofencing will be reassigned from its current candidate geofencing to another candidate geofencing.

14. A geographic fencing device, characterized in that, The device includes: The acquisition module is used to acquire target geographic information of the target geographic area, including road information, mountain information and river information; The determination module is used to divide the target geographic region into multiple target regions based on the target geographic information, determine the target geographic topology data corresponding to the target geographic region based on the region division results, and obtain the regional feature data of each target region. The regional feature data is the supply-demand ratio of ride-hailing vehicles and users in the target region during a historical time period. The first execution module is used to take the target geographic topology data and the regional feature data of each target region as target geographic feature data; The second execution module is used to input the target geographic feature data into the target graph neural network model to obtain the node features of each target node in the target geographic topology data output by the target graph neural network model; The third execution module is used to input the node features of each target node into the target reinforcement learning algorithm model, and obtain the geofencing result of the target geographical area according to the output of the target reinforcement learning algorithm model. The cascaded target graph neural network model and the target reinforcement learning algorithm model constitute the target geofencing model. The target geofencing model is trained according to target parameters, which are used to characterize the execution quality of the downstream business of geofencing business.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 13.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Geofence generation method and device, computer equipment and storage medium

    CN110765219A

  • Order processing method and device based on scene, storage medium and electronic equipment

    CN112686727A