CN110634191B - Authentication method, apparatus, medium, and device - Google Patents

Authentication method, apparatus, medium, and device Download PDF

Info

Publication number
CN110634191B
CN110634191B CN201810653514.5A CN201810653514A CN110634191B CN 110634191 B CN110634191 B CN 110634191B CN 201810653514 A CN201810653514 A CN 201810653514A CN 110634191 B CN110634191 B CN 110634191B
Authority
CN
China
Prior art keywords
code
state
travel
riding
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810653514.5A
Other languages
Chinese (zh)
Other versions
CN110634191A (en
Inventor
张伟
郭懿心
于航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810653514.5A priority Critical patent/CN110634191B/en
Publication of CN110634191A publication Critical patent/CN110634191A/en
Application granted granted Critical
Publication of CN110634191B publication Critical patent/CN110634191B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10821Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices
    • G06K7/10861Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices sensing of data fields affixed to objects or articles, e.g. coded labels
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B11/00Apparatus for validating or cancelling issued tickets

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Devices For Checking Fares Or Tickets At Control Points (AREA)

Abstract

The embodiment of the application discloses a verification method, which comprises the following steps: responding to a first riding code generation instruction, acquiring a first riding code, wherein the first riding code comprises user identity information and a first code state, and the first code state is used for representing a travel state corresponding to the first riding code; and displaying the first riding code so that the verification equipment scans the first riding code and checks a ticket according to the first riding code. By using the method, the verification equipment can complete ticket checking in an off-line state, thereby effectively preventing the unilateral code swiping of the user caused by misoperation and avoiding the charging confusion. The embodiment of the application discloses a verification device, terminal equipment, verification equipment and a storage medium.

Description

Authentication method, apparatus, medium, and device
Technical Field
The present application relates to the field of public transportation technologies, and in particular, to a verification method, an apparatus, a medium, a terminal device, and a verification device.
Background
With the popularization of intelligent terminals and the application of mobile internet technology, mobile payment has been deeply involved in the aspects of people's life. At present, in the public transportation field such as public transport and subway, the mobile payment mode which is adopted is a bus code taking mode, and the bus code taking mode is convenient to use and has low requirements on terminal equipment configuration, so that the mode is applied very mature, and the development is very rapid.
At present, in the bus scene of sectional charging of subways, buses and the like, a unilateral code swiping behavior often occurs due to abnormal equipment or misoperation of a user, wherein the unilateral code swiping refers to a behavior that the user only implements one time code swiping when one-time riding consumes, and only one code swiping record is correspondingly formed; for example, when a user takes a subway, the user only needs to swipe codes when entering the station but does not swipe codes when leaving the station; or the station is not refreshed only when the station enters but the station is refreshed only when the station exits; the generation of the unilateral code swiping can cause the charging confusion and has certain fund risk.
In the prior art, in order to control the generation of the unilateral code swiping behavior, in the ticket checking process, the verification device is in real-time network communication with the management server to acquire the historical code scanning record of the user, and then whether the current code swiping behavior of the user is normal is judged according to the historical code scanning record to effectively control the abnormal transaction of the unilateral code swiping; however, because the network environment of public transportation is often unstable, a network abnormality often occurs, when the network is abnormal or the management server cannot provide services, the verification device cannot judge whether the current code swiping behavior of the user is normal, at this time, passengers are generally prohibited from taking a bus, which causes a traffic disorder, and in order to alleviate the traffic disorder, passengers are sometimes allowed to take a bus, but a large amount of unilateral code swiping is generated, which causes a charging disorder.
Disclosure of Invention
The embodiment of the application provides a verification method, a verification device and verification equipment, so that the verification equipment can judge the code state of a riding code in an off-line manner, does not need to communicate with a management server to search a code scanning record of a passenger, can also quickly judge the validity of the riding code even if the management server network is abnormal, can effectively prevent the unilateral code brushing phenomenon caused by misoperation of a user, and avoids unilateral charging.
In view of the above, an aspect of the present application provides a verification method, including:
responding to a first riding code generation instruction, acquiring a first riding code, wherein the first riding code comprises user identity information and a first code state, the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state;
and displaying the first riding code so that the verification equipment scans the first riding code and checks a ticket according to the first riding code.
One aspect of the present application provides an authentication apparatus, the apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for responding to a first riding code generation instruction to acquire a first riding code, the first riding code comprises user identity information and a first code state, the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state;
and the display unit is used for displaying the first riding code so that the verification equipment scans the first riding code and checks a ticket according to the first riding code.
One aspect of the present application provides a terminal device, which includes a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the steps of the authentication method as provided herein according to instructions in the program code.
One aspect of the present application provides a verification method, including:
scanning a first riding code on terminal equipment, and acquiring user identity information and a first code state in the first riding code; the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state;
verifying the user identity information, and verifying the first code state according to a functional state of verification equipment, wherein the functional state of the verification equipment represents a stroke starting state or a stroke ending state used for verifying a stroke by the verification equipment;
and if the verification is passed, determining that the ticket checking is successful.
Optionally, the returning the second code state to the terminal device includes:
and communicating with the terminal equipment through near field communication, Bluetooth or a wireless network so as to return the second code state to the terminal equipment.
Optionally, the verification device includes a subway gate.
One aspect of the present application provides an authentication apparatus, the apparatus comprising:
the system comprises a scanning unit, a first bus taking unit and a second bus taking unit, wherein the scanning unit is used for scanning a first bus taking code on terminal equipment and acquiring user identity information and a first code state in the first bus taking code; the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state;
the verification unit is used for verifying the user identity information and verifying the first code state according to the functional state of verification equipment, wherein the functional state of the verification equipment represents a stroke starting state or a stroke ending state of the verification equipment for verifying a stroke;
and the determining unit is used for determining that the ticket checking is successful if the verification is passed.
An aspect of the present application provides an authentication apparatus, which includes a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the steps of the authentication method as provided herein according to instructions in the program code.
An aspect of the present application provides a computer-readable storage medium for storing program code for performing the authentication method provided herein.
According to the technical scheme, the embodiment of the application has the following advantages:
the embodiment of the application provides a verification method, the code state representing the starting state or the ending state of the travel is carried in the riding code, so that when the validity of the riding code is verified, the verification device can directly and quickly judge the validity of the riding code according to the code state carried in the riding code, the verification device can complete verification under the offline condition only by scanning the riding code of a client side, and does not need to carry out network communication with a management server to inquire a code scanning record, therefore, even if the management server is abnormal in network or cannot provide service, the judgment of the validity of the riding code cannot be influenced, and therefore, unilateral code swiping caused by misoperation of a user can be effectively prevented, and charging confusion is avoided.
Drawings
Fig. 1 is a scene architecture diagram of a verification method in an embodiment of the present application;
FIG. 2 is a flow chart of a verification method in an embodiment of the present application;
FIG. 3 is a flow chart of a verification method in an embodiment of the present application;
FIG. 4 is a flow chart of a verification method in an embodiment of the present application;
FIG. 5 is an interaction flow diagram of a verification method in an embodiment of the present application;
FIG. 6 is a schematic view of a scenario of a verification method in an embodiment of the present application;
FIG. 7 is a schematic structural diagram of an authentication device according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of an authentication device according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of an authentication device according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of an authentication device according to an embodiment of the present application;
FIG. 11 is a schematic structural diagram of an authentication device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a terminal device in an embodiment of the present application;
fig. 13 is a schematic structural diagram of an authentication device in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method comprises the steps that a client responds to a first bus-taking code generation instruction to obtain a first bus-taking code and then displays the first bus-taking code, the verification device can scan the first bus-taking code to obtain user identity information and a first code state in the first bus-taking code, then verifies the user identity information, and verifies the first code state according to the functional state of the verification device, so that the verification of the validity of the bus-taking code is realized.
In the method, because the riding code carries the code state representing the starting state or the ending state of the travel, when the validity of the riding code is verified by the verification equipment, the validity of the riding code can be quickly judged according to the code state and the functional state of the verification equipment without inquiring a code scanning record through network communication with the management server, and the judgment process can be carried out under the offline condition, so that the judgment of the validity of the riding code cannot be influenced even if the management server is abnormal in network or cannot provide services, and thus, the unilateral code brushing caused by misoperation of a user can be effectively prevented, and the charging disorder is avoided.
It should be understood that the method provided by the embodiment of the present application may be applied to a terminal device, where the terminal device is provided with a client, and the method is implemented through interaction between the client and a verification device; the client may be a stand-alone application program, or may be a functional module integrated on other application programs, such as an applet, a plug-in, and the like. In this embodiment, the terminal device may be a computing device with data processing capability, including a smart phone, a tablet Computer, or a Personal Computer (PC). Correspondingly, the verification device in the embodiment of the present application is a device for verifying a riding code, and includes a subway gate or a bus ticket checker, and the like, which is not limited in this embodiment.
In order to make the technical solution of the present application clearer, the following describes a verification method provided in the embodiment of the present application with reference to a specific scenario.
Fig. 1 is a scene architecture diagram of a verification method in an embodiment of the present application, as shown in fig. 1, fig. 1 includes a terminal device 10 and a verification device 20, a client is installed on the terminal device 10, and the client interacts with the verification device 20 through the terminal device 10, so as to implement verification of a vehicle code.
Specifically, the client responds to a first riding code generation instruction to obtain a first riding code, wherein the first riding code comprises user identity information and a first code state, the first code state is used for representing a travel state corresponding to the riding code, and the travel state refers to a travel starting state or a travel ending state. Then, the client displays the first riding code.
The verification device 20 scans the first riding code on the client, obtains the user identity information and the first code state in the first riding code, then verifies the user identity information, verifies the first code state according to the functional state of the verification device, and determines that the ticket checking is successful if the verification is passed.
In the embodiment, since the riding code carries the code state information representing the stroke starting state or the stroke ending state, the verification device not only verifies the user identity information, but also verifies the code state according to the self function state, so that the correctness of the code state is ensured, and the phenomenon of unilateral code swiping is avoided. Moreover, the verification device can acquire the code state without network communication of the management server, so that the validity of the riding code can be verified offline, and even if the network is abnormal or the management server cannot provide services, the validity verification of the riding code cannot be greatly influenced.
For ease of understanding, the authentication method provided in the embodiments of the present application will be described below from the perspective of the client and the authentication device, respectively.
Fig. 2 is a flowchart of an authentication method provided in an embodiment of the present application, where the method is applied to a terminal device, please refer to fig. 2, and the method includes:
s201: and responding to the first riding code generation instruction, and acquiring the first riding code.
The first riding code comprises user identity information and a first code state, the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state.
In this embodiment, the riding code is a kind of evidence for riding the car by the user. The user presents the riding code, and can take a car after the riding code passes verification. The bus code has various expression forms, for example, a one-dimensional code or a two-dimensional code. When the riding code is a two-dimensional code, the riding code may also be two-dimensional codes of different structures, and as an example, the riding code may be a stacked two-dimensional code or a matrix two-dimensional code, where a typical example of the matrix two-dimensional code is a Quick Response (QR) code.
The first ride code is one ride code in a trip. The first ride code may be a ride code at the beginning of the trip or a ride code at the end of the trip. The first riding code comprises user identity information and a first code state. The user identity information refers to information representing the identity of the user, and as an example, the user identity information may be a user name, a mobile phone number, and the like. The first code state is information for representing a travel state corresponding to the riding code. By adding the first code state information in the first riding code, the first code state can be verified to avoid the phenomenon of code missing or code mistaken swiping.
In this embodiment, the client in the terminal device may obtain the first riding code in response to the first riding code generation instruction. The first riding code can be generated in an off-line or on-line mode. It can be understood that the way of generating the riding code offline enables the first riding code to be generated even if the network is abnormal, and the influence of the network environment on the riding process is reduced. And by means of online generation of the riding codes, the riding codes can be generated by the application server, and the calculation pressure of the client is reduced.
In some possible implementations, the client may send a first generation request to the application server, where the first generation request includes the user identity information and the travel state of the current travel, and then receive a first riding code returned by the application server. In this implementation, the first ride code is generated by the application server according to the user identity information in the first generation request and the travel state of the current travel.
Specifically, taking the first riding code as the QR code as an example, the generation process of the first riding code will be briefly described. The application server can analyze data of user identity information and current stroke state, to determine the coded character type, and convert it into symbol character according to the corresponding character set, and select error correction grade, then the application server can code the symbol character into bit stream, and every 8 bits can form a code word to form the code word sequence of data, then error correction code is carried out, the code word sequence is divided into blocks according to the error correction grade and the divided code word, and error correction code word is generated, and added into the code word sequence of data to form new sequence, then under the condition of specification, the new sequence is put into the blocks according to the order to form the final data information, finally, the detection pattern, separator, positioning pattern, correction image and code word module are put into the matrix to form the matrix, and masking the matrix, generating format and version information, and putting the format and version information into a corresponding area to obtain the first riding code.
In some possible implementation manners, the client may also directly generate the first riding code according to the user identity information and the travel state of the current travel. In the implementation mode, the client does not need to send a request to the application server, and generates the first riding code offline according to the user identity information and the travel state information stored in the client. The process of generating the first riding code by the client is similar to the process of generating the first riding code by the application server, and is not described herein again.
S202: and displaying the first riding code so that the verification equipment scans the first riding code and checks a ticket according to the first riding code.
The client displays the first riding code after acquiring the first riding code, so that the verification device can scan the first riding code and check a ticket according to the first riding code, and whether the user is allowed to pass is determined.
There are various ways to display the first ride code. In some possible implementation manners, the first riding code may be directly displayed on a current page of the client, and of course, in some cases, the first riding code may also be displayed in a pop-up window manner, or a page is added on the basis of the current page, the current page is skipped to the newly added page, and the first riding code is displayed on the newly added page.
Therefore, the verification method provided by the embodiment of the application can be used for directly and quickly judging the validity of the riding code according to the code state carried in the riding code by the verification equipment when the validity of the riding code is verified by carrying the code state representing the starting state or the ending state of the journey in the riding code, the verification equipment can complete verification under the offline condition only by scanning the riding code of the client side, and does not need to carry out network communication with the management server to inquire the code scanning record, so that the judgment of the validity of the riding code cannot be influenced even if the network of the management server is abnormal or cannot provide services, and thus, unilateral code swiping caused by misoperation of a user can be effectively prevented, and charging confusion is avoided.
In this embodiment, the user needs to swipe the code for verification at both the start and end of the trip while riding in the car. Taking a subway as an example, a user needs to refresh a bus code when entering a station and needs to refresh the bus code when leaving the station. Based on this, the verification device verifies the validity of the ride code not only at the start of the journey, but also at the end of the journey.
After the ticket validation is successful, the trip status should be updated for the next validation. The client terminal can actively update the journey state after receiving the indication of the verification device, or update the journey state by the verification device, and send the updated journey state to the client terminal, so that the client terminal can update the journey state. In some possible implementation manners, the client receives a second code state returned by the verification device after the ticket checking is successful, wherein the second code state is opposite to the first code state, then stores the second code state, and takes the second code state as a travel state required by the next riding code generation request. In a specific implementation, the second code state is opposite to the first code state, and one of the two cases is that the first code state is a run-length starting state, and the corresponding second code state is a run-length ending state; in another case, the first code state is a run-end state, and the corresponding second code state is a run-start state.
Wherein, the client needs to communicate with the verification device to receive the second code state returned by the verification device after the ticket verification is successful. In some possible implementations, the client may communicate with the verification device through Near Field Communication (NFC), bluetooth, or a wireless network to receive the second code status returned by the verification device after the ticket verification is successful.
In this embodiment, if the code states are not consistent, a ticket validation failure may result. For example, in the last trip, when the user is out of the station, the bus code is not swiped, so that the code state stored by the client is the code state representing the end state of the trip, and when the client generates the bus code according to the code state, the code state is inconsistent with the functional state of the verification device for verification of the station entering, and the verification device fails to verify the ticket. Therefore, the historical travel can be corrected through the client, for example, the travel without the vehicle code is added to the management server, so that the management server can maintain more accurate travel information, and update the code state according to the accurate travel information.
In some possible implementations of this embodiment, the client may receive the corrected trip information of the historical trip, and send the corrected trip information of the historical trip to the management server, so that the management server updates the trip information of the historical trip according to the corrected trip information of the historical trip, and updates the code state. It can be understood that, after the corrected travel information of the historical travel is updated to the management server and the code state is updated by the management server, the client may obtain the second riding code according to the updated code state, and display the second riding code so that the verification device can verify the validity of the second riding code.
The verification method after the historical trip is corrected in the embodiment of the present application will be described below with reference to the accompanying drawings.
Fig. 3 is a flowchart of an authentication method provided by an embodiment of the present application, which is improved based on the embodiment shown in fig. 2, and this embodiment is only described with respect to differences from the embodiment shown in fig. 2, and reference may be made to the embodiment shown in fig. 2 for the same parts. As shown in fig. 3, the method includes:
s301: and receiving the changed code state returned by the management server.
In this embodiment, the management server may manage the trip information. When the journey state changes, the management server can update the code state representing the journey state to obtain the changed code state. The changed code state may be obtained by updating the code state in response to an operation of updating the trip information of the historical trip by the management server.
And the client receives the changed code state returned by the management server. Because the code state represents the run state of the current run, and the run state includes the run start state or the run start-stop state, the changed code state is another code state different from the original code state in the two states. For example, if the original code state is the run-length starting state, the changed code state returned by the management server is the run-length ending state; and if the original code state is the stroke ending state, the changed code state returned by the management server is the stroke starting state.
S302: and responding to a second riding code generation instruction, and acquiring a second riding code, wherein the second riding code comprises user identity information and the changed code state.
And the client responds to the second riding code generation instruction to acquire the second riding code. The second riding code is generated according to the user identity information and the changed code state, wherein the second riding code is generated according to the user identity information and the changed code state. The second riding code may be generated by the application server or directly generated by the client. When the second ride code is generated for the application server, the client may obtain the second ride code from the application server.
S303: and displaying the second riding code so that the verification equipment scans the second riding code and checks a ticket according to the second riding code.
After the second riding code is obtained, the client can display the second riding code so that the verification device can scan the second riding code and check a ticket according to the second riding code. The second riding code is generated according to the updated code state, if the original code state is inconsistent with the functional state of the verification device, for example, the original code state is a travel starting state, and the functional state of the verification device is a verification travel ending functional state, the changed code state, the travel ending state and the functional state of the verification device are consistent, and the verification device can pass the ticket verification on the basis of passing the user identity information verification.
There are various ways to display the second ride code. In some possible implementation manners, the second riding code may be directly displayed on a current page of the client, and of course, in some cases, the second riding code may also be displayed in a pop-up window manner, or two new pages are added on the basis of the current page, and the second riding code is displayed on the new added pages.
As can be seen from the above, an embodiment of the present application provides a verification method, where when a code state is inconsistent with an actual travel state of a user, a historical travel information change channel is provided for the user, the user can also correct a historical travel through a client, so that a management server updates the code state, the client can receive a changed code state returned by the management server, and generate an instruction according to a second riding code, obtain a second riding code carrying user identity information and the changed code state, and display the second riding code so that a verification device verifies the second riding code. By the method, the validity of the bus code can be verified in an off-line mode, the correct code state can be obtained by correcting the historical travel when the code states are inconsistent, the new two-dimensional code is generated according to the correct code state, the phenomena of code brushing errors, charging disorder and the like can be avoided by verifying the new two-dimensional code, and the fund risk is reduced.
The above embodiments describe the authentication method provided in the embodiments of the present application from the perspective of a client, and next, describe the authentication method provided in the embodiments of the present application from the perspective of an authentication device.
Fig. 4 is a flowchart of an authentication method provided in an embodiment of the present application, where the method is applied to an authentication device, and referring to fig. 4, the method includes:
s401: the method comprises the steps of scanning a first riding code on terminal equipment, and obtaining user identity information and a first code state in the first riding code.
The first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state.
In this embodiment, the verification device scans the first riding code on the terminal device, and obtains the user identity information and the first code state in the first riding code. The verification device is a device for verifying the riding code. In this embodiment, the verification device has a scanning function, acquires the user identity information and the first code state by scanning the riding code, and realizes verification of the riding code validity according to the user identity information and the first code state.
In the application scenario of public transportation, the verification device includes a subway gate. In some cases, for example, for a bus requiring code swiping verification for both getting on and getting off, the verification device may also be a bus ticket checker. The subway gate and the bus ticket gate are only some specific examples of the verification device in the embodiment of the present application, and the above examples do not constitute a limitation on the technical solution of the present application.
S402: verifying the user identity information, and verifying the first code state according to the functional state of the verification device.
The functional state of the verification device represents a trip start state or a trip end state for the verification device to verify a trip. Taking a subway gate as an example, at each entrance and exit of a subway station, an inbound gate and/or an outbound gate are respectively arranged, the inbound gate is used for verifying the stroke starting state of a stroke, and the outbound gate is used for verifying the stroke ending state of the stroke. The user can be authenticated by flashing at the inbound gate for inbound boarding and by flashing at the outbound gate for outbound departure.
When the verification device obtains the user identity information and the code state, the user identity information and the code state can be verified respectively. The verification of the user identity information includes verification of validity of the user identity, and may also include verification of user payment information, for example, whether the travel fee can be paid or not. The verification of the first code state is implemented according to the functional state of the verification device, and specific reference may be made to the following implementation manner.
In some possible implementations, the first code state may be compared with a functional state of the verification device, and if the first code state is consistent, the first code state is verified to be passed, and if the first code state is inconsistent, the first code state is not verified to be passed. When the first code status verification fails, it indicates that there is a missing trip information in the historical trip, for example, only the scan record of the beginning of the trip and no scan record of the end of the trip, or the scan record of the beginning of the trip and no scan record of the end of the trip. Based on this, the historical trip information can be corrected through the client so as to update the code state, and the detailed correction process can be described with reference to the above related contents, which is not described herein again.
In this embodiment, two riding codes are usually required for one trip, the code status of one riding code is the trip start status, and the code status of the other riding code is the trip end status. Based on the method, the code state can be updated after the ticket check is passed in order to generate the riding code for the next time. It will be appreciated that updating the code state may be accomplished by the verification device. In some possible implementations, after the code state verification passes, the verification device may generate a second code state according to the first code state, where the second code state is opposite to the first code state, and then the verification device returns the second code state to the terminal device. In this way, when a request for generating a riding code is initiated next time, the client on the terminal device may obtain the riding code generated according to the second code state in response to the request.
It should be noted that, when the verification device writes back the second code state in the terminal device, the second code state may be written back through near field communication, bluetooth, or a wireless network. Specifically, the verification device communicates with the terminal device through near field communication, bluetooth or a wireless network to return the second code state to the terminal device. Compared with other methods, the write-back is performed through methods such as near field communication, Bluetooth or a wireless network, so that the write-back is more convenient and faster, the structure of the verification device is simpler, and the cost of the device is reduced.
S403: and if the verification is passed, determining that the ticket checking is successful.
In this embodiment, if the verification of the verification device on the user identity information and the verification of the first code state both pass, it is indicated that the user identity is legal, and the travel state in the first riding code is consistent with the actual travel state, the riding code is valid, and the verification device determines that the ticket checking is successful.
Further, if at least one of the verification of the user identity information and the first code state by the verification device fails, the first riding code is invalid, and the verification device determines that the ticket checking fails. In order to facilitate the user to adjust the ticket specifically, the verification device can also prompt the reason for the failure of ticket checking. The verification device may directly prompt the user, for example, prompt the reason for the failure of ticket checking in a voice manner, or display the reason for the failure of ticket checking on a display screen of the verification device. As an extension of this embodiment, the verification device may also send the reason for the failure of ticket validation to the client, and display the reason for ticket validation identification on the client.
If the ticket checking fails, if the failure reason is that the code states are inconsistent, the travel information of the historical travel can be corrected, correspondingly, the server can update the code states according to the corrected travel information to obtain the changed code states, and the client returns the changed code states. The client acquires a new riding code carrying the changed code state, for example, a second riding code, and displays the second riding code, and the verification device may scan the second riding code, acquire the user identity information and the changed code state, and verify the user identity information and the changed code state to determine whether the ticket check is passed.
In view of the above, an embodiment of the present application provides a verification method, where a first ride code on a terminal device is scanned to obtain user identity information and a first code state in the first ride code, then the user identity information is verified, the first code state is verified according to a functional state of a verification device, and whether a ticket passes a verification is determined according to a verification result of the user identity information and the first code state. In the method, the riding code carries the code state, and the verification equipment can judge the validity of the riding code offline according to the code state without network communication with the management server, so that the verification of the riding code is realized. Moreover, the verification of the code matching state is added in the verification method, and the code matching state needs to be verified every time of verification, so that the probability of unilateral code brushing is reduced, the charging confusion and the fund risk are avoided, and the user experience is improved.
In order to make the authentication method in the embodiment of the present application easier to understand, the authentication method provided in the embodiment of the present application is introduced from the perspective of interaction between the client, the authentication device, and the management server with reference to the drawings.
Fig. 5 is an interaction flowchart of a verification method according to an embodiment of the present application. Referring to fig. 5, the method includes:
s501: the client responds to the generation request of the first riding code, and acquires the first riding code, wherein the first riding code comprises user identity information and a first code state.
S502: the client displays the first riding code.
S503: the verification device scans the first bus taking code to obtain the user identity information and the first code state in the first bus taking code.
S504: the verification device verifies the user identity information and verifies the first code state according to the functional state of the verification device. If the verification is passed, executing S512; otherwise, S505 is executed.
S505: and if the ticket checking fails, the passenger is intercepted.
If at least one of the user identity information and the first code state fails to pass the verification, the ticket check fails, the passenger can be intercepted, and the passenger is not allowed to come in or go out. The passenger refers to a user who rides the public transportation vehicle by the riding code.
S506: and prompting the passenger of the reason for the failure of ticket checking.
S507: and filling up the missing historical travel information on a travel filling function interface of the client.
The trip compensation functional interface is a functional interface for compensating the historical trip information in the client. The function interface can be supplemented with the historical travel information of the missing registration. The supplementary registered historical trip information refers to the above-mentioned supplementary trip information of the historical trip, and may be described with reference to the above-mentioned relevant contents.
S508: and the client sends the complemented historical travel information to the management server.
S509: and the management server is used for supplementing the missing historical travel information according to the supplemented historical travel information.
S510: and the management server updates the code state according to the supplemented historical travel information and sends the changed code state to the client.
S511: and the client responds to the generation request of the second riding code to acquire the second riding code, wherein the second riding code comprises the user identity information and the updated code state. And then, the client re-executes the display of the riding code so that the verification equipment scans the riding code and verifies the user identity information and the code state.
The difference is that the step displays the second riding code, and S501 displays the first riding code, and the verification device verifies the changed code state in the second riding code.
S512: and (5) successfully checking the ticket and releasing the passenger.
And verifying that the user identity information is legal, and if the first code state is consistent with the actual travel state, the riding code is valid, the ticket is verified successfully, and passengers can be released. It should be noted that, after the first code state is verified, the verification device may further generate a second code state according to the first code state, where the second code state is opposite to the first code state, and then return the second code state to the terminal device, so as to be used as a travel state required by the next riding code generation request.
In view of the above, an embodiment of the present application provides a verification method, where a client obtains a first riding code, where the first riding code includes user identity information and a first code state, then displays the first riding code, and a verification device scans the first riding code, obtains the user identity information and the first code state in the first riding code, and verifies the user identity information and the first code state, thereby implementing offline verification of validity of the riding code. When the code states are inconsistent, historical travel information can be complemented to obtain a changed code state, a second riding code is generated according to the changed code state, then the second riding code is scanned to obtain user identity information and the changed code state, and the user identity information and the changed code state are verified, so that the probability of unilateral code swiping is reduced, charging confusion and fund risks are avoided, and user experience is improved.
In order to make the technical solution of the present application clearer, the following describes a verification method according to an embodiment of the present application from an interaction perspective with reference to a specific application scenario.
Taking a subway as an example, the client can be a WeChat applet of an Tencent riding code, the verification device can be a subway gate, the management server can be a subway background server, and a user can interact with the subway gate and the subway background server through the WeChat applet of the Tencent riding code, so that the subway riding is realized.
Fig. 6 is a schematic view of a scene of a method for verifying a riding code according to an embodiment of the present application, and as shown in fig. 6, the scene includes a terminal 10, a subway gate 20 and a subway background server 30, where a wechat client is installed on the terminal 10, and the wechat client is loaded with a small program of an Tencent riding code, and thus, the wechat client is equivalent to a client interacting with the subway gate 20 to provide a riding code verification service in this embodiment.
When a user needs to ride a vehicle, a generation operation of a riding code can be triggered on an applet interface, as shown in an interface 100 in fig. 6, the user can click a "generate riding code" control on a Tencent riding code interface to trigger a generation operation of the riding code, so that a client can respond to a generation request of a first riding code and generate a first riding code according to user identity information and a first code state, then the client can display the first riding code, as shown in an interface 200 in fig. 6, and the client displays the first riding code on a current page.
Then, the user can hold the terminal by hand, so that the first riding code is within the scanning range of the subway gate 20, the subway gate 20 can scan the first riding code on the client, the user identity information and the first code state in the first riding code are obtained, the subway gate 20 can verify the user identity information and the first code state, wherein the verification of the first code state can be realized by comparing with the function state of the subway gate 20, and if the first code state is consistent with the function state of the subway gate 20, the verification of the first code state is passed; for example, the first code state is a trip start state, and the functional state of the subway gate 20 is specifically indicated for verifying the trip start state, that is, the subway gate 20 is an inbound gate, which indicates that the first code state is consistent with the functional state of the subway gate 20.
If the user identity information and the first code state are verified to be passed, the subway gate 20 determines that the ticket passes the verification, and the user can be released. The first code state is a trip starting state, so that the user can enter the station, and the first code state is a trip ending state, so that the user can exit the station.
If at least one of the user identity information and the first code state is not verified, the subway gate 20 determines that the ticket checking fails and can prompt the reason for the ticket checking failure. For example, when the ticket checking failure is caused by the fact that the first code state is inconsistent with the functional state of the verification device, the user can fill up the missing historical travel information on the travel compensation functional interface of the client. In this example, the user may click on the "trip management" control in the interface 100 to enter the "trip subsidy" function interface, as shown in the interface 300, in this example, 4 pieces of trip information are displayed, wherein the latest 1 piece of trip information lacks an end record, and the end site information may be supplemented in the interface to implement trip subsidy.
Specifically, the client may receive the correction travel information of the historical travel, send the correction travel information of the historical travel to the subway backend server 30, and the subway backend server 30 updates the travel information of the historical travel according to the correction travel information of the historical travel and updates the code state. Then, the subway backend server 30 returns the changed code state to the client.
The client may respond to a request for generating the second riding code, generate the second riding code according to the changed code state and the user identity information, and then display the second riding code, and the subway gate 20 may scan the second riding code, obtain the user identity information in the second riding code and the changed code state, and then verify the user identity information and the changed code state, thereby implementing verification of validity of the second riding code.
In the embodiment, the bus code acquired by the client not only comprises the user identity information, but also comprises the code state, so that the subway gate can acquire the code state without communicating with the subway background server when verifying the bus code, the offline verification of the bus code can be realized by verifying the user identity information and the code state, and the verification of the bus code cannot be greatly influenced even if the subway background server network is abnormal or cannot provide services. And when the code state is inconsistent, historical travel information can be corrected, and the changed code state is obtained, so that unilateral code brushing can be avoided, further, charging confusion is avoided, fund risk is reduced, and user experience is improved.
Based on the above specific implementation manners of the verification method provided in the embodiments of the present application, the present application further provides a verification device, and the device provided in the embodiments of the present application will be described in terms of functional modularization.
Fig. 7 is a schematic structural diagram of an authentication apparatus provided in an embodiment of the present application, and referring to fig. 7, the apparatus 700 includes:
the obtaining unit 710 is configured to obtain a first riding code in response to a first riding code generation instruction, where the first riding code includes user identity information and a first code state, the first code state is used to represent a travel state corresponding to the first riding code, and the travel state includes a travel starting state or a travel ending state;
and the display unit 720 is configured to display the first riding code, so that the verification device scans the first riding code, and performs ticket checking according to the first riding code.
Optionally, the obtaining unit 710 is specifically configured to:
sending a first generation request to an application server, wherein the first generation request comprises user identity information and a travel state of a current travel;
and receiving a first riding code returned by the application server.
Optionally, the obtaining unit 710 is specifically configured to:
and generating a first riding code according to the user identity information and the current travel state.
Optionally, referring to fig. 8, fig. 8 is a schematic structural diagram of an authentication apparatus provided in an embodiment of the present application, where the apparatus further includes a receiving unit 730 and a storage unit 740:
the receiving unit 730, configured to receive a second code state returned by the verification device after the ticket checking is successful; the second code state is opposite the first code state;
the storage unit 740 is configured to store the second code state, and use the second code state as a travel state required by a next ride code generation request.
Optionally, the receiving unit 730 is specifically configured to:
and communicating with the verification device through near field communication, Bluetooth or a wireless network to receive the second code state returned by the verification device after the ticket checking is successful.
Optionally, referring to fig. 9, fig. 9 is a schematic structural diagram of an authentication apparatus provided in an embodiment of the present application, where the apparatus further includes a sending unit 750;
the receiving unit 730 is further configured to:
receiving correction travel information of historical travel;
the sending unit 750 is configured to:
and sending the corrected travel information of the historical travel to a management server so that the management server updates the travel information of the historical travel according to the corrected travel information of the historical travel.
Optionally, the receiving unit 730 is further configured to:
receiving the changed code state returned by the management server;
the obtaining unit 710 is further configured to:
responding to a second riding code generation instruction, and acquiring a second riding code, wherein the second riding code comprises user identity information and the changed code state;
the display unit 720 is further configured to:
and displaying the second riding code so that the verification equipment scans the second riding code and checks a ticket according to the second riding code.
Therefore, the verification device provided by the embodiment of the application can be used for rapidly judging the validity of the riding code according to the code state and the function state of the verification device without inquiring the code scanning record through network communication with the management server when the validity of the riding code is verified by the verification device, and the judgment process can be carried out under the offline condition.
Fig. 10 is a schematic structural diagram of an authentication apparatus provided in an embodiment of the present application, and referring to fig. 10, the apparatus 1000 includes:
the scanning unit 1010 is configured to scan a first riding code on the terminal device, and acquire user identity information and a first code state in the first riding code; the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state;
a verifying unit 1020, configured to verify the user identity information and verify the first code state according to a functional state of the verifying device, where the functional state of the verifying device represents a trip start state or a trip end state of the verifying device for verifying a trip;
and a determining unit 1030, configured to determine that the ticket checking is successful if the verifications all pass.
Optionally, the determining unit 1030 is further configured to:
otherwise, determining the ticket checking failure and prompting the reason of the ticket checking failure.
Optionally, referring to fig. 11, fig. 11 is a schematic structural diagram of an authentication apparatus provided in an embodiment of the present application, where the apparatus further includes:
the generating unit 1040 is configured to generate a second code state according to the first code state after the first code state is verified, where the second code state is opposite to the first code state;
a returning unit 1050, configured to return the second code state to the terminal device.
Optionally, the return unit 1050 is specifically configured to:
and communicating with the terminal equipment through near field communication, Bluetooth or a wireless network so as to return the second code state to the terminal equipment.
As can be seen from the above, an embodiment of the present application provides a verification apparatus, which obtains user identity information and a first code state in a first riding code by scanning the first riding code on a client on a terminal device, then verifies the user identity information, verifies the first code state according to a functional state of a verification device, and determines whether a ticket passes a verification according to a verification result of the user identity information and the first code state. In the method, the riding code carries the code state, and the verification equipment can judge the validity of the riding code offline according to the code state without network communication with the management server, so that the verification of the riding code is realized. Moreover, the verification of the code matching state is added in the verification method, and the code matching state needs to be verified every time of verification, so that the probability of unilateral code brushing is reduced, the charging confusion and the fund risk are avoided, and the user experience is improved.
The above embodiment describes the verification apparatus provided in the embodiment of the present application from the viewpoint of functional modularization, and the verification apparatus provided in the embodiment of the present application from the viewpoint of hardware implementation is described below.
The embodiment of the present application further provides an authentication device, which is a terminal device, as shown in fig. 12, for convenience of description, only a part related to the embodiment of the present application is shown, and details of the specific technology are not disclosed, please refer to the method part of the embodiment of the present application. The terminal may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA, abbreviated as "Personal Digital Assistant"), a Sales terminal (POS, abbreviated as "Point of Sales"), a vehicle-mounted computer, etc., and the terminal is taken as a mobile phone as an example:
fig. 12 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Referring to fig. 12, the cellular phone includes: radio Frequency (RF) circuit 1210, memory 1220, input unit 1230, display unit 1240, sensor 1250, audio circuit 1260, wireless fidelity (WiFi) module 1270, processor 1280, and power supply 1290. Those skilled in the art will appreciate that the handset configuration shown in fig. 12 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 12:
the RF circuit 1210 is configured to receive and transmit signals during information transmission and reception or during a call, and in particular, receive downlink information of a base station and then process the received downlink information to the processor 1280; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 1210 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, the RF circuit 1210 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short message Service (Short SMS), and so on.
The memory 1220 may be used to store software programs and modules, and the processor 1280 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 1220. The memory 1220 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1220 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 1230 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 1230 may include a touch panel 1231 and other input devices 1232. The touch panel 1231, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of the user on or near the touch panel 1231 using any suitable object or accessory such as a finger, a stylus, etc.) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 1231 may include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1280, and can receive and execute commands sent by the processor 1280. In addition, the touch panel 1231 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 1230 may include other input devices 1232 in addition to the touch panel 1231. In particular, other input devices 1232 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1240 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The Display unit 1240 may include a Display panel 1241, and optionally, the Display panel 1241 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, touch panel 1231 can overlay display panel 1241, and when touch panel 1231 detects a touch operation thereon or nearby, the touch panel 1231 can transmit the touch operation to processor 1280 to determine the type of the touch event, and then processor 1280 can provide a corresponding visual output on display panel 1241 according to the type of the touch event. Although in fig. 12, the touch panel 1231 and the display panel 1241 are implemented as two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1231 and the display panel 1241 may be integrated to implement the input and output functions of the mobile phone.
The cell phone may also include at least one sensor 1250, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1241 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1241 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 1260, speaker 1261, and microphone 1262 can provide an audio interface between a user and a cell phone. The audio circuit 1260 can transmit the received electrical signal converted from the audio data to the speaker 1261, and the audio signal is converted into a sound signal by the speaker 1261 and output; on the other hand, the microphone 1262 converts the collected sound signals into electrical signals, which are received by the audio circuit 1260 and converted into audio data, which are processed by the audio data output processor 1280, and then passed through the RF circuit 1210 to be transmitted to, for example, another cellular phone, or output to the memory 1220 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 1270, and provides wireless broadband internet access for the user. Although fig. 12 shows the WiFi module 1270, it is understood that it does not belong to the essential constitution of the handset, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1280 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1220 and calling data stored in the memory 1220, thereby performing overall monitoring of the mobile phone. Optionally, processor 1280 may include one or more processing units; preferably, the processor 1280 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into the processor 1280.
The handset also includes a power supply 1290 (e.g., a battery) for powering the various components, and preferably, the power supply may be logically connected to the processor 1280 via a power management system, so that the power management system may manage the charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In this embodiment, the processor 1280 included in the terminal further has the following functions:
responding to a first riding code generation instruction, acquiring a first riding code, wherein the first riding code comprises user identity information and a first code state, the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state;
and displaying the first riding code so that the verification equipment scans the first riding code and checks a ticket according to the first riding code.
In some possible implementations, the processor 1280 may further perform the steps of any one implementation of the verification method provided in the embodiment of the present application.
Fig. 13 is a schematic structural diagram of an authentication apparatus 1300 according to an embodiment of the present disclosure, where the authentication apparatus 1300 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 1322 (e.g., one or more processors) and a memory 1332, and one or more storage media 1330 (e.g., one or more mass storage devices) storing an application program 1342 or data 1344. Memory 1332 and storage medium 1330 may be, among other things, transitory or persistent storage. The program stored on the storage medium 1330 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a verification device. Still further, central processor 1322 may be disposed in communication with storage medium 1330, executing a sequence of instruction operations in storage medium 1330 on authentication device 1300.
The authentication apparatus 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input-output interfaces 1358, and/or one or more operating systems 1341, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The authentication device 1300 may also include one or more scanners 1362, one or more display screens 1364. The scanner 1362 can scan various types of riding codes, including one-dimensional codes or two-dimensional codes, to obtain user identity information and code status. The display 1364 may display information such as user identification information and/or ticket validation results.
The steps performed by the authentication device in the above-described embodiment may be based on the authentication device configuration shown in fig. 13.
CPU 1322 is configured to perform the following steps:
scanning a first riding code on terminal equipment, and acquiring user identity information and a first code state in the first riding code; the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state;
verifying the user identity information, and verifying the first code state according to the functional state of the verification device, wherein the functional state of the verification device represents a stroke starting state or a stroke ending state used for verifying a stroke by the verification device;
and if the verification is passed, determining that the ticket checking is successful.
In some possible implementations, the central processor 1322 may further perform the steps of any one implementation of the verification method provided in the embodiment of the present application.
The embodiment of the present application further provides a computer-readable storage medium for storing a program code, where the program code is used to execute any one implementation of the authentication method described in the foregoing embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A verification method is applied to a terminal device and comprises the following steps:
responding to a first riding code generation instruction, acquiring a first riding code, wherein the first riding code comprises user identity information and a first code state, the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state; the acquiring of the first riding code comprises: directly generating a first riding code according to the user identity information and the current travel state;
displaying the first riding code so that the verification equipment scans the first riding code and checks a ticket according to the first riding code; wherein, the verifying device checks the ticket, and specifically comprises: the verification equipment judges whether the travel state corresponding to the first riding code is consistent with the function state of the verification equipment or not; the functional state of the verification device comprises a trip start state or a trip end state;
if the ticket checking of the verification equipment is successful, receiving a second code state returned by the verification equipment after the ticket checking is successful, wherein the second code state is opposite to the first code state; storing the second code state, and taking the second code state as a travel state required by a next riding code generation request; the second code state is generated directly by the verification device without the need for network communication with a management server;
if the ticket checking of the verification equipment fails, according to the reason for the ticket checking failure prompted by the verification equipment, the missing historical travel information is supplemented on a travel supplementing function interface, and the travel supplementing function interface is a function interface for supplementing and correcting the historical travel information and is used for supplementing and registering the missing historical travel information;
receiving correction travel information of historical travel, and sending the correction travel information of the historical travel to a management server, so that the management server updates the travel information of the historical travel according to the correction travel information of the historical travel and updates the code state.
2. The method of claim 1, wherein the obtaining the first ride code further comprises:
sending a first generation request to an application server, wherein the first generation request comprises user identity information and a travel state of a current travel;
and receiving a first riding code returned by the application server.
3. The method of claim 1, wherein receiving the second code status returned by the validation device after a successful ticket validation comprises:
and communicating with the verification device through near field communication, Bluetooth or a wireless network to receive the second code state returned by the verification device after the ticket checking is successful.
4. The method of claim 1, further comprising:
receiving the changed code state returned by the management server;
responding to a second riding code generation instruction, and acquiring a second riding code, wherein the second riding code comprises user identity information and the changed code state;
and displaying the second riding code so that the verification equipment scans the second riding code and checks a ticket according to the second riding code.
5. An authentication method applied to an authentication device includes:
scanning a first riding code on terminal equipment, and acquiring user identity information and a first code state in the first riding code; the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state; the first riding code is generated by the terminal equipment in response to a first riding code generating instruction and directly generated according to user identity information and the travel state of the current travel;
verifying the user identity information, and verifying the first code state according to the functional state of verification equipment, wherein the verification is to verify whether the functional state of the verification equipment is consistent with the first code state, and the functional state of the verification equipment represents a stroke starting state or a stroke ending state of the verification equipment for verifying a stroke;
if the verification is passed, the ticket checking is determined to be successful;
after the first code state is verified, the method further comprises:
generating a second code state according to the first code state, wherein the second code state is opposite to the first code state, returning the second code state to the terminal equipment so that the terminal equipment stores the second code state, and taking the second code state as a travel state required by a next riding code generation request; the second code state is generated directly without the authentication device having to communicate with a management server network;
otherwise, determining ticket checking failure, and prompting the reason of the ticket checking failure so as to correct historical travel information through the terminal equipment, wherein the process of correcting the historical travel information by the terminal equipment is as follows: according to the reason for the failure of ticket checking prompted by the verification equipment, missing historical travel information is supplemented on a travel compensation function interface, the correction travel information of the historical travel is sent to a management server, so that the management server updates the travel information of the historical travel according to the correction travel information of the historical travel and updates the code state, and the travel compensation function interface is a function interface for correcting the historical travel information and is used for supplementing and registering the missing historical travel information.
6. An authentication apparatus, the apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for responding to a first riding code generation instruction to acquire a first riding code, the first riding code comprises user identity information and a first code state, the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state; the acquiring of the first riding code comprises: directly generating a first riding code according to the user identity information and the current travel state;
the display unit is used for displaying the first riding code, so that the verification equipment scans the first riding code and checks a ticket according to the first riding code; wherein, the verifying device checks the ticket, and specifically comprises: the verification equipment judges whether the travel state corresponding to the first riding code is consistent with the function state of the verification equipment or not; the functional state of the verification device comprises a trip start state or a trip end state;
the receiving unit is used for receiving a second code state returned by the verification equipment after the ticket checking is successful; the second code state is opposite the first code state; the second code state is generated directly by the verification device without the need for network communication with a management server;
the storage unit is used for storing the second code state and taking the second code state as a travel state required by a next riding code generation request;
the device is also used for supplementing the missing historical travel information on a travel supplementing functional interface according to the reason of the ticket checking failure prompted by the verification equipment if the ticket checking failure of the verification equipment occurs, wherein the travel supplementing functional interface is a functional interface for supplementing and correcting the historical travel information and is used for supplementing and registering the missing historical travel information; receiving correction travel information of historical travel, and sending the correction travel information of the historical travel to a management server, so that the management server updates the travel information of the historical travel according to the correction travel information of the historical travel and updates the code state.
7. An authentication apparatus, the apparatus comprising:
the system comprises a scanning unit, a first bus taking unit and a second bus taking unit, wherein the scanning unit is used for scanning a first bus taking code on terminal equipment and acquiring user identity information and a first code state in the first bus taking code; the first code state is used for representing a travel state corresponding to the first riding code, and the travel state comprises a travel starting state or a travel ending state; the first riding code is generated by the terminal equipment in response to a first riding code generating instruction and directly generated according to user identity information and the travel state of the current travel;
the verification unit is used for verifying the user identity information and verifying the code state according to the functional state of the verification device, wherein the verification is to verify whether the functional state of the verification device is consistent with the first code state or not, and the functional state of the verification device represents a stroke starting state or a stroke ending state of the verification device for verifying a stroke;
the determining unit is used for determining that the ticket checking is successful if the verification is passed;
the generating unit is used for generating a second code state according to the first code state after the first code state is verified, wherein the second code state is opposite to the first code state; the second code state is generated directly without the authentication device having to communicate with a management server network;
a returning unit, configured to return the second code state to the terminal device, so that the terminal device stores the second code state, and uses the second code state as a travel state required by a next riding code generation request;
the device is also used for prompting the reason of ticket checking failure if the verification fails to pass, so that the historical travel information is corrected through the terminal equipment, and the process of correcting the historical travel information by the terminal equipment is as follows: according to the reason for the failure of ticket checking prompted by the verification equipment, missing historical travel information is supplemented on a travel compensation function interface, the correction travel information of the historical travel is sent to a management server, so that the management server updates the travel information of the historical travel according to the correction travel information of the historical travel and updates the code state, and the travel compensation function interface is a function interface for correcting the historical travel information and is used for supplementing and registering the missing historical travel information.
8. A terminal device, characterized in that the device comprises a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the authentication method of any one of claims 1 to 4 according to instructions in the program code.
9. An authentication device, comprising a processor and a memory;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the authentication method of claim 5 according to instructions in the program code.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium is configured to store a program code for executing the authentication method of any one of claims 1 to 5.
CN201810653514.5A 2018-06-22 2018-06-22 Authentication method, apparatus, medium, and device Active CN110634191B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810653514.5A CN110634191B (en) 2018-06-22 2018-06-22 Authentication method, apparatus, medium, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810653514.5A CN110634191B (en) 2018-06-22 2018-06-22 Authentication method, apparatus, medium, and device

Publications (2)

Publication Number Publication Date
CN110634191A CN110634191A (en) 2019-12-31
CN110634191B true CN110634191B (en) 2022-03-01

Family

ID=68967151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810653514.5A Active CN110634191B (en) 2018-06-22 2018-06-22 Authentication method, apparatus, medium, and device

Country Status (1)

Country Link
CN (1) CN110634191B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951412A (en) * 2020-03-13 2020-11-17 武汉小码联城科技有限公司 Travel control method, device and system based on subway riding codes and electronic equipment
CN111932229A (en) * 2020-03-13 2020-11-13 武汉小码联城科技有限公司 Subway bus code payment data processing method, device and system and electronic equipment
CN111652990A (en) * 2020-07-02 2020-09-11 支付宝(杭州)信息技术有限公司 Public transport riding code generation method and device and electronic equipment
CN113743924A (en) * 2021-09-14 2021-12-03 中国银行股份有限公司 Mobile phone two-dimensional code riding method and device
CN115273297A (en) * 2022-07-04 2022-11-01 珠海格力电器股份有限公司 Personnel health information broadcasting method and device, commuting broadcasting device and control equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188014A (en) * 2007-09-28 2008-05-28 北京邮电大学 Bicycle theft-prevention and inquiry management system and method based on 2D code
JP2012155371A (en) * 2011-01-21 2012-08-16 Toshiba Corp Automatic ticket gate system and automatic ticket gate machine
KR20140116295A (en) * 2013-03-21 2014-10-02 모젼스랩(주) method of entrance control through instant QR code
CN104182799A (en) * 2014-09-16 2014-12-03 成都北纬航信网络科技有限责任公司 Flight ticket booking and flight information inquiry method and system based on mobile internet
CN106504171A (en) * 2016-09-28 2017-03-15 深圳大学 A kind of public transport ticket checking method and system
CN106779678A (en) * 2016-11-24 2017-05-31 深圳市久通物联科技股份有限公司 A kind of public transport ticket checking method and terminal based on Quick Response Code Yu high in the clouds wallet
CN206711110U (en) * 2017-04-12 2017-12-05 武汉理工大学 Train checks handheld terminal
KR20180048095A (en) * 2016-11-02 2018-05-10 현대자동차주식회사 Ticket having QR code, apparatus for smart controlling a door of bus luggage room by the ticket, system having the same and method thereof
CN108053007A (en) * 2018-02-06 2018-05-18 苏州连爱电子科技有限公司 Multifunction IC card recognizes machine

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6603406B2 (en) * 2001-11-26 2003-08-05 Motorola, Inc. Method and apparatus for detecting and responding to an absence of journey-related information
NL2008296C2 (en) * 2012-02-15 2013-08-19 Appvantages B V Method and system for verifying scannable codes, and code for use therein.
CN105261071B (en) * 2015-11-13 2018-07-27 咪付(广西)网络技术有限公司 Ticket-checking system based on bluetooth and Quick Response Code and method
CN106022819A (en) * 2016-05-13 2016-10-12 昆山爱贝儿网络科技有限公司 Method and system of carfare payment via mobile terminal for rail transit
CN106651378A (en) * 2016-10-21 2017-05-10 北京数码视讯支付技术有限公司 Payment terminal, system and method
CN106780775A (en) * 2016-11-22 2017-05-31 中南大学 two-dimensional code electronic ticket management method and system
CN108090974B (en) * 2016-11-22 2021-09-03 深圳市微付充科技有限公司 Gate control method and system
CN106846506B (en) * 2017-01-25 2021-08-10 腾讯科技(深圳)有限公司 Method and system for information verification based on information identification code
CN107516210A (en) * 2017-08-31 2017-12-26 八维通科技有限公司 A kind of method of mobile payment based on Quick Response Code and bluetooth for track traffic
CN107742322A (en) * 2017-11-24 2018-02-27 成都智元汇信息技术股份有限公司 A kind of gate control system based on Quick Response Code identification
CN108257226B (en) * 2018-01-12 2020-11-27 深圳市海东青软件科技股份有限公司 Code scanning ticket checking method, system, device, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101188014A (en) * 2007-09-28 2008-05-28 北京邮电大学 Bicycle theft-prevention and inquiry management system and method based on 2D code
JP2012155371A (en) * 2011-01-21 2012-08-16 Toshiba Corp Automatic ticket gate system and automatic ticket gate machine
KR20140116295A (en) * 2013-03-21 2014-10-02 모젼스랩(주) method of entrance control through instant QR code
CN104182799A (en) * 2014-09-16 2014-12-03 成都北纬航信网络科技有限责任公司 Flight ticket booking and flight information inquiry method and system based on mobile internet
CN106504171A (en) * 2016-09-28 2017-03-15 深圳大学 A kind of public transport ticket checking method and system
KR20180048095A (en) * 2016-11-02 2018-05-10 현대자동차주식회사 Ticket having QR code, apparatus for smart controlling a door of bus luggage room by the ticket, system having the same and method thereof
CN106779678A (en) * 2016-11-24 2017-05-31 深圳市久通物联科技股份有限公司 A kind of public transport ticket checking method and terminal based on Quick Response Code Yu high in the clouds wallet
CN206711110U (en) * 2017-04-12 2017-12-05 武汉理工大学 Train checks handheld terminal
CN108053007A (en) * 2018-02-06 2018-05-18 苏州连爱电子科技有限公司 Multifunction IC card recognizes machine

Also Published As

Publication number Publication date
CN110634191A (en) 2019-12-31

Similar Documents

Publication Publication Date Title
CN110634191B (en) Authentication method, apparatus, medium, and device
CN111066284B (en) Service certificate management method, terminal and server
CN103729765B (en) A kind of authentication control method, terminal, server, terminal device and system
CN108171832B (en) Unlocking method of shared bicycle and mobile terminal
CN107493378B (en) Method and device for logging in application program, computer equipment and readable storage medium
CN111340587B (en) Virtual commodity management method and related device
CN108668328B (en) Network switching method and mobile terminal
CN109428871B (en) Defense strategy determination method and device
CN109979045B (en) Information output method and terminal equipment
CN111641928A (en) Method for determining close contact person, terminal equipment and server
CN108156537B (en) Remote operation method of mobile terminal and mobile terminal
CN111597542A (en) Verification information sharing method and device, electronic equipment and storage medium
CN110335386B (en) Identity authentication method, device, terminal and storage medium
CN106934607A (en) A kind of method of payment, payment system service end and payment devices
CN110096320B (en) Authentication window display method and device
US10476889B2 (en) Information interaction method, apparatus and system
CN105871910B (en) eSIM joint registration method and related equipment and system
CN110533507A (en) A kind of order management method, mobile terminal and computer readable storage medium
CN110929238B (en) Information processing method and device
CN111177612B (en) Page login authentication method and related device
CN109711850B (en) Secure payment method, device and computer readable storage medium
CN108400994B (en) User authentication method, mobile terminal, server, and computer-readable storage medium
CN109547622B (en) Verification method and terminal equipment
CN111027963A (en) Payment code sharing method and electronic equipment
CN107995150B (en) Identity verification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40020112

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant