Fence generation method, device, equipment and storage medium
By generating electronic fences and determining border points and border lines using vector arrays, the problem that GIS data in the prior art cannot accurately reflect coverage ranges is solved, and the accuracy of network optimization platform and the identification of coverage ranges are achieved.
Patent Information
- Application Number
- CN202211218118.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-09-30
AI Technical Summary
In the prior art, road-based GIS data cannot accurately reflect the coverage range, which affects the accuracy of determining network coverage indicators by the network optimization platform.
By generating an electronic fence, the first and second vector arrays of the target road are determined using the fence generation device, and the border points and border lines are determined based on these vector arrays, thereby identifying the coverage range of the road.
The regional analysis of network coverage indicators is realized, and the accuracy of the network optimization platform and the identification of coverage are improved.
Smart Images

Figure CN115564864B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data processing technology, and in particular to a fence generation method, device, equipment and storage medium. Background Art
[0002] As network optimization develops towards intelligence, a road-based intelligent network optimization platform is proposed. During the network optimization analysis, the road's geographic information system (GIS) data is combined to enable the network optimization platform to determine the index data of various network coverage indicators (such as weak coverage, overcoverage, and edge field strength) based on each road.
[0003] However, the existing GIS data on roads is generally determined by dot positioning, where lines composed of continuous points are determined as roads. This cannot reflect the coverage of roads, thereby affecting the accuracy of the network optimization platform when determining various network coverage indicators. Summary of the Invention
[0004] The present application provides a fence generation method, apparatus, device and storage medium for generating an electronic fence for a road to identify the coverage area of the road.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, a fence generation method is provided, comprising: a fence generation device determining a first vector array and a second vector array for a first road point on a target road. The first road point is any one of a plurality of intermediate road points, wherein the plurality of intermediate road points are road points other than the first and last road points of the plurality of road points included in the target road; the first vector array includes a first vector and a second vector arranged in a first order, wherein the first vector is a vector pointing from the first road point to the previous road point on the target road, and the second vector is a vector pointing from the first road point to the next road point on the target road; and the second vector array includes a first vector and a second vector arranged in a second order, wherein the first order and the second order are opposite. Furthermore, the fence generation device determines a first border point of the first road point based on the first vector array, obtaining a plurality of first border points corresponding one-to-one to the plurality of intermediate road points, and determines a first border line based on the order of the plurality of intermediate road points and the plurality of first border points. Furthermore, the fence generation device determines a second bounding box point of the first road point based on the second vector array of the first road point, obtains a plurality of second bounding box points corresponding one-to-one with the plurality of intermediate road points, and determines a second bounding box line based on the order of the plurality of intermediate road points and the plurality of second bounding box points. Finally, the fence generation device generates an electronic fence for the target road based on the first bounding box line and the second bounding box line. The electronic fence for the target road is used to represent the coverage range of the target road.
[0007] In the fence generation method provided in the present application, the fence generation device can determine the first border point and the second border point on both sides corresponding to the road point based on the road point on the target road, thereby generating an electronic fence of the target road according to the first border line formed by connecting the first border points and the second border line formed by connecting the second border points, identifying the coverage range of the target road, and helping the network optimization platform to conduct regional analysis of network coverage indicators.
[0008] In one possible design, before the fence generation device determines the first vector array and the second vector array for the first road point on the target road, the method further includes: the fence generation device obtaining a sampling point set based on drive test data, the drive test data including multiple sampling points, the sampling point set including sampling points with longitude and latitude information from the multiple sampling points. Furthermore, the fence generation device detects each sampling point in the sampling point set, determines a target sampling point, and determines a road point on the target road based on the target sampling point; the location corresponding to the longitude and latitude information of the target sampling point is within a preset area. This design implements how to obtain sampling points useful for generating the electronic fence of the target road from the drive test data, avoiding interference from abnormal data when determining the electronic fence of the road.
[0009] In one possible design, the drive test data also includes sampling times of sampling points, and the fence generation device determines road points on the target road based on target sampling points, including: sorting the target sampling points by sampling time to determine a target sampling point array; and determining the distance between a first target sampling point and a second target sampling point; the first target sampling point being any target sampling point in the target sampling point array except the last target sampling point, and the second target sampling point being the target sampling point immediately following the first target sampling point. Furthermore, if the distance is greater than a preset maximum spacing, the fence generation device inserts a third target sampling point between the first and second target sampling points in the target sampling point array; and determines the target sampling points included in the processed target sampling point array as road points on the target road.
[0010] In one possible design, the fence generation device determines a third vector and a fourth vector for a second target sampling point in the target sampling point array; the third vector is the vector pointing from the second target sampling point to the first target sampling point, and the fourth vector is the vector pointing from the second target sampling point to the next target sampling point in the target sampling point array. Furthermore, the fence generation device determines the angle between the third and fourth vectors. If the distance between the first and fourth vectors is less than a preset minimum spacing and the vector angle is within a preset angle range, the first target sampling point is deleted from the target sampling point array; if the distance between the first and fourth vectors is less than a preset minimum spacing and the vector angle is not within the preset angle range, the second target sampling point is deleted from the target sampling point array. In this design, to improve the accuracy of the electronic fence for the target road, the second target sampling point should be retained. Therefore, if the distance between the first and second target sampling points before the second target sampling point is less than a preset minimum distance, the first target sampling point is deleted. This reduces computational requirements while ensuring the accuracy of the electronic fence for the target road.
[0011] In a second aspect, a fence generation device is provided, comprising a determination unit and a generation unit. The determination unit is configured to determine a first vector array and a second vector array for a first road point on a target road. The first road point is any one of a plurality of intermediate road points, where the plurality of intermediate road points are road points other than the first and last road points on the target road. The first vector array includes a first vector and a second vector arranged in a first order, the first vector being a vector pointing from the first road point to the previous road point on the target road, and the second vector being a vector pointing from the first road point to the next road point on the target road. The second vector array includes a first vector and a second vector arranged in a second order, with the first and second orders being opposite. The determination unit is further configured to determine a first border point of the first road point based on the first vector array, thereby obtaining a plurality of first border points corresponding one-to-one with the plurality of intermediate road points. The determination unit is further configured to determine a first border line based on the order of the plurality of intermediate road points and the plurality of first border points. The determination unit is further configured to determine a second border point of the first road point based on the second vector array, thereby obtaining a plurality of second border points corresponding one-to-one with the plurality of intermediate road points. The determining unit is further configured to determine a second border line based on the order of the plurality of intermediate road points and the plurality of second border points. The generating unit is configured to generate an electronic fence of the target road based on the first border line and the second border line, wherein the electronic fence of the target road is used to represent the coverage of the target road.
[0012] In one possible design, the fence generation device further includes an acquisition unit. The acquisition unit is configured to acquire a sampling point set based on drive test data, the drive test data including multiple sampling points, the sampling point set including sampling points with latitude and longitude information from the multiple sampling points. The determination unit is further configured to detect each sampling point in the sampling point set and determine a target sampling point; the location corresponding to the latitude and longitude information of the target sampling point is within a preset area. The determination unit is further configured to determine a road point on a target road based on the target sampling point.
[0013] In one possible design, the fence generation device further includes a processing unit. The determination unit is further configured to sort the target sampling points according to sampling time to determine a target sampling point array. The determination unit is further configured to determine the distance between a first target sampling point and a second target sampling point; the first target sampling point is any target sampling point in the target sampling point array except the last target sampling point, and the second target sampling point is the target sampling point after the first target sampling point. The processing unit is further configured to insert a third target sampling point between the first and second target sampling points in the target sampling point array if the distance is greater than a preset maximum spacing. The determination unit is further configured to determine the target sampling points included in the processed target sampling point array as road points in the target road.
[0014] In one possible design, the determination unit is further configured to determine a third vector and a fourth vector of a second target sampling point in the target sampling point array; the third vector is a vector pointing from the second target sampling point to the first target sampling point, and the fourth vector is a vector pointing from the second target sampling point to the next target sampling point in the target sampling point array. The determination unit is further configured to determine the angle between the third and fourth vectors. The processing unit is further configured to delete the first target sampling point from the target sampling point array if the distance is less than a preset minimum spacing and the vector angle is within a preset angle range. The processing unit is further configured to delete the second target sampling point from the target sampling point array if the distance is less than a preset minimum spacing and the vector angle is not within the preset angle range.
[0015] In a third aspect, a fence generation device is provided, which includes a memory and a processor; the memory and the processor are coupled, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the fence generation device executes the fence generation method provided in the first aspect or any possible design thereof.
[0016] In a fourth aspect, a computer-readable storage medium is provided, which stores instructions. When the instructions are executed on a fence generation device, the fence generation device executes the fence generation method provided in the first aspect or any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of the structure of a fence generation system provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a fence generation method provided in an embodiment of the present application Figure 1 ;
[0019] Figure 3 A schematic diagram of determining a border point provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of an electronic fence provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of a fence generation method provided in an embodiment of the present application Figure 2 ;
[0022] Figure 6 A sampling point detection diagram provided in an embodiment of the present application Figure 1 ;
[0023] Figure 7A sampling point detection diagram provided in an embodiment of the present application Figure 2 ;
[0024] Figure 8 A schematic diagram of a fence generation method provided in an embodiment of the present application Figure 3 ;
[0025] Figure 9 A schematic diagram of a fence generation method provided in an embodiment of the present application Figure 4 ;
[0026] Figure 10 A schematic diagram of sampling point processing provided in an embodiment of the present application;
[0027] Figure 11 A schematic structural diagram of a fence generation device provided in an embodiment of the present application;
[0028] Figure 12 A schematic diagram of a fence generation device structure provided in an embodiment of the present application Figure 1 ;
[0029] Figure 13 A schematic diagram of a fence generation device structure provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0030] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0031] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0032] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" and "a plurality of" refer to two or more. Words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not limit them to be different.
[0033] Currently, GIS data on roads in existing technologies is generally determined by dot positioning, where lines composed of continuous points are determined as roads. This cannot reflect the coverage of roads, thus affecting the accuracy of the network optimization platform when determining various network coverage indicators.
[0034] To address the aforementioned issues, the present application proposes a fence generation method, apparatus, device, and storage medium. The fence generation apparatus determines a first vector array and a second vector array for a first road point on a target road. The first road point is any one of a plurality of intermediate road points, and the plurality of intermediate road points are road points other than the first and last road points in the target road. The first vector array includes a first vector and a second vector arranged in a first order, wherein the first vector is a vector pointing from the first road point to the previous road point on the target road, and the second vector is a vector pointing from the first road point to the next road point on the target road. The second vector array includes a first vector and a second vector arranged in a second order, wherein the first order and the second order are opposite. Furthermore, the fence generation apparatus determines a first border point of the first road point based on the first vector array, obtaining a plurality of first border points corresponding one-to-one to the plurality of intermediate road points, and determines a first border line based on the order of the plurality of intermediate road points and the plurality of first border points. Furthermore, the fence generation device determines a second bounding box point of the first road point based on the second vector array of the first road point, obtains a plurality of second bounding box points corresponding one-to-one with the plurality of intermediate road points, and determines a second bounding box line based on the order of the plurality of intermediate road points and the plurality of second bounding box points. Finally, the fence generation device generates an electronic fence for the target road based on the first bounding box line and the second bounding box line. The electronic fence for the target road is used to represent the coverage range of the target road.
[0035] In this way, the fence generation device can determine the first border point and the second border point on both sides corresponding to the road point based on the road point on the target road, and thus generate the electronic fence of the target road according to the first border line formed by connecting the first border points and the second border line formed by connecting the second border points, identify the coverage range of the target road, and help the network optimization platform to conduct regional analysis of network coverage indicators.
[0036] Figure 1 A fence generation system is shown. The fence generation method provided in the embodiment of the present application can be applied to Figure 1 The fence generation system shown is used to generate electronic fences for roads based on road point information to identify the coverage of the road. Figure 1 As shown, the fence generation system 10 includes a fence generation device 11 and a server 12 .
[0037] The fence generating device 11 is connected to the server 12 by wired connection or wireless connection, which is not limited in the embodiment of the present application.
[0038] The fence generating device 11 can be used to obtain road point information in the target road from the server 12 and determine a first vector array and a second vector array of a first road point in the target road.
[0039] The fence generating device 11 may also be configured to determine a first border point of the first road point based on the first vector array, thereby obtaining a plurality of first border points corresponding one-to-one with the plurality of intermediate road points. The fence generating device 11 may also determine a first border line based on the order of the plurality of intermediate road points and the plurality of first border points.
[0040] The fence generating device 11 may also be configured to determine second border points of the first road point based on the second vector array, thereby obtaining a plurality of second border points corresponding one-to-one with the plurality of intermediate road points. The fence generating device 11 may also determine a second border line based on the order of the plurality of intermediate road points and the plurality of second border points.
[0041] The fence generating device 11 can also be used to generate an electronic fence of the target road according to the first border line and the second border line.
[0042] Figure 2 is a flow chart of a fence generation method according to some exemplary embodiments. In some embodiments, the fence generation method can be applied to Figure 1 The fence generation device 11 in the fence generation system 10 is shown. In the following, the embodiment of the present application takes the fence generation method applied to the fence generation device 11 as an example to illustrate the fence generation method.
[0043] like Figure 2 As shown, the fence generation method provided in the embodiment of the present application includes the following S201-S206.
[0044] S201. A fence generating device determines a first vector array and a second vector array of a first road point in a target road.
[0045] The first road point is any one of the plurality of intermediate road points, and the plurality of intermediate road points are road points other than the first road point and the last road point among the plurality of road points included in the target road.
[0046] The first vector array includes a first vector and a second vector arranged based on a first order, the first vector being a vector from a first road point to a previous road point of the first road point in a target road, and the second vector being a vector from the first road point to a next road point of the first road point in the target road.
[0047] The second vector array includes first vectors and second vectors arranged based on a second order, and the first order and the second order are opposite.
[0048] As one possible implementation, the fence generation device arbitrarily selects a middle road point from among multiple middle road points on the target road as the first road point, and determines the previous road point and the next road point of the first road point on the target road. Furthermore, the fence generation device determines a first vector with a direction from the first road point to the previous road point and a length of unit length, and a second vector with a direction from the first road point to the next road point and a length of unit length. Furthermore, the fence generation device sorts the first and second vectors in a first order within a first vector array, and sorts the first and second vectors in a second order opposite to the first order within a second vector array, to obtain the first and second vector arrays for the first road point.
[0049] For example, if the first vector is V1 and the second vector is V2, the fence generation device determines that the first vector array arranged in the first order is [V1, V2], and the second vector array arranged in the second order is [V2, V1]. If the fence generation device determines that the first vector array arranged in the first order is [V2, V1], the second vector array arranged in the second order is [V1, V2].
[0050] It should be noted that the fence generation device determines the first vector array and the second vector array of each intermediate road point in turn based on the multiple intermediate road points included in the target road, and establishes a mapping relationship between each intermediate road point and its corresponding first vector array and second vector array for subsequent retrieval and use.
[0051] In some embodiments, the fence generation device outputs a first vector array corresponding to each intermediate road point in response to an order of intermediate road points included in a target road input from a server. Furthermore, the fence generation device determines the reverse order of the intermediate road points included in the input target road and, based on the reverse order, outputs a second vector array corresponding to each intermediate road point in the reverse order of each first vector array.
[0052] S202. The fence generating device determines a first border point of the first road point according to the first vector array of the first road point, and obtains a plurality of first border points corresponding to the plurality of intermediate road points.
[0053] As one possible implementation, the fence generation device determines the angle between the first and second vectors in the first vector array of the first road point, and determines the width of the target road to which the first road point belongs. Furthermore, the fence generation device determines a first bounding box point for the first road point based on the first and second vectors, the longitude and latitude information of the first road point, and the width of the target road. Furthermore, the fence generation device determines a first bounding box point corresponding to each of the plurality of intermediate road points based on each intermediate road point.
[0054] For example, Figure 3 A schematic diagram illustrating determining the first bounding box point of a first road point is shown. Pi is the first road point, Qi is the first bounding box point, V1 is the first vector, V2 is the second vector, α is the angle between the first and second vectors, and L is the distance between Qi and Pi, where L is half the width of the target road. The first bounding box point Qi can be determined using the following formula.
[0055]
[0056] Where Qi is the latitude and longitude coordinates of the first border point, Pi is the latitude and longitude coordinates of the first road point, L is half the width of the target road, α is the angle between the first vector V1 and the second vector V2, Normalize(V2) is the normalized second vector V2, and Normalize(V1) is the normalized first vector V1.
[0057] S203: The fence generating device determines a first border line according to the order of the plurality of intermediate road points and the plurality of first border points.
[0058] As one possible implementation, the fence generation device determines the order of the plurality of intermediate road points on the target road. Furthermore, the fence generation device sorts the plurality of first border points according to the order of each intermediate road point based on the first border point corresponding to each road point determined in step S202, and sequentially connects the sorted plurality of first border points to obtain a first border line.
[0059] It should be noted that the fence generation device determines the order of multiple intermediate road points in the target road based on the sampling time of each road point when sampling, and sorts the multiple intermediate road points in the order of the corresponding sampling times, that is, the order of multiple intermediate road points in the target road is the sampling time when sampling each road point.
[0060] S204. The fence generating device determines second border points of the first road point according to the second vector array of the first road point, and obtains a plurality of second border points corresponding to the plurality of intermediate road points.
[0061] It should be noted that the specific implementation method for the fence generation device to determine the second bounding box points of the first road point based on the second vector array of the first road point can refer to the implementation method for determining the first bounding box points of the first road point based on the first vector array of the first road point in step S202 of the embodiment of the present application. The second bounding box points of the first road point can be determined by simply replacing the first vector array with the second vector array. Furthermore, the fence generation device determines the second bounding box points corresponding to each of the multiple intermediate road points based on each of the intermediate road points.
[0062] S205 : The fence generating device determines a second border line according to the order of the plurality of intermediate road points and the plurality of second border points.
[0063] It should be noted that the fence generating device determines the specific implementation method of the second border line based on the order of multiple intermediate road points and multiple second border points. You can refer to the above step S203 of the embodiment of this application. The fence generating device determines the implementation method of the first border line based on the order of multiple intermediate road points and multiple first border points. It is only necessary to replace the multiple first border points with multiple second border points, and connect the multiple second border points in sequence to obtain the second border line.
[0064] S206 : The fence generating device generates an electronic fence of the target road according to the first border line and the second border line.
[0065] The electronic fence of the target road is used to represent the coverage of the target road.
[0066] As a possible implementation method, after determining the first border line and the second border line, the fence generation device corresponds the first intermediate road point to the first border point in the first border line, and connects the first intermediate road point to the second border point in the second border line, and corresponds the last intermediate road point to the first border point in the first border line, and connects the last intermediate road point to the second border point in the second border line, to generate an electronic fence of the target road for representing the coverage range of the target road.
[0067] For example, Figure 4 As shown, Figure 4 A schematic diagram of an electronic fence generated by a fence generation device is shown, which includes a target road, a first border line on one side of the target road, a second border line on the other side of the target road, and an electronic fence of the target road generated based on the first border line and the second border line.
[0068] It can be understood that in the above-mentioned fence generation method provided in the embodiment of the present application, an electronic fence is generated based on the road points of the target road and the width of the road to characterize the coverage range of the target road, which helps the network optimization platform to conduct regional analysis of network coverage indicators.
[0069] In one design, before determining the first vector array and the second vector array of the first road point in the target road, in order to determine the road points included in the target road, the fence generation method provided in the embodiment of the present application is as follows: Figure 5 As shown, it also includes S301-S303.
[0070] S301: A fence generating device obtains a sampling point set based on drive test data.
[0071] The drive test data includes multiple sampling points, and the sampling point set includes sampling points with longitude and latitude information among the multiple sampling points.
[0072] As a possible implementation, the fence generation device obtains drive test data from a server and determines multiple sampling points included in the drive test data. Further, the fence generation device determines whether the multiple sampling points include longitude and latitude information, and forms a sampling point set with the sampling points including longitude and latitude information.
[0073] For example, for data where no longitude and latitude are collected, only longitude or latitude is collected, or the longitude and latitude are obviously abnormal, the fence generation device can use the dropna method and outlier slicing in Python (programming language) to remove them, for example:
[0074] / / RTLhean is the drive test collection data, 'Lon' is the longitude field, and 'Lat' is the latitude field.
[0075] RTLhean.dropna(subset=['Lon', 'Lat'], inplace=True)
[0076] RTLhean=RTLhean[(RTLhean.Lat>0)&(RTLhean.Lon>0)]
[0077] It is understandable that during the process of collecting road test data, the collected sampling points are affected by the obstruction of the positioning system, the Doppler effect generated during high-speed movement, and the deviation of the data interface between the terminal and the collection software. The sampling point information will have missing longitude and latitude and longitude offsets. These factors affect the accuracy of the electronic fence of the road determined by the fence generation device based on the road test data. Therefore, in the fence generation method provided in the embodiment of the present application, it is necessary to first eliminate these data to improve the accuracy of the generated electronic fence of the road.
[0078] S302: The fence generating device detects each sampling point in the sampling point set and determines a target sampling point.
[0079] The location corresponding to the latitude and longitude information of the target sampling point is within the preset area.
[0080] As one possible implementation, the fence generation device identifies the target road as a preset area based on the area in which the target road is located, and determines the longitude and latitude information of the vertices of the graph corresponding to the preset area. Furthermore, the fence generation device detects whether the longitude and latitude information of each sampling point in the set of sampling points is within the preset area based on the longitude and latitude information of the preset area, and determines each sampling point within the preset area as a target sampling point.
[0081] It should be noted that the preset area can be set in advance in the fence generation device by the operation and maintenance personnel of the fence generation system, and the embodiment of the present application does not specifically limit this.
[0082] For example, the longitude and latitude of the road in the drive test data may have an approximate range of longitude and latitude, which forms a rectangular frame. Before generating the electronic fence for the road based on the drive test data, the fence generation device can reduce the amount of calculation in the analysis by excluding data outside the frame, for example:
[0083] LonLatband=[110,30,130,50]
[0084] RTLhean=RTLhean[(RTLhean.Lon>LonLatband[0])&(RTLhean.Lat>LonLatband[1])&(RTLhean.Lon <LonLatband[2])&(RTLhean.Lat<LonLatband[3])]
[0085] In some embodiments, the sampling points in the sampling point set are sorted according to the sampling time. If the positioning information of the sampling points is continuously collected under normal circumstances, even if a tunnel or a temporary positioning signal shielding occurs, the latitude and longitude distance of the continuous loss of sample collection will not exceed the threshold value (e.g., 5 km). Figure 6 As shown, the fence generation device can poll the distance between each sample i and the i+1th sample. When the distance between the i-th sample and the i+1th sample exceeds a threshold, the i+1th sample is determined to be an outlier and removed. The distance between the i+2th sample and the i-th sample is then calculated and removed if it is an outlier. This continues until the distance between the i+nth sample and the i-th sample falls below the threshold. At the same time, the starting point of the polled sample is moved to i+n, and the polling cycle is continued until the end, deleting all outlier samples that exceed the threshold.
[0086] Exemplarily, the fence generation device polls the sampling points and removes the sampling points, which can be implemented using the following code.
[0087]
[0088] For example, Figure 7 A schematic diagram of a fence generation device detecting each sampling point in a sampling point set is shown, including a border of a preset area, points outside a target road, the target road, and points beyond the preset area.
[0089] 303. The fence generating device determines a road point in the target road according to the target sampling point.
[0090] As a possible implementation, the fence generation device, based on the detection of each sampling point in the sampling point set in step S302, deletes sampling points that exceed a preset area and points that drift outside the target road, and determines the remaining sampling points as road points of the target road.
[0091] It can be understood that in the above-mentioned fence generation method provided in the embodiment of the present application, the abnormal values in the sampling points are eliminated by detecting the road test data, so as to improve the accuracy of the electronic fence generated by the fence generation device for the target road in the subsequent process.
[0092] In one design, the drive test data also includes the sampling time of the sampling point. In order to improve the accuracy of the electronic fence of the target road generated by the fence generation device, the fence generation method provided in the embodiment of the present application is as follows: Figure 8 As shown, it also includes S401-S404.
[0093] S401: The fence generating device sorts the target sampling points according to the sampling time to determine the target sampling point array.
[0094] As a possible implementation method, the fence generation device determines the sampling time of each target sampling point based on the target sampling points determined in step S302, and generates an array of target sampling points according to the sampling time. The target sampling points are sorted according to the sampling time in the array of target sampling.
[0095] S402: The fence generating device determines the distance between the first target sampling point and the second target sampling point.
[0096] Among them, the distance between the first target point and the second target sampling point; the first target sampling point is any one except the last target sampling point in the target sampling point array, and the second target sampling point is the target sampling point after the first target sampling point.
[0097] As a possible implementation manner, the fence generating device determines the distance between the first target sampling point and the second target sampling point in sequence, starting from the first target sampling point, based on the order in the target sampling point array.
[0098] It should be noted that the fence generating device may determine the distance between the first target sampling point and the second target sampling point according to the latitude and longitude information of the first target sampling point and the latitude and longitude information of the second target sampling point.
[0099] S403: When the distance is greater than a preset maximum spacing, the fence generating device inserts a third target sampling point between the first target sampling point and the second target sampling point in the target sampling point array.
[0100] As one possible implementation, the fence generation device compares the distance between the first target sampling point and the second target sampling point determined in step S402 with a preset maximum spacing. Furthermore, if the distance is greater than the preset maximum spacing, the fence generation device inserts a third target sampling point between the first target sampling point and the second target sampling point.
[0101] It should be noted that the fence generation device inserts the third target sampling point between the first and second target sampling points. The fence generation device may determine a line connecting the first and second target sampling points, insert the third target sampling point at the midpoint of the line, and assign latitude and longitude information and a sampling time to the third target sampling point. The sampling time may be midway between the sampling time of the first and second target sampling points. The fence generation device may also determine, based on a preset distance increment, a position on the line connecting the first and second target sampling points that is a preset distance increment from the first target sampling point as the position of the third target sampling point, and assign latitude and longitude information and a sampling time to the third target sampling point. The sampling time may be a time at which the preset time increment is added to the sampling time of the first target sampling point.
[0102] It should be noted that the above-mentioned preset maximum spacing, preset distance increment, and preset time increment can be set in advance in the fence generation device by the operation and maintenance personnel of the fence generation system, and the embodiment of the present application does not specifically limit this.
[0103] S404: The fence generating device determines the target sampling points included in the processed target sampling point array as road points in the target road.
[0104] In one design, after determining the target sampling point array, in order to make the distribution of road points in the target road more reasonable while ensuring accuracy and reducing the amount of calculation, the fence generation method provided in the embodiment of the present application is as follows: Figure 9 As shown, it also includes S501-S504.
[0105] S501: A fence generating device determines a third vector and a fourth vector of a second target sampling point in a target sampling point array.
[0106] The third vector is a vector pointing from the second target sampling point to the first target sampling point, and the fourth vector is a vector pointing from the second target sampling point to the next target sampling point in the target sampling point array.
[0107] It should be noted that the specific implementation method of the fence generation device determining the third vector and the fourth vector of the second target sampling point in the target sampling point array can refer to the implementation method of the fence generation device determining the first vector and the second vector of the first road point in S201 above in the embodiment of the present application, and will not be repeated here.
[0108] S502: The fence generating device determines the vector angle between the third vector and the fourth vector.
[0109] It should be noted that the fence generation device can determine the size of the vector angle based on the third vector, the fourth vector and the calculation formula of the vector angle, and the embodiment of the present application does not specifically limit this.
[0110] S503: The fence generating device deletes the first target sampling point from the target sampling point array when the distance is less than the preset minimum spacing and the vector angle is included in the preset angle range.
[0111] As one possible implementation, the fence generation device determines whether the distance is less than a preset minimum spacing and whether the vector angle is within a preset angle range. Furthermore, the fence generation device determines that if the distance is less than the preset minimum spacing and the vector angle is within the preset angle range, the first target sampling point is deleted from the target sampling point array.
[0112] It should be noted that the preset minimum spacing and the preset angle range can be set in advance in the fence generation device by the operation and maintenance personnel of the fence generation system. For example, the preset angle range can be [85,150]. This embodiment of the present application does not specifically limit this.
[0113] It can be understood that when the vector angle is within the preset angle range, the second target sampling point corresponding to the vertex of the vector angle can be considered as a road point at the curve of the target road. In order to improve the accuracy of the electronic fence of the target road, the second target sampling point should be retained. Therefore, when the distance between the first target sampling point before the second target sampling point and the second target sampling point is less than the preset minimum distance, the first target sampling point is deleted. This can meet the requirements of reducing calculations and ensure the accuracy of the electronic fence of the target road.
[0114] S504: The fence generating device deletes the second target sampling point from the target sampling point array when the distance is less than the preset minimum spacing and the vector angle is not included in the preset angle range.
[0115] As one possible implementation, the fence generation device determines whether the distance is less than a preset minimum spacing and whether the vector angle is within a preset angle range. Furthermore, the fence generation device determines that if the distance is less than the preset minimum spacing and the vector angle is not within the preset angle range, the second target sampling point is deleted from the target sampling point array.
[0116] For example, Figure 10 A schematic diagram illustrating processing of target sampling points in a sampling point set is shown, including retained points located on a curve, retained points located on a target road, supplementary points on the target road, and deleted points on the target road, thereby achieving de-densification and interpolation of the target sampling points in the target sampling point array.
[0117] As can be appreciated, the present embodiment identifies low-density, averaged road points on target roads by combining longitude and latitude drift data from drive test data with vector relationship calculations based on time series drive test point data, averaging the drive test data at preset intervals, and interpolating missing data. This approach reduces the computational complexity involved in the determination process while ensuring the accuracy of electronic fences, further improving the network optimization platform's geographic database system and enhancing the precision of monitoring indicators.
[0118] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0119] In the embodiments of the present application, the user equipment can be divided into functional modules according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or software functional modules. Optionally, the division of modules in the embodiments of the present application is illustrative and is only a logical functional division. In actual implementation, other division methods may be used.
[0120] Figure 11 This is a schematic diagram of the structure of a fence generation device provided in an embodiment of the present application. The fence generation device is used to execute the above fence generation method. Figure 11 As shown, the fence generating device 60 includes a determining unit 601 and a generating unit 602 .
[0121] The determination unit 601 is used to determine the first vector array and the second vector array of the first road point in the target road. The first road point is any one of the multiple intermediate road points, and the multiple intermediate road points are the road points other than the first road point and the last road point in the multiple road points included in the target road; the first vector array includes the first vector and the second vector set based on a first order, the first vector is the vector pointing from the first road point to the previous road point of the first road point in the target road, and the second vector is the vector pointing from the first road point to the next road point of the first road point in the target road; the second vector array includes the first vector and the second vector set based on a second order, and the first order and the second order are opposite. For example, Figure 2 As shown, the determining unit 601 can be used to execute S201.
[0122] The determining unit 601 is further configured to determine the first border point of the first road point according to the first vector array of the first road point, and obtain a plurality of first border points corresponding to the plurality of intermediate road points. Figure 2 As shown, the determining unit 601 can be used to execute S202.
[0123] The determining unit 601 is further configured to determine the first border line according to the order of the plurality of intermediate road points and the plurality of first border points. Figure 2 As shown, the determining unit 601 can be used to execute S203.
[0124] The determining unit 601 is further configured to determine the second border points of the first road point according to the second vector array of the first road point, and obtain a plurality of second border points corresponding to the plurality of intermediate road points. Figure 2 As shown, the determining unit 601 can be used to execute S204.
[0125] The determining unit 601 is further configured to determine the second border line according to the order of the plurality of intermediate road points and the plurality of second border points. Figure 2 As shown, the determining unit 601 can be used to execute S205.
[0126] The generating unit 602 is configured to generate an electronic fence of the target road according to the first border line and the second border line, wherein the electronic fence of the target road is used to represent the coverage of the target road. Figure 2As shown, the generating unit 602 can be used to execute S206.
[0127] Optional, such as Figure 11 As shown, the fence generation device 60 provided in the embodiment of the present application further includes an acquisition unit 603.
[0128] The acquisition unit 603 is configured to acquire a sampling point set based on the drive test data, wherein the drive test data includes a plurality of sampling points, and the sampling point set includes a sampling point with longitude and latitude information among the plurality of sampling points. Figure 5 As shown, the acquiring unit 603 can be used to execute S301.
[0129] The determination unit 601 is further configured to detect each sampling point in the sampling point set and determine a target sampling point; the position corresponding to the latitude and longitude information of the target sampling point is within a preset area. Figure 5 As shown, the determining unit 601 can be used to execute S302.
[0130] The determining unit 601 is further configured to determine a road point in the target road according to the target sampling point. Figure 5 As shown, the determining unit 601 can be used to execute S303.
[0131] Optional, such as Figure 11 As shown, the fence generation device 60 provided in the embodiment of the present application further includes a processing unit 604.
[0132] The determination unit 601 is further configured to sort the target sampling points according to the sampling time to determine the target sampling point array. Figure 8 As shown, the determining unit 601 can be used to execute S401.
[0133] The determining unit 601 is further configured to determine the distance between a first target sampling point and a second target sampling point; the first target sampling point is any one of the target sampling points array except the last target sampling point, and the second target sampling point is the target sampling point after the first target sampling point. Figure 8 As shown, the determining unit 601 can be used to execute S402.
[0134] The processing unit 604 is further configured to insert a third target sampling point between the first target sampling point and the second target sampling point in the target sampling point array when the distance is greater than a preset maximum spacing. Figure 8 As shown, the processing unit 604 can be used to execute S403.
[0135] The determining unit 601 is further configured to determine the target sampling points included in the processed target sampling point array as road points in the target road. Figure 8As shown, the determining unit 601 can be used to execute S404.
[0136] Optional, such as Figure 11 As shown, in the fence generation device 60 provided in the embodiment of the present application, the determination unit 601 is further used to determine the third vector and the fourth vector of the second target sampling point in the target sampling point array. The third vector is the vector pointing from the second target sampling point to the first target sampling point, and the fourth vector is the vector pointing from the second target sampling point to the next target sampling point in the target sampling point array. For example, Figure 9 As shown, the determining unit 601 can be used to execute S501.
[0137] The determining unit 601 is further configured to determine the vector angle between the third vector and the fourth vector. Figure 9 As shown, the determining unit 601 can be used to execute S502.
[0138] The processing unit 604 is further configured to delete the first target sampling point from the target sampling point array when the distance is less than a preset minimum distance and the vector angle is within a preset angle range. Figure 9 As shown, the processing unit 604 can be used to execute S503.
[0139] The processing unit 604 is further configured to delete the second target sampling point from the target sampling point array when the distance is less than the preset minimum distance and the vector angle is not included in the preset angle range. Figure 9 As shown, the processing unit 604 can be used to execute S504.
[0140] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present application provides a possible structural diagram of a fence generation device. The fence generation device is used to execute the fence generation method executed by the fence generation device in the above embodiment. Figure 12 As shown, the fence generating device 70 includes a processor 701, a memory 702 and a bus 703. The processor 701 and the memory 702 may be connected via the bus 703.
[0141] Processor 701 is the control center of the fence generation device and can be a single processor or a collective term for multiple processing elements. For example, processor 701 can be a general-purpose central processing unit (CPU) or other general-purpose processor. The general-purpose processor can be a microprocessor or any conventional processor.
[0142] As an embodiment, the processor 701 may include one or more CPUs, such as Figure 12CPU 0 and CPU 1 are shown in Figure 1.
[0143] The memory 702 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0144] As a possible implementation, memory 702 can exist independently of processor 701 and can be connected to processor 701 via bus 703 to store instructions or program code. When processor 701 calls and executes the instructions or program code stored in memory 702, the fence generation method provided in the embodiment of the present application can be implemented.
[0145] In another possible implementation, the memory 702 may also be integrated with the processor 701 .
[0146] Bus 703 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0147] It should be pointed out that Figure 12 The structure shown does not constitute a limitation of the fence generating device 70. Figure 12 In addition to the components shown, the fence generation device 70 may include Figure 12 More or fewer components may be shown, or certain components may be combined, or different arrangements of components may be shown.
[0148] As an example, combining Figure 11The functions implemented by the determination unit 601, the generation unit 602, the acquisition unit 603 and the processing unit 604 in the fence generation device 60 are the same as those implemented by the Figure 12 The functions of the processor 701 in are the same.
[0149] Optional, such as Figure 12 As shown, the fence generation device provided in the embodiment of the present application may further include a communication interface 704 .
[0150] The communication interface 704 is used to connect to other devices via a communication network. The communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 704 can include an acquisition unit for receiving data and a transmission unit for sending data.
[0151] In one design, in the fence generation device provided in an embodiment of the present application, the communication interface can also be integrated into the processor.
[0152] Figure 13 FIG. 1 shows another hardware structure of the fence generation device in the embodiment of the present application. Figure 13 As shown, the fence generation device 80 may include a processor 801 and a communication interface 802. The processor 801 is coupled to the communication interface 802.
[0153] The functions of the processor 801 may refer to the description of the processor 701. In addition, the processor 801 also has a storage function, which may refer to the function of the memory 702.
[0154] The communication interface 802 is used to provide data to the processor 801. The communication interface 802 can be an internal interface of the fence generation device, or an external interface of the fence generation device (equivalent to the communication interface 704).
[0155] It should be pointed out that Figure 13 The structure shown in the figure does not constitute a limitation on the fence generation device, except Figure 13 In addition to the components shown, the fence generation device 80 may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0156] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above-mentioned functional units is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. The specific working processes of the above-mentioned systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0157] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the method flow shown in the above method embodiment.
[0158] An embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the fence generation method in the above method embodiment.
[0159] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any other form of computer-readable storage medium in a suitable combination of the above, or a numerical value in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0160] Since the apparatus, device computer-readable storage medium, and computer program product in the embodiments of the present application can be applied to the above-mentioned method, the technical effects that can be obtained can also refer to the above-mentioned method embodiments, and the embodiments of the present application will not be repeated here.
[0161] The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A fence generation method, characterized in that: The method comprises: Determine a first vector array and a second vector array for a first road point in a target road; the first road point is any one of a plurality of intermediate road points, and the plurality of intermediate road points are road points other than a first road point and a last road point among a plurality of road points included in the target road; the first vector array includes a first vector and a second vector arranged in a first order, the first vector being a vector pointing from the first road point to a previous road point of the first road point in the target road, and the second vector being a vector pointing from the first road point to a next road point of the first road point in the target road; the second vector array includes the first vector and the second vector arranged in a second order, and the first order is opposite to the second order; determining a first border point of the first road point based on the first vector array of the first road point, obtaining a plurality of first border points corresponding one-to-one to the plurality of intermediate road points, and determining a first border line based on an order of the plurality of intermediate road points and the plurality of first border points; determining second border points of the first road point based on the second vector array of the first road point, obtaining a plurality of second border points corresponding one-to-one to the plurality of intermediate road points, and determining a second border line based on an order of the plurality of intermediate road points and the plurality of second border points; An electronic fence of the target road is generated according to the first border line and the second border line, and the electronic fence of the target road is used to represent the coverage range of the target road.
2. The fence generation method according to claim 1, characterized in that: Before determining the first vector array and the second vector array of the first road point in the target road, the method further includes: Acquire a sampling point set based on drive test data, the drive test data including a plurality of sampling points, the sampling point set including a sampling point having latitude and longitude information among the plurality of sampling points; Detecting each sampling point in the sampling point set to determine a target sampling point; the location corresponding to the latitude and longitude information of the target sampling point is within a preset area; A road point in the target road is determined according to the target sampling point.
3. The fence generation method according to claim 2, characterized in that: The drive test data further includes a sampling time of a sampling point, and determining a road point in the target road according to the target sampling point includes: Sort the target sampling points according to sampling time to determine a target sampling point array; Determine a distance between a first target sampling point and a second target sampling point; the first target sampling point is any one of the target sampling point array except the last target sampling point, and the second target sampling point is the target sampling point after the first target sampling point; When the distance is greater than a preset maximum spacing, inserting a third target sampling point between the first target sampling point and the second target sampling point in the target sampling point array; The target sampling points included in the processed target sampling point array are determined as road points in the target road.
4. The fence generation method according to claim 3, characterized in that: After determining the target sampling point array, the method further includes: Determine a third vector and a fourth vector of the second target sampling point in the target sampling point array; the third vector is a vector pointing from the second target sampling point to the first target sampling point, and the fourth vector is a vector pointing from the second target sampling point to the next target sampling point in the target sampling point array; determining a vector angle between the third vector and the fourth vector; When the distance is less than a preset minimum spacing and the vector angle is included in a preset angle range, deleting the first target sampling point from the target sampling point array; When the distance is less than the preset minimum distance and the vector angle is not included in the preset angle range, the second target sampling point is deleted from the target sampling point array.
5. A fence generation device, characterized in that: including a determination unit and a generation unit; The determining unit is configured to determine a first vector array and a second vector array for a first road point in a target road; the first road point is any one of a plurality of intermediate road points, and the plurality of intermediate road points are road points other than a first road point and a last road point in the plurality of road points included in the target road; the first vector array includes a first vector and a second vector arranged in a first order, the first vector being a vector pointing from the first road point to a previous road point of the first road point in the target road, and the second vector being a vector pointing from the first road point to a next road point of the first road point in the target road; and the second vector array includes the first vector and the second vector arranged in a second order, and the first order is opposite to the second order. The determining unit is further configured to determine a first border point of the first road point based on the first vector array of the first road point, to obtain a plurality of first border points corresponding one-to-one to the plurality of intermediate road points; The determining unit is further configured to determine a first border line according to the order of the plurality of intermediate road points and the plurality of first border points; The determining unit is further configured to determine second border points of the first road point based on the second vector array of the first road point, to obtain a plurality of second border points corresponding one-to-one to the plurality of intermediate road points; The determining unit is further configured to determine a second border line based on the order of the plurality of intermediate road points and the plurality of second border points; The generating unit is configured to generate an electronic fence of the target road according to the first border line and the second border line, where the electronic fence of the target road is used to represent a coverage range of the target road.
6. The fence generating device according to claim 5, characterized in that: The fence generating device further includes an acquisition unit; The acquiring unit is configured to acquire a sampling point set based on drive test data, wherein the drive test data includes a plurality of sampling points, and the sampling point set includes sampling points having latitude and longitude information among the plurality of sampling points; The determining unit is further configured to detect each sampling point in the sampling point set to determine a target sampling point; the location corresponding to the latitude and longitude information of the target sampling point is within a preset area; The determining unit is further configured to determine a road point in the target road according to the target sampling point.
7. The fence generating device according to claim 6, characterized in that: The fence generating device further includes a processing unit; The determining unit is further configured to sort the target sampling points according to sampling time to determine a target sampling point array; The determining unit is further configured to determine a distance between a first target sampling point and a second target sampling point; the first target sampling point is any one of the target sampling points array except the last target sampling point, and the second target sampling point is the target sampling point after the first target sampling point; The processing unit is further configured to insert a third target sampling point between the first target sampling point and the second target sampling point in the target sampling point array when the distance is greater than a preset maximum spacing; The determining unit is further configured to determine the target sampling points included in the processed target sampling point array as road points in the target road.
8. The fence generating device according to claim 7, characterized in that: The determining unit is further configured to determine a third vector and a fourth vector of the second target sampling point in the target sampling point array; the third vector is a vector pointing from the second target sampling point to the first target sampling point, and the fourth vector is a vector pointing from the second target sampling point to the next target sampling point in the target sampling point array; The determining unit is further configured to determine a vector angle between the third vector and the fourth vector; The processing unit is further configured to delete the first target sampling point from the target sampling point array when the distance is less than a preset minimum spacing and the vector angle is included in a preset angle range; The processing unit is further configured to delete the second target sampling point from the target sampling point array if the distance is less than the preset minimum spacing and the vector angle is not included in the preset angle range.
9. A fence generation device, characterized in that: including memory and processor; The memory is coupled to the processor; The memory is used to store computer program code, wherein the computer program code includes computer instructions; When the processor executes the computer instructions, the fence generation device performs the fence generation method according to any one of claims 1 to 4.
10. A computer-readable storage medium storing instructions, characterized in that: When the instruction is executed on a fence generating device, the fence generating device is caused to execute the fence generating method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for generating electronic fence and server
CN111770447A
Three-dimensional lane line information generation method, device and equipment and computer readable medium
CN114894205A