Mini program login method and electronic device
By introducing a comparison mechanism between the first verification code and the second verification code during the login process of the applet, and combining the verification of password and SMS verification code, the problem of low security of the existing applet login information is solved, which significantly improves the security and privacy of the login process.
Patent Information
- Application Number
- CN202210521172.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-13
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-05-13
AI Technical Summary
The information of the existing applet login method is low in security and is easily stolen or tampered with, resulting in information leakage in the applet.
By establishing an additional verification mechanism between the first server and the second server, using the comparison of the first verification code and the second verification code, it is ensured that the terminal logs into the applet only when the first verification code and the second verification code are consistent, and the verification steps of the password and SMS verification code are added if necessary.
It improves the information security of mini-program login, reduces the risk of information leakage, and ensures the privacy and security of the login process.
Smart Images

Figure CN114978642B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a mini-program login method and electronic device. Background Art
[0002] WeChat Mini Program (WMP) is a program that relies on an application (APP) and does not require downloading and installation to use. It is easy to use and highly convenient.
[0003] However, the current information for logging into the mini-program has low security (e.g., it is easy to be stolen, tampered with, etc.), which makes the information in the mini-program easy to leak and has low security. Summary of the invention
[0004] The present application provides a mini-program login method and electronic device to solve the problem of low security of information used to log in to the mini-program.
[0005] In a first aspect, the present application provides a method for logging into a mini-program, including:
[0006] The first server receives a login request for logging into the mini-program from the first terminal, wherein the login request carries a first user account and a first verification code marked with a first identifier, the first identifier is used to indicate that the first verification code is associated with a first interface of a first application of the second terminal, and the first interface is displayed after the second server that manages the first application successfully logs into the first application through the second user account and password;
[0007] The first server obtains a second verification code carrying the first identifier from the second server;
[0008] When the first server determines that the first verification code and the second verification code are consistent, the first server assists the first terminal in logging into the mini-program based on the first user account.
[0009] The mini-program login method provided by the present application is associated with a first verification code because the first interface is displayed to the user only after the second server that manages the first application successfully logs in to the first application through the second user account and password. In this way, the first verification code has a certain degree of privacy and is not easy to be stolen. In this way, when the first server detects that the first verification code carries the first identifier, it obtains the second verification code carrying the first identifier from the second server that manages the first application. Furthermore, when the first server determines that the first verification code and the second verification code are consistent, the first server assists the first terminal to log in to the mini-program according to the first user account. Since the first verification code has a certain degree of privacy, the mini-program is logged in only after the first verification code is verified, so that the information in the mini-program is not easily leaked and has high security.
[0010] In an optional implementation manner, the second verification code is updated by the second server once every preset time period.
[0011] Since the second verification code is updated periodically, the privacy of the second verification code is higher.
[0012] In an optional implementation, the login request also carries a first parameter. When the first server determines that the first verification code and the second verification code are consistent, and the first parameter carried in the login request is consistent with a preset first parameter, the first server assists the first terminal in logging into the mini program based on the first user account.
[0013] In this way, in addition to verifying the first verification code, the condition for logging into the mini program also requires verifying the first parameter, which further makes it difficult for information in the mini program to be leaked, and has high security.
[0014] In an optional implementation, the first parameter is a password associated with the first user account;
[0015] And / or a third verification code and the third verification code is associated with the first serial number, wherein the third verification code is sent by the first server to the first terminal in the form of a text message in response to the first request sent by the first terminal.
[0016] In an optional implementation manner, the above method further includes:
[0017] When the first server determines that the login behavior is abnormal, the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset period of time.
[0018] In this way, the information in the mini program can be further prevented from being leaked and the security is high.
[0019] In an optional implementation manner, the first server determines that the login behavior is abnormal, including:
[0020] When the number of times that the second verification code is inconsistent with the first verification code from the same first terminal is greater than a preset threshold, the first server determines that the login behavior is abnormal;
[0021] Alternatively, when the number of times that the second verification code is inconsistent with the first verification code within a preset time period is greater than a preset threshold, the first server determines that the login behavior is abnormal;
[0022] When the number of inconsistencies between the first verification code and the second verification code within a preset time period is greater than a preset threshold, the first server determines that the login behavior is abnormal.
[0023] In an optional implementation, the first user account and the first verification code marked with the first identifier are encrypted, and before the first server obtains the second verification code carrying the first identifier from the second server that manages the first application, the method further includes:
[0024] The first server decrypts the first user account and the first verification code marked with the first identifier.
[0025] In this way, since the first user account and the first verification code are encrypted during the transmission process, the first user account and the first verification code are not easily leaked, which further makes the information in the mini program not easily leaked and has high security.
[0026] In an optional implementation, when the first server determines that the first verification code and the second verification code are consistent, after assisting the first terminal to log in to the mini-program based on the first user account, the method further includes:
[0027] The first server generates a first random number;
[0028] The first server sends a first random number to the first terminal;
[0029] The first server receives an operation instruction from the first terminal, where the operation instruction carries a second random number;
[0030] When the first random number and the second random number are consistent, the first server controls the first terminal to execute a function associated with the operation instruction.
[0031] In this way, the operating functions within the mini program can be made more secure.
[0032] In a second aspect, the present application also provides a mini-program login device, including:
[0033] The communication unit is used to receive a login request for logging into the mini-program from the first terminal, wherein the login request carries a first user account and a first verification code marked with a first identifier, and the first identifier is used to indicate that the first verification code is associated with a first interface of a first application of the second terminal, and the first interface is displayed after the second server that manages the first application successfully logs into the first application through the second user account and password. The communication unit is also used to obtain a second verification code carrying the first identifier from the second server. The processing unit is used to assist the first terminal in logging into the mini-program according to the first user account when it is determined that the first verification code and the second verification code are consistent.
[0034] In the third aspect, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device executes the method for logging into a mini-program as provided in the first aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0036] Figure 1 One of the interface schematic diagrams of the first interface provided in the embodiment of the present application;
[0037] Figure 2 One of the flowcharts of the mini-program login method provided in the embodiment of the present application;
[0038] Figure 3 The second interface diagram of the first interface provided in the embodiment of the present application;
[0039] Figure 4 The third interface diagram of the first interface provided in the embodiment of the present application;
[0040] Figure 5 One of the flowcharts of the mini-program login method provided in the embodiment of the present application;
[0041] Figure 6 A schematic diagram of the functional modules of the mini-program login device provided in an embodiment of the present application;
[0042] Figure 7 A circuit block diagram of an electronic device provided in an embodiment of the present application.
[0043] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0045] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0046] The embodiment of the present application provides a small program login method, which is applied to the first server 200. The first server 200 is respectively connected to the first terminal and the second server 300, and the second server 300 is connected to the second terminal. Below, the small program login method provided by the embodiment of the present application is described by taking the first terminal as the mobile phone 100 and the second terminal as the computer 400.
[0047] Among them, the mobile phone 100 is installed with a second application (such as the second application can be WeChat, etc.), and the second application can call a small program, for example. Among them, the small program can be a bank small program, such as "Cloud Quick Pass", "Licaitong", etc.
[0048] In some embodiments, the mobile phone 100 displays the second interface 101 of the second application, and the second interface 101 includes a search box (not shown in the drawings). The mobile phone 100 receives the name of the mini-program (such as Wealth Management) entered by the user in the search box, searches for the mini-program, and displays the icon of the searched mini-program on the second interface 101. The mobile phone 100 can detect whether the mini-program is logged in in response to the user clicking the icon of the mini-program, and if not logged in, display the second interface 101 (also referred to as the login interface).
[0049] In some other embodiments, the mobile phone 100 can scan the QR code storing the information of the mini program in response to the user clicking the scan code button in the second interface 101. After the scan is successful, the mobile phone 100 displays the icon of the searched mini program on the second interface 101. The mobile phone 100 can detect whether the mini program is logged in in response to the user clicking the icon of the mini program, and if not, display the second interface 101 (also called the login interface).
[0050] For example, Figure 1 As shown, the second interface 101 includes an input box for inputting a user account, an input box for inputting a dynamic verification code, and a login button 102 .
[0051] like Figure 2 As shown, the mini-program login method provided in the embodiment of the present application includes:
[0052] S301: The first server 200 receives a login request from the mobile phone 100 for logging into a small program.
[0053] Among them, the login request carries a first user account and a first verification code marked with a first identifier, the first identifier is used to indicate that the first verification code is associated with the first interface of the first application of the second terminal, and the first interface is displayed after the second server 300 that manages the first application successfully logs in to the first application through the second user account and password.
[0054] In some embodiments, the mobile phone 100 can encrypt the first user account and the first verification code marked with the first identifier to improve the security of the first user account and the first verification code during transmission. The encryption method can use a symmetric encryption algorithm AES (Advanced Encryption Standard) or an asymmetric encryption algorithm, which is not limited here.
[0055] It should be noted that, before the above S301, the computer 400 can display a login interface (not shown in the figure) of the first application (such as the user's office application). The computer 400 can receive the second user account and password entered by the user on the login interface, and send the second user account and password to the second server 300. After the second server 300 verifies the second user account and password, it logs in to the first application. The computer 400 can display the first interface of the first application in response to the user's operation, and the first interface displays a first verification code.
[0056] In this way, the user browses to the first verification code on the first interface. Figure 3 As shown, the mobile phone 100 can receive the first user account (i.e., the account for logging into the mini program) input by the user in the input box for inputting the user account, and the first verification code browsed on the first interface. In response to the user clicking the login button 102, the mobile phone 100 can send a login request for logging into the mini program to the first server 200. In this way, the first server 200 can receive the login request from the mobile phone 100.
[0057] S302: After detecting that the login request includes the first verification code carrying the first identifier, the first server 200 obtains the second verification code carrying the first identifier from the second server 300.
[0058] The second verification code can be updated by the second server 300 every preset time (such as 3 minutes, 5 minutes). Since the second verification code is updated periodically, the privacy of the second verification code is higher. It should be noted that the first verification code displayed in the first interface of the computer 400 is the same as the second verification code stored in the second server 300.
[0059] It should be noted that when the first user account and the first verification code marked with the first identifier are encrypted, before the second server 300 obtains the second verification code carrying the first identifier, the first user account and the first verification code marked with the first identifier need to be decrypted.
[0060] S303: When the first server 200 determines that the first verification code and the second verification code are consistent, the first server 200 assists the mobile phone 100 in logging into the mini program according to the first user account.
[0061] The mini-program login method provided in the present application is associated with a first verification code because the first interface is displayed to the user only after the second server 300 that manages the first application successfully logs in to the first application through the second user account and password. In this way, the first verification code has a certain degree of privacy, is not easy to be stolen, tampered with, etc., and has high security. In this way, when the first server 200 detects that the first verification code carries the first identifier, it obtains the second verification code carrying the first identifier from the second server 300 that manages the first application. Furthermore, when the first server 200 determines that the first verification code and the second verification code are consistent, the first server 200 assists the mobile phone 100 to log in to the mini-program according to the first user account. Since the first verification code has a certain degree of privacy, the mobile phone 100 is assisted to log in to the mini-program only after the first verification code is verified, so that the information in the mini-program is not easy to leak, and the security is high.
[0062] In addition, if Figure 4 As shown, the second interface 101 may also include an input box for inputting a password. In this way, after the mobile phone 100 responds to the user's click operation on the login button 102, the login request sent to the first server 200 also carries the password. In this way, when the first server 200 determines that the first verification code and the second verification code are consistent, and the password carried in the login request is consistent with the preset password associated with the first user account, the mobile phone 100 is assisted to log in to the mini program according to the first user account. In this way, in addition to the verification of the first verification code, the condition for logging into the mini program also requires the verification of the password, which further makes it difficult for the information in the mini program to be leaked, and the security is high.
[0063] In addition, Figure 4As shown, the second interface 101 may also include an input box for inputting a text message verification code, and a get button. Before the above-mentioned S301, the mobile phone 100 may send a first request to the first server 200 in response to the user's click operation on the get button in the second interface 101, and the first request is used to request a text message verification code. The first server 200 sends a text message carrying a third verification code (i.e., a text message verification code) to the mobile phone 100 in response to the first request. Among them, the third verification code is associated with a first serial number. In this way, the mobile phone 100 can display the text message carrying the third verification code to the user. After the user browses to the third verification code on the mobile phone 100, the user can enter the third verification code in the input box for inputting the text message verification code. In this way, after the mobile phone 100 responds to the user's click operation on the login button 102, the login request sent to the first server 200 also carries the third verification code and the first serial number. When the first server 200 determines that the first verification code is consistent with the second verification code, the third verification code issued is consistent with the third verification code input, and the first serial number issued is consistent with the first serial number associated with the third verification code input, the auxiliary mobile phone 100 logs in to the mini program according to the first user account. In this way, in addition to the first verification code verification, the third verification code verification is also required to log in to the mini program, which further makes it difficult for information in the mini program to be leaked, and the security is high.
[0064] It should be noted that the above-mentioned password, third verification code and first serial number may also be referred to as first parameters.
[0065] In this way, since the first user account and the first verification code are encrypted during the transmission process, the first user account and the first verification code are not easily leaked, which further makes the information in the mini program not easily leaked and has high security.
[0066] In addition, after S304, the mini-program login method provided in the embodiment of the present application may further include:
[0067] S304: The first server 200 generates a first random number.
[0068] The first random number may also be called a token value, which is used to verify the user's operation instructions on the mini program.
[0069] S305: The first server 200 sends a first random number to the mobile phone 100.
[0070] After receiving the first random number, the mobile phone 100 stores the first random number. It should be noted that after receiving the first random number, the mobile phone 100 can feed back a response message to the first server 200. When the first server 200 does not receive a response message from the mobile phone 100 within the preset time length of sending the first random number, it resends the third random number to the mobile phone 100.
[0071] S306: The first server 200 receives an operation instruction from the mobile phone 100, where the operation instruction carries a second random number.
[0072] Among them, the operation instruction can be a payment instruction, an instruction to switch to the next interface, or an instruction to return to the previous interface, etc., which is not limited here.
[0073] S307: When the first random number and the second random number are consistent, the first server 200 controls the mobile phone 100 to execute a function associated with the operation instruction.
[0074] Exemplarily, when the operation instruction is a payment instruction, the function associated with the operation instruction is the payment function; when the operation instruction is an instruction to switch to the next interface, the function associated with the operation instruction is the function to switch to the next interface; when the operation instruction is an instruction to return to the previous interface, the function associated with the operation instruction is the function to return to the previous interface.
[0075] Since the first server 200 controls the mobile phone 100 to execute the function associated with the operation instruction only when the first random number and the second random number are consistent, the operation function in the mini program can be made more secure.
[0076] In addition, the method provided in the embodiment of the present application also includes:
[0077] When the first server 200 determines that the second verification code is inconsistent with the first verification code from the same mobile phone 100 for more than a preset threshold (such as 3 or 5 times), the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset period of time. This method can be called anti-explosion.
[0078] Or, when the first server 200 determines that the number of times the second verification code is inconsistent with the first verification code within a preset time period is greater than a preset threshold (such as 3 times or 5 times), the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset time period. This method can be called anti-spraying.
[0079] Or, when the first server 200 determines that the number of inconsistencies between the first verification code and the second verification code within a preset time period is greater than a preset threshold (such as 3 or 5 times), the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset time period. This method can be called risk monitoring.
[0080] In this way, the information in the mini program can be further prevented from being leaked and the security is high.
[0081] In a possible implementation, when the first server 200 determines that the first verification code and the second verification code are consistent, after logging into the mini-program according to the first user account, it also includes: the first server 200 records the time and IP address of logging into the mini-program (ie, a login log).
[0082] It is understandable that each time a mini program is logged in, the first server 200 will record the time and IP address of logging in to the mini program. In this way, a login log for the mini program can be formed. In this way, it is convenient for users to trace back the historical records of logging in to the mini program.
[0083] In addition, when the first server 200 determines according to the login log that the number of successful logins to the mini program within the preset time period is greater than a preset threshold, the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset time period;
[0084] Alternatively, when the first server 200 determines according to the login log that the IP addresses of two adjacent logins are different, the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset period of time.
[0085] In this way, the information in the mini program can be further prevented from being leaked and the security is high.
[0086] It can be understood that the above-mentioned execution conditions of freezing the first user account, and / or issuing an alarm, and / or banning the first user account for a preset period of time can all be understood as determining that the login behavior is abnormal on the first server.
[0087] It should be noted that if Figure 5 As shown, the above-mentioned mini-program login method can be summarized as the following steps: mobile phone 100 detects whether the mini-program is logged in, and if not, displays the login interface of the mini-program. The mobile phone sends a login request to the first server, and the login request carries a first verification code, a password, a third verification code, and a first serial number. The first server verifies the first verification code, the password, the third verification code, and the first serial number. When the first server succeeds in the verification, it detects whether the login behavior is abnormal. Among them, the method of detecting whether the login behavior is abnormal may include: anti-blasting, anti-spraying, calendar recording, and risk monitoring. When the first server fails in the verification, it returns to the step of displaying the login interface of the mini-program.
[0088] like Figure 6 As shown, the present application also provides a small program login device 600, which is applied to the first server 200. Figure 1As shown, the first server 200 is respectively connected to the first terminal and the second server 300 in communication, and the second server 300 is connected to the second terminal in communication. It should be noted that the basic principle and technical effect of the mini-program login device 600 provided in the embodiment of the present application are the same as those in the above embodiment. For the sake of brief description, the parts not mentioned in the embodiment of the present application can refer to the corresponding contents in the above embodiment. The mini-program login device 600 provided in the present application includes:
[0089] The communication unit 601 is used to receive a login request for logging into a mini-program from a first terminal.
[0090] Among them, the login request carries a first user account and a first verification code marked with a first identifier, the first identifier is used to indicate that the first verification code is associated with the first interface of the first application of the second terminal, and the first interface is displayed after the second server 300 that manages the first application successfully logs in to the first application through the second user account and password.
[0091] The communication unit 601 is further configured to obtain a second verification code carrying the first identifier from the second server 300 .
[0092] In a possible implementation manner, the second verification code is updated by the second server 300 once every preset time period.
[0093] The processing unit 602 is used to assist the first terminal to log in to the mini program according to the first user account when it is determined that the first verification code and the second verification code are consistent.
[0094] In a possible implementation, the login request also carries a password, and the processing unit 602 is specifically used to assist the first terminal in logging into the mini program according to the first user account when the first server 200 determines that the first verification code and the second verification code are consistent, and when the password carried in the login request is consistent with a preset password associated with the first user account.
[0095] In a possible implementation, the login request also carries a third verification code, and the third verification code is associated with the first serial number. The processing unit 602 is specifically configured to assist the first terminal in logging into the mini program according to the first user account when the first server 200 determines that the first verification code is consistent with the second verification code, the third verification code issued is consistent with the third verification code carried in the login request, and the first serial number carried in the login request is consistent with the first serial number associated with the issued third verification code, wherein the third verification code issued is sent by the first server 200 to the first terminal in the form of a text message in response to the first request sent by the first terminal.
[0096] In a possible implementation, the first user account and the first verification code marked with the first identifier are encrypted, and the processing unit 602 is further configured to decrypt the first user account and the first verification code marked with the first identifier.
[0097] In a possible implementation, the processing unit 602 is further used to generate a first random number; the communication unit 601 is further used to send the first random number to the first terminal; and receive an operation instruction from the first terminal, the operation instruction carrying a second random number; the processing unit 602 is further used to control the first terminal to execute a function associated with the operation instruction when the first random number and the second random number are consistent.
[0098] In a possible implementation, the processing unit 602 is further configured to freeze the first user account, and / or issue an alarm, and / or ban the first user account for a preset period of time when the first server 200 determines that the second verification code is inconsistent with the first verification code from the same first terminal for a number of times greater than a preset threshold;
[0099] Or, when the first server 200 determines that the number of times the second verification code is inconsistent with the first verification code within a preset time period is greater than a preset threshold, the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset time period;
[0100] Or, when the first server 200 determines that the number of inconsistencies between the same first verification code and the second verification code within a preset time period is greater than a preset threshold, the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset time period.
[0101] In a possible implementation, the processing unit 602 is further configured to record the time and IP address of logging into the mini-program.
[0102] Figure 7 2 is a block diagram of an electronic device according to an exemplary embodiment, the electronic device is a first server 200. The first server 200 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, an input / output (I / O) interface 712, and a communication component 716.
[0103] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with data communication and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components.
[0104] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0105] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.
[0106] The I / O interface 712 provides an interface between the processing component 702 and a peripheral interface module, which may be a keyboard, a click wheel, etc.
[0107] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0108] In an exemplary embodiment, the apparatus 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0109] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, and an optical data storage device. The non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the terminal device, enables the electronic device to perform Figure 2 The mini program login method shown.
[0110] The present application also provides a computer program product, including a computer program, which, when executed by a processor, Figure 2 The mini program login method shown.
[0111] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0112] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0113] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for logging into a mini program, characterized in that: The method comprises: The first server receives a login request for logging into a mini-program from a first terminal, wherein the login request carries a first user account and a first verification code marked with a first identifier, and a first parameter, wherein the first identifier is used to indicate that the first verification code is associated with a first interface of a first application of a second terminal, wherein the first interface is displayed after a second server that manages the first application successfully logs into the first application through a second user account and password, and the first parameter includes a third verification code and a first serial number associated with the third verification code, wherein the third verification code is sent by the first server to the first terminal in the form of a text message in response to a first request sent by the first terminal; the first server obtains a second verification code carrying the first identifier from the second server; When the first server determines that the first verification code is consistent with the second verification code, and the first parameter carried in the login request is consistent with a preset first parameter, the first server assists the first terminal in logging into the mini program based on the first user account; The method further comprises: The first server records the time and IP address of logging into the mini program; After the first server assists the first terminal in logging into the mini program based on the first user account, the method further includes: The first server generates a first random number; The first server sends the first random number to the first terminal; The first server receives an operation instruction from the first terminal, where the operation instruction carries a second random number; When the first random number is consistent with the second random number, the first server controls the first terminal to execute a function associated with the operation instruction.
2. The method according to claim 1, characterized in that: The second verification code is updated by the second server every preset time period.
3. The method according to claim 1, characterized in that The method further comprises: When the first server determines that the login behavior is abnormal, the first user account is frozen, and / or an alarm is issued, and / or the first user account is banned for a preset period of time.
4. The method according to claim 3, characterized in that The first server determines that the login behavior is abnormal, including: When the number of times that the second verification code is inconsistent with the first verification code from the same first terminal is greater than a preset threshold, the first server determines that the login behavior is abnormal; Alternatively, when the number of times that the second verification code is inconsistent with the first verification code within a preset time period is greater than a preset threshold, the first server determines that the login behavior is abnormal; When the number of times that the first verification code and the second verification code are inconsistent within a preset time period is greater than a preset threshold, the first server determines that the login behavior is abnormal.
5. The method according to any one of claims 1 to 4, characterized in that: The first user account and the first verification code marked with the first identifier are encrypted, and before the first server obtains the second verification code carrying the first identifier from the second server that manages the first application, the method further includes: The first server decrypts the first user account and the first verification code marked with the first identifier.
6. A small program login device, characterized in that: The device comprises: a communication unit, configured to receive a login request for logging into a mini-program from a first terminal, wherein the login request carries a first user account and a first verification code marked with a first identifier, and a first parameter, wherein the first identifier is used to indicate that the first verification code is associated with a first interface of a first application of a second terminal, wherein the first interface is displayed after a second server that manages the first application successfully logs into the first application through a second user account and password, and the first parameter includes a third verification code and a first serial number associated with the third verification code, wherein the third verification code is sent by the first server to the first terminal in the form of a text message in response to a first request sent by the first terminal; The communication unit is further configured to obtain a second verification code carrying the first identifier from the second server; a processing unit, configured to assist the first terminal in logging into the mini program based on the first user account when it is determined that the first verification code is consistent with the second verification code and the first parameter carried in the login request is consistent with a preset first parameter; The processing unit is further used to record the time and IP address of logging into the mini program; The processing unit is further configured to generate a first random number; and send the first random number to the first terminal; The communication unit is further configured to receive an operation instruction from the first terminal, wherein the operation instruction carries a second random number; The processing unit is further configured to control the first terminal to execute a function associated with the operation instruction when the first random number is consistent with the second random number.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the electronic device executes the method according to any one of claims 1 to 5.
8. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Verification method and device and storage medium
CN111741011A