Real-time detection method and system for vehicle traffic accidents based on machine learning

By constructing node information vectors and calculating information correlation, combined with GPS data analysis, adjusting the belonging neighborhood distance, and using OPTICS clustering, the problem of ignoring sequential correlation features in traditional methods is solved, and the accuracy and efficiency of vehicle traffic accident detection are improved. sex.

CN118314727BActive Publication Date: 2024-09-24BEIJING BOTPY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410487809.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2024-09-24
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

The traditional density clustering algorithm ignores the road sequence correlation characteristics in vehicle traffic accident prediction, making it difficult to distinguish the causes of abnormal changes in traffic flow information and affecting detection accuracy.

Method used

By constructing node information vectors, calculating information correlation and responsiveness, combined with GPS data analysis, adjusting the distance distribution of subordinate neighborhoods, using OPTICS clustering, and reclassifying nodes to achieve real-time detection of vehicle traffic accidents.

Benefits of technology

It improves the accuracy and efficiency of vehicle traffic accident detection, takes into account the correlation characteristics of different locations on the road, and enhances the reliability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118314727B
    Figure CN118314727B
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and in particular to a real-time detection method and system for vehicle traffic accidents based on machine learning, including: constructing a node information vector according to the node information of each road section, obtaining the abnormal node information vector of each road section; obtaining the information relevance of each node according to the node information vector of the same node and the abnormal node information vector of the road section to which it belongs, and further obtaining the information responsiveness of each node, thereby clustering to obtain the relevance of each node, further obtaining the membership of each node and the membership neighborhood of each node, adjusting the distance between each node and different nodes in the membership neighborhood of each node, re-clustering to obtain a node set, and realizing real-time detection of vehicle traffic accidents. The present invention solves the problem of neglecting the correlation features of different positions in the order in the process of abnormal positioning analysis of vehicle traffic accidents by traditional density clustering, and improves the accuracy of real-time detection of vehicle traffic accidents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and specifically to a real-time detection method and system for vehicle traffic accidents based on machine learning. Background Art

[0002] The main reasons for frequent traffic accidents include insufficient understanding of the vehicle conditions ahead, changing road conditions, and traffic congestion. By using machine learning algorithms to model and predict information related to vehicle driving on the road, the probability of traffic accidents can be accurately analyzed during the changing traffic flow at different locations on the road. This method helps to identify potential accident risks more quickly and issue warnings to drivers or relevant departments, thereby effectively reducing the possibility of traffic accidents and improving the overall safety of road traffic.

[0003] The OPTICS density clustering algorithm is usually used to cluster the information related to vehicle driving on the road to accurately extract the location of abnormal information caused by vehicle traffic accidents, which is convenient for the construction of subsequent vehicle traffic accident prediction models. However, the influence of the spatial sequential correlation characteristics of the road makes the traffic information at different locations of the road section have great similarity, making it difficult to effectively distinguish the information changes of vehicle traffic accidents from accidental construction and traffic information changes caused by pedestrians. In the traditional density clustering process of abnormal location analysis of vehicle traffic accidents, the spatial geometric distance of different locations is used as a measure of similarity, which ignores the correlation characteristics of different locations in the order, resulting in incorrect analysis of the reasons for abnormal changes in traffic information, affecting the construction of vehicle traffic accident prediction models, and reducing the accuracy of real-time detection of vehicle traffic accidents. Therefore, it is necessary to flexibly adjust the data processing strategy of edge computing in combination with the changing characteristics of traffic information response to ensure the efficiency and accuracy of real-time detection results of vehicle traffic accidents. Summary of the invention

[0004] The present invention provides a real-time detection method and system for vehicle traffic accidents based on machine learning to solve existing problems.

[0005] The vehicle traffic accident real-time detection method and system based on machine learning of the present invention adopts the following technical solutions:

[0006] An embodiment of the present invention provides a method and system for real-time detection of vehicle traffic accidents based on machine learning, the method comprising the following steps:

[0007] Each vehicle information detection position on the same road section is recorded as a node, the node information of each node on the same road section at each sampling time is collected, and the node information vector of each node at each sampling time is constructed according to the node information;

