Page access method and device, computer device, readable storage medium and program product
By generating and updating verification items between the terminal and the server, and performing multiple permission verifications, the problem of insufficient security of H5 pages is solved, and the security of page access and the reliability of data transmission are improved.
Patent Information
- Application Number
- CN202410606550.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-05-16
AI Technical Summary
Existing technologies for enhancing the security of H5 pages are relatively simple and have a low level of security, failing to effectively guarantee the security of page access.
Verification items are generated and transmitted encrypted via a second server. Multiple authorization verifications are performed between the terminal and the server, including matching application identifiers with information to be verified, to ensure the security of the communication connection. Verification items are updated with each interaction to enhance security.
It implements multi-layered verification for page access, ensuring the security of communication between the terminal and the server, and improving the security of data transmission and communication connections.
Smart Images

Figure CN118540115B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data, and in particular to a page access method and device, computer equipment, a computer readable storage medium and a computer program product. BACKGROUND
[0002] An H5 page is a web page design based on the new features of HTML5. It can use elements such as animations, videos, and pictures to make the web page more lively and interesting, thereby improving the user experience.
[0003] With the development of H5 technology, the security of H5 has received more and more attention. In related technology, in order to improve the security of H5, the security of data is improved by using data encryption, or a page link is verified to be legal by using a verification parameter, and when the page link is verified to be legal, page access is implemented based on the page link, or a page is monitored to determine whether the page is covered, and when the page is detected to be covered, an alarm information is sent to prompt the user to investigate the danger.
[0004] However, the security improvement method involved in the related technology is relatively single, the security level is low, and the security of page access cannot be well guaranteed. SUMMARY
[0005] Therefore, it is necessary to provide a page access method, device, computer equipment, computer readable storage medium and computer program product capable of improving security in view of the above technical problems.
[0006] In a first aspect, the present application provides a page access method applied to a second server, comprising:
[0007] receiving an access control request sent by a first server, the access control request being used to request access control on a message sent by a terminal to the second server, the access control request including a page identifier of a to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application integrating the to-be-accessed page;
[0008] generating a first verification item and obtaining a page access address corresponding to the page identifier when the first application identifier matches a preset application identifier;
[0009] encrypting and sending first feedback information to the first server, so that the first server sends the first feedback information to the terminal, the first feedback information carrying the first verification item and the page access address;
[0010] receiving a first page access message corresponding to the page access address and sent by the terminal by encryption, the first page access message including first to-be-verified information and a to-be-verified application identifier;
[0011] when the to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, sending second feedback information to the terminal in encryption, the second feedback information being used to indicate that the terminal is allowed to access the to-be-accessed page.
[0012] In one embodiment, after the first page access message corresponding to the page access address sent by the terminal in encryption is received, the method further includes: when the first to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, generating a second verification item and setting the first verification item as invalid; obtaining a terminal identifier carried in the first page access information, generating a third verification item corresponding to the terminal identifier; setting the second verification item and the third verification item correspondingly, and sending the third verification item to the terminal.
[0013] In one of the embodiments, after the third verification item is sent to the terminal, the method further includes: receiving a second page access message sent by the terminal, the second page access message including second to-be-verified information and a virtual resource acquisition request; when the second to-be-verified information matches the third verification item and the second to-be-verified information and the second verification item are successfully paired, executing the virtual resource acquisition request.
[0014] In one embodiment, the access control request further includes an identity identifier, after the first verification item is generated, the method further includes: setting the identity identifier and the first verification item correspondingly, and after the second verification item is generated, obtaining the identity identifier corresponding to the first verification item, and setting the identity identifier and the second verification item correspondingly; the executing the virtual resource acquisition request includes: obtaining the identity identifier according to the second verification item; determining corresponding credit data according to the identity identifier; when the credit data is greater than or equal to preset credit data, generating third feedback information allowing the virtual resource to be acquired; sending the third feedback information to the terminal, the third feedback information being used to indicate that the terminal executes a step of confirming acquisition of the virtual resource.
[0015] In one embodiment, the first verification item includes a first sub-verification item and a second sub-verification item, the to-be-verified information includes a first sub-to-be-verified information and a second sub-to-be-verified information, the to-be-verified information matching the first verification item includes: the first sub-verification item matching the first sub-to-be-verified information, the second sub-verification item matching the second sub-to-be-verified information, the first sub-verification item and the second sub-to-be-verified information successfully passing pair verification, and the second sub-verification item and the first sub-to-be-verified information successfully passing pair verification.
[0016] In a second aspect, the present application provides a page access method applied to a terminal, the method comprising:
[0017] sending a first page access message to the second server, the first page access message comprising first to-be-verified information and a to-be-verified application identifier;
[0018] receiving second feedback information sent by the second server, the second feedback information being used to indicate that the terminal is allowed to access the to-be-accessed page; the second feedback information being triggered when the first page access message satisfies an authority verification condition, the authority verification condition comprising that the first to-be-verified information matches a first verification item and the to-be-verified application identifier matches a preset application identifier;
[0019] accessing the to-be-accessed page according to the second feedback information.
[0020] In an embodiment, before the step of sending the first page access message to the second server, the method further comprises: sending an access indication message to the first server; wherein the access indication message comprises a page identifier of the to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application integrating the to-be-accessed page; the access indication message being used to instruct the first server to send an access control request to the second server, the access control request being used to request access control on messages sent by the terminal to the second server.
[0021] In a third aspect, the present application provides a page access device, comprising:
[0022] a first receiving module configured to receive an access control request sent by a first server, the access control request being used to request access control on messages sent by a terminal to a second server, the access control request comprising a page identifier of a to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application integrating the to-be-accessed page.
[0023] a first verification module configured to generate a first verification item and acquire a page access address corresponding to the page identifier when the first application identifier matches a preset application identifier.
[0024] a first feedback module configured to send first feedback information to the first server, so that the first server sends the first feedback information to the terminal, the first feedback information carrying the first verification item and the page access address.
[0025] The second receiving module is configured to receive a first page access message corresponding to the page access address sent by the terminal in an encrypted manner, wherein the first page access message comprises first to-be-verified information and a to-be-verified application identifier.
[0026] The second feedback module is configured to send second feedback information to the terminal in an encrypted manner when the to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, wherein the second feedback information is used to indicate that the terminal is allowed to access the to-be-accessed page.
[0027] In a fourth aspect, the present application further provides a page access device, comprising:
[0028] The access information sending module is configured to send a first page access message to the second server, wherein the first page access message comprises first to-be-verified information and a to-be-verified application identifier.
[0029] The feedback information receiving module is configured to receive second feedback information sent by the second server, wherein the second feedback information is used to indicate that the terminal is allowed to access the to-be-accessed page; the second feedback information is triggered when the first page access message satisfies an authority verification condition, and the authority verification condition comprises that the first to-be-verified information matches a first verification item and the to-be-verified application identifier matches a preset application identifier.
[0030] The access module is configured to access the to-be-accessed page according to the second feedback information.
[0031] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements steps in each method embodiment when executing the computer program.
[0032] In a sixth aspect, the present application further provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement steps in each method embodiment.
[0033] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement steps in each method embodiment.
[0034] The above page access method, device, computer device, computer readable storage medium and computer program product are used for the second server to generate a verification item, and in each interaction between the first server and the terminal, the first server and the terminal are subjected to authority verification, and only when the verification is passed, the page can be accessed, the data can be transmitted, and the like, so that the security of page access can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application or the related art. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained from these drawings without creative labor.
[0036] Figure 1 An application environment diagram of the page access method in one embodiment;
[0037] Figure 2 A flowchart of the page access method in one embodiment;
[0038] Figure 3 A flowchart of the page access method in another embodiment;
[0039] Figure 4 A signaling interaction flowchart of the page access method in one embodiment;
[0040] Figure 5 A structural block diagram of the page access device in one embodiment;
[0041] Figure 6 A structural block diagram of the page access device in another embodiment;
[0042] Figure 7 An internal structure diagram of the computer device in one embodiment;
[0043] Figure 8 An internal structure diagram of the computer device in another embodiment. DETAILED DESCRIPTION
[0044] In order to make the purposes, technical solutions and advantages of the present application clearer, the following will further describe the present application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application. It should be noted that in the embodiments of the present application, some software, groups, models and other industry existing schemes may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the technical solution implementation of the present application, but does not mean that the applicant has or will necessarily use the scheme.
[0045] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the relevant data need to comply with the relevant provisions. The acquisition, storage, use, processing, etc. of data in the technical solutions of the present application comply with the relevant provisions of national laws and regulations.
[0046] The page access method provided by the embodiments of the present application can be applied to, for example Figure 1The application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data required by the server 104 to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The terminal 102 sends an access indication message to the first server 104, and the first server 104 generates an access control request according to the page identifier of the page to be accessed included in the access indication message and the first application identifier of the target application corresponding to the first server 104. The first server 104 sends the access control request to the second server 106, and the second server 106 checks the first application identifier included in the access control request. When the first application identifier matches the preset application identifier, a first check item is generated and the page access address corresponding to the page identifier is obtained. The first feedback information is sent from the second server 106 to the first server 104, wherein the first feedback information includes the first check item and the page access address. The first server 104 sends the first check item and the page access address to the terminal 102. The terminal 102 generates a first page access message according to the page access address. The first page access message includes the first to-be-checked information and the to-be-checked application identifier. The terminal 102 sends the first page access message to the second server 106. The second server 106 checks the first to-be-checked information and the to-be-checked application identifier. When the check is passed, a second feedback information is generated, wherein the second feedback information is used to indicate that the terminal is allowed to access the page to be accessed. The second server 106 sends the second feedback information to the terminal 102. The terminal 102 accesses the page to be accessed under the indication of the second feedback information. Among them, the terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, a projection device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0047] In an exemplary embodiment, as shown in Figure 2 A page access method is provided, which is applied to Figure 1 The second server in the method is taken as an example for illustration, including the following steps 202 to 210. Among them:
[0048] Step 202, receiving an access control request sent by a first server.
[0049] In step 204, when the first application identifier matches the preset application identifier, a first check item is generated and a page access address corresponding to the page identifier is obtained.
[0050] The access control request is used to request access control on a message sent by the terminal to the second server.
[0051] Optionally, the access control request includes a page identifier of the to-be-accessed page and a first application identifier of the target application corresponding to the first server.
[0052] In an embodiment, the target application is set on the terminal, and the target application integrates the third-party access page. Optionally, the third-party access page can be one or more.
[0053] Optionally, the user selects one of the plurality of third-party access pages integrated by the target application as the to-be-accessed page through the target application set on the terminal. After receiving the selected to-be-accessed page, the terminal generates a first access request according to the to-be-accessed page, and sends the first access request to the first server. The first server generates an access control request according to the page identifier of the to-be-accessed page and the first application identifier of the target application corresponding to the first server carried in the first access request, and sends the access control request to the second server. The second server performs access permission verification according to the first application identifier carried in the received access control request.
[0054] Optionally, the second server can be a server corresponding to the to-be-accessed page, or a permission server used by the third party to implement permission verification.
[0055] In an embodiment, after receiving the access control request, the second server obtains the first application identifier included in the access control request from the access control request, and determines whether the to-be-accessed page can be accessed through the target application by using the first application identifier. Optionally, the first application identifier can be matched with a preset application identifier. When the first application identifier matches the preset application identifier, it indicates that the to-be-accessed page can be accessed through the target application. Then, the second server obtains a corresponding page access address according to the page identifier of the to-be-accessed page.
[0056] Optionally, when the second server determines that the target application has access permission, a first check item is generated, and the first check item can be sent to the first server. The first server sends the first check item to the terminal, so that the terminal can use the first check item to verify the access permission of the terminal when communicating with the second server.
[0057] In one embodiment, the first check item can include a first sub-check item and a second sub-check item, and the first sub-check item and the second sub-check item are arranged in pairs. When verifying the access right of the terminal in the process of the communication connection between the terminal and the second server, not only the first sub-check item and the second sub-check item need to be verified, but also whether the first sub-check item and the second sub-check item are in pairs needs to be verified. After the first sub-check item, the second sub-check item, and the first sub-check item and the second sub-check item in pairs are all verified, it is considered that the verification is passed, and the security can be effectively improved.
[0058] Optionally, the first sub-check item can be a Token (identity token), and the second sub-check item can be a Code (authorization code).
[0059] In one optional embodiment, after the first check item is generated, the first check item is encrypted, and the encrypted first check item and the page access address are sent to the first server. The first server sends the encrypted first check item and the page access address to the terminal.
[0060] In step 206, the first feedback information is encrypted and sent to the first server, so that the first server sends the first feedback information to the terminal.
[0061] Optionally, the first feedback information carries the first check item and the page access address.
[0062] Optionally, after the first check item is generated and the page access address is obtained, the second server encapsulates the first check item and the page access address to form the first feedback information, sends the first feedback information to the first server, and sends the obtained first check item and page access address to the terminal by the first server, so that the terminal can access the to-be-accessed page according to the first access address, and can verify whether the terminal can access the to-be-accessed page according to the first check item.
[0063] In one embodiment, when the second server encrypts and sends the first feedback information to the first server, the first feedback information can be encrypted and sent. After the first server receives the encrypted first feedback information, the first feedback information is decrypted and obtained, and the first feedback information is sent to the terminal. The terminal obtains the first check item and the page access address from the first feedback information. The first check item and the page access address can also be extracted from the first feedback information by the first server, and the first check item and the page access address are sent to the second server by the first server.
[0064] In step 208, the first page access message corresponding to the page access address sent by the terminal is received.
[0065] Optionally, the first page access message includes the first to-be-checked information and the to-be-checked application identifier.
[0066] In one embodiment, after the terminal acquires the first check item and the page access address, the terminal accesses the to-be-accessed page according to the page access address.
[0067] In one exemplary embodiment, when the terminal accesses the to-be-accessed page according to the page access address, the first check item received can be used to check the access right of the terminal itself.
[0068] Optionally, the first check item can be encapsulated as the first to-be-checked information in the first page access message, and the terminal sends the first page access message to the second server, and the second server checks the access right of the terminal according to the first to-be-checked information.
[0069] Optionally, the first check item can be encapsulated as the first to-be-checked information, and the application identifier initiating the access of the to-be-accessed page can be encapsulated as the to-be-checked application identifier, to form the first page access message, and the terminal sends the first page access message to the second server, and the second server acquires the first to-be-checked information and the to-be-checked application identifier from the first page access message to check the access right of the terminal.
[0070] In step 210, when the to-be-checked information matches the first check item and the to-be-checked application identifier matches the preset application identifier, the second feedback information is sent to the second terminal in an encrypted manner.
[0071] The second feedback information is used to indicate that the terminal is allowed to access the to-be-accessed page.
[0072] In one embodiment, after the second server receives the first page access message, the second server acquires the first to-be-checked information and the to-be-checked application identifier from the first page access message, and checks the access right according to the acquired first to-be-checked information and to-be-checked page identifier.
[0073] Optionally, the first to-be-checked information can be matched with the first check item to determine whether the first to-be-checked item matches the first check item, if the first to-be-checked item matches the first check item, it is considered that the first to-be-checked item passes the verification, it is considered that the process in which the first server sends the first feedback information to the second server and the process in which the terminal sends the feedback information to the terminal do not occur information interception, and thus it is considered that the communication connection between the terminal and the second server is safe.
[0074] Optionally, the to-be-checked application identifier can be matched with the preset application identifier to determine whether the to-be-checked application identifier matches the preset application identifier, if the to-be-checked application identifier matches the preset application identifier, it is considered that the to-be-checked application identifier passes the verification.
[0075] Optionally, it can be checked whether the to-be-checked application identifier matches the preset application identifier, and whether the first to-be-checked information matches the first check item. When the to-be-checked application identifier matches the preset application identifier, and the first to-be-checked information matches the first check item, it can be considered that the target application has not changed when the terminal initiates the first page access message. The terminal can obtain the to-be-accessed page through the target application, and the first check item is not intercepted in the process of transmission of the first check item between the second server, the first server and the terminal, which can effectively improve the security of the communication connection and ensure the security of data transmission.
[0076] In one embodiment, when the second server verifies that the to-be-checked application identifier matches the preset application identifier, and the first to-be-checked information matches the first check item, the second feedback information allowing the terminal to access the to-be-accessed page is generated, and the second feedback information is sent to the terminal, so that the terminal can access the to-be-accessed page according to the second feedback information. For example, after the first to-be-checked information and the to-be-checked application identifier are checked, the second server encapsulates the parameter information included in the to-be-accessed page in the second feedback information, and sends the second feedback information to the terminal. After the terminal receives the second feedback information, the terminal can display the to-be-accessed page on the terminal interface, so that the user can use the terminal to access the to-be-accessed page, for example, to obtain the required virtual resource from the to-be-accessed page to generate a virtual resource obtaining request.
[0077] In one embodiment, when the first check item includes a first sub-check item and a second sub-check item, the first to-be-checked information corresponds to a first sub-to-be-checked information and a second sub-to-be-checked information, and the to-be-checked information and the first check item match includes that the first sub-check item and the first sub-to-be-checked information match, the second sub-check item and the second sub-to-be-checked information match, the first sub-check item and the second sub-to-be-checked information are successfully checked in pairs, and the second sub-check item and the first sub-to-be-checked information are successfully checked in pairs.
[0078] In the above page access method, the generation of the check item is realized by the second server. In each interaction between the first server and the terminal, the first server and the terminal are subjected to authority verification. When the verification is passed, the page access, data transmission and the like can be performed, so that the security of the page access can be improved.
[0079] In an optional embodiment, after the receiving terminal encrypts and sends the first page access message corresponding to the page access address, the method further comprises: when the first to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, generating a second verification item and setting the first verification item as invalid; obtaining the terminal identifier carried in the first page access information, generating a corresponding third verification item according to the terminal identifier; setting the second verification item and the third verification item correspondingly, and sending the third verification item to the terminal.
[0080] The second verification item is used to verify the permission of the communication connection between the terminal and the second server.
[0081] Optionally, to ensure the security of the communication between the terminal and the second server, the second server can generate a second verification item and set the first verification item as invalid when the first to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, and use the newly generated second verification item to verify the communication between the terminal and the second server. By using a new verification item to verify the permission of the communication connection each time, the security can be effectively improved.
[0082] In an embodiment, the first page access message further carries a terminal identifier, the second server obtains the terminal identifier from the second page access message and generates a third verification item based on the terminal identifier, and the third verification item can be sent to the terminal. The third verification item is used to verify whether the terminal is allowed to access the to-be-accessed page. Optionally, the third verification item can be a hash value.
[0083] Optionally, the second server can set the second verification item and the third verification item correspondingly, so that when the second server verifies the permission of the communication connection between the terminal and the second server, the correspondence between the second verification item and the third verification item can be verified.
[0084] In this embodiment, after the matching of the first to-be-verified information and the to-be-verified application identifier in the first page access message is successful, a new second verification item is generated and the first verification item is invalidated, so that when the permission is verified in the process of each communication connection and data transmission, the new verification item is used for verification, which can effectively improve the security.
[0085] In an optional embodiment, after the third verification item is sent to the terminal, the page access method further comprises: receiving a second page access message sent by the terminal, the second page access message comprising second to-be-verified information and a virtual resource acquisition request; when the second to-be-verified information matches the third to-be-verified item and the second to-be-verified information matches the second verification item successfully, executing the virtual resource acquisition request.
[0086] Optionally, the user operation terminal determines the required virtual resource, and the terminal generates a virtual resource application request after receiving the user-selected virtual resource.
[0087] Optionally, after generating the virtual resource application request, the terminal encapsulates the third check item as the second to-be-checked information together with the virtual resource application request to generate a second page access message, and sends the second page access message to the second server.
[0088] In an embodiment, the second server obtains the second to-be-checked information from the second page access message after receiving the second page access message, and checks the second to-be-checked information to determine whether the terminal has the permission to obtain the virtual resource.
[0089] Optionally, when the second to-be-checked information and the second check item are successfully paired, it is considered that the terminal corresponding to the second page access message has the permission to obtain the virtual resource.
[0090] Optionally, after the second to-be-checked information and the second check item are successfully paired, the virtual resource obtaining request is executed.
[0091] In this embodiment, by checking whether the second check information and the generated third check item are paired, the verification of the terminal initiating the virtual resource obtaining request is realized, thereby improving the security of data acquisition and the security of virtual resources.
[0092] In an optional embodiment, the virtual resource obtaining request can include: obtaining the identity according to the second check item; determining the corresponding credit data according to the identity; when the credit data is greater than or equal to the preset credit data, generating third feedback information allowing the virtual resource to be obtained; and sending the third feedback information to the terminal, the third feedback information being used to instruct the terminal to execute the step of confirming the acquisition of the virtual resource.
[0093] Optionally, the identity can be carried in the first access request initiated by the terminal, sent by the terminal to the first server, and sent by the first server to the second server, and the second server sets the identity corresponding to the first check item after generating the first check item.
[0094] Optionally, after the second server generates the second check item and sets the first check item to be invalid, the second server obtains the user identity according to the first check item, and sets the second check item corresponding to the user identity, so that in the process of executing the step of confirming the acquisition of the virtual resource, the acquisition of the user identity is realized directly through the interaction between the servers, and the user identity is interacted between the servers, thereby improving the security.
[0095] In an optional embodiment, after obtaining the user identity, the user identity is used to determine the credit data.
[0096] Optionally, after determining the credit data, the credit data can be compared with preset credit data. If the credit data is greater than the preset credit data, it can be considered that the credit of the user corresponding to the identity is high, and the user can be allowed to obtain the virtual resource, so as to generate third feedback information, and the third feedback information can be sent to the terminal.
[0097] In an embodiment, after the terminal receives the third feedback information, the terminal performs the step of confirming the obtaining of the virtual resource according to the third feedback information, for example, performs the resource transfer behavior.
[0098] In this embodiment, after the identity is transmitted from the first server to the second server, the second server sets the first check item and the second check item correspondingly, so that the identity can be transmitted in the second server without being transmitted by the terminal to the second server, thereby ensuring the security of the identity.
[0099] In an optional embodiment, the first server is provided with a first information transceiving interface, and the second server is provided with a second information transceiving interface.
[0100] Optionally, the first information transceiving interface is a JAVA SDK (Software Development Kit, a series of program interfaces), and the second information transceiving interface is a JSSDK (JavaScript SDK, a set of API interfaces required for WeChat public number development).
[0101] In an optional embodiment, when data or messages or information are transmitted between any two of the terminal, the first server and the second server, the sender encrypts the data when transmitting the data, and the receiver decrypts the received data to obtain the data. Optionally, the data includes but is not limited to requests, messages, feedback information, etc.
[0102] Illustratively, when the first server sends an access control request to the second server, the access control request is encrypted and sent by the first information transceiving interface, the second server receives the access control request by the second information transceiving interface, and the second information transceiving interface is used to decrypt and parse the received access control request to obtain the page identifier of the page to be accessed and the first application identifier of the target application corresponding to the first server.
[0103] In one embodiment, when the second server sends the first feedback information to the first server, the first feedback information is sent by the second information transceiver interface, and the first feedback information is decrypted and parsed by the first information transceiver interface on the first server to obtain the first check item and the page access address.
[0104] Optionally, when the terminal sends the first page access message to the second server, the first page access message is encrypted by the information transceiver interface on the terminal, and the first page access message is decrypted and parsed by the second server to obtain the first to-be-checked information and the to-be-checked application identifier.
[0105] Optionally, the encryption algorithm can be a random symmetric encryption algorithm, and a multi-bit key including a public key and a private key is pre-generated. When sending data, the sender encrypts the data by using the public key, and the receiver decrypts by using the corresponding private key. In one embodiment, the multi-bit key can be a 32-bit key.
[0106] In this embodiment, data is encrypted for each sending, which can effectively improve data security. The check item and the to-be-checked information are encrypted and sent, so that a combination of multiple security modes can be achieved, thereby further improving data security.
[0107] In one exemplary embodiment, as shown in Figure 3 , a page access method is provided, which is applied to a terminal in Figure 1 for example, and includes the following steps 302 to 306, wherein:
[0108] Step 302, sending a first page access request to a second server.
[0109] The first page access request includes first to-be-checked information and a to-be-checked application identifier.
[0110] Optionally, before the terminal sends the first page access message to the second server, access indication information is sent to a first server corresponding to the target application. The first server generates an access control request according to the access indication information, and can send the access control request to the second server, so that the second server controls the access of the terminal. The second server can generate the first to-be-checked item and send it to the first server, so that the first server sends the first to-be-checked item to the terminal. Thus, when the terminal communicates with the second server, the first to-be-checked item can be used for verification.
[0111] Step 304, receiving second feedback information sent by the second server.
[0112] The second feedback information is used to indicate that the terminal is allowed to access the to-be-accessed page.
[0113] Optionally, the second feedback information is triggered when the first page access information satisfies the permission verification condition.
[0114] Optionally, the permission verification condition comprises that the first to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier.
[0115] In one embodiment, the first to-be-verified information and the to-be-verified application identifier are matched by the second server, for example, the second server matches the first to-be-verified information and the first verification item, matches the to-be-verified application identifier and the preset application identifier, and generates the second feedback information when the first to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier.
[0116] Step 306, accessing the to-be-accessed page according to the second feedback information.
[0117] In this embodiment, the second server verifies the permission of the second terminal by sending the second feedback information to the second server by the terminal, thereby ensuring the security of the communication between the terminal and the second server, and improving the security of data transmission.
[0118] In one embodiment, before sending the first page access message to the second server, the method further comprises: sending an access indication message to the first server, wherein the access indication message comprises a page identifier of the to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application is integrated with the to-be-accessed page, and the access indication message is used to instruct the first server to send an access control request to the second server, and the access control request is used to request access control on the message sent by the terminal to the second server.
[0119] In one exemplary embodiment, as shown in Figure 4 A page access signaling interaction method is provided, comprising the following steps 402 to 426, wherein:
[0120] Step 402, the terminal sends an access indication message to the first server.
[0121] Optionally, the access indication message comprises a page identifier of the to-be-accessed page and a first application identifier of a target application corresponding to the first server.
[0122] Step 404, the first server generates an access control request according to the page identifier of the to-be-accessed page and the first application identifier of the target application corresponding to the first server.
[0123] Step 406, the first server sends the access control request to the second server.
[0124] The access control request includes a page identifier of a page to be accessed and a first application identifier of a target application corresponding to the first server.
[0125] In step 408, the second server generates a first check item and acquires a page access address corresponding to the page identifier when determining that the first application identifier matches the preset application identifier.
[0126] In step 410, the second server generates first feedback information according to the first check item and the page access address.
[0127] In step 412, the second server sends the first feedback information to the first server.
[0128] Optionally, the first feedback information carries the first check item and the page access address.
[0129] In step 414, the first server acquires the first check item and the page access address from the first feedback information.
[0130] In step 416, the first server sends the first check item and the page access address to the terminal.
[0131] In step 418, the terminal generates first page access information according to the page access address included in the first feedback information.
[0132] Optionally, the first page access information includes first check information and a check application identifier.
[0133] In step 420, the terminal sends the first page access information to the second server.
[0134] In step 422, the second server verifies that the first check information matches the first check item and the check application identifier matches the preset application identifier, generates a second check item, and sets the first check item as invalid.
[0135] In step 424, the second server generates second feedback information according to the second check item.
[0136] In step 426, the second server sends the second feedback information to the terminal.
[0137] In this embodiment, the second server generates the check item, and the first server and the terminal perform permission verification each time the first server and the terminal interact, so that the terminal can access the page and transmit data only when the verification is passed, thereby improving the security of page access.
[0138] It should be understood that although each step in the flowchart involved in the embodiments described above is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowchart involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.
[0139] Based on the same inventive concept, the embodiments of the present application also provide a page access device for implementing the above-mentioned page access method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more page access device embodiments provided below can refer to the limitations of the page access method described above, which will not be repeated here.
[0140] In one exemplary embodiment, as shown in Figure 5 A page access device 500 is provided, comprising: a first receiving module 502, a first verification module 504, a first feedback module 506, a second receiving module 508, and a second feedback module 510, wherein:
[0141] The first receiving module 502 is configured to receive an access control request sent by a first server, the access control request being used to request access control on a message sent by a terminal to a second server, the access control request comprising a page identifier of a page to be accessed and a first application identifier of a target application corresponding to the first server, and the target application integrating the page to be accessed.
[0142] The first verification module 504 is configured to generate a first verification item and acquire a page access address corresponding to the page identifier when the first application identifier matches a preset application identifier.
[0143] The first feedback module 506 is configured to send first feedback information to the first server, so that the first server sends the first feedback information to the terminal, the first feedback information carrying the first verification item and the page access address.
[0144] The second receiving module 508 is configured to receive a first page access message corresponding to the page access address sent by the terminal, the first page access message comprising first verification information and a verification application identifier.
[0145] The second feedback module 510 is configured to send second feedback information to the terminal in an encrypted manner when the to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, the second feedback information being used to instruct the terminal to allow access to the to-be-accessed page.
[0146] In an embodiment, the page access apparatus 500 further includes:
[0147] The second verification module is configured to generate a second verification item and set the first verification item as invalid when the first to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, and to generate a third verification item corresponding to the terminal identifier according to the terminal identifier carried in the first page access information.
[0148] The sending module is configured to set the second verification item in correspondence with the third verification item and send the third verification item to the terminal.
[0149] In an embodiment, the page access apparatus 500 further includes:
[0150] The third receiving module is configured to receive a second page access message sent by the terminal, the second page access message including second to-be-verified information and a virtual resource acquisition request.
[0151] The executing module is configured to execute the virtual resource acquisition request when the second to-be-verified information matches the third verification item and the second to-be-verified information is successfully paired with the second verification item.
[0152] In an embodiment, the page access apparatus 500 further includes:
[0153] The setting module is configured to set the identity identifier in correspondence with the first verification item and to set the identity identifier in correspondence with the second verification item after the second verification item is generated.
[0154] The executing module is further configured to acquire the identity identifier according to the second verification item, to determine corresponding credit data according to the identity identifier, to generate third feedback information allowing acquisition of the virtual resource when the credit data is greater than or equal to preset credit data, and to send the third feedback information to the terminal, the third feedback information being used to instruct the terminal to execute a step of confirming acquisition of the virtual resource.
[0155] In one embodiment, the first check item includes a first sub-check item and a second sub-check item, the to-be-checked information includes a first sub-to-be-checked information and a second sub-to-be-checked information, the second feedback module is further configured to check the first sub-check item and the first sub-to-be-checked information, check the second sub-check item and the second sub-to-be-checked information, check the first sub-check item and the second sub-to-be-checked information in pairs, and check the second sub-check item and the first sub-to-be-checked information in pairs.
[0156] In one example embodiment, as shown in FIG. 6, a page access apparatus 600 is provided, which includes an access information sending module 602, a feedback information receiving module 604, and an access module 606, wherein: Figure 6
[0157] The access information sending module 602 is configured to send a first page access message to the second server, the first page access message including a first to-be-checked information and a to-be-checked application identifier.
[0158] The feedback information receiving module 604 is configured to receive second feedback information sent by the second server, the second feedback information being used to indicate that the terminal is allowed to access the to-be-accessed page; the second feedback information is triggered when the first page access message satisfies an authority verification condition, and the authority verification condition includes that the first to-be-checked information matches a first check item and the to-be-checked application identifier matches a preset application identifier.
[0159] The access module 606 is configured to access the to-be-accessed page according to the second feedback information.
[0160] In one embodiment, the page access apparatus 600 further includes:
[0161] An access indication sending module is configured to send an access indication message to a first server; wherein the access indication message includes a page identifier of a to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application integrating the to-be-accessed page, and the access indication message being used to instruct the first server to send an access control request to the second server, the access control request being used to request access control on a message sent by a terminal to the second server.
[0162] The above modules in the page access apparatus can be all or partially implemented by software, hardware, and combinations thereof. The above modules can be embedded in or independent of a processor in a computer device in a hardware form, or can be stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform operations corresponding to the above modules.
[0163] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a page access method.
[0164] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a page access method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0165] Those skilled in the art will understand that Figures 7-8The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0166] In an exemplary embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the method embodiments when executing the computer program.
[0167] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implementing the steps in the method embodiments when executed by a processor.
[0168] In an embodiment, a computer program product is provided, comprising a computer program, and the computer program implementing the steps in the method embodiments when executed by a processor.
[0169] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0170] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.
[0171] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A page access method, characterized by, Applied to a second server, the method comprises: Receiving an access control request sent by a first server, the access control request being used for requesting access control on a message sent by a terminal to the second server, the access control request comprising a page identifier of a to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application being integrated with the to-be-accessed page; When the first application identifier matches a preset application identifier, generating a first check item and obtaining a page access address corresponding to the page identifier; Encrypting and sending first feedback information to the first server, so that the first server sends the first feedback information to the terminal, the first feedback information carrying the first check item and the page access address; Receiving a first page access message corresponding to the page access address and sent by the terminal, the first page access message comprising first to-be-checked information and a to-be-checked application identifier; When the to-be-checked information matches the first check item and the to-be-checked application identifier matches the preset application identifier, encrypting and sending second feedback information to the terminal, the second feedback information being used for indicating that the terminal is allowed to access the to-be-accessed page.
2. The method of claim 1, wherein, After the receiving of the first page access message corresponding to the page access address and sent by the terminal, the method further comprises: When the first to-be-checked information matches the first check item and the to-be-checked application identifier matches the preset application identifier, generating a second check item and setting the first check item as invalid; Obtaining a terminal identifier carried in the first page access information, and generating a third check item corresponding to the terminal identifier; Correspondingly setting the second check item and the third check item, and sending the third check item to the terminal.
3. The method of claim 2, wherein, After the sending of the third check item to the terminal, the method further comprises: Receiving a second page access message sent by the terminal, the second page access message comprising second to-be-checked information and a virtual resource acquisition request; When the second to-be-checked information matches the third check item and the second to-be-checked information and the second check item are successfully paired, executing the virtual resource acquisition request.
4. The method of claim 3, wherein, The access control request further comprises an identity identifier, and after the generating of the first check item, the method further comprises: After correspondingly setting the identity identifier and the first check item and generating the second check item, obtaining the identity identifier corresponding to the first check item, and correspondingly setting the identity identifier and the second check item; The executing of the virtual resource acquisition request comprises: Obtaining the identity identifier according to the second check item; Determining corresponding credit data according to the identity identifier; When the credit data is greater than or equal to preset credit data, generating third feedback information allowing the virtual resource to be acquired; Sending the third feedback information to the terminal, the third feedback information being used for indicating that the terminal executes a step of confirming acquisition of the virtual resource.
5. The method according to any one of claims 1 to 4, characterized in that, The first check item includes a first sub-check item and a second sub-check item, the to-be-checked information includes first sub-to-be-checked information and second sub-to-be-checked information, and the matching of the to-be-checked information and the first check item includes: The first sub-check item matches the first sub-to-be-checked information, the second sub-check item matches the second sub-to-be-checked information, the first sub-check item and the second sub-to-be-checked information pass the pair check, and the second sub-check item and the first sub-to-be-checked information pass the pair check.
6. A page access method characterized by comprising: The method applied to a terminal comprises: sending an access indication message to a first server, wherein the access indication message includes a page identifier of a to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application integrates the to-be-accessed page, and the access indication message is used to instruct the first server to send an access control request to a second server, the access control request is used to request access control on a message sent by the terminal to the second server; receiving first feedback information sent by the first server, the first feedback information is generated by the second server, and the first feedback information carries a first check item and a page access address; sending a first page access message corresponding to the page access address to the second server, the first page access message includes first to-be-checked information and a to-be-checked application identifier; receiving second feedback information sent by the second server, the second feedback information is used to instruct the terminal to access the to-be-accessed page; the second feedback information is triggered when the first page access message meets an authority verification condition, and the authority verification condition includes that the first to-be-checked information matches the first check item and the to-be-checked application identifier matches a preset application identifier; accessing the to-be-accessed page according to the second feedback information.
7. A page access device, characterized by The device applied to a second server comprises: a first receiving module configured to receive an access control request sent by a first server, the access control request is used to request access control on a message sent by a terminal to a second server, and the access control request includes a page identifier of a to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application integrates the to-be-accessed page; a first check module configured to generate a first check item and obtain a page access address corresponding to the page identifier when the first application identifier matches a preset application identifier; a first feedback module configured to send first feedback information to the first server, so that the first server sends the first feedback information to the terminal, the first feedback information carries the first check item and the page access address; a second receiving module configured to receive a first page access message corresponding to the page access address and sent by the terminal, the first page access message includes first to-be-checked information and a to-be-checked application identifier. The second feedback module is configured to send second feedback information to the terminal when the to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, the second feedback information being used to instruct the terminal to allow access to the to-be-accessed page.
8. The apparatus of claim 7, wherein, The page access device further comprises: The second verification module is configured to generate a second verification item when the first to-be-verified information matches the first verification item and the to-be-verified application identifier matches the preset application identifier, and set the first verification item as invalid; obtain a terminal identifier carried in the first page access information, and generate a corresponding third verification item according to the terminal identifier; The sending module is configured to set the second verification item in correspondence with the third verification item, and send the third verification item to the terminal.
9. The apparatus of claim 8, wherein, The page access device further comprises: The third receiving module is configured to receive a second page access message sent by the terminal, the second page access message comprising second to-be-verified information and a virtual resource acquisition request; The execution module is configured to execute the virtual resource acquisition request when the second to-be-verified information matches the third verification item and the second to-be-verified information is successfully paired with the second verification item.
10. The apparatus of claim 9, wherein, The access control request further comprises an identity identifier, and the page access device further comprises: The setting module is configured to set the identity identifier in correspondence with the first verification item, and obtain the identity identifier corresponding to the first verification item after generating the second verification item, and set the identity identifier in correspondence with the second verification item; The execution module is further configured to obtain the identity identifier according to the second verification item, determine corresponding credit data according to the identity identifier, generate third feedback information allowing acquisition of the virtual resource when the credit data is greater than or equal to preset credit data, and send the third feedback information to the terminal, the third feedback information being used to instruct the terminal to execute a step of confirming acquisition of the virtual resource.
11. The device according to any of claims 7-10, characterized in that The first verification item comprises a first sub-verification item and a second sub-verification item, the to-be-verified information comprises first sub-to-be-verified information and second sub-to-be-verified information, and the second feedback module is further configured to match the first sub-verification item and the first sub-to-be-verified information, match the second sub-verification item and the second sub-to-be-verified information, successfully pair check the first sub-verification item and the second sub-to-be-verified information, and successfully pair check the second sub-verification item and the first sub-to-be-verified information.
12. A page access device, characterized by The device comprises: The access indication sending module is configured to send an access indication message to a first server, the access indication message comprising a page identifier of a to-be-accessed page and a first application identifier of a target application corresponding to the first server, the target application being integrated with the to-be-accessed page, the access indication message being used to instruct the first server to send an access control request to a second server, the access control request being used to request access control on a message sent by the terminal to the second server; The apparatus is further configured to receive first feedback information sent by the first server, wherein the first feedback information is generated by the second server, and the first feedback information carries a first check item and a page access address; The access information sending module is configured to send, to the second server, a first page access message corresponding to the page access address, wherein the first page access message comprises first to-be-checked information and a to-be-checked application identifier; The feedback information receiving module is configured to receive second feedback information sent by the second server, wherein the second feedback information is used to indicate that the terminal is allowed to access a to-be-accessed page; the second feedback information is triggered when the first page access message satisfies a permission verification condition, and the permission verification condition comprises that the first to-be-checked information matches the first check item and the to-be-checked application identifier matches a preset application identifier; The access module is configured to access the to-be-accessed page according to the second feedback information.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
14. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
15. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.
Citation Information
Patent Citations
Page access method and apparatus thereof
CN105915639A
Page access method and device, server and page access system
CN111026950A