Summary of the invention
Aiming at the problem that service side existing in the prior art for providing travel service is subject to economic loss, this explanation
Book embodiment provides a kind of expectation duration section and determines that method, stroke verification method and device, technical solution are as follows:
According to the 1st of this specification embodiment aspect, a kind of expectation duration section is provided and determines method, comprising:
Specified either site is stroke start site and specified either site is stroke end website;
The stroke start site and the stroke end website are formed into website pair;
Obtain the multiple history travel informations for corresponding to the website pair;
For each history travel information in the multiple history travel information, determine that the history travel information is corresponding
Stroke duration;
According to the corresponding stroke duration of the multiple history travel information, the expectation for corresponding to the website pair is determined
Duration section.
According to the 2nd of this specification embodiment the aspect, a kind of stroke verification method is provided, comprising:
Obtain the corresponding target stroke information of target stroke;
According to the target stroke information, determine the corresponding website of the target stroke information to and target stroke duration;
Judge whether the target stroke duration falls into the expectation duration section corresponding to the website pair;When the expectation
Long section is to determine what method determined according to above-mentioned expectation duration section;
If so, determining that the target stroke passes through verifying.
According to the 3rd of this specification embodiment the aspect, another expectation duration section is provided and determines method, for each station
Point, the website are disposed at least one entrance gate and at least one outlet gate, which comprises
Specified any entry gate is that stroke originates gate, and specifying any outlet gate is stroke end gate;
The stroke is originated into gate and the stroke end gate forms gate pair;
Obtain the multiple history travel informations for corresponding to the gate pair;
For each history travel information in the multiple history travel information, determine that the history travel information is corresponding
Stroke duration;
According to the corresponding stroke duration of the multiple history travel information, the expectation for corresponding to the gate pair is determined
Duration section.
According to the 4th of this specification embodiment the aspect, another stroke verification method is provided, comprising:
Obtain the corresponding target stroke information of target stroke;
According to the target stroke information, determine the corresponding gate of the target stroke information to and target stroke duration;
Judge whether the target stroke duration falls into the expectation duration section corresponding to the gate pair;When the expectation
Long section is to determine what method determined according to above-mentioned another expectation duration section;
If so, determining that the target stroke passes through verifying.
According to the 5th of this specification embodiment the aspect, a kind of expectation duration section determining device is provided, comprising:
Specified module, specified either site is stroke start site and specified either site is stroke end website;
Group forms website pair to module, by the stroke start site and the stroke end website;
Module is obtained, the multiple history travel informations for corresponding to the website pair are obtained;
Stroke duration determining module, for each history travel information in the multiple history travel information, determining should
The corresponding stroke duration of history travel information;
It is expected that duration section determining module is determined according to the corresponding stroke duration of the multiple history travel information
Expectation duration section corresponding to the website pair.
According to the 6th of this specification embodiment the aspect, a kind of stroke verifying device is provided, comprising:
Module is obtained, the corresponding target stroke information of target stroke is obtained;
Determining module, according to the target stroke information, determine the corresponding website of the target stroke information to and target
Stroke duration;
Judging treatmenting module, judges whether the target stroke duration falls into the expectation duration area corresponding to the website pair
Between;The expectation duration section is to determine what method determined according to above-mentioned expectation duration section;If so, determining the target
Stroke passes through verifying.
According to the 7th of this specification embodiment the aspect, another expectation duration section determining device is provided, for each station
Point, the website are disposed at least one entrance gate and at least one outlet gate, and described device includes:
Specified module, specifying any entry gate is that stroke originates gate, and specifying any outlet gate is that stroke is whole
Only gate;
The stroke is originated gate and the stroke end gate forms gate pair by group to module;
Module is obtained, the multiple history travel informations for corresponding to the gate pair are obtained;
Stroke duration determining module, for each history travel information in the multiple history travel information, determining should
The corresponding stroke duration of history travel information;
It is expected that duration section determining module is determined according to the corresponding stroke duration of the multiple history travel information
Expectation duration section corresponding to the gate pair.
According to the 8th of this specification embodiment the aspect, another stroke verifying device is provided, comprising:
Module is obtained, the corresponding target stroke information of target stroke is obtained;
Determining module, according to the target stroke information, determine the corresponding gate of the target stroke information to and target
Stroke duration;
Judging treatmenting module, judges whether the target stroke duration falls into the expectation duration area corresponding to the gate pair
Between;The expectation duration section is to determine what method determined according to above-mentioned another expectation duration section;If so, determining institute
It states target stroke and passes through verifying.
Stroke start site and stroke end website are formed website by technical solution provided by this specification embodiment
It is right, it according to the multiple history travel informations for corresponding to the website pair, counts in multiple history strokes, user is from the stroke
Start site, which is set out, to be reached duration spent by the stroke end website (i.e. stroke duration), and is based on statistical result, is determined
For the expectation duration section corresponding to the website pair.When being verified for the target stroke corresponding to the website pair,
If the corresponding stroke duration of the target stroke falls into the expectation duration section, it is determined that the target stroke passes through verifying.Such as
This, can be effectively reduced and provide the economic loss of the service side of travel service.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Specific embodiment
There is much the applicable scene of stroke charge mode between website, such as expressway tol lcollection scene, subway charge scene, packet
Tourist attraction charge scene containing multiple toll sites etc..Under these scenes, as long as service side is counted by clue of user identifier
One stroke is calculated, will there are problems that the service side of travel service is subject to economic loss.
The following detailed description of this problem Producing reason.
Service side is often the beginning and end for determining one stroke as clue using user identifier, before implying here
Mentioning is, service side believes, for any user, which starts the user identifier held when stroke and terminate to hold when stroke
User identifier is same user identifier.This premise is correct, and the stroke that the user that service side determines passes through is only accurately,
In turn, it is only accurately based on the stroke expense of determining climb displacement.
However, practice in, there are loopholes for the hypothesis in this premise, i.e., the user start the user identifier held when stroke and
The user identifier for terminating to hold when stroke is not same user identifier, may cause the row that the user that service side determines passes through
The stroke that journey, the shorter than user are actually passed through.
Fig. 1 shows a kind of stroke route figure.In Fig. 1, there are 4 (websites 1~4) on stroke route.Assuming that the row
The travel service square gauge of journey route is fixed, the every stroke by between adjacent two station of user, must 1 yuan of stroke expense of payment.User A is standing
Point 1 sets out (service side establishes the corresponding relationship of website 1 and user identifier A and preservation) after showing user identifier A to service side, preceding
Toward website 3;User B sets out after website 4 shows user identifier B to the management equipment of service side, and (service side establishes website 4 and uses
Family identifies the corresponding relationship of B and preservation), go to website 2.Under normal circumstances, after user A reaches website 3, go out again to service side
Show user identifier A, service side determines that the stroke that user A passes through is 1~website of website 3, then require to use according to user identifier A
Family A pays 2 yuan.Similarly, after user B reaches website 3, service side also may require that user B pays 3 yuan.
But user A can gang up spoofs services side with user B and can show to service side after user A reaches website 3
After user identifier B, user B reach website 2, user identifier A can be shown to service side.In this way, service side can take for user A
The stroke of process is 4~website of website 3, only may require that user A pays 1 yuan.Similarly, service side can take for user B process
Stroke is 1~website of website 2, also only may require that user B pays 1 yuan.Obviously, user A and user B gangs up the behavior of deception, makes
Service side has suffered 2 yuan of loss.
This problem in order to facilitate understanding by those skilled in the art is described in detail so that subway charges scene as an example.
Currently, scanning the two dimensional code (comprising user identifier) that user shows by subway gate, realize that user passes in and out subway station and traffic
The mode of expense clearing is gradually popularized.In such a mode, above-mentioned service side is metro company, in addition, user usually require it is pre-
First user identifier is registered to electronic payment service quotient (such as Alipay company).With continued reference to Fig. 1, when user A wants to enter into website 1
When, the payment application (such as Alipay application) installed on the mobile phone of oneself can be used and generate the two dimensional code that enters the station, the two dimension that enters the station
Code includes that the user pre-registered user identifier A is built after the subway gate of website 1 scans the two dimensional code that enters the station that user A shows
Corresponding relationship and the preservation of vertical website 1 and user identifier A.When user, which wants slave site 3, to be left, can reuse certainly
The payment application installed on oneself mobile phone generates the outbound two dimensional code comprising user identifier A, and the subway gate of website 3 scans user
After the outbound two dimensional code that A shows, determines that the stroke of user A experience is 1~website of website 3, generate stroke recording, then, subway
The stroke recording of user A this stroke is sent to payment services quotient and settled accounts by company.
In such a mode, criminal can hold a large amount of different user identifiers, these user identifiers are all preparatory
It is registered to payment services quotient.With continued reference to Fig. 1, on the one hand, when user A wants to enter into website 1, criminal is to user A
The two dimensional code that enters the station comprising user identifier X is provided, so that user A enters website 1;It is illegal when user B wants to enter into website 4
Molecule provides the two dimensional code that enters the station comprising user identifier Y to user B, so that user A enters website 4.On the other hand, as user A
When desired slave site 3 is left, criminal but provides the outbound two dimensional code comprising user identifier Y to user A, leads to metro company
The stroke for takeing for user A process is 4~website of website 3;When user A, which wants slave site 3, to be left, criminal is but to user
B provides the outbound two dimensional code comprising user identifier X, and causing metro company to take for the stroke of user B process is 1~website of website
2.That is, the two dimensional code by bus shown when user A enters the station and when outbound to subway gate is not based on same user identifier
The two dimensional code of generation, user A only need to pay the expense of a station stroke (4~website of website 3), user B.Obviously, this meeting
Metro company is set to suffer economic loss.
It is applicant's understanding that investigating one stroke from time dimension, it can identify that current stroke is used with the presence or absence of malice
Escape the case where paying stroke expense in full in family.
Specifically, it uses the example above, it is assumed that user's C non-malicious is normally ridden with the user identifier C of oneself, and slave site 4 enters the station
The time point of (showing the two dimensional code that enters the station comprising user identifier C) is T1, and slave site 3 is outbound (to show going out comprising user identifier C
Stand two dimensional code) time point be T2, user C slave site 4 enters, and slave site 3 is left, interphase every when a length of T2-T1, this
It is that metro company records, stroke duration corresponding to this one stroke of 4~website of website 3.In addition, malicious user A slave site 1 into
The time point stood and (show the two dimensional code that enters the station comprising user identifier X) is T3, and slave site 3 is outbound (to be shown comprising user identifier Y's
Outbound two dimensional code, it should be noted that the two dimensional code that enters the station comprising user identifier Y is presented to website 4 in time point T4 by user Y
Subway gate, when user A is outbound, it is only necessary to the stroke expense of 4~website of pay site 3) time point be T5, user
A slave site 1 enters, and slave site 3 leaves, between the when a length of T5-T3 that is separated by, and subway side's record, 4~website of website 3 this
Stroke duration corresponding to one stroke is T5-T4.Herein it is critical that on the one hand, T4 be actually user Y enter the station when
Between point, be not the time point (T3) that user A enters the station;On the other hand, T5 is actually user A outbound time point, is not user Y
Outbound time point.
And in practice, often there is marked difference in T5-T4 and T2-T1.If that is, user stroke midway more
User identifier (user identifier i.e. for entering the station and the user identifier for outbound are inconsistent) has been changed, just frequently can lead to service
The stroke duration of Fang Jilu occurs abnormal.It means that some stroke to be verified is directed to, if service side's record corresponds to
The stroke duration of the trip is larger with the stroke duration difference for corresponding to the trip under normal circumstances, then illustrates that the trip is related to disliking
Meaning user midway replacement user identifier is to escape the case where paying stroke expense in full.
Thus it is possible to identify that one stroke escapes the feelings for paying stroke expense in full with the presence or absence of malicious user accordingly
Condition pays stroke expense in full so as to prevent malicious user from escaping, reduces and provide the economy of the service side of travel service
Loss.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this
Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described
Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual,
Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
Below in conjunction with attached drawing, the technical solution that each embodiment of this specification provides is described in detail.
Fig. 2 is a kind of flow diagram of the determination method in expectation duration section that this specification embodiment provides, including
Following steps:
S200: specified either site is stroke start site and specified either site is stroke end website.
S202: the stroke start site and the stroke end website are formed into website pair.
The executing subject of this method can be to provide the equipment of the service side of travel service, and (herein referred to as service side sets
It is standby), such as computer, mobile phone, server, the gate having data processing function of service side.
The stroke start site is the corresponding website of starting point of a trip, and the stroke end website is this section of stroke
The corresponding website of terminal.Stroke start site and stroke end website form website pair, and the website is to just uniquely determining
This section of stroke.For example, stroke start site is website 1, stroke end website is website 2, then website is to (website 1, website 2)
1~website of stroke website 2 is just uniquely determined.
It should be noted that the stroke start site and the stroke end website can be same website.For example, row
Journey start site is website 1, and stroke end website is also website 1, then website has just uniquely determined row to (website 1, website 1)
1~website of Cheng Zhandian 1.In practice, user can be entered the station with slave site 1, and then slave site 1 is outbound again, at this point, stroke website 1
~website 1 can also generate corresponding stroke expense.
S204: the multiple history travel informations for corresponding to the website pair are obtained.
In this specification embodiment, a history travel information refers to, any user is completed to correspond to described in history
Information caused by the stroke of website pair is usually to service method, apparatus record.For example, under subway scene, it is assumed that described
Website is to for (website 1, website 2), then any user slave site 1 enters the station, slave site 2 is outbound, the time meeting of entering the station of the user
By the gate record that enters the station of website 1, the outbound time of the user can be recorded by the outbound gate of website 2, finally, start of a run letter
Cease one history travel informations of information stroke such as (website 1), inbound time, stroke end information (website 2), outbound time.
In this specification embodiment, it can be directed to each history travel information, obtain in the history travel information and include
, the site information corresponding to start of a run and the site information corresponding to stroke end.If corresponding to the website of start of a run
Information is the information of the stroke start site, and the site information for corresponding to stroke end is the letter of the stroke end website
The history travel information, then is determined as corresponding to the history travel information of the website pair by breath.
S206: for each history travel information in the multiple history travel information, the history travel information is determined
Corresponding stroke duration.
In this specification embodiment, each history travel information that can be directed in the multiple history travel information,
The inbound time for including in the history travel information, outbound time are obtained, according to the inbound time and the outbound time, meter
Calculate the corresponding stroke duration of the history travel information.For example, the inbound time is 10 points, the outbound time is 12 points, that
, when corresponding stroke a length of 1 hour.
S208: it according to the corresponding stroke duration of the multiple history travel information, determines and corresponds to the website pair
Expectation duration section.
In this specification embodiment, due to escaping the stroke of payment stroke expense situation in full there are malicious user always
A small number of, therefore, a non-malicious user can be determined according to the corresponding stroke duration of the multiple history travel information
Complete the stroke for corresponding to the website pair, the zone of reasonableness of the duration spent, that is, when corresponding to the expectation of the website pair
Long section.If the corresponding stroke duration of some stroke falls into the expectation duration section, there is greater probability not to be related to malice
User, which escapes, pays stroke expense situation in full, if the corresponding stroke duration of some stroke does not fall within the expectation duration area
Between, there is greater probability to be related to malicious user and escapes payment stroke expense situation in full.
It the expectation duration section specifically can be specified according to actual business requirement.For example, can be to the expectation duration
The left and right endpoint value in section is specified, so that in the multiple history travel information, 80% or more history travel information pair
The stroke duration answered falls into the expectation duration section.
Those skilled in the art are after understanding core of the invention thought, it is easy to various ways are expected, with described
A length of reference when the corresponding stroke of multiple history travel informations, when determining a reasonable duration section as the expectation
Long section.
It further, can be according to the corresponding row of the multiple history travel information in this specification embodiment
Cheng Shichang, the probability distribution of a length of variable when determining with stroke;According to the desired value of the corresponding stroke duration of the probability distribution,
Determine the expectation duration section for corresponding to the website pair.
For example, corresponding to the expectation duration section of the website pair can be, (μ-N* σ, μ+N* σ).Wherein, μ indicates institute
It states desired value (average value of namely each stroke duration), σ indicates the corresponding standard deviation of the probability distribution, and N is greater than 0.
Fig. 3 be this specification embodiment provide with stroke when a length of variable probability distribution schematic diagram.It is corresponding in practice
The characteristic of normal distribution is often showed in multiple history travel informations of the website pair, it can be by the average value of stroke duration
It extends a standard deviation respectively to the left and to the right, (μ-σ, μ+σ) is obtained, as the expectation duration section.
In addition, be directed to the probability distribution, can also take corresponding to the probability distribution specified confidence level (such as 90%,
95%) confidence interval, as the expectation duration section.
It should be noted that each website can be directed in practice, determine using the website as all of stroke start site
Website pair, and for determining each website pair, execute step S204~S208.That is, for each website, it is exhaustive all
Possible website pair, and it is directed to each website pair, determine the expectation duration section for corresponding to the website pair.
Determine that method, this specification embodiment provide a kind of stroke authentication based on expectation duration section shown in Fig. 2
Method, as shown in Figure 4, comprising the following steps:
S400: the corresponding target stroke information of target stroke is obtained.
S402: according to the target stroke information, determine the corresponding website of the target stroke information to and target stroke
Duration.
The executing subject of this method can be the service method, apparatus.
In this specification embodiment, the service method, apparatus escapes payment for whether target stroke is related to malicious user
Stroke expense in full is verified.When the target stroke is completed, i.e. user is from the corresponding stroke end of the target stroke
When website is outbound, the corresponding target stroke information of the target stroke is can be generated in service method, apparatus.
Stroke start site, the inbound time, stroke end of the target stroke are generally comprised in the target stroke information
Only website, outbound time.Service method, apparatus can determine therefrom that the corresponding website of the target stroke information to and target stroke
Duration.
It should be noted that service method, apparatus is the stroke start site for determining target stroke using user identifier as clue
With stroke end website.Specifically, when user's inbound, which requests what is entered to enter for any user
Mouth website is exactly stroke start site, which shows user identifier to stroke start site, generates the record that enters the station.As the user
When outbound, it is exactly stroke end website which, which requests exit website, which shows use to stroke end website
Family mark, using the user identifier as clue, inquiry is recorded stroke end website with the inbound that the user identifier is current voucher, with
Determine corresponding stroke start site.In this manner it is possible to determine the corresponding website pair of target stroke.
S404: judging whether the target stroke duration falls into the expectation duration section corresponding to the website pair, if so,
Step S406 is executed, otherwise, executes step S408.
S406: determine that the target stroke passes through verifying.
S408: determine that the target stroke is unverified;Or, for the user identifier for including in the target stroke information
Increase exception record;If the quantity of the corresponding exception record of the user identifier is greater than specified quantity, it is determined that the target line
Journey is unverified.
As previously mentioned, the expectation duration section for corresponding to the website pair is actually described in a non-malicious user completes
Website is to corresponding stroke, section that the duration greater probability spent can be fallen into.Based on this, if the target stroke duration
Fall into the expectation duration section, so that it may think that the target stroke is that non-malicious user is completed, thus passes through verifying.
If the target stroke duration does not fall within the expectation duration section, so that it may think that the target stroke is malice
What user completed, thus it is unverified.
Further, if the target stroke duration does not fall within the expectation duration section, it could also be possible that non-malicious
Fortuitous event (being resident such as in stroke for a long time just outbound), which occurs, in user causes the target stroke duration exception occur.
For this purpose, service side sets if the target stroke duration does not fall within the expectation duration section corresponding to the website pair
It is standby to increase exception record for the user identifier for including in the target stroke information, if the corresponding exception of the user identifier
The quantity of record is greater than specified quantity (such as 3 times), it is determined that the target stroke is unverified.
Method and stroke verification method shown in Fig. 4 are determined by expectation duration section shown in Fig. 2, for either site
Right, a length of reference, determines the website to corresponding expectation duration area when with the website to the strokes of corresponding multiple history strokes
Between.Corresponding to the expectation duration section of the website pair, an actually non-malicious user originates from the stroke of the website centering
Website sets out, and reaches the stroke end website of the website centering, the section that the duration maximum probability spent is fallen into.Using corresponding to
The expectation duration section of the website pair can verify the website to corresponding stroke, identify abnormal stroke,
It prevents malicious user from escaping and pays stroke expense in full, the economic loss of service side is effectively reduced.
In addition, technical solution provided by the invention can also solve the below technical problem that
In practice, same user is continuously finished two strokes, may result within two periods being closer to
Service method, apparatus determines stroke mistake.Enter for example, user stands from A, left from the station B, and then, and stands and enter from C, stand from D
It leaves.If there is network delay or equipment fault, services method, apparatus and fails to get the information that user leaves from the station B in time,
The information that user leaves from the station D is first got instead, and in this case, service method, apparatus may only can determine whether that user completes one
A stroke " station the A~station D ", in this way, economic loss may also be caused to service side.
However, such case can equally show exception on time dimension, that is, service method, apparatus determination " station A~
The stroke duration at the station D " can show exception, will not fall into website to (A stands, the station D) corresponding expectation duration section.Therefore, lead to
This programme is crossed, can also identify the exception of the stroke as caused by network delay or equipment fault.
Fig. 5 is that another expectation duration section that this specification embodiment provides determines method, is included the following steps:
S500: specified any entry gate is that stroke originates gate, and specifying any outlet gate is stroke end lock
Machine.
S502: the stroke is originated into gate and the stroke end gate forms gate pair.
Under some scenes (such as subway scene), for each website, which is usually disposed at least one entrance lock
Machine and at least one outlet gate.In this case, since user is usually the stroke since entrance gate, from outlet, gate is whole
Only stroke, therefore stroke duration is counted in order to more accurate, no longer analyzed with website for object, but with
Gate is analyzed for object.
It should be noted that the entrance gate of the gate centering and outlet gate may belong to same website.
S504: the multiple history travel informations for corresponding to the gate pair are obtained.
In this specification embodiment, it can be directed to each history travel information, obtain in the history travel information and include
, the entrance gate information corresponding to start of a run and the outlet gate information corresponding to stroke end;If being risen corresponding to stroke
The entrance gate information of point is the information that the stroke originates gate, and the outlet gate information for corresponding to stroke end is stroke
The history travel information, then is determined as corresponding to the history travel information of the gate pair by the information for terminating gate.
S506: for each history travel information in the multiple history travel information, the history travel information is determined
Corresponding stroke duration.
S508: it according to the corresponding stroke duration of the multiple history travel information, determines and corresponds to the gate pair
Expectation duration section.
It, can be according to the corresponding stroke duration of the multiple history travel information, really in this specification embodiment
The probability distribution of a length of variable when determining with stroke;According to the desired value of the corresponding stroke duration of the probability distribution, determines and correspond to
In the expectation duration section of the gate pair.
It further, is (μ-N* σ, μ+N* σ) corresponding to the expectation duration section of the gate pair;Wherein, μ indicates institute
Desired value is stated, σ indicates the corresponding standard deviation of the probability distribution, and N is greater than 0.
It should be noted that in practice, it can be with exhaustive all possible gate pair, and it is directed to each gate pair, determining pair
It should be in the expectation duration section of the gate pair.
It should also be noted that, (may cause corresponding to gate pair just if metro company is adjusted subway line
Chang Hangcheng duration changes), then in order to it is expected the accurate of duration section, available subway line adjusted runs one section
History travel information in time, to redefine the expectation duration section for corresponding to each gate pair.
Method is determined based on expectation duration section shown in fig. 5, and Fig. 6 is that a kind of stroke that this specification embodiment provides is tested
Card method, comprising:
S600: the corresponding target stroke information of target stroke is obtained.
S602: according to the target stroke information, determine the corresponding gate of the target stroke information to and target stroke
Duration.
S604: judge whether the target stroke duration falls into the expectation duration section corresponding to the gate pair;If so,
S606 is thened follow the steps, otherwise, executes step S608.
S606: determine that the target stroke passes through verifying.
S608: determine that the target stroke does not pass through verifying;Or, for the user identifier for including in the target stroke information
Increase exception record;If the quantity of the corresponding exception record of the user identifier is greater than specified quantity, it is determined that the target line
Journey is unverified.
It should be noted that service method, apparatus is the stroke starting gate for determining target stroke using user identifier as clue
With stroke end gate.Specifically, when user's inbound, which requests what is entered to enter for any user
Mouth gate is exactly stroke starting gate, which shows user identifier to stroke starting gate, generate the record that enters the station.As the user
When outbound, it is exactly stroke end gate which, which requests exit gate, which shows use to stroke end gate
Family mark, using the user identifier as clue, inquiry is recorded stroke end gate with the inbound that the user identifier is current voucher, with
Determine corresponding stroke starting gate.In this manner it is possible to determine the corresponding gate pair of target stroke.
It should also be noted that, those skilled in the art understand herein to the explanation of method shown in Fig. 1 and Fig. 4 it
Afterwards, it is based on same inventive concept, it is easy to which the specific embodiment for expecting Fig. 5 and method shown in fig. 6 repeats no more.
Fig. 7 is that this specification embodiment provides, and subway two dimensional code is ridden under scene, and stroke verifies flow chart, including such as
Lower step:
S700: target entries gate scans inbound two dimensional code.
S702: the scanning of target outlet gate includes the outbound two dimensional code of user identifier A.
S704: target outlet gate uploads target stroke information to payment services end.
S706: payment services end determines the corresponding gate of target stroke information to, target stroke duration and corresponding expectation
Duration section.
It should be noted that the inbound two dimensional code not necessarily includes user identifier A.If the inbound two dimensional code does not wrap
A containing user identifier then illustrates entrance gate (the referred to as true entrance lock of inbound two dimensional code of the scanning comprising the user identifier
Machine) it is not the target entries gate.In turn, the corresponding gate of the target stroke information is to actually (described really to enter
Mouth gate, the target outlet gate).
S708: payment services end judges whether the target stroke duration falls into the expectation duration section, if so, just
Stroke expense is deducted in normal charging from the corresponding account of user identifier A.
S710: if payment services end target stroke duration does not fall within desired duration section, increase for user identifier B primary different
Often record, and further judge whether the quantity of the corresponding exception record of user identifier A is greater than specified quantity.
S712: payment services end is if it is determined that it is corresponding then to freeze user identifier A greater than specified quantity for the quantity of exception record
Account, if it is determined that the quantity of exception record is less than specified quantity, then normal billing, from the corresponding account of user identifier A
Deduct stroke expense.
It should be noted that target entries gate and target outlet gate are to provide the equipment of the metro company of travel service
(service method, apparatus), payment services end, which refers to, provides the e-payment that two dimensional code of riding generates service and travel fee payment service
Service provider (such as Alipay company).
Determine that method, this specification embodiment also correspondence provide a kind of expectation based on expectation duration section shown in Fig. 2
Duration section determining device, as shown in Figure 8, comprising:
Specified module 801, specified either site is stroke start site and specified either site is stroke end station
Point;
Group forms website pair to module 802, by the stroke start site and the stroke end website;
Module 803 is obtained, the multiple history travel informations for corresponding to the website pair are obtained;
Stroke duration determining module 804 is determined for each history travel information in the multiple history travel information
The corresponding stroke duration of the history travel information;
It is expected that duration section determining module 805, according to the corresponding stroke duration of the multiple history travel information, really
Surely correspond to the expectation duration section of the website pair.
The stroke start site and the stroke end website are same website.
The acquisition module 803, for each history travel information, obtaining in the history travel information includes to correspond to
Site information in start of a run and the site information corresponding to stroke end;If the site information for corresponding to start of a run is institute
The site information stated the information of stroke start site, and correspond to stroke end is the information of the stroke end website, then will
The history travel information is determined as corresponding to the history travel information of the website pair.
The stroke duration determining module 804, for each history travel information in the multiple history travel information,
Obtain the inbound time for including in the history travel information, outbound time;According to the inbound time and the outbound time, meter
Calculate the corresponding stroke duration of the history travel information.
Expectation duration section determining module 805, when stroke corresponding according to the multiple history travel information
It is long, the probability distribution of a length of variable when determining with stroke;According to the desired value of the corresponding stroke duration of the probability distribution, determine
Expectation duration section corresponding to the website pair.
Expectation duration section corresponding to the website pair is (μ-N* σ, μ+N* σ);
Wherein, μ indicates the desired value, and σ indicates the corresponding standard deviation of the probability distribution, and N is greater than 0.
Stroke verification method based on shown in Fig. 4, this specification embodiment is also corresponding to provide a kind of stroke verifying device,
As shown in Figure 9, comprising:
Module 901 is obtained, the corresponding target stroke information of target stroke is obtained;
Determining module 902, according to the target stroke information, determine the corresponding website of the target stroke information to and mesh
Mark stroke duration;
Judging treatmenting module 903, when judging whether the target stroke duration falls into the expectation corresponding to the website pair
Long section;The expectation duration section is that it is expected duration section according to Fig.2, determines method determination;If so, determining
The target stroke passes through verifying.
The judging treatmenting module 903, if the target stroke duration does not fall within the expectation corresponding to the website pair
Long section, it is determined that the target stroke is unverified;Or, increasing for the user identifier for including in the target stroke information
Exception record;If the quantity of the corresponding exception record of the user identifier is greater than specified quantity, it is determined that the target stroke is not
Pass through verifying.
Determine that method, this specification embodiment also correspondence provide a kind of expectation based on expectation duration section shown in fig. 5
Duration section determining device, as shown in Figure 10, for each website, which is disposed at least one entrance gate and at least one
A outlet gate, described device include:
Specified module 1001, specifying any entry gate is that stroke originates gate, and specifies any outlet gate for row
Journey terminates gate;
The stroke is originated gate and the stroke end gate forms gate pair by group to module 1002;
Module 1003 is obtained, the multiple history travel informations for corresponding to the gate pair are obtained;
Stroke duration determining module 1004, for each history travel information in the multiple history travel information, really
The fixed corresponding stroke duration of the history travel information;
It is expected that duration section determining module 1005, according to the corresponding stroke duration of the multiple history travel information,
Determine the expectation duration section for corresponding to the gate pair.
The entrance gate and the outlet gate belong to same website.
The acquisition module 1003, for each history travel information, obtaining in the history travel information includes to correspond to
Entrance gate information in start of a run and the outlet gate information corresponding to stroke end;If corresponding to the entrance of start of a run
Gate information is the information that the stroke originates gate, and the outlet gate information for corresponding to stroke end is stroke end gate
Information, then the history travel information is determined as corresponding to the history travel information of the gate pair.
Expectation duration section determining module 1005, when stroke corresponding according to the multiple history travel information
It is long, the probability distribution of a length of variable when determining with stroke;According to the desired value of the corresponding stroke duration of the probability distribution, determine
Expectation duration section corresponding to the gate pair.
Expectation duration section corresponding to the gate pair is (μ-N* σ, μ+N* σ);
Wherein, μ indicates the desired value, and σ indicates the corresponding standard deviation of the probability distribution, and N is greater than 0.
Based on stroke verification method shown in fig. 6, this specification embodiment is also corresponding to provide a kind of stroke verifying device,
As shown in figure 11, comprising:
Module 1101 is obtained, the corresponding target stroke information of target stroke is obtained;
Determining module 1102, according to the target stroke information, determine the corresponding gate of the target stroke information to
Target stroke duration;
Judging treatmenting module 1103, when judging whether the target stroke duration falls into the expectation corresponding to the gate pair
Long section;The expectation duration section is determined according to the described in any item methods of claim 9~13;If so, determining
The target stroke passes through verifying.
The judging treatmenting module 1103, if the target stroke duration does not fall within the expectation corresponding to the gate pair
Long section determines that the target stroke is unverified;Or, different for the user identifier increase for including in the target stroke information
Often record;If the quantity of the corresponding exception record of the user identifier is greater than specified quantity, it is determined that the target stroke is not led to
Cross verifying.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor realizes Fig. 2, Fig. 4, Fig. 5 when executing described program
Or method shown in fig. 6.
Figure 12 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram,
The equipment may include: processor 1210, memory 1220, input/output interface 1230, communication interface 1240 and bus
1250.Wherein processor 1210, memory 1220, input/output interface 1230 and communication interface 1240 are real by bus 1250
The now communication connection inside equipment each other.
Processor 1210 can use general CPU (Central Processing Unit, central processing unit), micro- place
Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one
Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment
Case.
Memory 1220 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 1220 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 1220, and execution is called by processor 1210.
Input/output interface 1230 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 1240 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 1250 include an access, equipment various components (such as processor 1210, memory 1220, input/it is defeated
Outgoing interface 1230 and communication interface 1240) between transmit information.
It should be noted that although above equipment illustrates only processor 1210, memory 1220, input/output interface
1230, communication interface 1240 and bus 1250, but in the specific implementation process, which can also include realizing normal fortune
Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment
Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
Fig. 2, Fig. 4, Fig. 5, method shown in fig. 6 are realized when sequence is executed by processor.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitorymedia), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, method, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for method reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.Embodiment of the method described above is only schematical, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.