Detailed description of the invention
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Ground describes, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments.Generally exist
Can arrange and design with various different configurations with the assembly of the embodiment of the present invention that illustrates described in accompanying drawing herein.Cause
This, be not intended to limit claimed invention to the detailed description of the embodiments of the invention provided in the accompanying drawings below
Scope, but it is merely representative of the selected embodiment of the present invention.Based on embodiments of the invention, those skilled in the art are not doing
The every other embodiment obtained on the premise of going out creative work, broadly falls into the scope of protection of the invention.
It should also be noted that similar label and letter represent similar terms, therefore, the most a certain Xiang Yi in following accompanying drawing
Individual accompanying drawing is defined, then need not it be defined further and explains in accompanying drawing subsequently.Meanwhile, the present invention's
In description, term " first ", " second " etc. be only used for distinguish describe, and it is not intended that instruction or hint relative importance or time
Between successively.
As it is shown in figure 1, be the block diagram of described server 200.Described server 200 includes at traffic trip data
Reason device 210, memorizer 220, storage control 230, processor 240.
Described memorizer 220, storage control 230, each element of processor 240 the most electrically connect
Connect, to realize the transmission of data or mutual.Such as, these elements can pass through one or more communication bus or signal each other
Line realizes being electrically connected with.Described traffic trip data processing equipment 210 includes that at least one can be with software or firmware
(firmware) form is stored in described memorizer or is solidificated in the operating system (operating of described service end 200
System, OS) in software function module.Described processor 240 is used for performing the executable module of storage in memorizer 220,
Software function module that the most described traffic trip data processing equipment 210 includes or computer program.
Wherein, memorizer 220 may be, but not limited to, random access memory (Random Access Memory,
RAM), read only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-
Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory,
EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory,
EEPROM) etc..Wherein, memorizer 220 is used for storing program, and described processor 240, after receiving execution instruction, performs described
Program, the method performed by the service end flowing through Cheng Dingyi that aforementioned embodiment of the present invention any embodiment discloses can apply to
In processor, or realized by processor.
Processor 240 is probably a kind of IC chip, has the disposal ability of signal.Above-mentioned processor can be
General processor, including central processing unit (Central Processing Unit is called for short CPU), network processing unit (Network
Processor, is called for short NP) etc.;Can also is that digital signal processor (DSP), special IC (ASIC), ready-made able to programme
Gate array (FPGA) or other PLDs, discrete gate or transistor logic, discrete hardware components.Permissible
Realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor can be micro-place
Reason device or this processor can also be the processors etc. of any routine.
Being appreciated that the structure shown in Fig. 1 is only signal, server 200 may also include more more than shown in Fig. 1 or more
Few assembly, or there is the configuration different from shown in Fig. 1.Each assembly shown in Fig. 1 can use hardware, software or its group
Close and realize.
Fig. 2 shows the flow chart of a kind of traffic trip data processing method that the embodiment of the present invention provides, and refers to figure
2, what the present embodiment described is the handling process of server, and described method includes:
Step S310, obtains the history trip data of multiple IC-card, includes many in each described history trip data respectively
The traffic records on individual date, each described traffic records includes exchange hour, public bus network coding and public transit vehicle coding.
Wherein, each described traffic records can also include IC card numbers, Card Type, type of transaction, the amount of money before consumption, answers
The button amount of money, should detain the amount of money, and track enters the station station code, and track enters the station date-time, track departures station code, track departures day
Time phase, the information such as transfer identifies, the transfer benefit amount of money.
Because data monthly are the most, process for quickening, it is contemplated that daily set up or cutting database table (as set up from
11 to May 13 May 3 tables), the field that typing is following the most one by one: card number, Card Type, exchange hour, public bus network compile
Code, public transit vehicle encode, track enters the station station code, track enters the station date-time, track departures station code, track set off day
Time phase, transfer mark etc. information.
Further, for accelerating the process of data base, sequence etc. when card number, exchange hour etc. need to be set up index, insertion.
Available multiple computers parallel data processing, such as card number 1-5 are processed by computer 1, and card number 6-10 is processed by computer 2.By also
The modes such as line algorithm accelerate the efficiency of algorithm, it is possible to accomplish the quick process of mass data.
Preferably, referring to Fig. 3, described method can also include:
Step S370, according in traffic records each described described public bus network encode, described public transit vehicle coding with
And the GPS information of public transit vehicle corresponding to described public transit vehicle coding, respectively to the friendship in the history trip data of each IC-card
Logical record is updated.
Brushing card data has circuit number each time, public traffic information system is also preserved circuit number.But go out sometimes
The situation that existing circuit number is inconsistent, such as one bus is swiped the card after POS maintenance, is not carried out track data and reset, load
Another car, so can cause the IC-card circuit number inconsistent with circuit number in bus operation storehouse, therefore can be by real
The GPS dwell time of border vehicle is consistent to relevant IC-card charge time, judges that the line number in POS is actual with vehicle
Line number is identical, " public bus network coding " and " public transit vehicle coding " and the actual vehicle information phase being i.e. correlated with in IC-card data
With, if it is inconsistent, supplementing of data can be carried out according to the data on adjacent date;Or occur that data are out-of-date or the time
The situation of disappearance, it is also possible to carry out supplementing of data according to the data on adjacent date.
Step S320, according to the different attribute on each date, respectively by the traffic on the plurality of date in each IC-card
Record is classified.
Whether such as, IC-card data being classified according to the different attribute on its date, attribute is: be working day, if
For the summer time, if for extreme weather (heavy rain, extremely hot, heavy snow etc.), if having major motor vehicle event (such as main roads or bridge
Damaging, state leader visits, other traffic control event etc.), if for the major holiday etc..The date data of same alike result is deposited
In a classification.
Step S330, obtains each the IC-card described website of getting on the bus on the date to be judged respectively.
Refer to figure, 4, as a kind of embodiment, described step S330 may include that
Step S331, respectively according to each IC-card described at the traffic records on date to be judged, wraps in described traffic records
Include exchange hour, public bus network coding and public transit vehicle coding;
Step S332, respectively according to traffic records each described and stoppage of vehicle website timetable, obtains described respectively
Each IC-card is at the website of getting on the bus on date to be judged.
Referring to Fig. 5, as a kind of embodiment, described step S332 may include that
Step S3321, the exchange hour inquiring about described public transit vehicle coding respectively corresponding falls into described stoppage of vehicle website
Timetable is preset in the time range that website is corresponding;
Step S3322, described exchange hour falls into the website in the range of its time, then be described in get on the bus website.
Circuit according to IC-card and car number, search " stoppage of vehicle website timetable ", meets its of section down time and [enters
Stand the time, set off the time], then for website of getting on the bus;As search less than, then can be with manual analysis error in data reason.
For speed up processing, it is possible to the record polymerization of swiping the card of identical passenger on public transport will be taken according to temporal clustering method
Being one group, the most only need to obtain the website of getting on the bus of a passenger, the website of getting on the bus of other people of same group is also obtained with.
Further, for swipe the card POS and vehicle intelligent terminal in the case of of networking, this time swipe the card upper can be directly obtained
Station point.
Step S340, it is judged that described in the attribute on date to be judged, search the history trip data of each IC-card described respectively
Described in the traffic records of classification corresponding to attribute.
Step S350, the traffic of the classification that attribute is corresponding described in the history trip data according to each IC-card described respectively
Record, judges each the IC-card described get-off stop on the described date to be judged respectively.
Referring to Fig. 6, as a kind of embodiment, described step S350 may include that
The difference of number of times it is understood that swipe the card, it is judged that the mode of lower secondary site is the most different, for only having brushed once
Card, it is only necessary to judge once to descend secondary site, during for having brushed many secondary cards, then explanation occurs in that the situation of transfer, now needs
Judge to need get-off stop during transfer every time.
Step S401, obtains each the IC-card described number of times of swiping the card on the described date to be judged respectively.
Step S402, it is judged that described in number of times of swiping the card be once whether.
If it is, execution step S403 is to step S405, otherwise, step S406 is performed to step S411.
Step S403, search whether the traffic records of classification corresponding to described attribute exists identical with described website of getting on the bus
And with the traffic records preset in date before the described date to be judged.
If it does, perform step S404, otherwise, perform step S405.
Step S404, searches in described traffic records, the website that number of times of getting off is most, using described website as debarkation stop
Point.
Step S405, follow-up each website that the public bus network coding in the traffic records of correspondence of swiping the card described in calculating is corresponding
Attraction weight to passenger flow, according to the described attraction weight size to passenger flow, determines get-off stop.
Wherein, calculate each website and passenger flow is attracted the mode of weight a lot, such as can be according to different land status
(resident, industry, communal facility, business, traffic, road, externally etc.) attracting passenger flow coefficient is different, according to soil, according to bus loading zone
Number and website attract power supposition to get off position.Certainly also there is other embodiment, the most just repeat no more.
Step S406, is divided into many by the described IC-card traffic records on the described date to be judged according to prefixed time interval
The subrecord at individual different time interval, using one of them subrecord as current subrecord.
Step S407, it is judged that whether there is multiple public bus network coding in described current subrecord.
If it does, perform step S408, otherwise, step S409 is performed to step S411.
Step S408, encodes first public bus network coding as current public bus network, according to described current public transport line
Road encodes, the website of getting on the bus of the next public bus network coding correspondence of described current public bus network coding, and current public transport line
The up-downlink direction on road, it is thus achieved that the get-off stop of current public bus network.
Referring to Fig. 7, as a kind of embodiment, described step S408 may include that
Step S501, encodes according to described current public bus network, inquire about corresponding all up of current public bus network and under
Row site name and gps coordinate thereof.
Step S502, obtains the website of getting on the bus of the next public bus network coding correspondence of described current public bus network coding
Gps coordinate.
Step S503, if described current public bus network is up direction, the relatively described all connecting stations of current public bus network
Point and the gps coordinate distance of described corresponding website of getting on the bus, it is thus achieved that the connecting station roll-call that air line distance is the shortest, by described straight line away from
From the shortest up website as get-off stop.
Step S504, if described current public bus network is down direction, the relatively all descending stations of described current public bus network
Point and the gps coordinate distance of described corresponding website of getting on the bus, it is thus achieved that the descending site name that air line distance is the shortest, by described straight line away from
From the shortest descending website as get-off stop.
Step S409, it is judged that whether described current subrecord exists next height record.
If it does not, perform step S410, otherwise, perform step S411.
Step S410, by current public transport closest with website of initially getting on the bus in the traffic records on described date to be judged
The website of circuit is as get-off stop.
Step S411, encodes according to the public bus network in described current subrecord, getting on the bus in described next subrecord
Up-downlink direction in website, and current subrecord, it is thus achieved that the get-off stop of the public bus network in described current subrecord.
Referring to Fig. 8, as a kind of embodiment, described step S411 may include that
Step S601, encodes according to the public bus network in described current subrecord, inquires about described public bus network coding correspondence
The all up and descending site name of public bus network and gps coordinate;
Step S602, it is thus achieved that the gps coordinate that website of getting on the bus in described next subrecord is corresponding.
Step S603, if the public bus network in described current subrecord is up direction, relatively in described current subrecord
The gps coordinate distance of all up website and described website of getting on the bus of public bus network, it is thus achieved that the connecting station that air line distance is the shortest
Call the roll, using up website the shortest for described air line distance as get-off stop.
Step S604, if the public bus network in described current subrecord is down direction, relatively in described current subrecord
The gps coordinate distance of all descending website and described website of getting on the bus of public bus network, it is thus achieved that the descending station that air line distance is the shortest
Call the roll, using descending website the shortest for described air line distance as get-off stop.
Further, described method is possible not only to predict the place of getting off of passenger, it is also possible to calculate passenger at follow-up website
The probability got off.Such as in the same type light of upper one month, (be assumed to be 20 days), have 10 days in the same period (such as one day
It is divided into and includes morning, morning peak, the morning, noon, afternoon, evening peak, evening, the late into the night), same website is got on the bus, and wherein 8 days at A
Getting off in station, within 2 days, gets off at B station, then probability 80% of getting off at A station its this day, and B gets off at station probability 20%.Statistics whole piece circuit
Website get on the bus do not formed closed loop all trip users data, formed its circuit get-off stop totally calculate data.
Step S360, obtains the flow of the people of each get-off stop, calculate the flow of the people got off of each website with described respectively
The ratio of the flow of the people that the history of individual website is got off, if it exceeds predetermined threshold value, then generates early warning information.
Can carry out adding up, according to the information of the multiple IC-cards got, the flow of the people that the history of each website is got off, and
According to the current flow of the people obtaining each get-off stop, calculate ratio.The upper of single passenger can be obtained according to above method
Get-off stop, it is also possible to obtain the passenger flow of getting on or off the bus of whole circuit, thus obtain city bus passenger flow basic data.
Preferably, referring to Fig. 9, described method can also include:
Step S370, obtains the public affairs that in the history trip data of the plurality of IC-card, each public transit vehicle coding is corresponding respectively
Hand over vehicle in the number of getting off of each website;
Step S380, according to described public transit vehicle in the number of getting off of each website, calculates each described bus respectively
In the vehicle-mounted number of each website.
Further, referring to Figure 10, described method can also include:
Step S390, will be divided into multiple period time the date to be judged, the history obtaining the plurality of IC-card respectively goes out
The public transit vehicle that in row data, each public transit vehicle coding is corresponding is in the number of getting off of each website of each period.
Step S400, according to described public transit vehicle in the number of getting off of each website of each period, calculates described in each
Public transit vehicle is in the vehicle-mounted number of each website of each period.
For example, it is possible to whole day to be divided into 16 periods, calculate the on-board and off-board at each website of day part of the described public transit vehicle
Stream, load factor etc..
Further, it is also possible to according to everyone traffic trip section, draw the final passenger flow in certain community or area, it is simple to
Planning gauze.
The traffic trip data processing method that the embodiment of the present invention provides, by pressing the history trip data of multiple IC-cards
Different attribute according to the date is classified, judge described in time judging the get-off stop on date, according to the genus on date to be judged
The traffic records of the classification that property is corresponding, is predicted get-off stop, this prediction mode, it is provided that the accuracy rate of prediction, enters
One step, according to the ratio of the flow of the people that the flow of the people got off of each website and the history of each website described are got off, determines
Whether generate early warning information, in this way, it is possible to accomplish early warning and the disposal of passenger flow outburst.Further, by going through
The correction of history trip data and renewal, it is possible to improve predictablity rate further, and by concurrent calculating, meter can be accelerated
The efficiency calculated, it is possible to accomplish the quick process of mass data.
It is understood that result based on described methods analyst, further, transit network planning can be carried out, make
Basic, as public transport performance evaluation index etc. for scheduling strategy;And work out according to the least as scheduling departure frequency
A part.And based on the analysis to history trip data, it is also possible to from which further follow that: the website passenger flow data (peak hour
Website passenger flow, whole day circuit passenger flow), circuit passenger flow (peak hour circuit passenger flow, line section passenger flow), volume of the flow of passengers index (no
Coefficient of uniformity), car operation index (load factor, run time rating, running interval, service speed, service frequency), passenger go out
Row characteristic index (average travel number of times and take number of times, transfer coefficient, trip distance, travel time) etc..
Refer to Fig. 5, be the function of the traffic trip data processing equipment 210 shown in Fig. 1 that the embodiment of the present invention provides
Module diagram.Described traffic trip data processing equipment 210 runs on described server 200.At described traffic trip data
Reason device 210 includes the first acquisition module 211, sort module the 212, second acquisition module the 213, first judge module 214, second
Judge module 215 and processing module 216.
Described first acquisition module 211, for obtaining the history trip data of multiple IC-card, each described history goes out line number
According to the middle traffic records including multiple date respectively, each described traffic records includes exchange hour, public bus network coding with
And public transit vehicle coding;
Described sort module 212, for according to the different attribute on each date, the plurality of by each IC-card respectively
The traffic records on date is classified;
Described second acquisition module 213, for obtaining each the IC-card described website of getting on the bus on the date to be judged respectively;
Described first judge module 214, is used for the attribute on date to be judged described in judging, searches each IC-card described respectively
History trip data described in the traffic records of classification corresponding to attribute;
Described second judge module 215, for attribute described in history trip data according to each IC-card described respectively
The traffic records of corresponding classification, judges each the IC-card described get-off stop on the described date to be judged respectively;
Described processing module 216, for obtaining the flow of the people of each get-off stop, calculates the artificial abortion got off of each website
The ratio of the flow of the people that the history of amount and each website described is got off, if it exceeds predetermined threshold value, then sends early warning information to right
The user terminal answered.
The most each module can be by software code realization, and now, above-mentioned each module can be stored in intermediate server 200
Memorizer 220 in.The most each module is equally realized by hardware such as IC chip.
It should be noted that each embodiment in this specification all uses the mode gone forward one by one to describe, each embodiment weight
Point explanation is all the difference with other embodiments, and between each embodiment, identical similar part sees mutually.
The traffic trip data processing equipment that the embodiment of the present invention is provided, its realize principle and generation technique effect and
Preceding method embodiment is identical, for briefly describing, and the not mentioned part of device embodiment part, refer in preceding method embodiment
Corresponding contents.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, it is also possible to pass through
Other mode realizes.Device embodiment described above is only schematically, such as, and the flow chart in accompanying drawing and block diagram
Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product,
Function and operation.In this, each square frame in flow chart or block diagram can represent a module, program segment or the one of code
Part, a part for described module, program segment or code comprises holding of one or more logic function for realizing regulation
Row instruction.It should also be noted that at some as in the implementation replaced, the function marked in square frame can also be to be different from
The order marked in accompanying drawing occurs.Such as, two continuous print square frames can essentially perform substantially in parallel, and they are the most also
Can perform in the opposite order, this is depending on involved function.It is also noted that every in block diagram and/or flow chart
The combination of the square frame in individual square frame and block diagram and/or flow chart, can be with function or the special base of action performing regulation
System in hardware realizes, or can realize with the combination of specialized hardware with computer instruction.
It addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation
Point, it is also possible to it is modules individualism, it is also possible to two or more modules are integrated to form an independent part.
If described function is using the form realization of software function module and as independent production marketing or use, permissible
It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is the most in other words
The part contributing prior art or the part of this technical scheme can embody with the form of software product, this meter
Calculation machine software product is stored in a storage medium, including some instructions with so that a computer equipment (can be individual
People's computer, service end, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.
And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM, Read-Only Memory), random access memory
The various media that can store program code such as memorizer (RAM, Random Access Memory), magnetic disc or CD.Need
Being noted that in this article, the relational terms of such as first and second or the like is used merely to an entity or operation
Separate with another entity or operating space, and exist any this between not necessarily requiring or imply these entities or operating
Actual relation or order.And, term " includes ", " comprising " or its any other variant are intended to nonexcludability
Comprise, so that include that the process of a series of key element, method, article or equipment not only include those key elements, but also wrap
Include other key elements being not expressly set out, or also include want intrinsic for this process, method, article or equipment
Element.In the case of there is no more restriction, statement " including ... " key element limited, it is not excluded that including described wanting
Process, method, article or the equipment of element there is also other identical element.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, that is made any repaiies
Change, equivalent, improvement etc., should be included within the scope of the present invention.It should also be noted that similar label and letter exist
Figure below represents similar terms, therefore, the most a certain Xiang Yi accompanying drawing is defined, is then not required in accompanying drawing subsequently
It is defined further and explains.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, and any
Those familiar with the art, in the technical scope that the invention discloses, can readily occur in change or replace, should contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with scope of the claims.