Method for maintaining user status in hybrid mode mobile applications

By introducing intermediate page user status maintenance technology and server-side encryption and decryption processing technology in hybrid mode mobile applications, the problems of low user data security and low URL request efficiency in the prior art are solved, and more efficient and secure users are achieved Status remains.

CN114154089BActive Publication Date: 2025-02-18FUJIAN FUNO MOBILE COMM TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111249862.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-02-18
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

In the prior art, when the hybrid mode mobile application maintains the user status, user data security is low and URL request efficiency is low, resulting in user information being exposed to the network, and the development process is complicated.

Method used

By introducing intermediate page user status maintenance technology in hybrid mode mobile applications, using the bridge protocol (JSBridge) to request user information status information from the APP native application, and through server encryption and decryption processing technology, the user information is secure during transmission. sex.

Benefits of technology

It improves the security of user data and URL request efficiency, avoids the exposure of user information on the network, simplifies the development process, and ensures the security of data transmission through AES encryption and decryption technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114154089B_ABST
    Figure CN114154089B_ABST
Patent Text Reader

Abstract

The present invention proposes a hybrid mode mobile application user status preservation method, which is characterized in that: when a WEB application needs to provide user information status, first determine whether the current page needs to maintain user status information based on the URL. If necessary, redirect a new intermediate WEB page through the webview container, obtain URL request information through the WEB page, request user information status information from the APP native application through the bridge protocol JSBridge, and submit the request information to the WEB application at the same time. After the WEB application parses the request information and verifies the user information, it writes authentication cookies information to the current webview container and jumps to the business URL with the current page request information, and finally realizes user status preservation through cookies. It aims to improve the efficiency of WEB application development and improve the security of user data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of data access technology and software development auxiliary technology, and in particular to a hybrid mode mobile application user state maintaining method. Background Art

[0002] Hybrid mode mobile applications look like native apps, but in reality they load webview containers in native frameworks to access remote WEB applications. According to the business usage scenarios of WEB applications, when a user logs in to a hybrid mode mobile application, it is necessary to determine the information of the current login user (i.e., user status) in order to assign corresponding permissions and display corresponding business information to the current user.

[0003] Under existing technical conditions, the method of maintaining user status is: when webview calls a URL with permission requirements, it is necessary to obtain the plaintext user information saved by the native APP through the bridge protocol (JSBridge) for the display of user information, and at the same time, the user information needs to be passed to the WEB application for verification, and the business data is returned after the verification is passed. Its technical disadvantages are: low user data security and low URL request efficiency. Low user data security is manifested as: 1. User information obtains the plaintext user information saved by the native APP through the bridge protocol (JSBridge), which is directly used for the display of user information and the direct processing of plaintext information; 2. The user information needs to be passed to the WEB application for verification, and this process directly exposes the data on the Internet. 3. The plaintext user information saved by the native APP has a strong data security that depends on the security mechanism of the native APP.

[0004] Among them, the URL request efficiency is low, which is manifested in that each request needs to pass user information to the WEB application for verification, and the development process is complicated. Summary of the invention

[0005] In order to solve the defects and deficiencies in the prior art, the present invention proposes a hybrid mode mobile application user status preservation method, which aims to improve the efficiency of WEB application development and improve the security of user data.

[0006] The present invention specifically includes the following contents:

[0007] A hybrid mode mobile application user status preservation method, characterized in that: when a WEB application needs to provide user information status, first determine whether the current page needs to maintain user status information based on the URL. If necessary, redirect a new intermediate WEB page through the webview container, obtain URL request information through the WEB page, request user information status information from the APP native application through the bridge protocol JSBridge, and submit the request information to the WEB application at the same time. After the WEB application parses the request information and verifies the user information, it writes authentication cookies information to the current webview container and carries the current page request information to jump to the business URL, and finally implements user status preservation through cookies.

[0008] Furthermore, when the webview container requests user information status information from the APP native application through the bridge protocol JSBridge, what is returned is the information encrypted by the server.

[0009] A method for maintaining user status of a hybrid mode mobile application, characterized by comprising the following steps:

[0010] Step S1: For a WEB application that needs to provide user information status, it is accessed through the webview container. When the WEB application learns that the current URL access requires user information status, it jumps to step S2;

[0011] Step S2: According to the request of step S1, redirect an intermediate WEB page, which collects the request parameters of step S1; execute step S3, after obtaining the user information status, put the request result into the form of the intermediate WEB page; the intermediate WEB page initiates a POST form request to the WEB application, and the WEB application decrypts and parses the current user information according to the form information of the intermediate WEB page, writes the authentication cookies information to the current webview container, and after executing step S4, jumps back to step S1;

[0012] Step S3: the webview container requests user information status information from the APP native application through the bridge protocol JSBridge, and the APP native application calls the WEB application to obtain the encrypted user information status information of the server;

[0013] Step S4: Complete the business call of the WEB application according to the authentication cookies information generated in step S2.

[0014] Furthermore, in step S2, the intermediate WEB page collects the request parameters of step S1, hides them in the form of key-value in the form of the current intermediate WEB page, and also puts the request result of step S3 into the form of the intermediate WEB page, with the key value being user_info and the value being the request result of step S3.

[0015] Furthermore, in step S3, the APP native application calls the WEB application to obtain the user information status information encrypted by AES on the server; after returning to step S2, the intermediate WEB page initiates a POST form request to the WEB application, and the WEB application decrypts and parses the current user information through AES based on the form information with the key value of user_info on the intermediate WEB page.

[0016] And, an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, the steps of the hybrid mode mobile application user status maintenance method as described above are implemented.

[0017] And, a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the hybrid mode mobile application user state preservation method as described above are implemented.

[0018] The present invention and its preferred solution realize the organic combination of native APP and WEB application through the intermediate page user status maintenance technology, and play the role of a glue in the development of hybrid mode mobile applications. Compared with the existing technology, only through this technology, traditional WEB application development technology can be applied to native APP, thereby improving the efficiency of WEB application development.

[0019] Through the user information interface, the server-side encryption and decryption processing technology is used to improve the security of native APP and WEB applications. WEB applications will not lose control of the secret key of the native interface, resulting in the loss of control of the entire WEB application business. The entire transmission process is based on AES encryption and decryption technology, which is safer than the existing technical processing methods. WEB applications are applied to native APPs to achieve security isolation. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0021] Figure 1 It is a schematic diagram of the scheme architecture and workflow of an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail with the accompanying drawings as follows:

[0023] Definition of noun:

[0024] AES: Symmetric encryption algorithm, AES (The Advanced Encryption Standard) is a specification for encrypting electronic data from the National Institute of Standards and Technology of the United States. AES is a new encryption algorithm that can be used to protect electronic data. AES is an iterative, symmetric key block cipher that can use 128, 192, and 256-bit keys and encrypt and decrypt data in 128-bit (16-byte) blocks. Symmetric key ciphers use the same key to encrypt and decrypt data. The number of bits of encrypted data returned by the block cipher is the same as the input data. Iterative encryption uses a loop structure in which permutations and substitutions are repeated on the input data.

[0025] The scheme of the hybrid mode mobile application user status maintenance method provided in this embodiment is as follows Figure 1 As shown, the following steps are included:

[0026] Step 1: The WEB application that needs to provide user information status is accessed through the webview container. The WEB application knows that the current URL access requires user information status and jumps to step 2

[0027] Step 2: According to the request in step 1, redirect an intermediate web page, which collects the request parameters of step 1 and hides them in the form of key-value in the current intermediate web page. At the same time, the request result of step 3 is also put into the form of the intermediate web page, with the key value of user_info and the value of the request result of step 3. After obtaining the user information status of step 3, the intermediate web page initiates a POST form request to the web application. The web application parses the current user information through AES decryption based on the form information with the key value of user_info in the intermediate web page, writes the authentication cookies information to the current webview container, and jumps to step 1.

[0028] Step 3: The webview container requests user information status information from the APP native application through the bridge protocol (JSBridge), and the APP native application calls the WEB application to obtain the user information status information encrypted by AES on the server.

[0029] Step 4: Complete the business call of the WEB application based on the authentication cookies information generated in step 2. The design points of the above solution are:

[0030] 1. Intermediate page user status retention technology: When a WEB application needs to provide user information status, it is determined based on the URL whether the current page needs to maintain user status information. If necessary, a new intermediate WEB page can be redirected. This page obtains URL request information and requests user information status information from the APP native application through the bridge protocol (JSBridge). At the same time, the request information is submitted to the WEB application. After the WEB application parses the request information and verifies the user information, it writes authentication cookies information to the current webview container and jumps to the business URL with the current page request information. Finally, the user status is maintained through cookies.

[0031] 2. The user information interface uses server-side encryption and decryption processing technology: the user information status information is requested from the APP native application through the bridge protocol (JSBridge), and the information returned is encrypted by the server. Only the server knows the decrypted information, which will not cause the client key to be leaked, causing the collapse of the entire security mechanism.

[0032] The above solution provided in this embodiment can be stored in a computer-readable storage medium in a coded form and implemented in the form of a computer program, and the basic parameter information required for calculation is input through computer hardware, and the calculation result is output.

[0033] It should be understood by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0034] The present invention is described with reference to flowcharts of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process in the flowchart, as well as the combination of processes in the flowchart, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A device that specifies functions in a process or multiple processes.

[0035] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple functions specified in a flowchart.

[0036] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.

[0037] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

[0038] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other forms of hybrid mode mobile application user status maintenance methods under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.

Claims

1. A method for maintaining user status of a hybrid mode mobile application, characterized in that: The following steps are involved: Step S1: For a WEB application that needs to provide user information status, it is accessed through the webview container. When the WEB application learns that the current URL access requires user information status, it jumps to step S2; Step S2: According to the request of step S1, redirect an intermediate WEB page, which collects the request parameters of step S1; execute step S3, after obtaining the user information status, put the request result into the form of the intermediate WEB page; the intermediate WEB page initiates a POST form request to the WEB application, and the WEB application decrypts and parses the current user information according to the form information of the intermediate WEB page, writes the authentication cookies information to the current webview container, and after executing step S4, jumps back to step S1; In step S2, the intermediate WEB page collects the request parameters of step S1, hides them in the form of key-value in the form of the current intermediate WEB page, and also puts the request result of step S3 into the form of the intermediate WEB page, with the key value being user_info and the value being the request result of step S3; Step S3: the webview container requests user information status information from the APP native application through the bridge protocol JSBridge, and the APP native application calls the WEB application to obtain the encrypted user information status information of the server; Step S4: Complete the business call of the WEB application according to the authentication cookies information generated in step S2.

2. The method for maintaining user status of a hybrid mode mobile application according to claim 1, characterized in that: In step S3, the APP native application calls the WEB application to obtain the user information status information encrypted by AES on the server; after returning to step S2, the intermediate WEB page initiates a POST form request to the WEB application, and the WEB application decrypts and parses the current user information through AES based on the form information with the key value of user_info on the intermediate WEB page.

3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the hybrid mode mobile application user status maintenance method as described in any one of claims 1-2 are implemented.

4. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the hybrid mode mobile application user status maintenance method as described in any one of claims 1-2 are implemented.

Citation Information

Patent Citations

  • Page access method, equipment and computer storage medium

    CN107145552A