Summary of the invention
The object of the invention is to propose a kind of vehicle traveling information method for tracing and system based on cloud computing, can carry out to the magnanimity vehicle traveling information of automatic collection the vehicle traveling information that efficient analysis is processed, transferred fast designated vehicle, designated vehicle is positioned, follows the trail of.
For reaching this purpose, the present invention by the following technical solutions:
First aspect provides a kind of vehicle traveling information method for tracing based on cloud computing, comprising:
The vehicle traveling information of the corresponding bayonet socket position driving vehicle that the receiver, video watch-dog sends;
Store according to the actual required storage space of described vehicle traveling information and the data volume size Selective storage server of each storage server;
Receive the data retrieval instruction of service server transmission and the retrieving information that described data retrieval instruction is carried, set up communication with described storage server, from the data directory of setting up according to described vehicle traveling information, transfer cell data corresponding to described retrieving information, send described cell data to described service server.
Wherein, described vehicle traveling information comprises Vehicle Driving Cycle picture, the number-plate number, candid photograph Vehicle Driving Cycle picture time and corresponding bayonet socket position.
Wherein, described data directory with car plate coding and the year, month information of capturing the Vehicle Driving Cycle picture time as line identifier, date and time information with the described candid photograph Vehicle Driving Cycle picture time identifies as row, configuration comprises the cell data that the target memory address of Vehicle Driving Cycle picture is captured in described candid photograph Vehicle Driving Cycle picture time, corresponding bayonet socket position and storage, and each cell data all is associated with described line identifier and row sign; Wherein, described car plate is encoded to the combinational code of the numeral of the English of Chinese, the number-plate number of the number-plate number of encoding according to default coding rule and the number-plate number.
Wherein, the described data directory of setting up according to described vehicle traveling information also comprises:
Judge whether car plate coding and candid photograph Vehicle Driving Cycle picture time exist corresponding line identifier and row sign in data directory;
If exist, the target memory address of then the Vehicle Driving Cycle picture is captured in described candid photograph Vehicle Driving Cycle picture time, corresponding bayonet socket position and storage is appended in the cell data that are associated with described corresponding line identifier and row sign;
If do not exist, then in data directory, add new line identifier and/or be listed as sign, the target memory address of described candid photograph Vehicle Driving Cycle picture time, corresponding bayonet socket position and storage candid photograph Vehicle Driving Cycle picture is added with described new line identifier and/or row to identifying in the cell data that are associated.
Wherein, described data directory is regularly deleted the resting period above the storage data of default duration.
Second aspect provides a kind of vehicle traveling information method for tracing based on cloud computing, comprising:
The receive data search instruction, and the retrieving information that described data retrieval instruction and described data retrieval instruction are carried is sent to main control server;
Receive passing through that described main control server sends and set up communication with described storage server, cell data corresponding to described retrieving information of from the data directory of setting up according to described vehicle traveling information, transferring;
The described cell data that receive were sorted by the vehicle snapshot time, and calculate vehicle running path according to shortest path first.
Wherein, described described cell data receiving sorted by the vehicle snapshot time, and according to also comprising behind the shortest path first calculating vehicle running path:
According to the result of described vehicle running path, in Geographic Information System, draw vehicle driving trace.
The third aspect provides a kind of vehicle traveling information tracing system based on cloud computing, comprises main control server, several storage servers, several service servers and several video monitoring equipments,
Described video monitoring equipment is used for gathering the vehicle traveling information of corresponding bayonet socket position driving vehicle;
Described main control server is used for the vehicle traveling information of the corresponding bayonet socket position driving vehicle of receiver, video watch-dog transmission; Store according to the actual required storage space of described vehicle traveling information and the data volume size Selective storage server of each storage server; Receive the data retrieval instruction of service server transmission and the retrieving information that described data retrieval instruction is carried, set up communication with described storage server, from the data directory of setting up according to described vehicle traveling information, transfer cell data corresponding to described retrieving information, send described cell data to described service server;
Described storage server is used for the store car driving information, sets up data directory according to described vehicle traveling information, and carries out data interaction with main control server;
Described service server is used for the receive data search instruction, and the retrieving information that described data retrieval instruction and described data retrieval instruction are carried is sent to main control server; Receive passing through that described main control server sends and set up communication with described storage server, cell data corresponding to described retrieving information of from the data directory of setting up according to described vehicle traveling information, transferring; The described cell data that receive were sorted by the vehicle snapshot time, and calculate vehicle running path according to shortest path first.
Wherein, described service server also is used for the result according to described vehicle running path, draws vehicle driving trace in Geographic Information System.
Wherein, also connect by adapter between described main control server and the described video monitoring equipment, it is the main control server readable format that described adapter is used for the vehicle traveling information format conversion of described video monitoring equipment collection, and the vehicle traveling information behind the transmission format transformation is to main control server.
Beneficial effect of the present invention is: a kind of vehicle traveling information method for tracing and system based on cloud computing, the vehicle traveling information of the corresponding bayonet socket position driving vehicle that the receiver, video watch-dog sends; Store according to the actual required storage space of described vehicle traveling information and the data volume size Selective storage server of each storage server; Receive the data retrieval instruction of service server transmission and the retrieving information that described data retrieval instruction is carried, set up communication with described storage server, from the data directory of setting up according to described vehicle traveling information, transfer cell data corresponding to described retrieving information, send described cell data to described service server.The technical program adopts distributed memory system, can carry out to the magnanimity vehicle traveling information of automatic collection the vehicle traveling information that efficient analysis is processed, transferred fast designated vehicle, and designated vehicle is positioned, follows the trail of.
Embodiment
For the technical scheme of technical matters that the present invention is solved, employing and the technique effect that reaches clearer, be described in further detail below in conjunction with the technical scheme of accompanying drawing to the embodiment of the invention, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those skilled in the art belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Please refer to Fig. 1, it is the process flow diagram of a kind of vehicle traveling information method for tracing based on cloud computing of providing of the embodiment of the invention 1.The method of present embodiment is applied to main control server, is used for storage policy and the quick method for tracing of definite vehicle traveling information that receives.
Should based on the vehicle traveling information method for tracing of cloud computing, comprise the steps:
The vehicle traveling information of the corresponding bayonet socket position driving vehicle that S101, receiver, video watch-dog send;
At present, along with the intelligentized development of urban traffic information, each city is according to city size size, disposed the electronic police of respective numbers at each large bayonet socket, and the vehicle traveling information of the corresponding bayonet socket of electric police grasp shoot is sent to industrial computer and carries out information analysis and process.Electronic police and industrial computer are referred to as video monitoring equipment.
S102, store according to the actual required storage space of described vehicle traveling information and the data volume size Selective storage server of each storage server;
Keeping in the constant situation of storage server Disk Quotas size, according to the data volume difference of each storage server, the actual used storage space of described vehicle traveling information of distributing according to need.This storage policy is compared with traditional disk allocation mechanism, and method is easy flexibly, more can adapt to the dynamic change of network stored data, the utilization factor of Effective Raise disk space resource.
The retrieving information that S103, the data retrieval instruction that receives the service server transmission and described data retrieval instruction are carried, set up communication with described storage server, from the data directory of setting up according to described vehicle traveling information, transfer cell data corresponding to described retrieving information, send described cell data to described service server.
The retrieving information that described data retrieval instruction is carried comprises the time that the number-plate number and needs are retrieved, according to the two information, can be in the data retrieval table quick-searching, locate certain cell or a plurality of cell data.
A kind of vehicle traveling information method for tracing based on cloud computing adopts distributed memory system, can carry out to the magnanimity vehicle traveling information of automatic collection the vehicle traveling information that efficient analysis is processed, transferred fast designated vehicle, designated vehicle is positioned, follows the trail of.
Please refer to Fig. 2, it is the process flow diagram of setting up the data retrieval table that the embodiment of the invention 1 provides; The data retrieval table is set up by storage server, below introduces in detail the data retrieval table and how to set up and safeguard, comprising:
S201, described data directory with car plate coding and the year, month information of capturing the Vehicle Driving Cycle picture time as line identifier, date and time information with the described candid photograph Vehicle Driving Cycle picture time identifies as row, configuration comprises the cell data that the target memory address of Vehicle Driving Cycle picture is captured in described candid photograph Vehicle Driving Cycle picture time, corresponding bayonet socket position and storage, and each cell data all is associated with described line identifier and row sign; Wherein, described car plate is encoded to the combinational code of the numeral of the English of Chinese, the number-plate number of the number-plate number of encoding according to default coding rule and the number-plate number.
Preferably, described vehicle traveling information comprises Vehicle Driving Cycle picture, the number-plate number, candid photograph Vehicle Driving Cycle picture time and corresponding bayonet socket position.
Preferably, described default coding rule is specially:
The province, city and region Chinese character is called for short: capital 01, Tianjin 02, Shanxi 03, Ji 04, cover 05, the Liao Dynasty 06, lucky 07, black 08, Shanghai 09, Soviet Union 10, Zhejiang 11, Anhui 12, Fujian 13, Jiangxi 14, Shandong 15, Henan 16, Hubei Province 17, Hunan 18, Guangdong 19, osmanthus 20, fine jade 21, river 22, expensive 23, cloud 24, hide 25, Shan 26, sweet 27, blue or green 28, peaceful 29, new 30, Chongqing 31, make 32, face 33, platform 34;
The military license plate Chinese character: army 35, empty 36, sea 37, north 38, Shen 39, blue 40, Ji 41, south 42, wide by 43, become 44;
Number plate classification Chinese character: alert 45, learn 46, neck 47, examination 48, hang 49, border 50, port 51, Australia 52, drag 53, agricultural 54;
People's Armed Police's car plate word: WJ disappears 55, WJ limit 56, WJ water 57, WJ are alert 58, WJ electricity 59, WJ woods 60, WJ logical 61.
If number-plate number afterbody also has Chinese character, then can proceed mapping according to above-mentioned corresponding rule equally.
S202, judge car plate coding and capture the Vehicle Driving Cycle picture time in data directory, whether have corresponding line identifier and row sign;
If S203 exists, the target memory address of then the Vehicle Driving Cycle picture is captured in described candid photograph Vehicle Driving Cycle picture time, corresponding bayonet socket position and storage is appended in the cell data that are associated with described corresponding line identifier and row sign;
If S204 does not exist, then in data directory, add new line identifier and/or be listed as sign, the target memory address of described candid photograph Vehicle Driving Cycle picture time, corresponding bayonet socket position and storage candid photograph Vehicle Driving Cycle picture is added with described new line identifier and/or row to identifying in the cell data that are associated.
S205, described data directory are regularly deleted the resting period above the storage data of default duration.
Preferably, it is 90 days that default duration is set, and surpasses the data of this default duration, and concordance list can be deleted automatically, guarantees that the storage server of distributed system has enough Disk Quotas to store the vehicle traveling information of follow-up reception.
Described data directory set up daily record and data all leave in the distributed memory system, if there is storage server the read-write fault to occur, then the main control server in the distributed memory system can automatically distribute other storage servers to take over and recover data.
Please refer to Fig. 3, it is the distributed data base principle schematic that the embodiment of the invention 1 provides;
Consider that for performance we arrange a row family based on HBase distributed data base table, and each row family only has a Version.
Line identifier be set to the time of capturing days+" _ "+vehicle coding, such as 201303_08F56822;
The row sign is set to the date of the time of capturing, represents that with two digits row target span is 01-31;
Each cell data comprise " bayonet socket numbering, timestamp, the picture path, ", separate with branch between the record; For example:
“0521000507,20120501?12:15:16,http://pic.snap.device/20120501/121516.jpg;”
Preferably, the comma in the cell data and branch all are the English form of half-angle;
Can in the electronic police configuration information table of existing city, find corresponding bayonet socket position by the bayonet socket numbering.
Preferably, described cell data layout is specially: capture the Vehicle Driving Cycle picture time, corresponding bayonet socket position, the cell data of target memory address; To be placed on the time before the car number, and be conducive to according to date and time information stale data be deleted.For example:
“20120501?12:15:16,0521000507,http://pic.snap.device/20120501/121516.jpg;”
Use the HBase distributed data base to solve the theory of relevant database when processing mass data and the limitation that realizes.So that can being distributed on some Daeporis, these data lead on the storage server, and can be by a large amount of concurrent user's high speed access.
Please refer to Fig. 4, it is the process flow diagram of a kind of vehicle traveling information method for tracing based on cloud computing of providing of the embodiment of the invention 2; The method of present embodiment is applied to service server, has realized the drafting of vehicle driving trace.
Should based on the vehicle traveling information method for tracing of cloud computing, comprise the steps:
S401, receive data search instruction, and the retrieving information that described data retrieval instruction and described data retrieval instruction are carried is sent to main control server;
The retrieving information that described data retrieval instruction is carried comprises the time of the number-plate number and needs retrieval, and the number-plate number is divided into Chinese and English, digital two parts, according to default coding rule, Chinese recompile is formed new combinational code with English, numeral again.
S402, receive passing through that described main control server sends and set up communication with described storage server, cell data corresponding to described retrieving information of from the data directory of setting up according to described vehicle traveling information, transferring;
Corresponding cell data can be that cell data also can be a plurality of cell data.
S403, the described cell data that receive were sorted by the vehicle snapshot time, and calculate vehicle running path according to shortest path first.
The algorithm that is used for the solution shortest route problem is referred to as " shortest path first ", sometimes is called for short and makes " routing algorithm ".The most frequently used routing algorithm has: dijkstra's algorithm, A* algorithm, SPFA algorithm, bellman-ford algorithm, Floyd-Warshall algorithm, Johnson algorithm.
Dijkstra's algorithm is typical shortest path algorithm, is used for calculating a node to the shortest path of other all nodes.Principal feature is outwards layer by layer expansion centered by starting point, until expand to terminal point.Dijkstra's algorithm can draw the optimum solution of shortest path.
Dijkstra's algorithm is very representational shortest path algorithm, all as substance detailed introduction is arranged in a lot of specialized courses, such as data structure, graph theory, operational research etc.Do not give unnecessary details herein.
S404, according to the result of described vehicle running path, in Geographic Information System, draw vehicle driving trace.
Geographic Information System is that generalized information system (Geographic Information System or Geo-Information system, GIS) is called again " learn infosystem " or " environment and resources information system " sometimes.It is a kind of specific very important space information system, under computing machine hardware and software system supports, to the relevant geographic distribution data in epigeosphere (the comprising atmospheric envelope) space all or in part gather, store, the technological system of management, computing, analysis, demonstration and description.In Geographic Information System, draw vehicle driving trace, make vehicle running path more directly perceived, be conducive to designated vehicle is followed the trail of.
Use cloud computing technology to substitute traditional relevant database, utilize Distributed Calculation, improved the speed of retrieval, processing, and support the linear expansion of mass data storage, simultaneously, have higher stability, concurrency etc.
A kind of vehicle traveling information method for tracing based on cloud computing adopts distributed memory system, can carry out to the magnanimity vehicle traveling information of automatic collection the vehicle traveling information that efficient analysis is processed, transferred fast designated vehicle, designated vehicle is positioned, follows the trail of, help the law enforcement agencies such as public security, traffic police according to the driving path of these driving informations analysis vehicles, carry out case and deploy to ensure effective monitoring and control of illegal activities, break laws and commit crime and locate, follow the trail of.
Please refer to Fig. 5, it is the principle Organization Chart of a kind of vehicle traveling information tracing system based on cloud computing of providing of the embodiment of the invention 3.
A kind of vehicle traveling information tracing system based on cloud computing comprises main control server 1, several storage servers 2, several service servers 3 and several video monitoring equipments 4,
Described video monitoring equipment 4 is used for gathering the vehicle traveling information of corresponding bayonet socket position driving vehicle;
Described main control server 1 is used for the vehicle traveling information of the corresponding bayonet socket position driving vehicle of receiver, video watch-dog transmission; Store according to the actual required storage space of described vehicle traveling information and the data volume size Selective storage server of each storage server; Receive the data retrieval instruction of service server transmission and the retrieving information that described data retrieval instruction is carried, set up communication with described storage server, from the data directory of setting up according to described vehicle traveling information, transfer cell data corresponding to described retrieving information, send described cell data to described service server.
Described storage server 2 is used for the store car driving information, sets up data directory according to described vehicle traveling information, and carries out data interaction with main control server;
Described service server 3 is used for the receive data search instruction, and the retrieving information that described data retrieval instruction and described data retrieval instruction are carried is sent to main control server; Receive passing through that described main control server sends and set up communication with described storage server, cell data corresponding to described retrieving information of from the data directory of setting up according to described vehicle traveling information, transferring; The described cell data that receive were sorted by the vehicle snapshot time, and calculate vehicle running path according to shortest path first.
Described video monitoring equipment 4 is used for capturing the Vehicle Driving Cycle picture of corresponding bayonet socket position driving vehicle, from described Vehicle Driving Cycle picture, parse the number-plate number, send Vehicle Driving Cycle picture, the number-plate number, candid photograph Vehicle Driving Cycle picture time and corresponding bayonet socket positional information to main control server.
Preferably, described service server 3 also is used for the result according to described vehicle running path, draws vehicle driving trace in Geographic Information System.
A kind of vehicle traveling information tracing system based on cloud computing, the vehicle traveling information of the corresponding bayonet socket position driving vehicle that the receiver, video watch-dog sends; Store according to the actual required storage space of described vehicle traveling information and the data volume size Selective storage server of each storage server; Receive the data retrieval instruction of service server transmission and the retrieving information that described data retrieval instruction is carried, set up communication with described storage server, from the data directory of setting up according to described vehicle traveling information, transfer cell data corresponding to described retrieving information, send described cell data to described service server.The technical program adopts distributed memory system, can carry out to the magnanimity vehicle traveling information of automatic collection the vehicle traveling information that efficient analysis is processed, transferred fast designated vehicle, and designated vehicle is positioned, follows the trail of.
Please refer to Fig. 6, it is the process flow diagram of a kind of vehicle traveling information tracing system based on cloud computing of providing of the embodiment of the invention 4.Present embodiment has increased several adapters on the basis of the vehicle traveling information tracing system content of embodiment 3, the vehicle traveling information of video monitoring equipment 4 collections is converted to main control server 1 can identifies form, more is of value to the enforcement of technical scheme.Present embodiment is the detail content of detailed description not, can reference example 3.
Preferably, also connect by adapter between described main control server 1 and the described video monitoring equipment 4, it is the main control server readable format that described adapter is used for the vehicle traveling information format conversion of described video monitoring equipment collection, and the vehicle traveling information behind the transmission format transformation is to main control server.
The basic data that Front End is uploaded is vehicle traveling information, after vehicle traveling information is resolved through industrial computer by electric police grasp shoot again the conversion by adapter be sent to main controlled node, main controlled node is main control server.
The cloud cluster main controlled node is assigned memory node and is carried out store tasks, and memory node is storage server.
Store tasks is also carried out in the memory node response, sets up the data directory of setting up according to the target memory address of described vehicle traveling information and correspondence.
The query requests that the client sends is inputted by service server, and service server is received request, by with the communication of main control server, retrieve required cell data.If retrieve required cell data, then by capturing Vehicle Driving Cycle time order and function cell data arranged sequentially, take out location information, draw track of vehicle according to shortest path first in Geographic Information System again; Can also transfer the car image data according to the target memory address of storage candid photograph Vehicle Driving Cycle picture simultaneously, namely capture the Vehicle Driving Cycle picture, by checking picture, the detailed information of vehicle is captured in more accurate understanding, such as vehicle newness degree, vehicle color or road conditions at that time; If do not retrieve desired data, then feed back without data message.The method can be used for the extensive bayonet socket vehicle tracing system in the affairs such as each traffic police, public security.
A kind of vehicle traveling information tracing system based on cloud computing has enhanced scalability, can carry out linear expansion to data.When data volume is accumulated to a certain degree (configurable), this programme can carry out horizontal cutting to data automatically, and distributes different servers to manage these data.Can form large-scale cluster by a large amount of generic storage servers so on the one hand, deposit mass data (data from several TB to tens PB).On the other hand, when data peaks during near the system capacity, can simply come the expansion capacity by the mode that increases server.This dynamic capacity-expanding process need not to shut down, and system can move and provide the read-write service as usual, realizes the machine dilatation of delaying of dynamic seamless nothing fully.
A kind of vehicle traveling information tracing system based on cloud computing has high-performance, the capable information of data retrieval table is by horizontal cutting and be distributed on many storage servers, when a large number of users is accessed, request of access also has been dispersed on the different servers, although the service ability of each server is limited, can provide the access ability of very high performance after all server gathers.
A kind of vehicle traveling information tracing system based on cloud computing has high availability, and system provides data automatically to copy and fault-tolerant function.Even current server breaks down in the read-write process (faults such as hard disk, internal memory, network), daily record also can not be lost, and data can be recovered from daily record automatically.
The technical program adopts distributed memory system, can carry out to the magnanimity vehicle traveling information of automatic collection the vehicle traveling information that efficient analysis is processed, transferred fast designated vehicle, designated vehicle is positioned, follows the trail of, help the law enforcement agencies such as public security, traffic police according to the driving path of these driving informations analysis vehicles, carry out case and deploy to ensure effective monitoring and control of illegal activities, break laws and commit crime and locate, follow the trail of.
Above content is preferred embodiment of the present invention only, for those of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, and this description should not be construed as limitation of the present invention.