User operation request processing method and device and electronic equipment

文档序号:1816263 发布日期:2021-11-09 浏览:19次 中文

阅读说明:本技术 用户操作请求的处理方法、装置及电子设备 (User operation request processing method and device and electronic equipment ) 是由 朱佳明 张�杰 王少帅 涂山山 黄淑宁 于 2021-08-09 设计创作,主要内容包括:本发明提供了一种用户操作请求的处理方法、装置及电子设备,在接收到用户在第一预设访问界面中的用户操作请求的情况下,确定预设缓存位置是否存储有Token信息,若是,则说明在生成用户操作请求之前,用户已经在与第一预设访问界面具有同一登录权限的第二预设访问界面上登录过,此时不再需要用户进行登录操作,直接获取并对Token信息进行验证,若验证通过,则执行与用户操作请求对应的操作,无需用户重复登录,减少用户终端响应人机交互的次数,提高用户体验。另外,本发明,将通过token服务器对用户对应的业务信息进行封装得到的authkey信息存储到所述用户终端的预设位置,简化了业务信息的获取方式,操作简单且便捷。(The invention provides a method and a device for processing a user operation request and electronic equipment, wherein under the condition that the user operation request of a user in a first preset access interface is received, whether Token information is stored in a preset cache position or not is determined, if yes, the fact that the user logs in a second preset access interface with the same login authority as the first preset access interface before the user operation request is generated is shown, at the moment, the user does not need to perform login operation any more, the Token information is directly obtained and verified, if the verification is passed, the operation corresponding to the user operation request is executed, the user does not need to log in repeatedly, the number of times that the user terminal responds to man-machine interaction is reduced, and the user experience is improved. In addition, according to the invention, authkey information obtained by encapsulating the service information corresponding to the user through the token server is stored in the preset position of the user terminal, so that the service information acquisition mode is simplified, and the operation is simple and convenient.)

1. A processing method of a user operation request is applied to a user terminal, and the processing method of the user operation request comprises the following steps:

under the condition that a user operation request of a user in a first preset access interface is received, determining whether a preset cache position stores Token information or not;

if yes, obtaining stored Token information from the preset cache position, wherein the Token information is generated based on authkey information obtained from a preset position of the user terminal when a user logs in a second preset access interface on the user terminal before the user operation request is received, and is stored to the preset cache position, and the authkey information is obtained by packaging service information corresponding to the user through a Token server; the second preset access interface and the first preset access interface have the same login authority;

generating identity verification information carrying the Token information, and sending the identity verification information to a Token server;

and displaying an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request.

2. The processing method according to claim 1, wherein when it is determined that no Token information is stored in a preset cache location, or when the Token server fails to verify the Token information carried in the authentication information, the processing method further comprises:

if the login state of the user at the site corresponding to the first preset access interface is that the user does not log in, acquiring the authkey information and the site configuration information of the site;

sending the authkey information and the site configuration information of the site to a Token server, so that the Token server generates Token information based on the authkey information and the site configuration information of the site, and setting validity of other Token information which corresponds to the site and is generated before the Token information is generated as invalid;

receiving Token information fed back by the Token server, and storing the Token information to a preset cache position;

generating identity verification information carrying the Token information, and sending the identity verification information to a Token server;

and displaying an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request.

3. The processing method according to claim 2, wherein when it is determined that no Token information is stored in a preset cache location, or when the Token server fails to verify the Token information carried in the authentication information, the processing method further comprises:

sending a Token information validity inquiry request to the Token server,

and under the condition that the Token information fed back by the Token server is invalid, controlling the user of the site corresponding to the first preset access interface to log in and log out, and displaying preset log-in and log-out information.

4. The processing method according to claim 1, wherein after the Token server verifies that the Token information carried in the authentication information passes and the backend server corresponding to the first preset access interface performs the operation corresponding to the user operation request, displaying an operation result, comprising:

the operation result fed back by the back-end server corresponding to the first preset access interface is displayed; and the operation result is obtained by executing the operation corresponding to the user operation request based on the user identification information after the back-end server corresponding to the first preset access interface receives the user identification information fed back by the Token server to the Token information verification carried in the identity verification information.

5. The processing method according to claim 1, wherein the Token information includes Token and Token valid time;

under the condition that it is determined that the preset cache position stores Token information, the method further comprises the following steps:

under the condition that the Token is determined to be expired based on the Token valid time, sending a Token updating request to a Token server;

receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

6. The processing method according to claim 1, wherein the Token information includes Token and Token valid time;

under the condition that it is determined that the preset cache position stores Token information, the method further comprises the following steps:

sending the Token information to a preset Token monitoring terminal;

receiving a Token information updating instruction sent by the preset Token monitoring terminal;

responding to the Token information updating instruction and sending a Token updating request to a Token server;

receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

7. The processing method according to claim 1, wherein in a case where a user operation request of a user in the first preset access interface is received, determining whether the preset cache location stores Token information includes:

under the condition that a user operation request of a user in a first preset access interface is received, determining whether the user accesses the first preset access interface again within a validity period from the last time of accessing the first preset access interface;

if yes, determining whether the preset cache position stores Token information.

8. A processing device of a user operation request is applied to a user terminal, and the processing device of the user operation request comprises the following components:

the Token judging module is used for determining whether a preset cache position stores Token information or not under the condition of receiving a user operation request of a user in a first preset access interface;

the Token obtaining module is configured to obtain, if yes, stored Token information from the preset cache location, where the Token information is generated based on authkey information obtained from a preset location of the user terminal before the user operation request is received and when the user logs in a second preset access interface on the user terminal, and is stored to the preset cache location, and the authkey information is obtained by encapsulating, by a Token server, service information corresponding to the user; the second preset access interface and the first preset access interface have the same login authority;

the information generating module is used for generating identity verification information carrying the Token information and sending the identity verification information to a Token server;

and the result display module is used for displaying an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request.

9. The apparatus for processing a user operation request according to claim 8, further comprising:

the information acquisition module is used for acquiring the authkey information and the site configuration information of the site if the login state of the site corresponding to the first preset access interface of the user is that the user does not login;

an information sending module, configured to send the authkey information and the site configuration information of the site to a Token server, so that the Token server generates Token information based on the authkey information and the site configuration information of the site, and sets validity of other Token information, which corresponds to the site and is generated before the Token information is generated, as invalid;

the information receiving module is used for receiving the Token information fed back by the Token server and storing the Token information to a preset cache position;

the information generating module is further configured to generate authentication information carrying the Token information after the information receiving module stores the Token information to a preset cache location, and send the authentication information to a Token server.

10. An electronic device, comprising: a memory and a processor;

wherein the memory is used for storing programs;

a processor calls a program and is adapted to perform a method of processing a user operation request as claimed in any one of claims 1 to 7.

Technical Field

The present invention relates to the field of data processing, and in particular, to a method and an apparatus for processing a user operation request, and an electronic device.

Background

Browsers are application programs used to retrieve, present, and deliver Web information resources. In order to improve the convenience of the user, the user can access different sites, such as sites A, B and the like, in the same browser.

When a user accesses different sites on the same browser, such as sites A and B, the user is required to perform corresponding login operation, and the login operation at different sites can enable the user terminal provided with the browser to perform multiple times of man-machine interaction, so that the operation is complex, and the user experience is reduced.

Disclosure of Invention

In view of this, the present invention provides a method and an apparatus for processing a user operation request, and an electronic device, so as to solve the problem that when a user accesses different sites on the same browser, the user is required to perform corresponding login operations, which reduces user experience.

In order to solve the technical problems, the invention adopts the following technical scheme:

a processing method of a user operation request is applied to a user terminal, and comprises the following steps:

under the condition that a user operation request of a user in a first preset access interface is received, determining whether a preset cache position stores Token information or not;

if yes, obtaining stored Token information from the preset cache position, wherein the Token information is generated based on authkey information obtained from a preset position of the user terminal when a user logs in a second preset access interface on the user terminal before the user operation request is received, and is stored to the preset cache position, and the authkey information is obtained by packaging service information corresponding to the user through a Token server; the second preset access interface and the first preset access interface have the same login authority;

generating identity verification information carrying the Token information, and sending the identity verification information to a Token server;

and displaying an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request.

Optionally, when it is determined that Token information is not stored in a preset cache location, or the Token server fails to verify the Token information carried in the authentication information, the method further includes:

if the login state of the user at the site corresponding to the first preset access interface is that the user does not log in, acquiring the authkey information and the site configuration information of the site;

sending the authkey information and the site configuration information of the site to a Token server, so that the Token server generates Token information based on the authkey information and the site configuration information of the site, and setting validity of other Token information which corresponds to the site and is generated before the Token information is generated as invalid;

receiving Token information fed back by the Token server, and storing the Token information to a preset cache position;

generating identity verification information carrying the Token information, and sending the identity verification information to a Token server;

and displaying an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request.

Optionally, when it is determined that Token information is not stored in a preset cache location, or the Token server fails to verify the Token information carried in the authentication information, the method further includes:

sending a Token information validity inquiry request to the Token server,

and under the condition that the Token information fed back by the Token server is invalid, controlling the user of the site corresponding to the first preset access interface to log in and log out, and displaying preset log-in and log-out information.

Optionally, after the Token server verifies that the Token information carried in the identity verification information passes and a backend server corresponding to the first preset access interface performs an operation corresponding to the user operation request, displaying an operation result, including:

the operation result fed back by the back-end server corresponding to the first preset access interface is displayed; and the operation result is obtained by executing the operation corresponding to the user operation request based on the user identification information after the back-end server corresponding to the first preset access interface receives the user identification information fed back by the Token server to the Token information verification carried in the identity verification information.

Optionally, the Token information includes Token and Token valid time;

under the condition that it is determined that the preset cache position stores Token information, the method further comprises the following steps:

under the condition that the Token is determined to be expired based on the Token valid time, sending a Token updating request to a Token server;

receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

Optionally, the Token information includes Token and Token valid time;

under the condition that it is determined that the preset cache position stores Token information, the method further comprises the following steps:

sending the Token information to a preset Token monitoring terminal;

receiving a Token information updating instruction sent by the preset Token monitoring terminal;

responding to the Token information updating instruction and sending a Token updating request to a Token server;

receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

Optionally, in a case that a user operation request of a user in the first preset access interface is received, determining whether the preset cache location stores Token information includes:

under the condition that a user operation request of a user in a first preset access interface is received, determining whether the user accesses the first preset access interface again within a validity period from the last time of accessing the first preset access interface;

if yes, determining whether the preset cache position stores Token information.

A processing device of a user operation request is applied to a user terminal, and comprises the following components:

the Token judging module is used for determining whether a preset cache position stores Token information or not under the condition of receiving a user operation request of a user in a first preset access interface;

the Token obtaining module is configured to obtain, if yes, stored Token information from the preset cache location, where the Token information is generated based on authkey information obtained from a preset location of the user terminal before the user operation request is received and when the user logs in a second preset access interface on the user terminal, and is stored to the preset cache location, and the authkey information is obtained by encapsulating, by a Token server, service information corresponding to the user; the second preset access interface and the first preset access interface have the same login authority;

the information generating module is used for generating identity verification information carrying the Token information and sending the identity verification information to a Token server;

and the result display module is used for displaying an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request.

Optionally, the apparatus for processing the user operation request further includes:

the information acquisition module is used for acquiring the authkey information and the site configuration information of the site if the login state of the site corresponding to the first preset access interface of the user is that the user does not login;

an information sending module, configured to send the authkey information and the site configuration information of the site to a Token server, so that the Token server generates Token information based on the authkey information and the site configuration information of the site, and sets validity of other Token information, which corresponds to the site and is generated before the Token information is generated, as invalid;

the information receiving module is used for receiving the Token information fed back by the Token server and storing the Token information to a preset cache position;

the information generating module is further configured to generate authentication information carrying the Token information after the information receiving module stores the Token information to a preset cache location, and send the authentication information to a Token server.

An electronic device, comprising: a memory and a processor;

wherein the memory is used for storing programs;

the processor calls the program and is used for executing the processing method of the user operation request.

Compared with the prior art, the invention has the following beneficial effects:

the invention provides a method and a device for processing a user operation request and electronic equipment, wherein under the condition that the user operation request of a user in a first preset access interface is received, whether Token information is stored in a preset cache position or not is determined, if yes, the fact that the user logs in a second preset access interface with the same login authority as the first preset access interface before the user operation request is generated is shown, at the moment, the user does not need to perform login operation any more, the Token information is directly obtained and verified, if the verification is passed, the operation corresponding to the user operation request is executed, the user does not need to log in repeatedly, the number of times that the user terminal responds to man-machine interaction is reduced, and the user experience is improved. In addition, in the invention, the authkey information obtained by encapsulating the service information corresponding to the user through the token server is stored in the preset position of the user terminal, and the token information is generated based on the authkey information, so that when the service information is needed, the authkey information can be directly obtained from the preset position or obtained by analyzing the token information, and the service information is obtained by analyzing the authkey information.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.

Fig. 1 is an application scene diagram of a processing method for a user operation request according to an embodiment of the present invention;

fig. 2 is a flowchart of a method for processing a user operation request according to an embodiment of the present invention;

fig. 3 is a flowchart of another method for processing a user operation request according to an embodiment of the present invention;

fig. 4 is a flowchart of a method for processing a user operation request according to another embodiment of the present invention;

fig. 5 is a schematic structural diagram of a device for processing a user operation request according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Browsers are application programs used to retrieve, present, and deliver Web information resources. In order to improve the convenience of the user, the user can access different sites, such as sites A, B and the like, in the same browser.

When a user accesses different sites on the same browser, such as sites A and B, the user is required to perform corresponding login operation, and the login operation at different sites can enable the user terminal provided with the browser to perform multiple times of man-machine interaction, so that the operation is complex, and the user experience is reduced.

In order to solve the technical problem, the inventor has studied and found that a single sign-on mode can be adopted to reduce the number of user logins, but the current single sign-on mode is limited to that a user visits a plurality of sites belonging to the same domain name, such as an FM site of the site C, a book site of the site C, and a movie site of the site C, and the number of user logins can be reduced by the single sign-on mode.

However, when accessing a plurality of sites that do not belong to the same domain name, that is, when accessing sites across domain names, a user needs to perform corresponding login when accessing each site (such as the above-mentioned site a and site B), and human-computer interaction is required for each login, which is complicated in operation.

According to the invention, aiming at a cross-domain name login scene, a common Token program can be set aiming at different site front-end programs, the program is used for realizing the caching of Token information used during login, when a user accesses one site, login operation is carried out, the corresponding Token information is stored, when the user accesses another site, the Token program is directly used for obtaining the stored Token information, user identity authentication is directly carried out according to the Token information, after the authentication is passed, the user operation is executed, the user login is not required for many times, the man-machine interaction times are reduced, and the user experience is improved.

Specifically, the method and the device determine whether the Token information is stored in the preset cache position or not under the condition that a user operation request of a user in a first preset access interface is received, if yes, the fact that the user logs in a second preset access interface with the same login authority as the first preset access interface before the user operation request is generated is indicated, at the moment, the user does not need to perform login operation any more, the Token information is directly obtained and verified, if the user operation request passes the verification, the operation corresponding to the user operation request is executed, repeated login of the user is not needed, the number of times of response of the user terminal to human-computer interaction is reduced, and user experience is improved.

In practical applications, in order to make the internal components of the processor in the user terminal of the present invention more clear to those skilled in the art, the internal components of the processor will now be explained.

Referring to fig. 1, different site front-end programs a-N are set in a processor in a user terminal, where N is a positive integer. The sites in this embodiment may be different sites in the same browser, such as site a and site B. Or different public numbers in the same browser, such as public numbers of site A, site B and the like. Or different public numbers on the same APP, such as public numbers of site A, site B, and the like. Regardless of the implementation manner, the sites need to ensure that the domain names of different sites are different.

In this embodiment, a Token program is added to the processor, where the Token program may be stored in the server as an independent program, and different site front-end programs can communicate with the Token program. Only the site front-end programs capable of communicating with the Token program can have the same login authority, after login is performed in a preset access interface corresponding to one of the site front-end programs, the Token program feeds the authkey information and the site configuration information of the site back to the Token server, the Token server generates the Token information corresponding to the authkey information and the site configuration information of the site, and the Token program caches the Token information to a preset cache position. And the subsequent user accesses other site front-end programs without needing the user to log in for the second time.

The Token program in this embodiment has a corresponding Token backend, that is, a Token server, and the Token server may be a passport backend (that is, unified login platform backend), and at this time, the Token program is a passport front end (that is, unified login platform front end), and the Token program can interact with the Token server, acquires Token information from the Token server, and stores the Token information.

Each site front-end program in this embodiment may also communicate with a corresponding site back-end server, so as to implement a data interaction function. Each site back-end server can also interact with the Token server to realize Token verification.

On the basis of the architecture of fig. 1, an embodiment of the present invention provides a method for processing a user operation request, which is applied to a user terminal, and with reference to fig. 2, the method for processing a user operation request may include:

and S11, receiving a user operation request of the user in the first preset access interface.

Specifically, for example, a first preset access interface is a site a interface in a browser on a user terminal (such as a mobile phone, a notebook, a computer, and the like), and assuming that a user clicks a "free consultation" button on the site a interface after opening the site a interface, a site front-end program generates a user operation request, where the user operation request is sent to the site front-end program corresponding to the site a.

S12, determining whether the preset cache position stores Token information or not; if yes, go to step S13.

Specifically, after logging in a preset access interface corresponding to one site front-end program, Token information corresponding to the site front-end program is stored in a preset cache position, and then, when a user accesses other preset access interfaces, the user does not need to log in.

That is, if Token information is stored in the preset cache location, the user does not need to perform login operation at this time. If the preset cache position does not store Token information, the user still needs to perform login operation at the moment. Therefore, in this embodiment, it is necessary to determine whether the preset cache location stores Token information.

In practical application, if the user does not access the first preset access interface again within the validity period of accessing the first preset access interface last time, a user login operation needs to be performed, and at this time, the step of determining whether the preset cache position stores Token information is executed. That is to say, in a case that a user operation request of a user in a first preset access interface is received, determining whether a preset cache location stores Token information includes:

under the condition that a user operation request of a user in a first preset access interface is received, determining whether the user accesses the first preset access interface again within a validity period from the last time of accessing the first preset access interface; if yes, determining whether the preset cache position stores Token information.

It should be noted that if the user accesses the first preset access interface again within the validity period from the last access to the first preset access interface, since the login operation is already performed during the last access, the user does not need to perform the login operation, and the operation corresponding to the user operation request is directly responded and executed, such as opening a free consultation interface.

And S13, acquiring the stored Token information from the preset cache position.

And under the condition that the Token information is stored in the preset cache position, acquiring the stored Token information from the preset cache position.

The Token information is generated based on authkey information acquired from a preset position of the user terminal before the user operation request is received and when the user logs in a second preset access interface on the user terminal, and is stored in the preset cache position, and the authkey information is obtained by packaging service information corresponding to the user through a Token server; the second preset access interface and the first preset access interface have the same login authority.

In practical application, the second preset access interface and the first preset access interface have the same login authority, which means that each site front-end program can communicate with the same independent Token program.

The second preset access interface in this embodiment may be a preset access interface of a corresponding site front-end program that can communicate with the same independent Token program, except for the first preset access interface.

After logging in a preset access interface corresponding to one site front-end program, the Token program sends authkey information and site configuration information of the site to a Token server, the Token server generates Token information corresponding to the authkey information and the site configuration information of the site, and the Token program caches the Token information to a preset cache position. And the subsequent user accesses other site front-end programs without needing the user to log in for the second time.

In this embodiment, the authkey information is obtained by encapsulating the service information corresponding to the user through the token server. Specifically, for a user, the token server obtains the service information of the user.

The service information may include service identification information (for identifying service identity, which may be identified by a character string, for example, station a and station B are identified by qsc and qscyx, respectively, and station a and station B may be regarded as different service lines, and the different service lines correspond to different service line identifiers) and service configuration information (the service configuration information may be a configuration protocol, and the service represented by the service identification information is a protocol required for accessing the token server). The service information may also include login mode information (unique identifier of operator for short message login, account and password of third party platform (WeChat, qq, microblog, etc.).

After receiving the service information, the token server encapsulates the service information to obtain authkey information, and then sends the authkey information to each service line, and the authkey information is buried in each service line. Token information may be subsequently generated based on authkey information.

In this embodiment, the process of generating Token information based on authkey information may include:

and acquiring site configuration information of the site, wherein the configuration information can be a device model (such as a mobile phone model (android, apple), a browser model (H5 and the like)).

And sending the authkey information and the site configuration information of the site to a Token server, wherein the Token server generates the Token information by a certain encryption algorithm based on the authkey information and the site configuration information of the site. In addition, when generating the Token information, the Token information may be generated together with the authkey information and the site configuration information of the site by using the timestamp as a parameter.

After generating the Token information, the Token information can be sent to the user terminal, the Token information is stored in the preset cache position, and the authkey information is stored in the preset position.

And S14, generating identity authentication information carrying the Token information, and sending the identity authentication information to a Token server.

In practical application, a site front-end program generates identity authentication information carrying Token information, and sends the identity authentication information to a corresponding site back-end server, the site back-end server sends the identity authentication information to the Token server, the Token server acquires the Token information in the identity authentication information, checks whether the Token information is valid, queries user identification information user _ id corresponding to the Token information under the condition that the Token information is valid, and feeds the user identification information user _ id back to the site front-end program through the site back-end server.

And S15, after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request, displaying the operation result.

In more detail, step S15 includes:

the operation result fed back by the back-end server corresponding to the first preset access interface is displayed; and the operation result is obtained by executing the operation corresponding to the user operation request based on the user identification information after the back-end server corresponding to the first preset access interface receives the user identification information fed back by the Token server to the Token information verification carried in the identity verification information.

Specifically, if the Token server passes the verification, the back-end server corresponding to the first preset access interface receives user identification information user _ id fed back by the Token server for passing the verification of the Token information carried in the authentication information.

After receiving the user identification information user _ id, the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request based on the user identification information, and returns the operation result to the front end, and the front end displays the operation result.

For example, if the user clicks the "free consultation" button, the user jumps to the "free consultation" interface, and records the user operation in the log corresponding to the user identification information user _ id.

And if the user clicks a 'query history consultation information' button, acquiring the history consultation information corresponding to the user identification information user _ id, and displaying.

It should be noted that, in this embodiment, executing the user operation may be an original function of the site front-end program, and this embodiment is not modified.

In this embodiment, under the condition that a user operation request of a user in a first preset access interface is received, whether Token information is stored in a preset cache position is determined, if yes, it is indicated that the user has logged in a second preset access interface having the same login authority as the first preset access interface before the user operation request is generated, at this time, the user is not required to perform login operation any more, the Token information is directly obtained and verified, if the verification is passed, an operation corresponding to the user operation request is executed, repeated login of the user is not required, the number of times of response of the user terminal to human-computer interaction is reduced, and user experience is improved.

In addition, according to the method and the device, authkey information obtained by encapsulating the service information corresponding to the user through the token server is stored in the preset position of the user terminal, so that the authkey information can be directly obtained from the preset position and analyzed to obtain the service information when the service information is needed, and compared with a mode of sequentially obtaining each service sub-information in the service information through a set obtaining mode and finally obtaining the service information, the method and the device for obtaining the service information simplify the obtaining mode of the service information and are simple and convenient to operate. In addition, since the token information is generated based on the authkey information, when login identity authentication is performed through the token information, the service information can be acquired only by analyzing the authkey information in the token information so as to judge relevant information such as service identification information and service configuration information of a service line used for login, the acquisition is convenient, the service information does not need to be acquired through additional configuration, the configuration is prevented from being complicated, unnecessary network requests are reduced, the pressure of a server is reduced, and the network and server resources are saved.

In another implementation manner of the present invention, referring to fig. 3, when it is determined that Token information is not stored in a preset cache location, or when the Token server fails to verify the Token information carried in the authentication information, it indicates that the user cannot log in by a single sign-on manner, at this time, the processing method further includes:

s21, if the login state of the user at the site corresponding to the first preset access interface is not logged in, acquiring the authkey information and the site configuration information of the site.

In this embodiment, the login is performed only in a state where the user is not logged in. If the user logs in, the user does not log in for the second time.

And S22, sending the authkey information and the site configuration information of the site to a Token server, so that the Token server generates Token information based on the authkey information and the site configuration information of the site, and setting validity of other Token information corresponding to the site and generated before the Token information is generated as invalid.

It should be noted that, the process of generating Token information in the present embodiment has been described in the above embodiments, and please refer to the above corresponding description.

If the Token server generates Token information and determines that the user has logged in the site through other equipment, the Token server sets validity of other Token information corresponding to the site and generated before the Token information is generated as invalid so that the same user logs in only one equipment, thereby realizing mutual kicking.

For example, if the user logs in to the site a on the device a, and if the user logs in to the site a on the device B, the user goes offline to the site a on the device a, and only logs in to the site a on the device B.

And S23, receiving the Token information fed back by the Token server, and storing the Token information to a preset cache position.

And S24, generating identity authentication information carrying the Token information, and sending the identity authentication information to a Token server.

And S25, after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request, displaying the operation result.

Please refer to the corresponding descriptions in the above embodiments for the specific implementation process of steps S23-S25.

On the basis of the embodiment, the processing method further includes:

sending a Token information validity query request to the Token server, controlling the user of the site corresponding to the first preset access interface to log in and log out under the condition that the Token information fed back by the Token server is invalid, and displaying preset log-out information.

In this embodiment, still taking the above embodiment as an example, if the user logs in at site a on device a, and then logs in at site a on device B, the user goes offline at site a on device a, and if the user operates site a on device a, if a "free consultation" button is clicked, at this time, a site front-end program corresponding to site a on device a sends a request to the Token server, and the Token server queries that Token information of site a on device a is invalid, it receives that Token information fed back by the Token server is invalid, and then controls the user of the site corresponding to the first preset access interface to log in and log out, and displays preset log-out and log-in information, thereby implementing mutual kicking.

In this embodiment, through playing the setting each other for same user can only log in on equipment at same website, avoids the problem that the information is asynchronous at many equipment logins at the same moment.

In another implementation manner of the present invention, since the Token has valid time, that is, the Token is valid only in the Token valid time, and after the Token valid time elapses, the Token is invalid, and at this time, the Token needs to be updated. At this time, the Token information includes Token and Token valid time.

Specifically, the update operation has the following two modes, which are respectively introduced:

1. automatic updating:

under the condition that it is determined that the preset cache position stores Token information, the method further comprises the following steps:

1) and sending a Token updating request to a Token server under the condition that the Token is determined to be expired based on the Token valid time.

2) Receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

Specifically, the Token detects whether the Token is expired in real time based on the Token valid time, if so, the Token sends a Token update request to the Token server, the Token update request carries the original Token, the Token server detects whether the Token stored by the Token server is the same as the Token carried in the Token update request, if so, the Token server does not update, at the moment, the Token server generates updated Token information and returns the updated Token information to the Token program, and the Token program replaces the Token information stored in the preset cache position with the updated Token information, so that the Token is updated.

If the Token server detects that the Token stored in the Token server is different from the Token carried in the Token updating request, it indicates that the Token stored in the Token server has been updated, and at this time, the Token stored in the Token server is directly returned to the Token program.

2. And (3) controlling and updating the external equipment:

in a case that it is determined that the Token information is stored in the preset cache location, with reference to fig. 4, the method further includes:

and S31, sending the Token information to a preset Token monitoring terminal.

Specifically, besides the Token can realize the update control, other terminals may also be provided, such as a preset Token monitoring terminal for performing the update control. The preset Token monitoring terminal can be a server, a mobile phone, a notebook computer and other terminals.

And S32, receiving a Token information updating instruction sent by the preset Token monitoring terminal.

The manual work can detect whether the Token is expired or not based on the Token valid time, when the Token is expired nearby, if the Token is expired for five minutes, the update can be performed in advance in order to reduce the pressure of the Token server, and at the moment, the manual work can click the update operation, so that a Token information update instruction sent by the Token monitoring terminal is preset.

In addition, automatic updating can be set, for example, a Token information updating instruction automatically sent by the Token monitoring terminal is preset when five minutes expires.

S33, responding to the Token information updating instruction and sending a Token updating request to the Token server;

and S34, receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

Specifically, the Token program sends a Token update request to the Token server, the Token server generates updated Token information and returns the updated Token information to the Token program, and the Token program replaces the Token information stored in a preset cache position with the updated Token information, so that Token update is realized. The concrete implementation process refers to the corresponding description.

In this embodiment, a Token update mode is provided, and then an appropriate update mode can be selected for updating according to actual requirements.

Optionally, on the basis of the foregoing embodiment of the method for processing a user operation request, another embodiment of the present invention provides a processing apparatus for a user operation request, which is applied to a user terminal, and with reference to fig. 5, the processing apparatus for a user operation request includes:

the Token judging module 11 is configured to determine whether Token information is stored in a preset cache location under the condition that a user operation request of a user in a first preset access interface is received;

the Token obtaining module 12 is configured to, if yes, obtain stored Token information from the preset cache location, where the Token information is generated based on authkey information obtained from a preset location of the user terminal when the user logs in a second preset access interface on the user terminal before receiving the user operation request, and is stored to the preset cache location, and the authkey information is obtained by encapsulating, by a Token server, service information corresponding to the user; the second preset access interface and the first preset access interface have the same login authority;

the information generating module 13 is configured to generate authentication information carrying the Token information, and send the authentication information to a Token server;

and the result display module 14 is configured to display an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the backend server corresponding to the first preset access interface performs the operation corresponding to the user operation request.

Further, still include:

the information acquisition module is used for acquiring the authkey information and the site configuration information of the site if the login state of the site corresponding to the first preset access interface of the user is that the user does not login;

an information sending module, configured to send the authkey information and the site configuration information of the site to a Token server, so that the Token server generates Token information based on the authkey information and the site configuration information of the site, and sets validity of other Token information, which corresponds to the site and is generated before the Token information is generated, as invalid;

the information receiving module is used for receiving the Token information fed back by the Token server and storing the Token information to a preset cache position;

the information generating module is further configured to generate authentication information carrying the Token information after the information receiving module stores the Token information to a preset cache location, and send the authentication information to a Token server.

Further, still include:

and the login control module is used for sending a Token information validity query request to the Token server, controlling the user of the site corresponding to the first preset access interface to log in and log out under the condition that the Token information fed back by the Token server is invalid, and displaying preset login logout information.

Further, the result display module 14 is specifically configured to:

the operation result fed back by the back-end server corresponding to the first preset access interface is displayed; and the operation result is obtained by executing the operation corresponding to the user operation request based on the user identification information after the back-end server corresponding to the first preset access interface receives the user identification information fed back by the Token server to the Token information verification carried in the identity verification information.

Further, the Token information includes Token and Token valid time;

the processing apparatus further includes:

the first Token updating module is specifically configured to:

under the condition that the Token is determined to be expired based on the Token valid time, sending a Token updating request to a Token server;

receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

The processing apparatus further includes:

the second Token updating module is specifically configured to:

sending the Token information to a preset Token monitoring terminal;

receiving a Token information updating instruction sent by the preset Token monitoring terminal;

responding to the Token information updating instruction and sending a Token updating request to a Token server;

receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

Further, the Token determination module is specifically configured to:

under the condition that a user operation request of a user in a first preset access interface is received, determining whether the user accesses the first preset access interface again within a validity period from the last time of accessing the first preset access interface;

if yes, determining whether the preset cache position stores Token information.

In this embodiment, under the condition that a user operation request of a user in a first preset access interface is received, whether Token information is stored in a preset cache position is determined, if yes, it is indicated that the user has logged in a second preset access interface having the same login authority as the first preset access interface before the user operation request is generated, at this time, the user is not required to perform login operation any more, the Token information is directly obtained and verified, if the verification is passed, an operation corresponding to the user operation request is executed, repeated login of the user is not required, the number of times of response of the user terminal to human-computer interaction is reduced, and user experience is improved.

In addition, in the invention, the authkey information obtained by encapsulating the service information corresponding to the user through the token server is stored in the preset position of the user terminal, and the token information is generated based on the authkey information, so that when the service information is needed, the authkey information can be directly obtained from the preset position or obtained by analyzing the token information, and the service information is obtained by analyzing the authkey information.

It should be noted that, for the working process of each module in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.

Optionally, on the basis of the embodiment of the method and the apparatus for processing the user operation request, another embodiment of the present invention provides an electronic device, which may be the user terminal described above, including: a memory and a processor;

wherein the memory is used for storing programs;

the processor calls a program and is used to:

under the condition that a user operation request of a user in a first preset access interface is received, determining whether a preset cache position stores Token information or not;

if yes, obtaining stored Token information from the preset cache position, wherein the Token information is generated based on authkey information obtained from a preset position of the user terminal when a user logs in a second preset access interface on the user terminal before the user operation request is received, and is stored to the preset cache position, and the authkey information is obtained by packaging service information corresponding to the user through a Token server; the second preset access interface and the first preset access interface have the same login authority;

generating identity verification information carrying the Token information, and sending the identity verification information to a Token server;

and displaying an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request.

Further, when it is determined that Token information is not stored in a preset cache location, or the Token server fails to verify the Token information carried in the authentication information, the method further includes:

if the login state of the user at the site corresponding to the first preset access interface is that the user does not log in, acquiring the authkey information and the site configuration information of the site;

sending the authkey information and the site configuration information of the site to a Token server, so that the Token server generates Token information based on the authkey information and the site configuration information of the site, and setting validity of other Token information which corresponds to the site and is generated before the Token information is generated as invalid;

receiving Token information fed back by the Token server, and storing the Token information to a preset cache position;

generating identity verification information carrying the Token information, and sending the identity verification information to a Token server;

and displaying an operation result after the Token server passes the verification of the Token information carried in the identity verification information and the back-end server corresponding to the first preset access interface executes the operation corresponding to the user operation request.

Further, when it is determined that Token information is not stored in a preset cache location, or the Token server fails to verify the Token information carried in the authentication information, the method further includes:

sending a Token information validity inquiry request to the Token server,

and under the condition that the Token information fed back by the Token server is invalid, controlling the user of the site corresponding to the first preset access interface to log in and log out, and displaying preset log-in and log-out information.

Further, after the Token server verifies that the Token information carried in the identity verification information passes and a back-end server corresponding to the first preset access interface performs an operation corresponding to the user operation request, displaying an operation result, including:

the operation result fed back by the back-end server corresponding to the first preset access interface is displayed; and the operation result is obtained by executing the operation corresponding to the user operation request based on the user identification information after the back-end server corresponding to the first preset access interface receives the user identification information fed back by the Token server to the Token information verification carried in the identity verification information.

Further, the Token information includes Token and Token valid time;

under the condition that it is determined that the preset cache position stores Token information, the method further comprises the following steps:

under the condition that the Token is determined to be expired based on the Token valid time, sending a Token updating request to a Token server;

receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

Further, the Token information includes Token and Token valid time;

under the condition that it is determined that the preset cache position stores Token information, the method further comprises the following steps:

sending the Token information to a preset Token monitoring terminal;

receiving a Token information updating instruction sent by the preset Token monitoring terminal;

responding to the Token information updating instruction and sending a Token updating request to a Token server;

receiving updated Token information fed back by the Token server, and replacing the Token information stored in the preset cache position with the updated Token information.

Further, under the condition that a user operation request of a user in the first preset access interface is received, determining whether the preset cache position stores Token information or not, including:

under the condition that a user operation request of a user in a first preset access interface is received, determining whether the user accesses the first preset access interface again within a validity period from the last time of accessing the first preset access interface;

if yes, determining whether the preset cache position stores Token information.

In this embodiment, under the condition that a user operation request of a user in a first preset access interface is received, whether Token information is stored in a preset cache position is determined, if yes, it is indicated that the user has logged in a second preset access interface having the same login authority as the first preset access interface before the user operation request is generated, at this time, the user is not required to perform login operation any more, the Token information is directly obtained and verified, if the verification is passed, an operation corresponding to the user operation request is executed, repeated login of the user is not required, the number of times of response of the user terminal to human-computer interaction is reduced, and user experience is improved.

In addition, in the invention, the authkey information obtained by encapsulating the service information corresponding to the user through the token server is stored in the preset position of the user terminal, and the token information is generated based on the authkey information, so that when the service information is needed, the authkey information can be directly obtained from the preset position or obtained by analyzing the token information, and the service information is obtained by analyzing the authkey information.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种海洋科学合作控制系统、方法、介质、设备及终端

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类