CN113438623B - Service request response method, device, electronic equipment and storage medium - Google Patents

Service request response method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113438623B
CN113438623B CN202010208565.4A CN202010208565A CN113438623B CN 113438623 B CN113438623 B CN 113438623B CN 202010208565 A CN202010208565 A CN 202010208565A CN 113438623 B CN113438623 B CN 113438623B
Authority
CN
China
Prior art keywords
sub
area
target
vehicle
data
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.)
Active
Application number
CN202010208565.4A
Other languages
Chinese (zh)
Other versions
CN113438623A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010208565.4A priority Critical patent/CN113438623B/en
Publication of CN113438623A publication Critical patent/CN113438623A/en
Application granted granted Critical
Publication of CN113438623B publication Critical patent/CN113438623B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/44Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for communication between vehicles and infrastructures, e.g. vehicle-to-cloud [V2C] or vehicle-to-home [V2H]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/021Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences

Abstract

The application discloses a service request response method, a device, an electronic device and a storage medium, wherein a first number (the total number of sub-areas contained in a father area) of target data are selected from a preset interval, and each data is uniformly and randomly selected as the probability of the data contained in the preset interval being selected is the same; the first number of target data are respectively associated with each sub-area, statistically, since each data is uniformly and randomly selected, the second number of target data associated with each sub-area is uniformly distributed, and as the number of response processes for executing the service request increases, the number of target vehicles with target area attribute respectively corresponding to each sub-area tends to be balanced, so that the service requests of the vehicles in each sub-area can be uniformly and randomly responded to, that is, the service requests of the vehicles in each sub-area are balanced.

Description

Service request response method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of internet of vehicles, and in particular, to a service request response method, a service request response device, an electronic device, and a storage medium.
Background
The earth surface space can be divided into a plurality of geographic grids according to a certain rule, one geographic grid is called a sub-area, and a plurality of sub-areas form a parent area.
In order to facilitate driving, a corresponding server is set for each parent area, and the vehicle may send a service request to a server corresponding to the parent area where the vehicle is located and obtain corresponding service information, where the service request is various in types, for example, a request for obtaining other vehicle information (for example, whether dangerous driving exists, whether overtaking exists), a request for obtaining road condition information (for example, whether a road visibility exists, whether a curve exists, whether a sinking road exists, whether construction is being performed), and the like.
A plurality of vehicles in different sub-areas in the same father area can all send service requests to the server corresponding to the father area, and the server cannot respond to the service requests of all vehicles due to limited resources of the server, namely, the server can respond to a part of the service requests and discard a part of the service requests.
As the server discards a portion of the service request, an imbalance in service request response may occur, for example, always responding to requests from vehicles located in one sub-area, but not responding to requests from vehicles located in other sub-areas.
Disclosure of Invention
In view of the foregoing, the present application provides a service request response method, apparatus, electronic device, and storage medium.
A service request response method, comprising:
acquiring a first number of sub-areas contained in a parent area;
selecting the first number of target data from the data contained in the preset interval; wherein the probability of each data being selected is the same;
associating the first number of target data to each sub-region contained in the parent region; wherein one of the sub-regions corresponds to zero or one or more of the target data;
acquiring target vehicles with target area attributes corresponding to the subareas respectively based on the second number of target data associated with the subareas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area;
and responding to the service requests of the target vehicles with the target area attribute corresponding to the subareas respectively.
A service request response apparatus comprising:
A first obtaining module, configured to obtain a first number of sub-areas included in a parent area;
the second acquisition module is used for selecting the first number of target data from the data contained in the preset interval; wherein the probability of each data being selected is the same;
the association module is used for respectively associating the first number of target data to each sub-region contained in the parent region; wherein one of the sub-regions corresponds to zero or one or more of the target data;
a third obtaining module, configured to obtain target vehicles with target area attributes corresponding to the sub-areas respectively, based on the second numbers of target data associated with the sub-areas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area;
and the response module is used for responding to the service requests of the target vehicles with the target area attribute, which correspond to the subareas respectively.
An electronic device, comprising:
a memory for storing a program;
A processor, configured to execute the program, where the program is specifically configured to:
acquiring a first number of sub-areas contained in a parent area;
selecting the first number of target data from the data contained in the preset interval; wherein the probability of each data being selected is the same;
associating the first number of target data to each sub-region contained in the parent region; wherein one of the sub-regions corresponds to zero or one or more of the target data;
acquiring target vehicles with target area attributes corresponding to the subareas respectively based on the second number of target data associated with the subareas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area;
and responding to the service requests of the target vehicles with the target area attribute corresponding to the subareas respectively.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements any of the service request response methods described above.
In order to achieve the above purpose, the present application provides the following technical solutions: selecting a first number (total number of sub-areas included in the parent area) of target data from a preset interval, wherein each data is uniformly and randomly selected because the probability of being selected for each data included in the preset interval is the same; the first number of target data are respectively associated with each sub-area, statistically, since each data is uniformly and randomly selected, the second number of target data associated with each sub-area is uniformly distributed, and as the number of response processes for executing the service request increases, the number of target vehicles with target area attribute respectively corresponding to each sub-area tends to be balanced, so that the service requests of the vehicles in each sub-area can be uniformly and randomly responded to, that is, the service requests of the vehicles in each sub-area are balanced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic diagram of an interaction process between an electronic device and a vehicle according to an embodiment of the present application;
fig. 2 is a flowchart of a service request response method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a process of storing a first number of target data into a data set according to an embodiment of the present disclosure;
fig. 4 is a schematic view of a driving path of a vehicle according to an embodiment of the present application;
FIG. 5 is a schematic view of a travel path of the vehicle corresponding to FIG. 4;
fig. 6 is a block diagram of a service request response device according to an embodiment of the present application;
fig. 7 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The embodiment of the application provides a service request response method, a service request response device and electronic equipment.
The service request responding means may include service request responding means operating in the electronic device.
The electronic device may be a server or a terminal device (e.g., desktop, mobile terminal, etc.), etc. In one example, the service request response means running in the electronic device may be a client in the electronic device. The client may be an application client or a web client.
The service request responding device running in the server may be a hardware component of the server, or may be a functional module or component.
The server may be a server, a server cluster formed by a plurality of servers, or a cloud computing service center.
The service request response method provided by the embodiment of the application is described below in connection with an interaction process between the electronic device and the vehicle. Fig. 1 is a schematic diagram of an interaction process between an electronic device and a vehicle according to an embodiment of the present application.
Assuming that parent region 10 corresponds to electronic device 11, electronic device 11 may service some or all of the vehicles located in parent region 10.
The electronic device 11 may select, from the preset interval, the total number of sub-areas (referred to as the first number in the embodiment of the present application) of target data included in the parent area 10.
The probability of each data being selected in the preset interval is the same, so each data is uniformly and randomly selected.
Taking the example in fig. 1 in which the parent region 10 includes four sub-regions, namely, sub-region 1, sub-region 2, sub-region 3, and sub-region 4 (different sub-regions are filled with different patterns as shown in fig. 1), the electronic device 11 may select 4 target data from the preset interval.
The electronic device 11 may associate the first number of target data to each sub-region comprised by the parent region, respectively; wherein one sub-region corresponds to zero or one or more target data. Acquiring target vehicles with target area attributes corresponding to the subareas respectively based on the second number of target data associated with the subareas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area.
After the electronic device 11 responds to the target vehicles with the target area attribute corresponding to each sub-area in the parent area 10, optionally, the first number of target data may be selected again from the data contained in the preset interval, that is, the above steps may be repeated.
Selecting a first number (total number of sub-areas included in the parent area) of target data from a preset interval, wherein each data is uniformly and randomly selected because the probability of being selected for each data included in the preset interval is the same; the first number of target data are respectively associated with each sub-area, statistically, since each data is uniformly and randomly selected, the second number of target data associated with each sub-area is uniformly distributed, and as the number of response processes for executing the service request increases, the number of target vehicles with target area attribute respectively corresponding to each sub-area tends to be balanced, so that the service requests of the vehicles in each sub-area can be uniformly and randomly responded to, that is, the service requests of the vehicles in each sub-area are balanced.
The following describes a service request response method provided in the embodiment of the present application with reference to fig. 1, and as shown in fig. 2, is a flowchart of the service request response method provided in the embodiment of the present application, where the method includes:
step S201: a first number of sub-regions contained by a parent region is obtained.
Step S202: selecting the first number of target data from the data contained in the preset interval; wherein the probability of each data being selected is the same.
The preset section may be a continuous section or a discrete section, and the continuous section may include infinite data, and since the precision of processing data by the electronic device is limited, the data included in the continuous section is always superimposed from a minimum value, and the increment may be the minimum precision that can be processed by the electronic device, for example, the minimum precision that can be processed by the electronic device is 0.001, and the increment is 0.001. The discrete interval refers to a preset interval including a limited amount of data.
In an alternative embodiment, the preset interval may be [ a, b ], or (a, b), or [ a, b), or (a, b), where the values of a and b are arbitrary, which is not specifically limited in this application.
The probability of each data being selected in the preset interval is the same, so each data is uniformly and randomly selected.
Step S203: and respectively associating the first number of target data to each sub-region contained in the parent region.
Wherein one of the sub-regions corresponds to zero or one or more of the target data.
One target data cannot correspond to a plurality of sub-areas, but only corresponds to one sub-area; while a sub-region may be associated with zero, or, 1, or, multiple target data.
There are various implementations of step S203, and the embodiments of the present application provide, but are not limited to, the following.
The first implementation mode:
each sub-region contained in the parent region corresponds to a data section, wherein the lengths of the data sections corresponding to the sub-regions are the same, the data sections corresponding to the sub-regions do not have intersection, and the union of the data sections corresponding to the sub-regions is a preset section.
The length of the data interval is the difference between the maximum value and the minimum value of the data interval.
The preset interval is assumed to be (0, 1), and the parent region comprises 10 sub-regions, wherein the 10 sub-regions are respectively a sub-region 1, a sub-region 2, a sub-region 3, a sub-region 4, a sub-region 5, a sub-region 6, a sub-region 7, a sub-region 8, a sub-region 9 and a sub-region 10, the data interval corresponding to the sub-region 1 is (0,0.1), the data interval corresponding to the sub-region 2 is (0.1, 0.2), the data interval corresponding to the sub-region 3 is (0.2,0.3), the data interval corresponding to the sub-region 4 is (0.3, 0.4), the data interval corresponding to the sub-region 5 is (0.4, 0.5), the data interval corresponding to the sub-region 6 is (0.5,0.6), the data interval corresponding to the sub-region 7 is (0.6, 0.7), the data interval corresponding to the sub-region 8 is (0.7, 0.8), the data interval corresponding to the sub-region 9 is (0.8,0.9), and the data interval corresponding to the sub-region 10 is (0.9,1).
The first step: and determining the data interval to which the first number of target data respectively belong.
Assume that 10 pieces of target data selected from the preset section (0, 1) are 0.12,0.17,0.21,0.23,0.26,0.39,0.68,0.72,0.78,0.94, respectively, then the target data 0.12 and 0.17 belong to the data section (0.1, 0.2), the target data 0.21,0.23 and 0.26 belong to the data section (0.2,0.3), the target data 0.39 belongs to the data section (0.3, 0.4), the target data 0.68 belongs to the data section (0.6, 0.7), the target data 0.72 and 0.78 belong to the data section (0.7, 0.8), and the target data 0.94 belongs to the data section (0.9,1).
And a second step of: and associating each subarea with target data belonging to a data interval corresponding to the subarea.
Taking the above example as a still, then, target data 0.12 and 0.17 are associated to sub-region 2; associating target data 0.21,0.23 and 0.26 to associated sub-region 3; associating target data 0.39 to sub-region 4; associating target data 0.68 to sub-region 7; associating target data 0.72 and 0.78 with sub-region 8; the target data 0.94 is associated to the sub-area 10.
The second implementation mode:
the first step: creating data sets respectively corresponding to the subareas; wherein one of the data sets has a set identifier, and one of the data sets corresponds to one of the sub-regions.
In an alternative embodiment, the data set may be represented in the form of an array, or, a linked list, or, a structure, or, a hash table, or, a table, or the like.
In an alternative embodiment, after each execution of step S202 to step S205, the data set may be emptied, so that only one data set corresponding to each sub-region is created, and each repeated creation is not required; if the data set is not emptied after each execution of S202 to S205, each execution of S202 to S205 requires creation of a data set corresponding to each sub-region.
The created data sets corresponding to the sub-regions respectively do not contain any data, and optionally, NULL values or other similar values may be assigned to the data sets corresponding to the sub-regions respectively.
And a second step of: and calculating to obtain set identifiers respectively corresponding to the first number of target data based on the first number of target data and the first number.
There are various ways to calculate the set identifier based on the target data and the first number, and the embodiments of the present application provide, but are not limited to, the following ways:
step A1: normalizing the first number of target data to obtain the first number of normalized data.
Assuming that the preset interval is [ a, b ], the parent region includes n sub-regions, and n target data randomly selected from the preset interval are respectively: k1, k2,; then, normalized data are respectively: (k 1-a)/(b-a), (k 2-a)/(b-a), (kn-a)/(b-a); alternatively, the normalized data are respectively: (k 1-b)/(a-b), (k 2-b)/(a-b), (kn-b)/(a-b).
Let n=10, let the preset interval be [0,1], and 10 target data are respectively: 0.12,0.17,0.21,0.23,0.26,0.39,0.68,0.72,0.78,0.94, then normalized data is: 0.12,0.17,0.21,0.23,0.26,0.39,0.68,0.72,0.78,0.94.
In an alternative embodiment, the normalized data may be stored in a linked list or array or hash table or structure, assuming 10 normalized data are stored in array a [10], as shown in fig. 3, where a [1] =0.78; a2=0.17; a3=0.39; a4=0.26; a5=0.72; a6=0.94; a7=0.21; a8=0.12; a9=0.23; a10=0.68.
Step A2: and respectively calculating products of the first number of normalized data and the first number of normalized data, and obtaining set identifiers respectively corresponding to the first number of normalized data based on the downward rounded values of the products respectively corresponding to the first number of normalized data.
In an alternative embodiment, for each piece of normalized data, a value of a downward rounding of a product corresponding to the normalized data may be used as a set identifier corresponding to the normalized data.
In an alternative embodiment, for each normalized data, the sum of the downward rounded value of the corresponding product of the normalized data and 1 may be identified as its corresponding set.
Optionally, for each piece of normalized data, a preset operation may be performed on the value of the downward rounding of the product corresponding to the normalized data, so as to obtain the corresponding set identifier of the normalized data.
The preset operation may be any operation, for example, the preset operation may be addition, subtraction, multiplication, and division with one or more fixed values, which is not limited in this application.
Taking array A [10] as an example, then the product of 0.12,0.17,0.21,0.23,0.26,0.39,0.68,0.72,0.78,0.94 and 10, respectively, is: 1.2,1.7,2.1,2.3,2.6,3.9,6.8,7.2,7.8,9.4; the results of downward evidence obtaining are as follows: 1,1,2,2,2,3,6,7,7,9.
Assuming that, for each normalized data, the sum of the value of the downward rounding of the product corresponding to the normalized data and 1 can be used as its corresponding set identifier, then the set identifier corresponding to each of the 10 normalized data is: 2,2,3,3,3,4,7,8,8, 10.
In an alternative embodiment, each data set may be a linked list, and the set identifier of the data set may be an identifier of a head node of the linked list. In the above example, the parent area includes 10 sub-areas, and since each sub-area corresponds to one data set, assuming that i represents a set identifier, the value of i is a positive integer less than or equal to 1 and less than or equal to the first number (in this example, the first number is 10).
In an alternative embodiment, the data sets corresponding to the sub-regions respectively may form a two-dimensional array; each data set is a row in the two-dimensional array; the set identifier of the data set may be the number of rows in the two-dimensional array. For example, the two-dimensional array is Bi [ m ] where i and m are positive integers greater than or equal to 1 and less than or equal to the first number. Set identifier 1 of the data set represents the first row of the two-dimensional array, namely B1; set identifier 2 of the data set represents the second row of the two-dimensional array, B2, and so on.
And a third step of: and respectively storing the first number of target data into a data set with corresponding set identification.
Each sub-region corresponds to a data set.
Continuing with the above example, as shown in fig. 3, the set identifiers corresponding to the 10 normalized data respectively are: 2,2,3,3,3,4,7,8,8, 10, then 1.2,1.7 is stored in data set 2; 2.1,2.3,2.6 is stored in data set 3; 3.9 in the data set 4; 6.8 in the data set 7; 7.2,7.8 is stored in data set 8; 9.4 are stored in the data set 10.
In fig. 3, the diagonal lines are indicated as NULL values, i.e., NULL, or similar values. The data stored in each data set in fig. 3 is stored from small to large, in practical application, the data stored in each data set may also be stored from large to small, or the data is stored out of sequence, and the positions of the respective data in the data sets are random.
Because the sub-region and the data set have a corresponding relationship, the target data is stored in the corresponding data set, namely, the sub-region and the target data are associated.
In an alternative embodiment, the relationship of each sub-region to its corresponding data set may be as follows: the region identification of the sub-region can obtain the set identification of the data set through a certain operation, or the region identification of the sub-region is the same as the set identification of the data set.
If the region identifier of the sub-region is the same as the set identifier of the data set, the sub-region 1 corresponds to the data set 1, the sub-region 2 corresponds to the data set 2, the sub-region 3 corresponds to the data set 3, the sub-region 4 corresponds to the data set 4, the sub-region 5 corresponds to the data set 5, the sub-region 6 corresponds to the data set 6, the sub-region 7 corresponds to the data set 7, the sub-region 8 corresponds to the data set 8, the sub-region 9 corresponds to the data set 9, and the sub-region 10 corresponds to the data set 10.
In another alternative embodiment, the region identity of each sub-region may not have any association with the set identity of its corresponding data set.
For example, sub-region 1 corresponds to data set 7; sub-region 2 corresponds to data set 5, and so on.
Step S204: and obtaining target vehicles with target area attributes corresponding to the subareas respectively based on the second number of the target data associated with the subareas respectively.
The target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area.
Still taking fig. 1 as an example, assume that the parent region includes: sub-area 1, sub-area 2, sub-area 3, sub-area 4, etc. Suppose that sub-region 1 corresponds to 0 target data, sub-region 2 corresponds to 2 target data, sub-region 3 corresponds to 2 target data, and sub-region 4 corresponds to 0 target data.
The following may be performed for any sub-region in the parent region 10:
based on a second number of target data associated with the sub-region (the second number is the number of target data associated with the sub-region), a target vehicle with a target attribute is obtained, wherein the target region attribute at least characterizes that the number of sub-region intervals between the sub-region where the target vehicle is currently located and the sub-region is smaller than a difference value between the second number and 1, and the sub-region where the target vehicle is currently located belongs to the parent region 10.
Because the number of the target data associated with the subarea 1 is 0, the target area attribute corresponding to the subarea 1 at least represents that the number of subarea intervals between the subarea where the target vehicle is currently located and the subarea 1 is smaller than-1, and therefore the target vehicle with the target area attribute corresponding to the subarea 1 does not exist.
Because the number of the target data associated with the subarea 2 is 2, the target area attribute corresponding to the subarea 2 at least represents that the number of the subarea intervals between the subarea 2 where the target vehicle is currently positioned is smaller than 1, so that the target vehicle can be positioned in the subarea 2, the subarea 1 and the subarea 3; since the interval sub-area 1 between the sub-area 4 and the sub-area 2, that is, the sub-area interval number of the sub-area 4 and the sub-area 2 is 1, the target vehicle with the target area attribute corresponding to the sub-area 2 may be located in the sub-area 2, the sub-area 1 and the sub-area 3, and may not be located in the sub-area 4.
Because the number of the target data associated with the subarea 3 is 2, the target area attribute corresponding to the subarea 3 at least represents that the number of the subarea intervals between the subarea where the target vehicle is currently positioned and the subarea 3 is smaller than 1, so that the target vehicle can be positioned in the subarea 2 and the subarea 3; since the sub-region interval data between the sub-regions 3 and 1 is 1 and the sub-region interval data between the sub-regions 1 and 3 is 2, the sub-region intervals between the sub-regions 3 and 4 are 1 and 2, that is, the sub-region interval number between the sub-regions 3 and 4 is 2, the target vehicle with the target region attribute corresponding to the sub-region 3 may be located in the sub-regions 2 and 3, and may not be located in the sub-regions 1 and 4.
Because the number of the target data associated with the sub-region 4 is 0, the target region attribute corresponding to the sub-region 4 at least represents that the number of the sub-region intervals between the sub-region where the target vehicle is currently located and the sub-region 4 is smaller than-1, and therefore the target vehicle with the target region attribute corresponding to the sub-region 4 does not exist.
As shown in fig. 1, after the electronic device 11 receives the service request 1 of the vehicle located in the sub-area 1, the service request 2 of the vehicle located in the sub-area 2, the service request 3 of the vehicle located in the sub-area 3, and the service request 4 of the vehicle located in the sub-area 4, the electronic device 11 does not respond to the service request 4 (alternatively, the electronic device 11 may discard the service request 4), that is, does not feed back the service information 4 to the vehicle of the sub-area 4.
In fig. 1, an "x" is drawn on the path of the vehicle feedback service information 4 located in the sub-area 4 by the electronic device 11, indicating that the electronic device 11 does not feed the service information 4 back to the vehicle of the sub-area 4.
In an alternative embodiment, since sub-region 1 corresponds to 0 target data, the electronic device 11 will not respond to service request 1 of the vehicle located in sub-region 1, e.g., discard service request 1; even though it is subsequently determined that the target vehicle having the target zone attribute corresponding to the sub-zone 2 may be located in the sub-zone 2, the sub-zone 1, and the sub-zone 3, the target vehicle having the target zone attribute corresponding to the sub-zone 2 is located in the sub-zone 2 and the sub-zone 3 since the service request 1 has been discarded.
In an alternative embodiment, since the sub-area 1 corresponds to 0 target data, the electronic device 11 may not perform any processing on the service request 1 (e.g., may not discard the service request 1), and after determining that the target vehicle with the target area attribute corresponding to the sub-area 2 may be located in the sub-area 2, the sub-area 1, and the sub-area 3, if the sub-area 1 includes the target vehicle, the electronic device may respond to the target vehicle located in the sub-area 1.
In fig. 1, the path of the electronic device 11 to feed back the service information 1 to the vehicles located in the sub-area 1 is indicated by a dash-dot line: in an alternative embodiment the electronic device 11 may feed back the service information 1, in an alternative embodiment the electronic device 11 does not feed back the service information 1.
Step S205: and responding to the service requests of the target vehicles with the target area attribute corresponding to the subareas respectively.
In an alternative embodiment, after execution of step S205 is completed, the process returns to step S202.
Still referring to fig. 1, a target vehicle corresponding to the sub-area 2 and having a target area attribute may be located in the sub-area 2, the sub-area 1, and the sub-area 3; a target vehicle corresponding to the subarea 3 and having a target area attribute may be located in the subarea 2 and the subarea 3; optionally, if the target vehicle exists in the subarea 1, the subarea 2 and the subarea 3, the electronic device 11 may feed back the service information 1 to the target vehicle located in the subarea 1; feeding back service information 2 to the target vehicles located in the subarea 2; the service information 3 is fed back to the target vehicle located in the sub-area 3.
Selecting a first number (total number of sub-areas included in the parent area) of target data from a preset interval, wherein each data is uniformly and randomly selected because the probability of being selected for each data included in the preset interval is the same; the first number of target data are respectively associated with each sub-area, statistically, since each data is uniformly and randomly selected, the second number of target data associated with each sub-area is uniformly distributed, and as the number of response processes for executing the service request increases, the number of target vehicles with target area attribute respectively corresponding to each sub-area tends to be balanced, so that the service requests of the vehicles in each sub-area can be uniformly and randomly responded to, that is, the service requests of the vehicles in each sub-area are balanced.
In this embodiment of the present application, the step of obtaining, based on the second number of target data associated with each sub-region, a target vehicle having a target region attribute corresponding to each sub-region, respectively, is implemented in various ways.
The first implementation mode: for each subarea in the subareas, based on the second number of target data associated with the subarea, obtaining a target vehicle with target area attribute corresponding to the subarea, wherein the target vehicle comprises the following components:
Step B0: and if the second number of the target data associated with the subareas is 0, the target vehicles with the target area attribute corresponding to the subareas do not exist.
If the second number of the target data associated with the subarea is greater than or equal to 1, executing the following operations:
step B1: and determining the vehicle currently located in the subarea as the target vehicle.
Step B2: and determining that the vehicle is not currently in the subarea, and is at most passing through the subareas with the difference value of the second number and 1 before driving to the subarea, as the target vehicle.
The step B2 specifically comprises the following steps:
and if the second number corresponding to the subarea is 1, the target vehicle with the target area attribute corresponding to the subarea is the vehicle positioned in the subarea.
If the second number corresponding to the subarea is 2, the target vehicles with the target area attribute corresponding to the subarea are: a vehicle located in the sub-area; and vehicles that are not currently in the sub-area, passing through a sub-area before traveling to the sub-area.
If the second number corresponding to the subarea is 3, the target vehicles with the target area attribute corresponding to the subarea are: a vehicle located in the sub-area; and vehicles that are not currently in the sub-area, passing through a sub-area before traveling to the sub-area; and vehicles that are not currently in the sub-area, passing through both sub-areas before traveling to the sub-area.
And so on, and will not be described in detail herein.
Step B2 in this embodiment of the present application is a pre-determined process. The process of pre-judging the subareas through which each vehicle will pass in turn is as follows:
step one: and acquiring the position information of each sub-area contained in the parent area.
Step two: travel path information of each vehicle located in the parent area is acquired.
In an alternative embodiment, the user may set the travel path information on the vehicle-mounted device of the vehicle or the mobile terminal carried by the user; the embodiment of the application can obtain the driving path information from the GPS (Global Positioning System-GPS, global positioning system).
Optionally, the travel path information includes: navigation path information connecting a start position and an end position of the vehicle.
In an alternative embodiment, the current road is planned with traffic lanes: such as straight lanes, left turn lanes, right turn lanes, turn around lanes, and the like. The lane in which the vehicle is currently located can represent travel path information of the vehicle.
Optionally, the driving path information includes lane information in which the vehicle is currently located.
Step three: and determining the subareas which are to be sequentially passed by the vehicles based on the position information of the subareas, the travel path information corresponding to the vehicles in the father area and the position information of the subareas where the vehicles are currently positioned.
The above-described "process of judging the sub-areas through which each vehicle will pass in turn" will be described below with reference to specific examples.
Fig. 4 is a schematic view of a driving path of a vehicle according to an embodiment of the present application.
The following description will take an example in which the travel path information includes navigation path information. Assuming that the navigation path information of the vehicle 41 is a two-dot chain line shown in fig. 4, the two-dot chain line starts at position 1 and ends at position 2. The parent region in fig. 4 includes: sub-area 1, sub-area 2, sub-area 3, sub-area 4 and sub-area 5 (different sub-areas are filled with different patterns as shown in fig. 4), fig. 4 only shows in detail the part of the path parent area in the travel path information, and the path outside the path parent area is not shown in detail.
Assume that the sub-region in which the vehicle 41 is currently located is sub-region 5; it can be determined based on the travel path information of the vehicle 41 that the vehicle 41 is to pass through the sub-region 5, the sub-region 1, the sub-region 2, and the sub-region 3 in this order.
The following description will be given by taking an example in which the travel path information includes the lane information in which the vehicle is currently located. Optionally, the lane information of the current vehicle includes: the direction of travel of the vehicle and the direction of indication of the lane in which the vehicle is currently located. The following illustrates the indication direction of the lane, the indication direction of the left turn lane is left; the indication direction of the right turn lane is rightward; the direction of indication of the straight lane is forward.
Still taking fig. 4 as an example, if the travel path information includes the lane in which the vehicle is located and the travel direction information of the vehicle, the determination process of the sub-areas through which the vehicles 40 to 54 will sequentially pass is as follows:
the vehicle 40 is located in a left-turn lane, the sub-area where the vehicle 40 is currently located is sub-area 5, and the current traveling direction of the vehicle 40 is from east to west, so the sub-area where the vehicle 40 sequentially travels includes: sub-regions 5 and 1 do not include sub-region 6 because sub-region 6 does not belong to the parent region.
The vehicle 41 is located in a straight lane, the sub-area in which the vehicle 41 is currently located is the sub-area 5, and the current traveling direction of the vehicle 41 is from east to west, and therefore, the sub-area in which the vehicle 41 sequentially travels includes: sub-area 5, sub-area 1, sub-area 2, sub-area 3.
The vehicle 42 is located in the right turn lane, the sub-area where the vehicle 42 is currently located is sub-area 5, and the current traveling direction of the vehicle 42 is from east to west, so the sub-area where the vehicle 42 sequentially travels includes: sub-area 5, sub-area 1 and sub-area 4.
The vehicle 43 is located in a straight lane, the sub-area where the vehicle 43 is currently located is sub-area 5, and the current traveling direction of the vehicle 43 is from west to east, so the sub-area where the vehicle 43 sequentially travels includes: a sub-region 5.
The vehicle 44 is located in a right turn lane, the sub-area where the vehicle 44 is currently located is sub-area 4, and the current traveling direction of the vehicle 44 is from the south to the north, so the sub-areas where the vehicle 44 sequentially travels include: sub-area 4, sub-area 1 and sub-area 5.
The vehicle 45 is located in a straight lane, the sub-area where the vehicle 45 is currently located is sub-area 4, and the current traveling direction of the vehicle 45 is from the south to the north, so the sub-area where the vehicle 45 sequentially travels includes: sub-region 4 and sub-region 1 do not include sub-region 6 because sub-region 6 does not belong to the parent region.
The vehicle 46 is located in a left-turn lane, the sub-area where the vehicle 46 is currently located is sub-area 4, and the current traveling direction of the vehicle 46 is from the south to the north, so the sub-area where the vehicle 46 sequentially travels includes: sub-area 4, sub-area 1, sub-area 2 and sub-area 3.
The vehicle 47 is located in a straight lane, the sub-area in which the vehicle 47 is currently located is the sub-area 4, and the current traveling direction of the vehicle 47 is from north to south, and thus the sub-area in which the vehicle 47 sequentially travels includes: sub-area 4.
The vehicle 48 is located in the right turn lane, the sub-area where the vehicle 48 is currently located is sub-area 2, and the current traveling direction of the vehicle 48 is from west to east, so the sub-area where the vehicle 48 sequentially travels includes: sub-area 2, sub-area 1 and sub-area 4.
The vehicle 49 is located in a straight lane, the sub-area where the vehicle 49 is currently located is sub-area 2, and the current traveling direction of the vehicle 49 is from west to east, so the sub-area where the vehicle 49 sequentially travels includes: sub-area 2, sub-area 1 and sub-area 5.
The vehicle 50 is located in a left-turn lane, the sub-area where the vehicle 50 is currently located is sub-area 2, and the current traveling direction of the vehicle 50 is from west to east, so the sub-area where the vehicle 50 sequentially travels includes: sub-regions 2 and 1 do not include sub-region 6 because sub-region 6 does not belong to the parent region.
The vehicle 51 is located in a straight lane, the sub-area where the vehicle 51 is currently located is sub-area 2, and the current traveling direction of the vehicle 51 is from east to west, and thus, the sub-area where the vehicle 51 sequentially travels includes: sub-area 2, sub-area 3.
The vehicle 52 is located in a straight lane, the sub-area in which the vehicle 52 is currently located is sub-area 3, and the current traveling direction of the vehicle 52 is from east to west, so the sub-area in which the vehicle 52 sequentially travels includes: sub-area 3.
The vehicle 53 is located in a straight lane, the sub-area in which the vehicle 53 is currently located is sub-area 1, and the current traveling direction of the vehicle 53 is from east to west, and thus, the sub-areas in which the vehicle 53 sequentially travels include: sub-area 1, sub-area 2 and sub-area 3.
The vehicle 54 is located in a straight lane, the sub-area in which the vehicle 54 is currently located is sub-area 1, and the current traveling direction of the vehicle 54 is from west to east, so the sub-area in which the vehicle 54 sequentially travels includes: sub-area 1, sub-area 5.
Step four: and determining the target vehicle from the vehicles based on the subareas which the vehicles are going to pass through in sequence.
The sub-area mentioned in step four is exemplified as sub-area 2 in the following. Assuming that the second number corresponding to the sub-region 2 is 2, the target vehicle corresponding to the sub-region 2 includes:
vehicles currently located in sub-area 2, such as vehicle 48, vehicle 49, vehicle 50, and vehicle 51 in fig. 4); vehicles that are not currently located in sub-area 2, but that reach sub-area 2 via at most one sub-area, e.g. vehicle 53 is not currently located in sub-area 2, but he enters sub-area 2 immediately after passing sub-area 1, and thus vehicle 53 belongs to the target vehicle corresponding to sub-area 2. In fig. 4, the other vehicles do not belong to the target vehicle corresponding to the sub-area 2.
Referring to fig. 2, since steps S202 to S205 are repeatedly performed a plurality of times, the probability of response to the service request of the vehicle for each sub-area tends to be statistically uniform as the number of times of execution increases.
In an alternative embodiment, in combination with the above step B2, step S205: the following two types of implementation manners are provided but not limited to in the embodiments of the present application, in response to the service request of the target vehicle with the target area attribute corresponding to each sub-area.
First kind: for each sub-area in the sub-areas, the following steps are sequentially executed:
responding to a service request of a target vehicle currently located in the subarea;
responding to a service request of a target vehicle which is not in the subarea currently and passes through one subarea before driving to the subarea;
responding to a service request of a target vehicle which is not in the subarea currently and passes through two subareas before driving to the subarea;
until, in response to not being currently in the subarea, before driving to the subarea, a service request of a target vehicle passing through a subarea with a difference value of a second number and 1 corresponding to the subarea.
In a first implementation, the priority level of the electronic device responding to the service request is as follows:
the service request of the target vehicle currently located in the subarea is in response to not being in the subarea currently, the service request of the target vehicle passing through one subarea is in response to not being in the subarea currently before driving to the subarea, and the service request of the target vehicle passing through two subareas is in response to not being in the subarea currently > … > before driving to the subarea, and the service requests of the target vehicles passing through a second number of subareas which are different from 1 and correspond to the subarea are in response to not being in the subarea currently before driving to the subarea.
It will be appreciated that the resources of the electronic device 11 are limited, and if the above steps are sequentially performed, and the electronic device 11 cannot continue to respond to the service request of the target vehicle in the subsequent step before the step of responding to the service request of the target vehicle not currently in the sub-area and passing through the second number of sub-areas different from 1 corresponding to the sub-area before traveling to the sub-area.
The service requests are responded according to the priority levels, namely, the service requests of vehicles in the subareas which are closer to the subareas are preferentially responded, so that the service requests of the electronic equipment for responding to the vehicles are more favorable to be balanced.
Second kind: for each sub-area in the sub-areas, the following steps are randomly executed (the following steps do not have a sequence, and can be executed simultaneously):
responding to a service request of a target vehicle currently located in the subarea;
responding to a service request of a target vehicle which is not in the subarea currently and passes through one subarea before driving to the subarea;
responding to a service request of a target vehicle which is not in the subarea currently and passes through two subareas before driving to the subarea;
And so on;
and responding to the service request of the target vehicle which is not in the subarea currently and passes through a second number of subareas with a difference value of 1 before driving to the subarea.
The service request responded by the electronic device has no priority.
In the above-mentioned two processes of responding to the service requests of the target vehicles with the target area attribute corresponding to the sub-areas, optionally, in any one manner, if the second number of target data associated with a certain sub-area is 0, the electronic device may not respond to the service requests of the vehicles located in the sub-area, for example, may discard the service requests of the vehicles located in the sub-area.
Optionally, in the embodiment of the present application, first, the service request of the vehicle located in the sub-area with the second number of 0 of the associated target data is discarded; secondly, the first or second response mode is performed on the sub-areas with the second number of the associated target data not being 0.
As shown in fig. 4, assuming that the second number of target data associated with the sub-region 1 is 0, the second number of target data associated with the sub-region 2 is 2; then, the target vehicle corresponding to the sub-region 2 having the target region attribute includes: all vehicles (vehicle 48, vehicle 49, vehicle 50 and vehicle 51) located in sub-area 2, and vehicle 53 located in sub-area 1.
Since the electronic device has discarded the service requests of all the vehicles located in the sub-area 1, i.e., has discarded the service requests of the vehicles 53 located in the sub-area 1, the electronic device does not respond to the service requests of the vehicles 53 even if the target vehicle having the target area attribute corresponding to the sub-area 2 includes the vehicles 53.
Alternatively, in any manner, if the second number of target data associated with a sub-area is 0, the electronic device may not perform any processing, i.e. discard, on the service request of the vehicle located in the sub-area. If the target vehicle with the target area attribute corresponding to the other sub-area includes a vehicle located in the sub-area, the response may also be performed.
As shown in fig. 4, assuming that the second number of target data associated with the sub-region 1 is 0, the second number of target data associated with the sub-region 2 is 2; then, the target vehicle corresponding to the sub-region 2 having the target region attribute includes: all vehicles (vehicle 48, vehicle 49, vehicle 50 and vehicle 51) located in sub-area 2, and vehicle 53 located in sub-area 1.
In the process of the electronic device responding to the service request, if the sub-area 1 is traversed first, the electronic device 11 does not perform any processing on the service request of the vehicle located in the sub-area 1 because the second number corresponding to the sub-area 1 is 0; when traversing to the subarea 2 again, the target vehicle with the target area attribute corresponding to the subarea 2 comprises: all vehicles (vehicle 48, vehicle 49, vehicle 50 and vehicle 51) located in sub-area 2, vehicle 53 located in sub-area 1; the electronic device 11 may respond to the service request of the vehicle 48, the service request of the vehicle 49, the service request of the vehicle 50, the service request of the vehicle 51, the service request of the vehicle 53.
If the electronic device first traverses sub-region 2, the electronic device may respond to the service request of vehicle 48, the service request of vehicle 49, the service request of vehicle 50, the service request of vehicle 51, the service request of vehicle 53. When traversing the subarea 1 again, the service request of the vehicle positioned in the subarea 1 is not processed at all; the process of repeatedly processing the service request of the vehicle is not generated.
In order to further understand the effect that the service request response method provided by the embodiment of the present application uniformly responds to the service request of the vehicle in each sub-area, the probability that the service request of the vehicle in each sub-area is responded obtained by adopting the method of responding to the service request of the vehicle in each sub-area in the prior art, and the probability that the service request of the vehicle in each sub-area is responded obtained by adopting the service request response method provided by the embodiment of the present application are compared, as shown in table 1.
In this experiment, the parent region includes 10 child regions, respectively: sub-area 1, sub-area 2, sub-area 3, sub-area 4, sub-area 5, sub-area 6, sub-area 7, sub-area 8, sub-area 9, and sub-area 10.
Table 1 comparative table of prior art and technical solutions of the present application
As shown in table 1, with the technical solution provided in the present application, the probability of the service request of the vehicle located in each sub-area being responded is relatively close, and is between 80% and 90%, with the prior art solution, the probability of the service request of the vehicle located in each sub-area being responded is relatively different, and the probability distribution is between 10% and 90%. Obviously, compared with the prior art, the technical scheme provided by the application can better balance the response of the electronic equipment 11 to the service request of each vehicle.
It can be understood that, because the vehicles are moving continuously and may move from one sub-area to another sub-area in the parent area, and because the electronic device 11 can uniformly respond to the service requests of the vehicles located in each sub-area, by adopting the technical scheme of the application, the response probability of the service requests of all the vehicles in the parent area is also between 80% and 90%, that is, compared with the prior art, the technical scheme of the application can better balance the response of the electronic device 11 to the service requests of all the vehicles.
For each sub-area, the probability of a service request of a vehicle located in the sub-area being responded to may be calculated as follows:
(the number of service requests of vehicles located in the sub-area to which the electronic device responds/the number of service requests of vehicles located in the sub-area) ×100%.
The second implementation mode: for each subarea in the subareas, based on the second number of target data associated with the subarea, obtaining a target vehicle with target area attribute corresponding to the subarea, wherein the target vehicle comprises the following components:
step C0: and if the second number of the target data associated with the subareas is 0, the target vehicles with the target area attribute corresponding to the subareas do not exist.
If the second number of the target data associated with the subarea is greater than or equal to 1, executing the following operations:
step C1: and acquiring a target subarea with the subarea interval number smaller than the difference value of the second number and 1.
Step C2: and determining the vehicle positioned in the target subarea as the target vehicle.
Optionally, step C1 includes: acquiring a target subarea with the subarea interval number of 0 with the subarea;
acquiring a target subarea with the subarea interval number of 1 with the subarea;
acquiring a target subarea with the subarea interval number of 2 with the subarea;
and obtaining a target subarea with the subarea interval number of the difference value of the second number and 1.
Step C1 is described below.
And if the second number corresponding to the subarea is 1, the target subarea is the subarea.
If the second number corresponding to the sub-region is 2, the target sub-region includes:
the sub-region; a sub-region spaced from the sub-region by a number of 0; a sub-region spaced 1 from the sub-region.
And so on, and will not be described in detail.
How to obtain the number of sub-area intervals between two sub-areas is explained below.
The road includes at least one path from at least one place to at least another place, as shown in fig. 5, fig. 5 is a road corresponding to fig. 4, and the description of fig. 5 may refer to the description of fig. 4, which is not repeated herein.
The parent region shown in fig. 5 includes 3 paths, identified by dash-dot lines, namely path 1, path 2, and path 3. Since the parent region includes sub-regions 1 through 5, and does not include sub-region 6, the path that the parent region contains cannot include sub-region 6.
Alternatively, for any two sub-regions, the number of sub-region intervals for the two sub-regions may be determined along the path in which the two sub-regions are located.
For example, the path in which the sub-area 3 and the sub-area 2 are located is the path 1 or the path 3, and the number of sub-area intervals between the sub-area 3 and the sub-area 2 is determined to be 0 along the path 1 or the path 3.
For another example, the path in which the sub-regions 3 and 4 are located is path 1, and the sub-regions 2 and 1 are spaced before the sub-regions 3 and 4, that is, the sub-region spacing number between the sub-regions 3 and 4 is 2, are determined along the path 1.
For another example, the path in which the sub-areas 4 and 5 are located is the path 2, and the number of sub-area intervals between the sub-areas 4 and 5, that is, the sub-area intervals between the sub-areas 4 and 5, is 1, is determined along the path 2.
Differences between the two implementations of the above-described "obtaining, for each of the sub-regions, the target vehicle having the target region attribute corresponding to the sub-region based on the second number of target data associated with the sub-region" are described below.
Still taking fig. 4 as an example, in the first manner, assuming that the second number corresponding to the sub-area 2 is 2, the target vehicle corresponding to the sub-area 2 includes: vehicles currently located in sub-area 2, such as vehicle 48, vehicle 49, vehicle 50, and vehicle 51 in fig. 4); vehicles which are not currently located in the sub-area 2 and can reach the sub-area 2 through at most one sub-area, and vehicles 53 are not currently located in the sub-area 2, but enter the sub-area 2 immediately after passing through the sub-area 1, so that the vehicles 53 belong to target vehicles corresponding to the sub-area 2.
In fig. 4, the other vehicles do not belong to the target vehicle corresponding to the sub-area 2. Although the vehicle 54 is the same as the sub-area in which the vehicle 53 is currently located, i.e., is all sub-area 1, since the next traveling sub-area of the vehicle 54 is sub-area 5, not sub-area 3, the vehicle 54 is not the target vehicle corresponding to sub-area 2.
In a second manner, the target vehicle having the target area attribute corresponding to the sub-area 2 includes:
vehicles currently located in sub-area 2, such as vehicle 48, vehicle 49, vehicle 50, and vehicle 51 in fig. 4); vehicles located in sub-areas spaced 0 from sub-area 2, for example, vehicles located in sub-areas 3 and 1 in fig. 4, for example, vehicle 52, vehicle 53, and vehicle 54; vehicles located in a subregion with a subregion spacing number of 1 from subregion 2, for example, vehicles located in subregion 4 (subregion 4 and subregion 2 are spaced apart by subregion 1) and vehicles located in subregion 5 (subregion 5 and subregion 2 are spaced apart by subregion 1), for example, vehicles 44, 45, 46, 47, 40, 41, 42 and 43.
In an alternative embodiment, step S205 is combined with step C2 above: the following two types of implementation manners are provided but not limited to in the embodiments of the present application, in response to the service request of the target vehicle with the target area attribute corresponding to each sub-area.
First kind: for each sub-area in the sub-areas, the following steps are sequentially executed:
responding to a service request of a target vehicle positioned in the subarea;
responding to a service request of a vehicle positioned in a target subarea with the subarea interval number of 0;
responding to a service request of a vehicle positioned in a target subarea with the subarea interval number of 1;
responding to a service request of a vehicle positioned in a target subarea with the subarea interval number of 2;
until a service request of a vehicle located in a target sub-area having a sub-area interval number from the sub-area of the second number and 1 is responded.
The service requests are responded according to the priority levels, namely, the service requests of vehicles in the subareas which are closer to the subareas are preferentially responded, so that the service requests of the electronic equipment for responding to the vehicles are more favorable to be balanced.
Second kind: for each sub-area in the sub-areas, the following steps are randomly executed (the following steps do not have a sequence, and can be executed simultaneously):
responding to a service request of a target vehicle positioned in the subarea;
responding to a service request of a vehicle positioned in a target subarea with the subarea interval number of 0;
Responding to a service request of a vehicle positioned in a target subarea with the subarea interval number of 1;
responding to a service request of a vehicle positioned in a target subarea with the subarea interval number of 2;
and so on;
responding to a service request of a vehicle positioned in a target subarea with the subarea interval number of the subarea being the difference value of the second number and 1.
The service request responded by the electronic device has no priority.
In the above-mentioned two processes of responding to the service requests of the target vehicles with the target area attribute corresponding to the sub-areas, optionally, in any one manner, if the second number of target data associated with a certain sub-area is 0, the electronic device may not respond to the service requests of the vehicles located in the sub-area, for example, may discard the service requests of the vehicles located in the sub-area.
Optionally, in the embodiment of the present application, first, the service request of the vehicle located in the sub-area with the second number of 0 of the associated target data is discarded; secondly, the first or second response mode is performed on the sub-areas with the second number of the associated target data not being 0.
As shown in fig. 4, assuming that the second number of target data associated with the sub-region 1 is 0, the second number of target data associated with the sub-region 2 is 2; the target vehicle with the target area attribute corresponding to the subarea 2 comprises: vehicles currently located in sub-area 2, such as vehicle 48, vehicle 49, vehicle 50, and vehicle 51 in fig. 4); vehicles located in sub-areas spaced 0 from sub-area 2, for example, vehicles located in sub-areas 3 and 1 in fig. 4, for example, vehicle 52, vehicle 53, and vehicle 54; vehicles located in a subregion with a subregion spacing number of 1 from subregion 2, for example, vehicles located in subregion 4 (subregion 4 and subregion 2 are spaced apart by subregion 1) and vehicles located in subregion 5 (subregion 5 and subregion 2 are spaced apart by subregion 1), for example, vehicles 44, 45, 46, 47, 40, 41, 42 and 43.
Since the electronic device has discarded the service requests of all vehicles located in sub-area 1, i.e. has discarded the service requests of vehicle 53 and the service requests of vehicle 54; even if the target vehicle having the target region attribute corresponding to the sub-region 2 includes the vehicle 53 and the vehicle 54, the electronic device does not respond to the service requests of the vehicle 53 and the vehicle 54.
Alternatively, in any manner, if the second number of target data associated with a sub-area is 0, the electronic device may not perform any processing on the service request of the vehicle located in the sub-area. If the target vehicle with the target area attribute corresponding to the other sub-area includes a vehicle located in the sub-area, the response may also be performed.
In the process that the electronic device responds to the service request, if the sub-area 1 is traversed firstly, the electronic device 11 does not process any service request of the vehicle located in the sub-area 1 as the second number corresponding to the sub-area 1 is 0, namely, the service request of the vehicle located in the sub-area 1 is not discarded; when traversing to the sub-area 2 again, the target vehicle having the target area attribute corresponding to the sub-area 2 includes the vehicle 53 and the vehicle 54, and then the electronic device 11 may respond to the service requests of the vehicle 53 and the vehicle 54.
If the electronic device traverses sub-region 2 first, then electronic device 11 may respond to service requests from vehicles 53 and 54; when traversing the subarea 1 again, the service request of the vehicle positioned in the subarea 1 is not processed at all; the process of repeatedly processing the service request of the vehicle is not generated.
The method is described in detail in the embodiments disclosed in the application, and the method can be implemented by using various devices, so that the application also discloses a device, and a specific embodiment is given in the following detailed description.
As shown in fig. 6, a block diagram of a service request response device according to an embodiment of the present application is provided, where the device includes:
a first obtaining module 61, configured to obtain a first number of sub-areas included in a parent area;
a second obtaining module 62, configured to select the first number of target data from the data included in the preset interval; wherein the probability of each data being selected is the same;
an associating module 63, configured to associate the first number of target data to each sub-region included in the parent region; wherein one of the sub-regions corresponds to zero or one or more of the target data; the method comprises the steps of carrying out a first treatment on the surface of the
A third obtaining module 64, configured to obtain target vehicles with target area attributes corresponding to the sub-areas respectively, based on the second numbers of target data associated with the sub-areas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area;
And the response module 65 is configured to respond to service requests of the target vehicles with the target area attribute, where the service requests correspond to the sub-areas respectively.
In an alternative embodiment, the association module includes:
the creation unit is used for creating data sets respectively corresponding to the subareas; wherein one of the data sets has a set identifier, and one of the data sets corresponds to one of the sub-areas;
the calculating unit is used for calculating and obtaining set identifiers corresponding to the first number of target data respectively based on the first number of target data and the first number of target data;
and the storage unit is used for respectively storing the first number of target data into the data sets with the corresponding set identifiers.
In an alternative embodiment, the association module includes:
a first determining unit, configured to determine data intervals to which the first number of target data respectively belong, where one of the sub-regions corresponds to one of the data intervals, lengths of the data intervals corresponding to the sub-regions respectively are the same, the data intervals corresponding to the sub-regions respectively have no intersection, and a union of the data intervals corresponding to the sub-regions respectively is the preset interval;
And the association unit is used for associating each sub-region with the target data belonging to the data interval corresponding to the association unit.
In an optional embodiment, for each sub-region in the sub-regions, if the second number of target data associated with the sub-region is 0, the target vehicle with the target region attribute corresponding to the sub-region does not exist;
for each of the sub-regions, the third acquisition module includes:
a second determining unit, configured to determine, as the target vehicle, a vehicle currently located in the sub-area if a second number of target data associated with the sub-area is greater than or equal to 1; and a third determining unit, configured to determine, as the target vehicle, vehicles that are not currently in the sub-area, and that pass through at most the second number and 1 of difference sub-areas before traveling to the sub-area.
In an alternative embodiment, for each sub-area of the sub-areas, the response module is specifically configured to sequentially perform the following operations:
responding to a service request of a target vehicle currently located in the subarea;
responding to a service request of a target vehicle which is not in the subarea currently and passes through one subarea before driving to the subarea;
Responding to a service request of a target vehicle which is not in the subarea currently and passes through two subareas before driving to the subarea;
until, in response to not being currently in the subarea, before driving to the subarea, a service request of a target vehicle passing through a subarea with a difference value of a second number and 1 corresponding to the subarea.
In an alternative embodiment, the third determining unit comprises:
a first determining subunit, configured to determine sub-areas through which each vehicle is to sequentially pass, based on the position information of each sub-area, the travel path information corresponding to each vehicle located in the parent area, and the position information of the sub-area where each vehicle is currently located;
and the second determining subunit is used for determining the target vehicle from the vehicles based on the subareas which the vehicles are going to pass through in sequence.
In an optional embodiment, for each sub-region in the sub-regions, if the second number of target data associated with the sub-region is 0, the target vehicle with the target region attribute corresponding to the sub-region does not exist;
for each of the sub-regions, the third acquisition module includes:
An acquisition unit, configured to acquire a target sub-region having a sub-region interval number smaller than a difference value between the second number and 1 from the sub-region;
and the fourth determining unit is used for determining the vehicle positioned in the target subarea as the target vehicle.
As shown in fig. 7, the structure diagram of an electronic device according to an embodiment of the present application includes:
a memory 71 for storing a program;
a processor 72 for executing the program, the program being specifically for:
acquiring a first number of sub-areas contained in a parent area;
selecting the first number of target data from the data contained in the preset interval; wherein the probability of each data being selected is the same;
associating the first number of target data to each sub-region contained in the parent region; wherein one of the sub-regions corresponds to zero or one or more of the target data;
acquiring target vehicles with target area attributes corresponding to the subareas respectively based on the second number of target data associated with the subareas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area;
And responding to the service requests of the target vehicles with the target area attribute corresponding to the subareas respectively.
The electronic device may further include: a communication interface 73, a communication bus 74; in the embodiment of the present application, the number of the processor 71, the memory 72, the communication interface 73, and the communication bus 74 is at least one, and the processor 71, the communication interface 73, and the memory 72 complete communication with each other through the communication bus 74;
the processor 71 may be a central processing unit CPU or an ASIC
(Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the invention, etc.;
the memory 72 may comprise a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory.
The embodiment of the application also provides a readable storage medium, on which a computer program is stored, the computer program implementing a service request response method as described in any one of the above when being executed by a processor.
The features described in the respective embodiments in the present specification may be replaced with each other or combined with each other. For device or system class embodiments, the description is relatively simple as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A service request response method, comprising:
acquiring a first number of sub-areas contained in a parent area;
selecting the first number of target data from the data contained in the preset interval; wherein the probability of each data being selected is the same;
associating the first number of target data to each sub-region contained in the parent region; wherein one of the sub-regions corresponds to zero or one or more of the target data;
acquiring target vehicles with target area attributes corresponding to the subareas respectively based on the second number of target data associated with the subareas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area;
And responding to the service requests of the target vehicles with the target area attribute corresponding to the subareas respectively.
2. The service request response method according to claim 1, wherein the associating the first number of target data to each sub-region included in the parent region, respectively, includes:
creating data sets respectively corresponding to the subareas; wherein one of the data sets has a set identifier, and one of the data sets corresponds to one of the sub-areas;
based on the first number of target data and the first number, calculating to obtain set identifiers respectively corresponding to the first number of target data;
and respectively storing the first number of target data into a data set with corresponding set identification.
3. The service request response method according to claim 1, wherein the associating the first number of target data to each sub-region included in the parent region, respectively, includes:
determining data intervals to which the first number of target data respectively belong, wherein one sub-region corresponds to one data interval, the lengths of the data intervals respectively corresponding to the sub-regions are the same, the data intervals respectively corresponding to the sub-regions do not have intersection, and the union of the data intervals respectively corresponding to the sub-regions is the preset interval;
And associating each subarea with target data belonging to a data interval corresponding to the subarea.
4. The service request response method according to claim 1, wherein for each of the sub-regions, obtaining a target vehicle having a target region attribute corresponding to the sub-region based on a second number of target data associated with the sub-region, comprises:
if the second number of the target data associated with the subareas is 0, the target vehicles with the target area attribute corresponding to the subareas do not exist;
if the second number of the target data associated with the subarea is greater than or equal to 1, determining the vehicle currently located in the subarea as the target vehicle; and determining that the vehicle is not currently in the subarea, and is at most passing through the subareas with the difference value of the second number and 1 before driving to the subarea, as the target vehicle.
5. The service request response method according to claim 4, wherein said responding to the service request of the target vehicle having the target area attribute, which corresponds to each of the sub-areas, includes:
for each sub-area in the sub-areas, the following steps are sequentially executed:
Responding to a service request of a target vehicle currently located in the subarea;
responding to a service request of a target vehicle which is not in the subarea currently and passes through one subarea before driving to the subarea;
responding to a service request of a target vehicle which is not in the subarea currently and passes through two subareas before driving to the subarea;
until, in response to not being currently in the subarea, before driving to the subarea, a service request of a target vehicle passing through a subarea with a difference value of a second number and 1 corresponding to the subarea.
6. The service request response method according to claim 4 or 5, wherein said determining, as the target vehicle, vehicles that are not currently in the sub-area, that pass at most the second number of sub-areas different from 1 before traveling to the sub-area, includes:
determining subareas through which each vehicle respectively passes in sequence based on the position information of each subarea, the travel path information corresponding to each vehicle in the father area and the position information of the subarea where each vehicle is currently positioned;
the target vehicle is determined from the vehicles based on the sub-regions through which the vehicles are to pass in sequence.
7. The service request response method according to claim 1, wherein for each of the sub-regions, obtaining a target vehicle having a target region attribute corresponding to the sub-region based on a second number of target data associated with the sub-region, comprises:
if the second number of the target data associated with the subareas is 0, the target vehicles with the target area attribute corresponding to the subareas do not exist;
if the second number of the target data associated with the subareas is greater than or equal to 1, acquiring a target subarea of which the subarea interval number is smaller than the difference value between the second number and 1;
and determining the vehicle positioned in the target subarea as the target vehicle.
8. A service request response apparatus, comprising:
a first obtaining module, configured to obtain a first number of sub-areas included in a parent area;
the second acquisition module is used for selecting the first number of target data from the data contained in the preset interval; wherein the probability of each data being selected is the same;
the association module is used for respectively associating the first number of target data to each sub-region contained in the parent region; wherein one of the sub-regions corresponds to zero or one or more of the target data;
A third obtaining module, configured to obtain target vehicles with target area attributes corresponding to the sub-areas respectively, based on the second numbers of target data associated with the sub-areas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area;
and the response module is used for responding to the service requests of the target vehicles with the target area attribute, which correspond to the subareas respectively.
9. An electronic device, comprising:
a memory for storing a program;
a processor, configured to execute the program, where the program is specifically configured to:
acquiring a first number of sub-areas contained in a parent area;
selecting the first number of target data from the data contained in the preset interval; wherein the probability of each data being selected is the same;
associating the first number of target data to each sub-region contained in the parent region; wherein one of the sub-regions corresponds to zero or one or more of the target data;
Acquiring target vehicles with target area attributes corresponding to the subareas respectively based on the second number of target data associated with the subareas respectively; the target area attribute corresponding to one sub-area at least represents that the number of sub-area intervals between the sub-area where the target vehicle is currently located and the sub-area is smaller than the difference value between the second number and 1, and the sub-area where the target vehicle is currently located belongs to the father area;
and responding to the service requests of the target vehicles with the target area attribute corresponding to the subareas respectively.
10. A readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the service request response method according to any one of claims 1 to 7.
CN202010208565.4A 2020-03-23 2020-03-23 Service request response method, device, electronic equipment and storage medium Active CN113438623B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010208565.4A CN113438623B (en) 2020-03-23 2020-03-23 Service request response method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010208565.4A CN113438623B (en) 2020-03-23 2020-03-23 Service request response method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113438623A CN113438623A (en) 2021-09-24
CN113438623B true CN113438623B (en) 2023-08-08

Family

ID=77752582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010208565.4A Active CN113438623B (en) 2020-03-23 2020-03-23 Service request response method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113438623B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104734983A (en) * 2013-12-24 2015-06-24 中国移动通信集团公司 Scheduling system, method and device for service data request
US10027624B1 (en) * 2016-10-28 2018-07-17 8X8, Inc. Region-based redirection and bridging of calls
CN110648032A (en) * 2018-06-27 2020-01-03 北京京东尚科信息技术有限公司 Information updating method and device
CN110730250A (en) * 2019-09-06 2020-01-24 北京小米移动软件有限公司 Information processing method and device, service system and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8910176B2 (en) * 2010-01-15 2014-12-09 International Business Machines Corporation System for distributed task dispatch in multi-application environment based on consensus for load balancing using task partitioning and dynamic grouping of server instance
US20150242788A1 (en) * 2014-02-25 2015-08-27 Wei Wu-Emmert Systems, methods, and non-transitory computer-readable mediums that provide for partitioning of an original geographic area into multiple geographic seed areas as part of balancing a business-related workload
US10171614B2 (en) * 2017-02-09 2019-01-01 International Business Machines Corporation Cache memory balancing based on moving object prediction
US10839695B2 (en) * 2017-05-11 2020-11-17 Uber Technologies, Inc. Network computer system to position service providers using provisioning level determinations

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104734983A (en) * 2013-12-24 2015-06-24 中国移动通信集团公司 Scheduling system, method and device for service data request
US10027624B1 (en) * 2016-10-28 2018-07-17 8X8, Inc. Region-based redirection and bridging of calls
CN110648032A (en) * 2018-06-27 2020-01-03 北京京东尚科信息技术有限公司 Information updating method and device
CN110730250A (en) * 2019-09-06 2020-01-24 北京小米移动软件有限公司 Information processing method and device, service system and storage medium

Also Published As

Publication number Publication date
CN113438623A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN110800251B (en) Systems, methods, and media for cloud-based privacy preserving navigation operations
CN107195178B (en) Method and device for determining vehicle driving path
CN108287856B (en) Service range determining method and device and electronic equipment
EP3058487B1 (en) Processing search queries using a data structure
US9159030B1 (en) Refining location detection from a query stream
CN103968854B (en) A kind of Path Clustering planing method
CN107291874B (en) Map point location aggregation method and device
CN108734325A (en) The evaluation method and device of planning path
CN113438623B (en) Service request response method, device, electronic equipment and storage medium
CN113908551B (en) Navigation path determination method, apparatus, device, storage medium and program product
US20150169794A1 (en) Updating location relevant user behavior statistics from classification errors
WO2016188018A1 (en) Data processing method and apparatus
CN112711647B (en) Map information display method and device, storage medium and electronic equipment
CN110619402A (en) Vehicle dispatching method and device, electronic equipment and storage medium
CN112650946A (en) Product information recommendation method, device and system and storage medium
CN114353783B (en) Road information acquisition method and device, storage medium and electronic equipment
CN115378864A (en) Routing table management generation method and system of three-dimensional internet
CN114357318A (en) Multi-dimensional track data display method and device and electronic equipment
Cavallari et al. Cost/speed analysis of mobile wireless DTNs under random waypoint mobility
CN110019253B (en) Distributed graph data sequence sampling method and device
CN109300032B (en) Block generation method, device, equipment and computer readable storage medium
CN107192389A (en) A kind of navigator and air navigation aid
CN106059805B (en) Method and device for analyzing flow distribution
CN108537355B (en) Service area determination method and device and electronic equipment
CN111429742A (en) Road side equipment distribution method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40052342

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant