Data processing method and device, electronic equipment and computer readable medium
By detecting the loading information of the H5 page and logging in without logging, the problem of multiple login on the H5 page in native applications is solved, improving the user experience and reducing the sense of application fragmentation.
Patent Information
- Application Number
- CN202311261504.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-04-04
AI Technical Summary
In the native application, the H5 page will appear again after logging into the business system, resulting in inconsistent internal and external login status, poor user experience, and multiple logins cause serious disintegration of the application.
By receiving the loading information of the H5 page, check whether the preset login interception information is included. If included, determine and save the business address after the login is successful, and log in without login, and control the business address of the H5 page loading after success.
It avoids multiple logins on the H5 page, reduces the sense of separation of the application and improves the user experience.
Smart Images

Figure CN119760258A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method and apparatus, an electronic device, and a computer-readable medium. Background Art
[0002] In traditional technology, an H5 (HTML5, Hyper Text Markup Language) page is embedded in a native application, and the H5 page can realize the function of displaying a web page in a client.
[0003] When the native application logs in to the business system, the login page will appear again in the H5 page, which may cause inconsistency between the internal and external login states, thereby causing confusion in the two scene processes during user use and poor user experience; and multiple logins cause an extremely serious sense of fragmentation in the entire application, making the use of the application cumbersome and complicated. Summary of the invention
[0004] The embodiments of the present disclosure provide a data processing method and device, an electronic device, and a computer-readable medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a data processing method, which includes: receiving the latest loading information of an H5 page in a native application; based on an interception rule, detecting whether the loading information includes preset login interception information; in response to detecting that the loading information includes the preset login interception information, determining and saving a business address to be loaded after a successful login based on the loading information; performing a log-free login based on the business address, and after the log-free login is successful, controlling the H5 page to load the business address.
[0006] In some embodiments, the above method also includes: in response to detecting that the loading information does not include preset login interception information, controlling the H5 page to load the loading information.
[0007] In some embodiments, the above-mentioned free login is performed based on the business address, and after the free login is successful, controlling the H5 page to load the business address includes: obtaining the free login address based on user information and the business address; obtaining the free login certificate based on the free login address; inserting the free login certificate into the text memory of the H5 page, so that the H5 page determines that the native application has successfully logged in based on the free login certificate, and obtains business data related to the business address from the business end based on the free login certificate.
[0008] In some embodiments, the above-mentioned log-free login is performed based on the business address, and after the log-free login is successful, controlling the H5 page to load the business address includes: obtaining the log-free address based on user information and the business address; sending the log-free address to the H5 page, so that the H5 page performs the log-free login based on the log-free address, and loads the business address after the log-free login is successful.
[0009] In some embodiments, the above-mentioned response to detecting that the loading information includes preset login interception information, based on the loading information, determining and saving the business address to be loaded after successful login includes: in response to detecting that the loading information includes preset login interception information, detecting whether there is an agreed identifier after the login interception information; in response to the loading information having the agreed identifier, intercepting the address after the agreed identifier in the loading information to obtain the business address.
[0010] In some embodiments, the above-mentioned interception rules include: server-side interception rules, based on the interception rules, detecting whether the loading information includes preset login interception information includes: in response to the server being in a normal state, sending the loading information to the server, so that the server detects whether the loading information includes preset login interception information based on the server-side interception rules.
[0011] In some embodiments, the above-mentioned interception rules also include: client interception rules. Based on the interception rules, detecting whether the loading information includes preset login interception information includes: in response to the server being in an abnormal state, using the client interception rules to detect whether the loading information includes preset login interception information.
[0012] In the second aspect, an embodiment of the present disclosure provides a data processing device, which includes: a receiving unit, configured to receive the latest loading information of an H5 page in a native application; a detection unit, configured to detect whether the loading information includes preset login interception information based on an interception rule; a determination unit, configured to determine and save a business address to be loaded after a successful login based on the loading information in response to detecting that the loading information includes the preset login interception information; a login unit, configured to perform a login-free login based on the business address, and after the login-free login is successful, control the H5 page to load the business address.
[0013] In some embodiments, the above-mentioned device also includes: a control unit, configured to control the H5 page to load the loading information in response to detecting that the loading information does not include preset login interception information.
[0014] In some embodiments, the above-mentioned login unit is configured to: obtain a free login address based on user information and a business address; obtain a free login certificate based on the free login address; insert the free login certificate into the text memory of the H5 page, so that the H5 page determines that the native application has successfully logged in based on the free login certificate, and obtains business data related to the business address from the business end based on the free login certificate.
[0015] In some embodiments, the above-mentioned login unit is configured to: obtain the free login address based on user information and business address; send the free login address to the H5 page so that the H5 page performs free login based on the free login address, and load the business address after the free login is successful.
[0016] In some embodiments, the above-mentioned determination unit is further configured to: in response to detecting that the loading information includes preset login interception information, detect whether there is an agreed identifier after the login interception information; in response to the loading information having the agreed identifier, intercept the address after the agreed identifier in the loading information to obtain the business address.
[0017] In some embodiments, the above-mentioned interception rules include: server-side interception rules, and the above-mentioned detection unit is further configured to: in response to the server being in a normal state, send the loading information to the server, so that the server detects whether the loading information includes preset login interception information based on the server-side interception rules.
[0018] In some embodiments, the above-mentioned interception rules also include: client interception rules, and the above-mentioned detection unit is further configured to: in response to the server being in an abnormal state, use the client interception rules to detect whether the loading information includes preset login interception information.
[0019] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any embodiment of the first aspect.
[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the first aspect.
[0021] The data processing method and device provided by the embodiments of the present disclosure first receive the latest loading information of the H5 page in the native application; secondly, based on the interception rules, detect whether the loading information includes the preset login interception information; thirdly, in response to detecting that the loading information includes the preset login interception information, determine and save the business address to be loaded after the login is successful based on the loading information; finally, based on the business address, perform a free login, and after the free login is successful, control the H5 page to load the business address. Thus, when the H5 page of the native application has a login requirement, the free login of the free login server is performed based on the business address to be loaded after the H5 page login is successful, and the H5 page is controlled to directly load the business address after the login is successful, thereby avoiding the situation of multiple logins of the H5 page in the native application, avoiding the sense of fragmentation of the entire application caused by multiple logins, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0023] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0024] Figure 2 is a flow chart of an embodiment of a data processing method according to the present disclosure;
[0025] Figure 3 is a structural schematic diagram of a data processing system corresponding to the data processing method of the present disclosure;
[0026] Figure 4 is a schematic structural diagram of an embodiment of a data processing device according to the present disclosure;
[0027] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0028] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0029] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0030] Figure 1 An exemplary system architecture 100 is shown to which the data processing method of the present disclosure may be applied.
[0031] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, and may generally include wireless communication links and the like.
[0032] The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications, such as instant messaging tools, email clients, etc., may be installed on the terminal devices 101, 102, 103.
[0033] The terminal devices 101, 102, 103 may be hardware or software; when the terminal devices 101, 102, 103 are hardware, they may be user devices with communication and control functions, and the user devices may communicate with the server 105. When the terminal devices 101, 102, 103 are software, they may be installed in the user devices; the terminal devices 101, 102, 103 may be implemented as multiple software or software modules (for example, software or software modules for providing distributed services), or may be implemented as a single software or software module. No specific limitation is made here.
[0034] The application front end in the terminal devices 101, 102, and 103 monitors the loading information of the H5 page in real time. When there is preset login interception information in the loading information, it determines the business address after successful login, communicates with the server 105, performs log-free login for the business, and controls the H5 page to load the business address after the log-free login is successful.
[0035] The server 105 may be a server providing various services, such as a background server providing business functions for applications on the terminal devices 101, 102, 103. The background server may receive login information sent by the terminal devices 101, 102, 103, and feed back the login authentication processing result to the terminal devices 101, 102, 103.
[0036] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0037] It should be noted that a data processing method provided in an embodiment of the present disclosure is generally executed by terminal devices 101 , 102 , 103 ; a data processing device provided in an embodiment of the present disclosure is generally arranged in terminal devices 101 , 102 , 103 .
[0038] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0039] The present disclosure provides a data processing method that can solve the problem of the ecosystem within the application not being closed-loop and the serious sense of fragmentation, and can also solve the problem of poor user experience caused by multiple logins between native applications and H5 pages. Figure 2 , shows a process 200 of an embodiment of a data processing method according to the present disclosure, the data processing method comprising the following steps:
[0040] Step 201, receiving the latest loading information of the H5 page in the native application.
[0041] In this embodiment, native applications refer to applications developed by developers using the underlying operating system API. Such applications are compiled and packaged in a local environment and run directly on the target operating system, so they have fast performance and smooth user experience.
[0042] In this embodiment, the H5 page runs in the browser component webview of the native application client, such as Figure 3 As shown, when the H5 page loads some addresses, the execution body will call back the H5 page through the browser component webview to obtain the loading information. The loading information is the information that will be loaded to the H5 page. Through the loading information, the H5 page can access the business end. When the loading information includes login interception information such as the login address, the H5 page needs to log in to the business end. By processing the loading information, the business address can be obtained and loaded through the browser component webview.
[0043] In this embodiment, the execution entity on which the data processing method runs can be the client of the native application or the server of the native application. Before obtaining the loading information, the execution entity can be in a state of logging in to the business end (having obtained the business data access permission of the business end). At this time, if the loading information contains login interception information, the H5 page will face the problem of needing to log in to the business end again.
[0044] Step 202: Based on the interception rule, detect whether the loaded information includes preset login interception information.
[0045] In this embodiment, the preset login interception information is information related to the login service end, for example, the preset login interception information includes: the address of the login service end, the image of the login service end, the verification code of the login service end, etc. When the login interception information is included in the loading information, it is determined that the H5 page needs to log in to the service end, and the authentication of the service end is obtained, so that the H5 page can access the service end, wherein the service end is a service end related to business data (such as orders, after-sales, and product processing).
[0046] In this embodiment, for the business end of applications and different scenarios, the business data is diverse, and therefore, the login interception information is also diverse, for example, the login interception information is the login address.
[0047] In this embodiment, the interception rules are rules related to the login interception information set to adapt to the diversity of login interception information. For a variety of different business data, the interception rules can be used to determine whether the loading information contains login interception information.
[0048] In this embodiment, the interception rules can be locally stored rules for identifying preset login interception information; under some conditions (for example, locally updated information detection policies), the interception rules can be replaced by real-time updating of the interception rules to achieve real-time adjustment of policies with high flexibility.
[0049] The above 202 includes: selecting an interception rule from a local interception rule set, using the interception rule, and detecting whether the loaded information includes preset login interception information.
[0050] Optionally, the above 202 may also include: detecting whether the current business end has changed; responding to changes in the business end; acquiring interception rules related to the changed business end in real time, replacing the current interception rules with the acquired interception rules, and detecting through the interception rules whether the loaded information includes login interception information related to the new business end.
[0051] Optionally, the above method further comprises: updating the interception rules by pre-update or real-time update, and the effect of dynamically intercepting the loading information can be achieved by pre-update or real-time update.
[0052] In this embodiment, both pre-update and real-time update are policies configured in the same service. Pre-update means: pull the required content before use and save it to memory. When using, because the latest policy has been pre-updated locally, the obtained policy can be directly used for processing when the real-time requirement is not high. The advantage of using pre-update is: higher efficiency and faster speed; the disadvantage of using pre-update is: it cannot meet the scenario where the policy change requires real-time response.
[0053] Real-time update means that each time you request the latest strategy from the server, you can adjust the strategy in real time. The advantage of using real-time update is that it is more flexible. The disadvantage of using real-time update is that it requires requesting every time, which is relatively inefficient.
[0054] Step 203, in response to detecting that the loading information includes preset login interception information, based on the loading information, determining and saving the service address to be loaded after the login is successful.
[0055] In this embodiment, after the execution subject detects that the loading information has preset login interception information, it is determined that the H5 page needs to log in to the business end again, and obtains the business data of the business end.
[0056] In this embodiment, the business address is the address of the business terminal accessed after the H5 page successfully logs in to the business terminal, and the H5 page can obtain the business data of the business terminal through the business address. The above-mentioned determination and saving of the business address to be loaded after successful login based on the loading information includes: dividing the loading information into multiple information segments based on the information meaning of each area of the loading information; determining the information segment related to the data accessed to the business terminal, and using the information segment as the business address.
[0057] In this embodiment, when the login interception information needs to be loaded in the H5 page, the execution entity can intercept the corresponding business address, obtain the login credentials through the business address, and then load the business address again through the H5 page.
[0058] Step 204, based on the business address, perform a log-in-free login, and after the log-in-free login is successful, control the H5 page to load the business address.
[0059] Single Sign-On (SSO) is an authentication and access control solution. The SSO solution allows users to gain access to multiple related systems with only one login. The so-called single sign-on means that after entering a system, users can use multiple related systems in the same session without re-entering authentication (user name and password, etc.) because the authentication information is shared between different systems. In this way, users do not need to manually enter authentication information for each system, saving users a lot of time and trouble.
[0060] In this embodiment, the free login means that the execution subject obtains the information request of the already logged in, and obtains the free login address of the free login server through the information of the already logged in. The execution subject accesses the free login server through the free login address, and the free login server issues the free login certificate related to the business end to the execution subject. When the execution subject accesses the business end, the free login certificate is directly issued to the business end. The business end verifies the free login certificate. After the verification is passed, the execution subject can directly access the business end.
[0061] In this embodiment, the execution subject requests the free-login server through the business address, that is, the business address is the above-mentioned information request for the logged-in. The above-mentioned step 104 includes: sending the business address to the free-login server, receiving the free-login address of the free-login server, accessing the free-login server based on the free-login address, obtaining the free-login certificate related to the business end issued by the free-login server, and determining that the free-login login is successful. In this embodiment, the free-login certificate is a certificate for accessing the business end. After obtaining the free-login certificate, the business end goes to the free-login server to query whether the free-login certificate is a legal account. When the free-login server inquires that the free-login certificate is legal, it sends the data related to the business address to the front-end H5 page for display, thereby achieving the purpose of loading the business address on the H5 page.
[0062] Optionally, the above step 104 also includes: determining local user information; sending the local user information and the business address to the free-login server, receiving the free-login address of the free-login server, accessing the free-login server based on the free-login address, obtaining the free-login certificate related to the business end issued by the free-login server, and determining that the free-login login is successful; sending the free-login certificate and the business address to the business end through the H5 page, and after the business end verifies that the free-login certificate is legal, receiving and displaying the data related to the business address issued by the business end through the H5 page, so as to achieve the purpose of loading the business address through the H5 page.
[0063] In this embodiment, the log-free server is a server that stores and verifies the login credentials of the business end. After obtaining the business address, the execution subject of the data processing method of the present disclosure running on it can access the log-free server through the business address, thereby obtaining the log-free credentials for accessing the data of the business end.
[0064] The data processing method provided in this embodiment first receives the latest loading information of the H5 page in the native application; secondly, based on the interception rules, detects whether the loading information includes the preset login interception information; thirdly, in response to detecting that the loading information includes the preset login interception information, determines and saves the business address to be loaded after the login is successful based on the loading information; finally, based on the business address, performs a free login, and after the free login is successful, controls the H5 page to load the business address. Thus, when the H5 page of the native application has a login requirement, the free login of the free login server is performed based on the business address to be loaded after the H5 page login is successful, and controls the H5 page to directly load the business address after the login is successful, avoiding multiple logins of the H5 page in the native application, avoiding the sense of fragmentation of the entire application caused by multiple logins, and improving the user experience.
[0065] In some embodiments of the present disclosure, the above method also includes: in response to detecting that the loading information does not include preset login interception information, controlling the H5 page to load the loading information.
[0066] In this embodiment, the preset login interception information is information related to the login service end, for example, the preset login interception information includes: the address of the login service end, the image of the login service end, the verification code of the login service end, etc. The service end is a server or terminal that implements the service function. Both the native application and the H5 page can access the service end through the login credentials and obtain relevant service data from the service end.
[0067] In this embodiment, when the loading information does not include the preset login interception information, it is determined that the loading information does not contain the login information for logging into the business end. When the H5 page loads the loading information, there is no need for the H5 page to log in to the business end again. For this reason, the native application and the H5 page will not log in to the business end multiple times. The H5 page directly loads the loading information, which can ensure that there is no sense of application separation between the native application and the H5 page.
[0068] The data processing method provided in this embodiment directly controls the H5 page to load the loading information when it is detected that the loading information does not include the preset login interception information. The H5 page can load the required information, thereby ensuring the reliability of the information processing of the H5 page.
[0069] In some optional implementation methods disclosed, the above-mentioned free login is performed based on the business address, and after the free login is successful, controlling the H5 page to load the business address includes: obtaining the free login address based on user information and the business address; obtaining the free login certificate based on the free login address; planting the free login certificate into the text memory of the H5 page, so that the H5 page determines that the native application has successfully logged in based on the free login certificate, and obtains business data related to the business address from the business end based on the free login certificate.
[0070] In this optional implementation, user information is information of the application of the executing entity, the free-login address is the address issued by the free-login server, and the free-login certificate related to the free-login address of the free-login server can be accessed through the free-login address; the free-login certificate is information that can be recognized by the business end. When the business end (by querying the free-login server) recognizes that the free-login certificate is legal, it can access the business data of the business end through the address of the business end.
[0071] In this optional implementation, the text memory of the H5 page is a memory that stores text information related to the H5 page, and the local data of the H5 page can be stored in real time through the text memory. Specifically, the text memory is a cookie memory, and the cookie in the cookie memory is a small amount of information sent by the server to the client (browser). Planting the free login certificate into the cookie memory means storing the free login certificate into the cookie memory. The H5 page can determine that the native application has successfully logged in to the business end through the free login certificate in the cookie memory.
[0072] In this optional implementation, Cookie storage refers to the process of storing and managing HTTP Cookies sent by a website to a visitor's computer in a web browser. HTTP Cookies are a text file stored on a web client (computer) and are used to store user data of a website, such as login credentials, session information, shopping cart data, etc. Cookie storage serves web applications and can make user access to certain websites more convenient and quick.
[0073] In this optional implementation, the H5 page determines that the native application has logged in successfully based on the free login credential, and obtains business data related to the business address from the business end based on the free login credential, including: the H5 page sends the free login credential to the business end, and after the business end verifies that the free login credential is passed, the H5 page loads the business address in its loading address area, thereby accessing the business end and receiving business data related to the business address sent by the business end.
[0074] In this optional implementation, if Figure 3 When the H5 page loads a new address, the browser component webview will get the loading information through callback. When the execution subject gets the loading information, it will compare the login interception information (login address). When it is confirmed that the loading information is not the one that needs to be intercepted, it will directly allow the H5 page to load; when it is confirmed that the loading information needs to be intercepted, the loading information will be split first to get the login interception information, and the business address to be loaded after the login is successful will be intercepted and saved for easy loading after subsequent reseeding, and then the login-free login will be triggered (you can log in through the native application or through the H5 page). The R&D systems within each company have related login-free logic, which will not be repeated here. When the login-free is completed, the cookie will be planted into the browser's cookie storage. At this time, the reseeding is completed, and finally the business address intercepted during the previous interception will be loaded, and the user can continue the previous operation and use the application function.
[0075] In this optional implementation, the above-mentioned reseeding refers to the process of re-seeding the login credentials or other information into the H5 page through certain logic when the login credential request information is missing or invalid in the H5 page.
[0076] In this optional implementation, the login-free function is triggered by intercepting the login address, and then the cookie is re-inserted to avoid a second login. This effectively solves the experience problem of needing to log in manually when the login credentials or some necessary cookie information are missing or invalid.
[0077] The method for controlling the loading of the business address of the H5 page provided by this optional implementation is that after the native application logs in to the business end, the native application obtains the free-login address from the free-login server based on its own user information and business address; obtains the free-login certificate sent by the free-login server based on the free-login address; and inserts the free-login certificate into the text memory. The H5 page determines that the native application has successfully logged in through the free-login certificate in the text memory, and directly accesses the business end through the login certificate to obtain the business data related to the business address, so as to achieve the purpose of loading the business address. Through the embodiments of the present disclosure, the native application can perform free-login login, and the H5 page can autonomously access the business end to obtain business data without the user's perception, thereby improving the user experience and avoiding the sense of disconnection of the native application.
[0078] Optionally, the above-mentioned free login is performed based on the business address, and after the free login is successful, controlling the H5 page to load the business address includes: obtaining the free login address from the free login server based on user information and business address; sending the free login address to the free login server, and receiving the free login certificate output by the free login server; sending the free login certificate and business address to the H5 page, and controlling the H5 page to access the business end based on the free login certificate and business address, and obtaining business data related to the business address.
[0079] In some optional implementations of the present disclosure, the above-mentioned log-free login is performed based on the business address, and after the log-free login is successful, controlling the H5 page to load the business address includes: obtaining the log-free address based on user information and the business address; sending the log-free address to the H5 page, so that the H5 page performs the log-free login based on the log-free address, and loads the business address after the log-free login is successful.
[0080] In this embodiment, the execution subject sends the local user information and service address to the no-login server, and obtains the no-login address sent by the no-login server; the execution subject sends the no-login address to the H5 page.
[0081] In this embodiment, the above-mentioned H5 page performs a free login based on the free login address, and after the free login is successful, loads the business address, including: the H5 page accesses the free login server based on the free login address, obtains the free login certificate of the free login server, and determines that the free login is successful; after the free login is successful, sends the free login certificate and the business address to the business end, and receives the business data related to the business address sent by the business end after determining that the free login certificate is legal, thereby achieving the purpose of loading the business address.
[0082] The method for controlling the loading of the business address of the H5 page provided in this embodiment first obtains the free-login address of the login server through the native application; secondly, the H5 page obtains the free-login certificate through the free-login address, and then accesses the business end through the free-login certificate and the business address to obtain the business data related to the business address. Without the user being aware of it, a method of performing free-login at the business end through the H5 page is implemented, which improves the user experience and avoids the sense of disconnection of the native application.
[0083] In some optional implementations of the present embodiment, in response to detecting that the loading information includes preset login interception information, determining and saving the business address to be loaded after successful login based on the loading information includes: in response to detecting that the loading information includes preset login interception information, detecting whether there is an agreed identifier after the login interception information; in response to the loading information having the agreed identifier, intercepting the address after the agreed identifier in the loading information to obtain the business address.
[0084] In this optional implementation, when the loading information has login interception information, the loading information includes: login interception information, agreed identifier and business address arranged in sequence; when the loading system does not have login interception information, the loading information may include: business address; wherein the business address is an address related to the data of the page of the business scenario, and the page related to the data of the page of the business scenario can be loaded through the business address H5 page. The agreed identifier may include: symbols, letters, numbers, etc., wherein the letters may form words of agreed rules, for example, the words are "returnurl", "go", "to".
[0085] The loading information with login interception information is exemplified as follows: login address?returnurl=business address to be redirected after login, where "login address" is login interception information, "?returnurl=" is an agreed identifier, and "business address to be redirected after login" is the business address of this embodiment.
[0086] The method for obtaining the business address provided by this optional implementation detects that the loading information includes preset login interception information, detects whether there is an agreed identifier after the login interception information, and when there is the agreed identifier, determines that the subsequent address is the business address. To this end, a reliable implementation method is provided for obtaining the business address, thereby improving the reliability of recording the business address on the subsequent H5 page.
[0087] Optionally, in response to detecting that the loading information includes preset login interception information, determining and saving the business address to be loaded after successful login based on the loading information further includes: detecting whether the agreed identifier contains a predetermined English word; in response to the predetermined identifier containing a predetermined English word, intercepting the address after the agreed identifier in the loading information to obtain the business address. Intercepting the address after the agreed identifier in the loading information means leaving the address after the agreed identifier, and the address after the agreed identifier left is the business address.
[0088] In some optional implementations of the present disclosure, the above-mentioned interception rules include: server-side interception rules, based on the interception rules, detecting whether the loading information includes preset login interception information includes: in response to the server being in a normal state, sending the loading information to the server, so that the server detects whether the loading information includes the preset login interception information based on the server-side interception rules.
[0089] In this optional implementation, if Figure 3 As shown, the native application includes: a server and a client. When the server is in a normal state, the interception rules provided by the server are server interception rules.
[0090] In this optional implementation, the server interception rules: the main function is to confirm whether the address needs to be intercepted by a series of matching rules, such as full string matching, regular rule matching, etc. The server interception rules are interception rules stored on the server.
[0091] Optionally, both the server and the client include: interception verification rules, which include: first rules and second rules, wherein the business address of the loaded information is verified by the first rule, and after the loaded information has the business address, the business address is sent to the second rule, and the second rule performs free login based on the business address, and after the free login is successful, controls the H5 page to record the business address. Both the server and the native client need to include interception verification rules, with the server as the main one and the client as the auxiliary one, so that the native client can complete the internal logic closed loop in an abnormal state.
[0092] In some optional implementations of the present disclosure, the above-mentioned interception rules include: client interception rules. The above-mentioned detection based on the interception rules whether the loading information includes the preset login interception information includes: in response to the server being in an abnormal state, using the client interception rules to detect whether the loading information includes the preset login interception information.
[0093] In this optional implementation, the server-side interception rules are mainly used. When the server handles the abnormal state, the client-side interception rules are directly edited on the client, or the client-side interception rules are obtained based on the server-side interception rules obtained from the server in advance. The loading information is detected by the client-side interception rules, which can achieve the server-based and client-assisted, so that the native client can complete the internal logic closed loop in the abnormal state.
[0094] In this optional implementation, the server is monitored through the client of the native application, and when the server is in an abnormal state, such as the server request is unavailable due to network or server reasons, common server degradation, loading information is not intercepted, and the intercepted loading information is garbled, etc., it is determined that the server is in an abnormal state.
[0095] In this optional implementation, the client of the native application can: receive the loading information sent by the browser component of the native application; be responsible for the verification of the server under special circumstances, such as the request being unavailable due to the server network or server reasons, common server degradation, etc.; be responsible for subsequent processing after receiving the loading information: not intercepting and providing the free login based on the business address obtained during the interception, etc.
[0096] The method for detecting login interception information provided by this optional implementation no longer uses the server-side interception rules when the server is in an abnormal state, but uses the client-side interception rules. When there is a temporary problem or traffic degradation on the server, the client can close this part of the function by itself, providing an effective disaster recovery strategy.
[0097] Further references Figure 4 As an implementation of the data processing method shown in the above figures, the present disclosure provides an embodiment of a data processing device, which is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically natively applied in various electronic devices.
[0098] like Figure 4 As shown, an embodiment of the present disclosure provides a data processing device 400, and the device 400 includes: a receiving unit 401, a detection unit 402, a determination unit 403, and a login unit 404. Among them, the above-mentioned receiving unit 401 can be configured to receive the latest loading information of the H5 page in the native application. The above-mentioned detection unit 402 can be configured to detect whether the loading information includes preset login interception information based on the interception rule. The above-mentioned determination unit 403 can be configured to determine and save the business address to be loaded after the login is successful based on the loading information in response to detecting that the loading information includes the preset login interception information. The above-mentioned login unit 404 can be configured to perform free login based on the business address, and after the free login is successful, control the H5 page to load the business address.
[0099] In this embodiment, the specific processing of the receiving unit 401, the detecting unit 402, the determining unit 403, and the logging unit 404 and the technical effects thereof can be referred to in the respective Figure 2 Corresponding to step 201, step 202, step 203, and step 204 in the embodiment.
[0100] In some embodiments, the above-mentioned device 400 also includes: a control unit (not shown in the figure), and the above-mentioned control unit is configured to control the H5 page to load the loading information in response to detecting that the loading information does not include the preset login interception information.
[0101] In some embodiments, the login unit 404 is configured to: obtain a log-free address based on user information and a business address; obtain a log-free certificate based on the log-free address; insert the log-free certificate into the text memory of the H5 page, so that the H5 page determines that the native application has successfully logged in based on the log-free certificate, and obtains business data related to the business address from the business end based on the log-free certificate.
[0102] In some embodiments, the login unit 404 is configured to: obtain a log-free address based on user information and a business address; send the log-free address to the H5 page so that the H5 page performs a log-free login based on the log-free address, and load the business address after the log-free login is successful.
[0103] In some embodiments, the above-mentioned determination unit 403 is further configured to: in response to detecting that the loading information includes preset login interception information, detect whether there is an agreed identifier after the login interception information; in response to the loading information having the agreed identifier, intercept the address after the agreed identifier in the loading information to obtain the business address.
[0104] In some embodiments, the above-mentioned interception rules include: server-side interception rules, and the above-mentioned detection unit 402 is further configured to: in response to the server being in a normal state, send the loading information to the server, so that the server detects whether the loading information includes preset login interception information based on the server-side interception rules.
[0105] In some embodiments, the above interception rules also include: client interception rules, and the above detection unit 402 is further configured to: in response to the server being in an abnormal state, use the client interception rules to detect whether the loading information includes preset login interception information.
[0106] The data processing device provided by the embodiment of the present disclosure, first, the receiving unit 401 receives the latest loading information of the H5 page in the native application; secondly, the detection unit 402 detects whether the loading information includes the preset login interception information based on the interception rule; thirdly, the determination unit 403, in response to detecting that the loading information includes the preset login interception information, determines and saves the business address to be loaded after the login is successful based on the loading information; finally, the login unit 404 performs a free login based on the business address, and controls the H5 page to load the business address after the free login is successful. Therefore, when the H5 page of the native application has a login requirement, the free login of the free login server is performed based on the business address to be loaded after the H5 page login is successful, and the H5 page is controlled to directly load the business address after the login is successful, thereby avoiding the situation of multiple logins of the H5 page in the native application, avoiding the sense of fragmentation of the entire application caused by multiple logins, and improving the user experience.
[0107] Reference below Figure 5 , which shows a structural schematic diagram of an electronic device 500 suitable for implementing an embodiment of the present disclosure.
[0108] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0109] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0110] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0111] It should be noted that the computer-readable medium of the embodiment of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiment of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiment of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0112] The computer-readable medium may be included in the server; or it may exist independently without being installed in the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: receives the latest loading information of the H5 page in the native application; based on the interception rule, detects whether the loading information includes the preset login interception information; in response to detecting that the loading information includes the preset login interception information, determines and saves the business address to be loaded after the login is successful based on the loading information; performs a log-free login based on the business address, and after the log-free login is successful, controls the H5 page to load the business address.
[0113] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0115] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising a receiving unit, a detection unit, a determination unit, and a login unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the receiving unit may also be described as a unit "configured to receive the latest loading information of the H5 page in the native application".
[0116] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A data processing method, the method comprising: Receive the latest loading information of the H5 page in the native application; Based on the interception rule, detecting whether the loading information includes preset login interception information; In response to detecting that the loading information includes preset login interception information, based on the loading information, determining and saving a service address to be loaded after successful login; Based on the business address, a log-in-free login is performed, and after the log-in-free login is successful, the H5 page is controlled to load the business address.
2. The method according to claim 1, further comprising: In response to detecting that the loading information does not include preset login interception information, controlling the H5 page to load the loading information.
3. According to the method of claim 1, performing free login based on the business address, and after the free login is successful, controlling the H5 page to load the business address comprises: Get the free login address based on user information and business address; Based on the free login address, obtain a free login certificate; The free-login credential is inserted into the text memory of the H5 page, so that the H5 page determines that the native application has been successfully logged in based on the free-login credential, and obtains business data related to the business address from the business end based on the free-login credential.
4. According to the method of claim 1, performing free login based on the business address, and after the free login is successful, controlling the H5 page to load the business address comprises: Get the free login address based on user information and business address; The free-login address is sent to the H5 page, so that the H5 page performs free-login login based on the free-login address, and loads the business address after the free-login login is successful.
5. The method according to any one of claims 1 to 4, wherein: In response to detecting that the loading information includes preset login interception information, determining and saving the service address to be loaded after successful login based on the loading information includes: In response to detecting that the loading information includes preset login interception information, detecting whether the login interception information is followed by an agreed identifier; In response to the loading information having the agreed identifier, the address after the agreed identifier in the loading information is intercepted to obtain the business address.
6. The method according to claim 1, wherein: The interception rule includes: a server-side interception rule, and the detection of whether the loading information includes preset login interception information based on the interception rule includes: In response to the server being in a normal state, the loading information is sent to the server, so that the server detects whether the loading information includes preset login interception information based on a server interception rule.
7. The method according to claim 6, wherein the interception rule further comprises: The client interception rule, based on the interception rule, detecting whether the loading information includes the preset login interception information includes: In response to the server being in an abnormal state, the client interception rule is used to detect whether the loading information includes preset login interception information.
8. A data processing device, comprising: The receiving unit is configured to receive the latest loading information of the H5 page in the native application; a detection unit configured to detect whether the loading information includes preset login interception information based on the interception rule; a determining unit configured to, in response to detecting that the loading information includes preset login interception information, determine and save a service address to be loaded after successful login based on the loading information; The login unit is configured to perform a login-free login based on the business address, and after the login-free login is successful, control the H5 page to load the business address.
9. The device according to claim 8, further comprising: The control unit is configured to control the H5 page to load the loading information in response to detecting that the loading information does not include preset login interception information.
10. According to the device of claim 8, the login unit is configured to: obtain a free login address based on user information and a business address; obtain a free login certificate based on the free login address; insert the free login certificate into the text memory of the H5 page, so that the H5 page determines that the native application has been successfully logged in based on the free login certificate, and obtains business data related to the business address from the business end based on the free login certificate.
11. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
12. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.