Program behavior control method and device, system, equipment and medium

By generating and verifying verification codes and access tokens for programs that are not logged in, the limitations of login-free navigation between mini-programs are resolved, enabling secure and flexible cross-program access and improving user experience.

CN120973435APending Publication Date: 2025-11-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511118545.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In existing technologies, the login-free redirection method between mini-programs has significant limitations, making it difficult for different applicants to redirect without login, resulting in inconvenience for users.

Method used

By generating a verification code for the target server associated with an unlogged-in program and verifying its legitimacy in the logged-in program, an access token is generated, allowing the unlogged-in program to access the target server, thus achieving login-free redirection.

Benefits of technology

It enables flexible login-free redirection while ensuring user data security, and is applicable to program redirection between different applicant entities, thus improving user convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973435A_ABST
    Figure CN120973435A_ABST
Patent Text Reader

Abstract

The invention provides a program behavior control method and device, a system, equipment and a medium, and the method comprises the steps: generating a check code of a target server associated with an unlogged program in response to a request of jumping from a logged program to the unlogged program; sending the check code to the logged-in program; wherein the check code is used for enabling the logged-in program to jump to the unlogged-in program by adopting the check code, and enabling the unlogged-in program to initiate a check request by adopting the check code; under the condition that a verification request of not logging in the program is received, verifying the validity of a verification code in the verification request; generating an access token and sending the access token to the unlogged program under the condition that the validity verification of the check code in the check request is passed; wherein the access token is used for accessing the target server. According to the method and the device, the flexible login-free skipping between the programs can be realized on the premise of ensuring the safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet application technology, and in particular to methods, devices, systems, equipment, and media for controlling program behavior. Background Technology

[0002] As users' habits and pursuits change, applications are gradually becoming more lightweight.

[0003] Mini programs are a type of lightweight application that can run directly on specific platforms (such as mobile operating systems, social media, or browser environments) without the need for downloading or installation. When switching from a logged-in mini program to an unlogged-in mini program, login verification is required to use the functions normally.

[0004] In related technologies, mini-programs registered under the same applicant on the same platform can achieve login-free redirection within the mini-program group by setting up mini-program groups. However, this login-free redirection method has significant limitations, making it difficult to redirect between mini-programs registered under different applicants without login, which causes inconvenience to users. Summary of the Invention

[0005] In view of the above problems, methods, apparatus, systems, devices, and media for controlling procedural behavior to overcome or at least partially solve the above problems are proposed, including:

[0006] A method for controlling program behavior, the method comprising:

[0007] In response to a request to redirect from a logged-in program to an unlogged-in program, a verification code for the target server associated with the unlogged-in program is generated;

[0008] The verification code is sent to the logged-in program; wherein, the verification code is used by the logged-in program to redirect to the unlogged-in program and to enable the unlogged-in program to initiate a verification request using the verification code.

[0009] Upon receiving a verification request from the unlogged-in program, verify the validity of the verification code in the verification request;

[0010] If the verification code in the verification request passes the validity verification, an access token is generated and sent to the unlogged-in program; wherein, the access token is used to access the target server.

[0011] Optionally, the verification request further includes the identity key and first identification information of the unlogged-in program. Upon receiving the verification request from the unlogged-in program, the method further includes:

[0012] Based on the first identification information and the identity key, verify the legitimacy of the identity of the unlogged-in program;

[0013] If the verification code in the verification request passes the validity verification, an access token is generated and sent to the unlogged-in program, including:

[0014] If the legitimacy of the unlogged-in program's identity and the legitimacy of the verification code in the verification request are both verified, an access token is generated and sent to the unlogged-in program.

[0015] Optionally, generating the verification code for the target server associated with the unlogged-in program includes:

[0016] Obtain the second identification information of the target server, and generate the verification code based on the second identification information.

[0017] Optionally, the method further includes:

[0018] In response to the request from the unlogged-in program to obtain unified user identification information, the access token sent by the unlogged-in program is obtained;

[0019] The target unified user identification information is matched according to the access token, and the target unified user identification information is sent to the unlogged-in program; wherein, the target unified user identification information is used by the unlogged-in program to obtain target user data from the target server, and the target unified user identification information is associated with user data from other servers besides the target server.

[0020] Optionally, sending the verification code to the logged-in program includes:

[0021] Obtain the network and hardware metrics of the target server;

[0022] Based on the network indicator value and the hardware indicator value, the jump delay time is determined; wherein, the jump delay time is the time during which the logged-in program delays the jump to the unlogged-in program using the verification code;

[0023] The verification code and the redirection delay time are sent to the logged-in program.

[0024] Optionally, determining the hop delay time based on the network metric value and the hardware metric value includes:

