Page display method and device, electronic equipment and storage medium

By deploying system services in the terminal, third -party applications are allowed to obtain system information and perform page display without developing data conversion interfaces, solve the problem of high development costs in existing technology, and realize the characteristic page of the cross -system version. exhibit.

CN119376722APending Publication Date: 2025-01-28BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202310935175.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

In the prior art, third-party applications need to develop dedicated data conversion interfaces for different system versions, resulting in extremely high development costs.

Method used

By deploying system services that are pre -deployed in the terminal to obtain system information, the application of specific types can obtain the terminal information of the terminal without using the data conversion interface and perform the characteristic display of the page based on the information.

Benefits of technology

Avoid the cost of developing data conversion interfaces for each system version, reducing development costs, and realizing the characteristic page display of third -party applications on different terminal systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376722A_ABST
    Figure CN119376722A_ABST
Patent Text Reader

Abstract

The invention relates to a page display method and device, electronic equipment and a storage medium. The method comprises the following steps: in response to a display instruction of a specific type of target application for a target page, generating a page information acquisition request of the target page; under the condition that the page information acquisition request is detected, system information of a terminal is acquired by a system service, so that the system information is provided for the target application, and the system service is a service with system information acquisition authority in an operating system; and under the condition that the page information and the system information are obtained, the target application displays the target page based on the page information and the system information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to a page display method and device, an electronic device, and a storage medium. Background Art

[0002] In order to save development costs, hybrid development has become a widely used software development method. Under this premise, more and more third-party applications are deployed to terminals to meet user needs.

[0003] In related technologies, in order to enable third-party applications to display special pages based on different systems, third-party developers are usually required to provide a data conversion interface designed for the corresponding terminal, so that the terminal's native system can transmit system information to the third-party application through the data conversion interface, thereby realizing the special display of the page.

[0004] However, when using the display method in the related art, applications such as third-party applications require corresponding developers to design dedicated data conversion interfaces for different system versions, which results in extremely high development costs. Summary of the invention

[0005] The present disclosure provides a page display method and device, an electronic device, and a storage medium, which can provide system information of a terminal to a specific type of application without the aid of a data conversion interface.

[0006] According to a first aspect of the present disclosure, a page display method is provided, comprising:

[0007] In response to a display instruction of a target page from a target application of a specific type, generating a page information acquisition request for the target page;

[0008] When the page information acquisition request is detected, the system service acquires the system information of the terminal to provide it to the target application, wherein the system service is a service in the operating system that has the authority to acquire system information;

[0009] When the page information and the system information are acquired, the target application displays the target page based on the page information and the system information.

[0010] According to a second aspect of the present disclosure, a page display device is provided, comprising:

[0011] A generating unit, in response to a display instruction of a target page from a target application of a specific type, generates a page information acquisition request for the target page;

[0012] an acquisition unit, wherein, when the page information acquisition request is detected, the system service acquires the system information of the terminal to provide it to the target application, wherein the system service is a service in the operating system that has the authority to acquire the system information;

[0013] The display unit displays the target page based on the page information and the system information by the target application when the page information and the system information are acquired.

[0014] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0015] processor;

[0016] a memory for storing processor-executable instructions;

[0017] The processor implements the method as described in the first aspect by running the executable instructions.

[0018] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0019] In the technical solution disclosed in the present invention, the terminal may include a system service for obtaining system information. Under this premise, when a target application of a specific type needs to display a target page, the system service may obtain the system information of the terminal and provide it to the target application, so that the target application can display the target page in a special way based on the page information of the target page and the obtained system information. This avoids the problem of high development costs that require the corresponding developers to develop corresponding data conversion interfaces for each system in the related technology so that applications such as third-party applications that cannot directly obtain terminal information can display the page in a special way. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0021] Figure 1 is a flow chart of a page display method shown in an exemplary embodiment of the present disclosure;

[0022] Figure 2 It is a flowchart of an H5 page display method in a related technology shown in an exemplary embodiment of the present disclosure;

[0023] Figure 3 is a flow chart of an IPtable configuration method shown in an exemplary embodiment of the present disclosure;

[0024] Figure 4 is a flowchart of a method for displaying an H5 page in an instant messaging application shown in an exemplary embodiment of the present disclosure;

[0025] Figure 5 is a block diagram of a page display device shown in an exemplary embodiment of the present disclosure;

[0026] Figure 6 is a block diagram of another page display device shown in an exemplary embodiment of the present disclosure;

[0027] Figure 7 It is a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0029] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0030] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0031] With the increasing popularity of mobile terminals, relying solely on native applications installed on terminal systems has long been unable to meet user needs. Based on the current situation of increasing demand for software development, hybrid development has become the most popular software development model nowadays.

[0032] After this model was widely used, a large number of individuals or groups participated in software development as third-party developers, quickly meeting users' needs in different aspects, and more and more third-party applications were deployed in user terminals.

[0033] However, applications such as third-party applications obtained through hybrid development are usually unable to obtain terminal system information due to limitations such as data security, data format, and operating environment isolation, and thus cannot display page features in such applications.

[0034] In the related art, in order to enable applications such as third-party applications to obtain terminal system information, the developer of the application needs to configure a dedicated data conversion interface for the terminal system so that the application can obtain system information from the terminal's native system through the data conversion interface.

[0035] Taking "third-party applications" as an example, it is assumed that a third-party developer develops third-party applications using a hybrid development model such as Hybrid. The third-party application runs based on JavaScript, and JavaScript runs in a separate JSContext (such as a Webview container, etc.), which is isolated from the native operating environment of the terminal system. Therefore, the third-party application cannot obtain the terminal's system information after being installed on the terminal.

[0036] Assume that the third-party developer is developer A, the third-party application developed is application a, and application a is installed on terminal X. Then, developer A needs to develop a JavaScript interface (also called JSBridge interface) specifically for terminal X to obtain system information from the native operating environment of terminal X, so that when application a needs to display a page, it can obtain the system information of terminal X through the interface, and then display the page in a special way based on the obtained system information. For example, it can obtain the manufacturer information and operating system version information of terminal X, so that application a can be adaptively typeset according to the system version, and the manufacturer's LOGO (logo) can be displayed on the displayed page.

[0037] It is not difficult to see that if the relevant technology needs to be featured in applications such as third-party applications, the corresponding developers will need to develop corresponding data conversion interfaces for different systems.

[0038] It should be understood that terminals can be equipped with different types of operating systems. For example, mobile terminals can be equipped with IOS systems and Android systems, while fixed terminals can be equipped with Windows systems and macOS systems. Among them, even if the same type of system is installed, different terminal manufacturers will perform different optimizations based on the same system framework, which makes the operating systems actually used by each manufacturer different. Moreover, manufacturers will continuously optimize the operating system during the use of the terminal, thus forming different versions of the operating system.

[0039] It can be seen that if the page display method in the relevant technology is adopted, each developer needs to develop data conversion interfaces for different types, different manufacturers, and different versions of operating systems in order to enable the applications they develop to display the pages in a distinctive way, and the development cost is extremely high.

[0040] In view of this, the present disclosure proposes a page display method, which can enable applications such as third-party applications to obtain terminal system information without the need for a data conversion interface, and then perform feature display on the page.

[0041] Figure 1 FIG. 1 is a flow chart of a page display method according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the method may include the following steps:

[0042] Step 102 : In response to a display instruction of a target page from a target application of a specific type, a page information acquisition request for the target page is generated.

[0043] In this disclosure, a specific type refers to an application such as a third-party application that cannot directly obtain the system information of the terminal. For example, it can be an application that requires a data conversion interface to be developed by the corresponding developer in order to obtain the system information of the terminal. It should be understood that any application that meets this definition can be regarded as an application belonging to a specific type in this disclosure. The specific type of the specific type can be determined by a person skilled in the art according to actual conditions, and this disclosure does not limit this.

[0044] In the present disclosure, the terminal may include a system service for obtaining system information. Since the system service is a native component of the terminal and has the authority to obtain system information, when a specific type of application needs to display a page, the system service may obtain the system information of the terminal and provide the obtained system information to the application, so that the application can display the page with features based on the obtained system information.

[0045] It should be understood that the present disclosure is equivalent to a method of pre-setting a system service for obtaining system information, so that even if the present disclosure does not use a data conversion interface developed for the terminal system, a specific type of application can obtain the system information of the terminal, thereby avoiding the problem of extremely high development costs caused by the need for related technologies to develop data conversion interfaces separately for different terminal systems.

[0046] In the present disclosure, an application that belongs to a specific type and needs to perform a page display operation may be referred to as a target application, and a page that the target application needs to display may be referred to as a target page.

[0047] In the present disclosure, the target application installed in the terminal may generate a display instruction for the target page in different ways to instruct the terminal to generate a page information acquisition request for the target page.

[0048] In one embodiment, the target application may have a code scanning function, under which the target application may generate a display instruction for the target page by scanning a QR code corresponding to the target page. For example, after scanning the QR code corresponding to the target page, the URL (uniform resource locator) of the target page may be obtained, and the URL may be provided to the terminal in the form of a display instruction, so that the terminal may generate and initiate a page information acquisition request for the target page.

[0049] In another embodiment, the program page currently displayed by the target application may include a basis for generating a display instruction. For example, the program page displayed by the target application may include a URL corresponding to the target page. Then, the target application can generate a display instruction for the target page based on the URL. In addition to the URL, the basis may also be in other forms, which are not limited by the present disclosure.

[0050] Of course, the above examples are merely illustrative, and how the target application specifically generates display instructions for the target page can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0051] In the present disclosure, the terminal needs to obtain the page information before it can display the corresponding page. Therefore, after the target application generates a display instruction for the target page, the terminal can respond to the instruction and generate a page information acquisition request for the target page. For example, the target application can identify the URL of the target page by scanning the QR code as described above. On this basis, the terminal can send the acquisition request to the server corresponding to the target page based on the URL, so that the server returns the page information of the target page. Of course, the examples are only illustrative. How to obtain the page information of the target page can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0052] Step 104 , when the page information acquisition request is detected, the system service acquires the system information of the terminal to provide it to the target application, wherein the system service is a service in the operating system that has the authority to acquire system information.

[0053] In the present disclosure, page information acquisition requests generated by specific types of application instructions can be monitored, so that when the corresponding page information acquisition request is detected, the system service obtains the system information of the terminal, which is then used to feature the target page.

[0054] In the present disclosure, the system service may have a monitoring function. Under this premise, the system service can monitor requests generated by specific types of application instructions, and obtain the system information of the terminal when monitoring requests generated by target application instructions. Under this premise, the system service can provide the obtained system information to the target application.

[0055] When the system service determines whether a page information acquisition request is detected through monitoring, the request monitored by the system service, which is generated by the target application and is used to characterize the detection of "the page information acquisition request generated based on the display instruction of the target application", can be the "page information acquisition request generated by the target application" itself, or an additionally generated request specifically for indicating the acquisition of system information.

[0056] In other words, the monitoring object of the system service can be either: the page information acquisition request itself generated by a specific type of application indication; or: an additionally generated request specifically for obtaining system information. In the former case, the request generated by the target application indication monitored by the system service is: the page information acquisition request generated by the target application indication; and in the latter case, the terminal can also generate a system information acquisition request for indicating the acquisition of system information when the page information acquisition request generated by the target application indication is detected. On this basis, the request generated by the target application indication monitored by the system service is: the additionally generated system information acquisition request. At this time, for the system service, when the system information acquisition request is monitored, it means that the page information acquisition request is detected.

[0057] It is worth noting that the form of the above-mentioned page information acquisition request or system information acquisition request can be determined according to actual needs. For example, the request can be a JS request, that is, a JavaScript request. For another example, it can also be a TCP request, and the present disclosure does not limit this.

[0058] In the present disclosure, a terminal may be deployed with a request forwarding module. On this basis, when a request generated by a specific type of application indication is generated, the terminal may provide the request to the request forwarding module, so that the request forwarding module matches the generated request in the request forwarding rules maintained by the terminal, wherein when the request hits any mapping relationship in the request forwarding rule, the request is forwarded based on the hit mapping relationship. It is worth noting that the mapping relationship in the request forwarding rule may be configured in advance so that the request can be monitored by the system service after being forwarded based on the hit mapping relationship.

[0059] In the present disclosure, the form in which the above-mentioned request forwarding module is deployed can be determined according to actual needs. For example, the deployed request forwarding module may include: NetFilter kernel; accordingly, the request forwarding rules maintained in the request forwarding module may include: IPtable maintained in the NetFilter kernel. Of course, this example is only illustrative. The specific form in which the request forwarding module is deployed and how to maintain the request forwarding rules can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0060] In the present disclosure, a specific port may be configured in advance for a system service, so that the system service can monitor whether there is a request generated by a specific type of application indication by monitoring the specific port. When this method is adopted, after the terminal generates the request, the request may be sent to the specific port, and the system service monitors the specific port to obtain the request generated by the specific type of application indication. Wherein, when the request is obtained, the system service can obtain the system information and provide it to the application indicating the generation of the request.

[0061] In the present disclosure, since the target application needs to display the target page, it is necessary to obtain the page information of the target page, and obtaining the page information requires sending a page information acquisition request to the corresponding server. It can be seen that when an additional system information acquisition request is generated to instruct the system service to obtain system information, it is equivalent to the terminal generating two requests, one of which is a request sent outward for obtaining page information, that is, a page information acquisition request, and the other is a request sent inward for obtaining system information, that is, a system information acquisition request. For ease of understanding, the process of how to instruct the system service to obtain system information in this case is introduced.

[0062] In one embodiment, when a page information acquisition request generated by a target application instruction is detected, a system information acquisition request for instructing to obtain system information can be generated, and the generated system information acquisition request can be sent to the system service to instruct the system service to obtain the system information.

[0063] In this embodiment, the terminal may be deployed with a request forwarding rule for forwarding various generated requests. Under this premise, the disclosure may configure the request forwarding rule so that when the terminal detects the above acquisition request, the system service acquires the system information of the terminal.

[0064] In this embodiment, the request forwarding rule deployed in the terminal may include: sending a request for obtaining system information initiated by a specific type of application instruction to a system service. In this case, the terminal can forward the system information obtaining request to the system service according to the request forwarding rule, and the system service can obtain the system information of the terminal when receiving the obtaining request, and provide the obtained system information to the target application.

