Embodiment
The page data of the vivo identification page include some byte numbers are larger, the few resource file of change (such as with
The picture file at family interface), these files are used to the form of resource bag, from service in a manner of web in embodiments herein
End is issued to client, and these resource files can be repeatedly used for the vivo identification page by client after being saved.Pass through calling
Above-mentioned resource file realizes the page data of live body page various functions (to be different from vivo identification page bag in the prior art
Include the page data of resource file content, by the vivo identification page in the application include resource file content page number it is said that
For light weight page data) then to be asked when client opens the vivo identification page to service end, light weight page data is operationally
Call the local resource file of client.
So, to be realized relative to the nation method of the vivo identification page, resource bag is downloaded after installation is complete by client,
Resource file therein need not be packaged in installation file, reduce the size of installation file;Relative to every time by client with
Web modes ask complete page data (light weight page data is much larger than due to the content with resource file), each client
End need to only ask light weight page data when opening the vivo identification page, resource bag is downloaded only in service end using new resource text
Part have modified and just need after existing resource file to carry out once, without carrying out every time, therefore can accelerate vivo identification page
The opening speed in face, so as to solve problems of the prior art.
Embodiments herein is applied to the software systems of C/S (Client/Server, client-side/server-side) framework, visitor
Family end mutually may have access to the equipment where service end by network.Wherein, equipment where client can be mobile phone, flat board electricity
The equipment such as brain, PC (Personal Computer, PC), notebook, server;Equipment where service end can be PC
The equipment such as (Personal Computer, PC), notebook, server.The embodiment of the present application is to client and service end
The species of place equipment, and the type of communication network, agreement etc. do not limit between client and service end.
In embodiments herein, client or service end can be made up of a software module;Can also by two to
Multiple software modules are formed, and these have the various functions that client or service end are completed in the collaboration of difference in functionality software module, its
These software modules of middle service end may operate on same physical equipment, can also operate in the physics of two and the above
In equipment.
In embodiments herein, the implementation method of the vivo identification page operates in the flow of client as shown in figure 1, fortune
Row is as shown in Figure 2 in the flow of service end.
In client, step 110, vivo identification initialization requests are sent to service end, receive the carrying that service end returns
There is the vivo identification initialization response that resource bag identifies.
In service end, step 210, after the vivo identification initialization requests of client are received, return and take to the client
Vivo identification initialization response with resource bag mark.
According to user client operation, when client will open the vivo identification page, to service end send live
Body identifies initialization requests.After service end receives, the client will be used for the mark of the resource bag of the vivo identification page, encapsulated
Client is returned in vivo identification initialization response.
Concrete condition in practical application scene, if the resource bag that different clients use is different, visitor
Family end can provide the relevant information of itself and/or place equipment in vivo identification initialization requests to service end.For example, such as
The resource bag that fruit is used for the vivo identification page is different to different users, then client is in vivo identification initialization requests
User identity information can be carried, user identity information can uniquely determine the user using the client in service end
Any information, such as registered user's name, subscriber-coded, so that service end determines the resource bag mark that the user uses;If
Equipment and/or operating system use different resource bags where different clients, then client can be initial in vivo identification
Change one in the device name of equipment, unit type, operating system name, operating system version number where being carried in request to more
Individual information, service end determine that the resource bag for returning to client identifies according to the information of carrying.
Resource bag is formed by the resource file packing for the vivo identification page, is generally stored in the form of compressed file
Service end.The mark of resource bag can be any information that some resource bag can be uniquely determined in service end, such as resource bag
The unique sequence numbers etc. of title, the store path of resource bag and title, resource bag.
In client, step 120, when locally not preserving the resource bag with the mark, being downloaded from service end has
The resource bag of the mark is simultaneously stored in local.
Resource bag mark is extracted in the vivo identification initialization response that client returns from service end, is searched whether locally
The resource bag has been saved (i.e. with the resource bag identified in vivo identification initialization response).If local preserved
The resource bag, then do not process, into step 130.If local be not present the resource bag, initiated to service end under resource bag
Request is carried, including the mark of the resource bag, corresponding resource bag is handed down to client by service end according to the mark of resource bag
End.
When service end some resource is surrounded by change, such as resource file, resource file are increased or decreased in resource bag
Content changes, and service end can generate new resource bag and new mark, under in vivo identification initialization response
The mark for sending out new, to make new resource bag download to client and for the vivo identification page of client;Service end can be with
Original resource bag is updated in the case of immovable mark, and original mark and pressure more new command (can be passed through
Some flag bit in set vivo identification initialization response is realized) it is encapsulated in vivo identification initialization response and issues in the lump
To client.When client receives the pressure more new command issued in the lump with resource bag mark, if local should without preservation
The resource bag of mark, then download the resource bag from server and preserve;If the local resource bag for preserving the mark, again
The resource bag of the mark is downloaded from server, and the resource bag of the local mark preserved originally is replaced with to the money re-downloaded
Wrap in source.Service end can preserve the list for the client for having completed to force renewal, the resource bag renewal of so each client
Also need to only carry out once.
In client, step 130, vivo identification page request is sent to service end, receives carrying for service end return
The vivo identification page response of light weight page data.
In service end, step 220, after the vivo identification page request of client is received, return and take to the client
Vivo identification page response with light weight page data.
After the vivo identification page request for receiving client transmission, service end is by the light weight page data of the vivo identification page
It is encapsulated in vivo identification page response, returns to client.Because service end has been accused in vivo identification initialization response
The resource bag mark of the vivo identification page will be used for by knowing client, therefore money can be no longer carried in vivo identification page response
Source bag mark.
Light weight page data can be realized using web modes, because web modes usually can be common to various equipment and behaviour
Make system, therefore light weight page data is applied to different operating system and multiple versions of different client devices without exploitation.
If the light weight page data that service end returns to different user may be different, client can be in vivo identification
Page request carries user identity information, so that service end is defined as the light weight page data that the user issues.
In client, step 140, light weight page data is run, call the resource bag with the mark in the process of running
In resource file carry out vivo identification webpage representation, and carry out vivo identification.
Client therefrom extracts light weight page data, afterwards after the vivo identification page response of service end return is received
Light weight page data is run to show the vivo identification page and realize vivo identification function based on the page showed.
In showing the vivo identification page and realizing all page datas needed for vivo identification function, change frequency is low,
The part that can be called can serve as resource file.Resource file includes page resource file, vivo identification resource file
One or both of, client is lived during light weight page data is run by invoking page resource file
Body identifies webpage representation, and vivo identification is carried out by calling vivo identification resource file.
For example, multimedia file in vivo identification page presentation is with low uncertainty, it is big to take byte number, is well suited as
Page resource file;More frequently software module can be used as live body to some update times needed to use in vivo identification
Resource file, such as vivo identification model algorithm are identified, so can be under conditions of without client terminal software updating at any time
Lift the vivo identification performance of client.
Some can also be included in resource file to be used to verify the whether complete information of resource bag, derive from for resource bag
The information at legitimate service end etc..
Client can be discharged during light weight page data is run and load the resource file in resource bag for
Call, can also in advance discharge and load the resource file in resource bag.In one implementation, in order to avoid entering in user
Row waits resource bag to download after opening the operation of the vivo identification page, can use asynchronous download resource bag and load resource file
Mode.Specifically, client is discharged in the resource bag in the resource bag that download service end is specified and after being stored in local
Resource file, and load these resource files;Client calls the resource loaded during light weight page data is run
File carries out vivo identification webpage representation and vivo identification.In this realization, light weight page data wants forward compatibility resource bag, and
And the resource bag (having the resource bag identified in the vivo identification initialization response for being different from receiving recently) of legacy version will not
Reuse.
This to achieve the advantage that, client is after vivo identification initialization response is received, you can sends and lives to service end
Body identifies page request, is finished without waiting resource bag to download (when service end issues in vivo identification initialization response
When new resource bag identifies or forces more new command).Its shortcoming is, if service end this issued new resource bag mark or
Force more new command, it is possible to the resource file being only after updating used when opening the vivo identification page next time.
In order to avoid in resource bag failed download or resource bag resource file load failure when, client because do not have can
Resource bag can not carry out vivo identification, and can be carried in the installation file of client can be used for realizing the vivo identification page
The default resource bag of the most basic function, for example, the picture file in default resource bag can be that resolution ratio is very low, page effect is poor
Picture file, vivo identification model algorithm can also be simplified algorithm, with as far as possible reduce installation file size.Work as resource
When resource file loading in bag failed download or resource bag fails, the resource file in client loading default resource bag, from
And avoid the interruption to user service.
In another implementation, by service end specify live body action that user will complete on the vivo identification page,
And the action per secondary completion may be different, preserved on the client and/or always relative to the live body action that will be completed
Fixed action is completed, there is higher security.
Specifically, service end after the vivo identification page request of client is received, can generate the bag of the client
The business datum of live body action message is included, and the business datum generated and light weight page data are encapsulated in the vivo identification page
The client is returned in response.Live body action message is used to specify the user's action to be completed when carrying out vivo identification.Visitor
Light weight page number therein is run after the vivo identification page response with business datum and light weight page data is received in family end
According to, the action that live body action message is specified in being shown when carrying out vivo identification webpage representation to user by business datum, and
Whether detection user completes the action specified when carrying out vivo identification.
Service end can be after the vivo identification page request of client be received, then determines that user will complete in the client
Live body action., can be by if service end needs to determine that live body that user to be completed acts according to user identity information
Client carries user identity information in vivo identification page request;To client in vivo identification initialization requests
The situation of user identity information was provided to service end, then can be by service end after vivo identification initialization requests are received, root
According to user identity information determine will the live body action message to be completed in vivo identification of the user, generation uniquely represent the client
Hold this vivo identification initialization requests (to service end, a vivo identification business using receive vivo identification initialization requests as
Start) service identification, after the corresponding relation of service identification and live body action message is preserved, service identification is carried in live body
Client is informed in identification initialization response;Client is carried in vivo identification initialization response in vivo identification page request
In the service identification that receives, the service identification that service end passes through in vivo identification page request search corresponding to live body action letter
Breath, business datum is generated using the live body action message found, and client is sent in vivo identification page response.
It can be seen that in embodiments herein, by for the resource file of the vivo identification page in the form of resource bag, with
Web modes are downloaded and preserved from service end by client, and when opening the vivo identification page, client asks light weight to service end
Page data, and by calling the resource file in local resource bag to realize live body in the running of light weight page data
The identification page show and vivo identification function, it is excessive both to have avoided installation file, will not also slow down in most cases
The opening speed of the vivo identification page, save the flow of client device.
In the application example of the application, some business App (application program) on the mobile apparatus is run, is used
Recognition of face logs in this operation system.Operation has two SFU software functional units on the server of the operation system:Business service
Items of the service end of the operation system in face login are completed in end and face service end, the collaboration of the two SFU software functional units
Function.Wherein, business service end is used for, when needing the registering service for carrying out recognition of face to occur, starting the clothes of face service end
Business flow;Face service end is used for completing the various functions of service end in recognition of face.
Business App on mobile device includes 5 SFU software functional units:Business module, face framework SDK (Software
Development Kit, SDK), the service of face live body, face SDK storage services, face H5 (HTML5,
HyperText Mark-up Language 5, HTML the 5th edition) module, this 5 SFU software functional unit collaborations are in fact
Now various functions of the client of the operation system in face login.Wherein, business module is used for needing to carry out face knowledge
When other registering service occurs, start face recognition process;Face framework SDK is used for dispatching face SDK storage services and face
H5 modules, complete recognition of face webpage representation and recognition of face;The service of face live body includes recognition of face nation method, for root
Whether matched with the sample to prestore according to the face live body image or the action of voice recognition live body, face of mobile device collection;People
Face SDK storage services are used for downloading, managing resource bag, and provide resource file to other software functional unit;Face H5 moulds
Block is used for obtaining and running light weight page data, by calling face SDK storage services and the service of face live body to carry out face knowledge
Other webpage representation and recognition of face.
The interaction flow of the client of the operation system and each SFU software functional unit of service end is as shown in Figure 3.
After business module receives the operation that user will be logged in, sending vivo identification initialization to business service end please
Ask.Vivo identification initialization requests carry ID (mark), the operating system of mobile device and version number, wherein ID
For user identity information of the user in the operation system.Vivo identification initialization requests are transmitted to face by business service end
Service end.
Face service end extracts ID, the operating system of mobile device and version number from vivo identification initialization requests,
The safe class residing for the ID is searched from operation system, determines the live body action letter that the user completes in this login
Breath, generate the business serial number (i.e. service identification) of this registering service, generation business serial number, ID, live body action letter
Breath and the operating system of mobile device and the corresponding relation of version number, locally temporary.Face service end is according to ID, shifting
The operating system of dynamic equipment and version number determine the resource bag to be used mark, and resource bag mark, business serial number are encapsulated in
In vivo identification initialization response and after being signed, business service end is returned to.Business service end initializes vivo identification
Response is transmitted to the business module of client.
The business module of client calls face framework SDK with vivo identification initialization response.Face framework SDK passes through solution
Label verify whether the vivo identification initialization response derives from legal service end, if not verified, to business module
Back-checking fails, and business module notifies user's face to log in the startup that fails.After by checking, face framework SDK with
Resource bag mark calls face SDK storage services, and face H5 modules are called with business serial number.
Face SDK storage services search whether to have downloaded the resource bag with the mark in the resource bag locally preserved,
If downloaded, the result loaded is returned to face framework SDK.If do not downloaded, to face service end with the resource
Bag mark initiates download request, and face service end will be transmitted to face SDK storage services under the resource bag with the mark.Face
SDK storage services preserve the resource bag, discharge and load the resource file in the resource bag, return to face framework SDK and add
The result of load.
Face H5 modules send the vivo identification page request for carrying business serial number to face service end.Face service
End generates light weight page data using H5, is moved according to live body corresponding to the business serial number lookup in vivo identification page request
Make information, the business number for performing face registering service logic (including live body action message) is generated using JS (JavaScript)
According to by the business datum of JS forms after obscuring, being returned in the lump in vivo identification page response with light weight page data
Face H5 modules.The size of JS data can be reduced by obscuring, and reduce the readability of JS data, on the basis of flow is reduced
Add the security of business datum.
H5 light weight page datas in face H5 modules operation vivo identification page response, call face in the process of running
SDK storage services, to obtain the resource file loaded via face SDK storage services.Face H5 modules utilize the money obtained
Source file shows face login page, and the live body action message in business datum to user, in face login page
The action completed is needed when display logs in.Face H5 modules call face live body service.
The service of face live body obtains the image or video of user from the camera of mobile device, judges the face of user with prestoring
Sample whether match, and user completes the action of which type of live body, and is returned to whether face matches with user action
Face H5 modules.
If face live body service returns the conclusion of face matching, and the user action returned meets in business datum
Live body action message, then face H5 modules return to face verification to face framework SDK and pass through, face framework SDK is to business mould
Block returns to face verification and passed through, and business module sends face verification to business service end and passed through, and user logins successfully;Otherwise face
H5 modules return to face verification not by the way that face framework SDK returns to face verification to business module and do not led to face framework SDK
Cross, business module informs user because not verifying login failure by face.
Corresponding with the realization of above-mentioned flow, embodiments herein additionally provides a kind of vivo identification page applied in client
The realization device in face, and a kind of realization device applied in the vivo identification page of service end.Both devices can pass through
Software is realized, can also be realized by way of hardware or software and hardware combining.Exemplified by implemented in software, as on logical meaning
Device, being will be right by the CPU (Central Process Unit, central processing unit) of equipment where client or service end
The computer program instructions answered read what operation in internal memory was formed.For hardware view, except the CPU shown in Fig. 4, internal memory
And outside nonvolatile memory, the equipment where client generally also includes being used to carry out chip of wireless signal transmitting-receiving etc.
Other hardware, the equipment where service end generally also include being used to realize other hardware such as board of network communicating function.
Fig. 5 show a kind of realization device of vivo identification page of the embodiment of the present application offer, applies in client, bag
Include initialization response receiving unit, resource bag download unit, page response receiving unit and show and recognition unit, wherein:Just
Beginningization responds receiving unit, and for sending vivo identification initialization requests to service end, receive service end return carries money
The vivo identification initialization response of source bag mark;Resource bag download unit, for locally ought not preserve the money with the mark
When source is wrapped, download the resource bag with the mark from service end and be stored in local;Page response receiving unit, for clothes
Business end sends vivo identification page request, receives the vivo identification page for carrying light weight page data that service end returns and rings
Should;Show and recognition unit, for running light weight page data, call in the process of running in the resource bag with the mark
Resource file carry out vivo identification webpage representation, and carry out vivo identification.
Optionally, also carried in the vivo identification initialization response and force more new command;Described device also includes:By force
System renewal execution unit, for ought locally preserve the resource bag with the mark and the mark with forcing renewal to refer to
When order issues in the lump, download the resource bag with the mark from service end and update local storage.
Optionally, the resource file in the resource bag includes:Page resource file and/or vivo identification resource file;
The page resource file is used for being called during light weight page data is run, to carry out vivo identification webpage representation;
The vivo identification resource file is used for being called during light weight page data is run, to carry out vivo identification.
In one example, described device also includes resource file loading unit, for being stored in by the resource bag of download
Behind local, the resource file in the resource bag is loaded;It is described to show and recognition unit is specifically used for:Run light weight page number
According to calling the resource file that has loaded to carry out vivo identification webpage representation in the process of running, and carry out vivo identification.
In above-mentioned example, described device can also include default resource bag unit, for when the download resource bag failure
Or when loading the resource file failure in the resource bag, load the resource file in the default resource bag locally preserved.
In a kind of implementation, the business number including live body action message is also carried in the vivo identification page response
According to;It is described to show and recognition unit is specifically used for:Light weight page data is run, is called in the process of running with the mark
Resource file in resource bag carries out vivo identification webpage representation, including shows that the live body action message is specified dynamic to user
Make;And required movement whether is completed to user and carries out vivo identification.
In above-mentioned implementation, it can include in the vivo identification initialization requests:User identity information;The live body
Also include in identification initialization response:The service identification corresponding to user's live body action message generated by service end;Institute
State also includes in vivo identification page request:Service identification in the vivo identification initialization response, for service end determination pair
The live body action message answered.
In above-mentioned implementation, the light weight page data includes the 5th edition H5 light weight page data of HTML;
The business datum carried in vivo identification page response includes:By the JavaScript data obscured.
Fig. 6 show a kind of realization device of vivo identification page of the embodiment of the present application offer, applies in service end, bag
Initialization response transmitting element and page response transmitting element are included, wherein:Initialization response transmitting element is used to receive client
After the vivo identification initialization requests at end, the vivo identification initialization sound for carrying resource bag mark is returned to the client
Should;Page response transmitting element is used for after the vivo identification page request of client is received, and returns and carries to the client
There is the vivo identification page response of light weight page data;The light weight page data has institute when client is run by calling
The resource file stated in the resource bag of mark carries out vivo identification webpage representation, and carries out vivo identification.
Optionally, described device also includes forcing renewal issuance unit, for being surrounded by change when the resource with the mark
During change, issued in vivo identification initialization response to client and force more new command.
Optionally, the resource file in the resource bag includes:Page resource file and vivo identification resource file;It is described
Page resource file calls for client during light weight page data is run, to carry out vivo identification webpage representation;Institute
State vivo identification resource file to call during light weight page data is run for client, to carry out vivo identification.
In a kind of implementation, described device also includes business datum generation unit, includes live body action letter for generating
The business datum of breath, the live body action message are used to specify the action to be completed in vivo identification of user;The live body is known
The business datum is also carried in other page response.
In above-mentioned implementation, it can include in the vivo identification initialization requests:User identity information;Described device
Also include:Service identification unit, for determining the live body action message of the user according to user identity information, generate the work
Body identifies the service identification of initialization requests, preserves the corresponding relation of the service identification and live body action message;The live body
Also include in identification initialization response:The service identification;Also include in the vivo identification page request:Service identification;Institute
Business datum generation unit is stated to be specifically used for:Acted and believed using live body corresponding with the service identification in vivo identification page request
Breath, generate business datum.
In above-mentioned implementation, the light weight page data includes the 5th edition H5 light weight page data of HTML;
The business datum carried in vivo identification page response includes:By the JavaScript data obscured.
The preferred embodiment of the application is the foregoing is only, not limiting the application, all essences in the application
God any modification, equivalent substitution and improvements done etc., should be included within the scope of the application protection with principle.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping
Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Other identical element also be present in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code
The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.