CN115913745A - Vehicle safety event prediction method and device, computer equipment and storage medium - Google Patents

Vehicle safety event prediction method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115913745A
CN115913745A CN202211546780.0A CN202211546780A CN115913745A CN 115913745 A CN115913745 A CN 115913745A CN 202211546780 A CN202211546780 A CN 202211546780A CN 115913745 A CN115913745 A CN 115913745A
Authority
CN
China
Prior art keywords
safety event
prediction model
safety
security
events
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211546780.0A
Other languages
Chinese (zh)
Inventor
张学林
赵宝坤
胡红星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Automotive Innovation Corp
Original Assignee
China Automotive Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Automotive Innovation Corp filed Critical China Automotive Innovation Corp
Priority to CN202211546780.0A priority Critical patent/CN115913745A/en
Publication of CN115913745A publication Critical patent/CN115913745A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present application relates to a vehicle safety event prediction method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring vehicle safety event data, and determining the statistical dimension type of a safety event in the vehicle safety event data; calculating the increase rate of the number of safety events in a preset statistical time period based on the vehicle safety event data; calculating the weight value of the safety event in a preset statistical time period; determining a training sample of a safety event prediction model based on the growth rate of the number of safety events and the weight value of the safety events, wherein the safety event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence; taking a training sample as the input of a safety event prediction model to perform periodic prediction training to obtain a trained safety event prediction model; and outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model. By adopting the method, the safety event can be accurately predicted with low cost.

Description

Vehicle safety event prediction method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of vehicle safe driving technologies, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for predicting a vehicle safe event.
Background
With the development of the automatic driving technology, the safety event of the vehicle is accurately predicted in the driving process of the vehicle, and the safe driving of the vehicle can be ensured. For non-sudden security events, the defense can be basically stabilized; however, the defense effect of the vehicle defense system is poor for sudden and increasing number of vehicle safety events.
In the traditional technology, a machine learning mode is adopted to predict vehicle safety events, but effective prediction is not carried out on the vehicle safety events with strong periodicity, and defense can be carried out only by combining manpower under some conditions, or the highest-strength defense measure is taken every moment, so that the defense cost is high, and great resource waste is caused.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a vehicle security event prediction method, device, computer readable storage medium, and computer program product with high accuracy and low cost, which can solve the above problems of poor accuracy and failure to defend against attacks effectively.
In a first aspect, the present application provides a vehicle safety event prediction method, including:
acquiring vehicle safety event data, and determining the statistical dimension type of a safety event in the vehicle safety event data;
calculating the increase rate of the number of safety events in a preset statistical time period based on the vehicle safety event data;
calculating the weight value of the safety event in a preset statistical time period;
determining a training sample of a safety event prediction model based on the growth rate of the number of safety events and the weight value of the safety events, wherein the safety event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence;
taking a training sample as the input of a safety event prediction model to perform periodic prediction training to obtain a trained safety event prediction model;
and outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
In one embodiment, calculating the weight value of the security event within the preset statistical time period includes:
and calculating the weight value of the safety event in a preset statistical time period according to the occurrence frequency of the safety event of each statistical dimension in the statistical dimension type.
In one embodiment, the calculating a weight value of the security event within a preset statistical time period further includes:
and calculating the weight value of the security event in a preset statistical time period by combining the increase rate of the number of the security events.
In one embodiment, a training sample of a security event prediction model is determined based on a growth rate of a number of security events and a weight value of the security events, the security event prediction model including a machine learning algorithm for periodic prediction based on a time series, including:
setting a first preset threshold and a second preset threshold, and determining a training sample of the safety event prediction model according to the first preset threshold, the second preset threshold, the growth rate and the weight value;
the increase rate of the number of the safety events in the training sample of the safety event prediction model is larger than a first preset threshold, and the weight value of the safety events is larger than a second preset threshold.
In one embodiment, after determining a training sample of a security event prediction model based on a growth rate of the number of security events and weight values of the security events, the security event prediction model including a machine learning algorithm that performs periodic prediction based on a time series, the method further includes:
aggregating training samples of the safety event prediction model according to the statistical dimension type to obtain the aggregated training samples of the safety event prediction model;
and taking the training sample of the aggregated safety event prediction model as the input of the safety event prediction model to perform periodic prediction training to obtain the trained safety event prediction model.
In one embodiment, the periodic prediction training is performed by using a training sample as an input of a safety event prediction model to obtain a trained safety event prediction model, and the method includes:
training a safety event prediction model according to different time sequence granularities;
the security event prediction model includes a trend term, a period term, and an error term.
In a second aspect, the application also provides a vehicle safety event prediction device. The device includes:
the acquisition unit is used for acquiring the vehicle safety event data and determining the statistical dimension type of the safety event in the vehicle safety event data;
the calculation unit is used for calculating the increase rate of the number of the safety events in a preset statistical time period based on the vehicle safety event data;
calculating a weight value of the security event within a preset statistical time period;
determining a training sample of a security event prediction model based on the growth rate of the number of security events and the weight value of the security events, wherein the security event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence;
the training unit is used for carrying out periodic prediction training by taking the training samples as the input of the safety event prediction model to obtain a trained safety event prediction model;
and the prediction unit is used for outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor realizes the following steps when executing the computer program:
acquiring vehicle safety event data, and determining the statistical dimension type of a safety event in the vehicle safety event data;
calculating the increase rate of the number of safety events in a preset statistical time period based on the vehicle safety event data;
calculating the weight value of the safety event in a preset statistical time period;
determining a training sample of a safety event prediction model based on the growth rate of the number of safety events and the weight value of the safety events, wherein the safety event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence;
taking a training sample as the input of a safety event prediction model to perform periodic prediction training to obtain a trained safety event prediction model;
and outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring vehicle safety event data, and determining the statistical dimension type of a safety event in the vehicle safety event data;
calculating the increase rate of the number of safety events in a preset statistical time period based on the vehicle safety event data;
calculating a weight value of the security event within a preset statistical time period;
determining a training sample of a safety event prediction model based on the growth rate of the number of safety events and the weight value of the safety events, wherein the safety event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence;
taking a training sample as the input of a safety event prediction model to perform periodic prediction training to obtain a trained safety event prediction model;
and outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
acquiring vehicle safety event data, and determining the statistical dimension type of a safety event in the vehicle safety event data;
calculating the increase rate of the number of safety events in a preset statistical time period based on the vehicle safety event data;
calculating the weight value of the safety event in a preset statistical time period;
determining a training sample of a safety event prediction model based on the growth rate of the number of safety events and the weight value of the safety events, wherein the safety event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence;
taking a training sample as the input of a safety event prediction model to perform periodic prediction training to obtain a trained safety event prediction model;
and outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
According to the vehicle safety event prediction method, the vehicle safety event prediction device, the computer equipment, the storage medium and the computer program product, the statistical dimension type of the vehicle safety event is determined according to the acquired vehicle safety event data; calculating the growth rate and the weight value of the vehicle safety events, determining a training sample of a safety event prediction model based on the growth rate of the number of the calculated safety events and the weight value of the safety events, filtering scattered or low-relevancy data in vehicle safety event data, and performing periodic prediction training by taking the training sample as the input of the safety event prediction model to realize the prediction of the periodic vehicle safety events. The prediction model is used for periodic prediction based on the time sequence, the safety event prediction model obtained by training with day as the time sequence or year as the time sequence can be obtained, the prediction models obtained by training with different time sequences are combined for use, the use is flexible, the accuracy of vehicle safety event prediction is greatly improved, and the manpower and the system cost are effectively saved.
Drawings
FIG. 1 is a diagram of an exemplary embodiment of a method for predicting a vehicle safety event;
FIG. 2 is a flow diagram of a vehicle safety event prediction method in one embodiment;
FIG. 3 is a flow diagram of a method for predicting a vehicle safety event in another embodiment;
FIG. 4 is a block diagram of a vehicle safety event prediction device in one embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The vehicle safety event prediction method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104, or may be located on the cloud or other network server. The server 104 acquires the vehicle safety event data and determines the statistical dimension type of the safety event in the vehicle safety event data; calculating the increase rate of the number of safety events in a preset statistical time period based on the vehicle safety event data; calculating the weight value of the safety event in a preset statistical time period; determining a training sample of a safety event prediction model based on the growth rate and the weight value, wherein the safety event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence; taking a training sample as the input of a safety event prediction model to perform periodic prediction training to obtain a trained safety event prediction model; and outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be electric vehicles, smart car-mounted devices, smart speakers, smart televisions, smart air conditioners, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In one embodiment, as shown in fig. 2, a method for predicting a vehicle safety event is provided, which is illustrated by applying the method to the server 104 in fig. 1, and includes the following steps:
step 202: and acquiring the vehicle safety event data, and determining the statistical dimension type of the safety event in the vehicle safety event data.
The vehicle security event data is security event data collected in real time through a vehicle IDS (Intrusion Detection System) device, and can be acquired from a Message middleware MQ (Message Queue), a database, and a distributed file System. The vehicle safety event data describes safety events that occur during the travel of the vehicle through statistical dimensions of the safety events.
Illustratively, the security event statistical dimension may be a security event type, a security event attack area, a security event attack severity, and the like. The security incident attack area can be realized based on the division of provincial and urban areas, the type of the security incident can be a host type attack incident or a network type attack incident, and the attack severity of the security incident can be respectively distinguished from serious, common and non-serious through one level, two levels and three levels.
Step 204: and calculating the increase rate of the number of the safety events in a preset statistical time period based on the vehicle safety event data.
Wherein the rate of increase of the number of security events, i.e. the rate of increase of the occurrence of security events. The higher the rate of increase of the number of security events, the faster the rate of increase of the occurrence of security events. The rate of increase of the number of security events may be calculated by calculating the frequency of occurrence of security events for the current statistical time period relative to the last statistical time period.
Illustratively, based on the analysis of the vehicle safety event data, the occurrence probability F of the safety event with the degree of severity of one level in the first statistical time period T1 and the last statistical time period T0 of the first statistical time period T1 is obtained 1 And F 0 By calculating F 1 And F 0 The ratio of (a) to (b),a rate of increase in the number of security events of one level of severity can be obtained.
The vehicle safety event data of each statistical dimension type are calculated by the method, and the increase rate of the number of the safety events of all the statistical dimensions in a preset statistical time period is obtained.
Step 206: and calculating the weight value of the safety event in a preset statistical time period.
The weight value of the security event may refer to a weight of occurrence of the security event in some embodiments. The weight value of the security event can be calculated according to the statistical dimension type of the security event, and the weight of the security event with different dimensions in each statistical dimension type is obtained. The higher the weight value of the safety event is, the more the safety event needs to be focused by workers.
Illustratively, the weight value of the security event may be calculated by calculating the percentage of the security event in each statistical dimension, or by TF-PDF (term frequency-probabilistic document frequency) or the like.
Step 208: and determining a training sample of a safety event prediction model based on the growth rate of the number of the safety events and the weight values of the safety events, wherein the safety event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence.
And screening the acquired vehicle safety event data according to the statistical dimension type of the safety events based on the calculated increase rate of the number of the safety events and the weighted values of the safety events to obtain a training sample of a safety event prediction model.
Because the security attacks received by the vehicle are often periodic, for example, the number of security events reported by the vehicle at night is often smaller than the number of security events in the day, and when the statistics is performed by taking the hour as a unit, the time point of occurrence of the security event has a certain correlation with the time of the day, the trained security event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence, and the security event can be accurately predicted.
Step 210: and taking the training sample as the input of the safety event prediction model to perform periodic prediction training to obtain the trained safety event prediction model.
When the safety event prediction model is trained, different safety event prediction models can be obtained based on the statistical dimension types of the safety events or the difference of time sequences according to actual requirements.
Step 212: and outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
The vehicle safety events are predicted through the trained safety event prediction model, and the prediction mean value, the upper bound value and the lower bound value of the number of the safety events in a certain period of time sequence statistic period in the future can be obtained. The number of certain type or multiple types of security events occurring in a specific certain area can be predicted by combining different statistical dimension types of the security events, or the prediction can be performed according to the severity of the security events, so that a reference basis is provided for prevention or according to threats.
According to the vehicle safety event prediction method, the statistical dimension type of the safety event is determined according to the acquired vehicle safety event data, and data screening, prediction model training and prediction calculation are performed based on each statistical dimension. When a training sample of the vehicle safety event data is obtained, the growth rate and the weight of the safety event under each statistical dimension are calculated, the vehicle safety event is screened, and irrelevant data causing errors are filtered. The method has the advantages that the periodic prediction is carried out on the basis of the time sequence according to the obtained training data to obtain the security incident prediction model, the security incident prediction model can be flexibly matched and used according to different time sequences, the security incident prediction accuracy is improved, the security incident attack threat can be tracked and prevented, the information security preventive measures of the vehicle are improved, the attacked risk of a vehicle information system is reduced, and the manpower and the system cost are effectively saved.
In one embodiment, calculating a weight value of a security event within a preset statistical time period includes: and calculating the weight value of the safety event in a preset statistical time period according to the occurrence frequency of the safety event of each statistical dimension in the statistical dimension type.
Specifically, the weight value of the security event is calculated according to the frequency of occurrence of the security event, and may be calculated through TF-PDF.
For example, the frequency of occurrence of security events occurring within a statistical time period is obtained by the following calculation:
Figure BDA0003980329830000081
Figure BDA0003980329830000082
in the formula (1), W (d) i,t ) Is shown over a statistical time period T i Inner, statistical dimension t i The weighted value of the safety situation on the vehicle c, i can be a day or an hour; c represents the number of vehicles reporting the safety event; f kc, Represents t i Statistical dimension at T i Counting the frequency of occurrence, N, within a time period c, Represents t i Counting the total number of times of the dimensional safety events on the vehicle c; i F kc, | denotes t i Normalizing the frequency of the safety events of the statistical dimension on the vehicle c; k represents the total number of safety events occurring on the vehicle c.
Figure BDA0003980329830000083
C vehicle on t i PDF (proportional document frequency) of occurrence of statistical dimension security event, where PDF is t i Statistical dimension at T i The frequency of occurrence of security events within a time period accounts for the statistical dimension t i An index of the percentage of the total number of security events. The security events occur more frequently in the same dimension, the larger the PDF of the security event, the higher the weight of the high frequency security events by increasing exponentially instead of linearly.
In one embodiment, the calculating the weight value of the security event within the preset statistical time period further includes: and calculating the weight value of the security event in a preset statistical time period by combining the increase rate of the number of the security events.
And optimizing a weight value calculation method of the security events by combining the increase rate of the number of the security events. Because the increase rate of the number of the safety events is positively correlated with the weight value of the safety events, the increase rate of the number of the safety events is added into the weight value calculation formula, and the training data of the safety event prediction model can be obtained more accurately.
The calculation method is as follows:
Figure BDA0003980329830000091
Figure BDA0003980329830000092
the formula (2) is improved on the basis of the formula (1), R i,t (D) Representing the rate of increase of the number of security events.
In one embodiment, training samples for a security event prediction model are determined based on growth rate and weight values, the security event prediction model including a machine learning algorithm for periodic prediction based on time series, comprising: setting a first preset threshold and a second preset threshold, and determining a training sample of the safety event prediction model according to the first preset threshold, the second preset threshold, the growth rate and the weight value; the growth rate of the safety events in the training samples of the safety event prediction model is larger than a first preset threshold, and the weight value of the safety events is larger than a second preset threshold.
When predicting a security event, different users may generate different requirements, and different results are output when predicting the security event. Different training samples are obtained by presetting a threshold value and classifying and screening the vehicle safety event data, and the training samples are used for training different prediction models to realize the safety event prediction under different requirements.
Illustratively, a first preset threshold is set for the rate of increase of the number of security events, and a second preset threshold is set for the weight value of the security events. And judging according to a first preset threshold and a second preset threshold, when the increase rate of the number of the safety events is larger than the first preset threshold and the weighted value of the safety events is larger than the second preset threshold, the safety events in the vehicle safety event data are the safety events meeting the current judgment condition, and the obtained safety event data set is used as a training sample.
And judging the vehicle safety event data under all the statistical dimensions, and obtaining different training samples according to different dimensions.
In the embodiment, the vehicle safety event data are classified and screened by calculating the increase rate of the number of the safety events and the weighted values of the safety events, the safety events with more occurrence times in a certain statistical time period are identified, scattered data or irrelevant data are screened and filtered, the accuracy of a safety event prediction model is improved, a threshold value can be customized according to user requirements, and the method is very flexible.
In one embodiment, after determining training samples for a security event prediction model based on a rate of increase of a number of security events and weight values of the security events, the security event prediction model including a machine learning algorithm that periodically predicts based on a time series, the method further includes: aggregating training samples of the safety event prediction model according to the statistical dimension type to obtain the aggregated training samples of the safety event prediction model; and taking the training sample of the aggregated safety event prediction model as the input of the safety event prediction model to perform periodic prediction training to obtain the trained safety event prediction model.
When the safety event is predicted, comprehensive judgment may be needed according to multiple statistical dimensions, training samples of the statistical dimensions may be aggregated, and then the aggregated training samples are used as input of a safety event prediction model to perform periodic prediction training to obtain a trained safety event prediction model.
For example, the security events occurring at the same place and the security events of the same type occurring are aggregated to obtain an aggregated training sample. Or, aggregating the vehicle safety event data of multiple statistical dimensions to obtain training samples of multiple statistical dimensions. Illustratively, the aggregation of the training samples of the security event prediction model can be realized by a union method.
In this embodiment, training samples of multiple statistical dimensions are aggregated according to the classification conditions assumed by the user and then input into the prediction model for training, the training samples can be divided according to different statistical dimensions such as a security event attack area, a security event type, a security event attack severity and the like, and the aggregated training samples are used as a data source of the security event prediction model, so that a result output by the prediction model can meet the user requirement.
In one embodiment, performing periodic prediction training using a training sample as an input of a security event prediction model to obtain a trained security event prediction model, includes: training a safety event prediction model according to different time sequence granularities; the security event prediction model includes a trend term, a period term, and an error term.
The time sequence is a number sequence formed by arranging the safety events according to the sequence of time occurrence and the statistical values of the safety events, and the granularity of the time sequence is the time interval of the time sequence, and can be hours, days, months, quarters, years and the like. According to different time series granularities, the occurrence conditions of the safety events in different statistical periods can be predicted. For example, a prediction model is trained by taking hours as a time sequence, so that a safety event with stronger periodicity in the day can be predicted; the model is trained by taking the day as a time sequence, so that the security events with strong trend of week or year can be predicted.
When the safety prediction model is trained on the basis of the time sequence, the model comprises a trend item, a period item and an error item, wherein the trend item represents the non-periodic occurrence trend of the safety event, the period item represents the periodic occurrence trend of the safety event, and the error item represents the abnormal error which cannot be described by the model; the embodiment fits the trend term, the period term and the error term to train the prediction model. Wherein the periodic term can use a fourier series to model the periodic variation of the time series.
Unlike the conventional prophet algorithm, the prediction model fitted by the embodiment has no holiday term because the occurrence of the security event does not relate to holidays. The optimized prediction model has strong robustness, can predict the occurrence trend of the security event, can calculate indexes such as upper and lower boundary values and the like, and improves the accuracy of security event prediction.
As an improvement of this embodiment, when predicting a security event, different time series granularities may be set simultaneously to train a security event prediction model, so as to obtain a plurality of security event prediction models. A plurality of prediction models are flexibly matched for use, so that the accuracy of the prediction of the safety event is improved, and the tracking and the prevention of the safety event are better realized.
For example, a first security event prediction model is obtained by training with hours as a time series, and a second security event prediction model is obtained by training with days as a time series. The first security event prediction model can predict and analyze security events with strong periodicity in one day, the second security event prediction model can predict and analyze security events with strong trend in one week or one year, and the first security event prediction model and the second security event prediction model are combined, so that the periodic security events can be considered, the trend security events can be analyzed, and better prediction accuracy is achieved.
FIG. 3 is a flow diagram of a vehicle safety event prediction method in one embodiment, as shown in FIG. 3, and in one embodiment, the vehicle safety event prediction comprises the steps of:
step 302: vehicle safety event data is acquired.
Vehicle security event data, collected in real-time by a vehicle IDS device, may be retrieved from message middleware MQ, a database, or a distributed file system.
And determining the statistical dimension type of the security event in the vehicle security event data, wherein the determined statistical dimension type comprises the security event type, the security event attack area and the security event attack severity.
Step 304: and judging whether the increase rate of the number of the safety events is larger than a first preset threshold value.
Because the characteristics of security events vary from region to region, from security event type to security event type, or from severity to severity. When the security event is predicted, different security event prediction models are required to be designed for analysis and prediction.
And respectively calculating the increase rate of the number of the safety events according to different statistical dimension types, judging the increase rate of the number of the safety events according to a first threshold value, gathering the vehicle safety event data meeting the conditions into a first safety event data set, continuing to enter the step 306, and otherwise, re-acquiring the vehicle safety event data. The method comprises the following steps:
(A1) And calculating the growth rate of the number of the safety events according to different statistical dimension types.
Setting three statistical dimensions of the type of the security event, the attack area of the security event and the attack severity of the security event, and passing d i Is represented by d i =(t i1 ,t i2 ,...,t in ) Wherein, t i1 ,t i2 ,...,t in Representing different statistical dimensions in the ith dimension.
Separately calculate t i The rate of increase of the number of security events in the statistical dimension, i.e. the calculation of the current statistical period T i Inner phase relative to the last statistical period T i-1 Rate of increase R of i,t
Figure BDA0003980329830000121
In formula (3), D is expressed according to D i Calculating result sets in different dimensions, F i,t Represents T i Frequency of occurrence in vehicle safety event data logs in the t statistical dimension within a statistical period, F i-1,t Indicating the last statistical period T i-1 The frequency of occurrence of medium security events, which is zero when no security event has occurred. F i-1,t +1 can prevent the denominator from being zero, and the calculated R i,t The larger the value, the T is indicated i-1 To T i The faster the number of security events within a statistical period increases.
(A2) And setting a first preset threshold, and judging according to the first preset threshold to obtain a first security event data set under different statistical dimensions.
Setting delta 1 The first preset threshold value is used for judging the increase rate of the calculated number of the safety events according to the first preset threshold value, and R is satisfied i,t1 Then, a first safety event data set under different statistical dimensions is obtained, step 306 is entered, and when the increase rate of the judged number of safety events is not greater than a first preset threshold, the vehicle safety event data are obtained again in step 302.
Step 306: and judging whether the weighted value of the safety event is greater than a second preset threshold value.
t i The security events of the statistical dimension are in the statistical period T i The higher specific gravity in the table indicates that the security event should be paid enough attention. And calculating the weight value of the safety event in a preset statistical time period according to the occurrence frequency of the safety event of each statistical dimension in the statistical dimension type. And judging the weight value of the calculated safety event according to a second preset threshold, collecting the safety event meeting the conditions after judgment into a second safety event data set, continuing to enter the step 308, and otherwise returning to the step 302 to obtain the vehicle safety event data. The method comprises the following steps:
(B1) And calculating the weight value of the security event according to different statistical dimensions.
And calculating the security events with more occurrence times in the security events by combining the increase rate of the number of the security events, wherein the calculation method comprises the following steps:
Figure BDA0003980329830000131
Figure BDA0003980329830000132
in the formula (4), W (d) i,t ) Is shown over a statistical time period T i Inner, statistical dimension t i The weighted value of the safety situation on the vehicle c, i can be a day or an hour; c represents the number of vehicles reporting the safety event; f kc, Represents t i Statistical dimension at T i Counting the frequency of occurrence, N, within a time period c, Represents t i Counting the total number of times of the dimensional safety events on the vehicle c; i F kc, I denotes t i Normalizing the frequency of the safety events of the statistical dimension on the vehicle c; k represents the total number of safety events occurring on the vehicle c; r i,t (D) Representing the rate of increase of the number of security events.
(B2) And setting a second preset threshold, and judging according to the second preset threshold to obtain a second security event data set under different dimensions.
Setting delta 2 Judging the weight value of the calculated safety event according to a second preset threshold value as a second preset threshold value, and meeting W (d) i,t )>Δ 2 Then, a second safety event data set under different statistical dimensions is obtained, step 308 is entered, and when the weight value of the judged safety event is not greater than a second preset threshold value, the vehicle safety event data is obtained again in step 302.
And taking the second security event data set obtained at the moment as a training sample of the security event prediction model for training the security event prediction model. The set is denoted B i,t ={C i, ,C i, ,...,C i, In which C is i,tn The nth set of security events representing the statistical dimension for t over i time.
As another implementation manner of this embodiment, when calculating the weight value of the security event, the calculation may also be performed directly through the TF-PDF method as in the foregoing formula (1) without combining the increase rate of the number of security events.
Step 308: and aggregating the training samples according to the statistical dimension.
And (3) carrying out single-statistical-dimension or multi-statistical-dimension aggregation on the security events with the same statistical dimension, for example, aggregating the data sets of the security events with all security event types and all severity degrees in the same security event attack area.
Illustratively, aggregation may be performed by union operations, such as for t in i time 1 Statistical dimension sum t 2 And (3) carrying out statistics on the dimensional security event set union operation to obtain:
B i,(t1∩t2) ={C i,(t1∩t2)1 ,C i,(t1∩t2)2 ,...,C i,(t1∩t2)n } (5)
in the formula (5), C i,(t1∩t2) Is shown at T i Segment count time period t 1 Statistical dimension sum t 2 Counting the clustering value of the security event after merging under dimensionality, n C i,(t1∩t2) Cluster value is formed at T i Segment statistics set of security events B occurring during a time period i,(t1∩t2) And the clustered safety event data set is used as a training sample of a safety event prediction model for training the safety event prediction model.
Step 310: a security event prediction model is trained.
And taking the aggregated training samples as the input of the safety event prediction model to perform periodic prediction training to obtain the trained safety event prediction model. The security event prediction model includes a machine learning algorithm that is periodic based on a time series.
Training a prediction model according to prediction granularities of different prediction time sequences, constructing a trend term, a period term and an error term of the prediction model, and constructing a safety event prediction model by using a prophet training model, wherein the prediction model is expressed as:
y(t)=g(t)+s(t)+ε t (6)
in the formula (6), g (t) represents a trend term; s (t) represents a periodic term, using a Fourier series to model the periodic variation of a time series; epsilon t An error term is represented.
In this embodiment, the method for predicting granularity by using hours and days as time series respectively trains prediction models, and includes the following steps:
(C1) And training a safety event prediction model by taking the hour as a prediction time sequence to obtain a first safety event prediction model.
And (3) a first safety event prediction model obtained by training by taking hours as a time sequence predicts the number of events which are possible to occur under the dimension of a specified condition in the future. Table 1 shows the input parameters during the training of the safety event prediction model.
Watch with watch1, parameter data _ security is set to true, hour (i) is a time stamp of the occurrence of the security event, and category represents t 1 And t 2 A security event type in multiple statistical dimensions or a single conditional dimension type, such as a network-type security event occurring in a certain area. value is the number of occurrences after the security event cluster. In Hour (i) + n, n is the training number, a dichotomy is used during model training, the aggregated training samples are introduced in batches, and half prediction is performed through n/2 number, so that the predicted error term epsilon can be effectively reduced t . For example, 10000 pieces of data are divided into 5000 pieces/time, and the training is performed for two times, so that the error rate of a prediction algorithm can be effectively reduced.
TABLE 1
daily_seasonality category value
Hour(i) C(t1∩t2) Count(C i,(t1∩t2)1 )
Hour(i)+1 C(t1∩t2) Count(C i,(t1∩t2)2 )
Hour(i)+n C(t1∩t2) Count(C i,(t1∩t2)3 )
(C2) And training the safety event prediction model by taking the week as a prediction time sequence to obtain a second safety event prediction model.
As shown in the above equation (6), g (t) represents a trend term. Because the trend of the safety event has no upper limit, a piecewise linear model is adopted, and the model does not limit the trend upper limit.
s (t) represents a period term, since the time series may contain trends of various day, week, month, year and other period types, a Fourier series can be used for approximately expressing the period attribute, and the periodic change of the time series is simulated by using the Fourier series, which comprises the following specific steps:
Figure BDA0003980329830000162
in formula (7), N represents a fourier series, P represents a time-series period, and P =7 represents a period of a cycle. N represents the number of corresponding cycles that are desired to be used in the predictive model, and larger values of N can fit more complex periodic functions, but larger values of N can also cause overfitting problems. For a sequence with a period of weeks, i.e. P =7, N may be set to 3.
(C3) And training a safety event prediction model by taking the year as a prediction time sequence to obtain a third safety event prediction model.
When the safety event prediction model is trained by taking years as a prediction time sequence, the method is basically the same as the step (C2), except that P =365.25 and n =10 in the formula (7) are predicted by taking years as a cycle.
The safety event prediction model is trained based on the vehicle safety event data, the prediction mean value, the lower bound value and the upper bound value of the number of safety events occurring in a certain period of time sequence range in the future can be output according to the model prediction, and the number of times of certain type or multiple types of safety events occurring in a certain area can be predicted by combining with category screening conditions.
Step 312: a security event is predicted.
And outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
Respectively setting parameters of a prediction model according to different time sequence granularities, training to obtain a first safety event prediction model, a second safety event prediction model and a third safety event prediction model, training and outputting the times of safety events occurring in the time sequence range of hours, weeks and years and upper and lower boundary values through the first safety event prediction model, the second safety event prediction model and the third safety event prediction model, and combining and analyzing prediction results obtained by different time sequences to realize accurate prediction of the safety events.
The vehicle safety event prediction method disclosed in this embodiment can identify an emergency safety event, calculate an increase rate of the number of safety events and a weight value of the safety event for the obtained data, process the calculated data to obtain a training sample of a prediction model, and train the prediction model according to the training sample.
When the prediction model is constructed, a first safety event prediction model is constructed by taking hours as a time sequence and is used for predicting the rule of occurrence of safety events with stronger periodicity in the same day; the second safety event prediction model constructed by taking the week as a time sequence and the third safety event prediction model constructed by taking the year as a time sequence are used for predicting the occurrence rule of the safety event with strong trend of the week or the year. The first safety event prediction model, the second safety event prediction model and the third safety event prediction model are flexibly matched for use to obtain information such as time points, states and the like of safety events which may be intensively outbreaked in the future, so that effective intervention can be performed in advance, and reference basis is provided for tracking and preventing threats. The method is applied to vehicle safety event prediction, the time point of the future safety event and the corresponding safety event state can be predicted, and the vehicle safety risk is effectively reduced.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a vehicle safety event prediction device for implementing the vehicle safety event prediction method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so specific limitations in one or more embodiments of the security event prediction device provided below can be referred to the limitations of the security event prediction method in the foregoing, and details are not described herein again.
In one embodiment, as shown in fig. 4, there is provided a vehicle safety event prediction apparatus including: an obtaining unit 402, a calculating unit 404, a training unit 406 and a prediction unit 408, wherein:
an obtaining unit 402, configured to obtain vehicle safety event data, and determine a statistical dimension type of a safety event in the vehicle safety event data;
a calculating unit 404, configured to calculate, based on the vehicle safety event data, an increase rate of the number of safety events within a preset statistical time period;
calculating the weight value of the safety event in a preset statistical time period;
determining a training sample of a security event prediction model based on the growth rate of the number of security events and the weight value of the security events, wherein the security event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence;
the training unit 406 is configured to perform periodic prediction training by using a training sample as an input of the safety event prediction model to obtain a trained safety event prediction model;
and the prediction unit 408 is configured to output a security event prediction result of a preset prediction period based on the trained security event prediction model.
In one embodiment, the calculating unit 404 calculates a weight value of the security event within a preset statistical time period, including: and calculating the weight value of the safety event in a preset statistical time period according to the occurrence frequency of the safety event of each statistical dimension in the statistical dimension type.
In one embodiment, the calculating unit 404 calculates a weight value of the security event within a preset statistical time period, and further includes: and calculating the weight value of the security event in a preset statistical time period by combining the increase rate of the number of the security events.
In one embodiment, the calculation unit 404 determines training samples of a security event prediction model based on the growth rate of the number of security events and the weight values of the security events, the security event prediction model including a machine learning algorithm for periodic prediction based on time series, including: setting a first preset threshold and a second preset threshold, and determining a training sample of the safety event prediction model according to the first preset threshold, the second preset threshold, the growth rate and the weight value; the increase rate of the number of the safety events in the training samples of the safety event prediction model is larger than a first preset threshold, and the weight value of the safety events is larger than a second preset threshold.
In one embodiment, after the calculating unit 404 determines the training samples of the security event prediction model based on the growth rate of the number of security events and the weight values of the security events, the security event prediction model including a machine learning algorithm for periodic prediction based on a time series, the method further includes: aggregating training samples of the safety event prediction model according to the statistical dimension type to obtain the aggregated training samples of the safety event prediction model; and taking the training sample of the aggregated safety event prediction model as the input of the safety event prediction model to perform periodic prediction training to obtain the trained safety event prediction model.
In one embodiment, the training unit 406 performs periodic prediction training using the training samples as input of the safety event prediction model to obtain a trained safety event prediction model, including: training a safety event prediction model according to different time sequence granularities; the security event prediction model includes a trend term, a period term, and an error term.
The various modules in the vehicle safety event prediction apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store vehicle safety event data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a vehicle safety event prediction method.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components. In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, carries out the steps in the method embodiments described above.
It should be noted that the user information and vehicle information (including but not limited to vehicle device information, user personal information, etc.) and vehicle security event data (including but not limited to raw data for analysis, stored data, predicted data, executed data, etc.) referred to in the present application are information and data that are authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A vehicle safety event prediction method, the method comprising:
acquiring vehicle safety event data, and determining the statistical dimension type of a safety event in the vehicle safety event data;
calculating the increase rate of the number of safety events in a preset statistical time period based on the vehicle safety event data;
calculating the weight value of the safety event in the preset statistical time period;
determining a training sample of a security event prediction model based on the growth rate of the number of security events and the weight value of the security events, wherein the security event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence;
taking the training sample as the input of the safety event prediction model to perform periodic prediction training to obtain a trained safety event prediction model;
and outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
2. The method according to claim 1, wherein the calculating the weight value of the security event within the preset statistical time period comprises:
and calculating the weight value of the safety event in the preset statistical time period according to the occurrence frequency of the safety event of each statistical dimension in the statistical dimension type.
3. The method of claim 2, wherein the calculating the weight value of the security event within the preset statistical time period further comprises:
and calculating the weight value of the safety event in the preset statistical time period by combining the increase rate of the number of the safety events.
4. The method of claim 1, wherein determining training samples for a security event prediction model based on the rate of increase of the number of security events and the weight values of the security events, the security event prediction model comprising a machine learning algorithm for periodic prediction based on a time series comprises:
setting a first preset threshold and a second preset threshold, and determining a training sample of the security event prediction model according to the first preset threshold, the second preset threshold, the increase rate of the number of the security events and the weight value of the security events;
in a training sample of the safety event prediction model, the increase rate of the number of safety events of a safety event is greater than the first preset threshold, and the weight value of the safety event is greater than the second preset threshold.
5. The method of claim 1, wherein the training samples for a security event prediction model are determined based on the growth rate of the number of security events and the weight values of the security events, the security event prediction model comprising a machine learning algorithm for periodic prediction based on a time series, the method further comprising:
aggregating the training samples of the safety event prediction model according to the statistical dimension type to obtain the aggregated training samples of the safety event prediction model;
and taking the training sample of the aggregated security event prediction model as the input of the security event prediction model to perform periodic prediction training to obtain a trained security event prediction model.
6. The method according to claim 1, wherein the performing periodic prediction training using the training samples as the input of the security event prediction model to obtain a trained security event prediction model comprises:
training the safety event prediction model according to different time sequence granularities;
the security event prediction model includes a trend term, a period term, and an error term.
7. A vehicle safety event prediction apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring vehicle safety event data and determining the statistical dimension type of a safety event in the vehicle safety event data;
the calculation unit is used for calculating the increase rate of the number of the safety events in a preset statistical time period based on the vehicle safety event data;
calculating the weight value of the safety event in the preset statistical time period;
determining a training sample of a security event prediction model based on the growth rate of the number of security events and the weight value of the security events, wherein the security event prediction model comprises a machine learning algorithm for periodic prediction based on a time sequence;
the training unit is used for carrying out periodic prediction training by taking the training sample as the input of the safety event prediction model to obtain a trained safety event prediction model;
and the prediction unit is used for outputting a safety event prediction result of a preset prediction period based on the trained safety event prediction model.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202211546780.0A 2022-12-05 2022-12-05 Vehicle safety event prediction method and device, computer equipment and storage medium Pending CN115913745A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211546780.0A CN115913745A (en) 2022-12-05 2022-12-05 Vehicle safety event prediction method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211546780.0A CN115913745A (en) 2022-12-05 2022-12-05 Vehicle safety event prediction method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115913745A true CN115913745A (en) 2023-04-04

Family

ID=86486626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211546780.0A Pending CN115913745A (en) 2022-12-05 2022-12-05 Vehicle safety event prediction method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115913745A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117196333A (en) * 2023-08-31 2023-12-08 北京国电通网络技术有限公司 Natural disaster influence and loss information generation method and device based on power data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117196333A (en) * 2023-08-31 2023-12-08 北京国电通网络技术有限公司 Natural disaster influence and loss information generation method and device based on power data

Similar Documents

Publication Publication Date Title
CN110708204B (en) Abnormity processing method, system, terminal and medium based on operation and maintenance knowledge base
CN111475804B (en) Alarm prediction method and system
US10311044B2 (en) Distributed data variable analysis and hierarchical grouping system
US8121962B2 (en) Automated entity identification for efficient profiling in an event probability prediction system
CN112188531B (en) Abnormality detection method, abnormality detection device, electronic apparatus, and computer storage medium
CN111045894B (en) Database abnormality detection method, database abnormality detection device, computer device and storage medium
CN108182515B (en) Intelligent rule engine rule output method, equipment and computer readable storage medium
CN112668944A (en) Enterprise wind control method, device, equipment and medium based on big data credit investigation
WO2017076154A1 (en) Method and apparatus for predicting network event and establishing network event prediction model
CN116823496A (en) Intelligent insurance risk assessment and pricing system based on artificial intelligence
CN115913745A (en) Vehicle safety event prediction method and device, computer equipment and storage medium
CN116034379A (en) Activity level measurement using deep learning and machine learning
CN115204608A (en) Method and device for determining quality index of power grid project and computer equipment
CN114661568A (en) Abnormal operation behavior detection method, device, equipment and storage medium
CN117978541A (en) Enterprise information security monitoring alarm system and method
CN115858606A (en) Method, device and equipment for detecting abnormity of time series data and storage medium
CN117422195A (en) Water quality evaluation method, device, computer equipment and storage medium
CN110874601B (en) Method for identifying running state of equipment, state identification model training method and device
CN116797180A (en) Complaint early warning method, complaint early warning device, computer equipment and storage medium
RU2632124C1 (en) Method of predictive assessment of multi-stage process effectiveness
CN114495137B (en) Bill abnormity detection model generation method and bill abnormity detection method
CN115689713A (en) Abnormal risk data processing method and device, computer equipment and storage medium
Mukherjee et al. Capital market surveillance using stream processing
US20210216927A1 (en) Systems And Methods For Identifying An Officer At Risk Of An Adverse Event
Cui et al. Spatio-temporal broad learning networks for traffic speed prediction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination