WO2017215650A1 - Automatic login method and device for micro-game client, program, and medium - Google Patents

Automatic login method and device for micro-game client, program, and medium Download PDF

Info

Publication number
WO2017215650A1
WO2017215650A1 PCT/CN2017/088692 CN2017088692W WO2017215650A1 WO 2017215650 A1 WO2017215650 A1 WO 2017215650A1 CN 2017088692 W CN2017088692 W CN 2017088692W WO 2017215650 A1 WO2017215650 A1 WO 2017215650A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
check code
login
micro
verification
Prior art date
Application number
PCT/CN2017/088692
Other languages
French (fr)
Chinese (zh)
Inventor
李辉
Original Assignee
北京奇虎科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201610440211.6A external-priority patent/CN105871927B/en
Priority claimed from CN201610440213.5A external-priority patent/CN106130964B/en
Priority claimed from CN201610440215.4A external-priority patent/CN106161429B/en
Application filed by 北京奇虎科技有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2017215650A1 publication Critical patent/WO2017215650A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to the field of network communication technologies, and in particular, to a micro-end automatic login method, a micro-end automatic login device, a computer program, and a computer-readable medium.
  • micro-ends are often only a few megabytes in size, and users can complete the download process in an instant and quickly enter the game.
  • the micro-end can quickly provide users with basic game functions, and can download other required resources during the game, which significantly reduces the user's waiting time and is highly praised by a large number of users.
  • the inventor has found that the existing micro-end has at least the following defects: after the user downloads the micro-end, the user needs to manually input the user information and manually log in to the micro-end, and the manual login process is not only cumbersome to operate. And it takes time, which brings inconvenience to the user, and some users are lost invisibly.
  • the present invention has been made in order to provide an automatic login method, apparatus, computer program and computer readable medium for overcoming the above problems or at least partially solving the above problems.
  • a micro-end automatic login method including: sending a download request to a server, where the server obtains a micro-end login file to be downloaded and user information according to the download request; When the micro-end login file is obtained, the user verification code generated by the server according to the user information is obtained; after the download is completed, the user verification code is verified according to a preset verification rule, and when the verification is successful, Send a login request message to the server; automatically log in to the micro-end according to the login response message returned by the server.
  • a micro-end automatic login method including: receiving a download request sent by a user terminal, acquiring a micro-end login file to be downloaded and user information according to the download request; Generating a user check code, renaming the micro-end login file to be downloaded according to the user check code, and providing the renamed micro-end login file to the user terminal for downloading, so that the user terminal downloads After the completion, the verification is performed according to the user check code; after receiving the login request message sent by the user terminal, the login request message is returned to the user terminal according to the login request message, for the user terminal.
  • the micro-end is automatically logged according to the login response message.
  • a micro-end automatic login method including: receiving a download request sent by a user terminal, acquiring a micro-end login file to be downloaded and user information according to the download request; Generating a user check code, and redirecting the download address of the micro-end login file to be downloaded according to the user check code, so that the user-check code is included in the redirected download address for the After the user terminal is downloaded Performing verification according to the user check code; receiving a login request message sent after the user terminal successfully checks, and returning a login response message to the user terminal according to the login request message, for the user terminal to perform according to the The login response message is automatically logged into the micro-end.
  • the present invention further provides a micro-end automatic login device, comprising: a sending module, configured to send a download request to the server, where the server obtains the micro-end login file to be downloaded and the user information according to the download request. And an obtaining module, configured to: when downloading the micro-end login file, obtain a user verification code generated by the server according to the user information; and a verification module, configured to follow a preset verification rule after the download is completed The user check code is verified, and when the verification is successful, the login request message is sent to the server; the login module is adapted to automatically log in to the micro-end according to the login response message returned by the server.
  • a sending module configured to send a download request to the server, where the server obtains the micro-end login file to be downloaded and the user information according to the download request.
  • an obtaining module configured to: when downloading the micro-end login file, obtain a user verification code generated by the server according to the user information; and a verification module, configured to follow a preset verification rule after the download
  • the present invention further provides another micro-end automatic login device, comprising: a receiving module, configured to receive a download request sent by the user terminal, obtain a micro-end login file to be downloaded and user information according to the download request; and generate a check code
  • the module is configured to generate a user check code according to the user information, rename the micro-end login file to be downloaded according to the user check code, and provide the renamed micro-end login file to the user terminal for downloading.
  • the login response module is adapted to receive a login request message sent after the user terminal successfully checks, according to the login request message. The user terminal returns a login response message, so that the user terminal automatically logs in to the microend according to the login response message.
  • the present invention further provides a micro-end automatic login device, comprising: a receiving module, configured to receive a download request sent by the user terminal, obtain a micro-end login file to be downloaded and user information according to the download request; and generate a check code a module, configured to generate a user check code according to the user information, and redirect the download address of the micro-end login file to be downloaded according to the user check code, so that the redirected download address includes the a user check code for the user terminal to perform verification according to the user check code after the download is completed; the login response module is adapted to receive a login request message sent after the user terminal successfully checks, according to the The login request message returns a login response message to the user terminal, so that the user terminal automatically logs in to the microend according to the login response message.
  • a receiving module configured to receive a download request sent by the user terminal, obtain a micro-end login file to be downloaded and user information according to the download request
  • generate a check code a module, configured to generate a user check code according to
  • a computer program comprising computer readable code, when the readable code is run on a computing device, causing the computing device to perform the method of any of the embodiments of the present invention Micro-end automatic login method.
  • the embodiment of the invention further provides a computer readable medium, wherein the program according to the embodiment of the invention is stored.
  • the user terminal can send a download request to the server, so that the server acquires the user information according to the download request and generates a user check code according to the download, and then the user terminal can The user verification code is obtained during the process of downloading the micro-end login file, so that the user information is verified according to the user verification code, and after the verification is successful, the login request message is automatically sent to the server to log in. Therefore, in the present invention, the user check code generated by the server according to the user information is sent to the user terminal for verification, so that the user terminal can automatically send the user information corresponding to the user check code to the server after the verification succeeds.
  • the login request message is further automatically logged in, thereby avoiding the cumbersome operation in the prior art that the user needs to manually input the user information and manually log in, which saves user time.
  • FIG. 1 is a flowchart of a micro-end automatic login method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a micro-end automatic login method according to another embodiment of the present invention.
  • FIG. 3 is a flow chart showing an automatic login method of a microend provided by an example of the present invention.
  • FIG. 4 is a flowchart of a micro-end automatic login method according to still another embodiment of the present invention.
  • FIG. 5 is a flowchart showing an automatic login method of a microend provided by another example of the present invention.
  • FIG. 6 is a structural diagram of an automatic login device for a micro-end according to an embodiment of the present invention.
  • FIG. 7 is a structural diagram of an automatic login device for a micro-end according to another embodiment of the present invention.
  • FIG. 8 is a structural diagram of a micro-end automatic login device according to still another embodiment of the present invention.
  • Figure 9 shows a block diagram of a computing device for performing an automatic login method for a micro-end according to the present invention.
  • Fig. 10 shows a storage unit for holding or carrying program code implementing the automatic login method of the microend according to the present invention.
  • the embodiment of the invention provides a micro-end automatic login method and device, which can at least solve the technical problem that the traditional micro-end login mode requires complicated operation and is time-consuming.
  • FIG. 1 is a flowchart of a method for automatically logging in a micro-end according to an embodiment of the present invention. As shown in FIG. 1, the method specifically includes the following steps:
  • Step S110 Send a download request to the server, so that the server obtains the micro-end login file to be downloaded and the user information according to the download request.
  • the download request is used to download the micro-end login file, and the server can obtain the micro-end login file to be downloaded according to the download request, and the user information can be implemented in various manners.
  • the download request may be directly The identification information of the micro-end login file to be downloaded and the user information are included, so that the micro-end login file to be downloaded and the user information can be obtained by parsing the download request.
  • the identifier information of the micro-end login file to be downloaded may be included in the download request, and the server reads the user information at the user terminal that sends the download request by an agreement. For example, the server determines the user terminal address that sends the download request by using the source port number included in the download request, and determines information about the game account that is running on the user terminal according to the user terminal address.
  • Step S120 When downloading the micro-end login file, obtain a user verification code generated by the server according to the user information.
  • the process of generating the user check code according to the user information may be implemented in various manners.
  • the user information may be encrypted by using the md5 algorithm to obtain a user check code.
  • the function of the user check code is to provide the user terminal for the user terminal to verify the user information.
  • the user terminal may obtain the file name of the micro-end login file, or may be downloaded through the redirected micro-end login file. The address is obtained, and the present invention does not limit the specific acquisition manner.
  • Step S130 After the download is completed, the user verification code is verified according to a preset verification rule. When the verification is successful, the login request message is sent to the server.
  • the purpose of the verification mainly has two aspects. On one hand, it is used to confirm the validity of the user check code, and on the other hand, it is used to confirm whether the user check code matches the locally stored user information. Those skilled in the art can flexibly set various verification rules to achieve the above objectives.
  • Step S140 Automatically log in to the micro-end according to the login response message returned by the server.
  • the micro-end automatic login can be realized by the login request message and the login response message. Therefore, in the present invention, the user check code generated by the server according to the user information is sent to the user terminal for verification, so that the user terminal can automatically send the user information corresponding to the user check code to the server after the verification succeeds.
  • the login request message is further automatically logged in, thereby avoiding the cumbersome operation in the prior art that the user needs to manually input the user information and manually log in, which saves user time.
  • the server can obtain the user information according to the download request sent by the user terminal, and generate a user check code according to the user terminal, and can provide the user check code to the user terminal in the process of downloading the micro-end login file by the user terminal, so that The user terminal checks the user information according to the user check code, and can automatically send a login request message to the server after the verification succeeds to log in.
  • the specific implementation details of the micro-end automatic login method provided by the present invention are described in detail below with reference to examples:
  • FIG. 2 is a flowchart of a method for automatically logging in a micro-end according to another embodiment of the present invention. As shown in FIG. 2, the method specifically includes the following steps:
  • Step S210 Receive a download request sent by the user terminal, and obtain a micro-end login file to be downloaded and user information according to the download request.
  • Step S220 Generate a user check code according to the user information, rename the micro-end login file to be downloaded according to the user check code, and provide the renamed micro-end login file to the user terminal for downloading, for The user terminal performs verification according to the user check code after the download is completed.
  • the purpose of this step is to provide the user check code to the user terminal when the user terminal downloads the micro-end login file, and other ways of providing the user check code to the user terminal can also be applied to the present invention.
  • Step S230 Receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, so that the user terminal automatically logs in to the microend according to the login response message.
  • FIG. 3 shows a flow chart of a micro-end automatic login method provided by an example of the present invention. As shown in FIG. 3, the method specifically includes the following steps:
  • Step S310 The user terminal sends a download request to the server.
  • the user terminal includes various types of fixed terminals or mobile terminals, wherein the fixed terminal includes a personal computer or the like, and the mobile terminal includes a PAD, a mobile phone, and the like.
  • Various types of applications can be run on the user terminal, such as browser applications, game applications, and the like.
  • game applications include platform games, web games, and micro-end games.
  • the front-end client and the back-end server are included, wherein the front-end client is used to provide an intuitive operation of the interface class, and the back-end server is used to provide background service support for the front-end client, and Make the necessary communication with the server.
  • a download request can be sent for a certain game on the homepage to download the micro-end game corresponding to the game.
  • Step S320 The server receives the foregoing download request sent by the user terminal, and obtains the micro-end login file to be downloaded and the user information according to the download request.
  • the server mainly refers to the WEB server.
  • the server parses the download request and obtains the micro-end login file and user information to be downloaded according to the analysis result.
  • the specific acquisition manner can be flexibly set by a person skilled in the art.
  • the identifier information of the micro-end login file to be downloaded and the user information may be directly included in the download request, and the server may directly obtain the identification information of the micro-end login file and the user information by parsing.
  • the identifier information of the micro-end login file to be downloaded may be included in the download request, and the server obtains the address information of the user terminal that sends the download request according to the source address of the download request, and according to the The address information queries and acquires information about the running game application on the user terminal, and extracts the required user information therefrom.
  • the server can obtain user information through the Lua language.
  • the Lua language not only has a simple statement and high performance, but also can significantly improve the query efficiency through the Lua language.
  • those skilled in the art can also flexibly select various languages such as PHP and JAVA to obtain user information.
  • Step S330 The server generates a user check code according to the user information.
  • the user information may include various information.
  • the user information includes at least one of the following information: current system time, gaming platform, gaming area service, user identification, and user cookie.
  • the user check code is generated, the user information may be calculated according to a preset operation rule, and the user check code is generated according to the operation result.
  • the operation rules can be flexibly implemented by various algorithms, for example, md5 algorithm, SHA algorithm, hash algorithm, RSA algorithm and DES algorithm.
  • the md5 algorithm is taken as an example for description.
  • the user information is encrypted by the md5 algorithm to obtain the first operation result.
  • the preset bit number is intercepted from the first operation result as the second operation result, and the first The result of the second operation is used as a user check code.
  • 7 bits are randomly intercepted from 32 bits as a user check code.
  • the method of intercepting the preset number of bits can significantly shorten the subsequent transmission delay and improve the processing speed.
  • the first operation result may be directly used as the user verification code, or by other means.
  • To intercept the preset number of bits for example, in addition to continuously intercepting digits, you can also intercept one bit every few bits.
  • this step it may also be determined whether the second operation result is overlapped with the existing user verification code; if the determination result is no The second operation result is used as the user verification code; if the determination result is yes, the preset number of bits is re-intercepted from the first operation result until the re-intercepted preset number is not duplicated with the existing user verification code. The preset number of bits to be re-intercepted is used as the user check code.
  • the effective time and/or the effective number of the user verification code may be preset, and correspondingly, After the user check code is generated, the generation time and/or the number of times of the user check code may be recorded, and the state of the user check code whose generation time exceeds the valid time and/or the number of uses exceeds the effective number is set to an invalid state.
  • the valid time of the user check code can be set to one minute. After one minute, the user check code is in an invalid state and cannot be used normally; the effective number of the user check code can also be set to one time when it is used. After one time, it will automatically expire and cannot be reused. This makes it possible to avoid duplication between user check codes.
  • Step S340 The server renames the micro-end login file to be downloaded according to the user check code, and provides the renamed micro-end login file to the user terminal for downloading.
  • the micro-end login file usually refers to the micro-client software that can be used to run the specified game.
  • the file identifier of the micro-end login file included in the download request is DZZ
  • the file identifier can be used to determine that the corresponding micro-end login file is the micro-client software corresponding to the big-master game.
  • the original file name of the micro-end login file is DZZ.EXE.
  • the user check code is renamed according to the user check code, so that the user terminal can determine the user check code according to the renamed file name. When it is implemented, it can be renamed in various ways.
  • the user check code is directly added to the specified position of the original file name, for example, by adding an underscore to the end of the original file name, and changing the original file name to DZZ_CODE.EXE.
  • a preset encryption algorithm may be performed on the user check code, and the encryption operation result is added to a specified location of the original file name.
  • the server provides the renamed micro-end login file to the user terminal for download. Specifically, the download entry of the renamed micro-end login file may be sent to the user terminal.
  • Step S350 When downloading the micro-end login file, the user terminal acquires the user verification code according to the file name of the micro-end login file.
  • the user terminal downloads the micro-end login file through the download portal fed back by the server.
  • the download portal can be in various forms such as a download link, a download icon, and the like.
  • the user terminal obtains the user check code according to the file name of the micro-end login file.
  • the specific acquisition method depends on the renaming method in the previous step.
  • the user verification code can be obtained directly by the file name; when the second renaming method is adopted, the file name is used.
  • the specified field performs a preset decryption algorithm to obtain the user check code.
  • step S350 can be automatically triggered according to the preset operation logic, for example, the user terminal can be set to automatically obtain the user verification code before the download starts; or the user terminal automatically obtains the user verification code during the downloading process; or, the user The terminal automatically obtains the user check code after the download is completed.
  • step S350 can also be triggered according to the operation request sent by the user. For example, when the user double-clicks the downloaded micro-end login file, the front-end client of the micro-end receives the operation request of the double-click type, and the operation of the double-click type is performed. The request is passed to the backend server of the microend for processing, and the backend server of the microend reads the renamed file name and obtains the user check code according to the operation of the double click type.
  • Step S360 The user terminal checks the user check code according to a preset verification rule.
  • the step may be continuously performed according to the triggering of step S350, that is, regardless of the manner of triggering in step S350, step S360 is automatically triggered as long as step S350 is performed.
  • this step can also be automatically triggered after the download of the micro-end login file is completed, that is, no matter what mode is triggered in step S350, step S360 is automatically triggered as long as the micro-end login file is downloaded.
  • the verification may be performed by using at least one of the following rules: the first verification rule is: determining whether the generation time of the user verification code exceeds a preset effective time, and if the determination result is no, The verification is successful; if the judgment result is yes, the verification fails. For example, when the preset effective time is 1 minute, if the generation time of the user check code exceeds one minute, the verification fails.
  • the second verification rule is: determining whether the number of times the user check code is used exceeds a preset effective number. If the judgment result is negative, the verification succeeds; if the judgment result is yes, the verification fails. For example, when the preset effective number is 1 time, the verification fails as long as the user check code has been used.
  • the third verification rule is: determining the user identifier corresponding to the user cookie according to the user cookie included in the user information, and if the determined user identifier is the same as the user identifier included in the user information, the verification succeeds; The test failed.
  • the above three verification methods can be used alone or in combination.
  • those skilled in the art can flexibly set other verification methods for verification, as long as the validity of the user verification code and its matching relationship with the user information can be determined.
  • this step determines whether the obtained user check code matches the user information on the user terminal side. Since the user check code is generated according to the user information, the user check code can obtain the user information. The legality of the user check code can be determined by comparing the obtained user information with the local user information on the user terminal side.
  • Step S370 When the verification is successful, the user terminal sends a login request message to the server.
  • the login request message may include the above User information and/or user check code for the server to determine the user to log in.
  • Step S380 The server receives the login request message sent after the user terminal successfully checks, and returns a login response message to the user terminal according to the login request message.
  • the login response message includes login entry information generated according to the user information and/or the user verification code, and the login is automatically completed by logging in the portal information.
  • the server can determine, according to the user information and/or the user check code, information about the current online game name, the game area service, the game platform, and the user cookie of the user to be logged in, according to which the server allocates the corresponding login entry information to Implement automatic login for this user.
  • Step S390 The user terminal automatically logs in to the micro-end according to the login response message returned by the server.
  • the step can be performed by using a micro-end server running on the user terminal.
  • the micro-end server After receiving the login response message, the micro-end server automatically logs in according to the login entry information contained therein.
  • the login entry information may be in the form of a login link or the like.
  • the automatic login of the micro-end can be realized by the method in the embodiment of the present invention, which eliminates the cumbersome operation of manually inputting user information and manually logging in, saves a lot of time for the user, and avoids the flawlessness after the micro-end download is completed.
  • the phenomenon of user loss caused by login can be realized by the method in the embodiment of the present invention, which eliminates the cumbersome operation of manually inputting user information and manually logging in, saves a lot of time for the user, and avoids the flawlessness after the micro-end download is completed.
  • FIG. 4 is a flowchart of a micro-end automatic login method according to still another embodiment of the present invention. As shown in FIG. 4, the method specifically includes the following steps:
  • Step S410 Receive a download request sent by the user terminal, and obtain a micro-end login file to be downloaded and user information according to the download request.
  • Step S420 Generate a user check code according to the user information, and redirect the download address of the micro-end login file to be downloaded according to the user check code, so that the user verification is included in the redirected download address.
  • the code is provided for the user terminal to verify according to the user check code after the download is completed.
  • the purpose of this step is to provide the user check code to the user terminal when the user terminal downloads the micro-end login file, and other ways of providing the user check code to the user terminal can also be applied to the present invention.
  • Step S430 Receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, so that the user terminal automatically logs in to the microend according to the login response message.
  • FIG. 5 is a flow chart showing an automatic login method of a micro-end provided by another example of the present invention. As shown in FIG. 5, the method specifically includes the following steps:
  • Step S510 The user terminal sends a download request to the server.
  • the user terminal includes various types of fixed terminals or mobile terminals, wherein the fixed terminal includes a personal computer or the like, and the mobile terminal includes a PAD, a mobile phone, and the like.
  • Various types of applications can be run on the user terminal, such as browser applications, game applications, and the like.
  • the game application may include platform games, web games, micro-end games, and the like.
  • the front-end client and the back-end server may be included, wherein the front-end client is used to provide an intuitive operation of the interface class, and the back-end server is used to provide background service support for the front-end client. And make the necessary communication with the server.
  • a download request can be sent for a certain game on the homepage to download the micro-end game corresponding to the game.
  • Step S520 The server receives the foregoing download request sent by the user terminal, and obtains the micro-end login file to be downloaded and the user information according to the download request.
  • the server mainly refers to the WEB server.
  • the server parses the download request and obtains the micro-end login file and user information to be downloaded according to the analysis result.
  • the specific acquisition manner can be flexibly set by a person skilled in the art.
  • the micro-end to be downloaded can be directly included in the download request.
  • the identification information of the recorded file and the user information the server can directly obtain the identification information of the micro-end login file and the user information through parsing.
  • the identifier information of the micro-end login file to be downloaded may be included in the download request, and the server obtains the address information of the user terminal that sends the download request according to the source address of the download request, and according to the The address information queries and acquires information about the running game application on the user terminal, and extracts the required user information therefrom.
  • the server can obtain user information through the Lua language.
  • the Lua language not only has a simple statement and high performance, but also can significantly improve the query efficiency through the Lua language.
  • those skilled in the art can also flexibly select various languages such as PHP and JAVA to obtain user information.
  • Step S530 The server generates a user check code according to the user information.
  • the user information may include various information.
  • the user information includes at least one of the following information: current system time, gaming platform, gaming area service, user identification, and user cookie.
  • the user check code is generated, the user information may be calculated according to a preset operation rule, and the user check code is generated according to the operation result.
  • the operation rules can be flexibly implemented by various algorithms, for example, md5 algorithm, SHA algorithm, hash algorithm, RSA algorithm and DES algorithm.
  • the md5 algorithm is taken as an example for description.
  • the user information is encrypted by the md5 algorithm to obtain the first operation result.
  • the preset bit number is intercepted from the first operation result as the second operation result, and the first The result of the second operation is used as a user check code.
  • 7 bits are randomly intercepted from 32 bits as a user check code.
  • the method of intercepting the preset number of bits can significantly shorten the subsequent transmission delay and improve the processing speed.
  • the first operation result may be directly used as the user verification code, or by other means.
  • To intercept the preset number of bits for example, in addition to continuously intercepting digits, you can also intercept one bit every few bits.
  • this step it may also be determined whether the second operation result is overlapped with the existing user verification code; if the determination result is no The second operation result is used as the user verification code; if the determination result is yes, the preset number of bits is re-intercepted from the first operation result until the re-intercepted preset number is not duplicated with the existing user verification code. The preset number of bits to be re-intercepted is used as the user check code.
  • the effective time and/or the effective number of the user verification code may be preset, and correspondingly, After the user check code is generated, the generation time and/or the number of times of the user check code may be recorded, and the state of the user check code whose generation time exceeds the valid time and/or the number of uses exceeds the effective number is set to an invalid state.
  • the valid time of the user check code can be set to one minute. After one minute, the user check code is in an invalid state and cannot be used normally; the effective number of the user check code can also be set to one time when it is used. After one time, it will automatically expire and cannot be reused. This makes it possible to avoid duplication between user check codes.
  • Step S540 The server redirects the download address of the micro-end login file to be downloaded according to the user verification code, so that the redirected download address includes the user verification code.
  • the redirection operation can be implemented as follows: First, a check parameter field is added to the download address of the micro-end login file to be downloaded, and the value of the check parameter field is set to the value of the user check code.
  • the check parameter field can be set anywhere in the download address, for example, at the end of the download address.
  • the download address of the micro-end login file to be downloaded is jumped to the download address after the check parameter field is added by the page jump mode.
  • the jump can be performed by the 302 jump mode.
  • 302 jump is also called temporary jump.
  • the user terminal will request the download address twice.
  • the first requested download address is the original download address that does not contain the check parameter field, the second time.
  • the requested download address is the redirected download address containing the check parameter field, and since the 302 jump is a temporary jump, the search engine does not store the redirected download address. Because of the server every The generated user check code is different. Therefore, the redirect address is different each time the redirect operation is performed. Therefore, using the 302 jump mode can complete the temporary redirect operation without changing the original download address.
  • Step S550 When downloading the micro-end login file, the user terminal acquires the user check code according to the check parameter field included in the downloaded address of the redirected micro-end login file.
  • the user terminal downloads the micro-end login file through the download address fed back by the server. Since the download address is redirected, the user terminal needs to request the server twice, first requesting the original download address from the server, and secondly requesting the server to redirect the download address according to the redirect instruction. During the download process or after the download is completed, the user terminal obtains the user check code according to the check parameter field included in the redirected download address.
  • the step S550 may be automatically triggered according to the preset operation logic.
  • the user terminal may be configured to automatically obtain the user verification code during the downloading process; or the user terminal automatically acquires the user verification code after the download is completed.
  • step S550 in the present embodiment generally does not have to be triggered according to an operation request issued by the user.
  • Step S560 The user terminal checks the user check code according to a preset check rule.
  • the step may be continuously performed according to the triggering of step S550, that is, regardless of the manner of triggering in step S550, step S560 is automatically triggered as long as step S550 is performed.
  • this step can also be triggered automatically after the download of the micro-end login file is completed, that is, no matter what mode is triggered in step S550, step S560 is automatically triggered as long as the micro-end login file is downloaded.
  • the verification may be performed by using at least one of the following rules: the first verification rule is: determining whether the generation time of the user verification code exceeds a preset effective time, and if the determination result is no, The verification is successful; if the judgment result is yes, the verification fails. For example, when the preset effective time is 1 minute, if the generation time of the user check code exceeds one minute, the verification fails.
  • the second verification rule is: determining whether the number of times the user check code is used exceeds a preset effective number. If the judgment result is negative, the verification succeeds; if the judgment result is yes, the verification fails. For example, when the preset effective number is 1 time, the verification fails as long as the user check code has been used.
  • the third verification rule is: determining the user identifier corresponding to the user cookie according to the user cookie included in the user information, and if the determined user identifier is the same as the user identifier included in the user information, the verification succeeds; The test failed.
  • the above three verification methods can be used alone or in combination.
  • those skilled in the art can flexibly set other verification methods for verification, as long as the validity of the user verification code and its matching relationship with the user information can be determined.
  • this step determines whether the obtained user check code matches the user information on the user terminal side. Since the user check code is generated according to the user information, the user check code can obtain the user information. The legality of the user check code can be determined by comparing the obtained user information with the local user information on the user terminal side.
  • Step S570 When the verification is successful, the user terminal sends a login request message to the server.
  • the login request message may include the foregoing user information and/or a user check code for the server to determine the user to be logged in.
  • Step S580 The server receives the login request message sent after the user terminal successfully checks, according to the login request message. A login response message is returned to the user terminal.
  • the login response message includes login entry information generated according to the user information and/or the user verification code, and the login is automatically completed by logging in the portal information.
  • the server can determine, according to the user information and/or the user check code, information about the current online game name, the game area service, the game platform, and the user cookie of the user to be logged in, according to which the server allocates the corresponding login entry information to Implement automatic login for this user.
  • Step S590 The user terminal automatically logs in to the micro-end according to the login response message returned by the server.
  • the step can be performed by using a micro-end server running on the user terminal.
  • the micro-end server After receiving the login response message, the micro-end server automatically logs in according to the login entry information contained therein.
  • the login entry information may be in the form of a login link or the like.
  • the server can generate a user check code for verification, and on the other hand, the user information can be verified by the micro-end server on the user terminal. And after the verification is passed, the login entry information for logging in the micro-end game is automatically requested from the server, thereby realizing the automatic login of the micro-end, eliminating the cumbersome operation of the user manually inputting the user information and manually logging in, saving the user a large amount of operations. Time, avoiding the phenomenon of user loss due to innocent login after the micro-end download is completed.
  • micro-end server can be integrated in the local area of the user terminal. More preferably, in order to facilitate unified management of each micro-end client, the accuracy and efficiency of the verification are improved.
  • the micro-end server can also be implemented by one or more separate web servers.
  • the above examples are mainly applied to the chrome browser or the Firefox browser.
  • the common feature of the two browsers is that the downloaded micro-end login file is usually an .exe format file, and after the download is completed, the user has to double-click.
  • the micro-end login file triggers the automatic login of the micro-end. Therefore, by renaming the micro-end login file, the micro-end login file automatically acquires and verifies the user verification code when receiving the double-click type operation request, so that The effect of automatic login after verification is passed.
  • the above example is mainly applied to the IE browser.
  • the micro-end login file downloaded through the browser is usually a file in the .application format, and after the download is completed, the IE browser can automatically run the downloaded micro-end login file without the user. The double-click operation is performed.
  • the download address of the micro-end login file can be redirected, so that the user terminal obtains the user verification code through the redirected download address during the download process and automatically performs verification.
  • the present invention can also be applied to other types of browsers, and the implementation details in the above embodiments are adjusted according to the characteristics of the browser, as long as the server can transmit the user verification code to the user.
  • the terminal can be used for the purpose of verification by the user terminal.
  • the present invention may also include the following embodiments in order to combine the above examples. Specifically, in the embodiment of the present invention, the steps in the above examples are first performed.
  • step S310 to step S330 the server determines the kernel type of the browser on the user terminal side, and if it determines the first type of the kernel type of the browser (ie, the chrome type or the Firefox type), performs step S340 to the step in the above example.
  • FIG. 6 is a structural diagram of an automatic login device for a micro-end according to an embodiment of the present invention. As shown in Figure 6, the device includes:
  • the sending module 61 is adapted to send a download request to the server, where the server obtains the micro-end login file to be downloaded and the user information according to the download request;
  • the obtaining module 62 is configured to acquire, when the micro-end login file is downloaded, a user check code generated by the server according to the user information;
  • the verification module 63 is configured to verify the user verification code according to a preset verification rule after the download is completed, and send a login request message to the server when the verification is successful;
  • the login module 64 is adapted to automatically log in to the microend according to the login response message returned by the server.
  • the obtaining module 62 is specifically configured to: obtain a user check code according to the file name of the micro-end login file.
  • the download request and the login request message are request messages sent by a chrome browser or a Firefox browser.
  • the obtaining module 62 is specifically configured to: obtain the user check code according to the check parameter field included in the download address of the redirected micro-end login file.
  • the download request and the login request message are request messages sent by an IE browser.
  • the user information includes at least one of the following: a current system time, a gaming platform, a gaming area, a user identification, and a user cookie.
  • the preset verification rule includes at least one of the following rules:
  • Determining a user identifier corresponding to the user cookie according to the user cookie included in the user information if the user identifier corresponding to the user cookie is the same as the user identifier included in the user information, the verification succeeds; failure.
  • the login request message includes the user information and/or the user verification code
  • the login response message includes a login generated according to the user information and/or the user verification code. Entrance information.
  • FIG. 7 is a structural diagram of an automatic login device for a micro-end according to another embodiment of the present invention. As shown in Figure 7, the device includes:
  • the receiving module 71 is adapted to receive a download request sent by the user terminal, and obtain the micro-end login file to be downloaded and the user information according to the download request.
  • the check code generating module 72 is configured to generate a user check code according to the user information, and rename the micro-end login file to be downloaded according to the user check code, and rename the renamed micro-end login file. Providing to the user terminal for downloading, so that the user terminal performs verification according to the user check code after the download is completed;
  • the login response module 73 is adapted to receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, for the user terminal to use the login response message according to the login response message. Automatically log in to the micro-end.
  • the check code generating module 72 is configured to: perform operations on the user information according to a preset operation rule, obtain a first operation result, and generate the user check code according to the first operation result.
  • the operation rule includes at least one of the following algorithms: an md5 algorithm, a SHA algorithm, a hash algorithm, an RSA algorithm, and a DES algorithm
  • the user information includes at least one of the following information: current system time, Game platform, game zone service, user identification, and user cookies.
  • the check code generating module 72 is configured to: intercept a preset number of bits from the first operation result as a second operation result, and use the second operation result as the user check code.
  • the check code generating module 72 is specifically configured to: determine whether the second operation result is repeated with an existing user check code; if the determination result is no, the second operation result is used as the a user check code; if the result of the determination is yes, the preset number of bits is re-intercepted from the first operation result until the re-intercepted preset number of bits does not overlap with the existing user check code, The re-intercepted preset number of bits is used as the user check code.
  • the device includes: a setting module 74, configured to preset a valid time and/or a valid number of times of the user check code, and the setting module may record the user check code after generating the user check code
  • the generation time and/or the number of uses, the state of the user check code whose generation time exceeds the effective time and/or the number of uses exceeds the effective number is set to an invalid state.
  • the login request message includes the user information and/or the user check code
  • the login response message includes login entry information generated according to the user information and/or the user check code.
  • the download request and the login request message are request messages sent by a chrome browser or a Firefox browser.
  • FIG. 8 is a structural diagram of a micro-end automatic login device according to still another embodiment of the present invention. As shown in Figure 8, the device includes:
  • the receiving module 81 is adapted to receive a download request sent by the user terminal, and obtain the micro-end login file to be downloaded and the user information according to the download request.
  • the check code generating module 82 is configured to generate a user check code according to the user information, and redirect the download address of the micro-end login file to be downloaded according to the user check code, so that the redirected download is performed.
  • the user check code is included in the address, so that the user terminal performs verification according to the user check code after the download is completed;
  • the login response module 83 is adapted to receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, for the user terminal to use the login response message according to the login response message. Automatically log in to the micro-end.
  • the check code generating module 82 is configured to: add a check parameter field to the download address of the micro-end login file to be downloaded, and set a value of the check parameter field to the user.
  • the value of the check code is obtained by the page jump mode, and the download address of the micro-end login file to be downloaded is jumped to the download address after the check parameter field is added.
  • the check code generating module 82 is specifically configured to: perform operations on the user information according to a preset operation rule, obtain a first operation result, and generate the user check code according to the first operation result.
  • the operation rule includes at least one of the following algorithms: an md5 algorithm, a SHA algorithm, a hash algorithm, an RSA algorithm, and a DES algorithm
  • the user information includes at least one of the following information: current system time, Game platform, game zone service, user identification, and user cookies.
  • the check code generating module 82 is specifically configured to: intercept a preset number of bits from the first operation result as a second operation result, and use the second operation result as the user check code.
  • the check code generating module 82 is specifically configured to: determine whether the second operation result is repeated with an existing user check code; if the determination result is no, the second operation result is used as the a user check code; if the result of the determination is yes, the preset number of bits is re-intercepted from the first operation result until the re-intercepted preset number of bits does not overlap with the existing user check code, The re-intercepted preset number of bits is used as the user check code.
  • the method may further include: a setting module 84, configured to preset a valid time and/or a valid number of times of the user check code, and the setting module may record the user check code after generating the user check code.
  • a setting module 84 configured to preset a valid time and/or a valid number of times of the user check code
  • the setting module may record the user check code after generating the user check code. The generation time and/or the number of uses, the generation of the user check code whose time exceeds the effective time and/or the number of uses exceeds the effective number of times Invalid state.
  • the login request message may include the user information and/or the user check code
  • the login response message includes a login entry generated according to the user information and/or the user check code. information.
  • the download request and the login request message are request messages sent by an IE browser.
  • the server can acquire the user information according to the download request sent by the user terminal, and generate a user verification code according to the data, and then can download the user verification code.
  • the user check code is provided to the user terminal during the process of logging in the file, so that the user terminal checks the user information according to the user check code, and automatically sends a login request message to the server to log in after the verification succeeds.
  • the user check code generated by the server according to the user information is sent to the user terminal for verification, so that the user terminal can automatically send the user information corresponding to the user check code to the server after the verification succeeds.
  • the login request message is further automatically logged in, thereby avoiding the cumbersome operation in the prior art that the user needs to manually input the user information and manually log in, which saves user time.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • Various component embodiments of the present invention may be implemented in hardware or in software running on one or more processors Module implementations, or in combinations of them.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 9 illustrates a computing device that can implement an automatic login method for microends in accordance with the present invention.
  • the computing device conventionally includes a processor 910 and a program product or readable medium in the form of a memory 920.
  • Memory 920 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, or ROM.
  • Memory 920 has a memory space 930 for program code 931 for performing any of the method steps described above.
  • storage space 930 for program code may include various program code 931 for implementing various steps in the above methods, respectively.
  • These program codes can be read from or written to one or more program products.
  • These program products include program code carriers such as memory cards.
  • Such a program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 920 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes readable code 931', ie, code that can be read by a processor, such as 910, which, when executed by a computing device, causes the computing device to perform various steps in the methods described above. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

An automatic login method and device for a micro-game client, a program, and a medium, at least capable of resolving the technical problem of complexity in operations and the consumption of time due to that the conventional micro-game client login approach requires manual login. The method comprises: sending a downloading request to a server for the server to obtain a micro-game client login file to be downloaded and user information according to the downloading request; obtaining a user check code generated by the server according to the user information when downloading the micro-game client login file; checking the user check code according to a preset check rule after the downloading is completed, and if the check is successful, sending a login request message to the server; and automatically logging in to a micro-game client according to a login response message returned by the server.

Description

微端的自动登录方法、装置、程序及介质Micro-end automatic login method, device, program and medium 技术领域Technical field
本发明涉及网络通信技术领域,具体涉及一种微端的自动登录方法、一种微端的自动登录装置、一种计算机程序及一种计算机可读介质。The present invention relates to the field of network communication technologies, and in particular, to a micro-end automatic login method, a micro-end automatic login device, a computer program, and a computer-readable medium.
背景技术Background technique
目前,网络游戏的种类和数量越来越多。游戏开发者为了更好地吸引用户,不断推出游戏画面更加逼真、交互功能更加强大的网络游戏。然而,与此同时,也导致游戏客户端的数据量越来越大,动辄达到数百兆甚至几十G,如此庞大的游戏客户端无疑显著延长了用户下载过程中的等待时间,并且对终端设备的存储空间带来了巨大挑战。由此可见,庞大的游戏客户端很可能由于下载时间过长、占用空间过大等缺陷而流失大量用户。Currently, there are more and more types of online games. In order to better attract users, game developers continue to launch online games with more realistic and interactive features. However, at the same time, it also leads to the increasing amount of data in the game client, reaching hundreds of megabytes or even tens of megagrams. Such a huge game client undoubtedly significantly prolongs the waiting time during the user download process, and the terminal device The storage space poses a huge challenge. It can be seen that a large game client is likely to lose a large number of users due to defects such as long download time and excessive space.
为了解决庞大的游戏客户端所带来的上述弊端,游戏开发者纷纷推出了微型游戏客户端,在下文中简称微端。微端往往只有几兆大小,用户能够在瞬间完成下载过程进而快速进入游戏。通过微端能够快速地为用户提供基本游戏功能,并且能够在游戏进行过程中下载其他所需资源,显著降低了用户的等待时间,受到大量用户的推崇。In order to solve the above drawbacks caused by the huge game client, game developers have launched a micro-game client, hereinafter referred to as micro-end. Micro-ends are often only a few megabytes in size, and users can complete the download process in an instant and quickly enter the game. The micro-end can quickly provide users with basic game functions, and can download other required resources during the game, which significantly reduces the user's waiting time and is highly praised by a large number of users.
但是,发明人在实现本发明的过程中发现,现有的微端至少存在以下缺陷:当用户下载完微端之后,需要人工输入用户信息并人工登录微端,而人工登录的过程不仅操作繁琐,且耗费时间,由此为用户带来了不便,且无形中流失了部分用户。However, in the process of implementing the present invention, the inventor has found that the existing micro-end has at least the following defects: after the user downloads the micro-end, the user needs to manually input the user information and manually log in to the micro-end, and the manual login process is not only cumbersome to operate. And it takes time, which brings inconvenience to the user, and some users are lost invisibly.
发明内容Summary of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的微端的自动登录方法、装置、计算机程序及计算机可读介质。In view of the above problems, the present invention has been made in order to provide an automatic login method, apparatus, computer program and computer readable medium for overcoming the above problems or at least partially solving the above problems.
依据本发明的一个方面,提供了一种微端的自动登录方法,包括:向服务器发送下载请求,以供所述服务器根据所述下载请求获取待下载的微端登录文件以及用户信息;在下载所述微端登录文件时,获取所述服务器根据所述用户信息生成的用户校验码;在下载完成后按照预设的校验规则对所述用户校验码进行校验,当校验成功时,向服务器发送登录请求消息;根据服务器返回的登录响应消息自动登录微端。According to an aspect of the present invention, a micro-end automatic login method is provided, including: sending a download request to a server, where the server obtains a micro-end login file to be downloaded and user information according to the download request; When the micro-end login file is obtained, the user verification code generated by the server according to the user information is obtained; after the download is completed, the user verification code is verified according to a preset verification rule, and when the verification is successful, Send a login request message to the server; automatically log in to the micro-end according to the login response message returned by the server.
依据本发明的另一方面,提供了一种微端的自动登录方法,包括:接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件进行重命名,将重命名后的微端登录文件提供给用户终端下载,以供所述用户终端在下载完成后根据所述用户校验码进行校验;接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。According to another aspect of the present invention, a micro-end automatic login method is provided, including: receiving a download request sent by a user terminal, acquiring a micro-end login file to be downloaded and user information according to the download request; Generating a user check code, renaming the micro-end login file to be downloaded according to the user check code, and providing the renamed micro-end login file to the user terminal for downloading, so that the user terminal downloads After the completion, the verification is performed according to the user check code; after receiving the login request message sent by the user terminal, the login request message is returned to the user terminal according to the login request message, for the user terminal. The micro-end is automatically logged according to the login response message.
依据本发明的又一方面,提供了一种微端的自动登录方法,包括:接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件的下载地址进行重定向,使重定向后的下载地址中包含所述用户校验码,以供所述用户终端在下载完成后 根据所述用户校验码进行校验;接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。According to still another aspect of the present invention, a micro-end automatic login method is provided, including: receiving a download request sent by a user terminal, acquiring a micro-end login file to be downloaded and user information according to the download request; Generating a user check code, and redirecting the download address of the micro-end login file to be downloaded according to the user check code, so that the user-check code is included in the redirected download address for the After the user terminal is downloaded Performing verification according to the user check code; receiving a login request message sent after the user terminal successfully checks, and returning a login response message to the user terminal according to the login request message, for the user terminal to perform according to the The login response message is automatically logged into the micro-end.
相应的,本发明还提供了一种微端的自动登录装置,包括:发送模块,适于向服务器发送下载请求,以供所述服务器根据所述下载请求获取待下载的微端登录文件以及用户信息;获取模块,适于在下载所述微端登录文件时,获取所述服务器根据所述用户信息生成的用户校验码;校验模块,适于在下载完成后按照预设的校验规则对所述用户校验码进行校验,当校验成功时,向服务器发送登录请求消息;登录模块,适于根据服务器返回的登录响应消息自动登录微端。Correspondingly, the present invention further provides a micro-end automatic login device, comprising: a sending module, configured to send a download request to the server, where the server obtains the micro-end login file to be downloaded and the user information according to the download request. And an obtaining module, configured to: when downloading the micro-end login file, obtain a user verification code generated by the server according to the user information; and a verification module, configured to follow a preset verification rule after the download is completed The user check code is verified, and when the verification is successful, the login request message is sent to the server; the login module is adapted to automatically log in to the micro-end according to the login response message returned by the server.
本发明还提供了另一种微端的自动登录装置,包括:接收模块,适于接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;校验码生成模块,适于根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件进行重命名,将重命名后的微端登录文件提供给用户终端下载,以供所述用户终端在下载完成后根据所述用户校验码进行校验;登录响应模块,适于接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。The present invention further provides another micro-end automatic login device, comprising: a receiving module, configured to receive a download request sent by the user terminal, obtain a micro-end login file to be downloaded and user information according to the download request; and generate a check code The module is configured to generate a user check code according to the user information, rename the micro-end login file to be downloaded according to the user check code, and provide the renamed micro-end login file to the user terminal for downloading. For the user terminal to perform verification according to the user check code after the download is completed; the login response module is adapted to receive a login request message sent after the user terminal successfully checks, according to the login request message. The user terminal returns a login response message, so that the user terminal automatically logs in to the microend according to the login response message.
本发明还提供了又一种微端的自动登录装置,包括:接收模块,适于接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;校验码生成模块,适于根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件的下载地址进行重定向,使重定向后的下载地址中包含所述用户校验码,以供所述用户终端在下载完成后根据所述用户校验码进行校验;登录响应模块,适于接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。The present invention further provides a micro-end automatic login device, comprising: a receiving module, configured to receive a download request sent by the user terminal, obtain a micro-end login file to be downloaded and user information according to the download request; and generate a check code a module, configured to generate a user check code according to the user information, and redirect the download address of the micro-end login file to be downloaded according to the user check code, so that the redirected download address includes the a user check code for the user terminal to perform verification according to the user check code after the download is completed; the login response module is adapted to receive a login request message sent after the user terminal successfully checks, according to the The login request message returns a login response message to the user terminal, so that the user terminal automatically logs in to the microend according to the login response message.
根据本发明实施例还提供了一种计算机程序,包括计算机可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据本发明实施例中的任一个所述的微端的自动登录方法。There is further provided, in accordance with an embodiment of the present invention, a computer program comprising computer readable code, when the readable code is run on a computing device, causing the computing device to perform the method of any of the embodiments of the present invention Micro-end automatic login method.
本发明实施例还提供了一种计算机可读介质,其中存储了如本发明实施例所述的程序。The embodiment of the invention further provides a computer readable medium, wherein the program according to the embodiment of the invention is stored.
在本发明提供的微端的自动登录方法及装置中,首先,用户终端能够向服务器发送下载请求,以供服务器根据该下载请求获取到用户信息并据此生成用户校验码,然后,用户终端能够在下载微端登录文件的过程中获取该用户校验码,以便根据该用户校验码对用户信息进行校验,并在校验成功后自动向服务器发送登录请求消息从而进行登录。由此可见,在本发明中,将服务器根据用户信息生成的用户校验码发送给用户终端校验,从而使用户终端能够在校验成功后自动根据用户校验码对应的用户信息向服务器发送登录请求消息进而自动登录,由此避免了现有技术中需由用户人工输入用户信息并人工登录的繁琐操作,节约了用户时间。In the micro-end automatic login method and apparatus provided by the present invention, first, the user terminal can send a download request to the server, so that the server acquires the user information according to the download request and generates a user check code according to the download, and then the user terminal can The user verification code is obtained during the process of downloading the micro-end login file, so that the user information is verified according to the user verification code, and after the verification is successful, the login request message is automatically sent to the server to log in. Therefore, in the present invention, the user check code generated by the server according to the user information is sent to the user terminal for verification, so that the user terminal can automatically send the user information corresponding to the user check code to the server after the verification succeeds. The login request message is further automatically logged in, thereby avoiding the cumbersome operation in the prior art that the user needs to manually input the user information and manually log in, which saves user time.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, and the above-described and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below.
附图说明 DRAWINGS
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图1示出了本发明一个实施例提供的微端的自动登录方法的流程图;FIG. 1 is a flowchart of a micro-end automatic login method according to an embodiment of the present invention;
图2示出了本发明另一个实施例提供的微端的自动登录方法的流程图;FIG. 2 is a flowchart of a micro-end automatic login method according to another embodiment of the present invention;
图3示出了本发明一个示例提供的微端的自动登录方法的流程图;3 is a flow chart showing an automatic login method of a microend provided by an example of the present invention;
图4示出了本发明又一个实施例提供的微端的自动登录方法的流程图;FIG. 4 is a flowchart of a micro-end automatic login method according to still another embodiment of the present invention;
图5示出了本发明另一个示例提供的微端的自动登录方法的流程图;FIG. 5 is a flowchart showing an automatic login method of a microend provided by another example of the present invention; FIG.
图6示出了本发明一个实施例提供的微端的自动登录装置的结构图;FIG. 6 is a structural diagram of an automatic login device for a micro-end according to an embodiment of the present invention;
图7示出了本发明另一个实施例提供的微端的自动登录装置的结构图;FIG. 7 is a structural diagram of an automatic login device for a micro-end according to another embodiment of the present invention;
图8示出了本发明又一个实施例提供的微端的自动登录装置的结构图;FIG. 8 is a structural diagram of a micro-end automatic login device according to still another embodiment of the present invention;
图9示出了用于执行根据本发明的微端的自动登录方法的计算设备的框图;Figure 9 shows a block diagram of a computing device for performing an automatic login method for a micro-end according to the present invention;
图10示出了用于保持或者携带实现根据本发明的微端的自动登录方法的程序代码的存储单元。Fig. 10 shows a storage unit for holding or carrying program code implementing the automatic login method of the microend according to the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood and the scope of the disclosure will be fully disclosed.
本发明实施例提供了一种微端的自动登录方法及装置,至少能够解决传统的微端登录方式需由人工登录所导致的操作繁琐且耗费时间的技术问题。The embodiment of the invention provides a micro-end automatic login method and device, which can at least solve the technical problem that the traditional micro-end login mode requires complicated operation and is time-consuming.
图1示出了本发明一个实施例提供的微端的自动登录方法的流程图。如图1所示,该方法具体包括以下步骤:FIG. 1 is a flowchart of a method for automatically logging in a micro-end according to an embodiment of the present invention. As shown in FIG. 1, the method specifically includes the following steps:
步骤S110:向服务器发送下载请求,以供服务器根据下载请求获取待下载的微端登录文件以及用户信息。Step S110: Send a download request to the server, so that the server obtains the micro-end login file to be downloaded and the user information according to the download request.
其中,下载请求用于下载微端登录文件,服务器根据下载请求获取待下载的微端登录文件以及用户信息的实现方式可以为多种,例如,在一种实现方式中,可以直接在下载请求中包含待下载的微端登录文件的标识信息以及用户信息,从而通过对下载请求进行解析即可获取到待下载的微端登录文件以及用户信息。在另一种实现方式中,可以在下载请求中仅包含待下载的微端登录文件的标识信息,由服务器通过约定方式读取发送该下载请求的用户终端处的用户信息。例如,服务器通过下载请求中包含的源端口号确定发送该下载请求的用户终端地址,根据该用户终端地址确定该用户终端上正在运行的游戏账号的相关信息。The download request is used to download the micro-end login file, and the server can obtain the micro-end login file to be downloaded according to the download request, and the user information can be implemented in various manners. For example, in one implementation manner, the download request may be directly The identification information of the micro-end login file to be downloaded and the user information are included, so that the micro-end login file to be downloaded and the user information can be obtained by parsing the download request. In another implementation manner, the identifier information of the micro-end login file to be downloaded may be included in the download request, and the server reads the user information at the user terminal that sends the download request by an agreement. For example, the server determines the user terminal address that sends the download request by using the source port number included in the download request, and determines information about the game account that is running on the user terminal according to the user terminal address.
步骤S120:在下载微端登录文件时,获取服务器根据用户信息生成的用户校验码。Step S120: When downloading the micro-end login file, obtain a user verification code generated by the server according to the user information.
其中,根据用户信息生成用户校验码的过程可以灵活通过各种方式实现,例如,可以通过md5算法对用户信息进行加密,以获得用户校验码。用户校验码的作用在于提供给用户终端,以供用户终端对用户信息进行校验。具体地,用户终端获取该用户校验码时,既可以通过微端登录文件的文件名进行获取,也可以通过重定向后的微端登录文件的下载地 址进行获取,本发明对具体的获取方式不做限定。The process of generating the user check code according to the user information may be implemented in various manners. For example, the user information may be encrypted by using the md5 algorithm to obtain a user check code. The function of the user check code is to provide the user terminal for the user terminal to verify the user information. Specifically, when the user terminal obtains the user verification code, the user terminal may obtain the file name of the micro-end login file, or may be downloaded through the redirected micro-end login file. The address is obtained, and the present invention does not limit the specific acquisition manner.
步骤S130:在下载完成后按照预设的校验规则对用户校验码进行校验,当校验成功时,向服务器发送登录请求消息。Step S130: After the download is completed, the user verification code is verified according to a preset verification rule. When the verification is successful, the login request message is sent to the server.
其中,校验的目的主要有两方面,一方面用于确认用户校验码的合法性,另一方面用于确认用户校验码是否与本地存储的用户信息匹配。本领域技术人员可以灵活设定各种校验规则来实现上述目的。The purpose of the verification mainly has two aspects. On one hand, it is used to confirm the validity of the user check code, and on the other hand, it is used to confirm whether the user check code matches the locally stored user information. Those skilled in the art can flexibly set various verification rules to achieve the above objectives.
步骤S140:根据服务器返回的登录响应消息自动登录微端。Step S140: Automatically log in to the micro-end according to the login response message returned by the server.
其中,通过登录请求消息以及登录响应消息能够实现微端的自动登录。由此可见,在本发明中,将服务器根据用户信息生成的用户校验码发送给用户终端校验,从而使用户终端能够在校验成功后自动根据用户校验码对应的用户信息向服务器发送登录请求消息进而自动登录,由此避免了现有技术中需由用户人工输入用户信息并人工登录的繁琐操作,节约了用户时间。Among them, the micro-end automatic login can be realized by the login request message and the login response message. Therefore, in the present invention, the user check code generated by the server according to the user information is sent to the user terminal for verification, so that the user terminal can automatically send the user information corresponding to the user check code to the server after the verification succeeds. The login request message is further automatically logged in, thereby avoiding the cumbersome operation in the prior art that the user needs to manually input the user information and manually log in, which saves user time.
具体的,服务器能够根据用户终端发送的下载请求获取到用户信息并据此生成用户校验码,并且能够在用户终端下载微端登录文件的过程中将该用户校验码提供给用户终端,以便用户终端根据该用户校验码对用户信息进行校验,以及可在校验成功后自动向服务器发送登录请求消息从而进行登录。下面结合示例详细描述本发明提供的微端的自动登录方法的具体实现细节:Specifically, the server can obtain the user information according to the download request sent by the user terminal, and generate a user check code according to the user terminal, and can provide the user check code to the user terminal in the process of downloading the micro-end login file by the user terminal, so that The user terminal checks the user information according to the user check code, and can automatically send a login request message to the server after the verification succeeds to log in. The specific implementation details of the micro-end automatic login method provided by the present invention are described in detail below with reference to examples:
图2示出了本发明另一个实施例提供的微端的自动登录方法的流程图。如图2所示,该方法具体包括以下步骤:FIG. 2 is a flowchart of a method for automatically logging in a micro-end according to another embodiment of the present invention. As shown in FIG. 2, the method specifically includes the following steps:
步骤S210:接收用户终端发送的下载请求,根据下载请求获取待下载的微端登录文件以及用户信息。Step S210: Receive a download request sent by the user terminal, and obtain a micro-end login file to be downloaded and user information according to the download request.
步骤S220:根据用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件进行重命名,将重命名后的微端登录文件提供给用户终端下载,以供用户终端在下载完成后根据用户校验码进行校验。Step S220: Generate a user check code according to the user information, rename the micro-end login file to be downloaded according to the user check code, and provide the renamed micro-end login file to the user terminal for downloading, for The user terminal performs verification according to the user check code after the download is completed.
本步骤的目的在于:在用户终端下载微端登录文件时,对将用户校验码提供给用户终端,其他能够将用户校验码提供给用户终端的方式也可以应用于本发明。The purpose of this step is to provide the user check code to the user terminal when the user terminal downloads the micro-end login file, and other ways of providing the user check code to the user terminal can also be applied to the present invention.
步骤S230:接收用户终端校验成功后发送的登录请求消息,根据登录请求消息向用户终端返回登录响应消息,以供用户终端根据登录响应消息自动登录微端。Step S230: Receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, so that the user terminal automatically logs in to the microend according to the login response message.
图3示出了本发明一个示例提供的微端的自动登录方法的流程图。如图3所示,该方法具体包括以下步骤:FIG. 3 shows a flow chart of a micro-end automatic login method provided by an example of the present invention. As shown in FIG. 3, the method specifically includes the following steps:
步骤S310:用户终端向服务器发送下载请求。Step S310: The user terminal sends a download request to the server.
其中,用户终端包括各类固定终端或移动终端,其中,固定终端包括个人计算机等,移动终端包括PAD、手机等。在用户终端上能够运行各类应用,例如,浏览器应用、游戏应用等。其中,游戏应用又包括平台游戏、网页游戏、微端游戏等。对于微端游戏而言,又包括前端客户端和后端服务端,其中,前端客户端用于为用户提供界面类的直观操作,后端服务端用于为前端客户端提供后台服务支持,并与服务器进行必要的通信。在本实施例中,当用户终端通过chrome浏览器或火狐浏览器打开平台游戏主页后,能够针对该主页上的某款游戏发送下载请求,以下载该款游戏对应的微端游戏。The user terminal includes various types of fixed terminals or mobile terminals, wherein the fixed terminal includes a personal computer or the like, and the mobile terminal includes a PAD, a mobile phone, and the like. Various types of applications can be run on the user terminal, such as browser applications, game applications, and the like. Among them, game applications include platform games, web games, and micro-end games. For the micro-end game, the front-end client and the back-end server are included, wherein the front-end client is used to provide an intuitive operation of the interface class, and the back-end server is used to provide background service support for the front-end client, and Make the necessary communication with the server. In this embodiment, after the user terminal opens the platform game homepage through the chrome browser or the Firefox browser, a download request can be sent for a certain game on the homepage to download the micro-end game corresponding to the game.
步骤S320:服务器接收用户终端发送的上述下载请求,根据该下载请求获取待下载的微端登录文件以及用户信息。 Step S320: The server receives the foregoing download request sent by the user terminal, and obtains the micro-end login file to be downloaded and the user information according to the download request.
其中,服务器主要指WEB服务器。服务器接收到上述下载请求后,对其进行解析,根据解析结果获取待下载的微端登录文件以及用户信息。具体获取方式可以由本领域技术人员灵活设定。例如,在第一种实现方式中,可以在下载请求中直接包含待下载的微端登录文件的标识信息以及用户信息,服务器通过解析即可直接获取到微端登录文件的标识信息以及用户信息。在第二种实现方式中,也可以仅在下载请求中包含待下载的微端登录文件的标识信息,服务器根据下载请求的源地址获取到发送该下载请求的用户终端的地址信息,并根据该地址信息查询并获取该用户终端上正在运行的游戏应用的相关信息,从中提取所需的用户信息。具体实现时,服务器可以通过Lua语言获取用户信息,Lua语言不仅语句简洁且性能高效,通过Lua语言能够显著提升查询效率。另外,除Lua语言外,本领域技术人员还可以灵活选用PHP、JAVA等各类语言获取用户信息。Among them, the server mainly refers to the WEB server. After receiving the above download request, the server parses the download request and obtains the micro-end login file and user information to be downloaded according to the analysis result. The specific acquisition manner can be flexibly set by a person skilled in the art. For example, in the first implementation manner, the identifier information of the micro-end login file to be downloaded and the user information may be directly included in the download request, and the server may directly obtain the identification information of the micro-end login file and the user information by parsing. In the second implementation manner, the identifier information of the micro-end login file to be downloaded may be included in the download request, and the server obtains the address information of the user terminal that sends the download request according to the source address of the download request, and according to the The address information queries and acquires information about the running game application on the user terminal, and extracts the required user information therefrom. In the specific implementation, the server can obtain user information through the Lua language. The Lua language not only has a simple statement and high performance, but also can significantly improve the query efficiency through the Lua language. In addition, in addition to the Lua language, those skilled in the art can also flexibly select various languages such as PHP and JAVA to obtain user information.
步骤S330:服务器根据上述用户信息生成用户校验码。Step S330: The server generates a user check code according to the user information.
其中,用户信息可以包括各种信息。例如,用户信息包括以下信息中的至少一种:当前系统时间、游戏平台、游戏区服、用户标识以及用户cookie。具体生成用户校验码时,可以根据预设的运算规则对用户信息进行运算,根据运算结果生成用户校验码。其中,运算规则可以灵活通过各种算法实现,例如,md5算法、SHA算法、哈希算法、RSA算法和DES算法等。Among them, the user information may include various information. For example, the user information includes at least one of the following information: current system time, gaming platform, gaming area service, user identification, and user cookie. When the user check code is generated, the user information may be calculated according to a preset operation rule, and the user check code is generated according to the operation result. Among them, the operation rules can be flexibly implemented by various algorithms, for example, md5 algorithm, SHA algorithm, hash algorithm, RSA algorithm and DES algorithm.
在本实施例中,以md5算法为例进行说明。通过md5算法对用户信息进行加密运算,得到第一运算结果。由于第一运算结果的位数较长,通常情况下为32位,为了提高后续处理效率,在本实施例中,从第一运算结果中截取预设位数作为第二运算结果,并将第二运算结果作为用户校验码。例如,从32位中随机地连续截取7位作为用户校验码。通过截取预设位数的方式能够显著缩短后续的传输时延,提升处理速度,当然,在本发明其他的实施例中,也可以直接将第一运算结果作为用户校验码,或通过其他方式来截取预设位数,例如,除连续截取数位外,也可以每隔若干位截取一位。In this embodiment, the md5 algorithm is taken as an example for description. The user information is encrypted by the md5 algorithm to obtain the first operation result. Since the number of bits of the first operation result is long, usually 32 bits, in order to improve the efficiency of subsequent processing, in this embodiment, the preset bit number is intercepted from the first operation result as the second operation result, and the first The result of the second operation is used as a user check code. For example, 7 bits are randomly intercepted from 32 bits as a user check code. The method of intercepting the preset number of bits can significantly shorten the subsequent transmission delay and improve the processing speed. Of course, in other embodiments of the present invention, the first operation result may be directly used as the user verification code, or by other means. To intercept the preset number of bits, for example, in addition to continuously intercepting digits, you can also intercept one bit every few bits.
另外,为了防止截取后的第二运算结果与服务器已生成的用户校验码重复,在本步骤中,还可以判断第二运算结果是否与已有的用户校验码重复;若判断结果为否,将第二运算结果作为用户校验码;若判断结果为是,则从第一运算结果中重新截取预设位数,直至重新截取的预设位数与已有的用户校验码不重复时,将重新截取的预设位数作为用户校验码。In addition, in order to prevent the second operation result after the interception from being repeated with the user verification code generated by the server, in this step, it may also be determined whether the second operation result is overlapped with the existing user verification code; if the determination result is no The second operation result is used as the user verification code; if the determination result is yes, the preset number of bits is re-intercepted from the first operation result until the re-intercepted preset number is not duplicated with the existing user verification code. The preset number of bits to be re-intercepted is used as the user check code.
可选地,在本实施例中,为了有效避免截取后的第二运算结果与已有的用户校验码重复,可以预先设置用户校验码的有效时间和/或有效次数,相应地,在生成用户校验码之后,可以记录用户校验码的生成时间和/或使用次数,将生成时间超过有效时间和/或使用次数超过有效次数的用户校验码的状态置为无效状态。例如,可以将用户校验码的有效时间设置为一分钟,超过一分钟之后该用户校验码处于无效状态,无法正常使用;还可以将用户校验码的有效次数设置为一次,当其使用一次后则自动失效,无法重复使用。由此能够避免用户校验码之间的重复现象。Optionally, in this embodiment, in order to effectively avoid the repetition of the second operation result after the interception and the existing user verification code, the effective time and/or the effective number of the user verification code may be preset, and correspondingly, After the user check code is generated, the generation time and/or the number of times of the user check code may be recorded, and the state of the user check code whose generation time exceeds the valid time and/or the number of uses exceeds the effective number is set to an invalid state. For example, the valid time of the user check code can be set to one minute. After one minute, the user check code is in an invalid state and cannot be used normally; the effective number of the user check code can also be set to one time when it is used. After one time, it will automatically expire and cannot be reused. This makes it possible to avoid duplication between user check codes.
步骤S340:服务器根据用户校验码对待下载的微端登录文件进行重命名,将重命名后的微端登录文件提供给用户终端下载。Step S340: The server renames the micro-end login file to be downloaded according to the user check code, and provides the renamed micro-end login file to the user terminal for downloading.
其中,微端登录文件通常指能够用于运行指定游戏的微客户端软件。例如,在本实施例中,假设下载请求中包含的微端登录文件的文件标识为DZZ,通过该文件标识可以确定相应的微端登录文件为大主宰游戏所对应的微客户端软件。该微端登录文件的原始文件名为DZZ.EXE。在本实施例中,根据用户校验码对其进行重命名,使用户终端根据重命名后的文件名能够确定用户校验码。具体实现时,可以通过各种方式进行重命名。在第一种实 现方式中,直接将用户校验码添加到原始文件名的指定位置,例如,通过下划线添加到原始文件名的末尾,使原始文件名变更为DZZ_CODE.EXE。在第二种实现方式中,为了提升传输过程中的安全性,可以对用户校验码进行预设的加密算法,并将加密运算结果添加到原始文件名的指定位置。之后,服务器将重命名后的微端登录文件提供给用户终端下载。具体地,可以将重命名后的微端登录文件的下载入口发送给用户终端。Among them, the micro-end login file usually refers to the micro-client software that can be used to run the specified game. For example, in this embodiment, it is assumed that the file identifier of the micro-end login file included in the download request is DZZ, and the file identifier can be used to determine that the corresponding micro-end login file is the micro-client software corresponding to the big-master game. The original file name of the micro-end login file is DZZ.EXE. In this embodiment, the user check code is renamed according to the user check code, so that the user terminal can determine the user check code according to the renamed file name. When it is implemented, it can be renamed in various ways. In the first real In the current mode, the user check code is directly added to the specified position of the original file name, for example, by adding an underscore to the end of the original file name, and changing the original file name to DZZ_CODE.EXE. In the second implementation manner, in order to improve security during transmission, a preset encryption algorithm may be performed on the user check code, and the encryption operation result is added to a specified location of the original file name. After that, the server provides the renamed micro-end login file to the user terminal for download. Specifically, the download entry of the renamed micro-end login file may be sent to the user terminal.
步骤S350:用户终端在下载微端登录文件时,根据微端登录文件的文件名获取用户校验码。Step S350: When downloading the micro-end login file, the user terminal acquires the user verification code according to the file name of the micro-end login file.
具体地,用户终端通过服务器反馈的下载入口下载微端登录文件。该下载入口可以是下载链接、下载图标等各种形式。在下载过程中或下载完成后,用户终端根据微端登录文件的文件名获取用户校验码。具体获取方式取决于上一步骤中的重命名方式,当采用第一种重命名方式时,直接通过文件名即可获取用户校验码;当采用第二种重命名方式时,对文件名中的指定字段执行预设的解密算法即可获取用户校验码。Specifically, the user terminal downloads the micro-end login file through the download portal fed back by the server. The download portal can be in various forms such as a download link, a download icon, and the like. During the download process or after the download is completed, the user terminal obtains the user check code according to the file name of the micro-end login file. The specific acquisition method depends on the renaming method in the previous step. When the first renaming method is adopted, the user verification code can be obtained directly by the file name; when the second renaming method is adopted, the file name is used. The specified field performs a preset decryption algorithm to obtain the user check code.
另外,步骤S350可以根据预先设置的操作逻辑自动触发,例如,可以设置为用户终端在下载开始之前自动获取用户校验码;或者,用户终端在下载过程中自动获取用户校验码;或者,用户终端在下载结束后自动获取用户校验码。另外,步骤S350也可以根据用户发出的操作请求进行触发,例如,当用户双击已下载的微端登录文件时,微端的前端客户端接收到该双击类型的操作请求,并将该双击类型的操作请求传递给微端的后端服务端进行处理,微端的后端服务端根据该双击类型的操作请求读取重命名后的文件名并获取用户校验码。In addition, the step S350 can be automatically triggered according to the preset operation logic, for example, the user terminal can be set to automatically obtain the user verification code before the download starts; or the user terminal automatically obtains the user verification code during the downloading process; or, the user The terminal automatically obtains the user check code after the download is completed. In addition, step S350 can also be triggered according to the operation request sent by the user. For example, when the user double-clicks the downloaded micro-end login file, the front-end client of the micro-end receives the operation request of the double-click type, and the operation of the double-click type is performed. The request is passed to the backend server of the microend for processing, and the backend server of the microend reads the renamed file name and obtains the user check code according to the operation of the double click type.
步骤S360:用户终端按照预设的校验规则对用户校验码进行校验。Step S360: The user terminal checks the user check code according to a preset verification rule.
其中,本步骤可以根据步骤S350的触发而连续执行,也就是说,无论步骤S350采用何种方式触发,只要步骤S350执行完毕则自动触发步骤S360。或者,本步骤也可以在微端登录文件下载完毕后自动触发,也就是说,无论步骤S350采用何种方式触发,只要微端登录文件下载完毕则自动触发步骤S360。In this case, the step may be continuously performed according to the triggering of step S350, that is, regardless of the manner of triggering in step S350, step S360 is automatically triggered as long as step S350 is performed. Alternatively, this step can also be automatically triggered after the download of the micro-end login file is completed, that is, no matter what mode is triggered in step S350, step S360 is automatically triggered as long as the micro-end login file is downloaded.
具体地,本步骤中可通过以下规则中的至少一种规则进行校验:第一种校验规则为:判断用户校验码的生成时间是否超过预设的有效时间,若判断结果为否,则校验成功;若判断结果为是,则校验失败。例如,当预设的有效时间为1分钟,若用户校验码的生成时间超过一分钟则校验失败。第二种校验规则为:判断用户校验码的使用次数是否超过预设的有效次数,若判断结果为否,则校验成功;若判断结果为是,则校验失败。例如,当预设的有效次数为1次时,只要用户校验码已使用过则校验失败。第三种校验规则为:根据用户信息中包含的用户cookie确定与用户cookie对应的用户标识,如果确定出的用户标识与用户信息中包含的用户标识相同,则校验成功;反之,则校验失败。上述三种校验方式既可以单独使用,也可以结合使用。另外,除上述校验方式外,本领域技术人员还可以灵活设定其他的校验方式进行校验,只要能够确定用户校验码的有效性及其与用户信息之间的匹配关系即可。Specifically, in this step, the verification may be performed by using at least one of the following rules: the first verification rule is: determining whether the generation time of the user verification code exceeds a preset effective time, and if the determination result is no, The verification is successful; if the judgment result is yes, the verification fails. For example, when the preset effective time is 1 minute, if the generation time of the user check code exceeds one minute, the verification fails. The second verification rule is: determining whether the number of times the user check code is used exceeds a preset effective number. If the judgment result is negative, the verification succeeds; if the judgment result is yes, the verification fails. For example, when the preset effective number is 1 time, the verification fails as long as the user check code has been used. The third verification rule is: determining the user identifier corresponding to the user cookie according to the user cookie included in the user information, and if the determined user identifier is the same as the user identifier included in the user information, the verification succeeds; The test failed. The above three verification methods can be used alone or in combination. In addition, in addition to the above verification methods, those skilled in the art can flexibly set other verification methods for verification, as long as the validity of the user verification code and its matching relationship with the user information can be determined.
由此可见,本步骤的执行目的在于确定获取的用户校验码与用户终端侧的用户信息是否匹配,由于用户校验码是根据用户信息生成的,因此,通过用户校验码能够获取用户信息,将获取的用户信息与用户终端侧本地的用户信息进行比较即可确定用户校验码的合法性。It can be seen that the purpose of this step is to determine whether the obtained user check code matches the user information on the user terminal side. Since the user check code is generated according to the user information, the user check code can obtain the user information. The legality of the user check code can be determined by comparing the obtained user information with the local user information on the user terminal side.
步骤S370:当校验成功时,用户终端向服务器发送登录请求消息。Step S370: When the verification is successful, the user terminal sends a login request message to the server.
具体地,本步骤可以在校验成功后自动触发。其中,登录请求消息中可以包含上述的 用户信息和/或用户校验码,以供服务器确定待登录的用户。Specifically, this step can be automatically triggered after the verification is successful. Wherein, the login request message may include the above User information and/or user check code for the server to determine the user to log in.
步骤S380:服务器接收用户终端校验成功后发送的登录请求消息,根据登录请求消息向用户终端返回登录响应消息。Step S380: The server receives the login request message sent after the user terminal successfully checks, and returns a login response message to the user terminal according to the login request message.
其中,登录响应消息中包含根据用户信息和/或用户校验码生成的登录入口信息,通过登录入口信息即可自动完成登录。具体地,服务器根据用户信息和/或用户校验码能够确定待登录的用户当前在线的游戏名称、游戏区服、游戏平台以及用户cookie等信息,据此,服务器分配对应的登录入口信息,以实现该用户的自动登录。The login response message includes login entry information generated according to the user information and/or the user verification code, and the login is automatically completed by logging in the portal information. Specifically, the server can determine, according to the user information and/or the user check code, information about the current online game name, the game area service, the game platform, and the user cookie of the user to be logged in, according to which the server allocates the corresponding login entry information to Implement automatic login for this user.
步骤S390:用户终端根据服务器返回的登录响应消息自动登录微端。Step S390: The user terminal automatically logs in to the micro-end according to the login response message returned by the server.
具体实现时,本步骤可以通过用户终端上运行的微端服务端执行。微端服务端接收到登录响应消息后,根据其中包含的登录入口信息进行自动登录。其中,登录入口信息可以是登录链接等形式。In a specific implementation, the step can be performed by using a micro-end server running on the user terminal. After receiving the login response message, the micro-end server automatically logs in according to the login entry information contained therein. The login entry information may be in the form of a login link or the like.
由此可见,通过本发明实施例中的方式能够实现微端的自动登录,免去了用户人工输入用户信息并人工登录的繁琐操作,为用户节约了大量时间,避免了微端下载完成后因无暇登录而导致用户流失的现象发生。It can be seen that the automatic login of the micro-end can be realized by the method in the embodiment of the present invention, which eliminates the cumbersome operation of manually inputting user information and manually logging in, saves a lot of time for the user, and avoids the flawlessness after the micro-end download is completed. The phenomenon of user loss caused by login.
图4示出了本发明又一个实施例提供的微端的自动登录方法的流程图。如图4所示,该方法具体包括以下步骤:FIG. 4 is a flowchart of a micro-end automatic login method according to still another embodiment of the present invention. As shown in FIG. 4, the method specifically includes the following steps:
步骤S410:接收用户终端发送的下载请求,根据下载请求获取待下载的微端登录文件以及用户信息。Step S410: Receive a download request sent by the user terminal, and obtain a micro-end login file to be downloaded and user information according to the download request.
步骤S420:根据用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件的下载地址进行重定向,使重定向后的下载地址中包含所述用户校验码,以供用户终端在下载完成后根据用户校验码进行校验。Step S420: Generate a user check code according to the user information, and redirect the download address of the micro-end login file to be downloaded according to the user check code, so that the user verification is included in the redirected download address. The code is provided for the user terminal to verify according to the user check code after the download is completed.
本步骤的目的在于:在用户终端下载微端登录文件时,对将用户校验码提供给用户终端,其他能够将用户校验码提供给用户终端的方式也可以应用于本发明。The purpose of this step is to provide the user check code to the user terminal when the user terminal downloads the micro-end login file, and other ways of providing the user check code to the user terminal can also be applied to the present invention.
步骤S430:接收用户终端校验成功后发送的登录请求消息,根据登录请求消息向用户终端返回登录响应消息,以供用户终端根据登录响应消息自动登录微端。Step S430: Receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, so that the user terminal automatically logs in to the microend according to the login response message.
图5示出了本发明另一个示例提供的微端的自动登录方法的流程图。如图5所示,该方法具体包括以下步骤:FIG. 5 is a flow chart showing an automatic login method of a micro-end provided by another example of the present invention. As shown in FIG. 5, the method specifically includes the following steps:
步骤S510:用户终端向服务器发送下载请求。Step S510: The user terminal sends a download request to the server.
其中,用户终端包括各类固定终端或移动终端,其中,固定终端包括个人计算机等,移动终端包括PAD、手机等。在用户终端上能够运行各类应用,例如,浏览器应用、游戏应用等。其中,游戏应用又可以包括平台游戏、网页游戏、微端游戏等。对于微端游戏而言,又可以包括前端客户端和后端服务端,其中,前端客户端用于为用户提供界面类的直观操作,后端服务端用于为前端客户端提供后台服务支持,并与服务器进行必要的通信。在本实施例中,当用户终端通过IE浏览器打开平台游戏主页后,能够针对该主页上的某款游戏发送下载请求,以下载该款游戏对应的微端游戏。The user terminal includes various types of fixed terminals or mobile terminals, wherein the fixed terminal includes a personal computer or the like, and the mobile terminal includes a PAD, a mobile phone, and the like. Various types of applications can be run on the user terminal, such as browser applications, game applications, and the like. Among them, the game application may include platform games, web games, micro-end games, and the like. For the micro-end game, the front-end client and the back-end server may be included, wherein the front-end client is used to provide an intuitive operation of the interface class, and the back-end server is used to provide background service support for the front-end client. And make the necessary communication with the server. In this embodiment, after the user terminal opens the platform game homepage through the IE browser, a download request can be sent for a certain game on the homepage to download the micro-end game corresponding to the game.
步骤S520:服务器接收用户终端发送的上述下载请求,根据该下载请求获取待下载的微端登录文件以及用户信息。Step S520: The server receives the foregoing download request sent by the user terminal, and obtains the micro-end login file to be downloaded and the user information according to the download request.
其中,服务器主要指WEB服务器。服务器接收到上述下载请求后,对其进行解析,根据解析结果获取待下载的微端登录文件以及用户信息。具体获取方式可以由本领域技术人员灵活设定。例如,在第一种实现方式中,可以在下载请求中直接包含待下载的微端登 录文件的标识信息以及用户信息,服务器通过解析即可直接获取到微端登录文件的标识信息以及用户信息。在第二种实现方式中,也可以仅在下载请求中包含待下载的微端登录文件的标识信息,服务器根据下载请求的源地址获取到发送该下载请求的用户终端的地址信息,并根据该地址信息查询并获取该用户终端上正在运行的游戏应用的相关信息,从中提取所需的用户信息。具体实现时,服务器可以通过Lua语言获取用户信息,Lua语言不仅语句简洁且性能高效,通过Lua语言能够显著提升查询效率。另外,除Lua语言外,本领域技术人员还可以灵活选用PHP、JAVA等各类语言获取用户信息。Among them, the server mainly refers to the WEB server. After receiving the above download request, the server parses the download request and obtains the micro-end login file and user information to be downloaded according to the analysis result. The specific acquisition manner can be flexibly set by a person skilled in the art. For example, in the first implementation, the micro-end to be downloaded can be directly included in the download request. The identification information of the recorded file and the user information, the server can directly obtain the identification information of the micro-end login file and the user information through parsing. In the second implementation manner, the identifier information of the micro-end login file to be downloaded may be included in the download request, and the server obtains the address information of the user terminal that sends the download request according to the source address of the download request, and according to the The address information queries and acquires information about the running game application on the user terminal, and extracts the required user information therefrom. In the specific implementation, the server can obtain user information through the Lua language. The Lua language not only has a simple statement and high performance, but also can significantly improve the query efficiency through the Lua language. In addition, in addition to the Lua language, those skilled in the art can also flexibly select various languages such as PHP and JAVA to obtain user information.
步骤S530:服务器根据上述用户信息生成用户校验码。Step S530: The server generates a user check code according to the user information.
其中,用户信息可以包括各种信息。例如,用户信息包括以下信息中的至少一种:当前系统时间、游戏平台、游戏区服、用户标识以及用户cookie。具体生成用户校验码时,可以根据预设的运算规则对用户信息进行运算,根据运算结果生成用户校验码。其中,运算规则可以灵活通过各种算法实现,例如,md5算法、SHA算法、哈希算法、RSA算法和DES算法等。Among them, the user information may include various information. For example, the user information includes at least one of the following information: current system time, gaming platform, gaming area service, user identification, and user cookie. When the user check code is generated, the user information may be calculated according to a preset operation rule, and the user check code is generated according to the operation result. Among them, the operation rules can be flexibly implemented by various algorithms, for example, md5 algorithm, SHA algorithm, hash algorithm, RSA algorithm and DES algorithm.
在本实施例中,以md5算法为例进行说明。通过md5算法对用户信息进行加密运算,得到第一运算结果。由于第一运算结果的位数较长,通常情况下为32位,为了提高后续处理效率,在本实施例中,从第一运算结果中截取预设位数作为第二运算结果,并将第二运算结果作为用户校验码。例如,从32位中随机地连续截取7位作为用户校验码。通过截取预设位数的方式能够显著缩短后续的传输时延,提升处理速度,当然,在本发明其他的实施例中,也可以直接将第一运算结果作为用户校验码,或通过其他方式来截取预设位数,例如,除连续截取数位外,也可以每隔若干位截取一位。In this embodiment, the md5 algorithm is taken as an example for description. The user information is encrypted by the md5 algorithm to obtain the first operation result. Since the number of bits of the first operation result is long, usually 32 bits, in order to improve the efficiency of subsequent processing, in this embodiment, the preset bit number is intercepted from the first operation result as the second operation result, and the first The result of the second operation is used as a user check code. For example, 7 bits are randomly intercepted from 32 bits as a user check code. The method of intercepting the preset number of bits can significantly shorten the subsequent transmission delay and improve the processing speed. Of course, in other embodiments of the present invention, the first operation result may be directly used as the user verification code, or by other means. To intercept the preset number of bits, for example, in addition to continuously intercepting digits, you can also intercept one bit every few bits.
另外,为了防止截取后的第二运算结果与服务器已生成的用户校验码重复,在本步骤中,还可以判断第二运算结果是否与已有的用户校验码重复;若判断结果为否,将第二运算结果作为用户校验码;若判断结果为是,则从第一运算结果中重新截取预设位数,直至重新截取的预设位数与已有的用户校验码不重复时,将重新截取的预设位数作为用户校验码。In addition, in order to prevent the second operation result after the interception from being repeated with the user verification code generated by the server, in this step, it may also be determined whether the second operation result is overlapped with the existing user verification code; if the determination result is no The second operation result is used as the user verification code; if the determination result is yes, the preset number of bits is re-intercepted from the first operation result until the re-intercepted preset number is not duplicated with the existing user verification code. The preset number of bits to be re-intercepted is used as the user check code.
可选地,在本实施例中,为了有效避免截取后的第二运算结果与已有的用户校验码重复,可以预先设置用户校验码的有效时间和/或有效次数,相应地,在生成用户校验码之后,可以记录用户校验码的生成时间和/或使用次数,将生成时间超过有效时间和/或使用次数超过有效次数的用户校验码的状态置为无效状态。例如,可以将用户校验码的有效时间设置为一分钟,超过一分钟之后该用户校验码处于无效状态,无法正常使用;还可以将用户校验码的有效次数设置为一次,当其使用一次后则自动失效,无法重复使用。由此能够避免用户校验码之间的重复现象。Optionally, in this embodiment, in order to effectively avoid the repetition of the second operation result after the interception and the existing user verification code, the effective time and/or the effective number of the user verification code may be preset, and correspondingly, After the user check code is generated, the generation time and/or the number of times of the user check code may be recorded, and the state of the user check code whose generation time exceeds the valid time and/or the number of uses exceeds the effective number is set to an invalid state. For example, the valid time of the user check code can be set to one minute. After one minute, the user check code is in an invalid state and cannot be used normally; the effective number of the user check code can also be set to one time when it is used. After one time, it will automatically expire and cannot be reused. This makes it possible to avoid duplication between user check codes.
步骤S540:服务器根据上述用户校验码对待下载的微端登录文件的下载地址进行重定向,使重定向后的下载地址中包含上述用户校验码。Step S540: The server redirects the download address of the micro-end login file to be downloaded according to the user verification code, so that the redirected download address includes the user verification code.
具体实现时,可通过如下方式实现重定向操作:首先,在待下载的微端登录文件的下载地址中添加校验参数字段,将校验参数字段的值设置为用户校验码的值。其中,校验参数字段可以设置在下载地址中的任意位置,例如,设置在下载地址的末尾。然后,通过页面跳转方式使待下载的微端登录文件的下载地址跳转为添加校验参数字段后的下载地址。具体跳转时,可通过302跳转方式进行跳转。其中,302跳转也叫临时跳转,在使用302跳转时,用户终端会请求两次下载地址,第一次请求到的下载地址为未包含校验参数字段的原始下载地址,第二次请求到的下载地址为含有校验参数字段的重定向下载地址,并且,由于302跳转为临时跳转,因此搜索引擎不会对重定向下载地址进行存储。由于服务器每 次生成的用户校验码不同,因此,每次执行重定向操作时的重定向地址也不同,因此,使用302跳转方式能够在不改变原始下载地址的前提下完成临时的重定向操作,尤其适用于本发明中的用户校验码动态改变的应用场景。当然,除302跳转方式外,其他的页面跳转方式也能够应用于本发明。In the specific implementation, the redirection operation can be implemented as follows: First, a check parameter field is added to the download address of the micro-end login file to be downloaded, and the value of the check parameter field is set to the value of the user check code. The check parameter field can be set anywhere in the download address, for example, at the end of the download address. Then, the download address of the micro-end login file to be downloaded is jumped to the download address after the check parameter field is added by the page jump mode. In the case of a specific jump, the jump can be performed by the 302 jump mode. Among them, 302 jump is also called temporary jump. When using 302 jump, the user terminal will request the download address twice. The first requested download address is the original download address that does not contain the check parameter field, the second time. The requested download address is the redirected download address containing the check parameter field, and since the 302 jump is a temporary jump, the search engine does not store the redirected download address. Because of the server every The generated user check code is different. Therefore, the redirect address is different each time the redirect operation is performed. Therefore, using the 302 jump mode can complete the temporary redirect operation without changing the original download address. An application scenario suitable for dynamically changing a user check code in the present invention. Of course, in addition to the 302 jump mode, other page jump modes can also be applied to the present invention.
步骤S550:用户终端在下载微端登录文件时,根据重定向后的微端登录文件的下载地址中包含的校验参数字段获取用户校验码。Step S550: When downloading the micro-end login file, the user terminal acquires the user check code according to the check parameter field included in the downloaded address of the redirected micro-end login file.
具体地,用户终端通过服务器反馈的下载地址下载微端登录文件。由于该下载地址进行了重定向处理,因此,用户终端需要向服务器请求两次,第一次向服务器请求原始下载地址,第二次根据重定向指令向服务器请求重定向下载地址。在下载过程中或下载完成后,用户终端根据重定向下载地址中包含的校验参数字段获取用户校验码。另外,步骤S550可以根据预先设置的操作逻辑自动触发,例如,可以设置为用户终端在下载过程中自动获取用户校验码;或者,用户终端在下载结束后自动获取用户校验码。另外,由于本实施例主要应用于IE浏览器,而IE浏览器的内核不同于chrome浏览器或火狐浏览器的内核,因此,通过IE浏览器下载到的微端登录文件的文件类型通常为.application类型,其不同于实施例一中的后缀名为.exe的文件类型。通过IE浏览器下载到的.application类型的文件不需要用户执行双击操作即可自动运行。因此,与上一示例中的步骤S350不同,本实施例中的步骤S550通常不必根据用户发出的操作请求进行触发。Specifically, the user terminal downloads the micro-end login file through the download address fed back by the server. Since the download address is redirected, the user terminal needs to request the server twice, first requesting the original download address from the server, and secondly requesting the server to redirect the download address according to the redirect instruction. During the download process or after the download is completed, the user terminal obtains the user check code according to the check parameter field included in the redirected download address. In addition, the step S550 may be automatically triggered according to the preset operation logic. For example, the user terminal may be configured to automatically obtain the user verification code during the downloading process; or the user terminal automatically acquires the user verification code after the download is completed. In addition, since the embodiment is mainly applied to the IE browser, and the kernel of the IE browser is different from the kernel of the chrome browser or the Firefox browser, the file type of the micro-end login file downloaded through the IE browser is usually . The application type, which is different from the file type with the .exe extension in the first embodiment. The .application type file downloaded through IE does not need to be double-clicked by the user to run automatically. Therefore, unlike step S350 in the previous example, step S550 in the present embodiment generally does not have to be triggered according to an operation request issued by the user.
步骤S560:用户终端按照预设的校验规则对用户校验码进行校验。Step S560: The user terminal checks the user check code according to a preset check rule.
其中,本步骤可以根据步骤S550的触发而连续执行,也就是说,无论步骤S550采用何种方式触发,只要步骤S550执行完毕则自动触发步骤S560。或者,本步骤也可以在微端登录文件下载完毕后自动触发,也就是说,无论步骤S550采用何种方式触发,只要微端登录文件下载完毕则自动触发步骤S560。In this case, the step may be continuously performed according to the triggering of step S550, that is, regardless of the manner of triggering in step S550, step S560 is automatically triggered as long as step S550 is performed. Alternatively, this step can also be triggered automatically after the download of the micro-end login file is completed, that is, no matter what mode is triggered in step S550, step S560 is automatically triggered as long as the micro-end login file is downloaded.
具体地,本步骤中可通过以下规则中的至少一种规则进行校验:第一种校验规则为:判断用户校验码的生成时间是否超过预设的有效时间,若判断结果为否,则校验成功;若判断结果为是,则校验失败。例如,当预设的有效时间为1分钟,若用户校验码的生成时间超过一分钟则校验失败。第二种校验规则为:判断用户校验码的使用次数是否超过预设的有效次数,若判断结果为否,则校验成功;若判断结果为是,则校验失败。例如,当预设的有效次数为1次时,只要用户校验码已使用过则校验失败。第三种校验规则为:根据用户信息中包含的用户cookie确定与用户cookie对应的用户标识,如果确定出的用户标识与用户信息中包含的用户标识相同,则校验成功;反之,则校验失败。上述三种校验方式既可以单独使用,也可以结合使用。另外,除上述校验方式外,本领域技术人员还可以灵活设定其他的校验方式进行校验,只要能够确定用户校验码的有效性及其与用户信息之间的匹配关系即可。Specifically, in this step, the verification may be performed by using at least one of the following rules: the first verification rule is: determining whether the generation time of the user verification code exceeds a preset effective time, and if the determination result is no, The verification is successful; if the judgment result is yes, the verification fails. For example, when the preset effective time is 1 minute, if the generation time of the user check code exceeds one minute, the verification fails. The second verification rule is: determining whether the number of times the user check code is used exceeds a preset effective number. If the judgment result is negative, the verification succeeds; if the judgment result is yes, the verification fails. For example, when the preset effective number is 1 time, the verification fails as long as the user check code has been used. The third verification rule is: determining the user identifier corresponding to the user cookie according to the user cookie included in the user information, and if the determined user identifier is the same as the user identifier included in the user information, the verification succeeds; The test failed. The above three verification methods can be used alone or in combination. In addition, in addition to the above verification methods, those skilled in the art can flexibly set other verification methods for verification, as long as the validity of the user verification code and its matching relationship with the user information can be determined.
由此可见,本步骤的执行目的在于确定获取的用户校验码与用户终端侧的用户信息是否匹配,由于用户校验码是根据用户信息生成的,因此,通过用户校验码能够获取用户信息,将获取的用户信息与用户终端侧本地的用户信息进行比较即可确定用户校验码的合法性。It can be seen that the purpose of this step is to determine whether the obtained user check code matches the user information on the user terminal side. Since the user check code is generated according to the user information, the user check code can obtain the user information. The legality of the user check code can be determined by comparing the obtained user information with the local user information on the user terminal side.
步骤S570:当校验成功时,用户终端向服务器发送登录请求消息。Step S570: When the verification is successful, the user terminal sends a login request message to the server.
具体地,本步骤可以在校验成功后自动触发。其中,登录请求消息中可以包含上述的用户信息和/或用户校验码,以供服务器确定待登录的用户。Specifically, this step can be automatically triggered after the verification is successful. The login request message may include the foregoing user information and/or a user check code for the server to determine the user to be logged in.
步骤S580:服务器接收用户终端校验成功后发送的登录请求消息,根据登录请求消息 向用户终端返回登录响应消息。Step S580: The server receives the login request message sent after the user terminal successfully checks, according to the login request message. A login response message is returned to the user terminal.
其中,登录响应消息中包含根据用户信息和/或用户校验码生成的登录入口信息,通过登录入口信息即可自动完成登录。具体地,服务器根据用户信息和/或用户校验码能够确定待登录的用户当前在线的游戏名称、游戏区服、游戏平台以及用户cookie等信息,据此,服务器分配对应的登录入口信息,以实现该用户的自动登录。The login response message includes login entry information generated according to the user information and/or the user verification code, and the login is automatically completed by logging in the portal information. Specifically, the server can determine, according to the user information and/or the user check code, information about the current online game name, the game area service, the game platform, and the user cookie of the user to be logged in, according to which the server allocates the corresponding login entry information to Implement automatic login for this user.
步骤S590:用户终端根据服务器返回的登录响应消息自动登录微端。Step S590: The user terminal automatically logs in to the micro-end according to the login response message returned by the server.
具体实现时,本步骤可以通过用户终端上运行的微端服务端执行。微端服务端接收到登录响应消息后,根据其中包含的登录入口信息进行自动登录。其中,登录入口信息可以是登录链接等形式。In a specific implementation, the step can be performed by using a micro-end server running on the user terminal. After receiving the login response message, the micro-end server automatically logs in according to the login entry information contained therein. The login entry information may be in the form of a login link or the like.
由此可见,通过本发明实施例中的方式,一方面,通过服务器能够生成用于校验的用户校验码,另一方面,通过用户终端上的微端服务端能够完成用户信息的校验,并在校验通过后自动地向服务器请求用于登录微端游戏的登录入口信息,从而实现微端的自动登录,免去了用户人工输入用户信息并人工登录的繁琐操作,为用户节约了大量时间,避免了微端下载完成后因无暇登录而导致用户流失的现象发生。It can be seen that, by means of the embodiment of the present invention, on one hand, the server can generate a user check code for verification, and on the other hand, the user information can be verified by the micro-end server on the user terminal. And after the verification is passed, the login entry information for logging in the micro-end game is automatically requested from the server, thereby realizing the automatic login of the micro-end, eliminating the cumbersome operation of the user manually inputting the user information and manually logging in, saving the user a large amount of operations. Time, avoiding the phenomenon of user loss due to innocent login after the micro-end download is completed.
另外,本领域技术人员能够理解的是,在上述示例中,用户终端所执行的各项操作,例如,发送下载请求、对用户校验码进行校验和发送登录请求消息以及自动完成登录等,都是借助于微端服务端来实现的,微端服务端除了可以集成在用户终端本地之外,更优选地,为了便于对各个微端客户端进行统一管理,提升校验的准确性和效率,微端服务端还可以通过一台或多台单独的网络服务器实现。In addition, those skilled in the art can understand that, in the above examples, various operations performed by the user terminal, for example, sending a download request, verifying a user check code, sending a login request message, and automatically completing a login, etc., All of them are implemented by means of a micro-end server, and the micro-end server can be integrated in the local area of the user terminal. More preferably, in order to facilitate unified management of each micro-end client, the accuracy and efficiency of the verification are improved. The micro-end server can also be implemented by one or more separate web servers.
另外,上述示例主要应用于chrome浏览器或火狐浏览器,这两种浏览器的共同特征在于:下载的微端登录文件通常为.exe格式的文件,并且,在下载完成后,需由用户双击微端登录文件以触发微端的自动登录,因此,可通过对微端登录文件进行重命名的方式,使微端登录文件接收到双击类型的操作请求时自动获取并校验用户校验码,以便在校验通过后实现自动登录的效果。In addition, the above examples are mainly applied to the chrome browser or the Firefox browser. The common feature of the two browsers is that the downloaded micro-end login file is usually an .exe format file, and after the download is completed, the user has to double-click. The micro-end login file triggers the automatic login of the micro-end. Therefore, by renaming the micro-end login file, the micro-end login file automatically acquires and verifies the user verification code when receiving the double-click type operation request, so that The effect of automatic login after verification is passed.
上述示例主要应用于IE浏览器,通过该浏览器下载的微端登录文件通常为.application格式的文件,并且,在下载完成后,IE浏览器能够自动运行已下载的微端登录文件,无需用户执行双击操作,基于IE浏览器的上述特性,可对微端登录文件的下载地址进行重定向,以便用户终端在下载过程中通过重定向后的下载地址获取用户校验码并自动进行校验。The above example is mainly applied to the IE browser. The micro-end login file downloaded through the browser is usually a file in the .application format, and after the download is completed, the IE browser can automatically run the downloaded micro-end login file without the user. The double-click operation is performed. Based on the above features of the IE browser, the download address of the micro-end login file can be redirected, so that the user terminal obtains the user verification code through the redirected download address during the download process and automatically performs verification.
除上述几种浏览器之外,本发明还可以应用于其他的各类浏览器,并根据浏览器的特性相应调整上述实施例中的实现细节,只要能够实现服务器将用户校验码传送给用户终端,以供用户终端进行校验的目的即可。另外,为了使本发明能够兼容各种类型的浏览器,本发明还可以包含下述的实施例,以便将上述示例相结合,具体地,在本发明实施例中,首先执行上述示例中的步骤S310至步骤S330,然后,服务器判断用户终端侧的浏览器的内核类型,如果判断出浏览器的内核类型的第一类型(即chrome类型或火狐类型),则执行上述示例中的步骤S340至步骤S390;如果判断出浏览器的内核类型的第二类型(即IE类型),则执行上述示例中的步骤S540至步骤S590。由此可见,在本申请实施例中,增加了判断浏览器内核类型的操作步骤,从而能够灵活适用于各种类型的浏览器。In addition to the above-mentioned browsers, the present invention can also be applied to other types of browsers, and the implementation details in the above embodiments are adjusted according to the characteristics of the browser, as long as the server can transmit the user verification code to the user. The terminal can be used for the purpose of verification by the user terminal. In addition, in order to enable the present invention to be compatible with various types of browsers, the present invention may also include the following embodiments in order to combine the above examples. Specifically, in the embodiment of the present invention, the steps in the above examples are first performed. S310 to step S330, then, the server determines the kernel type of the browser on the user terminal side, and if it determines the first type of the kernel type of the browser (ie, the chrome type or the Firefox type), performs step S340 to the step in the above example. S390; if it is determined that the second type of the kernel type of the browser (ie, the IE type), step S540 to step S590 in the above example are performed. Therefore, in the embodiment of the present application, the operation steps of determining the browser kernel type are added, so that the browser can be flexibly applied to various types.
图6示出了本发明一个实施例提供的微端的自动登录装置的结构图。如图6所示,该装置包括:FIG. 6 is a structural diagram of an automatic login device for a micro-end according to an embodiment of the present invention. As shown in Figure 6, the device includes:
发送模块61,适于向服务器发送下载请求,以供所述服务器根据所述下载请求获取待下载的微端登录文件以及用户信息; The sending module 61 is adapted to send a download request to the server, where the server obtains the micro-end login file to be downloaded and the user information according to the download request;
获取模块62,适于在下载所述微端登录文件时,获取所述服务器根据所述用户信息生成的用户校验码;The obtaining module 62 is configured to acquire, when the micro-end login file is downloaded, a user check code generated by the server according to the user information;
校验模块63,适于在下载完成后按照预设的校验规则对所述用户校验码进行校验,当校验成功时,向服务器发送登录请求消息;The verification module 63 is configured to verify the user verification code according to a preset verification rule after the download is completed, and send a login request message to the server when the verification is successful;
登录模块64,适于根据服务器返回的登录响应消息自动登录微端。The login module 64 is adapted to automatically log in to the microend according to the login response message returned by the server.
可选地,所述获取模块62具体用于:根据所述微端登录文件的文件名获取用户校验码。Optionally, the obtaining module 62 is specifically configured to: obtain a user check code according to the file name of the micro-end login file.
可选地,所述下载请求以及所述登录请求消息是通过chrome浏览器或火狐浏览器发送的请求消息。Optionally, the download request and the login request message are request messages sent by a chrome browser or a Firefox browser.
可选地,所述获取模块62具体用于:根据重定向后的微端登录文件的下载地址中包含的校验参数字段获取用户校验码。Optionally, the obtaining module 62 is specifically configured to: obtain the user check code according to the check parameter field included in the download address of the redirected micro-end login file.
可选地,所述下载请求以及所述登录请求消息是通过IE浏览器发送的请求消息。Optionally, the download request and the login request message are request messages sent by an IE browser.
可选地,所述用户信息包括以下信息中的至少一项:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。Optionally, the user information includes at least one of the following: a current system time, a gaming platform, a gaming area, a user identification, and a user cookie.
可选地,所述预设的校验规则包括以下规则中的至少一个:Optionally, the preset verification rule includes at least one of the following rules:
判断用户校验码的生成时间是否超过预设的有效时间,若判断结果为否,则校验成功;若判断结果为是,则校验失败;Determining whether the generation time of the user check code exceeds the preset valid time, if the judgment result is no, the verification is successful; if the judgment result is yes, the verification fails;
判断用户校验码的使用次数是否超过预设的有效次数,若判断结果为否,则校验成功;若判断结果为是,则校验失败;Determining whether the number of times the user check code is used exceeds a preset effective number. If the judgment result is no, the verification is successful; if the judgment result is yes, the verification fails;
根据用户信息中包含的用户cookie确定与所述用户cookie对应的用户标识,如果所述用户cookie对应的用户标识与所述用户信息中包含的用户标识相同,则校验成功;反之,则校验失败。Determining a user identifier corresponding to the user cookie according to the user cookie included in the user information, if the user identifier corresponding to the user cookie is the same as the user identifier included in the user information, the verification succeeds; failure.
可选地,所述登录请求消息中包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。Optionally, the login request message includes the user information and/or the user verification code, and the login response message includes a login generated according to the user information and/or the user verification code. Entrance information.
图7示出了本发明另一个实施例提供的微端的自动登录装置的结构图。如图7所示,该装置包括:FIG. 7 is a structural diagram of an automatic login device for a micro-end according to another embodiment of the present invention. As shown in Figure 7, the device includes:
接收模块71,适于接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;The receiving module 71 is adapted to receive a download request sent by the user terminal, and obtain the micro-end login file to be downloaded and the user information according to the download request.
校验码生成模块72,适于根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件进行重命名,将重命名后的微端登录文件提供给用户终端下载,以供所述用户终端在下载完成后根据所述用户校验码进行校验;The check code generating module 72 is configured to generate a user check code according to the user information, and rename the micro-end login file to be downloaded according to the user check code, and rename the renamed micro-end login file. Providing to the user terminal for downloading, so that the user terminal performs verification according to the user check code after the download is completed;
登录响应模块73,适于接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。The login response module 73 is adapted to receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, for the user terminal to use the login response message according to the login response message. Automatically log in to the micro-end.
可选地,所述校验码生成模块72具体用于:根据预设的运算规则对所述用户信息进行运算,得到第一运算结果,根据所述第一运算结果生成所述用户校验码;其中,所述运算规则包括以下算法中的至少一种:md5算法、SHA算法、哈希算法、RSA算法和DES算法,且所述用户信息包括以下信息中的至少一种:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。 Optionally, the check code generating module 72 is configured to: perform operations on the user information according to a preset operation rule, obtain a first operation result, and generate the user check code according to the first operation result. The operation rule includes at least one of the following algorithms: an md5 algorithm, a SHA algorithm, a hash algorithm, an RSA algorithm, and a DES algorithm, and the user information includes at least one of the following information: current system time, Game platform, game zone service, user identification, and user cookies.
可选地,所述校验码生成模块72具体用于:从所述第一运算结果中截取预设位数作为第二运算结果,将所述第二运算结果作为所述用户校验码。Optionally, the check code generating module 72 is configured to: intercept a preset number of bits from the first operation result as a second operation result, and use the second operation result as the user check code.
可选地,所述校验码生成模块72具体用于:判断所述第二运算结果是否与已有的用户校验码重复;若判断结果为否,将所述第二运算结果作为所述用户校验码;若判断结果为是,则从所述第一运算结果中重新截取预设位数,直至所述重新截取的预设位数与已有的用户校验码不重复时,将所述重新截取的预设位数作为所述用户校验码。Optionally, the check code generating module 72 is specifically configured to: determine whether the second operation result is repeated with an existing user check code; if the determination result is no, the second operation result is used as the a user check code; if the result of the determination is yes, the preset number of bits is re-intercepted from the first operation result until the re-intercepted preset number of bits does not overlap with the existing user check code, The re-intercepted preset number of bits is used as the user check code.
可选地,该装置包括:设置模块74,适于预先设置用户校验码的有效时间和/或有效次数,并且,所述设置模块在生成用户校验码后可以记录所述用户校验码的生成时间和/或使用次数,将生成时间超过有效时间和/或使用次数超过有效次数的用户校验码的状态置为无效状态。Optionally, the device includes: a setting module 74, configured to preset a valid time and/or a valid number of times of the user check code, and the setting module may record the user check code after generating the user check code The generation time and/or the number of uses, the state of the user check code whose generation time exceeds the effective time and/or the number of uses exceeds the effective number is set to an invalid state.
其中,所述登录请求消息中包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。其中,所述下载请求以及所述登录请求消息是通过chrome浏览器或火狐浏览器发送的请求消息。The login request message includes the user information and/or the user check code, and the login response message includes login entry information generated according to the user information and/or the user check code. . The download request and the login request message are request messages sent by a chrome browser or a Firefox browser.
图8示出了本发明又一个实施例提供的微端的自动登录装置的结构图。如图8所示,该装置包括:FIG. 8 is a structural diagram of a micro-end automatic login device according to still another embodiment of the present invention. As shown in Figure 8, the device includes:
接收模块81,适于接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;The receiving module 81 is adapted to receive a download request sent by the user terminal, and obtain the micro-end login file to be downloaded and the user information according to the download request.
校验码生成模块82,适于根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件的下载地址进行重定向,使重定向后的下载地址中包含所述用户校验码,以供所述用户终端在下载完成后根据所述用户校验码进行校验;The check code generating module 82 is configured to generate a user check code according to the user information, and redirect the download address of the micro-end login file to be downloaded according to the user check code, so that the redirected download is performed. The user check code is included in the address, so that the user terminal performs verification according to the user check code after the download is completed;
登录响应模块83,适于接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。The login response module 83 is adapted to receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, for the user terminal to use the login response message according to the login response message. Automatically log in to the micro-end.
可选地,所述校验码生成模块82具体用于:在所述待下载的微端登录文件的下载地址中添加校验参数字段,将所述校验参数字段的值设置为所述用户校验码的值;通过页面跳转方式使所述待下载的微端登录文件的下载地址跳转为添加所述校验参数字段后的下载地址。Optionally, the check code generating module 82 is configured to: add a check parameter field to the download address of the micro-end login file to be downloaded, and set a value of the check parameter field to the user. The value of the check code is obtained by the page jump mode, and the download address of the micro-end login file to be downloaded is jumped to the download address after the check parameter field is added.
可选地,所述校验码生成模块82具体用于:根据预设的运算规则对所述用户信息进行运算,得到第一运算结果,根据所述第一运算结果生成所述用户校验码;其中,所述运算规则包括以下算法中的至少一种:md5算法、SHA算法、哈希算法、RSA算法和DES算法,且所述用户信息包括以下信息中的至少一种:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。Optionally, the check code generating module 82 is specifically configured to: perform operations on the user information according to a preset operation rule, obtain a first operation result, and generate the user check code according to the first operation result. The operation rule includes at least one of the following algorithms: an md5 algorithm, a SHA algorithm, a hash algorithm, an RSA algorithm, and a DES algorithm, and the user information includes at least one of the following information: current system time, Game platform, game zone service, user identification, and user cookies.
可选地,所述校验码生成模块82具体用于:从所述第一运算结果中截取预设位数作为第二运算结果,将所述第二运算结果作为所述用户校验码。Optionally, the check code generating module 82 is specifically configured to: intercept a preset number of bits from the first operation result as a second operation result, and use the second operation result as the user check code.
可选地,所述校验码生成模块82具体用于:判断所述第二运算结果是否与已有的用户校验码重复;若判断结果为否,将所述第二运算结果作为所述用户校验码;若判断结果为是,则从所述第一运算结果中重新截取预设位数,直至所述重新截取的预设位数与已有的用户校验码不重复时,将所述重新截取的预设位数作为所述用户校验码。Optionally, the check code generating module 82 is specifically configured to: determine whether the second operation result is repeated with an existing user check code; if the determination result is no, the second operation result is used as the a user check code; if the result of the determination is yes, the preset number of bits is re-intercepted from the first operation result until the re-intercepted preset number of bits does not overlap with the existing user check code, The re-intercepted preset number of bits is used as the user check code.
可选地,还可以包括:设置模块84,适于预先设置用户校验码的有效时间和/或有效次数,并且,所述设置模块在生成用户校验码后可以记录所述用户校验码的生成时间和/或使用次数,将生成时间超过有效时间和/或使用次数超过有效次数的用户校验码的状态置 为无效状态。Optionally, the method may further include: a setting module 84, configured to preset a valid time and/or a valid number of times of the user check code, and the setting module may record the user check code after generating the user check code. The generation time and/or the number of uses, the generation of the user check code whose time exceeds the effective time and/or the number of uses exceeds the effective number of times Invalid state.
其中,所述登录请求消息中可以包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。其中,所述下载请求以及所述登录请求消息是通过IE浏览器发送的请求消息。The login request message may include the user information and/or the user check code, and the login response message includes a login entry generated according to the user information and/or the user check code. information. The download request and the login request message are request messages sent by an IE browser.
上述各个模块的具体结构和工作原理可参照方法实施例中相应步骤的描述,此处不再赘述。For the specific structure and working principle of each module, reference may be made to the description of the corresponding steps in the method embodiments, and details are not described herein again.
综上所述,在本发明提供的微端的自动登录方法及装置中,首先,服务器能够根据用户终端发送的下载请求获取到用户信息并据此生成用户校验码,然后,能够在用户终端下载微端登录文件的过程中将该用户校验码提供给用户终端,以便用户终端根据该用户校验码对用户信息进行校验,并在校验成功后自动向服务器发送登录请求消息从而进行登录。由此可见,在本发明中,将服务器根据用户信息生成的用户校验码发送给用户终端校验,从而使用户终端能够在校验成功后自动根据用户校验码对应的用户信息向服务器发送登录请求消息进而自动登录,由此避免了现有技术中需由用户人工输入用户信息并人工登录的繁琐操作,节约了用户时间。In summary, in the micro-end automatic login method and apparatus provided by the present invention, first, the server can acquire the user information according to the download request sent by the user terminal, and generate a user verification code according to the data, and then can download the user verification code. The user check code is provided to the user terminal during the process of logging in the file, so that the user terminal checks the user information according to the user check code, and automatically sends a login request message to the server to log in after the verification succeeds. . Therefore, in the present invention, the user check code generated by the server according to the user information is sent to the user terminal for verification, so that the user terminal can automatically send the user information corresponding to the user check code to the server after the verification succeeds. The login request message is further automatically logged in, thereby avoiding the cumbersome operation in the prior art that the user needs to manually input the user information and manually log in, which saves user time.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems can also be used with the teaching based on the teachings herein. The structure required to construct such a system is apparent from the above description. Moreover, the invention is not directed to any particular programming language. It is to be understood that the invention may be embodied in a variety of programming language, and the description of the specific language has been described above in order to disclose the preferred embodiments of the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, the various features of the invention are sometimes grouped together into a single embodiment, in the above description of the exemplary embodiments of the invention, Figure, or a description of it. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed invention requires more features than those recited in the claims. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed herein. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the embodiments, and each of the claims as a separate embodiment of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components. In addition to such features and/or at least some of the processes or units being mutually exclusive, any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined. Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments and not other features, combinations of features of different embodiments are intended to be within the scope of the present invention. And different embodiments are formed. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软 件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware or in software running on one or more processors Module implementations, or in combinations of them. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in accordance with embodiments of the present invention. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
例如,图9示出了可以实现根据本发明的微端的自动登录方法的计算设备。该计算设备传统上包括处理器910和以存储器920形式的程序产品或者可读介质。存储器920可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM或者ROM之类的电子存储器。存储器920具有用于执行上述方法中的任何方法步骤的程序代码931的存储空间930。例如,用于程序代码的存储空间930可以包括分别用于实现上面的方法中的各种步骤的各个程序代码931。这些程序代码可以从一个或者多个程序产品中读出或者写入到这一个或者多个程序产品中。这些程序产品包括诸如存储卡之类的程序代码载体。这样的程序产品通常为如参考图10所述的便携式或者固定存储单元。该存储单元可以具有与图9的计算设备中的存储器920类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括可读代码931’,即可以由例如诸如910之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。For example, Figure 9 illustrates a computing device that can implement an automatic login method for microends in accordance with the present invention. The computing device conventionally includes a processor 910 and a program product or readable medium in the form of a memory 920. Memory 920 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, or ROM. Memory 920 has a memory space 930 for program code 931 for performing any of the method steps described above. For example, storage space 930 for program code may include various program code 931 for implementing various steps in the above methods, respectively. These program codes can be read from or written to one or more program products. These program products include program code carriers such as memory cards. Such a program product is typically a portable or fixed storage unit as described with reference to FIG. The storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 920 in the computing device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit includes readable code 931', ie, code that can be read by a processor, such as 910, which, when executed by a computing device, causes the computing device to perform various steps in the methods described above. .
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to be limiting, and that the invention may be devised without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as a limitation. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读取存储介质中,比如ROM/RAM、磁碟、光盘等。One of ordinary skill in the art can understand that all or part of the steps of implementing the foregoing embodiments may be completed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, such as a ROM/RAM or a disk. , CD, etc.
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above described specific embodiments of the present invention are further described in detail, and are intended to be illustrative of the embodiments of the present invention. All modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (48)

  1. 一种微端的自动登录方法,包括:A micro-end automatic login method, including:
    向服务器发送下载请求,以供所述服务器根据所述下载请求获取待下载的微端登录文件以及用户信息;Sending a download request to the server, so that the server acquires the micro-end login file to be downloaded and the user information according to the download request;
    在下载所述微端登录文件时,获取所述服务器根据所述用户信息生成的用户校验码;Obtaining a user verification code generated by the server according to the user information when downloading the micro-end login file;
    在下载完成后按照预设的校验规则对所述用户校验码进行校验,当校验成功时,向服务器发送登录请求消息;After the download is completed, the user verification code is verified according to a preset verification rule, and when the verification is successful, a login request message is sent to the server;
    根据服务器返回的登录响应消息自动登录微端。The micro-end is automatically logged according to the login response message returned by the server.
  2. 根据权利要求1所述的方法,其中,所述获取所述服务器根据所述用户信息生成的用户校验码的步骤具体包括:根据所述微端登录文件的文件名获取用户校验码。The method of claim 1, wherein the step of acquiring the user verification code generated by the server according to the user information comprises: obtaining a user verification code according to a file name of the micro-end login file.
  3. 根据权利要求2所述的方法,其中,所述下载请求以及所述登录请求消息通过chrome浏览器或火狐浏览器发送。The method of claim 2, wherein the download request and the login request message are sent via a chrome browser or a Firefox browser.
  4. 根据权利要求1所述的方法,其中,所述获取所述服务器根据所述用户信息生成的用户校验码的步骤具体包括:根据重定向后的微端登录文件的下载地址中包含的校验参数字段获取用户校验码。The method according to claim 1, wherein the step of acquiring the user check code generated by the server according to the user information comprises: according to the check included in the download address of the redirected micro-end login file The parameter field gets the user check code.
  5. 根据权利要求4所述的方法,其中,所述下载请求以及所述登录请求消息通过IE浏览器发送。The method of claim 4 wherein the download request and the login request message are sent via an IE browser.
  6. 根据权利要求1-5任一所述的方法,其中,所述用户信息包括以下信息中的至少一项:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。The method of any of claims 1-5, wherein the user information comprises at least one of the following: a current system time, a gaming platform, a gaming area, a user identification, and a user cookie.
  7. 根据权利要求6所述的方法,其中,所述预设的校验规则包括以下规则中的至少一个:The method of claim 6, wherein the predetermined verification rule comprises at least one of the following rules:
    判断用户校验码的生成时间是否超过预设的有效时间,若判断结果为否,则校验成功;若判断结果为是,则校验失败;Determining whether the generation time of the user check code exceeds the preset valid time, if the judgment result is no, the verification is successful; if the judgment result is yes, the verification fails;
    判断用户校验码的使用次数是否超过预设的有效次数,若判断结果为否,则校验成功;若判断结果为是,则校验失败;Determining whether the number of times the user check code is used exceeds a preset effective number. If the judgment result is no, the verification is successful; if the judgment result is yes, the verification fails;
    根据用户信息中包含的用户cookie确定与所述用户cookie对应的用户标识,如果所述用户cookie对应的用户标识与所述用户信息中包含的用户标识相同,则校验成功;反之,则校验失败。Determining a user identifier corresponding to the user cookie according to the user cookie included in the user information, if the user identifier corresponding to the user cookie is the same as the user identifier included in the user information, the verification succeeds; failure.
  8. 根据权利要求1-7任一所述的方法,其中,所述登录请求消息中包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。The method according to any one of claims 1 to 7, wherein the login request message includes the user information and/or the user check code, and the login response message includes according to the user information and / or login entry information generated by the user check code.
  9. 一种微端的自动登录方法,包括:A micro-end automatic login method, including:
    接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;Receiving a download request sent by the user terminal, and acquiring the micro-end login file to be downloaded and the user information according to the download request;
    根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件进行重命名,将重命名后的微端登录文件提供给用户终端下载,以供所述用户终端在下载完成后根据所述用户校验码进行校验;Generating a user check code according to the user information, renaming the micro-end login file to be downloaded according to the user check code, and providing the renamed micro-end login file to the user terminal for downloading, for providing The user terminal performs verification according to the user check code after the download is completed;
    接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。 After receiving the login request message sent by the user terminal, the login request message is returned to the user terminal according to the login request message, so that the user terminal automatically logs in to the microend according to the login response message.
  10. 根据权利要求9所述的方法,其中,所述根据所述用户信息生成用户校验码的实现方式包括:根据预设的运算规则对所述用户信息进行运算,得到第一运算结果,根据所述第一运算结果生成所述用户校验码;The method of claim 9, wherein the implementing the user verification code according to the user information comprises: performing operation on the user information according to a preset operation rule to obtain a first operation result, according to the method Generating the user verification code by the first operation result;
    其中,所述运算规则包括以下算法中的至少一种:md5算法、SHA算法、哈希算法、RSA算法和DES算法,且所述用户信息包括以下信息中的至少一种:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。The operation rule includes at least one of the following algorithms: an md5 algorithm, a SHA algorithm, a hash algorithm, an RSA algorithm, and a DES algorithm, and the user information includes at least one of the following information: current system time, game Platform, game zone service, user ID, and user cookie.
  11. 根据权利要求10所述的方法,其中,根据所述第一运算结果生成所述用户校验码的步骤具体包括:从所述第一运算结果中截取预设位数作为第二运算结果,将所述第二运算结果作为所述用户校验码。The method of claim 10, wherein the step of generating the user check code according to the first operation result comprises: intercepting a preset number of bits from the first operation result as a second operation result, The second operation result is used as the user check code.
  12. 根据权利要求11所述的方法,其中,所述从所述第一运算结果中截取预设位数作为第二运算结果的步骤具体包括:The method of claim 11, wherein the step of extracting the preset number of bits from the first operation result as the second operation result comprises:
    判断所述第二运算结果是否与已有的用户校验码重复;若判断结果为否,将所述第二运算结果作为所述用户校验码;若判断结果为是,则从所述第一运算结果中重新截取预设位数,直至所述重新截取的预设位数与已有的用户校验码不重复时,将所述重新截取的预设位数作为所述用户校验码。Determining whether the second operation result is overlapped with an existing user verification code; if the determination result is no, the second operation result is used as the user verification code; if the determination result is yes, then from the Retrieving the preset number of bits in an operation result, until the re-intercepted preset number of bits does not overlap with the existing user check code, using the re-intercepted preset number of bits as the user check code .
  13. 根据权利要求9-12任一所述的方法,其中,还包括步骤:预先设置用户校验码的有效时间和/或有效次数,并且,生成用户校验码后记录所述用户校验码的生成时间和/或使用次数,将生成时间超过有效时间和/或使用次数超过有效次数的用户校验码的状态置为无效状态。The method according to any one of claims 9-12, further comprising the steps of: presetting the effective time and/or the effective number of times of the user check code, and recording the user check code after generating the user check code The time and/or the number of times of use are generated, and the state of the user check code whose generation time exceeds the effective time and/or the number of uses exceeds the effective number is set to an invalid state.
  14. 根据权利要求13任一所述的方法,其中,所述登录请求消息中包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。The method according to any one of claims 13 to 3, wherein the login request message includes the user information and/or the user check code, and the login response message includes the user information and/or Login entry information generated by the user check code.
  15. 根据权利要求14任一所述的方法,其中,所述下载请求以及所述登录请求消息通过chrome浏览器或火狐浏览器发送。The method of any of claims 14 to 14, wherein the download request and the login request message are sent via a chrome browser or a Firefox browser.
  16. 一种微端的自动登录方法,包括:A micro-end automatic login method, including:
    接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;Receiving a download request sent by the user terminal, and acquiring the micro-end login file to be downloaded and the user information according to the download request;
    根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件的下载地址进行重定向,使重定向后的下载地址中包含所述用户校验码,以供所述用户终端在下载完成后根据所述用户校验码进行校验;Generating a user check code according to the user information, and redirecting the download address of the micro-end login file to be downloaded according to the user check code, so that the redirected download address includes the user check code For the user terminal to perform verification according to the user check code after the download is completed;
    接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。After receiving the login request message sent by the user terminal, the login request message is returned to the user terminal according to the login request message, so that the user terminal automatically logs in to the microend according to the login response message.
  17. 根据权利要求16所述的方法,其中,所述根据所述用户校验码对所述待下载的微端登录文件的下载地址进行重定向的步骤包括:The method of claim 16, wherein the step of redirecting the download address of the micro-end login file to be downloaded according to the user check code comprises:
    在所述待下载的微端登录文件的下载地址中添加校验参数字段,将所述校验参数字段的值设置为所述用户校验码的值;Adding a check parameter field to the download address of the micro-end login file to be downloaded, and setting a value of the check parameter field to a value of the user check code;
    通过页面跳转方式使所述待下载的微端登录文件的下载地址跳转为添加所述校验参数字段后的下载地址。The download address of the micro-end login file to be downloaded is jumped to the download address after the check parameter field is added.
  18. 根据权利要求15-17任一所述的方法,其中,所述根据所述用户信息生成用户校验码的实现方式包括:根据预设的运算规则对所述用户信息进行运算,得到第一运算结果, 根据所述第一运算结果生成所述用户校验码;The method according to any one of claims 15-17, wherein the implementing the user verification code according to the user information comprises: performing operation on the user information according to a preset operation rule to obtain a first operation As a result, Generating the user check code according to the first operation result;
    其中,所述运算规则包括以下算法中的至少一种:md5算法、SHA算法、哈希算法、RSA算法和DES算法,且所述用户信息包括以下信息中的至少一种:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。The operation rule includes at least one of the following algorithms: an md5 algorithm, a SHA algorithm, a hash algorithm, an RSA algorithm, and a DES algorithm, and the user information includes at least one of the following information: current system time, game Platform, game zone service, user ID, and user cookie.
  19. 根据权利要求18所述的方法,其中,根据所述第一运算结果生成所述用户校验码的步骤具体包括:从所述第一运算结果中截取预设位数作为第二运算结果,将所述第二运算结果作为所述用户校验码。The method of claim 18, wherein the step of generating the user check code according to the first operation result comprises: intercepting a preset number of bits from the first operation result as a second operation result, The second operation result is used as the user check code.
  20. 根据权利要求19所述的方法,其中,所述从所述第一运算结果中截取预设位数作为第二运算结果的步骤具体包括:The method of claim 19, wherein the step of extracting the preset number of bits from the first operation result as the second operation result comprises:
    判断所述第二运算结果是否与已有的用户校验码重复;若判断结果为否,将所述第二运算结果作为所述用户校验码;若判断结果为是,则从所述第一运算结果中重新截取预设位数,直至所述重新截取的预设位数与已有的用户校验码不重复时,将所述重新截取的预设位数作为所述用户校验码。Determining whether the second operation result is overlapped with an existing user verification code; if the determination result is no, the second operation result is used as the user verification code; if the determination result is yes, then from the Retrieving the preset number of bits in an operation result, until the re-intercepted preset number of bits does not overlap with the existing user check code, using the re-intercepted preset number of bits as the user check code .
  21. 根据权利要求16-20任一所述的方法,其中,包括步骤:预先设置用户校验码的有效时间和/或有效次数,并且,生成用户校验码后记录所述用户校验码的生成时间和/或使用次数,将生成时间超过有效时间和/或使用次数超过有效次数的用户校验码的状态置为无效状态。The method according to any one of claims 16 to 20, comprising the steps of: presetting the effective time and/or the effective number of times of the user check code, and recording the generation of the user check code after generating the user check code The time and/or the number of uses sets the state of the user check code whose generation time exceeds the effective time and/or the number of uses exceeds the effective number to the invalid state.
  22. 根据权利要求21所述的方法,其中,所述登录请求消息中包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。The method according to claim 21, wherein the login request message includes the user information and/or the user check code, and the login response message includes the user information and/or the Login entry information generated by the user check code.
  23. 根据权利要求22所述的方法,其中,所述下载请求以及所述登录请求消息通过IE浏览器发送。The method of claim 22, wherein the download request and the login request message are sent by an IE browser.
  24. 一种微端的自动登录装置,包括:A micro-end automatic login device, comprising:
    发送模块,适于向服务器发送下载请求,以供所述服务器根据所述下载请求获取待下载的微端登录文件以及用户信息;a sending module, configured to send a download request to the server, where the server obtains the micro-end login file to be downloaded and the user information according to the download request;
    获取模块,适于在下载所述微端登录文件时,获取所述服务器根据所述用户信息生成的用户校验码;An obtaining module, configured to acquire a user verification code generated by the server according to the user information when downloading the micro-end login file;
    校验模块,适于在下载完成后按照预设的校验规则对所述用户校验码进行校验,当校验成功时,向服务器发送登录请求消息;The verification module is configured to verify the user verification code according to a preset verification rule after the download is completed, and send a login request message to the server when the verification is successful;
    登录模块,适于根据服务器返回的登录响应消息自动登录微端。The login module is adapted to automatically log in to the micro-end according to the login response message returned by the server.
  25. 根据权利要求24所述的装置,其中,所述获取模块具体用于:根据所述微端登录文件的文件名获取用户校验码。The apparatus according to claim 24, wherein the obtaining module is specifically configured to: obtain a user check code according to a file name of the micro-end login file.
  26. 根据权利要求25所述的装置,其中,所述下载请求以及所述登录请求消息是通过chrome浏览器或火狐浏览器发送的请求消息。The apparatus of claim 25, wherein the download request and the login request message are request messages sent via a chrome browser or a Firefox browser.
  27. 根据权利要求24所述的装置,其中,所述获取模块具体用于:根据重定向后的微端登录文件的下载地址中包含的校验参数字段获取用户校验码。The apparatus according to claim 24, wherein the obtaining module is configured to: obtain a user check code according to a check parameter field included in a download address of the redirected micro-end login file.
  28. 根据权利要求27所述的装置,其中,所述下载请求以及所述登录请求消息是通过IE浏览器发送的请求消息。The apparatus of claim 27, wherein the download request and the login request message are request messages transmitted through an IE browser.
  29. 根据权利要求24-28任一所述的装置,其中,所述用户信息包括以下信息中的至 少一项:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。The apparatus according to any one of claims 24 to 28, wherein said user information comprises to One less: current system time, game platform, game zone service, user ID, and user cookie.
  30. 根据权利要求29所述的装置,其中,所述预设的校验规则包括以下规则中的至少一个:The apparatus of claim 29, wherein the preset verification rule comprises at least one of the following rules:
    判断用户校验码的生成时间是否超过预设的有效时间,若判断结果为否,则校验成功;若判断结果为是,则校验失败;Determining whether the generation time of the user check code exceeds the preset valid time, if the judgment result is no, the verification is successful; if the judgment result is yes, the verification fails;
    判断用户校验码的使用次数是否超过预设的有效次数,若判断结果为否,则校验成功;若判断结果为是,则校验失败;Determining whether the number of times the user check code is used exceeds a preset effective number. If the judgment result is no, the verification is successful; if the judgment result is yes, the verification fails;
    根据用户信息中包含的用户cookie确定与所述用户cookie对应的用户标识,如果所述用户cookie对应的用户标识与所述用户信息中包含的用户标识相同,则校验成功;反之,则校验失败。Determining a user identifier corresponding to the user cookie according to the user cookie included in the user information, if the user identifier corresponding to the user cookie is the same as the user identifier included in the user information, the verification succeeds; failure.
  31. 根据权利要求24-30任一所述的装置,其中,所述登录请求消息中包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。The device according to any one of claims 24-30, wherein the login request message includes the user information and/or the user check code, and the login response message includes according to the user information and / or login entry information generated by the user check code.
  32. 一种微端的自动登录装置,包括:A micro-end automatic login device, comprising:
    接收模块,适于接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;The receiving module is adapted to receive a download request sent by the user terminal, and obtain the micro-end login file to be downloaded and the user information according to the download request;
    校验码生成模块,适于根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件进行重命名,将重命名后的微端登录文件提供给用户终端下载,以供所述用户终端在下载完成后根据所述用户校验码进行校验;a check code generating module, configured to generate a user check code according to the user information, rename the micro-end login file to be downloaded according to the user check code, and provide the renamed micro-end login file Downloading to the user terminal, for the user terminal to perform verification according to the user check code after the download is completed;
    登录响应模块,适于接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。The login response module is configured to receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, so that the user terminal automatically starts according to the login response message. Log in to the micro-end.
  33. 根据权利要求32所述的装置,其中,所述校验码生成模块具体用于:根据预设的运算规则对所述用户信息进行运算,得到第一运算结果,根据所述第一运算结果生成所述用户校验码;The device according to claim 32, wherein the check code generating module is configured to: perform operation on the user information according to a preset operation rule, obtain a first operation result, and generate according to the first operation result The user check code;
    其中,所述运算规则包括以下算法中的至少一种:md5算法、SHA算法、哈希算法、RSA算法和DES算法,且所述用户信息包括以下信息中的至少一种:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。The operation rule includes at least one of the following algorithms: an md5 algorithm, a SHA algorithm, a hash algorithm, an RSA algorithm, and a DES algorithm, and the user information includes at least one of the following information: current system time, game Platform, game zone service, user ID, and user cookie.
  34. 根据权利要求33所述的装置,其中,所述校验码生成模块具体用于:从所述第一运算结果中截取预设位数作为第二运算结果,将所述第二运算结果作为所述用户校验码。The apparatus according to claim 33, wherein the check code generating module is configured to: intercept a preset number of bits from the first operation result as a second operation result, and use the second operation result as a User check code.
  35. 根据权利要求34所述的装置,其中,所述校验码生成模块具体用于:The apparatus according to claim 34, wherein the check code generating module is specifically configured to:
    判断所述第二运算结果是否与已有的用户校验码重复;若判断结果为否,将所述第二运算结果作为所述用户校验码;若判断结果为是,则从所述第一运算结果中重新截取预设位数,直至所述重新截取的预设位数与已有的用户校验码不重复时,将所述重新截取的预设位数作为所述用户校验码。Determining whether the second operation result is overlapped with an existing user verification code; if the determination result is no, the second operation result is used as the user verification code; if the determination result is yes, then from the Retrieving the preset number of bits in an operation result, until the re-intercepted preset number of bits does not overlap with the existing user check code, using the re-intercepted preset number of bits as the user check code .
  36. 根据权利要求32-35任一所述的装置,其中,包括:设置模块,适于预先设置用户校验码的有效时间和/或有效次数,并且,所述设置模块在生成用户校验码后记录所述用户校验码的生成时间和/或使用次数,将生成时间超过有效时间和/或使用次数超过有效次数的用户校验码的状态置为无效状态。 The apparatus according to any one of claims 32-35, comprising: a setting module adapted to preset an effective time and/or an effective number of times of the user check code, and wherein the setting module generates the user check code The generation time and/or the number of uses of the user check code are recorded, and the state of the user check code whose generation time exceeds the effective time and/or the number of uses exceeds the effective number is set to an invalid state.
  37. 根据权利要求36所述的装置,其中,所述登录请求消息中包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。The apparatus according to claim 36, wherein said login request message includes said user information and/or said user check code, and said login response message includes said user information and/or said Login entry information generated by the user check code.
  38. 根据权利要求37所述的装置,其中,所述下载请求以及所述登录请求消息是通过chrome浏览器或火狐浏览器发送的请求消息The apparatus according to claim 37, wherein said download request and said login request message are request messages transmitted through a chrome browser or a Firefox browser
  39. 一种微端的自动登录装置,包括:A micro-end automatic login device, comprising:
    接收模块,适于接收用户终端发送的下载请求,根据所述下载请求获取待下载的微端登录文件以及用户信息;The receiving module is adapted to receive a download request sent by the user terminal, and obtain the micro-end login file to be downloaded and the user information according to the download request;
    校验码生成模块,适于根据所述用户信息生成用户校验码,根据所述用户校验码对所述待下载的微端登录文件的下载地址进行重定向,使重定向后的下载地址中包含所述用户校验码,以供所述用户终端在下载完成后根据所述用户校验码进行校验;a check code generating module, configured to generate a user check code according to the user information, and redirect the download address of the micro-end login file to be downloaded according to the user check code, so as to enable the redirected download address The user check code is included for the user terminal to perform verification according to the user check code after the download is completed;
    登录响应模块,适于接收所述用户终端校验成功后发送的登录请求消息,根据所述登录请求消息向所述用户终端返回登录响应消息,以供所述用户终端根据所述登录响应消息自动登录微端。The login response module is configured to receive a login request message sent after the user terminal successfully checks, and return a login response message to the user terminal according to the login request message, so that the user terminal automatically starts according to the login response message. Log in to the micro-end.
  40. 根据权利要求39所述的装置,其中,所述校验码生成模块具体用于:The apparatus according to claim 39, wherein said check code generating module is specifically configured to:
    在所述待下载的微端登录文件的下载地址中添加校验参数字段,将所述校验参数字段的值设置为所述用户校验码的值;Adding a check parameter field to the download address of the micro-end login file to be downloaded, and setting a value of the check parameter field to a value of the user check code;
    通过页面跳转方式使所述待下载的微端登录文件的下载地址跳转为添加所述校验参数字段后的下载地址。The download address of the micro-end login file to be downloaded is jumped to the download address after the check parameter field is added.
  41. 根据权利要求39-40任一所述的装置,其中,所述校验码生成模块具体用于:根据预设的运算规则对所述用户信息进行运算,得到第一运算结果,根据所述第一运算结果生成所述用户校验码;The device according to any one of claims 39-40, wherein the check code generating module is configured to: perform operation on the user information according to a preset operation rule, to obtain a first operation result, according to the first An operation result generates the user verification code;
    其中,所述运算规则包括以下算法中的至少一种:md5算法、SHA算法、哈希算法、RSA算法和DES算法,且所述用户信息包括以下信息中的至少一种:当前系统时间、游戏平台、游戏区服、用户标识、和用户cookie。The operation rule includes at least one of the following algorithms: an md5 algorithm, a SHA algorithm, a hash algorithm, an RSA algorithm, and a DES algorithm, and the user information includes at least one of the following information: current system time, game Platform, game zone service, user ID, and user cookie.
  42. 根据权利要求41所述的装置,其中,所述校验码生成模块具体用于:从所述第一运算结果中截取预设位数作为第二运算结果,将所述第二运算结果作为所述用户校验码。The apparatus according to claim 41, wherein the check code generating module is configured to: intercept a preset number of bits from the first operation result as a second operation result, and use the second operation result as a User check code.
  43. 根据权利要求42所述的装置,其中,所述校验码生成模块具体用于:The apparatus according to claim 42, wherein the check code generating module is specifically configured to:
    判断所述第二运算结果是否与已有的用户校验码重复;若判断结果为否,将所述第二运算结果作为所述用户校验码;若判断结果为是,则从所述第一运算结果中重新截取预设位数,直至所述重新截取的预设位数与已有的用户校验码不重复时,将所述重新截取的预设位数作为所述用户校验码。Determining whether the second operation result is overlapped with an existing user verification code; if the determination result is no, the second operation result is used as the user verification code; if the determination result is yes, then from the Retrieving the preset number of bits in an operation result, until the re-intercepted preset number of bits does not overlap with the existing user check code, using the re-intercepted preset number of bits as the user check code .
  44. 根据权利要求43所述的装置,其中,包括:设置模块,适于预先设置用户校验码的有效时间和/或有效次数,并且,所述设置模块在生成用户校验码后记录所述用户校验码的生成时间和/或使用次数,将生成时间超过有效时间和/或使用次数超过有效次数的用户校验码的状态置为无效状态。The apparatus according to claim 43, comprising: a setting module adapted to preset an effective time and/or an effective number of times of the user check code, and wherein said setting module records said user after generating a user check code The generation time and/or the number of times of use of the check code sets the state of the user check code whose generation time exceeds the effective time and/or the number of uses exceeds the effective number to be in an invalid state.
  45. 根据权利要求44所述的装置,其中,所述登录请求消息中包含所述用户信息和/或所述用户校验码,且所述登录响应消息中包含根据所述用户信息和/或所述用户校验码生成的登录入口信息。 The device according to claim 44, wherein the login request message includes the user information and/or the user check code, and the login response message includes the user information and/or the Login entry information generated by the user check code.
  46. 根据权利要求45所述的装置,其中,所述下载请求以及所述登录请求消息是通过IE浏览器发送的请求消息。The apparatus according to claim 45, wherein said download request and said login request message are request messages transmitted through an IE browser.
  47. 一种计算机程序,包括计算机可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-23中的任一个所述的微端的自动登录方法。A computer program comprising computer readable code causing the computing device to perform the micro-end automatic login method of any of claims 1-23 when the readable code is run on a computing device.
  48. 一种计算机可读介质,其中存储了如权利要求47所述的程序。 A computer readable medium storing the program of claim 47.
PCT/CN2017/088692 2016-06-17 2017-06-16 Automatic login method and device for micro-game client, program, and medium WO2017215650A1 (en)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN201610440215.4 2016-06-17
CN201610440213.5 2016-06-17
CN201610440211.6 2016-06-17
CN201610440211.6A CN105871927B (en) 2016-06-17 2016-06-17 The automatic logging method and device at micro- end
CN201610440213.5A CN106130964B (en) 2016-06-17 2016-06-17 The automatic logging method and device at micro- end
CN201610440215.4A CN106161429B (en) 2016-06-17 2016-06-17 The automatic logging method and device at micro- end

Publications (1)

Publication Number Publication Date
WO2017215650A1 true WO2017215650A1 (en) 2017-12-21

Family

ID=60663003

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/088692 WO2017215650A1 (en) 2016-06-17 2017-06-16 Automatic login method and device for micro-game client, program, and medium

Country Status (1)

Country Link
WO (1) WO2017215650A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170557A (en) * 2018-01-24 2018-06-15 百度在线网络技术(北京)有限公司 For the method and apparatus of output information
CN111744203A (en) * 2020-06-23 2020-10-09 完美世界(北京)软件科技发展有限公司 Cloud game login method and device, storage medium and electronic device
CN112613298A (en) * 2020-12-29 2021-04-06 北京嘀嘀无限科技发展有限公司 Data verification method, system, computer program product and electronic equipment
CN112965933A (en) * 2021-03-16 2021-06-15 支付宝(杭州)信息技术有限公司 Business rule loading method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104158896A (en) * 2014-08-22 2014-11-19 百度在线网络技术(北京)有限公司 Application recommendation method and system as well as application store server
CN104503784A (en) * 2014-12-16 2015-04-08 珠海金山网络游戏科技有限公司 Method and system for controlling micro-client downloading by using script
CN105871927A (en) * 2016-06-17 2016-08-17 北京奇虎科技有限公司 Automatic logging-in method and automatic logging-in device of micro-terminal
CN106130964A (en) * 2016-06-17 2016-11-16 北京奇虎科技有限公司 The automatic logging method of micro-end and device
CN106161429A (en) * 2016-06-17 2016-11-23 北京奇虎科技有限公司 The automatic logging method of micro-end and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104158896A (en) * 2014-08-22 2014-11-19 百度在线网络技术(北京)有限公司 Application recommendation method and system as well as application store server
CN104503784A (en) * 2014-12-16 2015-04-08 珠海金山网络游戏科技有限公司 Method and system for controlling micro-client downloading by using script
CN105871927A (en) * 2016-06-17 2016-08-17 北京奇虎科技有限公司 Automatic logging-in method and automatic logging-in device of micro-terminal
CN106130964A (en) * 2016-06-17 2016-11-16 北京奇虎科技有限公司 The automatic logging method of micro-end and device
CN106161429A (en) * 2016-06-17 2016-11-23 北京奇虎科技有限公司 The automatic logging method of micro-end and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170557A (en) * 2018-01-24 2018-06-15 百度在线网络技术(北京)有限公司 For the method and apparatus of output information
CN108170557B (en) * 2018-01-24 2022-11-25 百度在线网络技术(北京)有限公司 Method and apparatus for outputting information
CN111744203A (en) * 2020-06-23 2020-10-09 完美世界(北京)软件科技发展有限公司 Cloud game login method and device, storage medium and electronic device
CN112613298A (en) * 2020-12-29 2021-04-06 北京嘀嘀无限科技发展有限公司 Data verification method, system, computer program product and electronic equipment
CN112965933A (en) * 2021-03-16 2021-06-15 支付宝(杭州)信息技术有限公司 Business rule loading method, device and equipment
CN112965933B (en) * 2021-03-16 2023-07-25 支付宝(杭州)信息技术有限公司 Business rule loading method, device and equipment