[0065] In this embodiment, the system service itself may have the function of configuring request forwarding rules. On this basis, after the system service is deployed to the terminal, the system service may configure the request forwarding rules of the terminal, so that the request forwarding rules configured by the system service can be used to "forward requests for obtaining system information initiated by application instructions of a specific type to the system service."

[0066] In this embodiment, when the request forwarding rules are configured by the system service, the system service can be configured by adding "the mapping relationship between IP and port" in the request forwarding rules. For example, the system service can preferentially determine a specific port among all the ports contained in the terminal as the destination port. Under this premise, the system service can configure the mapping relationship between "the terminal IP of the terminal and the specific port in the terminal" in the request forwarding rules deployed by the terminal, so that the request with the terminal IP as the source IP uses the above-mentioned specific port as the destination port. In other words, the mapping relationship is used to represent "the destination port of the request with the terminal IP as the source IP is: the above-mentioned specific port". Under this premise, when the terminal generates a system information acquisition request, it can use the terminal IP as the source IP so that the system information acquisition request is sent to the configured specific port. Accordingly, the system service can obtain the system information acquisition request initiated by the target application instruction and sent based on the above-mentioned request forwarding rules by monitoring the specific port.

[0067] It is not difficult to understand that this method is equivalent to using the "rule configuration function" and "port monitoring function" of the system service, which plays the role of sending the acquisition request initiated by a specific type of application instruction to the system service to instruct the system service to obtain system information.

[0068] In this embodiment, since the request forwarding rules are usually deployed in the firewall module of the terminal, when the system service configures the request forwarding rules, the system service can send a configuration request to the firewall module of the terminal so that the firewall module adds the above-mentioned mapping relationship between "terminal IP and specific port" in the deployed request forwarding rules. For example, the firewall module can be the NetFilter kernel module mentioned above. In this case, the request forwarding rules can be the IPtable maintained in the module. The IPtable records a large number of mapping relationships between IPs and ports for processing requests sent or received. Under this premise, the system service can send a configuration request to the NetFilter kernel module to record the above-mentioned mapping relationship between the terminal IP and the specific port in the maintained IPtable.

[0069] Of course, the above examples are only illustrative, and how to deploy the request forwarding rules in the terminal and how to configure the deployed request forwarding rules can be determined by those skilled in the art according to actual conditions, and the present disclosure does not limit this.

[0070] In the present disclosure, in addition to configuring request forwarding rules to send acquisition requests initiated by specific types of application instructions to system services to instruct system services to acquire system information, other methods can also be used to instruct system services to acquire system information. For example, when the terminal detects the above acquisition request, it can directly send a system information acquisition instruction to the system service to instruct the system service to acquire the system information of the terminal. Of course, this example is only illustrative. How to instruct the system service to acquire the system information of the terminal can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0071] Step 106: When the page information and the system information are obtained, the third-party application displays the target page based on the page information and the system information.

[0072] In the present disclosure, when the page information of the target page is obtained through a page information acquisition request and the system information is obtained by the system service, the target application can generate and display the target page based on the obtained page information and system information.

[0073] In the present disclosure, the acquired page information may include: text information, layout information, image information, etc. of the target page. Of course, this example is only illustrative, and the specific information included in the acquired page information can be determined by those skilled in the art according to the target page that the target application actually needs to display, and the present disclosure does not limit this.

[0074] In the present disclosure, the system information obtained by the system service can be any information related to the terminal operating system. For example, the obtained system information may include: the manufacturer information of the terminal, the version information of the operating system installed in the terminal, and the page feature information designed by the terminal manufacturer for the operating system. Of course, this example is only illustrative, and what information the obtained system information specifically includes can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0075] Among them, in the case where the system information includes the above-mentioned page feature information, the page feature information can be the layout information designed by the manufacturer for different types of pages. In this case, after the terminal receives the page information, the system service can determine the target type of the target page based on the page information, and then determine the layout information designed by the manufacturer for the target type of page. On this basis, the target application can display the page based on the layout information after obtaining the system information. Of course, this example is only illustrative, and what specific information the page feature information contains can be determined by those skilled in the art according to actual needs, and this disclosure does not limit this.

[0076] It is worth noting that the system service in the present disclosure can be deployed to the terminal in different forms. For example, since the native applications in the terminal usually have the ability and authority to obtain system information, the system service can be a native application installed in the terminal; for another example, the system service can be a local information acquisition module deployed at the system layer. Since the units deployed at the system layer have the ability and authority to obtain system information, the local information acquisition module can be any component or application deployed at the system layer. Of course, the above examples are only illustrative, and it should be understood that any component with the ability to obtain system information can be used as the system service in the present disclosure. What kind of component or application the system service is can be determined by those skilled in the art according to actual conditions, and the present disclosure does not limit this.

[0077] It should also be noted that the execution subject of the technical solution of the present disclosure can be any type of terminal, for example, the electronic device can be a mobile terminal such as a smart phone, a tablet computer, or a fixed terminal such as a smart TV, a PC (personal computer). It should be understood that any terminal that can install a specific type of application can be used as the execution subject of the present disclosure, and which type of terminal is used as the execution subject of the technical solution of the present disclosure can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.

[0078] It can be seen from the above technical solution that since the present disclosure pre-deploys a system service for obtaining system information in the terminal, when a specific type of application in the terminal needs to display a page, it can obtain the system information of the terminal through the system service, and then display the page in a special way based on the obtained system information.

[0079] It should be understood that the present disclosure is equivalent to disclosing a method for displaying system features of pages in applications such as third-party applications, which is universally applicable to various operating systems. This avoids the problem of high development costs that requires developing corresponding data conversion interfaces for different operating systems in related technologies in order to display features of pages in applications such as third-party applications.

[0080] Below, taking “the instant messaging application in a smart phone opens an HTML5 (HyperTextMarkup Language 5, fifth generation Hypertext Markup Language) page by scanning a QR code” as an example, the technical solution of the present disclosure is introduced.

[0081] For the convenience of description, HTML5 pages will be referred to as H5 pages in the following text.

[0082] Before introducing the technical solution of the present invention, taking the example of displaying an H5 page by scanning a code, a brief introduction to the H5 page display method in the related art is given.

[0083] Figure 2 The following is a flowchart of an H5 page display method in a related technology shown in an exemplary embodiment of the present disclosure. Figure 2 As shown, after starting the instant messaging application, the smartphone can use the scanning function of the instant messaging application to scan the QR code of the H5 page to identify the URL of the H5 page. On this basis, the terminal can send a page information acquisition request for the H5 page to the corresponding server through the URL. In addition, if the developer of the instant messaging application has designed a corresponding JSbridge interface for the smartphone, the system information of the smartphone can be obtained through the JSbridge interface to display the H5 page in a special way; on the contrary, if the developer of the instant messaging application has not designed a corresponding JSbridge interface for the smartphone, the system information of the smartphone cannot be obtained, and thus the special display cannot be performed, and only a regular display can be performed.

[0084] It is worth noting that the technical solution of the present disclosure may include two stages, namely, a configuration stage and a display stage. The two stages are introduced below respectively.

[0085] Figure 3 FIG. 1 is a flowchart of an IPtable configuration method shown in an exemplary embodiment of the present disclosure. Figure 3 As shown, the method may include the following steps:

[0086] Step 301: The smartphone starts the deployed native application.

[0087] In this embodiment, a native application for obtaining system information may be deployed in the smart phone as the above system service. Under this premise, the native application may be started when the smart phone is turned on to configure the forwarding rules.

[0088] Step 302: The smart phone obtains a local port.

[0089] In this embodiment, the smart phone can obtain available local ports and use at least one of them as a specific port monitored by the native application, so that the native application can determine whether there is a page information acquisition request initiated by a third-party application.

[0090] Step 303: The native application determines a specific port from the acquired local ports.

[0091] For example, assuming that the available local ports obtained include ports 1 to 3, port 1 can be used as a specific port so that the native application can monitor port 1.

[0092] In step 304, the native application provides the specific port to the NetFilter kernel module.

[0093] In this embodiment, after determining the specific port, the native application can provide the specific port to the NetFilter kernel module, so that the NetFilter kernel module adds a mapping relationship about the specific port in the maintained IPtable.

[0094] Step 305: the NetFilter kernel module records the mapping relationship between the mobile phone IP and the specific port in the IPtable.

[0095] Continuing with the above example, the mapping relationship recorded in IPtable can be "source IP: mobile phone IP; destination port: port 1".

[0096] After completing the configuration, it can be used to obtain the system information of the smartphone when any third-party application needs to display a page.

[0097] Figure 4 The following is a flow chart showing a method for displaying an H5 page in an instant messaging application according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the method may include the following steps:

[0098] Step 401: The smartphone starts an instant messaging application.

[0099] Step 402: The instant messaging application scans the QR code of the H5 page.

[0100] In this embodiment, the instant messaging application may have a code scanning function. On this basis, when using the instant messaging application, the user can scan any QR code by calling the camera of the smartphone to open the corresponding page.

[0101] Step 403: The instant messaging application identifies and obtains the URL of the H5 page.

[0102] In this embodiment, the QR code may include URL information of the H5 page, so after scanning the QR code, the instant messaging application can identify and obtain the URL of the H5 page.

[0103] Step 404: The smart phone generates a request for obtaining page information of the H5 page based on the URL.

[0104] In this embodiment, after obtaining the URL of the H5 page, the smart phone can generate a request for obtaining the page information of the H5 page based on the URL.

[0105] In step 405, the smart phone transmits the acquisition request to the NetFilter kernel module.

[0106] In this embodiment, Figure 3 Introduction: A NetFilter kernel module can be deployed in a smartphone as a firewall. The NetFilter kernel module maintains an IPtable to record request forwarding rules. Under this premise, the acquisition request needs to be transmitted to the NetFilter kernel module so that the NetFilter kernel module forwards the acquisition request.

[0107] Step 406A, the NetFilter kernel module sends a request to the server of the H5 page based on the URL.

[0108] In this embodiment, the NetFilter kernel module, on the one hand, needs to send a request to a corresponding server based on the URL and the information recorded in the IPtable, so that the server returns the page information of the H5 page.

[0109] Step 407A, the NetFilter kernel module receives the page information of the H5 page returned by the server.

[0110] In step 408A, the NetFilter kernel module provides the page information to the instant messaging application.

[0111] In this embodiment, after receiving the page information, the NetFilter kernel module can provide the page information to the instant messaging application for displaying the H5 page.

[0112] Step 406B, the NetFilter kernel module forwards the acquisition request to a specific port based on the mapping relationship in the IPtable.

[0113] In this embodiment, the NetFilter kernel module, on the other hand, needs to forward the acquisition request to a specific port according to the mapping relationship in the IPtable.

[0114] Undertake Figure 3 In the example shown, since the IPtable records the mapping relationship of "source IP: mobile phone IP; destination port: port 1", and the source IP of the acquisition request initiated by the smartphone must be the mobile phone IP, the acquisition request is also forwarded to port 1.

[0115] Step 407B: The native application monitors the specific port and receives the acquisition request.

[0116] In this embodiment, the native application is Figure 3 After completing the configuration in the manner shown, you can listen to the configured specific port to determine whether there is an acquisition request generated by a third-party application instruction.

[0117] Step 408B: The native application obtains system information and provides it to the instant messaging application.

[0118] Continuing with the above example, the native application can listen to port 1, and therefore can receive the acquisition request forwarded to port 1 based on IPtable. Under this premise, the native application can obtain system information and provide the obtained system information to the instant messaging application.

[0119] Step 409: The instant messaging application displays the H5 page based on the system information and the page information.

[0120] In this embodiment, after the instant messaging application obtains the page information of the H5 page and the system information provided by the native application, it can display the H5 page based on the page information and the system information. For example, the system information may include manufacturer information, system version information, etc. Then, when the instant messaging application displays the H5 page, it can display the manufacturer's LOGO, system version number and other information on the page.

[0121] It can be seen from the above technical solution that the present disclosure can deploy a native application for obtaining system information in the terminal. The native application can have a rule configuration function and a port monitoring function. Under this premise, the native application can configure a specific port as the "destination port of the acquisition request initiated by the third-party application instruction" and monitor the specific port to monitor whether an acquisition request initiated by the third-party application instruction is generated, and then determine whether there is a need to obtain system information, wherein, if the monitoring result is yes, the system information can be obtained and provided to the third-party application, so that the third-party application can display the page in a featured manner based on the system information, avoiding the need to develop data conversion interfaces for each system in the related technology, so that the page can be displayed in a featured manner in the third-party application, resulting in high development costs.

[0122] Figure 5 is a block diagram of a page display device shown in an exemplary embodiment of the present disclosure. Figure 5 The device includes: a generating unit 501, an acquiring unit 502 and a displaying unit 503.

[0123] A generating unit 501 generates a page information acquisition request for a target page in response to a display instruction of a target application of a specific type for the target page;

[0124] The acquiring unit 502 acquires the system information of the terminal by the system service when the page information acquisition request is detected, and provides the system information to the target application, wherein the system service is a service in the operating system that has the authority to acquire the system information;

[0125] The display unit 503 displays the target page based on the page information and the system information when the page information and the system information are acquired.

[0126] Optionally, the acquiring unit 502 is further configured to:

[0127] The system service monitors requests generated by the application indication of the specific type;

[0128] The system service acquires the system information of the terminal when monitoring the request generated by the target application instruction;

[0129] The system service provides the acquired system information to the target application.

[0130] Optional,

[0131] The request monitored by the system service and generated by the target application instruction is: the page information acquisition request; or

[0132] The generation unit 501 is also used to: generate a system information acquisition request for indicating acquisition of the system information when the page information acquisition request is detected; the request monitored by the system service and generated by the target application instruction is: the system information acquisition request.

[0133] Optionally, the page information acquisition request or the system information acquisition request is: a JS request.

[0134] Optionally, also include:

[0135] The matching unit 504 provides the request generated by the specific type of application indication to the request forwarding module, so that the request forwarding module matches the generated request in the request forwarding rules maintained by the terminal; and when the request hits any mapping relationship in the request forwarding rule, the request is forwarded based on the hit mapping relationship.

[0136] Optional,

[0137] The request forwarding module includes: a NetFilter kernel;

[0138] The request forwarding rules include: IPtable maintained in the NetFilter kernel.

[0139] Optional,

[0140] The generating unit 501 is further used to: send the request generated by the specific type of application indication to a specific port pre-configured for the system service;

[0141] The obtaining unit 502 is further configured to: have the system service monitor the specific port to obtain a request generated by the specific type of application indication.

[0142] Optionally, the generating unit 501 is further used for:

[0143] In the case where the page information acquisition request is detected, generating a system information acquisition request for instructing to acquire the system information;

[0144] The generated system information acquisition request is sent to the system service to instruct the system service to acquire the system information.

[0145] Optionally, the request forwarding rule deployed in the terminal includes: sending the request for obtaining system information initiated by the specific type of application indication to the system service;

[0146] The generating unit 501 is further used to: send the system information acquisition request to the system service based on the request forwarding rule;

[0147] The acquiring unit 502 is further configured to: upon receiving the system information acquisition request, the system service acquires the system information of the terminal.

[0148] Optionally, the acquiring unit 502 is further configured to:

[0149] When the page information acquisition request is detected, a system information acquisition instruction is sent to the system service to instruct the system service to acquire the system information of the terminal.

[0150] Optionally, the system service is: a local information acquisition module deployed at the system layer, or a native application of the terminal.

[0151] Optionally, the system information includes at least one of the following:

[0152] Manufacturer information of the terminal;

[0153] Version information of the operating system installed in the terminal;

[0154] The terminal manufacturer designs page feature information for the operating system.

[0155] Optional,

[0156] The display instruction is generated by the target application scanning a QR code corresponding to the target page; or

[0157] The display instruction is generated by the target application based on the URL corresponding to the target page in its own program page.

[0158] Optionally, the specific type includes: third-party application.

[0159] like Figure 6 As shown, Figure 6 is a block diagram of another page display device shown in an exemplary embodiment of the present disclosure. Figure 5 Based on the illustrated embodiment, it further includes: a configuration unit 504.

[0160] Optionally, also include:

[0161] The configuration unit 504 configures the request forwarding rule of the terminal by the system service, so that the request forwarding rule configured by the system service is used to send the request initiated by the application indication belonging to the specific type and used to obtain the system information of the terminal to the system service.

[0162] Optional,

[0163] The configuration unit 504 is further used to: configure, by the system service, a mapping relationship between the terminal IP of the terminal and a specific port in the terminal in the request forwarding rule of the terminal, so that the terminal forwards the generated request for obtaining the system information of the terminal based on the mapping relationship;

[0164] The acquisition unit 502 is further configured to: monitor the specific port by the system service, so as to acquire the system information when a request for acquiring the system information of the terminal is monitored.

[0165] Optionally, the configuration unit 504 is further configured to:

[0166] The system service sends a configuration request to the firewall module of the terminal, so that the firewall module adds a mapping relationship between the terminal IP of the terminal and the specific port in the terminal in the deployed request forwarding rule.

[0167] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0168] Accordingly, the present disclosure also provides a page display device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to implement a page display method as described in any of the above embodiments, for example, the method may include: in response to a display instruction for a target page from a specific type of target application, generating a page information acquisition request for the target page; when the page information acquisition request is detected, obtaining system information of the terminal by a system service to provide it to the target application, wherein the system service is a service in the operating system that has permission to obtain system information; when the page information and the system information are obtained, the target application displays the target page based on the page information and the system information.

[0169] Accordingly, the present disclosure also provides an electronic device, which includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for implementing a page display method as described in any of the above embodiments. For example, the method may include: in response to a display instruction for a target page from a specific type of target application, generating a page information acquisition request for the target page; when the page information acquisition request is detected, obtaining system information of the terminal by a system service to provide it to the target application, wherein the system service is a service in the operating system that has permission to obtain system information; when the page information and the system information are obtained, the target application displays the target page based on the page information and the system information.

[0170] Figure 7 7 is a block diagram of an apparatus 700 for implementing a page display method according to an exemplary embodiment. For example, the apparatus 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0171] Reference Figure 7 , the device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0172] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0173] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0174] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.

[0175] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0176] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0177] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0178] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0179] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio) or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0180] In an exemplary embodiment, the apparatus 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

[0181] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0182] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0183] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0184] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.

Claims

1. A page display method, characterized in that: include: In response to a display instruction of a target page from a target application of a specific type, generating a page information acquisition request for the target page; When the page information acquisition request is detected, the system service acquires the system information of the terminal to provide it to the target application, wherein the system service is a service in the operating system that has the authority to acquire system information; When the page information and the system information are acquired, the target application displays the target page based on the page information and the system information.

2. The method according to claim 1, characterized in that When the acquisition request is detected, the system service acquires the system information of the terminal to provide it to the target application, including: The system service monitors requests generated by the application indication of the specific type; The system service acquires the system information of the terminal when monitoring the request generated by the target application instruction; The system service provides the acquired system information to the target application.

3. The method according to claim 2, characterized in that The request monitored by the system service and generated by the target application instruction is: the page information acquisition request; or It also includes: when the page information acquisition request is detected, generating a system information acquisition request for indicating acquisition of the system information; the request monitored by the system service and generated by the target application instruction is: the system information acquisition request.

4. The method according to claim 3, characterized in that The page information acquisition request or the system information acquisition request is: a JS request.

5. The method according to claim 2, characterized in that: Also includes: providing the request generated by the specific type of application indication to a request forwarding module, so that the request forwarding module matches the generated request in the request forwarding rules maintained by the terminal; When the request matches any mapping relationship in the request forwarding rule, the request is forwarded based on the matched mapping relationship.

6. The method according to claim 5, characterized in that The request forwarding module includes: a NetFilter kernel; The request forwarding rules include: IPtable maintained in the NetFilter kernel.

7. The method according to claim 2, characterized in that It also includes: sending the request generated by the specific type of application indication to a specific port pre-configured for the system service; The monitoring, by the system service, of the request generated by the specific type of application indication includes: the system service monitoring the specific port to obtain the request generated by the specific type of application indication.

8. The method according to claim 1, characterized in that Also includes: In case of detecting the page information acquisition request, generating a system information acquisition request for instructing to acquire the system information; The generated system information acquisition request is sent to the system service to instruct the system service to acquire the system information.

9. The method according to claim 8, characterized in that The request forwarding rule deployed in the terminal includes: sending a request for obtaining system information initiated by the specific type of application indication to the system service; The sending the generated system information acquisition request to the system service comprises: sending the system information acquisition request to the system service based on the request forwarding rule; The acquiring, by the system service, the system information of the terminal includes: the system service acquiring, by a case where the system service receives the system information acquisition request, the system information of the terminal.

10. The method according to claim 9, characterized in that Also includes: The system service configures a request forwarding rule of the terminal so that the request forwarding rule configured by the system service is used to send a request for obtaining system information of the terminal initiated by an application indication belonging to the specific type to the system service.

11. The method according to claim 10, characterized in that The configuring, by the system service, the request forwarding rule of the terminal includes: configuring, by the system service, a mapping relationship between the terminal IP of the terminal and a specific port in the terminal in the request forwarding rule of the terminal, so that the terminal forwards the generated request for obtaining the system information of the terminal based on the mapping relationship; The acquiring of the system information of the terminal by the system service when receiving the system information acquisition request includes: the system service monitoring the specific port to acquire the system information when a request for acquiring the system information of the terminal is monitored.

12. The method according to claim 11, characterized in that The configuring, by the system service, a mapping relationship between the terminal IP of the terminal and a specific port in the terminal in the request forwarding rule of the terminal includes: The system service sends a configuration request to the firewall module of the terminal, so that the firewall module adds a mapping relationship between the terminal IP of the terminal and the specific port in the terminal in the deployed request forwarding rule.

13. The method according to claim 1, characterized in that When the page information acquisition request is detected, the system service acquires the system information of the terminal, including: When the page information acquisition request is detected, a system information acquisition instruction is sent to the system service to instruct the system service to acquire the system information of the terminal.

14. The method according to claim 1, characterized in that The system service is: a local information acquisition module deployed at the system layer, or a native application of the terminal.

15. The method according to claim 1, characterized in that The system information includes at least one of the following: Manufacturer information of the terminal; Version information of the operating system installed in the terminal; The terminal manufacturer designs page feature information for the operating system.

16. The method according to claim 1, characterized in that The display instruction is generated by the target application scanning a QR code corresponding to the target page; or The display instruction is generated by the target application based on the URL corresponding to the target page in its own program page.

17. The method according to claim 1, characterized in that The specific types include: third-party applications.

18. A page display device, characterized in that: include: A generating unit, in response to a display instruction of a target page from a target application of a specific type, generates a page information acquisition request for the target page; an acquisition unit, wherein, when the page information acquisition request is detected, the system service acquires the system information of the terminal to provide it to the target application, wherein the system service is a service in the operating system that has the authority to acquire the system information; The display unit displays the target page based on the page information and the system information by the target application when the page information and the system information are acquired.

19. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 17 by running the executable instructions.

20. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 17 are implemented.

Citation Information

Patent Citations

  • Method and device and auxiliary method and device for implementing identity authentication request in webpage application

    CN106034134A

  • Service information acquisition method, device and system

    CN108023918A

  • Information interaction method and device

    CN108390944A

  • Information interaction method and device, and computer readable storage medium

    CN108600529A

  • Communication method and device

    CN109587289A