[0025] The weights of the network metric value and the hardware metric value are determined respectively, and the network metric value and the hardware metric value are weighted and summed based on the weights to obtain the calculation result;

[0026] If the calculation result is greater than 0, the calculation result is determined as the jump delay time;

[0027] If the result of the calculation is less than or equal to 0, the jump delay time is set to 0.

[0028] A control system for program behavior, the system comprising:

[0029] The cloud server is used to respond to a request from a logged-in program to redirect to an unlogged-in program, generate a verification code for the target server associated with the unlogged-in program, and send the verification code to the logged-in program.

[0030] The logged-in program is used to redirect to the unlogged-in program using the verification code;

[0031] The unlogged-in program is used to initiate a verification request to the cloud server using the verification code;

[0032] The cloud server is also used to verify the validity of the verification code in the verification request when it receives a verification request from the unlogged-in program; and if the validity of the verification code in the verification request is verified, to generate an access token and send the access token to the unlogged-in program.

[0033] The unlogged-in program is also used to access the target server using the access token.

[0034] A device for controlling program behavior, the device comprising:

[0035] The verification code generation module is used to generate a verification code for the target server associated with the unlogged-in program in response to a request from a logged-in program to redirect to an unlogged-in program.

[0036] A verification code sending module is used to send the verification code to the logged-in program; wherein, the verification code is used by the logged-in program to redirect to the unlogged-in program and to enable the unlogged-in program to initiate a verification request using the verification code;

[0037] The verification code verification module is used to verify the validity of the verification code in the verification request when a verification request is received from the unlogged-in program.

[0038] An access token processing module is used to generate an access token and send the access token to the unlogged-in program if the verification code in the verification request passes the validity verification. The access token is used to access the target server.

[0039] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the program behavior described above.

[0040] A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, a method for controlling the program behavior as described above is provided.

[0041] The embodiments of the present invention have the following advantages: A verification code for the target server associated with the unlogged-in program is generated and sent to the logged-in program, allowing the logged-in program to use the verification code to redirect to the unlogged-in program. The unlogged-in program then uses the verification code to initiate a verification request. Neither the logged-in nor the unlogged-in program needs to expose its own user data or related authentication information through the verification code. When the verification code in the verification request passes verification, an access token is generated, allowing the unlogged-in program to access the target server. This achieves login-free redirection while ensuring user data security. Furthermore, this redirection method is more flexible and applicable, no longer limited by whether the logged-in and unlogged-in programs belong to the same applicant entity, thus improving the convenience of users using the application. Attached Figure Description

[0042] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart illustrating the steps of a method for controlling program behavior according to an embodiment of the present invention;

[0044] Figure 2 This is a flowchart illustrating the implementation of login-free redirection between mini-programs according to an embodiment of the present invention;

[0045] Figure 3 This is a flowchart illustrating the implementation of obtaining user information based on a unified user ID, according to an embodiment of the present invention.

[0046] Figure 4 This is a structural block diagram of a program behavior control device provided in an embodiment of the present invention. Detailed Implementation

[0047] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0048] Reference Figure 1 The diagram illustrates a flowchart of a method for controlling program behavior according to an embodiment of the present invention, which may specifically include the following steps:

[0049] Step 101: In response to a request to redirect from a logged-in program to an unlogged-in program, generate a verification code for the target server associated with the unlogged-in program;

[0050] A logged-in program may have permission to redirect to an unlogged-in program, but because the unlogged-in program has not performed authentication, the user does not yet have access to the target server associated with the unlogged-in program, meaning its functionality is limited. By generating a verification code for the target server, it can serve as a security credential, allowing the unlogged-in program to determine the legitimacy of the logged-in program's request to access the target server, and thus further request permission to access the target server.

[0051] In some examples, logged-in and logged-out programs can be lightweight applications, such as mini-programs, quick apps, etc.

[0052] In practice, the verification code can be generated based on relevant information of the target server, so that the verification code can be associated with and uniquely correspond to the target server.

[0053] In practical applications, the identity of logged-in programs can also be verified to determine their trustworthiness. If the identity verification of a logged-in program passes, a verification code for the target server associated with the unlogged-in program is generated; otherwise, the request from the logged-in program is rejected.

[0054] In some embodiments of the present invention, generating the verification code of the target server associated with the unlogged-in program includes:

[0055] Obtain the second identification information of the target server, and generate the verification code based on the second identification information.

[0056] In the specific implementation, the second identification information refers to the relevant information that can identify the target server. In the request for the logged-in program to jump to the unlogged-in program, the identity ID of the target server can be obtained, and then a verification code can be generated based on the identity ID.

[0057] In practical applications, the association between the second identification information and the verification code can be recorded and saved to ensure the accuracy and security of subsequent verification.

[0058] In this embodiment, a verification code is generated based on the second identification information of the target server. This allows the verification code to correspond one-to-one with the target server, ensuring that the purpose of the generated verification code is to verify the access behavior of the target server, thereby improving security.

[0059] Step 102: Send the verification code to the logged-in program; wherein, the verification code is used by the logged-in program to redirect to the unlogged-in program and to enable the unlogged-in program to initiate a verification request using the verification code;

[0060] In the specific implementation, after sending the verification code to the logged-in program, the logged-in program can carry the verification code to the unlogged-in program. After receiving the verification code, the unlogged-in program can use the verification code to initiate a verification request to determine whether the logged-in program has the relevant permissions to access the target server.

[0061] In some embodiments of the present invention, sending the verification code to the logged-in program includes:

[0062] Obtain the network and hardware metrics of the target server;

[0063] Based on the network indicator value and the hardware indicator value, the jump delay time is determined; wherein, the jump delay time is the time during which the logged-in program delays the jump to the unlogged-in program using the verification code;

[0064] The verification code and the redirection delay time are sent to the logged-in program.

[0065] Network metrics can be indicators that reflect the network status, such as network latency and packet loss rate; hardware metrics can be indicators that reflect the hardware status of the target server, such as CPU utilization and memory utilization.

[0066] In practice, the load of the target server can be determined by network and hardware metrics. Based on the load, the jump delay time can be determined in real time and dynamically, so that the logged-in mini-program library can avoid putting pressure on the target server's load based on the jump delay time.

[0067] In this embodiment, the jump delay time is determined based on network and hardware metrics. The verification code and the jump delay time are then sent to the logged-in program. This allows the logged-in program to delay the time it takes to jump to the unlogged-in program with the verification code, thus avoiding concentrated access to the target server and preventing network congestion and hardware program overload.

[0068] In some embodiments of the present invention, determining the jump delay time based on the network indicator value and the hardware indicator value includes:

[0069] The weights of the network metric value and the hardware metric value are determined respectively, and the network metric value and the hardware metric value are weighted and summed based on the weights to obtain the calculation result;

[0070] If the calculation result is greater than 0, the calculation result is determined as the jump delay time;

[0071] If the result of the calculation is less than or equal to 0, the jump delay time is set to 0.

[0072] In the implementation, the weights corresponding to the network and hardware metric values ​​can be predefined or dynamically generated. The network and hardware metric values ​​are then weighted and summed. If the result is greater than 0, it can be used as the jump delay time; if it is less than or equal to 0, it indicates that the logged-in mini-program does not need to delay the jump by carrying the verification code. The unit of the jump delay time can be seconds (s), microseconds (ms), or other time units.

[0073] In some examples, the jump delay time T can be obtained by the following formula:

[0074] T=max(0,w0+w1*t_delay+w2*c_used+w3*scout)

[0075] Where t_delay is the network latency, c_used is the CPU utilization, scout is the preset safety factor, w1, w2, and w3 are the weights corresponding to t_delay, c_used, and scout, respectively, and w0 is an independent weight factor.

[0076] In this embodiment, the jump delay time is determined by weighting the network and hardware metrics based on their corresponding weights. This allows for the quantification of the importance of different network and hardware metrics, resulting in a more accurate jump delay time that better reflects the actual situation.

[0077] Step 103: Upon receiving a verification request from the unlogged-in program, verify the validity of the verification code in the verification request;

[0078] In a practical implementation, the verification code generated in response to a request to redirect from a logged-in program to an unlogged-in program can be stored. Then, by comparing the verification code in the verification request with the locally stored verification code, the legitimacy of the verification code in the verification request can be verified, preventing the verification code from being tampered with during transmission.

[0079] Step 104: If the verification code in the verification request passes the validity verification, an access token is generated and sent to the unlogged-in program; wherein, the access token is used to access the target server.

[0080] When the verification code in the verification request passes the validity verification, it can be determined that the user who is redirected to the non-login program with the verification code has access to the target server. Then, an access token for the target server is generated as an authorization credential. After the user is redirected to the non-login program, the non-login program can use the access token to access the target server. The user can use the relevant functions of the non-login program normally without logging in, realizing login-free redirection.

[0081] In some embodiments of the present invention, the verification request further includes the identity key of the unlogged-in program and first identification information. Upon receiving the verification request from the unlogged-in program, the method further includes:

[0082] Based on the first identification information and the identity key, verify the legitimacy of the identity of the unlogged-in program;

[0083] If the verification code in the verification request passes the validity verification, an access token is generated and sent to the unlogged-in program, including:

[0084] If the legitimacy of the unlogged-in program's identity and the legitimacy of the verification code in the verification request are both verified, an access token is generated and sent to the unlogged-in program.

[0085] The first identification information refers to relevant information that can identify the unlogged-in program, such as the identity ID of the unlogged-in program, which reflects the uniqueness of the unlogged-in program; the identity key can be a key generated after the unlogged-in program has been authenticated in advance, which represents the legitimacy of the unlogged-in program's identity.

[0086] In a specific implementation, the identity key and verification code of the unlogged-in program can be queried through the first identification information. The legitimacy of the unlogged-in program's identity can be verified by comparing whether the locally stored identity key is consistent with the identity key attached to the verification request. Similarly, the legitimacy of the verification code attached to the verification request can be verified by comparing whether the locally stored verification code is consistent with the verification code attached to the verification request.

[0087] Furthermore, if the identity of the unlogged-in program and the verification code in the verification request are both verified, an access token is generated and sent to the unlogged-in program; otherwise, a verification failure result is returned to the unlogged-in program.

[0088] In this embodiment, by verifying the legitimacy of the identity of the unlogged-in program, it can be ensured that the verification request originates from the unlogged-in program redirected by the logged-in program, thereby further improving the security of the verification code verification.

[0089] In some embodiments of the present invention, the access token includes an expiration time, which is used by the target server to verify whether the access token is valid based on the expiration time.

[0090] In practice, an expiration time can be set for the generated access token, giving it a time limit. The target server can verify the validity of the access token based on the expiration time. If the current time exceeds the expiration time in the access token, the access token is deemed invalid.

[0091] In this embodiment, by setting an expiration time in the access token, user identity can be forced to be verified periodically, thereby improving security and reducing resource consumption.

[0092] In some embodiments of the present invention, the method further includes:

[0093] In response to the request from the unlogged-in program to obtain unified user identification information, the access token sent by the unlogged-in program is obtained;

[0094] The target unified user identification information is matched according to the access token, and the target unified user identification information is sent to the unlogged-in program; wherein, the target unified user identification information is used by the unlogged-in program to obtain target user data from the target server, and the target unified user identification information is associated with user data from other servers besides the target server.

[0095] Unified user identification information refers to information that allows users' data across multiple servers to be identified through a unified and unique set of information. For example, a unified user ID allows access to the user data of the user corresponding to that unified user ID across multiple different servers.

[0096] In the specific implementation, when a user is redirected to an unlogged-in application, and the unlogged-in application receives an access token, since the user is not logged in to the unlogged-in application, the target unified user identification information corresponding to the user can be obtained through the access token. Then, the target user data in the target server, such as user information, personalized settings, usage records, etc., can be obtained through the target unified user identification information.

[0097] Furthermore, the target unified user identification information is associated with user data on other servers besides the target server. Different applications can obtain the same target unified user identification information through their own access tokens, thereby corresponding to the user data of the same user. This allows users to access relevant resources without logging in and while corresponding to their own user data.

[0098] In this embodiment, by using unified user identification information, users can obtain the corresponding target user data in the target server without logging in. Furthermore, the unified user identification information is associated with user data in other servers besides the target server, which can avoid duplicate storage and redundancy, simplify user management, and reduce the cost of synchronizing and maintaining user data between servers associated with different applications.

[0099] The embodiments of the present invention have the following advantages: A verification code for the target server associated with the unlogged-in program is generated and sent to the logged-in program, allowing the logged-in program to use the verification code to redirect to the unlogged-in program. The unlogged-in program then uses the verification code to initiate a verification request. Neither the logged-in nor the unlogged-in program needs to expose its own user data or related authentication information through the verification code. When the verification code in the verification request passes verification, an access token is generated, allowing the unlogged-in program to access the target server. This achieves login-free redirection while ensuring user data security. Furthermore, this redirection method is more flexible and applicable, no longer limited by whether the logged-in and unlogged-in programs belong to the same applicant entity, thus improving the convenience of users using the application.

[0100] In some embodiments of the present invention, a control system for program behavior is also provided, comprising:

[0101] The cloud server is used to respond to a request from a logged-in program to redirect to an unlogged-in program, generate a verification code for the target server associated with the unlogged-in program, and send the verification code to the logged-in program.

[0102] The logged-in program is used to redirect to the unlogged-in program using the verification code;

[0103] The unlogged-in program is used to initiate a verification request to the cloud server using the verification code;

[0104] The cloud server is also used to verify the validity of the verification code in the verification request when it receives a verification request from the unlogged-in program; and if the validity of the verification code in the verification request is verified, to generate an access token and send the access token to the unlogged-in program.

[0105] The unlogged-in program is also used to access the target server using the access token.

[0106] In some examples, the process of implementing login-free redirection in a control system based on program behavior can be as follows: Figure 2 As shown, the original mini-program is a logged-in program, and the target mini-program is a logged-out program, specifically including:

[0107] 1) The original mini-program sends a redirect request to the cloud server;

[0108] After the original mini-program undergoes identity verification by the cloud server, it sends a redirect request to the cloud server for the target mini-program. The original mini-program already has the permission to redirect to the target mini-program, and this redirect request includes the identity ID of the target server associated with the target mini-program.

[0109] 2) The cloud server generates and saves the verification code;

[0110] After receiving the redirect request from the original mini-program, the cloud server parses the request, obtains the target server's identity ID, and generates a verification code based on the identity ID. To ensure the accuracy and security of subsequent verification, the cloud server generates and saves the association between the identity ID and the verification code.

[0111] 3) The original mini-program redirects to the target mini-program with a verification code;

[0112] After obtaining the verification code generated by the cloud server, the original mini-program uses a jump method that carries parameters between mini-programs to jump to the target mini-program with the verification code.

[0113] 4) The target mini-program sends a verification request to the cloud server;

[0114] After receiving the redirection request from the original mini-program, the target mini-program obtains the verification code and sends a verification request to the cloud server. The verification request includes the target mini-program's identity ID, identity key, and verification code. The identity ID is used to identify the uniqueness of the target mini-program, and the identity key is a security key pre-agreed between the target mini-program and the cloud server, used to verify the legitimacy of the target mini-program's identity.

[0115] 5) The cloud server performs identity verification;

[0116] The cloud server parses the verification request to obtain the identity ID, identity key, and verification code; it verifies the legitimacy of the target mini-program's identity based on the identity ID and identity key; it obtains the corresponding verification code based on the identity ID and pre-stored association relationships, and determines whether the received verification code matches the stored verification code to verify the accuracy of the verification code.

[0117] 6) The cloud server generates and returns an access token.

[0118] Once the cloud server completes the identity verification of the target mini-program and the verification is successful, it generates an access token for the target mini-program. The access token serves as the authorization credential for the target mini-program to access relevant resources on the target server in the future, and it is unique and time-sensitive. The cloud server returns the generated access token to the target mini-program, and the target mini-program performs subsequent business operations based on the access token.

[0119] In another example, after the target mini-program obtains the access token, it can use the access token to obtain the unified user ID, and then use the unified user ID to retrieve the corresponding user information from the target server, such as... Figure 3 As shown, the specific process includes:

[0120] 1) The target mini-program obtains the unified user ID based on the access token;

[0121] A unified user ID is preset on the cloud server and is used to identify a unique user. It can also be used as a login username.

[0122] 2) The target mini-program obtains user information based on the unified user ID;

[0123] User information is pre-set on the target server associated with the target mini-program, including user operation permissions and other information unique to the target mini-program. The user information is uniquely associated with the unified user ID, and the target mini-program can obtain unique user information based on the unified user ID.

[0124] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0125] Reference Figure 4 The diagram shows a schematic representation of a program behavior control device according to an embodiment of the present invention, which may specifically include the following modules:

[0126] The verification code generation module 401 is used to generate a verification code for the target server associated with the unlogged-in program in response to a request from a logged-in program to redirect to an unlogged-in program.

[0127] The verification code sending module 402 is used to send the verification code to the logged-in program; wherein, the verification code is used by the logged-in program to redirect to the unlogged-in program and to enable the unlogged-in program to initiate a verification request using the verification code;

[0128] The verification code verification module 403 is used to verify the legality of the verification code in the verification request when a verification request is received from the unlogged-in program.

[0129] The access token processing module 404 is used to generate an access token and send the access token to the unlogged-in program if the verification code in the verification request passes the validity verification; wherein the access token is used to access the target server.

[0130] In some embodiments of the present invention, the verification request further includes the identity key of the unlogged-in program and first identification information, and the device further includes:

[0131] The identity verification module is used to verify the identity of the unlogged-in program based on the first identification information and the identity key when receiving a verification request from the unlogged-in program.

[0132] Access token processing module 404 includes:

[0133] The access token processing submodule is used to generate an access token and send the access token to the unlogged-in program if both the identity of the unlogged-in program and the validity of the verification code in the verification request are verified.

[0134] In some embodiments of the present invention, the access token processing module 404 further includes:

[0135] The access token generation submodule is used to obtain the second identification information of the target server and generate the verification code based on the second identification information.

[0136] In some embodiments of the present invention, the apparatus further includes:

[0137] The user identification information request processing module is used to obtain the access token sent by the unlogged-in program in response to the request of the unlogged-in program to obtain unified user identification information.

[0138] The target unified user identification information processing module is used to match target unified user identification information according to the access token and send the target unified user identification information to the unlogged-in program; wherein, the target unified user identification information is used by the unlogged-in program to obtain target user data from the target server, and the target unified user identification information is associated with user data from other servers besides the target server.

[0139] In some embodiments of the present invention, the verification code sending module 402 includes:

[0140] The indicator value acquisition submodule is used to acquire the network indicator value and hardware indicator value of the target server;

[0141] The jump delay time determination submodule is used to determine the jump delay time based on the network indicator value and the hardware indicator value; wherein, the jump delay time is the time for the logged-in program to delay using the verification code to jump to the unlogged-in program;

[0142] The verification code and redirection delay time sending submodule is used to send the verification code and the redirection delay time to the logged-in program.

[0143] In some embodiments of the present invention, the jump delay time determination submodule includes:

[0144] The computation processing unit is used to determine the weights of the network indicator value and the hardware indicator value respectively, and to perform a weighted summation of the network indicator value and the hardware indicator value based on the weights to obtain the computation result;

[0145] The first result processing unit is configured to determine the calculation result as the jump delay time if the calculation result is greater than 0.

[0146] The second result processing unit is used to determine the jump delay time as 0 if the calculation result is less than or equal to 0.

[0147] In some embodiments of the present invention, the access token includes an expiration time, which is used by the target server to verify whether the access token is valid based on the expiration time.

[0148] Some embodiments of the present invention also provide an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, a control method for implementing the above-mentioned program behavior includes:

[0149] In response to a request to redirect from a logged-in program to an unlogged-in program, a verification code for the target server associated with the unlogged-in program is generated;

[0150] The verification code is sent to the logged-in program; wherein, the verification code is used by the logged-in program to redirect to the unlogged-in program and to enable the unlogged-in program to initiate a verification request using the verification code;

[0151] Upon receiving a verification request from the unlogged-in program, verify the validity of the verification code in the verification request;

[0152] If the verification code in the verification request passes the validity verification, an access token is generated and sent to the unlogged-in program; wherein, the access token is used to access the target server.

[0153] Optionally, the verification request further includes the identity key and first identification information of the unlogged-in program. Upon receiving the verification request from the unlogged-in program, the method further includes:

[0154] Based on the first identification information and the identity key, verify the legitimacy of the identity of the unlogged-in program;

[0155] If the verification code in the verification request passes the validity verification, an access token is generated and sent to the unlogged-in program, including:

[0156] If the legitimacy of the unlogged-in program's identity and the legitimacy of the verification code in the verification request are both verified, an access token is generated and sent to the unlogged-in program.

[0157] Optionally, generating the verification code for the target server associated with the unlogged-in program includes:

[0158] Obtain the second identification information of the target server, and generate the verification code based on the second identification information.

[0159] Optionally, the method further includes:

[0160] In response to the request from the unlogged-in program to obtain unified user identification information, the access token sent by the unlogged-in program is obtained;

[0161] The target unified user identification information is matched according to the access token, and the target unified user identification information is sent to the unlogged-in program; wherein, the target unified user identification information is used by the unlogged-in program to obtain target user data from the target server, and the target unified user identification information is associated with user data from other servers besides the target server.

[0162] Optionally, sending the verification code to the logged-in program includes:

[0163] Obtain the network and hardware metrics of the target server;

[0164] Based on the network indicator value and the hardware indicator value, the jump delay time is determined; wherein, the jump delay time is the time during which the logged-in program delays the jump to the unlogged-in program using the verification code;

[0165] The verification code and the redirection delay time are sent to the logged-in program.

[0166] Optionally, determining the hop delay time based on the network metric value and the hardware metric value includes:

[0167] The weights of the network metric value and the hardware metric value are determined respectively, and the network metric value and the hardware metric value are weighted and summed based on the weights to obtain the calculation result;

[0168] If the calculation result is greater than 0, the calculation result is determined as the jump delay time;

[0169] If the result of the calculation is less than or equal to 0, the jump delay time is set to 0.

[0170] Optionally, the access token includes an expiration time, which is used by the target server to verify whether the access token is valid based on the expiration time.

[0171] Some embodiments of the present invention also provide a computer-readable storage medium storing a computer program, and a control method for implementing the above-mentioned program behavior when the computer program is executed by a processor, including:

[0172] In response to a request to redirect from a logged-in program to an unlogged-in program, a verification code for the target server associated with the unlogged-in program is generated;

[0173] The verification code is sent to the logged-in program; wherein, the verification code is used by the logged-in program to redirect to the unlogged-in program and to enable the unlogged-in program to initiate a verification request using the verification code;

[0174] Upon receiving a verification request from the unlogged-in program, verify the validity of the verification code in the verification request;

[0175] If the verification code in the verification request passes the validity verification, an access token is generated and sent to the unlogged-in program; wherein, the access token is used to access the target server.

[0176] Optionally, the verification request further includes the identity key and first identification information of the unlogged-in program. Upon receiving the verification request from the unlogged-in program, the method further includes:

[0177] Based on the first identification information and the identity key, verify the legitimacy of the identity of the unlogged-in program;

[0178] If the verification code in the verification request passes the validity verification, an access token is generated and sent to the unlogged-in program, including:

[0179] If the legitimacy of the unlogged-in program's identity and the legitimacy of the verification code in the verification request are both verified, an access token is generated and sent to the unlogged-in program.

[0180] Optionally, generating the verification code for the target server associated with the unlogged-in program includes:

[0181] Obtain the second identification information of the target server, and generate the verification code based on the second identification information.

[0182] Optionally, the method further includes:

[0183] In response to the request from the unlogged-in program to obtain unified user identification information, the access token sent by the unlogged-in program is obtained;

[0184] The target unified user identification information is matched according to the access token, and the target unified user identification information is sent to the unlogged-in program; wherein, the target unified user identification information is used by the unlogged-in program to obtain target user data from the target server, and the target unified user identification information is associated with user data from other servers besides the target server.

[0185] Optionally, sending the verification code to the logged-in program includes:

[0186] Obtain the network and hardware metrics of the target server;

[0187] Based on the network indicator value and the hardware indicator value, the jump delay time is determined; wherein, the jump delay time is the time during which the logged-in program delays the jump to the unlogged-in program using the verification code;

[0188] The verification code and the redirection delay time are sent to the logged-in program.

[0189] Optionally, determining the hop delay time based on the network metric value and the hardware metric value includes:

[0190] The weights of the network metric value and the hardware metric value are determined respectively, and the network metric value and the hardware metric value are weighted and summed based on the weights to obtain the calculation result;

[0191] If the calculation result is greater than 0, the calculation result is determined as the jump delay time;

[0192] If the result of the calculation is less than or equal to 0, the jump delay time is set to 0.

[0193] Optionally, the access token includes an expiration time, which is used by the target server to verify whether the access token is valid based on the expiration time.

[0194] Some embodiments of the present invention also provide a computer program product, including a computer program, and a method for controlling the above-described program behavior when the computer program is executed by a processor.

[0195] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0196] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0197] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0198] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0199] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0200] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0201] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0202] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0203] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.

[0204] The above provides a detailed description of the methods, devices, systems, equipment, and media for controlling program behavior. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method of controlling program behavior, characterized by, The method comprises: in response to a request of jumping from a logged-in program to a non-logged-in program, generating a verification code of a target server associated with the non-logged-in program; sending the verification code to the logged-in program; wherein the verification code is used for the logged-in program to jump to the non-logged-in program by using the verification code, and for the non-logged-in program to initiate a verification request by using the verification code; in the case of receiving the verification request of the non-logged-in program, verifying the legality of the verification code in the verification request; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program; wherein the access token is used for accessing the target server.

2. The method of claim 1, wherein, The verification request also carries the identity key and the first identification information of the non-logged-in program, and in the case of receiving the verification request of the non-logged-in program, the method further comprises: based on the first identification information and the identity key, verifying the identity legality of the non-logged-in program; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program, comprising: in the case of passing the verification of the identity legality of the non-logged-in program and the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program.

3. The method of claim 1, wherein, The method further comprises: in response to a request of jumping from a logged-in program to a non-logged-in program, generating a verification code of a target server associated with the non-logged-in program; 4. The method of claim 1, wherein, sending the verification code to the logged-in program; wherein the verification code is used for the logged-in program to jump to the non-logged-in program by using the verification code, and for the non-logged-in program to initiate a verification request by using the verification code; in the case of receiving the verification request of the non-logged-in program, verifying the legality of the verification code in the verification request; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program; wherein the access token is used for accessing the target server.

5. The method of claim 1, wherein, The verification request also carries the identity key and the first identification information of the non-logged-in program, and in the case of receiving the verification request of the non-logged-in program, the method further comprises: based on the first identification information and the identity key, verifying the identity legality of the non-logged-in program; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program, comprising: in the case of passing the verification of the identity legality of the non-logged-in program and the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program.

6. The method of claim 5, wherein, The method further comprises: in response to a request of jumping from a logged-in program to a non-logged-in program, generating a verification code of a target server associated with the non-logged-in program; sending the verification code to the logged-in program; wherein the verification code is used for the logged-in program to jump to the non-logged-in program by using the verification code, and for the non-logged-in program to initiate a verification request by using the verification code; in the case of receiving the verification request of the non-logged-in program, verifying the legality of the verification code in the verification request; 7. A system for controlling program behavior, characterized by in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program; wherein the access token is used for accessing the target server. The verification request also carries the identity key and the first identification information of the non-logged-in program, and in the case of receiving the verification request of the non-logged-in program, the method further comprises: based on the first identification information and the identity key, verifying the identity legality of the non-logged-in program; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program, comprising: in the case of passing the verification of the identity legality of the non-logged-in program and the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program. The method further comprises: in response to a request of jumping from a logged-in program to a non-logged-in program, generating a verification code of a target server associated with the non-logged-in program; sending the verification code to the logged-in program; wherein the verification code is used for the logged-in program to jump to the non-logged-in program by using the verification code, and for the non-logged-in program to initiate a verification request by using the verification code; in the case of receiving the verification request of the non-logged-in program, verifying the legality of the verification code in the verification request; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program; wherein the access token is used for accessing the target server. The verification request also carries the identity key and the first identification information of the non-logged-in program, and in the case of receiving the verification request of the non-logged-in program, the method further comprises: based on the first identification information and the identity key, verifying the identity legality of the non-logged-in program; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program, comprising: in the case of passing the verification of the identity legality of the non-logged-in program and the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program. The method further comprises: in response to a request of jumping from a logged-in program to a non-logged-in program, generating a verification code of a target server associated with the non-logged-in program; sending the verification code to the logged-in program; wherein the verification code is used for the logged-in program to jump to the non-logged-in program by using the verification code, and for the non-logged-in program to initiate a verification request by using the verification code; in the case of receiving the verification request of the non-logged-in program, verifying the legality of the verification code in the verification request; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program; wherein the access token is used for accessing the target server. The verification request also carries the identity key and the first identification information of the non-logged-in program, and in the case of receiving the verification request of the non-logged-in program, the method further comprises: based on the first identification information and the identity key, verifying the identity legality of the non-logged-in program; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program, comprising: in the case of passing the verification of the identity legality of the non-logged-in program and the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program. The method further comprises: in response to a request of jumping from a logged-in program to a non-logged-in program, generating a verification code of a target server associated with the non-logged-in program; sending the verification code to the logged-in program; wherein the verification code is used for the logged-in program to jump to the non-logged-in program by using the verification code, and for the non-logged-in program to initiate a verification request by using the verification code; in the case of receiving the verification request of the non-logged-in program, verifying the legality of the verification code in the verification request; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program; wherein the access token is used for accessing the target server. The verification request also carries the identity key and the first identification information of the non-logged-in program, and in the case of receiving the verification request of the non-logged-in program, the method further comprises: based on the first identification information and the identity key, verifying the identity legality of the non-logged-in program; in the case of passing the verification of the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program, comprising: in the case of passing the verification of the identity legality of the non-logged-in program and the legality of the verification code in the verification request, generating an access token and sending the access token to the non-logged-in program. The method further comprises: in response to a request of jumping from a logged-in program to a non-logged-in program, generating a verification code of a target server associated with the non-logged-in program; sending the verification code to the logged-in program; wherein the verification code is used for the logged-in program to jump to the non-logged-in program by using the verification code, and for the non-logged-in program to initiate a verification request by using the verification code; in the case of receiving the verification request The cloud server is configured to generate a check code of a target server associated with the unlogged program and send the check code to the logged program in response to a request of the logged program to jump to the unlogged program; The logged program is configured to jump to the unlogged program by using the check code; The unlogged program is configured to initiate a check request to the cloud server by using the check code; The cloud server is further configured to verify the legality of the check code in the check request when the check request of the unlogged program is received, and generate an access token and send the access token to the unlogged program when the legality of the check code in the check request is verified; The unlogged program is further configured to access the target server by using the access token.

8. A control device of program behavior, characterized by, The device comprises: A check code generation module configured to generate a check code of a target server associated with the unlogged program in response to a request of the logged program to jump to the unlogged program; A check code sending module configured to send the check code to the logged program; wherein the check code is used by the logged program to jump to the unlogged program by using the check code, and used by the unlogged program to initiate a check request by using the check code; A check code verification module configured to verify the legality of the check code in the check request when the check request of the unlogged program is received; An access token processing module configured to generate an access token and send the access token to the unlogged program when the legality of the check code in the check request is verified; wherein the access token is used to access the target server.

9. An electronic device, comprising: A computer program is stored on the computer readable storage medium and is capable of being run on the processor, and the computer program is executed by the processor to implement the control method of the program behavior according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer readable storage medium and is capable of being run on the processor, and the computer program is executed by the processor to implement the control method of the program behavior according to any one of claims 1 to 6.