Method for authenticating, device, equipment and the storage medium of hardware device
Technical field
The present embodiments relate to Internet technical field technology more particularly to a kind of method for authenticating of hardware device, dress
It sets, equipment and storage medium.
Background technique
With popularizing for intelligence wearing hardware device, more and more concerns are obtained to the authentication of hardware device.For reality
The authentication of existing hardware device needs to realize across application interaction.Currently, more and more applications use HTML5 (abbreviation H5) technology
It develops, thus realizes that the interaction of the H5 page and native applications is particularly important.
In the prior art, the interaction of the H5 page and native applications is usually there are two types of scheme, one is being based on js interactive interfacing,
One is start the native applications page based on schema agreement.Wherein, the scheme based on js interactive interfacing needs native applications to open
It sends out Interference fit corresponding, interactive region has been confined to the application of the operation H5 page, the scope of application is small;Based on schema agreement
The scheme for starting the native applications page, will pop up prompting frame when starting application page and user is allowed to authorize, poor user experience.
Summary of the invention
The embodiment of the invention provides a kind of method for authenticating of hardware device to be improved with realizing the authentication to hardware device
The reliability and user experience of hardware device authentication.
In a first aspect, the embodiment of the invention provides a kind of method for authenticating of hardware device, this method comprises:
It authenticates the page and receives the authentication parameter that third party's page is sent, and initiated according to the authentication parameter to authentication backstage
First http request;
The authentication backstage sends general identifications code UUID to the authentication page according to first http request;
The authentication page initiates the second http request to local server according to the authentication parameter and the UUID;
The local server acquires facility information by privately owned interface according to the authentication parameter and the UUID, and will
The facility information is sent to authentication backstage;
The facility information is sent to third party backstage by the authentication backstage, so that third party backstage is according to the equipment
Information authenticates equipment, and authenticating result is sent to third party's page and is shown.
Further, authentication the page receive third party's page send authentication parameter, and according to the authentication parameter to
It initiates before the first http request on authentication backstage, further includes:
Local server device is created, to monitor the http request from the machine.
Further, authentication the page receive third party's page send authentication parameter, and according to the authentication parameter to
It initiates before the first http request on authentication backstage, further includes:
The authentication operations of user's input are received in third party's page;
The authentication page is jumped to according to the authentication operations, and authentication parameter is sent to the authentication page.
Further, the local server acquires equipment by privately owned interface according to the authentication parameter and the UUID
Information, and the facility information is sent to authentication backstage, comprising:
The local server parses the authentication parameter and the UUID;
Facility information is acquired by privately owned interface according to parsing result, and the facility information is sent to authentication backstage.
Further, the facility information includes device manufacturer, equipment brand, system version, imei and imsi.
Second aspect, the embodiment of the invention also provides a kind of authentication device of hardware device, which includes:
First http request initiation module is set in the authentication page, for receiving the authentication ginseng of third party's page transmission
Number, and the first http request is initiated to authentication backstage according to the authentication parameter;
UUID sending module is set in authentication backstage, for according to first http request to the authentication page
Send general identifications code UUID;
Second http request initiation module is set in the authentication page, for according to the authentication parameter and the UUID
The second http request is initiated to local server;
Equipment information collection module, is set in local server, for logical according to the authentication parameter and the UUID
Privately owned interface acquisition facility information is crossed, and the facility information is sent to authentication backstage;
Facility information sending module is set in authentication backstage, for the facility information to be sent to third party backstage,
So that third party backstage authenticates equipment according to the facility information, and authenticating result is sent to third party's page and is shown
Show.
Further, further includes:
Local server creation module, for creating local server device, to monitor the http request from the machine.
Further, further includes:
Authentication operations receiving module is set in third party's page, for receiving the authentication operations of user's input;
Authentication parameter sending module is set in third party's page, for jumping to authentication page according to the authentication operations
Face, and authentication parameter is sent to the authentication page.
The third aspect the embodiment of the invention also provides a kind of computer equipment, including memory, processor and is stored in
On memory and the computer program that can run on a processor, the processor are realized when executing described program as the present invention is real
Apply the method for authenticating of hardware device described in example.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program, the program realize the method for authenticating of hardware device as described in the embodiments of the present invention when being executed by processor.
In the embodiment of the present invention, authentication the page receive third party's page send authentication parameter, and according to authentication parameter to
The first http request is initiated on authentication backstage, and authentication backstage sends general identifications code to the authentication page according to the first http request
UUID, the authentication page initiate the second http request to local server according to authentication parameter and UUID, and local server is according to mirror
Weight parameter and UUID are sent to authentication backstage by privately owned interface acquisition facility information, and by facility information, and authentication backstage will be set
Standby information is sent to third party backstage, so that third party backstage authenticates facility information, and authenticating result is sent to the
Tripartite's page is shown.The method for authenticating of hardware device provided in an embodiment of the present invention, by initiating second to local server
Http request, and facility information is acquired by privately owned interface, to complete the authentication to hardware device, hardware device mirror can be improved
The reliability and user experience of power.
Detailed description of the invention
Fig. 1 is the flow chart of the method for authenticating of one of the embodiment of the present invention one hardware device;
Fig. 2 is the frame diagram of the method for authenticating of one of the embodiment of the present invention one hardware device;
Fig. 3 is the signaling diagram of the method for authenticating of one of the embodiment of the present invention one hardware device;
Fig. 4 is the structural schematic diagram of the authentication device of one of the embodiment of the present invention two hardware device;
Fig. 5 is the structural schematic diagram of one of the embodiment of the present invention three computer equipment.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart of the method for authenticating for hardware device that the embodiment of the present invention one provides, and the present embodiment can fit
The case where for authenticating to hardware device, this method can be executed by the authentication device of hardware device, which can be by
Hardware and/or software composition, and can generally be integrated in computer, server, mobile terminal (such as mobile phone, plate) and all include
In the terminal of the authentication functions of hardware device.As shown in Figure 1, this method specifically comprises the following steps:
Step 110, authentication the page receive third party's page send authentication parameter, and according to authentication parameter to authentication backstage
Initiate the first http request.
Wherein, the authentication page can be the page using HTML5 Motor.Third party's page can be by third party
Technical staff uses the page of HTML5 technological development.Authentication parameter may include third party's activity ID, authentication application ID and note
Volume code (such as cell-phone number, identification card number).Corresponding server background is applied for authentication in authentication backstage.
Specifically, user, after third party's page clicks Authorized operation, Webpage is by third party's page jump to authentication
The page, and authentication parameter is sent to the authentication page, authenticates the page after receiving authentication parameter, according to authentication parameter to authentication
Initiate the first http request in backstage.
Step 120, authentication backstage sends general identifications code UUID to the authentication page according to the first http request.
Wherein, general identifications code (Universally Unique Identifier, UUID) can be authentication backstage according to
What authentication parameter generated.Specifically, authentication backstage generates UUID according to the authentication parameter in the first http request, and by generation
UUID is sent to the authentication page.
Step 130, the authentication page initiates the second http request to local server according to authentication parameter and UUID.
Wherein, local server can be what terminal started automatically after powering, to monitor the http request of the machine.Tool
Body, the authentication page is after receiving the UUID that authentication backstage is sent, to be sent out according to authentication parameter and UUID to local server
Play the second http request.
Step 140, local server acquires facility information by privately owned interface according to authentication parameter and UUID, and by equipment
Information is sent to authentication backstage.
Wherein, facility information may include device manufacturer, equipment brand, system version, imei and imsi.Privately owned interface can
To be with hardware vendor's cooperative development for acquiring facility information.Local server is joined according to the authentication in the second http request
Several and UUID calls privately owned interface, acquires facility information by privately owned interface, and facility information is sent to authentication backstage.
Step 150, facility information is sent to third party backstage by authentication backstage, so that third party backstage is according to facility information
Equipment is authenticated, and authenticating result is sent to third party's page and is shown.
Wherein, third party backstage can be the backstage corresponding with third party's page by third party technology staff development.Mirror
Weighing result may include having permission and not having permission.Authentication backstage is sent to the after receiving facility information, by facility information
Tripartite backstage, third party backstage authenticate equipment according to the facility information received, identify whether the equipment has permission,
And authenticating result is sent to third party's page and is shown.
In the present embodiment, authentication backstage can directly be authenticated hardware information, and authenticating result is then synchronized to the
Authenticating result is finally sent to third party's page by third party backstage and shown by tripartite backstage.
Optionally, the authentication parameter that third party's page is sent is received in the authentication page, and according to authentication parameter to after authentication
Further include following steps before platform initiates the first http request: creation local server device is asked with monitoring the http from the machine
It asks.
Optionally, the authentication parameter that third party's page is sent is received in the authentication page, and according to authentication parameter to after authentication
Further include such as lower page before platform initiates the first http request: receiving the authentication operations of user's input in third party's page;Root
The authentication page is jumped to according to authentication operations, and authentication parameter is sent to the authentication page.
In the present embodiment, when third party holds certain activity, when the user of activity needs hardware to authenticate, user passes through end
End equipment enters third party's page, and authentication operations are carried out in third party's page, and terminal device is according to authentication operations by third
Authentication parameter is sent to the authentication page from third party's page to authenticating the page by square page jump.
Fig. 2 is a kind of frame diagram of the method for authenticating for hardware device that the embodiment of the present invention one provides, as shown in Fig. 2, with
The third party H5 page is opened in activity, through the browser application in terminal device in family, at third party's H5 page midpoint
Authentication operations are hit to trigger verification, the page of browser application by H5 third party's page jump to authenticating the page, and to local
Server initiates http request, and authentication parameter is reported to authentication application backstage by the local server in authentication application, and authentication is answered
Hardware information is synchronized to H5 third party backstage with backstage, H5 third party backstage authenticates hardware information, and authentication is tied
Fruit is sent to H5 third party's page and shows.
The signaling diagram of the method for authenticating for a kind of hardware device that Fig. 3 embodiment of the present invention one provides, as shown in figure 3, authentication
After starting local server, the http request of the machine is monitored.When user's activity, jumped by H5 loose-leaf
Authenticate the page to H5, H5 authenticates the page and authentication parameter is reported to authentication application backstage, and return to UUID, H5 authenticate the page according to
UUID initiates http request to local server, and local server acquires authentication parameter (i.e. hardware information) according to http request,
And authentication parameter is reported into authentication application backstage, after authentication authenticates authentication parameter using backstage, and by authenticating result
It is synchronized to H5 server-side, authenticating result return front end is shown by H5 server-side.
The technical solution of the present embodiment, the authentication page receives the authentication parameter that third party's page is sent, and is joined according to authentication
Number initiates the first http request to authentication backstage, and authentication backstage sends general identifications code to the authentication page according to the first http request
UUID, the authentication page initiate the second http request to local server according to authentication parameter and UUID, and local server is according to mirror
Weight parameter and UUID are sent to authentication backstage by privately owned interface acquisition facility information, and by facility information, and authentication backstage will be set
Standby information is sent to third party backstage, so that third party backstage authenticates equipment according to facility information, and by authenticating result
Third party's page is sent to show.The method for authenticating of hardware device provided in an embodiment of the present invention, by being sent out to local server
The second http request is played, and facility information is acquired by privately owned interface, to complete that hardware can be improved to the authentication of hardware device
The reliability and user experience of device authentication.
Embodiment two
Fig. 4 is a kind of structural schematic diagram of the authentication device of hardware device provided by Embodiment 2 of the present invention.Such as Fig. 4 institute
Show, which includes: the first http request initiation module 210, UUID sending module 220, the second http request initiation module
230, equipment information collection module 240 and facility information sending module 250.
First http request initiation module 210 is set in the authentication page, for receiving the authentication of third party's page transmission
Parameter, and the first http request is initiated to authentication backstage according to authentication parameter;
UUID sending module 220 is set in authentication backstage, logical for being sent according to the first http request to the authentication page
With identification code UUID;
Second http request initiation module 230 is set in the authentication page, for according to authentication parameter and UUID to local
Server initiates the second http request;
Equipment information collection module 240, is set in local server, privately owned for being passed through according to authentication parameter and UUID
Interface acquires facility information, and facility information is sent to authentication backstage;
Facility information sending module 250 is set in authentication backstage, for facility information to be sent to third party backstage,
So that third party backstage authenticates equipment according to facility information, and authenticating result is sent to third party's page and is shown.
Optionally, further includes:
Local server creation module, for creating local server, to monitor the http request from the machine.
Optionally, further includes:
Authentication operations receiving module is set in third party's page, for receiving the authentication operations of user's input;
Authentication parameter sending module is set in third party's page, for jumping to the authentication page according to authentication operations, and
Authentication parameter is sent to the authentication page.
Optionally, equipment information collection module 240, is also used to:
Local server parses authentication parameter and UUID;
Facility information is acquired by privately owned interface according to parsing result, and facility information is sent to authentication backstage.
Optionally, facility information includes device manufacturer, equipment brand, system version, imei and imsi.
Method provided by the executable aforementioned all embodiments of the present invention of above-mentioned apparatus, it is corresponding to have the execution above method
Functional module and beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to the aforementioned all implementations of the present invention
Method provided by example.
Embodiment three
Fig. 5 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention three provides.Fig. 5, which is shown, to be suitable for being used to
Realize the block diagram of the computer equipment 512 of embodiment of the present invention.The computer equipment 512 that Fig. 5 is shown is only an example,
Should not function to the embodiment of the present invention and use scope bring any restrictions.Equipment 512 typically undertakes hardware device
The calculating equipment of authentication functions.
As shown in figure 5, computer equipment 512 is showed in the form of universal computing device.The component of computer equipment 512 can
To include but is not limited to: one or more processor 516, storage device 528 connect different system components (including storage dress
Set 528 and processor 516) bus 518.
Bus 518 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (Industry Standard
Architecture, ISA) bus, microchannel architecture (Micro Channel Architecture, MCA) bus, enhancing
Type isa bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local
Bus and peripheral component interconnection (Peripheral Component Interconnect, PCI) bus.
Computer equipment 512 typically comprises a variety of computer system readable media.These media can be it is any can
The usable medium accessed by computer equipment 512, including volatile and non-volatile media, moveable and immovable Jie
Matter.
Storage device 528 may include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (Random Access Memory, RAM) 530 and/or cache memory 532.Computer equipment 512 can be into
One step includes other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example, it deposits
Storage system 534 can be used for reading and writing immovable, non-volatile magnetic media, and (Fig. 5 do not show, commonly referred to as " hard drive
Device ").Although being not shown in Fig. 5, the disk for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided and driven
Dynamic device, and to removable anonvolatile optical disk (such as CD-ROM (Compact Disc-Read Only Memory, CD-
ROM), digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical mediums) read-write
CD drive.In these cases, each driver can pass through one or more data media interfaces and bus 518
It is connected.Storage device 528 may include at least one program product, which has one group of (for example, at least one) program
Module, these program modules are configured to perform the function of various embodiments of the present invention.
Program 536 with one group of (at least one) program module 526, can store in such as storage device 528, this
The program module 526 of sample includes but is not limited to operating system, one or more application program, other program modules and program
It may include the realization of network environment in data, each of these examples or certain combination.Program module 526 usually executes
Function and/or method in embodiment described in the invention.
Computer equipment 512 can also with one or more external equipments 514 (such as keyboard, sensing equipment, camera,
Display 524 etc.) communication, the equipment interacted with the computer equipment 512 communication can be also enabled a user to one or more,
And/or with any equipment (such as net that the computer equipment 512 is communicated with one or more of the other calculating equipment
Card, modem etc.) communication.This communication can be carried out by input/output (I/O) interface 522.Also, computer
Equipment 512 can also pass through network adapter 520 and one or more network (such as local area network (Local Area
Network, LAN), wide area network Wide Area Network, WAN) and/or public network, such as internet) communication.As schemed
Show, network adapter 520 is communicated by bus 518 with other modules of computer equipment 512.Although should be understood that in figure not
It shows, other hardware and/or software module can be used in conjunction with computer equipment 512, including but not limited to: microcode, equipment
Driver, redundant processing unit, external disk drive array, disk array (Redundant Arrays of Independent
Disks, RAID) system, tape drive and data backup storage system etc..
The program that processor 516 is stored in storage device 528 by operation, thereby executing various function application and number
According to processing, such as realize the method for authenticating of hardware device provided by the above embodiment of the present invention.
Example IV
The embodiment of the present invention four additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should
The method for authenticating of the hardware device as provided by the embodiment of the present invention is realized when program is executed by processor.
Certainly, a kind of computer readable storage medium provided by the embodiment of the present invention, the computer program stored thereon
The method operation being not limited to the described above, can also be performed the method for authenticating of hardware device provided by any embodiment of the invention
In relevant operation.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service
It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.