Disclosure of Invention
The invention aims to solve the technical problems and provide a method and a device for identifying abnormal time-space points, electronic equipment and a storage medium.
In order to solve the problems, the invention is realized according to the following technical scheme:
in a first aspect, the present invention provides a method for identifying abnormal spatiotemporal points, including the steps of:
Receiving a monitoring request to select a monitored space-time region;
Generating a space-time grid corresponding to the space-time region;
Traversing grid nodes of the space-time grid in a preset space-time core density estimation model through a grid search method, and outputting an estimated value, wherein the preset space-time core density estimation model comprises a paid order core density estimation model and an unpaid order core density estimation model, the grid nodes comprise paid order space-time data and unpaid space-time data, and the paid order space-time data and the unpaid space-time data comprise longitude and latitude data and time data;
and comparing the estimated value with a preset abnormal space-time threshold value, and identifying abnormal space-time points.
With reference to the first aspect, the present invention further provides an implementation manner of the 1 st aspect, after generating a space-time grid corresponding to the space-time area, the method further includes:
and receiving a resolution selection command, and re-dividing the space-time grid of the space-time region according to the resolution selection command.
With reference to the first aspect, the present invention further provides a2 nd implementation manner of the first aspect, wherein the comparing the estimated value with a preset abnormal space-time threshold value identifies abnormal space-time points, specifically:
And comparing the estimated value of the paid order core density estimation model with the estimated value of the unpaid order core density estimation model through a preset formula, and outputting a real value with monotonic meaning, wherein if the real value is larger than the preset abnormal space-time threshold value, the grid node is an abnormal space-time point.
With reference to the first aspect, the present invention further provides a3 rd implementation manner of the first aspect, where the expression of the preset formula is:
where K (x, y, t) is a real value, KDE up is an estimated value of the unpaid order core density estimation model, KDE p is an estimated value of the paid order core density estimation model, and input of KDE up is KDE up(x,y,t),KDEp and input of KDE p (x, y, t).
With reference to the first aspect, the invention further provides a4 th implementation manner of the first aspect, wherein the preset space-time kernel density estimation model is obtained by the following method, including:
acquiring space-time data of paid orders or unpaid space-time data of a passenger side, and establishing a space-time data set;
and carrying out kernel density estimation on each paid order space-time data or unpaid space-time data in the space-time data set by presetting a distribution function, a space bandwidth and a time bandwidth, and generating a kernel density estimation function corresponding to the space-time data set.
With reference to the first aspect, the present invention further provides a 5 th implementation manner of the first aspect, where the preset distribution function is a gaussian kernel function, and an expression of the kernel density estimation function is:
Wherein KDE (x, y, t) is a kernel density estimation value, n is the number of paid order spatiotemporal data or unpaid spatiotemporal data in the spatiotemporal data set, h 1 is a spatial bandwidth, h 2 is a time bandwidth, (x i,yi) is longitude and latitude data in ith paid order spatiotemporal data or unpaid spatiotemporal data, and t i is time data in ith paid order spatiotemporal data or unpaid spatiotemporal data.
In a second aspect, the present invention provides an apparatus for identifying abnormal spatiotemporal points, including:
the space-time region selection module is used for receiving the monitoring request to select the space-time region to be monitored;
the space-time grid generation module is used for generating a space-time grid corresponding to the space-time region;
the system comprises a traversing module, a computing module and a storage module, wherein the traversing module is used for traversing grid nodes of a space-time grid in a preset space-time core density estimation model through a grid searching method and outputting an estimated value, the preset space-time core density estimation model comprises a paid order core density estimation model and an unpaid order core density estimation model, the grid nodes comprise paid order space-time data and unpaid space-time data, and the paid order space-time data and unpaid space-time data comprise longitude and latitude data and time data;
the identification module is used for comparing the estimated value with a preset abnormal time-space threshold value and identifying abnormal time-space points.
With reference to the second aspect, the present invention further provides an implementation manner of the 1 st embodiment of the second aspect, further including:
And the space-time grid repartitioning module is used for receiving a resolution selection command and repartitioning the space-time grids of the space-time areas according to the resolution selection command.
In a third aspect, the present invention provides an electronic device, including at least one processor, and a memory communicatively connected to the at least one processor, where the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, where the at least one processor, when executing the instructions, specifically performs a method for identifying an abnormal temporal and spatial point according to any one of the first aspects.
In a fourth aspect, the present invention provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, specifically performs a method for identifying abnormal spatiotemporal points according to any of the first aspects.
Compared with the prior art, the invention has the beneficial effects that:
The paid order check density estimation model outputs an estimated value of a paid order, reflects the occurrence probability of the paid order of the grid node, outputs an estimated value of an unpaid order, reflects the occurrence probability of the unpaid order of the grid node, establishes a constraint of time dimension adjacency by introducing time data, further establishes a space-time check density estimation model, calculates the space-time distribution density of behaviors of the unpaid order and the paid order, further analyzes the occurrence frequency of the unpaid order and the occurrence frequency of the paid order, effectively identifies abnormal space-time points which present an aggregation state in a specific time period and a specific time region, compensates for the defects of the space and time cut analysis method, and effectively identifies the escape behavior of passengers.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are illustrated in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The term "comprising" and variations thereof as used herein means open ended, i.e., "including but not limited to. The term "or" means "and/or" unless specifically stated otherwise. The term "based on" means "based at least in part on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment. The term "another embodiment" means "at least one additional embodiment". The terms "first," "second," and the like, may refer to different or the same object. Other explicit and implicit definitions are also possible below.
The network vehicle field is generally operated in a mode that a passenger side requests a vehicle service, a driver side receives the request of the passenger side and generates a network vehicle order, when the network vehicle sends a passenger to an order end point, the passenger side pays the cost of the order to a network vehicle platform, and the network vehicle platform pays the cost of the order to the driver side. Due to the mode of operation of ordering and then paying, many passengers drill empty to generate the action of escaping from the bill. The platform is usually charged with the fare paid for the order to the driver, and then the platform reminds the passenger to pay the order in time in the form of short messages, telephone and APP message pushing, etc., but there are a large number of unpaid orders.
In the prior art, the account number of the passenger for the escape is usually monitored, but the escape passenger usually only uses the riding service of the network vehicle-restraining platform once, and discards the account number after the use is finished, and the passenger can be successfully registered only through the mobile phone number when registering the network vehicle-restraining platform, and the platform can not acquire the personal information of the passenger, so that the escape behavior of the passenger is difficult to effectively monitor.
In the related art, the Uber company provides a hexagonal hierarchical grid system H3, H3 as a grid-based spatial index, which uses hexagons as basic units of grid indexes, spreads the entire earth with hexagonal grids, encodes longitude and latitude according to different hexagonal areas, changes the codes into codes with different digits according to different grid precision, and has the same codes in the same area, and performs statistical analysis on the data by collecting codes containing longitude and latitude of the grid where an unpaid order is located, so as to identify space-time points of the unpaid order. However, the width of each hexagonal grid is preset, when the grid size needs to be adjusted, the whole grid index system needs to be re-established, and when the width of the hexagonal grid is too large, the accuracy is low, the longitude and latitude characteristics of the unpaid order are difficult to accurately identify, and if the width of the hexagonal grid is too small, a discontinuous blank area is easy to generate between adjacent grids, and the unpaid order in the blank area is easy to miss.
Example 1
As shown in fig. 1, in a first aspect, the present invention provides a method for identifying abnormal spatiotemporal points, including the following steps:
Receiving a monitoring request to select a monitored space-time region;
Generating a space-time grid corresponding to the space-time region;
Traversing grid nodes of the space-time grid in a preset space-time core density estimation model through a grid search method, and outputting an estimated value, wherein the preset space-time core density estimation model comprises a paid order core density estimation model and an unpaid order core density estimation model, the grid nodes comprise paid order space-time data and unpaid space-time data, and the paid order space-time data and the unpaid space-time data comprise longitude and latitude data and time data;
and comparing the estimated value with a preset abnormal space-time threshold value, and identifying abnormal space-time points.
In practice it has been found that most of the passengers who escape are scofflaw, they frequently produce escape behavior through the vulnerability of this payment mode, and that these passengers' escape sites usually occur within a certain time period and a certain area, are aggregated to some extent in time and space, and the platform can effectively identify the escape passengers by identifying these areas of unpaid orders that exhibit an aggregated form and unpaid time periods, and marking these areas as abnormal spatiotemporal points by analyzing these abnormal spatiotemporal points.
In this embodiment, the paid order core density estimation model outputs an estimated value of a paid order, reflects the occurrence probability of the paid order of the grid node, outputs an estimated value of an unpaid order, reflects the occurrence probability of the unpaid order of the grid node, establishes a constraint of time dimension proximity by introducing time data, further establishes a space-time core density estimation model, calculates the space-time distribution density of behaviors of the unpaid order and the paid order, further analyzes the occurrence frequency of the unpaid order and the occurrence frequency of the paid order, effectively identifies abnormal space-time points which present an aggregation state in a specific time period and a specific time region, compensates for the defects of the space-time splitting analysis method, and effectively identifies the escape behavior of a passenger.
And step 1, receiving a monitoring request to select a monitored space-time area.
Specifically, before a space-time area is selected, a space area showing an aggregation state is analyzed and searched by establishing a space kernel density estimation model, an aggregation time period is searched by establishing a data clock, a monitoring request is received, a time area with the aggregation space area and the aggregation time period is selected as a monitoring area, the specific longitude and latitude areas of the areas are identified, more unpaid orders are in the specific time period, and the escape behavior is effectively identified.
And 2, generating a space-time grid corresponding to the space-time region.
Specifically, a square is used as a basic unit of a grid index, a square grid is paved in the whole space-time area, longitude and latitude are coded according to different square areas, codes with different digits are changed into codes with the same number of digits in the same area, codes containing the longitude and latitude of the grid where an unpaid order and a paid order are located are collected, if the first five digits of two coordinates are the same, the two coordinates are indicated to be located in the same space-time grid in five-level precision, if the first five digits of the two coordinates are the same, the sixth digits are different, the two coordinates are indicated to be located in the same space-time grid in five-level precision, and the two coordinates are indicated to be located in different space-time grids in six-level precision.
In another embodiment, the entire spatio-temporal region is filled with a regular triangle or hexagonal grid using the regular triangle or hexagon as the base unit of the grid index. Because the area perimeter of the hexagon is lower, sample deviation caused by the boundary effect of the grid shape can be reduced, the distances between the centers of mass of the hexagon grid and surrounding grids are equal, gaps are not reserved after the hexagon grid is paved in the whole space-time area, and all adjacent space-time grids can be found out more conveniently and rapidly when the space-time grids in the adjacent field are found out.
And 3, traversing grid nodes of the space-time grid in a preset space-time core density estimation model through a grid search method, and outputting an estimated value, wherein the preset space-time core density estimation model comprises a paid order core density estimation model and an unpaid order core density estimation model, the grid nodes comprise paid order space-time data and unpaid space-time data, and the paid order space-time data and the unpaid space-time data comprise longitude and latitude data and time data.
Specifically, the grid search method trains unpaid data and paid order data in each grid node through a space-time kernel density estimation model according to the coding sequence, wherein the unpaid order space-time data is trained through the unpaid order kernel density estimation model to obtain a kernel density estimation value KDE up of an unpaid order of the grid node, the paid order space-time data is trained through the paid order kernel density estimation model to obtain a kernel density estimation value KDE p of a paid order of the grid node, and the grid search method can avoid missing the unaware, hidden grid nodes and missing and identifying abnormal space-time points in the space-time region.
Specifically, the preset space-time kernel density estimation model is obtained by the following method, which comprises the following steps:
step 301, acquiring space-time data of paid orders or unpaid space-time data of passenger terminals, and establishing a space-time data set;
and 302, carrying out kernel density estimation on each paid order space-time data or unpaid space-time data in a space-time data set through a preset distribution function, a space bandwidth and a time bandwidth, and generating a kernel density estimation function corresponding to the space-time data set.
The preset distribution function is a Gaussian kernel function, and the expression of the kernel density estimation function is as follows:
Wherein KDE (x, y, t) is a kernel density estimation value, n is the number of paid order spatiotemporal data or unpaid spatiotemporal data in the spatiotemporal data set, h 1 is a spatial bandwidth, h 1∈(0.05,2),h2 is a time bandwidth, h 2∈(0.05,2),(xi,yi) is longitude and latitude data in ith paid order spatiotemporal data or unpaid spatiotemporal data, and t i is time data in ith paid order spatiotemporal data or unpaid spatiotemporal data.
Specifically, as the longitude and latitude data of discrete distribution are difficult to capture relatively fine continuous changes, and the preset distribution function adopts a Gaussian kernel function, the Gaussian kernel function can be used for cross beam similarity among different longitude and latitude data, and in a certain area, the longitude and latitude data are better gathered together, so that the starting point position data become linearly separable, and the accuracy of the kernel density estimation function is improved. Meanwhile, on the basis of longitude and latitude data, time data are introduced, time dimension adjacent constraint is established, a space-time kernel density estimation model is further established, the space-time distribution density of the actions of the unpaid order and the paid order is calculated, the occurrence frequency of the unpaid order and the occurrence frequency of the paid order are further analyzed, abnormal space-time points which are in an aggregation state in a specific time period and a specific time area are effectively identified, the defect of a space-time splitting analysis method is overcome, and the escape action of passengers is effectively identified.
The space bandwidth and the time bandwidth can be adaptively adjusted, when the space bandwidth and the time bandwidth are large, the curve corresponding to the kernel function is smooth, contains less details and large errors, and when the space bandwidth and the time bandwidth are small, the curve corresponding to the kernel function is sharp in wave break, contains more noise and is unfavorable for analyzing and finding out abnormal space-time points. The space bandwidth can be adjusted according to the number of unpaid orders and the number of paid orders in the space-time grid, so that whether the space-time node is an abnormal space-time point can be clearly identified.
And 4, comparing the estimated value with a preset abnormal space-time threshold value, and identifying abnormal space-time points.
Specifically, the estimated value of the paid order core density estimation model and the estimated value of the unpaid order core density estimation model are compared through a preset formula, a real value with monotonic meaning is output, and if the real value is larger than the preset abnormal space-time threshold, the grid node is an abnormal space-time point.
The expression of the preset formula is as follows:
where K (x, y, t) is a real value, KDE up is an estimated value of the unpaid order core density estimation model, KDE p is an estimated value of the paid order core density estimation model, and input of KDE up is KDE up(x,y,t),KDEp and input of KDE p (x, y, t).
For example, the larger the number of K (x, y, t) indicates the difference between the unpaid order and the paid order of the grid node, the more the grid node occupies the unpaid order, the more likely the grid node is an abnormal space-time point, the important monitoring and prevention are needed during the time period, and the longitude and latitude are the orders of the place.
Preferably, after generating the space-time grid corresponding to the space-time region, the method further includes:
and 5, receiving a resolution selection command, and re-dividing the space-time grid of the space-time region according to the resolution selection command.
When the precision of the first time divided space-time grids is higher, namely the number of the space-time grids in the space-time area is higher, the area divided by each space-time grid is smaller, the data are more analyzed, and the maintenance time is longer. At this time, the number of the space-time grids can be selected appropriately by resetting the resolution, so that the abnormal space-time points in the space-time grids can be conveniently and rapidly and accurately searched.
In summary, when the method is executed, on the one hand, on the basis of longitude and latitude data, the method disclosed by the invention establishes a constraint of time dimension proximity by introducing time data, further establishes a space-time kernel density estimation model, calculates the space-time distribution density of actions of unpaid orders and paid orders, further analyzes the occurrence frequency of unpaid orders and the occurrence frequency of paid orders, effectively identifies abnormal space-time points which are in an aggregation state in a specific time period and a specific time region, compensates for the defects of the method of space and time splitting analysis, and effectively identifies the escape actions of passengers. On the other hand, by resetting the resolution, the number of the appropriate space-time grids is selected, so that abnormal space-time points in the space-time grids can be conveniently and quickly and accurately searched. In addition, the grid search method can avoid missing the imperceptible and hidden grid nodes in the space-time area and avoid missing and identifying abnormal space-time points
The other steps of the method for identifying abnormal spatiotemporal points according to the invention refer to the prior art.
Example 2
As shown in fig. 2, in a second aspect, the present invention discloses an apparatus for identifying abnormal spatiotemporal points, which includes a spatiotemporal region selection module M1, a spatiotemporal grid generation module M2, a traversal module M3, and an identification module M4.
The space-time region selecting module M1 is used for receiving a monitoring request to select a space-time region to be monitored;
The space-time grid generating module M2 is used for generating a space-time grid corresponding to the space-time region;
the traversing module M3 is used for traversing grid nodes of the space-time grid in a preset space-time core density estimation model through a grid searching method and outputting an estimated value, wherein the preset space-time core density estimation model comprises a paid order core density estimation model and an unpaid order core density estimation model, the grid nodes comprise paid order space-time data and unpaid space-time data, and the paid order space-time data and the unpaid space-time data comprise longitude and latitude data and time data;
the identifying module M4 is configured to compare the estimated value with a preset abnormal space-time threshold value, and identify an abnormal space-time point.
For the second aspect, further comprising the 1 st preferred implementation, further comprising a repartitioning space-time grid module M5.
The space-time grid repartitioning module M5 is configured to receive a resolution selection command, and repartition the space-time grid of the space-time region according to the resolution selection command.
In summary, the apparatus of this embodiment can implement all the steps of the method for identifying abnormal time-space points described in embodiment 1 during operation, so as to achieve the technical effects achieved in embodiment 1.
Other structures of the device for identifying abnormal spatiotemporal points described in this embodiment are referred to in the prior art.
Example 3
The invention also discloses an electronic device, at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, and the at least one processor executes the instructions, specifically realizes the following steps:
Receiving a monitoring request to select a monitored space-time region;
Generating a space-time grid corresponding to the space-time region;
Traversing grid nodes of the space-time grid in a preset space-time core density estimation model through a grid search method, and outputting an estimated value, wherein the preset space-time core density estimation model comprises a paid order core density estimation model and an unpaid order core density estimation model, the grid nodes comprise paid order space-time data and unpaid space-time data, and the paid order space-time data and the unpaid space-time data comprise longitude and latitude data and time data;
and comparing the estimated value with a preset abnormal space-time threshold value, and identifying abnormal space-time points.
Example 4
The invention also discloses a storage medium storing a computer program which, when executed by a processor, realizes the following steps:
Receiving a monitoring request to select a monitored space-time region;
Generating a space-time grid corresponding to the space-time region;
Traversing grid nodes of the space-time grid in a preset space-time core density estimation model through a grid search method, and outputting an estimated value, wherein the preset space-time core density estimation model comprises a paid order core density estimation model and an unpaid order core density estimation model, the grid nodes comprise paid order space-time data and unpaid space-time data, and the paid order space-time data and the unpaid space-time data comprise longitude and latitude data and time data;
and comparing the estimated value with a preset abnormal space-time threshold value, and identifying abnormal space-time points.
The present disclosure may be methods, apparatus, systems, and/or computer program products. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for performing aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical encoding device, punch cards or intra-groove protrusion structures such as those having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The computer readable program instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as SMALLTALK, C ++, java, or the like and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
The embodiments of the present disclosure have been described above, the foregoing description is illustrative, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.