Search

CN-114114349-B - Data processing method, device, electronic equipment and computer program product

CN114114349BCN 114114349 BCN114114349 BCN 114114349BCN-114114349-B

Abstract

The application provides a data processing method, a device, electronic equipment and a computer program product, wherein the method comprises the steps of receiving positioning data report; and determining whether the target position corresponding to the currently received positioning data is in a preset path or a specified rule graph corresponding to a preset area, and determining that the target position deviates from the preset path or is not in the preset area when the target position is not in the specified rule graph. The method can reduce the data processing pressure of the positioning data processing service.

Inventors

  • XIONG HUI

Assignees

  • 杭州海康威视数字技术股份有限公司
  • 杭州海康威视数字技术股份有限公司

Dates

Publication Date
20260421
Application Date
20211118
Priority Date
20211118

Claims (7)

  1. 1. A method of data processing, comprising: Receiving positioning data and reporting; determining whether a target position corresponding to currently received positioning data is in a specified rule graph corresponding to a preset path or a preset area, wherein the preset path or the preset area is in the specified rule graph; determining that the target position deviates from the preset path or is not in the preset area under the condition that the target position is not in the specified rule graph; under the condition that the target position is in the specified rule graph, calculating according to a specific algorithm, and determining whether the target position deviates from the preset path or is in the preset area; For any positioning data, determining whether the position corresponding to the positioning data is in the calculation complexity of the inside of the specified rule graph or not, wherein the calculation complexity is lower than that of the calculation according to a specific algorithm; Wherein the calculating according to a specific algorithm, determining whether the target position deviates from the preset path or is in the preset area, includes: Determining the minimum value in the distance from the target position to each line segment in the preset path, and comparing the minimum value with a target distance threshold; if the minimum value is larger than a target distance threshold value, determining that the target position deviates from the preset path, otherwise, determining that the target position does not deviate from the preset path; Or alternatively, the first and second heat exchangers may be, The method comprises the steps of expanding a target distance threshold outwards from the boundary of the preset area to obtain an expanded preset area, determining whether the target position is inside the expanded preset area by utilizing a ray method, determining that the target position is in the preset area when the target position is inside the expanded preset area, and determining that the target position is not in the preset area when the target position is not inside the expanded preset area.
  2. 2. The method of claim 1, wherein the specified rule pattern corresponding to the preset path or preset area is a minimum circumscribed specified rule pattern of the preset path or preset area; Or alternatively, the first and second heat exchangers may be, Under the condition that a preset distance threshold is set for a preset path or a preset area, the specified rule graph corresponding to the preset path or the preset area is obtained by expanding the preset distance threshold outwards for the minimum external specified rule graph of the preset path or the preset area.
  3. 3. The method of claim 1, wherein the specified regular pattern corresponding to the preset path or preset area is circular; The determining whether the target position corresponding to the currently received positioning data is in the specified rule graph corresponding to the preset path or the preset area comprises the following steps: determining the distance from the target position to the circle center of the circle corresponding to the preset path or the preset area; under the condition that the distance is larger than the radius of the circle corresponding to the preset path or the preset area, determining that the target position is not positioned in the circle corresponding to the preset path or the preset area; And under the condition that the distance is smaller than or equal to the radius of the circle corresponding to the preset path or the preset area, determining that the target position is positioned in the circle corresponding to the preset path or the preset area.
  4. 4. A data processing apparatus, comprising: the receiving unit is used for receiving the positioning data report; the device comprises a receiving unit, a determining unit and a determining unit, wherein the receiving unit is used for receiving positioning data from a target position, and the determining unit is used for determining whether the target position corresponding to the positioning data received by the receiving unit is in a specified rule graph corresponding to a preset path or a preset area, wherein the preset path or the preset area is in the specified rule graph; the processing unit is used for determining that the target position deviates from the preset path or is not in the preset area when the target position is not in the specified rule graph; The processing unit is further configured to perform calculation according to a specific algorithm, and determine whether the target position deviates from the preset path or is in the preset area if the target position is in the specified rule graph; For any positioning data, determining whether the position corresponding to the positioning data is in the calculation complexity of the inside of the specified rule graph or not, wherein the calculation complexity is lower than that of the calculation according to a specific algorithm; the processing unit is specifically configured to determine a minimum value of distances from the target position to line segments in the preset path, and compare the minimum value with a preset distance threshold; if the minimum value is larger than a preset distance threshold value, determining that the target position deviates from the preset path, otherwise, determining that the target position does not deviate from the preset path; Or alternatively, the first and second heat exchangers may be, The method comprises the steps of expanding a target distance threshold outwards from the boundary of the preset area to obtain an expanded preset area, determining whether the target position is inside the expanded preset area by utilizing a ray method, determining that the target position is in the preset area when the target position is inside the expanded preset area, and determining that the target position is not in the preset area when the target position is not inside the expanded preset area.
  5. 5. The apparatus of claim 4, wherein the device comprises a plurality of sensors, The specified rule graph corresponding to the preset path or the preset area is the minimum external specified rule graph of the preset path; Or alternatively, the first and second heat exchangers may be, Under the condition that a preset distance threshold is set for a preset path or a preset area, the specified rule graph corresponding to the preset path or the preset area is obtained by expanding the preset distance threshold outwards for the minimum external specified rule graph of the preset path or the preset area; And/or the number of the groups of groups, The specified regular graph corresponding to the preset path or the preset area is circular; The determining unit is specifically configured to determine a distance between the target position and a center of a circle corresponding to the preset path or the preset area, determine that the target position is not located inside the circle corresponding to the preset path or the preset area when the distance is greater than a radius of the circle corresponding to the preset path or the preset area, and determine that the target position is located inside the circle corresponding to the preset path or the preset area when the distance is less than or equal to the radius of the circle corresponding to the preset path or the preset area.
  6. 6. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor for executing the machine executable instructions to implement the method of any of claims 1-3.
  7. 7. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, causes the processor to carry out the method according to any one of claims 1-3.

