CN110061952A - Information processing method, device, storage medium and electronic device - Google Patents
Information processing method, device, storage medium and electronic device Download PDFInfo
- Publication number
- CN110061952A CN110061952A CN201810058280.XA CN201810058280A CN110061952A CN 110061952 A CN110061952 A CN 110061952A CN 201810058280 A CN201810058280 A CN 201810058280A CN 110061952 A CN110061952 A CN 110061952A
- Authority
- CN
- China
- Prior art keywords
- critical field
- interface
- target
- information
- client
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/108—Network architectures or network communication protocols for network security for controlling access to devices or network resources when the policy decisions are valid for a limited amount of time
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2463/00—Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
- H04L2463/121—Timestamp
Abstract
The embodiment of the invention discloses a kind of information processing method, device, storage medium and electronic devices.Wherein, this method comprises: in the effective situation of the first critical field of client being locally stored, first interface is called by the second critical field, wherein, the first critical field is used to refresh the validity period of the second critical field and the validity period of the first critical field is greater than the validity period of the second critical field;Target information is transferred by first interface;In the case where being deployed into target information by first interface, target information is stored into the local of client.The present invention solves the low technical problem of information processing efficiency in the related technology.
Description
Technical field
The present invention relates to computer fields, in particular to a kind of information processing method, device, storage medium and electricity
Sub-device.
Background technique
Currently, the logging state of the page is judged after entering the page, if into being logged in after the page after a period of time
It will fail, refresh page is needed to log in again;In addition, even having focused on the user authorized, needing to use user
When the information such as pet name head portrait, it will usually be authorized using Snsapi_userinfo mode, jump to the page with authorized content
Face needs user to confirm authorization, jumps back to and again after waiting 1 second, for a user, belongs to redundancy process;Log in validity period
It only 2 hours, just needs to jump to authorization page later again and authorize and convert again logging in state, frequently authorization influences user
Experience, has that information processing efficiency is low.
For the low problem of above-mentioned information processing efficiency, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of information processing method, device, storage medium and electronic devices, at least to solve
The low technical problem of information processing efficiency in the related technology.
According to an aspect of an embodiment of the present invention, a kind of information processing method is provided.This method comprises: in client
The effective situation of the first critical field being locally stored under, pass through the second critical field call first interface, wherein first close
Key field is used to refresh the validity period of the second critical field and the validity period of the first critical field is greater than having for the second critical field
The effect phase;In the case where being deployed into target information by first interface, target information is stored into the local of the client.
One side according to an embodiment of the present invention additionally provides a kind of information processing unit.The device includes: to call list
Member, for calling first by the second critical field in the effective situation of the first critical field of client being locally stored
Interface, wherein the first critical field is used to refresh the validity period of the second critical field and the validity period of the first critical field is greater than
The validity period of second critical field;Unit is transferred, for transferring target information by first interface;Storage unit, for logical
It crosses in the case that first interface is deployed into target information, target information is stored into the local of the client.
One side according to an embodiment of the present invention additionally provides a kind of storage medium, is stored with computer in storage medium
Program, wherein the computer program is arranged to execute above-mentioned information processing method when operation.
One side according to an embodiment of the present invention additionally provides a kind of electronic device, including memory and processor, storage
Computer program is stored in device, processor is arranged to execute above-mentioned information processing method by the computer program.
In embodiments of the present invention, in the effective situation of the first critical field of client being locally stored, pass through
Two critical fielies call first interface, wherein the first critical field is used to refresh the validity period of the second critical field and first closes
The validity period of key field is greater than the validity period of the second critical field;Target information is transferred by first interface;It is connect by first
In the case that mouth is deployed into target information, target information is stored into the local of client.It is effective by what is be locally stored
First critical field refreshes the validity period of the second critical field, calls first interface by the second critical field, and then pass through again
First interface is deployed into target information, so that authorization extension of validity, greatly improves the validity period of authorization, thus real
The technical effect for improving information processing efficiency is showed, and then has solved the low technology of information processing efficiency in the related technology and ask
Topic.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram of the hardware environment of information processing method according to an embodiment of the present invention;
Fig. 2 is a kind of flow chart of information processing method according to an embodiment of the present invention;
Fig. 3 is a kind of flow chart of information processing method according to an embodiment of the present invention;
Fig. 4 is a kind of flow chart of information processing method according to an embodiment of the present invention;
Fig. 5 is a kind of flow chart of information processing method according to an embodiment of the present invention;
Fig. 6 is a kind of flow chart of information processing method according to an embodiment of the present invention;
Fig. 7 is a kind of schematic diagram of information processing unit according to an embodiment of the present invention;And
Fig. 8 is a kind of structural block diagram of electronic device according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
According to an aspect of an embodiment of the present invention, a kind of embodiment of information processing method is provided.
Optionally, in the present embodiment, above- mentioned information processing method can be applied to as shown in Figure 1 by server 102
In the hardware environment constituted with terminal 104.Fig. 1 is a kind of hardware environment of information processing method according to an embodiment of the present invention
Schematic diagram.As shown in Figure 1, server 102 is attached by network with terminal 104, above-mentioned network includes but is not limited to: wide
Domain net, Metropolitan Area Network (MAN) or local area network, terminal 104 are not limited to PC, mobile phone, tablet computer etc..At the information of the embodiment of the present invention
Reason method can be executed by server 102, can also be executed, be can also be by server 102 and terminal by terminal 104
104 common execution.Wherein, the information processing method that terminal 104 executes the embodiment of the present invention is also possible to by mounted thereto
Client executes.
Fig. 2 is a kind of flow chart of information processing method according to an embodiment of the present invention.As shown in Fig. 2, this method can be with
The following steps are included:
Step S202 passes through the second keyword in the effective situation of the first critical field of client being locally stored
Segment call first interface, wherein the first critical field is used to refresh the validity period of the second critical field and first critical field
Validity period is greater than the validity period of the second critical field.
In the technical solution that the application above-mentioned steps S202 is provided, the local (LocalStorage) of client is client
One of end local buffer technology, can chronically be stored in client for information, ask without additionally carrying out network again
It asks.The first critical field has been locally stored in the client of the embodiment, if the first key has been locally stored in client
Field, and first critical field is effective, then calls first interface by the second critical field, which can use
In the validity period for refreshing the second critical field.
Optionally, which can determine whether the first critical field is effective from time dimension, in the first keyword
It in the case that section is not out of date, determines that the first critical field is effective, first interface is called by the second critical field;It can also be
In the case that one critical field meets and makes the effective rule of the first critical field, passes through the second critical field and call first interface.
Optionally, when judging whether the first critical field is effective, if login failure, user information has not been obtained, it is determined that first
Critical field failure, does not do any restrictions to the whether effective determination method of the first critical field herein.
Optionally, the first critical field can be Refresh_token, and the second critical field can be Access_
Token, first interface can be the interface of instant messaging application.Wherein, the first critical field Refresh_token awards for the page
One of power critical field, being used for can be after the second key critical field Access_token failure, to the second key
Critical field Access_token is refreshed, to obtain the crucial critical field Access_token of new effective second.
Optionally, public platform can be one of instant messaging application public account number system, and the rear end of public platform can be with
First interface is called by above-mentioned second critical field Access_token.
Optionally, refresh the second critical field Access_token with the first critical field Refresh_token, adjust backstage
CGI interface is logged in, and then passes through CGI tune first interface.
The validity period of first critical field of the embodiment is greater than the validity period of the second critical field, for example, first is crucial
The validity period of field Refresh_token is 30 days, and the validity period of the second crucial critical field Access_token is 2 small
When, it is brushed by validity period of the first critical field Refresh_token to the second crucial critical field Access_token
Newly, first interface is then called by the second critical field Access_token, can greatly reduces what authorization jumped in this way
Frequency avoids and logs in validity period and only have 2 hours, just needs to jump to authorization page later again and authorized, and converted again
State is logged in, frequently the problem of authorization influence user experience.
Step S204 transfers target information by first interface.
The application above-mentioned steps S204 provide technical solution in, by the second critical field call first interface it
Afterwards, target information is transferred by first interface, for example, the rear end of public platform is called by the second critical field Access_token
First interface gets target information.The target information can be user information, for example, being the identification information of user, user
The pet name (Nickname), the information such as head portrait, no limitations are hereby intended.
The extent of competence mark (Scope) that the target information that the embodiment is got is authorized influences.Optionally, if power
Limit scope identifier is Snsapi_base authorization, then public platform rear end can only take the identification information Openid of user, and authorization page is not
It shows content, and soon jumps back to the former page, wherein Openid is the unique mark of the ordinary user of public platform, only
It is effective for current public platform;If extent of competence mark is Snsapi_userinfo authorization, public platform rear end can be obtained
The information such as the pet name, the head portrait of user are got, authorization page shows tick boxes, needs user to confirm authorization, can just authorize and jump back to
The former page.
Step S206 stores target information to client in the case where being deployed into target information by first interface
Local in.
In the technical solution that the application above-mentioned steps S206 is provided, after transferring target information by first interface,
In the case where being deployed into target information by first interface, target information is stored into the local of client.
In this embodiment, after transferring target information by first interface, if being deployed into mesh by first interface
Information is marked, then is stored target information into the local of client, for example, user information is stored in LocalStorage.
Optionally, which can also be stored in the basic log-on message in user information Cookie, and two hours are arranged
Validity period, for example, storing user identifier Openid information into Cookie.
Optionally, in the case where not being deployed into target information by first interface, authorization page is jumped to from target pages
Face, wherein the permission that authorization page is used to authorize access target information passes through after the permission for authorizing access target information
First interface is deployed into target information.
Optionally, the page authorization of the embodiment can authorize for instant messaging using the permission between the public platform page
Behavior needs to jump to the specified authorization page of instant messaging application and is authorized.After completing authorization, meeting band in link
Upper authorization identifies and jumps back to the former page.The authorization applied by instant messaging, the available visitor's of the public platform page
Some essential informations, for example, obtaining the essential informations such as head portrait, the pet name of user.
Optionally, which may be implemented to log in state conversion, and the rear end of public platform needs not filling out any information in user
In the case where, distinguish the user that product is each used.The authorization applied by instant messaging, the backstage of instant messaging application
The ability that public platform backstage obtains user information can be given.Public platform backstage in this way is after obtaining user information, by user
Information returns to front end page, identifies user identity with this.
Optionally, the embodiment is by being stored in local for the first critical field Refresh_token in page authorization
It caches in LocalStorage, and time when record storage, when converting login state next time, if the first critical field
Refresh_token remains unchanged effectively also, is less than 30 days with the difference of time of record, then directly with the first critical field
Refresh_token conversion logs in state, to achieve the effect that reduce authorization hop frequencies.
S202 to step S206 through the above steps, in the effective situation of the first critical field of client being locally stored
Under, first interface is called by the second critical field, wherein the first critical field is for refreshing the effective of the second critical field
Phase and the validity period of the first critical field are greater than the validity period of the second critical field;Target information is transferred by first interface;?
In the case where being deployed into target information by first interface, target information is stored into the local of client.It is deposited by local
Effective first critical field of storage refreshes the validity period of the second critical field, calls first interface by the second critical field,
And then target information is deployed by first interface again, to make to authorize extension of validity, greatly improve the effective of authorization
Phase, to realize the technical effect for improving information processing efficiency, and then the information processing efficiency solved in the related technology is low
The technical issues of.
As an alternative embodiment, in step S206, it, should when target information is stored into the local of client
Method further include: in the case where the variation of the first critical field, the first critical field after variation is stored to the sheet of client
Timestamp of first critical field when storing to the local of client in ground and after record variation, wherein timestamp is used for
Whether the first critical field after determining variation is effective.
In this embodiment, if the first current critical field is occurring compared with the first critical field before
In the case where variation, the first critical field after variation is stored into the local of client, for example, transformed first is closed
Key field Refresh_token, is stored in LocalStorage.Optionally, if before without the first critical field,
First critical field is stored into the local of client.
The embodiment also records timestamp of first critical field when storing to the local of client, which is used for
Whether the first critical field after determining variation is effective, that is, judging that the first critical field is not above validity period, can just complete
Log in the conversion of state, it is believed that login is effective, and then executes and log in readjustment.
As an alternative embodiment, in step S204, before transferring target information by first interface, this method
Further include: pass through the first critical field log in second interface, wherein first interface by second interface by the second critical field into
Row calls.
In this embodiment, second interface can be CGI interface, be supplied to front end for rear end and carry out front and back end data transmitting
Interface, can by the first critical field log in second interface, for example, pass through the first critical field Refresh_token tune
Backstage logs in CGI.First interface is called by second interface by the second critical field, for example, first interface is Instant Messenger
The interface of application is interrogated, the first critical field Refresh_token refreshes the validity period of the second critical field Access_token, by
CGI calls first interface by the second critical field Access_token, and then transfers target information by first interface.
As an alternative embodiment, in step S202, it, should before calling first interface by the second critical field
Method further include: obtain the target value logged in link, wherein log in link for entering target pages;Step S202, in visitor
In the effective situation of the first critical field being locally stored at family end, by the second critical field call first interface include:
In the case that the target value logged in link is invalid, if the first critical field of client being locally stored is effective, lead to
It crosses the second critical field and calls first interface.
In this embodiment, before calling first interface by the second critical field, the target logged in link is obtained
Value, the target value can be the Code value during Login chain connect, and login link is for entering target pages.Connection is logged in obtaining
In target value after, judge log in connection in target value it is whether invalid, if it is judged that log in link in target value without
Effect, and the first critical field is effective, then calls first interface by the second critical field, for example, in detection LocalStorage
Refresh_token, if there is and it is not out of date, then log in CGI with Refresh_token tune backstage, connect by CGI tune first
Mouth is to obtain user information.
As an alternative embodiment, after obtaining the target value logged in link, this method further include: in mesh
Scale value determines that the target value logged in link is effective in the Unrecorded situation in the local of client;In target value in client
Local recorded in the case where, determine log in link in target value it is invalid.
In this embodiment, after obtaining the target value logged in link, judge that target value is in the local of client
No record can determine that the target value logged in link is effective if target value does not record in the local of client, for example,
If the Code value logged in link does not keep a record locally, it is determined that the Code value logged in link is effective.Optionally, if
Code value does not keep a record locally, the time identifier timeguid for logging in the time identifier timeguid in link and being locally stored
Unanimously, it is determined that Code value is effective.After judging whether target value records in the local of client, if it is determined that target
Value has been recorded in the local of client, then can determine that the target value logged in link is invalid.
As an alternative embodiment, after determining that the target value logged in link is effective, this method further include:
Second interface is logged in by target value, wherein first interface is called by second interface by the second critical field;Pass through
One interface transfers target information;In the case where being deployed into target information by first interface, target information is stored to client
In the local at end.
In this embodiment, after determining that the target value logged in link is effective, second can be logged in by target value
Interface, the first interface are called by second interface by the second critical field, for example, first interface is instant messaging application
Interface, second interface is CGI interface, and by logging in the Code value tune backstage CGI interface in link, CGI interface can pass through
Second critical field Access_token calls the interface of instant messaging application, so that target information is transferred by first interface,
In the case where not being deployed into target information by first interface, target value failure or Insufficient privilege can be determined, from page object
Face jumps to authorization page, can jump wechat authorization by Snsapi_base mode or Snsapi_userinfo mode
Page obtains new target value, completes authorization, recalls to the former page automatically.Preferably, wechat is jumped by Snsapi_base mode
Page is authorized, if when first interface transfers target information, Insufficient privilege cannot then be jumped in a manner of Snsapi_base and be awarded
Weigh the page.
In the case where being deployed into target information by first interface, target information is stored into the local of client.
Optionally, target information is user information, and after getting user information, the basic log-on message of user is stored in
In Cookie, for example, the value of Openid etc is stored in Cookie, and be set 2 hour validity period;By the pet name of user,
The information such as head portrait are stored in the local LocalStorage of client.It is completed at this time and logs in state conversion, it is believed that log in effective.
As an alternative embodiment, before obtaining the target value logged in link, this method further include: obtain
Log in the log-on message of target pages;Obtaining the target value logged in link includes: to obtain in the case where log-on message is invalid
Log in the target value in link.
In this embodiment, before obtaining the target value logged in link, the available login for logging in target pages
Information.The log-on message may include the information such as the head portrait of user, the pet name.Whether effective log-on message is detected, if detected
The Cookie of log-on message is still effective, and can detect the information such as the head portrait of user, the pet name, then it is assumed that log-on message is that have
Effect, that is, logging in effective.Optionally, if detecting that log-on message Cookie is effective, and authorization is Snsapi_
Base, then it is assumed that log in effective.And in addition to the above, it can determine that log-on message is invalid.It is invalid in log-on message
In the case where, the target value logged in link is obtained, and then in the case where the target value logged in link is invalid, if
The first critical field of client being locally stored is effective, calls first interface by the second critical field, passes through first interface
Transfer target information;In the case where not being deployed into target information by first interface, authorization page is jumped to from target pages,
And then improve information processing efficiency.
Optionally, in this embodiment, when entering page judgement login state, if be not logged in, and target value Code
In vain, the first critical field Refresh_token is invalid, then jumps to authorization page in a manner of Snsapi_base, authorized
At the former page of rear rebound, the step in above-described embodiment can be further executed.
As an alternative embodiment, in step S204, after transferring target information by first interface, this method
Further include: in the case where not being deployed into target information by first interface, authorization page is jumped to from target pages, wherein
The permission that authorization page is used to authorize access target information passes through first interface after the permission for authorizing access target information
It is deployed into target information.
After transferring target information by first interface, whether judgement is deployed into target information by first interface, such as
Fruit is not deployed into target information by first interface, is jumping to authorization page from target pages, which can be one
Start the former page of display, authorization page is used to authorize the permission of access target information, can pass through corresponding wechat authorization
Extent of competence mark Scope jumps the authorization page of instant messaging application, for example, by Snsapi_base mode, or pass through
Snsapi_userinfo mode jumps to the authorization page of instant messaging application.
After jumping to authorization page from target pages, obtains new Code value and recall to mesh automatically to complete to authorize
Mark the page.
As an alternative embodiment, in the case where not being deployed into target information by first interface, from page object
It includes: to determine the first critical field in the case where not being deployed into target information by first interface that face, which jumps to authorization page,
The limited authority system of failure or the first critical field;Authorization page is jumped to from target pages.
In this embodiment, in the case where not being deployed into target information by first interface, for example, crucial by first
Field Refresh_token refreshes the second critical field Access_token and calls first interface, is not transferred by first interface
In the case where target information, it is determined that the first critical field fails or the limited authority system of the first critical field,
That is, being restricted by the claim that the first critical field gets target information, then authorization page is jumped to from target pages, it can
Authorization page is jumped to from target pages in a manner of through Snsapi_base or Snsapi_userinfo.Preferably, pass through
Snsapi_base mode jumps to authorization page from target pages, if permission is not when first interface transfers target information
It is enough, then authorization page cannot be jumped in a manner of Snsapi_base.
As an alternative embodiment, jumping to authorization page from target pages includes: by target capability identification
Authorization page is jumped to from target pages, wherein target capability identification is used to indicate authorization page and does not show content, visits authorizing
After the permission for asking target information, target pages are jumped directly to.
In this embodiment, target capability identification can identify for Snsapi_base extent of competence.It is jumped from target pages
When going to authorization page, authorization page can be jumped to from target pages by target capability identification, which uses
Content is not shown in the authorization by direction page, after the permission for authorizing access target information, jumps directly to target pages, than
Such as, the rear end of public platform can only take the Openid information of user, and authorization page does not show content, and can soon jump back to original
The page, so that authorization be made to jump unaware.
In addition, Snsapi_userinfo extent of competence identifies, the pet name, the head portrait of user can be taken for public platform rear end
Etc. information, authorization page show tick boxes, but need user confirm authorization, can just authorize and jump back to the former page.In the embodiment
In, preferentially authorized in a manner of Snsapi_base, which is silent authorization, user's perception less than.
In comparison, Snsapi_userinfo mode has apparent authorization interface and waits time-consuming, can expend in experience more
Time wastes more data downloadings, and generates extra process.And Snsapi_base mode is then without disadvantage mentioned above, thus
Keep user experience more smooth.
As an alternative embodiment, having in step S202 in the first critical field of client being locally stored
In the case where effect, calling first interface by the second critical field includes: to deposit when entering target pages in the local of client
In the effective situation of the first critical field of storage, first interface is called by the second critical field.
In this embodiment it is possible to detect when entering the page and convert login state.When entering target pages, if
First critical field is effective, for example, the first critical field is not out of date, calls first interface by the second critical field.
Optionally, after entering the page, if detecting that log-on message Cookie is still effective, and use can be detected
The information such as head portrait, the pet name at family, then it is assumed that log in effective.Optionally, it if detection log-on message Cookie is effective, and authorizes
Mode is Snsapi_base, then it is assumed that is logged in effectively, other situations all think to be not logged in.If there is the mesh after authorization in link
Scale value Code value, and target value Code value locally do not keep a record, the time identifier timeguid in link be locally stored
Time identifier timeguid it is consistent, then it is assumed that Code value is effective, and with this Code tune backstage CGI interface, CGI interface calls first
Interface is to obtain user information.
If user information has not been obtained, illustrate the failure of target value Code value or Insufficient privilege, so at this time with corresponding
Snsapi_base or Snsapi_userinfo jumps authorization page, obtains new target value Code, is getting new target value
After Code, authorization is completed, it is automatic to jump back to the former page, it is whether still effective that log-on message Cookie is detected again;If got
Basic log-on message is then stored in Cookie by user information, and 2 hour validity period is arranged, and the information such as head portrait, the pet name are deposited
It is stored in LocalStorage.It is completed at this time and logs in state conversion, it is believed that log in effective.
Optionally, if target value Code is invalid, the first keyword in the local LocalStorage of client is detected
Section Refresh_token, if there is and effectively, for example, the first critical field is not out of date, with the first critical field Refresh_
Token calls CGI, by CGI tune first interface, obtains user information.
If user information has not been obtained, the first critical field Refresh_token failure or Insufficient privilege, this
When with corresponding Snsapi_base mode or Snsapi_userinfo mode jump authorization page, obtain new Code.It is obtaining
It is automatic to jump back to the former page after getting new Code, it is whether still effective that log-on message Cookie is detected again;If getting use
Basic log-on message is then stored in Cookie by family information, and 2 hour validity period is arranged, and the information such as head portrait, the pet name are stored
In LocalStorage, if become before without the first critical field Refresh_token or Refresh_token
Change, then Refresh_token is stored in LocalStorage, and record timestamp at that time, for judging its validity period.This
When be completed and log in state conversion, determine log in it is effective.
Optionally, if detecting the first critical field Refresh_token in the local LocalStorage of client
It is out of date, then authorization page is jumped with corresponding Snsapi_base mode or Snsapi_userinfo mode, obtained new
Code.It is automatic to jump back to the former page after getting new Code, it is whether still effective that log-on message Cookie is detected again.
Optionally, when entering page judgement login state, if be not logged in, and target value Code is invalid, first is crucial
Field Refresh_token is invalid, then wechat authorization is jumped in a manner of Snsapi_base, and former page is jumped back to after the completion of authorization
Log-on message Cookie is detected in face whether still effective again.
As an alternative embodiment, having in step S202 in the first critical field of client being locally stored
In the case where effect, calling first interface by the second critical field includes: transmission operation requests, wherein operation requests are for asking
The performance objective on target pages is asked to operate;In the case where requesting performance objective operation failure, if the local of client is deposited
First critical field of storage is effective, calls first interface by the second critical field.
The embodiment can also in Page user operating process more new login state.The is being called by the second critical field
When one interface, operation requests can be sent, which can request for Ajax, and Ajax request is a kind of request data
Mode does not need to refresh full page.
Optionally, when preparing to initiate operation requests, the login state of front end is detected.If detecting that login state is effective, than
Such as, page authorization is to have the basic log-on message of user in Snsapi_base and Cookie or authorization is
There is the basic log-on message of user in Snsapi_userinfo and Cookie, and has the pet name in LocalStorage
(Nickname) information such as, it is determined that it is effective to log in state, sends operation requests, and request performance objective on target pages operates,
It can request back-end processing data logic.If the normal returned data in rear end, executes readjustment, if conventional report an error, with login
It is unrelated, then the conventional processing that reports an error is carried out, otherwise it is assumed that failure is logged in, that is, request performance objective operation failure.
In the case where requesting performance objective operation failure, be locally stored in LocalStorage of client is detected
The validity of one critical field Refresh_token calls first by the second critical field if the first critical field is effective
Interface refreshes the with the first critical field Refresh_token for example, when the first critical field Refresh_token is effective
Two critical field Access_token adjust backstage to log in CGI, the second critical field Access_token tune first of backstage CGI
Interface attempts more new login state again to obtain user information.
If logined successfully again, after getting user information, by basic log-on message such as Openid etc
Value is stored in Cookie, and 2 hour validity period is arranged;The information such as the head portrait pet name are stored in LocalStorage;If
Changed before without Refresh_token or Refresh_token, is then stored in Refresh_token
In LocalStorage, and timestamp at that time is recorded, for judging its validity period.It is completed at this time and logs in state conversion, it is believed that step on
Whether still effective record effectively, detects log-on message Cookie again;If login failure again, obtains and believe less than user
Breath, determines that the first critical field Refresh_token has failed.
As an alternative embodiment, after sending operation requests, this method further include: in request performance objective
In the case where operation failure, if the first critical field of client being locally stored is invalid, display reminding information, wherein mention
Show information for prompt need to log in target pages again.
In this embodiment, in the case where sending operation requests performance objective operation failure, if the local of client
First critical field of storage is invalid, for example, the first critical field of detection client being locally stored in LocalStorage
Whether Refresh_token is effective, if the first critical field of client being locally stored in LocalStorage
Refresh_token is invalid, display reminding information.It, cannot direct refresh page due to being to log in failure in user's operation process
Face influences user experience, and where allowing user clearly to know problem, and oneself operation interface, so prompt information can at this time
It is shown in the form that body pop-up prompts, prompts user's refresh page, and walk to authorize the process of login again, to avoid certainly
It moves in the case where jumping authorization again, conversion logs in state again automatically, interrupts user's operation.
It should be noted that above-mentioned prompt information shows the preferred implementation side of the only embodiment of the present invention in the form of a popup window
Formula, the prompt information for not representing the embodiment of the present invention is only shown in the form of pop-up, can also be shown in other forms, than
Such as, the forms such as icon, voice are shown, are no longer illustrated one by one herein.
This embodiment achieves the updates that in user operation process, can also carry out logging in state, to avoid interrupting use
The process of family operation, promotes user experience.
The embodiment is not only being entered using the critical field Refresh_token in local cache LocalStorage
When the page, login state is can detecte and converted, can also carry out logging in state update in user operation process, avoid interrupting user behaviour
The process of work;The preferential mode that Snsapi_userinfo is replaced using Snsapi_base, so that licensing process is noninductive to user
Know, reduces user to the direct feel of redundancy process;Refreshed using the Refresh_token that validity period is 30 days and log in state, made
Maximum extension of validity is authorized, the frequency for jumping authorization is significantly reduced, promotes user experience.Meanwhile state is logged in conversion
In the process, without jumping authorization page, so that page operation process is more smooth, the efficiency of information processing is improved.
It should be noted that in this embodiment, elemental user log-on message is stored using Cookie, with the sheet of client
Ground stores the information such as LocalStorage storage user's head portrait, the pet name, stores the first critical field with LocalStorage
Refresh_token, merely for the sake of performance and compatibility aspect the considerations of.In fact, client storage is relevant to login
Information can also be the technologies such as Indexdb, Userdata including but not limited to Cookie, LocalStorage.Wherein,
Indexdb is the storage of a large amount of structural datas for client, and Userdata can be used for user data, system log etc.
Storage.
Number of the expansible hypertext transfer request XMLHttpRequest as front-end and back-end can be used in the embodiment
According to switching technology.But front and back end Data Interchange Technology can also be Jsonp including but not limited to XMLHttpRequest,
The technologies such as Websocket, Serversend Event.Wherein, one kind that Jsonp (JSON with Padding) is JSON makes
With mode, full-duplex communication agreement of the Websocket based on transmission control protocol, Serversend Event is used for server push
Send data.
Technical solution of the present invention is illustrated below with reference to preferred embodiment.Specifically to be applied to be based on Instant Messenger
The authorization login process for interrogating the public platform of application is illustrated.
Fig. 3 is a kind of flow chart of information processing method according to an embodiment of the present invention.As shown in figure 3, this method is also
The logic of state judgement and conversion is logged in, this method may comprise steps of:
Step S301, after entering the page, whether confirmation logs in effective.
After entering the page, if detecting that log-on message Cookie is still effective, and the head of user can be detected
The information such as picture, the pet name, then it is assumed that log in effective;If detecting that log-on message Cookie is effective, and authorization is
Snsapi_base, then it is assumed that log in effectively, other situations all think to be not logged in.
Step S302 judges whether the Code value logged in link is effective.
After whether confirmation login is effective, judge to log in whether the Code value in linking has in vain if it is confirmed that logging in
Effect.If logging in the Code value after having authorization in link, and Code value does not keep a record locally, the time mark in link is logged in
It is consistent with the time identifier timeguid being locally stored to know timeguid, it is determined that Code value is effective, executes step S303, no
Then, Code value is invalid, executes step S305.
Step S303 judges whether to get user information by Code value tune backstage CGI interface.
After judging whether the Code value in login link is effective, if it is judged that Code value is effective, pass through Code value
Backstage CGI interface is adjusted, judges whether to get user information.Optionally, pass through Code value tune backstage CGI interface, the CGI interface
It calls in the interface of instant messaging application, to obtain user information.If user information has not been obtained, S304 is thened follow the steps,
If available arrive user information, S308 is thened follow the steps.
The failure of step S304, Code value or Insufficient privilege, obtain new Code value, complete authorization, automatic to jump back to former page
Face.
By Code value tune backstage CGI interface, judge whether after getting user information, if obtained by Code value
It takes and user information has not been obtained, then illustrate the failure of Code value or Insufficient privilege, thus, it is identified at this time with corresponding extent of competence
Scope (Snsapi_base or Snsapi_userinfo) jumps authorization page, obtains new Code value.Getting new Code
After value, authorization is completed, it is automatic to jump back to the former page, it re-execute the steps S301.
Whether step S305, the Refresh_token detected in LocalStorage are not out of date.
After judging whether the Code value in login link is effective, if it is determined that the Code value logged in link is invalid,
The Refresh_token in LocalStorage is detected, if detect there is Refresh_token in LocalStorage, and
It is not out of date, S306 is thened follow the steps, otherwise, executes step S307.
Step S306 logs in CGI interface by Refresh_token tune backstage, judges whether to get user information.
After whether the Refresh_token in detection LocalStorage is not out of date, if in LocalStorage
There is Refresh_token, and not out of date, CGI interface, CGI interface tune instant messaging are logged in by Refresh_token tune backstage
The interface of application obtains user information.If getting user information, S308 is thened follow the steps;If user's letter has not been obtained
Breath, thens follow the steps S307.
Step S307, Refresh_token failure or Insufficient privilege, obtain new Code value, complete authorization, automatic to jump back to
The former page.
CGI interface is being logged in by Refresh_token tune backstage, is being judged whether after getting user information, if
User information has not been obtained by Refresh_token, then Refresh_token failure or Insufficient privilege, so at this time with pair
Extent of competence mark Scope (Snsapi_base or Snsapi_userinfo) answered jumps to authorization page, obtains new Code
Value.After getting new Code value, authorization is completed, it is automatic to jump back to the former page, it re-execute the steps S301.
Step S308 stores user information.
CGI interface is being logged in by Refresh_token tune backstage, is being judged whether after getting user information, if
User information is got, the basic log-on message in user information is stored in Cookie, for example, by user identity information
The value of Openid etc is stored in Cookie, and 2 hour validity period is arranged;The information such as Nickname are stored in
In LocalStorage;It, will if changed without Refresh_token or Refresh_token before
Refresh_token is stored in LocalStorage, and records timestamp at that time, for judging its validity period.It is complete at this time
It is converted at state is logged in, it is believed that log in effective.
In this embodiment, in the above-mentioned judgement login state into the page, if be not logged in, and Code value is invalid,
Refresh_token is invalid, can the jump page authorization in a manner of Snsapi_base, the former page, weight are jumped back to after the completion of authorization
It is new to execute step S301.
Fig. 4 is a kind of flow chart of information processing method according to an embodiment of the present invention.As shown in figure 4, this method includes
Following steps:
Step S401, into the page.
Step S402 judges whether to log in effective.
After entering the page, if detection logon information cookie is still effective, and the information such as nickname can be detected,
Then think to log in effectively;If it is effective to detect logon information cookie, and authorization is snsapi_base, then it is assumed that is logged in
Effectively.If it is judged that logging in effectively, step S411 is executed, if it is judged that logging in vain, executes step S403.
Step S403 judges log in link whether have effective Code value.
After judging whether to log in effectively, if it is judged that logging in vain, judge whether to have in login link effective
Code.If it is judged that logging in has effective Code value in link, step S404 is executed, if it is judged that logging in does not have in link
Effective Code value, executes step S405.Optionally, if there is the code after authorization in link, and code is not done locally
It records, the timeguid in link is consistent with the timeguid being locally stored, then it is assumed that code is effective.
Step S404, band Code value tune log in CGI.
After whether having effective Code value in judging login link, if it is judged that log in has effectively in link
Code value, band Code value tune logs in CGI, for example, with this Code value tune backstage cgi, cgi tune interface, to obtain user information.
Step S405 judges whether Refresh_token is effective.
After whether having effective Code value in judging login link, if it is judged that logging in link is without effectively
Code value, then judge whether Refresh_token effective, for example, detection localStorage in refresh_token be
It is no effective.If it is judged that Refresh_token is effective, step S406 is executed, if it is judged that Refresh_token is invalid,
Execute step S407.
Step S406, band Refresh_token tune log in CGI.
After judging whether Refresh_token is effective.If it is judged that Refresh_token is effective, band
Refresh_token tune logs in CGI.
Step S407 jumps authorization page by Snsapi_base.
After judging whether Refresh_token is effective, if it is judged that Refresh_token is invalid, pass through
Snsapi_base jumps authorization page, after jumping authorization page by Snsapi_base, executes step S401.
Step S408 judges whether to login successfully.
Band Code value tune log in CGI, or band Refresh_token tune log in CGI after, judge whether log at
Function.If it is judged that logining successfully, step S409 is executed, if it is judged that logging in failed, execution step S410.
Step S409 writes user information into Cookie or LocalStorage.
After judging whether to login successfully, Cookie is write, writes LocalStorage.By basic log-on message such as Openid
Etc value be stored in Cookie, and be arranged 2 hour validity period;The information such as Nickname are stored in LocalStorage
In;If changed without Refresh_token or Refresh_token before, Refresh_token is stored in
In localStorage, and timestamp at that time is recorded, for judging its validity period.Write user information to Cookie or
After in LocalStorage, step S411 is executed.
Step S410 identifies Scope by former extent of competence and jumps authorization page.
After judging whether to login successfully, if it is judged that being not logged in success, Scope is identified by former extent of competence and is jumped
Sublicense page executes step S401.
Step S411 is executed and is logged in readjustment.
After judging whether to log in effectively, if it is judged that logging in effectively, executes and log in readjustment.Alternatively, writing user
After information is into Cookie or LocalStorage, executes and log in readjustment.
In this embodiment, when logging in state into page judgement, if it is not landed, and Code is invalid, Refresh_
Token is invalid, then jumps authorization in a manner of Snsapi_base, the former page is jumped back to after the completion of authorization, is re-execute the steps
S401。
Fig. 5 is a kind of flow chart of information processing method according to an embodiment of the present invention.As shown in figure 5, the information processing
Method can be the logic of more new login state in Page user operating process, as shown in figure 5, method includes the following steps:
Step S501, when preparing to initiate request, whether detection front end logs in state effective.
In this embodiment, effective if logging in state, for example, page authorization is Snsapi_base, and Cookie
In there is the basic log-on message of user or the authorization to be to there is user to log in letter substantially in Snsapi_userinfo and Cookie
It ceases, has the information such as Nickname in LocalStorage, it is determined that front end login state is effective, executes step S502, otherwise, executes
Step S504.
Step S502 initiates Ajax request, back-end processing data logic.
After whether login state in end is effective before detection, if detecting that front end login state is effective, Ajax request is initiated, after
End processing mathematical logic.If normal returned data, executes readjustment;It is no to then follow the steps S503.
Step S503 judges whether the conventional processing that reports an error.
If conventional report an error, unrelated with login, then the conventional processing that reports an error is carried out;Otherwise it is assumed that logging in failure, step is executed
S504。
Step S504 logs in failure, whether effective detects Refresh_token in LocalStorage.
If detecting that Refresh_token is invalid in LocalStorage, S505 is thened follow the steps, it is no to then follow the steps
S506。
Step S505, display reminding information.
Due to being to log in failure in user's operation process, cannot direct refresh page, influence user experience, and to allow use
Where problem is clearly known at family, and oneself operation interface, thus pop-up at this time prompts user's refresh page, executes authorization again and steps on
The process of record.
Step S506 logs in CGI interface with Refresh_token tune backstage.
When Refresh_token is effective, CGI interface is logged in Refresh_token tune backstage, backstage CGI interface is used
Refresh_token tune wechat interface takes user information, attempts more new login state again.If logined successfully again, execute
Step S507;It is no to then follow the steps S508.
Step S507 stores user information if logined successfully.
If logined successfully again, after getting user information, the basic log-on message in user information is stored
In Cookie.The value of such as user identity information Openid etc is stored in Cookie, and 2 hour validity period was set;It will
The information such as head portrait, the pet name of user are stored in LocalStorage;If before without Refresh_token or
Refresh_token is changed, then Refresh_token is stored in LocalStorage, and records the time at that time
Stamp, for judging its validity period.It is completed at this time and logs in state conversion, it is believed that log in effectively, re-execute the steps S508.
Step S508 determines that Refresh_token has failed if login failure.
If login failure, if user information has not been obtained, it is determined that Refresh_token has failed, and goes to execution
Step S505.
The embodiment can detecte and convert login state when not only entering the page, can also be stepped in user operation process
It records state to update, to avoid interrupting the process of user's operation;The embodiment preferentially uses Snsapi_base to replace Snsapi_
The mode of userinfo, so that licensing process reduces user to the direct feel of redundancy process to user's unaware;Using effective
The Refresh_token that phase is 30 days, which refreshes, logs in state, significantly reduces the frequency for jumping wechat authorization.
Fig. 6 is a kind of flow chart of information processing method according to an embodiment of the present invention.As shown in fig. 6, this method includes
Following steps:
Step S601 prepares to initiate Ajax request.
Step S602 judges whether front end logging state is effective.
When preparing to initiate Ajax request, detection front end logs in state.If it is effective to log in state, i.e. page authorization is
Have the basic logon information of user in snsapi_base and cookie or authorization be snsapi_userinfo and
Having in the basic logon information of user and localStorage in cookie has the information such as nickname, it is determined that front end logging state
Effectively, otherwise front end logging state is effective.
If it is judged that front end logging state is invalid, executes step S603 and held if it is judged that front end logging state is effective
Row step S608.If it exceeds the limitation of login times again, then no longer retry.
Whether step S603, detection Refresh_token are effective.
After judging whether front end logging state is effective, if it is judged that front end logging state is invalid, detection
The validity of refresh_token in localStorage executes step S604 if detecting that Refresh_token is effective,
If detecting that Refresh_token is invalid, step S605 is executed.
Step S604, band Refresh_token tune log in CGI.
After whether detection Refresh_token is effective, if detecting that Refresh_token is effective, band
Refresh_token tune logs in CGI.
Step S605, pop-up prompt, and refresh page logs in again.
After whether detection Refresh_token is effective, if detecting that Refresh_token is invalid, pop-up prompt,
And refresh page logs in again.
Step S606, if login successfully again.
After band Refresh_token tune logs in CGI, if logined successfully again, step S607 is executed, if again
Login failure executes step S605.
Step S607 stores user information.
If logined successfully again, user information is stored.After storing user information, step S601 is executed, prepares hair
Play Ajax request.
Step S608 initiates Ajax request.
After judging whether front end logging state is effective, if it is judged that front end logging state is effective, initiates Ajax and ask
It asks.
Step S609 judges whether CGI returned data is normal.
After initiating Ajax request, Ajax request is initiated.If it is judged that CGI returned data is abnormal, step is executed
S610 executes step S611 if it is judged that CGI returned data is normal, if logging in failure in CGI returned data, executes
Step S603.
Step S610, routinely report an error processing.
After judging whether CGI returned data is normal, if it is judged that CGI returned data is abnormal, there are other mistakes
Code then carries out the conventional processing that reports an error.For example, if conventional report an error, it is unrelated with logging in, then carry out the conventional processing that reports an error.
Step S611, executes readjustment.
After judging whether CGI returned data is normal, if it is judged that CGI returned data is normal, then readjustment is executed.
By the scheme of the embodiment, for having focused on the user authorized, can not need user again sub-authorization or
In the case that person shows authorization interface, authorization validity period is automatically updated;Authorization validity period can extend to 30 in 2 hours by conventional
It, to greatly reduce the frequency that authorization jumps;For logging in the case where failure in process in the page, can avoid again
Automatic conversion again logs in state in the case where jumping authorization, to avoid interrupting user's operation.
It should be noted that in this embodiment, elemental user log-on message is stored using Cookie, with the sheet of client
Ground stores the information such as LocalStorage storage user's head portrait, the pet name, stores the first critical field with LocalStorage
Refresh_token, merely for the sake of performance and compatibility aspect the considerations of.In fact, client storage is relevant to login
Information can also be the technologies such as Indexdb, Userdata including but not limited to Cookie, LocalStorage.Wherein,
Indexdb is the storage of a large amount of structural datas for client, and Userdata can be used for user data, system log etc.
Storage.
Data Interchange Technology of the XMLHttpRequest as front-end and back-end can be used in the embodiment.But front and back
End data switching technology can also be Jsonp, Websocket, Serversend including but not limited to XMLHttpRequest
The technologies such as Event.Wherein, JSONP (JSON with Padding) is a kind of use pattern of JSON, and Websocket is based on
The full-duplex communication agreement of TCP, Serversend Event are used for server push data.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention
It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including as dried fruit instruction is used so that a terminal device (can be mobile phone, count
Calculation machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
One side according to an embodiment of the present invention additionally provides at a kind of information for implementing above- mentioned information processing method
Manage device.Fig. 7 is a kind of schematic diagram of information processing unit according to an embodiment of the present invention.As shown in fig. 7, the device can wrap
Include: call unit 10 transfers unit 20 and storage unit 30.
Call unit 10, for passing through second in the effective situation of the first critical field of client being locally stored
Critical field calls first interface, wherein the first critical field is used to refresh the validity period of the second critical field and first is crucial
The validity period of field is greater than the validity period of the second critical field.
Unit 20 is transferred, for transferring target information by first interface.
Storage unit 30, in the case where being deployed into target information by first interface, by target information store to
In the local of client.
It should be noted that the call unit 10 in the embodiment can be used for executing the step in the embodiment of the present application
S202, the unit 20 of transferring in the embodiment can be used for executing step S204 in the embodiment of the present application, in the embodiment
Storage unit 30 can be used for executing the step S206 in the embodiment of the present application.
Optionally, the device further include: the first storage unit, in the local stored target information to client
When, in the case where the variation of the first critical field, the first critical field after variation is stored into the local of client and remembered
Timestamp of first critical field when storing to the local of client after record variation, wherein timestamp is for determining variation
Whether the first critical field afterwards is effective.
Optionally, the device further include: first logs in unit, for before transferring target information by first interface,
Second interface is logged in by the first critical field, wherein first interface is called by second interface by the second critical field.
Optionally, the device further include: first acquisition unit, for by the second critical field call first interface it
Before, obtain the target value logged in link, wherein log in link for entering target pages;Call unit 10 includes: the first tune
With module, in the case where the target value logged in link is invalid, if first be locally stored of client is closed
Key field is effective, calls first interface by the second critical field.
Optionally, device further include: the first determination unit and the second determination unit.Wherein, the first determination unit is used for
After obtaining the target value logged in link, in target value in the Unrecorded situation in the local of client, Login chain is determined
Target value in connecing is effective;Second determination unit determines Login chain in the case where target value has been recorded in the local of client
Target value in connecing is invalid.
Optionally, device further include: the second login unit, first transfer unit and the second storage unit.Wherein, second
Unit is logged in, for logging in second interface by target value after determining that the target value logged in link is effective, wherein the
One interface is called by second interface by the second critical field;First transfers unit, for transferring mesh by first interface
Mark information;Second storage unit, in the case where being deployed into target information by first interface, by target information store to
In the local of client.
The device further include: second acquisition unit, for obtaining and logging in mesh before obtaining the target value logged in link
Mark the log-on message of the page;First acquisition unit includes: acquisition module, in the case where log-on message is invalid, acquisition to be stepped on
Target value in record link.
Optionally, which further includes jump-transfer unit, for not being deployed into the target letter by the first interface
In the case where breath, authorization page is jumped to from target pages, wherein the authorization page is for authorizing access the target information
Permission the target information is deployed by the first interface after authorizing the permission for accessing the target information.
Optionally, jump-transfer unit comprises determining that module and the first jump module.Wherein it is determined that module, for passing through the
In the case that one interface is not deployed into target information, determine the first critical field failure or the first critical field permission by
Limitation;First jump module, for jumping to authorization page from target pages.
Optionally, jump-transfer unit includes: the second jump module, for being jumped to by target capability identification from target pages
Authorization page, wherein target capability identification is used to indicate authorization page and does not show content, in the permission for authorizing access target information
Later, target pages are jumped directly to.
Optionally, call unit 10 includes: the second calling module, is used for when entering target pages, in the sheet of client
In the effective situation of the first critical field of ground storage, first interface is called by the second critical field.
Optionally, call unit 10 includes: sending module, for sending operation requests, wherein operation requests are for requesting
Performance objective operates on target pages;Third calling module is used in the case where requesting performance objective operation failure, if
The first critical field of client being locally stored is effective, calls first interface by the second critical field.
Optionally, call unit 10 includes: display module, for requesting performance objective after sending operation requests
In the case where operation failure, if the first critical field of client being locally stored is invalid, display reminding information, wherein mention
Show information for prompt need to log in target pages again.
The embodiment in the effective situation of the first critical field of client being locally stored, is led to by call unit 10
It crosses the second critical field and calls first interface, wherein the first critical field is used to refresh the validity period of the second critical field and the
The validity period of one critical field is greater than the validity period of the second critical field, transfers target by first interface by transferring unit 20
Information stores target information to client through storage unit 30 in the case where being deployed into target information by first interface
In the local at end.By effective first critical field being locally stored, refreshes the validity period of the second critical field, pass through second
Critical field calls first interface, and then is deployed into target information by first interface again, to make to authorize extension of validity, pole
The earth improves the validity period of authorization, to realize the technical effect for improving information processing efficiency, and then solves related skill
The low technical problem of information processing efficiency in art.
Herein it should be noted that example and application scenarios phase that said units and module are realized with corresponding step
Together, but it is not limited to the above embodiments disclosure of that.It should be noted that a part of said units and module as device
It may operate in hardware environment as shown in Figure 1, hardware realization can also be passed through, wherein hardware by software realization
Environment includes network environment.
According to another aspect of an embodiment of the present invention, it additionally provides a kind of for implementing the electronics of above- mentioned information processing method
Device.
Fig. 8 is a kind of structural block diagram of electronic device according to an embodiment of the present invention.As shown in figure 8, the electronic device being somebody's turn to do
It may include: one or more (one is only shown in figure) processors 801, memory 803.Optionally, as shown in figure 8, the electricity
Sub-device can also include transmitting device 805 and input-output equipment 807.
Wherein, memory 803 can be used for storing software program and module, such as the information processing side in the embodiment of the present invention
Method and the corresponding program instruction/module of device, processor 801 by the software program that is stored in memory 803 of operation and
Module realizes above-mentioned information processing method thereby executing various function application and data processing.Memory 803 can wrap
Include high speed random access memory, can also include nonvolatile memory, as one or more magnetic storage device, flash memory or
Other non-volatile solid state memories of person.In some instances, memory 803 can further comprise remote relative to processor 801
The memory of journey setting, these remote memories can pass through network connection to electronic device.The example of above-mentioned network include but
It is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Above-mentioned transmitting device 805 is used to that data to be received or sent via network, can be also used for processor with
Data transmission between memory.Above-mentioned network specific example may include cable network and wireless network.In an example,
Transmitting device 805 includes a network adapter (Network Interface Controller, NIC), can pass through cable
It is connected with other network equipments with router so as to be communicated with internet or local area network.In an example, transmission dress
805 are set as radio frequency (Radio Frequency, RF) module, is used to wirelessly be communicated with internet.
Wherein, specifically, memory 803 is for storing application program.
The application program that processor 801 can call memory 803 to store by transmitting device 805, to execute following steps
It is rapid:
In the effective situation of the first critical field of client being locally stored, first is called by the second critical field
Interface, wherein the first critical field is used to refresh the validity period of the second critical field and the validity period of the first critical field is greater than
The validity period of second critical field;
Target information is transferred by first interface;
In the case where being deployed into target information by first interface, target information is stored into the local of client.
Processor 801 is also used to execute following step: when in the local stored target information to client, first
In the case that critical field changes, after the first critical field after variation is stored into the local of client and records variation
Timestamp of first critical field when storing to the local of client, wherein timestamp is for first after determining variation
Whether critical field is effective.
Processor 801 is also used to execute following step: before transferring target information by first interface, closing by first
Key field logs in second interface, wherein first interface is called by second interface by the second critical field.
Processor 801 is also used to execute following step: before calling first interface by the second critical field, acquisition is stepped on
Target value in record link, wherein log in link for entering target pages;Invalid in the target value logged in link
In the case of, if the first critical field of client being locally stored is effective, first interface is called by the second critical field.
Processor 801 is also used to execute following step: after obtaining the target value logged in link, in target value in visitor
In the Unrecorded situation in the local at family end, determine that the target value logged in link is effective;Target value the local of client
In the case where record, determine that the target value logged in link is invalid.
Processor 801 is also used to execute following step: after determining that the target value logged in link is effective, passing through target
Value logs in second interface, wherein first interface is called by second interface by the second critical field;Pass through first interface tune
Take target information;In the case where being deployed into target information by first interface, target information is stored to the local of client
In.
Processor 801 is also used to execute following step, before obtaining the target value logged in link, obtains and logs in target
The log-on message of the page;In the case where log-on message is invalid, the target value logged in link is obtained.
Processor 801 is also used to execute following step: after transferring target information by first interface, passing through first
In the case that interface is not deployed into target information, authorization page is jumped to from target pages, wherein authorization page is for authorizing visit
The permission for asking target information is deployed into target information by first interface after the permission for authorizing access target information.
Processor 801 is also used to execute following step: in the case where not being deployed into target information by first interface, really
The limited authority system of fixed first critical field failure or the first critical field;Authorization page is jumped to from target pages.
Processor 801 is also used to execute following step: authorization page is jumped to from target pages by target capability identification,
Wherein, target capability identification is used to indicate authorization page and does not show content, after the permission for authorizing access target information, directly
Jump to target pages.
Processor 801 is also used to execute following step: when entering target pages, in first be locally stored of client
In the effective situation of critical field, first interface is called by the second critical field.
Processor 801 is also used to execute following step: sending operation requests, wherein operation requests are for requesting in target
Performance objective operates on the page;In the case where requesting performance objective operation failure, if first be locally stored of client
Critical field is effective, calls first interface by the second critical field.
Processor 801 is also used to execute following step: after sending operation requests, in request performance objective operation failure
In the case where, if the first critical field of client being locally stored is invalid, display reminding information, wherein prompt information is used
It needs to log in target pages again in prompt.
Using the embodiment of the present invention, a kind of scheme of information processing is provided.It is closed in first be locally stored of client
In the effective situation of key field, first interface is called by the second critical field, wherein the first critical field is for refreshing second
The validity period of critical field and the validity period of the first critical field are greater than the validity period of the second critical field;Pass through first interface
Transfer target information;In the case where being deployed into target information by first interface, target information is stored to the sheet of client
In ground.By effective first critical field being locally stored, refreshes the validity period of the second critical field, pass through the second keyword
Segment call first interface, and then target information is deployed by first interface again, to make to authorize extension of validity, greatly mention
The validity period of authorization has been risen, to realize the technical effect for improving information processing efficiency, and then has been solved in the related technology
The low technical problem of information processing efficiency.
Optionally, the specific example in the present embodiment can be with reference to example described in above-described embodiment, the present embodiment
Details are not described herein.
It will appreciated by the skilled person that structure shown in Fig. 8 is only to illustrate, electronic device can be intelligent hand
Machine (such as Android phone, iOS mobile phone), tablet computer, palm PC and mobile internet device (Mobile
Intemet Devices, MID), the electronic devices such as PAD.Fig. 8 it does not cause to limit to the structure of above-mentioned electronic device.Example
Such as, electronic device may also include than shown in Fig. 8 more perhaps less component (such as network interface, display device) or
With the configuration different from shown in Fig. 8.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing the relevant hardware of electronic device by program, which can store in a computer readable storage medium
In, storage medium may include: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random
Access Memory, RAM), disk or CD etc..
The embodiments of the present invention also provide a kind of storage mediums.Optionally, in the present embodiment, above-mentioned storage medium can
The program code of execution information processing method for storage.
Optionally, in the present embodiment, above-mentioned storage medium can be located at multiple in network shown in above-described embodiment
On at least one network equipment in the network equipment.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps:
In the effective situation of the first critical field of client being locally stored, first is called by the second critical field
Interface, wherein the first critical field is used to refresh the validity period of the second critical field and the validity period of the first critical field is greater than
The validity period of second critical field;
Target information is transferred by first interface;
In the case where being deployed into target information by first interface, target information is stored into the local of client.
Optionally, storage medium is also configured to store the program code for executing following steps: connecing by first
After mouth transfers target information, in the case where being deployed into target information by first interface, target information is stored to client
In the local at end.
Optionally, storage medium is also configured to store the program code for executing following steps: by target information
When storing into the local of client, in the case where the variation of the first critical field, the first critical field after variation is stored
Timestamp of first critical field when storing to the local of client into the local of client and after record variation,
In, whether timestamp is effective for determining the first critical field after variation.
Optionally, storage medium is also configured to store the program code for executing following steps: connecing by first
Before mouthful transferring target information, pass through the first critical field and log in second interface, wherein first interface passes through the by second interface
Two critical fielies are called.
Optionally, storage medium is also configured to store the program code for executing following steps: connecing by first
In the case that mouth is not deployed into target information, the limited authority system of the failure of the first critical field or the first critical field is determined;
Authorization page is jumped to from target pages.
Optionally, storage medium is also configured to store the program code for executing following steps: by target permission
Mark jumps to authorization page from target pages, wherein target capability identification is used to indicate authorization page and does not show content, is awarding
After the permission for giving access target information, target pages are jumped directly to.
Optionally, storage medium is also configured to store the program code for executing following steps: closing by second
Before key field calls first interface, the target value logged in link is obtained, wherein log in link for entering target pages;
In the case where the target value logged in link is invalid, if the first critical field of client being locally stored is effective,
First interface is called by the second critical field.
Optionally, storage medium is also configured to store the program code for executing following steps: obtaining Login chain
After the target value connect, in target value in the Unrecorded situation in the local of client, the target value logged in link is determined
Effectively;In the case where target value has been recorded in the local of client, determine that the target value logged in link is invalid.
Optionally, storage medium is also configured to store the program code for executing following steps: determining Login chain
After the target value connect is effective, second interface is logged in by target value, wherein first interface is closed by second interface by second
Key field is called;Target information is transferred by first interface;In the case where being deployed into target information by first interface,
Target information is stored into the local of client.
Optionally, storage medium is also configured to store the program code for executing following steps: obtaining Login chain
Before the target value connect, in the case where log-on message is invalid, the target value logged in link is obtained.
Optionally, storage medium is also configured to store the program code for executing following steps: connecing by first
After mouth transfers target information, in the case where not being deployed into target information by first interface, jumps to and award from target pages
Weigh the page, wherein authorization page is used to authorize the permission of access target information, after the permission for authorizing access target information,
Target information is deployed by first interface.
Optionally, storage medium is also configured to store the program code for executing following steps: connecing by first
In the case that mouth is not deployed into target information, the limited authority system of the failure of the first critical field or the first critical field is determined;
Authorization page is jumped to from target pages.
Optionally, storage medium is also configured to store the program code for executing following steps: by target permission
Mark jumps to authorization page from target pages, wherein target capability identification is used to indicate authorization page and does not show content, is awarding
After the permission for giving access target information, target pages are jumped directly to.
Optionally, storage medium is also configured to store the program code for executing following steps: entering page object
When face, in the effective situation of the first critical field of client being locally stored, first is called to connect by the second critical field
Mouthful.
Optionally, storage medium is also configured to store the program code for executing following steps: operation requests are sent,
Wherein, operation requests are for requesting the performance objective on target pages to operate;In the case where requesting performance objective operation failure,
If the first critical field of client being locally stored is effective, first interface is called by the second critical field.
Optionally, storage medium is also configured to store the program code for executing following steps: asking sending operation
After asking, in the case where requesting performance objective operation failure, if the first critical field of client being locally stored is invalid,
Display reminding information, wherein prompt information needs to log in target pages again for prompting.
Optionally, the specific example in the present embodiment can be with reference to example described in above-described embodiment, the present embodiment
Details are not described herein.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or
The various media that can store program code such as CD.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product
When selling or using, it can store in above-mentioned computer-readable storage medium.Based on this understanding, skill of the invention
Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme
The form of part product embodies, which is stored in a storage medium, including as dried fruit instruction use so that
One or more computer equipment (can be personal computer, server or network equipment etc.) executes each embodiment of the present invention
The all or part of the steps of the method.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side
Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one
Kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, without departing from the principle of the present invention, it can also make such as dried fruit improvements and modifications, these improvements and modifications
It should be regarded as protection scope of the present invention.
Claims (15)
1. a kind of information processing method characterized by comprising
In the effective situation of the first critical field of client being locally stored, first is called to connect by the second critical field
Mouthful, wherein first critical field is used to refresh the validity period of second critical field and first critical field
Validity period is greater than the validity period of second critical field;
Target information is transferred by the first interface;
In the case where being deployed into the target information by the first interface, the target information is stored to the client
In the local at end.
2. the method according to claim 1, wherein storing by the target information to the sheet of the client
When in ground, the method also includes:
In the case where first critical field variation, first critical field after variation is stored to the client
Local in and record variation after timestamp of first critical field when storing to the local of the client,
In, whether the timestamp is effective for determining first critical field after variation.
3. the method according to claim 1, wherein by the first interface transfer the target information it
Before, the method also includes:
Second interface is logged in by first critical field, wherein the first interface is passed through described by the second interface
Second critical field is called.
4. the method according to claim 1, wherein
Before calling the first interface by second critical field, the method also includes: it obtains and logs in link
Target value, wherein login link is for entering target pages;
In the effective situation of the first critical field of the client being locally stored, pass through second critical field
Calling the first interface includes: in the case where the target value logged in link is invalid, if the sheet of the client
First critical field of ground storage is effective, calls the first interface by second critical field.
5. according to the method described in claim 4, it is characterized in that, obtain it is described log in link in the target value it
Afterwards, the method also includes:
In the target value in the Unrecorded situation in the local of the client, the target logged in link is determined
Value is effective;
In the case where the target value has been recorded in the local of the client, the target logged in link is determined
Value is invalid.
6. according to the method described in claim 5, it is characterized in that, determining that the target value logged in link is effective
Later, the method also includes:
Second interface is logged in by the target value, wherein the first interface is closed by the second interface by described second
Key field is called;
The target information is transferred by the first interface;
In the case where being deployed into the target information by the first interface, the target information is stored to the client
In the local at end.
7. according to the method described in claim 4, it is characterized in that,
Before obtaining the target value logged in link, the method also includes: it obtains and logs in the target pages
Log-on message;
Obtaining the target value logged in link includes: to step on described in acquisition in the case where the log-on message is invalid
The target value in record link.
8. method as claimed in any of claims 1 to 7, which is characterized in that transferred by the first interface
After the target information, the method also includes:
In the case where not being deployed into the target information by the first interface, authorization page is jumped to from target pages,
Wherein, the authorization page is authorizing the permission for accessing the target information for authorizing the permission for accessing the target information
Later, the target information is deployed by the first interface.
9. according to the method described in claim 8, it is characterized in that, believing not being deployed into the target by the first interface
In the case where breath, jumping to the authorization page from the target pages includes:
In the case where not being deployed into the target information by the first interface, the first critical field failure is determined,
Or the limited authority system of first critical field;
The authorization page is jumped to from the target pages.
10. according to the method described in claim 8, it is characterized in that, jumping to the authorization page packet from the target pages
It includes:
The authorization page is jumped to from the target pages by target capability identification, wherein the target capability identification is used
Content is not shown in the instruction authorization page, after authorizing the permission for accessing the target information, is jumped directly to described
Target pages.
11. method as claimed in any of claims 1 to 7, which is characterized in that in being locally stored for the client
The effective situation of the first critical field under, call the first interface to include: by second critical field
Send operation requests, wherein the operation requests are for requesting the performance objective on target pages to operate;
In the case where request executes object run failure, if first key of the client being locally stored
Field is effective, calls the first interface by second critical field.
12. according to the method for claim 11, which is characterized in that after sending the operation requests, the method is also
Include:
In the case where request executes object run failure, if first key of the client being locally stored
Field is invalid, display reminding information, wherein the prompt information needs to log in the target pages again for prompting.
13. a kind of information processing unit characterized by comprising
Call unit, for passing through the second keyword in the effective situation of the first critical field of client being locally stored
Segment call first interface, wherein first critical field is used to refresh the validity period of second critical field and described the
The validity period of one critical field is greater than the validity period of second critical field;
Unit is transferred, for transferring target information by the first interface;
Storage unit stores the target information in the case where being deployed into the target information by the first interface
Into the local of the client.
14. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer
Program is arranged to execute information processing method described in any one of claim 1 to 12 when operation.
15. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory
Sequence, the processor are arranged to execute letter described in any one of claim 1 to 12 by the computer program
Cease processing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810058280.XA CN110061952B (en) | 2018-01-19 | 2018-01-19 | Information processing method, information processing apparatus, storage medium, and electronic apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810058280.XA CN110061952B (en) | 2018-01-19 | 2018-01-19 | Information processing method, information processing apparatus, storage medium, and electronic apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110061952A true CN110061952A (en) | 2019-07-26 |
CN110061952B CN110061952B (en) | 2021-08-06 |
Family
ID=67315344
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810058280.XA Active CN110061952B (en) | 2018-01-19 | 2018-01-19 | Information processing method, information processing apparatus, storage medium, and electronic apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110061952B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102761549A (en) * | 2012-07-03 | 2012-10-31 | 中国联合网络通信集团有限公司 | Processing method and system of resource sharing and service platforms |
CN103581140A (en) * | 2012-08-03 | 2014-02-12 | 腾讯科技(深圳)有限公司 | Authorization control method, device and system and authorization request method and device |
CN104754030A (en) * | 2015-02-12 | 2015-07-01 | 腾讯科技(深圳)有限公司 | User information obtaining method and device |
CN104980925A (en) * | 2015-06-01 | 2015-10-14 | 走遍世界(北京)信息技术有限公司 | Authentication method and authentication device for user request |
CN106470190A (en) * | 2015-08-19 | 2017-03-01 | 中兴通讯股份有限公司 | A kind of Web real-time communication platform authentication cut-in method and device |
-
2018
- 2018-01-19 CN CN201810058280.XA patent/CN110061952B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102761549A (en) * | 2012-07-03 | 2012-10-31 | 中国联合网络通信集团有限公司 | Processing method and system of resource sharing and service platforms |
CN103581140A (en) * | 2012-08-03 | 2014-02-12 | 腾讯科技(深圳)有限公司 | Authorization control method, device and system and authorization request method and device |
CN104754030A (en) * | 2015-02-12 | 2015-07-01 | 腾讯科技(深圳)有限公司 | User information obtaining method and device |
CN104980925A (en) * | 2015-06-01 | 2015-10-14 | 走遍世界(北京)信息技术有限公司 | Authentication method and authentication device for user request |
CN106470190A (en) * | 2015-08-19 | 2017-03-01 | 中兴通讯股份有限公司 | A kind of Web real-time communication platform authentication cut-in method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110061952B (en) | 2021-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111355780B (en) | Internet of things monitoring management method and system based on block chain | |
CN106375142B (en) | The test method and device of application program | |
WO2021121029A1 (en) | Training model updating method and system, and agent, server and computer-readable storage medium | |
CN103748833B (en) | For the method and system of Network access control | |
CN108510389A (en) | Intelligent contract call method, equipment and readable storage medium storing program for executing based on block chain | |
CN106021419A (en) | Web page operation method and device, and terminal | |
CN108475249A (en) | Distributed, decentralized data polymerization | |
CN107004341A (en) | trainable transceiver and cloud computing system architecture system and method | |
CN104468592B (en) | Login method and login system | |
CN107730977A (en) | A kind of temporary parking method, apparatus and electronic equipment | |
CN103441948B (en) | A kind of data access method, network interface card and storage system | |
CN105917690A (en) | System, method, and computer program for preserving service continuity in network function virtualization (NFV) based communication network | |
CN106131057A (en) | Certification based on virtual reality scenario and device | |
CN112311578B (en) | VNF scheduling method and device based on deep reinforcement learning | |
CN108667886A (en) | The method, management system and cloud computing service framework of PaaS services are provided | |
CN107832329A (en) | Page resource acquisition methods and terminal device | |
CN103168301A (en) | Exposing resource capabilities to web applications | |
CN105637812A (en) | System and method for automated chat testing | |
CN110196715A (en) | A kind of code generating system and method | |
CN108718347A (en) | A kind of domain name analytic method, system, device and storage medium | |
CN109726984A (en) | A kind of processing result generation method and its equipment, storage medium, electronic equipment | |
CN106877464A (en) | Charge control method and charging equipment | |
CN110474812A (en) | Sample rate self-adapting regulation method and device | |
CN102724079A (en) | Method and system for auxiliary configuration of Ethernet equipment | |
CN110034972A (en) | Server stress test method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |