Methods, devices, electronic devices and storage media for accessing web pages
By generating a key on the client side to encrypt page parameters, user information, and time information, the problem of low efficiency in unauthorized user page access in existing technologies is solved, and more efficient user authentication and data security are achieved.
Patent Information
- Application Number
- CN202210122942.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-02-09
AI Technical Summary
In existing technologies, encrypting page parameters is not an effective way to prevent unauthorized users from accessing the page, resulting in low efficiency in preventing unauthorized access.
The client generates a key to encrypt encryption parameters, user information, and time information, generates authentication parameters, and the server performs user authentication, avoiding direct encryption on the front-end page and improving data security.
It improves the efficiency of preventing unauthorized user access to the page, enhances data security, and is difficult to crack.
Smart Images

Figure CN114528570B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for accessing web pages. Background Technology
[0002] Currently, to attract users, applications often include games and activities on their pages. Users can interact with these pages to access them and potentially win prizes or discounts. However, unauthorized users can also use techniques to obtain page parameters and impersonate legitimate users to access these pages and claim the rewards or discounts. To prevent such unauthorized access, existing technologies use encryption to encrypt page parameters. However, because the page's development code is publicly available, this encryption is easily cracked, resulting in low efficiency in preventing unauthorized access. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for page access, which can solve the problem that it is difficult to prevent unauthorized decryption by encrypting page parameters, resulting in low efficiency in preventing unauthorized user page access.
[0004] To achieve the above objectives, according to one aspect of the present invention, a method for accessing a page is provided.
[0005] An embodiment of the present invention provides a method for accessing a page, comprising: receiving an encryption request sent by a front-end page, and obtaining encryption parameters in the encryption request; the encryption request is sent by the front-end page after receiving a page access instruction; generating a key based on a preset generation model, obtaining user information and time information, and encrypting the encryption parameters, user information, and time information based on the key to obtain authentication parameters; sending a page access request including the authentication parameters and the key to a server, so that the server decrypts the authentication parameters using the key, obtains the user information and time information, and then performs user authentication.
[0006] In one embodiment, encrypting the encryption parameters, user information, and time information based on a key includes:
[0007] The encryption parameters, user information, and time information are concatenated to obtain a concatenated string;
[0008] The concatenated string is encrypted using the key.
[0009] In yet another embodiment, the method further includes:
[0010] Receive response data sent by the server, the response data being sent after the server has successfully authenticated;
[0011] Based on the response data, the corresponding page display data is determined and sent to the front-end page for display.
[0012] In yet another embodiment, sending a page access request to the server, including the authentication parameters and the key, includes:
[0013] The key is encrypted based on a preset public key, and a page access request is generated in combination with the authentication parameters.
[0014] The page access request is sent to the server so that the server decrypts the encrypted key based on the private key corresponding to the public key, and then decrypts the authentication parameters using the obtained key to obtain the user information and time information.
[0015] To achieve the above objectives, according to another aspect of the present invention, yet another method for accessing a page is provided.
[0016] Another method for accessing a page according to an embodiment of the present invention includes: receiving a page access request sent by a client; obtaining authentication parameters and a key from the page access request, wherein the key is generated by the client, and the authentication parameters are obtained by the client encrypting encrypted data, user information, and time information based on the parameters; decrypting the authentication parameters based on the key to obtain the user information and time information from the authentication parameters; performing user authentication based on the user information and time information, so as to determine the response data corresponding to the page access request after successful authentication, and sending the response data.
[0017] In one embodiment, performing user authentication based on the user information and time information includes:
[0018] Determine whether the user information is empty;
[0019] If so, then the authentication failed, and the operation ends;
[0020] If not, calculate whether the duration between the time information and the current time is greater than a preset value. If not, the authentication is confirmed to be successful; otherwise, the operation ends.
[0021] In yet another embodiment, obtaining the authentication parameters and key from the page access request includes:
[0022] Obtain the authentication and encryption keys from the page access request;
[0023] The private key corresponding to the client is queried to decrypt the encrypted key and obtain the key.
[0024] To achieve the above objectives, according to another aspect of the present invention, a page access apparatus is provided.
[0025] An embodiment of the present invention provides a page access apparatus comprising: a receiving unit, configured to receive an encryption request sent by a front-end page and obtain encryption parameters in the encryption request; the encryption request is sent by the front-end page after receiving a page access instruction; an encryption unit, configured to generate a key based on a preset generation model, obtain user information and time information, and encrypt the encryption parameters, user information, and time information based on the key to obtain authentication parameters; and a sending unit, configured to send a page access request including the authentication parameters and the key to a server, so that the server decrypts the authentication parameters using the key, obtains the user information and time information, and then performs user authentication.
[0026] In one embodiment, the encryption unit is specifically used for:
[0027] The encryption parameters, user information, and time information are concatenated to obtain a concatenated string;
[0028] The concatenated string is encrypted using the key.
[0029] In another embodiment, the receiving unit is further configured to receive response data sent by the server, the response data being sent after the server has successfully authenticated;
[0030] The sending unit is further configured to determine the corresponding page display data based on the response data, and send it to the front-end page for display.
[0031] In yet another embodiment, the transmitting unit is specifically used for:
[0032] The key is encrypted based on a preset public key, and a page access request is generated in combination with the authentication parameters.
[0033] The page access request is sent to the server so that the server decrypts the encrypted key based on the private key corresponding to the public key, and then decrypts the authentication parameters using the obtained key to obtain the user information and time information.
[0034] To achieve the above objectives, according to another aspect of the present invention, a page access apparatus is provided.
[0035] An embodiment of the present invention provides a page access apparatus comprising: a receiving unit, configured to receive a page access request sent by a client, and obtain authentication parameters and a key from the page access request, wherein the key is generated by the client, and the authentication parameters are obtained by the client encrypting encrypted data, user information, and time information based on the parameters; a decryption unit, configured to decrypt the authentication parameters based on the key to obtain the user information and time information from the authentication parameters; and an authentication unit, configured to perform user authentication based on the user information and time information, and determine the response data corresponding to the access request after successful authentication, and send the response data.
[0036] In one embodiment, the authentication unit is specifically used for:
[0037] Determine whether the user information is empty;
[0038] If so, then the authentication failed, and the operation ends;
[0039] If not, calculate whether the duration between the time information and the current time is greater than a preset value. If not, the authentication is confirmed to be successful; otherwise, the operation ends.
[0040] In one embodiment, the decryption unit is specifically used for:
[0041] Obtain the authentication and encryption keys from the page access request;
[0042] The private key corresponding to the client is queried to decrypt the encrypted key and obtain the key.
[0043] To achieve the above objectives, according to another aspect of the present invention, an electronic device is provided.
[0044] An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the page access method provided in the embodiment of the present invention.
[0045] To achieve the above objectives, according to another aspect of the present invention, a computer-readable medium is provided.
[0046] An embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the page access method provided in the embodiment of the present invention.
[0047] One embodiment of the above invention has the following advantages or beneficial effects: In this embodiment, after a user interacts with the front-end page, a page access command can be triggered. The front-end page can send encrypted parameters to the client. The client generates a key through a preset generation module to encrypt the encrypted parameters, user information, and time information to obtain authentication parameters, which are then sent to the server. The server can perform user authentication using the user information and time information. After successful authentication, the page access request is processed. In this embodiment, after a user interacts with the page, the front-end page sends encrypted parameters to the client. The client encrypts the encrypted parameters, user information, and time information and sends them to the server for user authentication. This eliminates the need for the front-end page to encrypt the parameters; instead, the encryption process is implemented by the client. Since the client's code is not publicly available, it is difficult to decipher, thus improving the efficiency of preventing unauthorized user access to the page. Furthermore, the client generates its own key to encrypt the encrypted parameters, user information, and time information, further enhancing data security and preventing data decryption that could lead to unauthorized user access to the page.
[0048] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0049] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0050] Figure 1 This is a schematic diagram of the main flow of a page access method according to an embodiment of the present invention;
[0051] Figure 2 This is a schematic diagram of another main process of a page access method according to an embodiment of the present invention;
[0052] Figure 3 This is a schematic diagram of another main flow of the page access method according to an embodiment of the present invention;
[0053] Figure 4 This is a schematic diagram of a main unit of a page access device according to an embodiment of the present invention;
[0054] Figure 5 This is a schematic diagram of another main unit of a page access device according to an embodiment of the present invention;
[0055] Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0056] Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present invention. Detailed Implementation
[0057] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0058] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0059] This invention provides a page access system that can be used to access front-end pages in the client of an application, wherein the page can specifically be an H5 page.
[0060] In this embodiment of the invention, the page access system may include a client, a front-end page, and a server. After application development, users can download and install the client on their terminals. The client, once running, can interact with the back-end page server (server) through the front-end page to display the page. After a user interacts with the page, the client can generate a page access request based on the interaction data and send it to the server through the front-end page for corresponding processing. To prevent unauthorized users from impersonating legitimate users and sending page access requests, an encryption mechanism is added in this embodiment of the invention to authenticate users sending page access requests.
[0061] This invention provides a method for accessing a webpage, which can be executed by a client, such as... Figure 1 As shown, the method includes:
[0062] S101: Receives the encryption request sent by the front-end page and obtains the encryption parameters in the encryption request.
[0063] The encryption request is sent by the front-end page after receiving the page access instruction.
[0064] The front-end page can display pre-configured activity pages, such as operation buttons or controls. Users interact with the front-end page by clicking or swiping buttons. Upon receiving the user's action, the front-end page can trigger a page access command for the activity page. In this embodiment, an encryption mechanism is added, so the front-end page can respond to the page access command by sending an encrypted request, including encryption parameters, to the client. In this embodiment, the front-end page sends the encryption parameters to the client so that the client can generate authentication parameters for page access based on the encryption parameters, thereby improving the security of page access data.
[0065] Encryption parameters can be pre-configured or dynamic, depending on the desired outcome of the page visit. For example, in a reward scenario where users can obtain coupons through page operations, the encryption parameters could be coupon-related parameters. Different users can use the same or different encryption parameters; this is not a limitation.
[0066] S102: Generate a key based on a preset generation model, obtain user information and time information, and encrypt the encryption parameters, user information and time information based on the key to obtain authentication parameters.
[0067] Upon receiving an encryption request, the client can perform corresponding encryption processing. The client has a preset key generation model, which allows it to generate its own keys. The client can then use these generated keys to encrypt encryption parameters, user information, and time information to obtain authentication parameters.
[0068] Specifically, the user information includes the currently logged-in user's information, such as user ID, username, and other user attribute characteristics; the time information can be a timestamp, such as the timestamp when the authentication parameters were generated. The key generation model can be set based on requirements, for example, it can be a random string generation model to randomly generate a 16-character string as the key.
[0069] In this embodiment of the invention, the step of encrypting based on key pair encryption parameters, user information and time information can be specifically performed as follows: concatenating encryption parameters, user information and time information to obtain a concatenated string; encrypting the concatenated string based on key pair.
[0070] Encryption parameters, user information, and time information can be concatenated in a preset order to obtain a concatenated string, which is then encrypted using a generated key. Specifically, when concatenating encryption parameters, user information, and time information, the formats of these elements can be converted to a preset format before concatenation, further enhancing the security of the encrypted data.
[0071] S103: Send a page access request including authentication parameters and a key to the server, so that the server can decrypt the authentication parameters with the key, obtain user information and time information, and then perform user authentication.
[0072] After obtaining the authentication parameters, the client can generate a page access request based on the authentication parameters and key and send it to the server. Upon receiving the page access request, the server can obtain user information and time information, and then perform user authentication based on this information. After successful authentication, the server can process the page access request to obtain the corresponding response data, which is then returned to the client. The client, upon receiving the response data, can determine the corresponding page display data based on the response data and send it to the front-end page for display.
[0073] In this embodiment of the invention, the client and server can preset corresponding public and private keys. The client stores the public key and encrypts it after generating a new key, thereby improving the security of data transmission when sending it to the server. After receiving a page access request, the server can decrypt the encrypted key using the corresponding private key, and then use the obtained key to decrypt the authentication parameters.
[0074] It should be noted that, in this embodiment of the invention, data transmission between the client and the server can be carried out through the front-end page. Therefore, in this step, the client sends the page access request to the server through the front-end page.
[0075] In this embodiment of the invention, after a user interacts with the page, the front-end page sends encrypted parameters to the client. The client then encrypts the encrypted parameters, user information, and time information before sending them to the server for user authentication. This eliminates the need for the front-end page to encrypt the parameters; instead, the encryption process is implemented by the client. Since the client's code is not publicly available, it is difficult to decipher, thus improving the efficiency of preventing unauthorized user access to the page. Furthermore, the client generates its own key to encrypt the encrypted parameters, user information, and time information, further enhancing data security and preventing data decryption that could lead to unauthorized user access to the page.
[0076] The following is combined with Figure 1 The embodiments shown in this invention provide yet another method for accessing a page, which can be executed by a server, such as... Figure 2 As shown, the method includes:
[0077] S201: Receive a page access request sent by the client and obtain the authentication parameters and key from the page access request.
[0078] The key is generated by the client, and the authentication parameters are derived by the client by encrypting the encrypted data, user information, and time information based on the parameters.
[0079] Depend on Figure 1As shown in the illustrated embodiment, after receiving the encrypted parameters sent by the front-end page, the client can generate its own key and encrypt the encrypted parameters, user information, and time information to obtain authentication parameters, thereby generating a page access request and sending it to the server. Upon receiving the page access request, the server can obtain the authentication parameters and key from the request.
[0080] In this embodiment of the invention, in order to ensure the security of data transmission, the client can use a preset public key to encrypt the key. Therefore, after the server receives the page access request, it obtains the encrypted key. At this time, the server can query the private key corresponding to the client and then decrypt the encrypted key to obtain the key generated by the client.
[0081] S202: Decrypt the authentication parameters based on the key pair to obtain the user information and time information in the authentication parameters.
[0082] The server can decrypt the authentication parameters using the obtained key to obtain the user information and time information from the authentication parameters.
[0083] It should be noted that the authentication parameters can be obtained by the client concatenating the encryption parameters, user information, and time information and then encrypting them. Therefore, after the server decrypts the authentication parameters, it can obtain the concatenated string, and then split the string to obtain the user information and time information.
[0084] S203: Perform user authentication based on user information and time information, and determine the response data corresponding to the page access request after successful authentication, and send the response data.
[0085] It should be noted that since clients typically require users to log in normally before accessing a page, they can obtain user information when generating authentication information. However, for unauthorized users, they cannot log in normally, and the client cannot obtain user information, resulting in empty user information in the generated authentication information. Therefore, the server can perform user authentication based on whether the user information obtained from the authentication information is empty. Furthermore, the transmission time of a network request from the client to the server is usually relatively stable. Therefore, the server can set a preset value to represent the time threshold required for a network request to travel from the client to the server. If the network request transmission time exceeds the time threshold, the network request can be considered illegally deciphered, constituting an illegal operation. In this embodiment of the invention, the preset value can be set based on the actual scenario, for example, it can be set to 20 seconds.
[0086] Therefore, in this embodiment of the invention, the server performs user authentication based on user information and time information as follows: determine whether the user information is empty; if so, determine that the authentication fails and end the operation; if not, calculate whether the duration between the time information and the current time is greater than a preset value; if not, confirm that the authentication passes, otherwise end the operation.
[0087] If the user information is empty, it indicates that the user is an illegitimate user, so the operation can be terminated, i.e., the processing of this page access request can be ended. If the user information is not empty, the duration between the time information and the current time can be calculated to represent the transmission time of the page access request, and to determine whether the transmission time exceeds a preset value. If the transmission time exceeds the preset value, it indicates that the page access request transmission time is too long, which can be considered an illegitimate operation, and the processing of this page access request can be terminated. If the transmission time does not exceed the preset value, it indicates that the page access request transmission time is within a reasonable range, and authentication can be considered successful.
[0088] Once the authentication is successful, the server can process the page access request, generate the corresponding response data, and return it to the client.
[0089] In this embodiment of the invention, after a user interacts with the page, the front-end page sends encrypted parameters to the client. The client then encrypts the encrypted parameters, user information, and time information before sending them to the server for user authentication. This eliminates the need for the front-end page to encrypt the parameters; instead, the encryption process is implemented by the client. Since the client's code is not publicly available, it is difficult to decipher, thus improving the efficiency of preventing unauthorized user access to the page. Furthermore, the client generates its own key to encrypt the encrypted parameters, user information, and time information, further enhancing data security and preventing data decryption that could lead to unauthorized user access to the page.
[0090] The following is combined with Figure 1 and Figure 2 The illustrated embodiment provides a specific description of a method for accessing a page according to an embodiment of the present invention, such as... Figure 3 As shown, the method includes:
[0091] S301: The client receives the encryption request sent by the front-end page and obtains the encryption parameters in the encryption request.
[0092] S302: The client generates a key based on a preset generation model and obtains user information and time information.
[0093] S303: The client concatenates the encryption parameters, user information, and time information to obtain a concatenated string, and encrypts the concatenated string based on the key to obtain the authentication parameters.
[0094] S304: The client sends a page access request, including authentication parameters and keys, to the server through the front-end page.
[0095] S305: The server retrieves the authentication parameters and key from the page access request.
[0096] S306: The server decrypts the authentication parameters based on the key pair to obtain the user information and time information in the authentication parameters.
[0097] S307: If the user information is not empty and the duration between the time information and the current time is not greater than the preset value, then the authentication is successful; otherwise, the operation ends.
[0098] S308: The server determines the response data corresponding to the page access request and returns it to the client through the front-end page.
[0099] It should be noted that the data processing principle in the embodiments of the present invention is the same as... Figure 1 or Figure 2 The data processing principles in the illustrated embodiments are the same, and will not be repeated here.
[0100] To address the problems existing in the prior art, embodiments of the present invention provide a page access device 400, such as... Figure 4 As shown, the device 400 includes:
[0101] The receiving unit 401 is used to receive an encryption request sent by the front-end page and obtain the encryption parameters in the encryption request; the encryption request is sent by the front-end page after receiving the page access instruction;
[0102] The encryption unit 402 is used to generate a key based on a preset generation model, obtain user information and time information, and encrypt the encryption parameters, user information and time information based on the key to obtain authentication parameters;
[0103] The sending unit 403 is used to send a page access request including the authentication parameters and the key to the server, so that the server can decrypt the authentication parameters using the key, obtain the user information and time information, and then perform user authentication.
[0104] It should be understood that the manner in which the embodiments of the present invention are implemented is different from the implementation method. Figure 1 The methods used in the illustrated embodiments are the same and will not be repeated here.
[0105] In one embodiment, the encryption unit 402 is specifically used for:
[0106] The encryption parameters, user information, and time information are concatenated to obtain a concatenated string;
[0107] The concatenated string is encrypted using the key.
[0108] In another embodiment, the receiving unit 401 is further configured to receive response data sent by the server, the response data being sent after the server has successfully authenticated;
[0109] The sending unit 403 is further configured to determine the corresponding page display data based on the response data, and send it to the front-end page for display.
[0110] In yet another embodiment, the sending unit 403 is specifically used for:
[0111] The key is encrypted based on a preset public key, and a page access request is generated in combination with the authentication parameters.
[0112] The page access request is sent to the server so that the server decrypts the encrypted key based on the private key corresponding to the public key, and then decrypts the authentication parameters using the obtained key to obtain the user information and time information.
[0113] It should be understood that the manner in which the embodiments of the present invention are implemented is different from the implementation method. Figure 1 or Figure 3 The methods used in the illustrated embodiments are the same and will not be repeated here.
[0114] In this embodiment of the invention, after a user interacts with the page, the front-end page sends encrypted parameters to the client. The client then encrypts the encrypted parameters, user information, and time information before sending them to the server for user authentication. This eliminates the need for the front-end page to encrypt the parameters; instead, the encryption process is implemented by the client. Since the client's code is not publicly available, it is difficult to decipher, thus improving the efficiency of preventing unauthorized user access to the page. Furthermore, the client generates its own key to encrypt the encrypted parameters, user information, and time information, further enhancing data security and preventing data decryption that could lead to unauthorized user access to the page.
[0115] To address the problems existing in the prior art, embodiments of the present invention provide a page access device 500, such as... Figure 5 As shown, the device 500 includes:
[0116] The receiving unit 501 is configured to receive a page access request sent by a client, and obtain the authentication parameters and key in the page access request, wherein the key is generated by the client, and the authentication parameters are obtained by the client encrypting encrypted data, user information and time information based on the parameters;
[0117] The decryption unit 502 is used to decrypt the authentication parameters based on the key to obtain the user information and time information in the authentication parameters;
[0118] The authentication unit 503 is used to perform user authentication based on the user information and time information, so as to determine the response data corresponding to the access request after the authentication is successful, and send the response data.
[0119] It should be understood that the manner in which the embodiments of the present invention are implemented is different from the implementation method. Figure 2 The methods used in the illustrated embodiments are the same and will not be repeated here.
[0120] In one embodiment, the authentication unit 503 is specifically used for:
[0121] Determine whether the user information is empty;
[0122] If so, then the authentication failed, and the operation ends;
[0123] If not, calculate whether the duration between the time information and the current time is greater than a preset value. If not, the authentication is confirmed to be successful; otherwise, the operation ends.
[0124] In one embodiment, the decryption unit 502 is specifically used for:
[0125] Obtain the authentication and encryption keys from the page access request;
[0126] The private key corresponding to the client is queried to decrypt the encrypted key and obtain the key.
[0127] It should be understood that the manner in which the embodiments of the present invention are implemented is different from the implementation method. Figure 2 or Figure 3 The methods used in the illustrated embodiments are the same and will not be repeated here.
[0128] In this embodiment of the invention, after a user interacts with the page, the front-end page sends encrypted parameters to the client. The client then encrypts the encrypted parameters, user information, and time information before sending them to the server for user authentication. This eliminates the need for the front-end page to encrypt the parameters; instead, the encryption process is implemented by the client. Since the client's code is not publicly available, it is difficult to decipher, thus improving the efficiency of preventing unauthorized user access to the page. Furthermore, the client generates its own key to encrypt the encrypted parameters, user information, and time information, further enhancing data security and preventing data decryption that could lead to unauthorized user access to the page.
[0129] According to embodiments of the present invention, an electronic device and a readable storage medium are also provided.
[0130] An electronic device according to an embodiment of the present invention includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the page access method provided in the embodiment of the present invention.
[0131] Figure 6 An exemplary system architecture 600 is shown, in which the page access method or page access apparatus of embodiments of the present invention can be applied.
[0132] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0133] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various client applications can be installed on terminal devices 601, 602, and 603.
[0134] Terminal devices 601, 602, and 603 may be, but are not limited to, smartphones, tablets, laptops, and desktop computers, etc.
[0135] Server 605 can be a server that provides various services. The server can analyze and process data such as received product information query requests, and feed back the processing results (such as product information - just an example) to the terminal device.
[0136] It should be noted that the page access method provided in the embodiments of the present invention is generally executed by server 605, and correspondingly, the page access device is generally set in server 605.
[0137] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0138] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing embodiments of the present invention. Figure 7 The computer system shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0139] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0140] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0141] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.
[0142] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0143] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a unit, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0144] The units described in the embodiments of the present invention can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including a receiving unit, an encryption unit, and a sending unit. The names of these units do not necessarily limit the specific unit; for example, the receiving unit can also be described as a "unit for encrypted request receiving function".
[0145] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to perform the page access method provided by the present invention.
[0146] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for accessing a webpage, characterized in that, include: Receive an encryption request sent by the front-end page and obtain the encryption parameters in the encryption request; The encryption request is sent by the front-end page after receiving the page access instruction. The encryption parameters are related to the result to be obtained by the page access. The encryption parameters are different for different users. After receiving the user operation, the front-end page triggers the page access instruction to the activity page. After receiving the page access instruction, the front-end page can respond to the preset encryption mechanism and send the encryption request including the encryption parameters to the client. A key is generated based on a preset generation model, user information and time information are obtained, and the encryption parameters, user information and time information are encrypted based on the key to obtain authentication parameters; A page access request including the authentication parameters and the key is sent to the server, so that the server can decrypt the authentication parameters using the key, obtain the user information and time information, and then perform user authentication.
2. The method according to claim 1, characterized in that, The encryption of the encryption parameters, user information, and time information based on the key includes: The encryption parameters, user information, and time information are concatenated to obtain a concatenated string; The concatenated string is encrypted using the key.
3. The method according to claim 1, characterized in that, The method further includes: Receive response data sent by the server, the response data being sent after the server has successfully authenticated; Based on the response data, the corresponding page display data is determined and sent to the front-end page for display.
4. The method according to claim 1, characterized in that, Sending a page access request to the server, including the authentication parameters and the key, includes: The key is encrypted based on a preset public key, and a page access request is generated in combination with the authentication parameters. The page access request is sent to the server so that the server decrypts the encrypted key based on the private key corresponding to the public key, and then decrypts the authentication parameters using the obtained key to obtain the user information and time information.
5. A method for accessing a webpage, characterized in that, include: The system receives a page access request sent by the client, obtains the authentication parameters and key in the page access request, wherein the key is generated by the client, the authentication parameters are obtained by the client encrypting encryption parameters, user information and time information based on the authentication parameters, and the encryption parameters are related to the result to be obtained by the page access. Different users have different encryption parameters. After receiving the user's operation, the front-end page triggers a page access instruction for the activity page. After receiving the page access instruction, the front-end page can respond to the preset encryption mechanism and send an encryption request including the encryption parameters to the client. The authentication parameters are decrypted using the key to obtain the user information and time information in the authentication parameters; User authentication is performed based on the user information and time information, so that after successful authentication, the response data corresponding to the page access request is determined and the response data is sent.
6. The method according to claim 5, characterized in that, User authentication is performed based on the user information and time information, including: Determine whether the user information is empty; If so, then the authentication failed, and the operation ends; If not, calculate whether the duration between the time information and the current time is greater than a preset value. If not, the authentication is confirmed to be successful; otherwise, the operation ends.
7. The method according to claim 5, characterized in that, Obtaining the authentication parameters and key from the page access request includes: Obtain the authentication and encryption keys from the page access request; The private key corresponding to the client is queried to decrypt the encrypted key and obtain the key.
8. A device for accessing a webpage, characterized in that, include: The receiving unit is used to receive the encryption request sent by the front-end page and obtain the encryption parameters in the encryption request; The encryption request is sent by the front-end page after receiving the page access instruction. The encryption parameters are related to the result to be obtained by the page access. The encryption parameters are different for different users. After receiving the user operation, the front-end page triggers the page access instruction to the activity page. After receiving the page access instruction, the front-end page can respond to the preset encryption mechanism and send the encryption request including the encryption parameters to the client. The encryption unit is used to generate a key based on a preset generation model, obtain user information and time information, and encrypt the encryption parameters, user information and time information based on the key to obtain authentication parameters; The sending unit is configured to send a page access request including the authentication parameters and the key to the server, so that the server can decrypt the authentication parameters using the key, obtain the user information and time information, and then perform user authentication.
9. A device for accessing a webpage, characterized in that, include: The receiving unit is used to receive a page access request sent by the client, and obtain the authentication parameters and key in the page access request. The key is generated by the client, and the authentication parameters are obtained by the client by encrypting encryption parameters, user information and time information based on the authentication parameters. The encryption parameters are related to the result to be obtained by the page access and are different for different users. After receiving the user operation, the front-end page triggers a page access instruction to the active page. After receiving the page access instruction, the front-end page can respond to the preset encryption mechanism and send an encryption request including encryption parameters to the client. A decryption unit is used to decrypt the authentication parameters based on the key to obtain the user information and time information in the authentication parameters; The authentication unit is used to perform user authentication based on the user information and time information, and after successful authentication, determine the response data corresponding to the access request and send the response data.
10. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
11. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Transaction relationship building method, device and system
CN105491004A