[0008] According to the difference between the node information vectors of different nodes in each road section and the numerical changes of the overall node information vector, the abnormal node information vector of each road section is obtained; according to the node information vector of the same node at each sampling time and the abnormal node information vector of the road section to which it belongs, the information relevance of each node at each sampling time is obtained;

[0009] The information responsiveness of each node is obtained based on the information relevance of each node at each sampling moment and the time interval of abnormal changes in the same node;

[0010] Clustering is performed based on the information responsiveness and positional relationship of each node in each road section to obtain the node output sequence of each road section; the relevance of each node is obtained based on the difference in information responsiveness between adjacent nodes in the node output sequence;

[0011] The membership neighborhood of each node is constructed according to the spatial position relationship between different nodes, and the membership degree of each node to the membership neighborhood of each node is obtained according to the difference in the association degree between each node and different nodes in the membership neighborhood of the same node;

[0012] According to the degree of membership between each node and its neighborhood, the distance distribution between different nodes in the neighborhood is adjusted, and the node set is reclassified; the node set is used to realize real-time detection of vehicle traffic accidents.

[0013] Furthermore, the abnormal node information vector of each road section is obtained according to the difference between the node information vectors of different nodes of each road section and the value change of the overall node information vector, and the specific steps include the following:

[0014] The GPS data analysis algorithm is used to analyze the vehicle GPS time data of all sampling moments of each node, obtain the residence time of all vehicles at each collection moment on the node, and calculate the mean residence time of all vehicles at each node. When the residence time of the existing vehicle at the sampling moment of the node is greater than the mean residence time of all vehicles on this node, the node information vector of the node at this sampling moment is recorded as the abnormal node information vector.

[0015] Furthermore, the information relevance of each node at each sampling moment is obtained based on the node information vector of the same node at each sampling moment and the abnormal node information vector of the corresponding road section, including the following specific steps:

[0016] The calculation method of the information relevance of the ith node at the tth sampling time is:

[0017]

[0018] In the formula, f i,trepresents the information relevance of the ith node at the tth sampling time; ρ i,t represents the node information vector of the ith node at the tth sampling time; Represents the standard node information vector of the target road segment; n i It represents the number of abnormal node information vectors of the i-th node; exp() represents an exponential function with a natural constant as the base; || represents the absolute value function.

[0019] Furthermore, the specific method of obtaining the standard node information vector is as follows:

[0020] In the node information vectors of all nodes in the same section at all sampling moments, the mean of each element of the node information vector is calculated, and the mean of all elements in the same section constitutes the standard node information vector of the target section.

[0021] Furthermore, the information responsiveness of each node is obtained according to the information relevance of each node at each sampling moment and the time interval of abnormal changes in the same node, and the specific steps include the following:

[0022]

[0023] In the formula, α i represents the information responsiveness of the i-th node; f i,t represents the information relevance of the ith node at the tth sampling time; n i represents the number of abnormal node information vectors of the i-th node; T i,r-1 represents the sampling time corresponding to the r-1th abnormal node information vector of the i-th node; T i,r represents the sampling time corresponding to the rth abnormal node information vector of the i-th node; dtw() represents the function for calculating the DTW score; G({f i,t}) represents the Gaussian weight sequence of the information correlation sequence of all sampling moments of the i-th node after being processed by the Gaussian function; norm() is the linear normalization function; || represents the absolute value function.

[0024] Furthermore, the step of obtaining the relevance of each node according to the difference in information responsiveness between adjacent nodes in the node output sequence includes the following specific steps:

[0025]

[0026] In the formula, θ i represents the association degree of the i-th node, α i represents the information responsiveness of the i-th node, α i-1 represents the information responsiveness of the i-1th node, It represents the mean of the information responsiveness of all nodes in the neighborhood of the ith node in the node output sequence of the ith node. exp() represents an exponential function with a natural constant as the base. || represents the absolute value function.

[0027] Furthermore, the step of obtaining the degree of membership of each node with the neighborhood of each node according to the difference in the degree of association between each node and different nodes in the neighborhood of the same node comprises the following specific steps:

[0028]

[0029] In the formula, σ a represents the degree of membership of the a-th node to its neighboring region; R a Indicates the number of nodes in the neighborhood of the a-th node; The ath node belongs to the neighborhood of The relevance of nodes; represents the a-th node's neighborhood The relevance of nodes; The ath node belongs to the neighborhood of The node information vector of the nodes; represents the a-th node's neighborhood The node information vector of the nodes; exp() represents an exponential function with a natural constant as the base, and || represents an absolute value function.

[0030] Furthermore, the method of adjusting the distance distribution between each node and different nodes in the neighborhood of each node according to the degree of membership between each node and the neighborhood of each node, and reclassifying to obtain a node set includes the following specific steps:

[0031] According to the adjusted distance between each node of the target road section and different nodes in the neighborhood of each node, OPTICS clustering is performed, and the clustering result is a set of nodes.

[0032] Furthermore, the specific method of obtaining the adjustment distance is as follows:

[0033]

[0034] In the formula, represents the adjusted distance between the a-th node and the b-th node in the a-th node's neighborhood; d a,b represents the Euclidean distance between the a-th node and the b-th node in the a-th node's neighborhood; σ a represents the degree of membership of the a-th node to the a-th node's membership neighborhood; σ b Indicates the degree of membership of the b-th node to the membership neighborhood of the b-th node; It represents the mean of the difference between the membership degree of the a-th node and its neighborhood, and the membership degree of each node in the a-th node's neighborhood and its neighborhood.

[0035] The present invention also proposes a real-time vehicle traffic accident detection system based on machine learning, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned real-time vehicle traffic accident detection method based on machine learning.

[0036] The beneficial effects of the technical solution of the present invention are as follows: the present invention obtains the node information vector of each node in the same road section at each sampling time, which is used to reflect the distribution characteristics of the node information change, so as to analyze the information relevance of each node at each sampling time; according to the information relevance of each node at each sampling time and the time interval of abnormal changes in the same node, the information responsiveness of each node is obtained, reflecting the short-time response characteristics of abnormal changes in the node information of multiple vehicles at the current node at this node; clustering is performed according to the information responsiveness and position relationship of each node in each road section, and the node output sequence of each road section is obtained, and the node output sequence of each road section is obtained according to the node output The difference in information responsiveness between adjacent nodes in the sequence is used to obtain the correlation of each node, thereby obtaining the correlation degree of the difference in information responsiveness between two adjacent nodes; the degree of membership between each node and each node's affiliated neighborhood is obtained according to the difference in the degree of association between each node and different nodes in the affiliated neighborhood of the same node, which is used to measure the necessity of adjusting the affiliated relationship between the node and the nodes in the affiliated neighborhood within the divided interval; according to the degree of membership between each node and each node's affiliated neighborhood, the distance distribution between each node and different nodes in the affiliated neighborhood of each node is adjusted, and the node set is re-clustered to achieve real-time detection of vehicle traffic accidents. The present invention takes into account the association characteristics of different positions in the same road section, and combines the changing characteristics of the traffic flow information response, thereby improving the efficiency and accuracy of the real-time detection results of vehicle traffic accidents. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 The present invention is a flowchart of the steps of the real-time detection method of vehicle traffic accidents based on machine learning. DETAILED DESCRIPTION

[0039] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the real-time detection method and system for vehicle traffic accidents based on machine learning proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in an embodiment may be combined in any suitable form.

[0040] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0041] The specific scheme of the real-time vehicle traffic accident detection method and system based on machine learning provided by the present invention is described in detail below with reference to the accompanying drawings.

[0042] First, see Figure 1 , which shows a flowchart of a method for real-time detection of vehicle traffic accidents based on machine learning provided by an embodiment of the present invention, the method comprising the following steps:

[0043] Step S001: Utilize the vehicle traffic status information extraction terminal and sensor to collect the node information sequence of each node.

[0044] Specifically, each vehicle information detection position in the same road section is recorded as a node, and node information is collected at different nodes in the same road section through the vehicle traffic condition information extraction terminal and sensor. The multiple vehicle information detected at each node is recorded as the node information under the node. The node information includes the arrival node timestamp, departure node timestamp, vehicle type and pedestrian flow data of the multiple vehicles detected. All the detected data are digitized. The digitization method adopted in this embodiment is binary coding. Other embodiments may use other digitization methods for description, which is not specifically limited in this embodiment; the terminal and the sensor collect node information once every ten minutes as a sampling moment, and the node information obtained at all sampling moments of each node within a month constitutes the node information sequence described in this embodiment; it should be noted that this embodiment is described with the sampling time interval of ten minutes and the statistical information range of one month as an example. Other embodiments can be set to other values, which are not specifically limited in this embodiment.

[0045] According to the above method, the node information sequence of each node is obtained.

[0046] Step S002: Obtain the information responsiveness of each node according to the node information sequence of each node, the information relevance of each node at each sampling moment and the neighborhood of the sampling moment.

[0047] It should be noted that traffic accidents and other factors affecting traffic conditions on the same road section will manifest as abnormal changes in node information, but traffic congestion caused by traffic accidents is more random and has no necessary connection with the location of the node. Therefore, by analyzing the characteristics of the node distribution structure and obtaining the node information responsiveness, the possibility of abnormal changes in node information being a traffic accident is extracted based on the node information responsiveness.

[0048] Specifically, any road section is recorded as the target road section. This embodiment performs analysis based on the target road section. In this embodiment, all nodes are nodes of the target road section. The analysis method for other road sections is the same as that for the target road section. All data in the node information at each sampling moment in the node information sequence of each node in the target road section are classified into {vehicle 1 arrival node timestamp, vehicle 1 departure node timestamp, vehicle 1 type; vehicle 2 arrival node timestamp, vehicle 2 departure node timestamp, vehicle 2 type; ...; node pedestrian flow; node construction status; ...} to form a node information vector for each sampling moment of each node, and each data in each node information vector is an element.

[0049] It should be noted that there are many reasons for traffic congestion on the road. Among them, the node information belonging to traffic accidents has randomness in position and short-time response characteristics in time span. Therefore, the congestion phenomenon caused by traffic accidents does not have temporal correlation. The information correlation of the node is obtained based on the significance of the node information vector of the node at a single sampling moment and the congestion status of this node position at multiple sampling moments.

[0050] Specifically, according to the node information vector of the same node at each sampling time and the number of abnormal node information vectors of the node, the calculation method for obtaining the information relevance of the i-th node at the t-th sampling time is:

[0051]

[0052] In the formula, f i,t represents the information relevance of the ith node at the tth sampling time; ρ i,t represents the node information vector of the ith node at the tth sampling time; represents a standard node information vector of the target road section, wherein the standard node information vector is obtained by calculating the mean of all elements in the node information vectors of all nodes of the target road section at all sampling moments, and the mean of all elements constitutes the standard node information vector of the target road section; n irepresents the number of abnormal node information vectors of the ith node. The abnormal node information is obtained by using a GPS data analysis algorithm to collect vehicle GPS data at all sampling moments of each node, obtain the residence time of all vehicles at each collection moment on the node, and calculate the mean of all vehicle residence times at each node. When the residence time of a vehicle at a sampling moment of a node is greater than the mean of the residence time of all vehicles at this node, the node information vector of the node at this sampling moment is recorded as an abnormal node information vector; when the residence time of a vehicle at a sampling moment of a node is less than or equal to the mean of the residence time of all vehicles at this node, the node information vector of the node at this sampling moment is recorded as a normal node information vector. exp() represents an exponential function with a natural constant as the base, and || represents an absolute value function.

[0053] It measures the average level of node information of all nodes at all sampling moments, and mainly represents the average characteristics of node information changes generated when all vehicles are driving normally; It represents the difference between the node information vector of the ith node at the tth sampling moment and the mean of the node information vectors of all nodes at all sampling moments, and measures the relationship between the value of the ith node at the tth sampling moment and the scene, i.e., significance, which further affects the relationship of information relevance. When the value is larger, the difference with the mean is larger, i.e., the significance is greater, and the information relevance of the ith node at the tth sampling moment is smaller; It represents the significance of the node information vector of the ith node at the tth sampling moment in the node information vectors with abnormal changes at all sampling moments of the ith node, and measures the relationship between the significance and the current scene. The greater the significance, the smaller the information relevance of the ith node at the tth sampling moment.

[0054] It should be further explained that due to the randomness of the position of the node information of traffic accidents and the short-time response characteristics in the time span, the spatial distance distribution structure is extracted at the actual spatial position between the nodes, and the information responsiveness of each node is obtained through the changes in the time span of the sampling moments corresponding to multiple abnormal information, that is, the information correlation of each node in time and space.

[0055] Specifically, the information responsiveness of each node is obtained according to the information relevance of each node of the target road section at each sampling time and the neighborhood at the sampling time. The information responsiveness of the i-th node is calculated as follows:

[0056]

[0057] In the formula, α i represents the information responsiveness of the i-th node; f i,trepresents the information relevance of the ith node at the tth sampling time; {f i,t} represents the information correlation sequence composed of the information correlation of all nodes in the neighborhood of the i-th node at the t-th sampling time. This embodiment takes the current node as the center and the neighborhood range with a neighborhood radius of 5 as an example for description. Other embodiments may be set to other values, which are not specifically limited in this embodiment; G({f i,t}) represents the Gaussian weight sequence of the information correlation sequence of all sampling moments of the i-th node after being processed by the Gaussian function; n i represents the number of abnormal node information vectors of the i-th node; T i,r-1 represents the sampling time corresponding to the r-1th abnormal node information vector of the i-th node; T i,r represents the sampling time corresponding to the rth abnormal node information vector of the ith node, norm() is a linear normalization function that normalizes the data value to the interval [0,1], and || represents the absolute value function.

[0058] α i It reflects the short-term response characteristics of abnormal changes in the node information of multiple vehicles at the current node; G({f i,t}) measures the distance weight between nodes; dtw({f i,t},G({f i,t})) represents the dtw score of the information correlation sequence and the Gaussian weight sequence after the information correlation sequence is processed by the Gaussian function, that is, the consistency of the change of the information correlation degree and the distance between the nodes between the i-th node and its surrounding neighborhood nodes. The larger the value, the less the information difference of this node information in the neighborhood conforms to the Gaussian distribution characteristics, and the greater the possibility that the abnormal performance of the node in the data is caused by a traffic accident; |T i,r-1 -T i,r | represents the time difference between two adjacent moments when the node information of the i-th node undergoes an abnormal change. It represents the time span between the two abnormal changes. The larger the time span, the greater the chance of data anomaly occurring at the i-th node, and the greater the possibility that it is caused by a traffic accident.

[0059] Similarly, the information relevance of each node at each collection moment is obtained according to the node information vector of each node at each collection moment, and the information responsiveness of each node is obtained according to the information relevance of each node at all collection moments.

[0060] Step S003: Obtain the association degree of each node in the target section according to the difference in information responsiveness between each node in the target section and other nodes in the node output sequence; obtain the membership degree of each node with its belonging neighborhood according to the difference in association degree between each node and other nodes in its belonging neighborhood in the belonging neighborhood of each node in the target section.

[0061] It should be noted that the obtained node information responsiveness is the credibility of the node information change analyzed from the change structure of the node position sequence. In actual vehicle traffic accident detection, the proportion of nodes where traffic accidents occur in the same road section is relatively small. In the process of clustering all nodes in the same road section using the OPTICS clustering algorithm, the position information corresponding to the non-clustered nodes should be guaranteed. The OPTICS clustering algorithm is a well-known technology, and the specific implementation process is not repeated in this embodiment. Therefore, the node information responsiveness is used to adjust the distance of the node's correlation measurement index when the OPTICS clustering algorithm is performed to obtain accurate clustering results.

[0062] Specifically, a two-dimensional sample space is constructed for all nodes of the target section, with the horizontal axis being the position of each node in the target section in order, and the vertical axis being the information responsiveness of each node; in the two-dimensional sample space of the target section, the position of each node and the information responsiveness of each node constitute a sample point, and the OPTICS clustering algorithm is used to cluster the two-dimensional sample space of the target section. The cluster sequence of the OPTICS clustering result is recorded as the node output sequence of the target section. Each sample point in the node output sequence has the attributes of reachable distance and core distance. According to the difference in information responsiveness between each node of the target section and other nodes in the node output sequence, the association degree of each node is obtained, and the calculation formula of the association degree of the i-th node is:

[0063]

[0064] In the formula, θ i represents the association degree of the i-th node, α i represents the information responsiveness of the i-th node, α i-1 represents the information responsiveness of the i-1th node, It represents the mean of the information responsiveness of all nodes in the neighborhood of the ith node in the node output sequence of the ith node. exp() represents an exponential function with a natural constant as the base. || represents the absolute value function.

[0065] It indicates the degree of correlation between the difference in information responsiveness of two adjacent nodes in the output order of the i-th node. The lower the correlation, the higher the similarity between the information response performance of the i-th node and the i-1-th node due to the information change caused by the traffic accident. The greater the possibility that the two nodes belong to the same type of nodes, the greater the node association.

[0066] It should be noted that when the vehicle information of the current node changes, the relationship between nodes should be the correlation under the information responsiveness analysis. Therefore, in the process of clustering, the positions of the nodes should be adjusted according to the node order to achieve the node membership clustering cluster adjustment. Therefore, it is necessary to first obtain the node membership based on the node association and the node information vector.

[0067] Specifically, according to the clustering result of the OPTICS clustering algorithm on the two-dimensional sample space of the target road section, the membership neighborhood range of the current node is set to the adjacent left cluster cluster, the cluster cluster where the current node is located, and the adjacent right cluster cluster. In the membership neighborhood of each node of the target road section, according to the difference in the association degree between each node and other nodes in its membership neighborhood, the calculation formula for obtaining the membership degree of each node and the membership neighborhood of each node is as follows:

[0068]

[0069] In the formula, σ a represents the degree of membership of the a-th node to its neighboring region; R a Indicates the number of nodes in the neighborhood of the a-th node; represents the a-th node's neighborhood The relevance of nodes; represents the a-th node's neighborhood The relevance of nodes; represents the a-th node's neighborhood The node information vector of the nodes; represents the a-th node's neighborhood The node information vector of the nodes, || represents the absolute value function, and exp() represents the exponential function with a natural constant as the base.

[0070] Measures the necessity of adjusting the affiliation relationship between a node and the nodes in its neighborhood within the partition interval. The smaller the value, the greater the necessity of adjusting the affiliation relationship, indicating that the current node clustering is more unreasonable and the distance adjustment should be performed to achieve a new partition.

[0071] According to the above method, the degree of membership of each node and its neighboring regions is obtained.

[0072] Step S004: According to the degree of membership of each node and other nodes in its neighborhood, the Euclidean distance between each node and other nodes in the neighborhood is adjusted to obtain the adjusted distance between all nodes and other nodes.

[0073] It should be noted that there is a certain quantization error in the actual process of extracting nodes with abnormal information caused by traffic accidents, that is, there is an error in measuring small-range fluctuations in information such as the congestion conditions of nodes on the corresponding roads, which is manifested as small-range fluctuations in the values ​​of the membership between nodes. This is considered to be an acceptable error. Therefore, it is necessary to set a threshold to extract nodes with larger membership for adjustment.

[0074] Specifically, a membership threshold T is preset. This embodiment is described with a membership threshold T=0.75. Other embodiments may be set to other values. This embodiment does not specifically limit this. When the membership of the a-th node and the membership neighborhood of the a-th node meets the conditions, it is recorded as a node to be adjusted. The calculation formula for the adjustment distance between each node to be adjusted and the nodes in the membership neighborhood of each node to be adjusted is:

[0075]

[0076] In the formula, represents the adjusted distance between the a-th node and the b-th node in the a-th node's neighborhood; d a,b represents the Euclidean distance between the a-th node and the b-th node in the a-th node's neighborhood; σ a represents the degree of membership of the a-th node to the a-th node's membership neighborhood; σ b Indicates the degree of membership of the b-th node to the membership neighborhood of the b-th node; It represents the mean of the difference between the membership degree of the a-th node and its neighborhood, and the membership degree of each node in the a-th node's neighborhood and its neighborhood. || represents the absolute value function.

[0077] It represents the similarity index between nodes after membership adjustment in the sample space, that is, the accurate similarity measurement under the mutual influence of multiple nodes when abnormal conditions occur at nodes on the road. The larger the value of the adjusted distance, the greater the difference between nodes, and the more likely they are to be divided into different clusters in the subsequent clustering process.

[0078] Furthermore, when the condition is not met, the adjusted distance between each node and the nodes in the neighborhood is the Euclidean distance.

[0079] Specifically, the OPTICS clustering algorithm is performed according to the adjusted distance between each node and the nodes in the neighborhood to obtain the OPTICS clustering result.

[0080] According to the above method, the OPTICS clustering results of all nodes on the same road section are obtained.

[0081] Step S005: clustering is performed according to the adjusted distances between the node and other nodes to obtain a node set, and the node set is used to realize real-time detection of vehicle traffic accidents.

[0082] Specifically, according to the OPTICS clustering results of all nodes on the same road section, the clustering results include clustering clusters and node sets. The node sets other than the clustering clusters in the clustering results are the accurate traffic accident training data that need to be calculated and processed first. The deep learning neural network is used to build a vehicle traffic accident prediction model based on the extracted accurate traffic accident training data. When the predicted results show that a traffic accident may occur, the edge computing power at the possible accident site is transferred to other nodes first to ensure the smoothness and feasibility of information interaction between vehicles and roads. The data processing strategy of edge computing is completed, and the efficient and accurate acquisition of the results of real-time detection of vehicle traffic accidents is achieved.

[0083] According to the above method, the result of real-time detection of vehicle traffic accidents is obtained.

[0084] In the second aspect, in an embodiment of the present invention, the present invention also provides a real-time vehicle traffic accident detection system based on machine learning, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program stored in the memory to implement the steps of the aforementioned real-time vehicle traffic accident detection method based on machine learning.

[0085] It should be noted that the exp(-x) model used in this embodiment only indicates that the result of the negative correlation and constraint model output is in the interval (0,1], where x is the input of this model. It can be replaced by other models with the same purpose during specific implementation. This embodiment only takes the exp(-x) model as an example for description without making any specific limitation.

[0086] So far, the present invention is completed.

[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A real-time detection method for vehicle traffic accidents based on machine learning, characterized in that: The method comprises the following steps: Each vehicle information detection position on the same road section is recorded as a node, the node information of each node on the same road section at each sampling time is collected, and the node information vector of each node at each sampling time is constructed according to the node information; According to the difference between the node information vectors of different nodes in each road section and the numerical changes of the overall node information vector, the abnormal node information vector of each road section is obtained; according to the node information vector of the same node at each sampling time and the abnormal node information vector of the road section to which it belongs, the information relevance of each node at each sampling time is obtained; The information responsiveness of each node is obtained based on the information relevance of each node at each sampling moment and the time interval of abnormal changes in the same node; Clustering is performed based on the information responsiveness and positional relationship of each node in each road section to obtain the node output sequence of each road section; the relevance of each node is obtained based on the difference in information responsiveness between adjacent nodes in the node output sequence; The membership neighborhood of each node is constructed according to the spatial position relationship between different nodes, and the membership degree of each node to the membership neighborhood of each node is obtained according to the difference in the association degree between each node and different nodes in the membership neighborhood of the same node; According to the degree of membership of each node and its neighborhood, the distance distribution between different nodes in each node's neighborhood is adjusted, and the node set is obtained by reclassification; the node set is used to realize real-time detection of vehicle traffic accidents; The information responsiveness of each node is obtained according to the information relevance of each node at each sampling moment and the time interval of abnormal changes of the same node, and the specific steps include the following: In the formula, α i represents the information responsiveness of the i-th node; f i,t represents the information relevance of the ith node at the tth sampling time; n i represents the number of abnormal node information vectors of the i-th node; T i,r-1 represents the sampling time corresponding to the r-1th abnormal node information vector of the i-th node; T i,r represents the sampling time corresponding to the rth abnormal node information vector of the i-th node; dtw( ) represents the function for calculating the DTW score; G({f i,t }) represents the Gaussian weight sequence of the information correlation sequence of all sampling moments of the i-th node after being processed by the Gaussian function; norm() is the linear normalization function; | | represents the absolute value function; The specific steps of obtaining the relevance of each node according to the difference in information responsiveness between adjacent nodes in the node output sequence are as follows: In the formula, θ i represents the association degree of the i-th node, α i represents the information responsiveness of the i-th node, α i-1 represents the information responsiveness of the i-1th node, represents the mean of the information responsiveness of all nodes in the neighborhood of the ith node in the node output sequence of the ith node, exp() represents an exponential function with a natural constant as the base, and || represents an absolute value function; The method of obtaining the degree of membership between each node and the neighborhood of each node according to the difference in the degree of association between each node and different nodes in the neighborhood of the same node includes the following specific steps: In the formula, σ a represents the degree of membership of the a-th node to its neighboring region; R a Indicates the number of nodes in the neighborhood of the a-th node; represents the a-th node's neighborhood The relevance of nodes; represents the a-th node's neighborhood The relevance of nodes; represents the a-th node's neighborhood The node information vector of the nodes; represents the a-th node's neighborhood The node information vector of the nodes; exp() represents an exponential function with a natural constant as the base, and || represents an absolute value function.

2. The real-time detection method for vehicle traffic accidents based on machine learning according to claim 1 is characterized in that: The method of obtaining the abnormal node information vector of each road section according to the difference between the node information vectors of different nodes of each road section and the value change of the overall node information vector includes the following specific steps: The GPS data analysis algorithm is used to analyze the vehicle GPS time data of all sampling moments of each node, obtain the residence time of all vehicles at each collection moment on the node, and calculate the mean residence time of all vehicles at each node. When the residence time of the existing vehicle at the sampling moment of the node is greater than the mean residence time of all vehicles on this node, the node information vector of the node at this sampling moment is recorded as the abnormal node information vector.

3. The real-time detection method for vehicle traffic accidents based on machine learning according to claim 2 is characterized in that: The specific steps of obtaining the information relevance of each node at each sampling time according to the node information vector of the same node at each sampling time and the abnormal node information vector of the corresponding road section include the following: The calculation method of the information relevance of the ith node at the tth sampling time is: In the formula, f i,t represents the information relevance of the ith node at the tth sampling time; ρ i,t represents the node information vector of the ith node at the tth sampling time; Represents the standard node information vector of the target road segment; n i It represents the number of abnormal node information vectors of the i-th node; exp() represents an exponential function with a natural constant as the base; || represents the absolute value function.

4. The real-time detection method for vehicle traffic accidents based on machine learning according to claim 3 is characterized in that: The specific method of obtaining the standard node information vector is as follows: In the node information vectors of all nodes in the same section at all sampling moments, the mean of each element of the node information vector is calculated, and the mean of all elements in the same section constitutes the standard node information vector of the target section.

5. The real-time detection method for vehicle traffic accidents based on machine learning according to claim 1 is characterized in that: The method of adjusting the distance distribution between each node and different nodes in the neighborhood of each node according to the degree of membership of each node and the neighborhood of each node, and reclassifying to obtain a node set includes the following specific steps: According to the adjusted distance between each node of the target road section and different nodes in the neighborhood of each node, OPTICS clustering is performed, and the clustering result is a set of nodes.

6. The method for real-time detection of vehicle traffic accidents based on machine learning according to claim 5 is characterized in that: The specific method for obtaining the adjustment distance is as follows: In the formula, represents the adjusted distance between the a-th node and the b-th node in the a-th node's neighborhood; d a,b represents the Euclidean distance between the a-th node and the b-th node in the a-th node's neighborhood; σ a represents the degree of membership of the a-th node to the a-th node's membership neighborhood; σ b Indicates the degree of membership of the b-th node to the membership neighborhood of the b-th node; It represents the mean of the difference between the membership degree of the a-th node and its neighborhood, and the membership degree of each node in the a-th node's neighborhood and its neighborhood.

7. A real-time vehicle traffic accident detection system based on machine learning, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by the processor, the steps of the real-time vehicle traffic accident detection method based on machine learning as described in any one of claims 1 to 6 are implemented.