A kind of traffic data processing method and device
Technical field
This application involves field of computer technology more particularly to a kind of traffic data processing methods and device.
Background technique
With increasing for road vehicles, there is a situation where traffic accidents to become more and more by driver.Traffic control department is generally logical
It crosses and traffic violation is recorded and is handled, to realize the prevention and control to traffic accident.Here traffic accident refers to vehicle
On road because mistake or it is unexpected caused by the event of personal injury or property loss, violate traffic control rules with driver
Illegal activities are different.
Traffic control department to the processing mode of traffic violation generally by artificially illegal activities are sorted out, example
Such as it is divided into the traffic violation of general traffic violation, serious traffic violation, especially severe;Or pass through through
The mode tested carries out different deduction processing, such as 50% or more 200 points of button of hypervelocity, the reverse driving button 100 on highway road
Point, 20 points of smoking button etc. of driving.
Above-mentioned processing mode is only controlled for illegal activities merely, and this simple processing mode can not be to driver
There is a situation where traffic accidents to be predicted in the future, is also just difficult to the accident rate from substantial control driver, such as more than deduction of points
The probability of traffic accident not necessarily occurs for driver with regard to big.
As it can be seen that the mode of existing processing traffic violation is unable to reach, to driver, there is a situation where traffic accidents in the future
The purpose predicted.
Summary of the invention
The embodiment of the present application provides a kind of traffic data processing method and device, to by carrying out to traffic violation
Analysis achievees the purpose that there is a situation where traffic accidents to predict in the future to driver.
The embodiment of the present application provides a kind of traffic data processing method, comprising:
Server obtains illegal traffic data;The illegal traffic data includes the illegal activities that multiple drivers occur respectively
And wherein whether each driver occurs the information of traffic accident for instruction;
The illegal traffic data based on acquisition determines that each illegal activities is corresponding in a variety of illegal activities
Characteristic parameter;
For the driver that illegal activities occur, each illegal row in at least one illegal activities occurred according to the driver
For the corresponding characteristic parameter, safe score of the driver in terms of traffic accident is determined.
Optionally, the illegal traffic data based on acquisition determines each illegal activities point in a variety of illegal activities
Not corresponding characteristic parameter, comprising:
The illegal traffic data based on acquisition determines that each illegal activities is corresponding in a variety of illegal activities
Characteristic;The corresponding characteristic of any one of them illegal activities includes: that the illegal activities do not occur and traffic thing does not occur
Therefore driver's number, the illegal activities do not occur but traffic accident has occurred driver's number, the illegal activities have occurred but do not occur
Driver's number of traffic accident has occurred the illegal activities and driver's number of traffic accident has occurred;
According to the corresponding characteristic of each illegal activities, the corresponding Security Proof power of the illegal activities is determined
Weight, using the Security Proof power weight as the characteristic parameter.
Optionally, according to the corresponding characteristic of each illegal activities, the corresponding safety of the illegal activities is determined
Property proof weight, comprising:
According to the illegal activities do not occur and do not occur driver's number of traffic accident and driver's number of traffic accident not occurring
Between the first ratio, and do not occur the illegal activities but have occurred traffic accident driver's number and traffic accident has occurred
The second ratio between driver's number determines the third ratio between first ratio and the second ratio;
According to the illegal activities occur but do not occur driver's number of traffic accident with do not occur traffic accident driver's number it
Between the 4th ratio, and the illegal activities occur and have occurred driver's number of traffic accident and the driver of traffic accident to have occurred
The 5th ratio between number determines the 6th ratio between the 4th ratio and the 5th ratio;
According to the third ratio and the 6th ratio, the corresponding Security Proof power weight of the illegal activities is determined.
Optionally, according to the third ratio and the 6th ratio, the corresponding Security Proof power power of illegal activities i is determined
Weight, comprising:
According to formula W OEisum=αi(WOE0i+WOE1i) determine the corresponding Security Proof power weight of illegal activities i
WOEisum;
Wherein, WOE0i=lnN1, N1 are the third ratio, WOE1i=lnN2, N2 are the 6th ratio, αiIt is illegal
The weight factor of behavior i.
Optionally, the corresponding Security Proof power weight of each illegal activities occurred according to driver, determining should
Safe score of the driver in terms of traffic accident, comprising:
Determine the driver occur the corresponding Security Proof power weight of each illegal activities and value WOEsum;
According to preset score value section, to WOEsumLogical conversion processing is carried out, is obtained in the preset score value section
Safe score.
Optionally, the method also includes:
Safe score in preset score value section is divided into multiple score shelves;
For each score shelves of division, according to driver's number of the generation traffic accident in the score shelves and in the score
Driver's sum in shelves, determines the corresponding accident rate of score shelves.
On the other hand, the embodiment of the present application provides a kind of traffic data processing apparatus, comprising:
Receiving module, for obtaining illegal traffic data;The illegal traffic data includes that multiple drivers occur respectively
Wherein whether each driver occurs the information of traffic accident for illegal activities and instruction;
First determining module determines each in a variety of illegal activities for the illegal traffic data based on acquisition
The corresponding characteristic parameter of illegal activities;
Second determining module, for for the driver that illegal activities occur, at least one occurred according to the driver to be illegal
The corresponding characteristic parameter of each illegal activities in behavior determines safety of the driver in terms of traffic accident point
Value.
In the embodiment of the present application, illegal traffic data of the server based on acquisition determines each in a variety of illegal activities
The corresponding characteristic parameter relevant to traffic accident of illegal activities, for the driver that illegal activities occur, according to the driver
The corresponding characteristic parameter of each illegal activities occurred determines safety of the driver in terms of traffic accident point
Value, to achieve the purpose that there is a situation where traffic accidents to predict in the future to driver.
Detailed description of the invention
Fig. 1 is the traffic data processing method flow chart that the embodiment of the present application one provides;
Fig. 2 is the traffic data processing method flow chart that the embodiment of the present application two provides;
Fig. 3 is the traffic data processing method flow chart that the embodiment of the present application three provides;
Fig. 4 is traffic data processing apparatus structural schematic diagram provided by the embodiments of the present application.
Specific embodiment
In the embodiment of the present application, server is after obtaining illegal traffic data, the illegal traffic data based on acquisition, determines
The corresponding characteristic parameter of each illegal activities in a variety of illegal activities;For the driver that illegal activities occur, according to this
The corresponding characteristic parameter of each illegal activities at least one illegal activities that driver occurs, determines the driver in traffic
Safe score in terms of accident.Driver can be measured using the safe score, and there is a situation where traffic accidents in the future, to reach
The purpose of traffic accident occurs in the future to prediction driver.
Above-mentioned treatment process can be completed by possessing the traffic control department server of illegal traffic data;It can also be by traffic control
After illegal traffic data is sent to the server of other mechanisms by department, after being responsible for analysis processing by the server of other mechanisms,
Processing result is fed back into traffic control department;For example, it may be main strategies platform, main strategies platform from traffic control department that
Illegal traffic data is obtained, is analyzed and processed using the application, the prediction result of the traffic accident of each driver is fed back to
Traffic control department, alternatively, processing result to be supplied to the function of user query by the approach such as webpage or application.
The embodiment of the present application is described in further detail with reference to the accompanying drawings of the specification.
Embodiment one
As shown in Figure 1, the traffic data processing method flow chart provided for the embodiment of the present application one, comprising the following steps:
S101: server obtains illegal traffic data;The illegal traffic data include multiple drivers occur respectively disobey
Wherein whether each driver occurs the information of traffic accident for judicial act and instruction.
In specific implementation, illegal activities can be identified using illegal code, different illegal activities correspond to different
Illegal code.For example, the illegal activities made a dash across the red light correspond to illegal code 0, on highway road reverse driving illegal activities pair
The illegal activities of illegal code 1, smoking of driving are answered to correspond to illegal code 2 etc..
S102: the illegal traffic data based on acquisition determines that each illegal activities is distinguished in a variety of illegal activities
Corresponding characteristic parameter.
In specific implementation, the characteristic parameter can be risk proof weight or Security Proof power weight.If
For risk proof weight, then the weighted value is higher, indicates that the risk that traffic accident occurs is bigger, if Security Proof
Power weight, then the weighted value is higher, indicates that the risk that traffic accident occurs is smaller.It can be according to the driver that traffic accident occurs
The illegal activities generally occurred, to determine the risk proof weight of each illegal activities, or according to traffic thing does not occur
Therefore driver generally there is no illegal activities, to determine the Security Proof power weight of each illegal activities.For safety
Property proof weight will further provide preferred method of determination in the embodiment of the present application two.
S103: for the driver that illegal activities occur, each in at least one illegal activities occurred according to the driver
The corresponding characteristic parameter of illegal activities, determines safe score of the driver in terms of traffic accident.
In specific implementation, the risk proof committed unlawful acts that the safe score can occur with the driver
Weight and be worth it is inversely proportional, or can with the driver occur the Security Proof power weight committed unlawful acts and value at
Direct proportion.In the application preferred embodiment, gives by carrying out logical conversion processing, obtain in default score value section
The processing mode of interior safe score.The description of detailed in Example two.
Embodiment two
As shown in Fig. 2, the traffic data processing method flow chart provided for the embodiment of the present application two, comprising the following steps:
S201: server obtains illegal traffic data;The illegal traffic data include multiple drivers occur respectively disobey
Wherein whether each driver occurs the information of traffic accident for judicial act and instruction.
S202: the illegal traffic data of the server based on acquisition determines the illegal row of each in a variety of illegal activities
For corresponding characteristic;The corresponding characteristic of any one of them illegal activities include: do not occur the illegal activities and
Driver's number of traffic accident does not occur, the illegal activities do not occur but traffic accident has occurred driver's number, that this has occurred is illegal
Behavior but driver's number of traffic accident does not occur, the illegal activities have occurred and driver's number of traffic accident has occurred;
It, can be with based on the illegal activities that each driver occurs and the statistics that traffic accident whether occurs in the step
Obtain the four category feature data for each illegal activities.As shown in following table one.
Table one
In above-mentioned table one, illegal code i corresponds to illegal activities i, and illegal row does not occur for 0 expression that illegal code i mono- is arranged
It for i, 1 indicates that illegal activities i has occurred, traffic accident does not occur in 0 expression for whether column of accident one occur, 1 indicates to have occurred
Traffic accident is based on this, in the column of driver's number one, Ni00Illegal activities i does not occur and does not occur the driver of traffic accident for expression
Number, Ni01It indicates that illegal activities i does not occur but driver's number of traffic accident, Ni has occurred10Illegal activities i but not has occurred in expression
There is driver's number of traffic accident, Ni11It indicates that illegal activities i has occurred and driver's number of traffic accident has occurred.
S203: according to the corresponding characteristic of each illegal activities, the corresponding safety of the illegal activities is determined
Proof weight (Weight of Evidence, WOE).
It in the specific implementation process, can be based on illegal activities i occur and does not occur driver's number Ni of traffic accident00With
Illegal activities i does not occur but driver's number Ni of traffic accident has occurred01Between ratio, and do not occur traffic in all samples
Driver's number (Ni of accident00+Ni10) with driver's number (Ni of traffic accident has occurred10+Ni11) between ratio difference, and,
Illegal activities i has occurred but does not occur driver's number Ni of traffic accident10With illegal activities i has occurred and traffic accident has occurred
Driver's number Ni11Between ratio, and do not occur driver's number (Ni of traffic accident in all samples00+Ni10) with handed over
Driver's number (Ni of interpreter's event10+Ni11) between ratio difference, to measure the Security Proof power weight.
Specifically includes the following steps:
Step a: according to the illegal activities do not occur and do not occur traffic accident driver's number and traffic accident does not occur
The first ratio between driver's number, and the illegal activities do not occur but driver's number of traffic accident has occurred and traffic has occurred
The second ratio between driver's number of accident determines the third ratio between first ratio and the second ratio.
In conjunction with table one, the first ratio is Ni00/(Ni00+Ni10), the second ratio is Ni01/(Ni01+Ni11)。
Step b: driver's number of traffic accident does not occur according to the generation illegal activities but and the department of traffic accident does not occur
The 4th ratio between machine number, and the illegal activities occur and driver's number of traffic accident has occurred and traffic accident has occurred
Driver's number between the 5th ratio, determine the 6th ratio between the 4th ratio and the 5th ratio.
In conjunction with table one, the 4th ratio is Ni10/(Ni00+Ni10), the 5th ratio is Ni11/(Ni01+Ni11)。
Step c: according to the third ratio and the 6th ratio, the corresponding proof weight of the illegal activities is determined.
In specific implementation, can directly by the third ratio and the 6th ratio and value or and value multiplied by preset
Coefficient is as the corresponding proof weight of the illegal activities.Or: according to formula W OEisum=αi(WOE0i+WOE1i) determine it is illegal
The corresponding proof weight WOE of behavior iisum;Wherein, WOE0i=lnN1, N1 are the third ratio, WOE1i=lnN2, N2 are
6th ratio, αiFor the weight factor of illegal activities i.It should be noted that the formula of the calculating proof weight is only
A kind of possible embodiment of the application, those skilled in the art can be without creative efforts to above-mentioned
A variety of simple deformations that formula is made all should be within the scope of protection of this application.
S204: for the driver that illegal activities occur, at least one illegal activities that server occurs according to the driver
The corresponding Security Proof power weight of each illegal activities determines safety of the driver in terms of traffic accident point
Value.
Specifically, the corresponding Security Proof power weight of each illegal activities that the driver occurs can be determined
With value WOEsum;According to preset score value section, to WOEsumLogical conversion processing is carried out, is obtained in the preset score value section
Interior safe score.Here logical conversion processing is also i.e. by WOEsumIt is transformed to the preferable safe score of interpretation.
For example, according to the following formula to WOEsumLogical conversion processing is carried out, is obtained in preset score value section [0, k]
Safe score Score, k is the real number greater than 0:
It should be noted that the formula of above-mentioned carry out logical conversion processing is only a kind of possible embodiment party of the application
Formula, a variety of simple deformations that those skilled in the art can without creative efforts make above-mentioned formula are all
It should be within the scope of protection of this application.
S205: the safe score in preset score value section is divided into multiple score shelves by server;For division
Each score shelves, according to driver's number of the generation traffic accident in the score shelves and driver's sum in the score shelves, really
The fixed corresponding accident rate of score shelves.
In the step, for the safe score of each driver determined in above-mentioned steps, and whether have occurred
Traffic accident counts and driver's number of traffic accident occurs in each score shelves (namely score section) and in the score shelves
Driver's sum is obtained by driver's number of the generation traffic accident in the score shelves divided by driver's sum in the score shelves
The corresponding accident rate of score shelves.
In specific implementation, if the application is applied to the cooperation of the third-party institution and traffic control department, the application server
The safe score of the driver for each generation illegal activities determined and the corresponding accident rate of each score shelves can be sent to
Traffic control department, traffic control department are based on these information, can evaluate and test the probability that traffic accident occurs in the future for each driver.Alternatively, can
With directly score shelves and the corresponding accident of each score shelves according to belonging to the safe score for the driver that illegal activities occur
Rate determines the corresponding accident rate of driver that illegal activities occur, and the accident rate of the driver that illegal activities occur is anti-
It feeds traffic control department.
In the following, making lower explanation in conjunction with the application scenarios of the third-party institution and traffic control department cooperation, then by one embodiment.
Embodiment three
As shown in figure 3, the traffic data processing method flow chart provided for the embodiment of the present application three, comprising the following steps:
S301: server obtains the illegal traffic data that traffic control department provides;The illegal traffic data includes multiple departments
Wherein whether each driver occurs the information of traffic accident for illegal activities that machine occurs respectively and instruction.
S302: the illegal traffic data of the server based on acquisition determines the illegal row of each in a variety of illegal activities
For corresponding characteristic, the corresponding characteristic of any one of them illegal activities include: do not occur the illegal activities and
Driver's number of traffic accident does not occur, the illegal activities do not occur but traffic accident has occurred driver's number, that this has occurred is illegal
Behavior but driver's number of traffic accident does not occur, the illegal activities have occurred and driver's number of traffic accident has occurred.
S303: each illegal activities occurred for the driver that illegal activities occur, based on the step in embodiment two
Rapid a~c determines the corresponding Security Proof power weight of the illegal activities, and then determines each illegal row that the driver occurs
For corresponding Security Proof power weight and value WOEsum。
Specifically, which can be summarized as obtaining WOE based on following formulasum:
Wherein,
In above-mentioned formula, m is the illegal activities quantity that the driver occurs, and j=0 indicates that there is no illegal activities, j=1
Illegal activities, Ni has occurred in expression00/(Ni00+Ni10) it is first ratio, Ni01/(Ni01+Ni11) it is second ratio,For the third ratio, correspondingly, Ni10/(Ni00+Ni10) it is the 4th ratio, Ni11/(Ni01+
Ni11) it is the 5th ratio,For the 6th ratio.
S304: according to preset score value section, to WOEsumLogical conversion processing is carried out, is obtained in the preset score value
Safe score in section.
Specifically, according to the following formula to WOEsumLogical conversion processing is carried out, is obtained in preset score value section [0, k]
Interior safe score Score:
S305: the safe score in preset score value section is divided into multiple score shelves;For each of division point
Several grades, according to driver's number of the generation traffic accident in the score shelves and driver's sum in the score shelves, determine this point
Several grades of corresponding accident rates.
In specific implementation, directly traffic accident can be occurred in the future for each driver that illegal activities occur by server
Accident rate is sent to traffic control department, can also carry out specific data processing according to the customization demand of traffic control department, for example,
If traffic control department needs list of driver of the accident rate 4.5% or more, first server can be according to calculated such as table two
Shown in each score shelves accident rate, safe score is reported in 10 points of list of driver below to traffic control department.
Score shelves |
Accident rate |
<10 |
4.66% |
[10,20) |
4.23% |
[20,30) |
4.62% |
[30,40) |
4.19% |
[40,50) |
3.13% |
[50,60) |
2.73% |
[60,70) |
2.22% |
[70,80) |
1.64% |
[80,90) |
1.43% |
[90,100) |
0.58% |
It is average |
2.49% |
Table two
Based on the same inventive concept, a kind of friendship corresponding with traffic data processing method is additionally provided in the embodiment of the present application
Logical data processing equipment, since the principle that the device solves the problems, such as is similar to the embodiment of the present application traffic data processing method, because
The implementation of this device may refer to the implementation of method, and overlaps will not be repeated.
As shown in figure 4, being traffic data processing apparatus structural schematic diagram provided by the embodiments of the present application, comprising:
Receiving module 41, for obtaining illegal traffic data;The illegal traffic data includes that multiple drivers occur respectively
Illegal activities and instruction wherein whether each driver occurs the information of traffic accident;
First determining module 42 determines each in a variety of illegal activities for the illegal traffic data based on acquisition
The corresponding characteristic parameter of kind illegal activities;
Second determining module 43, for being disobeyed according at least one that the driver occurs for the driver that illegal activities occur
The corresponding characteristic parameter of each illegal activities in judicial act determines safety of the driver in terms of traffic accident point
Value.
Optionally, second determining module 43 is specifically used for:
The illegal traffic data based on acquisition determines that each illegal activities is corresponding in a variety of illegal activities
Characteristic;The corresponding characteristic of any one of them illegal activities includes: that the illegal activities do not occur and traffic thing does not occur
Therefore driver's number, the illegal activities do not occur but traffic accident has occurred driver's number, the illegal activities have occurred but do not occur
Driver's number of traffic accident has occurred the illegal activities and driver's number of traffic accident has occurred;According to each illegal activities
Corresponding characteristic determines the corresponding Security Proof power weight of the illegal activities, by the Security Proof power weight
As the characteristic parameter.
Optionally, second determining module 43 is specifically used for:
According to the illegal activities do not occur and do not occur driver's number of traffic accident and driver's number of traffic accident not occurring
Between the first ratio, and do not occur the illegal activities but have occurred traffic accident driver's number and traffic accident has occurred
The second ratio between driver's number determines the third ratio between first ratio and the second ratio;
According to the illegal activities occur but do not occur driver's number of traffic accident with do not occur traffic accident driver's number it
Between the 4th ratio, and the illegal activities occur and have occurred driver's number of traffic accident and the driver of traffic accident to have occurred
The 5th ratio between number determines the 6th ratio between the 4th ratio and the 5th ratio;
According to the third ratio and the 6th ratio, the corresponding Security Proof power weight of the illegal activities is determined.
Optionally, second determining module 43 is specifically used for:
According to formula W OEisum=αi(WOE0i+WOE1i) determine the corresponding Security Proof power weight of illegal activities i
WOEisum;
Wherein, WOE0i=lnN1, N1 are the third ratio, WOE1i=lnN2, N2 are the 6th ratio, αiIt is illegal
The weight factor of behavior i.
Optionally, second determining module 43 is specifically used for:
Determine the driver occur the corresponding Security Proof power weight of each illegal activities and value WOEsum;
According to preset score value section, to WOEsumLogical conversion processing is carried out, is obtained in the preset score value section
Safe score.
Optionally, described device further include:
Third determining module 44, for the safe score in preset score value section to be divided into multiple score shelves;Needle
To each score shelves of division, according to driver's number of the generation traffic accident in the score shelves and the driver in the score shelves
Sum determines the corresponding accident rate of score shelves.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is process of the reference according to method, apparatus (system) and computer program product of the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application
Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies
Within, then the application is also intended to include these modifications and variations.