Description

Data processing method, device, electronic equipment and computer program product Technical Field The present application relates to the field of mobile traffic and security technologies, and in particular, to a data processing method, apparatus, electronic device, and computer program product. Background Currently, there are many virtualized applications based on positioning data, e.g., GPS (Global Positioning System ) data, such as geofencing, track yaw. For such applications, a preset path needs to be configured, real-time positioning data and the preset path are used as parameters, and calculation is performed according to a specific algorithm (calculating the distance relation between positioning and preset path points or line segments) to obtain a conclusion whether the intrusion into the fence, the departure from the fence or the track yaw occurs. Practice finds that the frequency of reporting positioning data is generally high, that is, a large amount of reporting positioning data exists, so that a large amount of calculation according to a specific algorithm is required, and great pressure is caused on positioning data processing service. Disclosure of Invention In view of the foregoing, the present application provides a data processing method, apparatus, electronic device and computer program product for reducing data processing pressure of a GPS data processing service. According to a first aspect of an embodiment of the present application, there is provided a data processing method, including: Receiving positioning data and reporting; determining whether a target position corresponding to currently received positioning data is in a specified rule graph corresponding to a preset path or a preset area, wherein the preset path or the preset area is in the specified rule graph; And under the condition that the target position is not in the specified rule graph, determining that the target position deviates from the preset path or is not in the preset area. According to a second aspect of an embodiment of the present application, there is provided a data processing apparatus including: the receiving unit is used for receiving the positioning data report; the device comprises a receiving unit, a determining unit and a determining unit, wherein the receiving unit is used for receiving positioning data from a target position, and the determining unit is used for determining whether the target position corresponding to the positioning data received by the receiving unit is in a specified rule graph corresponding to a preset path or a preset area, wherein the preset path or the preset area is in the specified rule graph; And the processing unit is used for determining that the target position deviates from the preset path or is not in the preset area under the condition that the target position is not in the interior of the specified rule graph. According to a third aspect of embodiments of the present application, there is provided an electronic device comprising a processor and a memory, wherein, A memory for storing a computer program; and the processor is used for realizing the data processing method provided by the first aspect when executing the program stored in the memory. According to a fourth aspect of embodiments of the present application there is provided a machine-readable storage medium storing machine-executable instructions which, when executed by a processor, implement the data processing method provided in the first aspect. According to a fifth aspect of embodiments of the present application, there is provided a computer program stored on a machine-readable storage medium and which, when executed by a processor, causes the processor to perform the data processing method provided by the first aspect. According to a sixth aspect of embodiments of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, causes the processor to carry out the data processing method provided by the first aspect. According to the data processing method, through determining the specified rule graph corresponding to the preset path or the preset area, before calculating according to the specific algorithm, whether the position corresponding to the positioning data is located in the specified rule graph corresponding to the preset path or the preset area or not can be determined, and under the condition that the position corresponding to the positioning data is not located in the specified rule graph corresponding to the preset path or the preset area, calculation according to the specific algorithm is not needed, the position corresponding to the positioning data is directly determined to deviate from the preset path or is not located in the preset area, and the data processing pressure of the positioning data processing service is reduced. Drawings FIG. 1 is a schematic flow chart of a data processing method according to an embod