Similar Documents

Publication Publication Date Title
WO2017076193A1 (en) Method and apparatus for processing request from client
JP6282349B2 (en) Method and system for determining whether a terminal logged into a website is a mobile terminal
CN106302337B (en) Vulnerability detection method and device
US10778680B2 (en) Method and apparatus for accessing website
US10430487B2 (en) System and method to share content utilizing universal link format
CN105472052B (en) Cross-domain server login method and system
JP6438031B2 (en) Client download and installation method and apparatus
WO2016070718A1 (en) Method, device, and browser for file downloading
WO2017215650A1 (en) Automatic login method and device for micro-game client, program, and medium
CN111163095B (en) Network attack analysis method, network attack analysis device, computing device, and medium
US20180248898A1 (en) Method and apparatus for identifying malicious website, and computer storage medium
US10992669B2 (en) Acquisition of a device fingerprint from an instance of a client application
CN107733883B (en) Method and device for detecting account numbers registered in batches
WO2017107961A1 (en) Backup system and method
US20210203668A1 (en) Systems and methods for malicious client detection through property analysis
US20140215565A1 (en) Authentication server, and method authenticating application
CN107566329A (en) A kind of access control method and device
CN114189553B (en) Flow playback method, system and computing device
CN105592169A (en) Terminal identification method and terminal identification device
CN112152993A (en) Method and device for detecting webpage hijacking, computer equipment and storage medium
US9780951B2 (en) Prevention of forgery of web requests to a server
US11445003B1 (en) Systems and methods for autonomous program detection
CN105871927B (en) The automatic logging method and device at micro- end
CN106161429B (en) The automatic logging method and device at micro- end
CN106130964B (en) The automatic logging method and device at micro- end

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17812761

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17812761

Country of ref document: EP

Kind code of ref document: A1