CN114205099B - Webpage authentication method, electronic equipment and system - Google Patents

Webpage authentication method, electronic equipment and system Download PDF

Info

Publication number
CN114205099B
CN114205099B CN202010899519.3A CN202010899519A CN114205099B CN 114205099 B CN114205099 B CN 114205099B CN 202010899519 A CN202010899519 A CN 202010899519A CN 114205099 B CN114205099 B CN 114205099B
Authority
CN
China
Prior art keywords
webpage
address
interface
electronic device
web page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010899519.3A
Other languages
Chinese (zh)
Other versions
CN114205099A (en
Inventor
高旭涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010899519.3A priority Critical patent/CN114205099B/en
Publication of CN114205099A publication Critical patent/CN114205099A/en
Application granted granted Critical
Publication of CN114205099B publication Critical patent/CN114205099B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a webpage authentication method, electronic equipment and a system; the method and the device relate to the technical field of terminals, and can utilize registered addresses of web pages to verify the web pages, and the web pages can obtain the right of accessing the corresponding open interfaces after verification. The complexity of webpage authentication is reduced, and the safety of user resources is ensured. The method comprises the following steps: the address of the current webpage and the first identification of the current webpage are obtained. Acquiring a first address from a first server according to the first identifier; the first address is a registration address of the current webpage. And checking whether the address of the current webpage is matched with the first address. If so, allowing the current webpage to access a first open interface, wherein the first open interface comprises one or more of the following: data interface, control interface, authorization interface.

Description

Webpage authentication method, electronic equipment and system
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a web page authentication method, an electronic device, and a system.
Background
With the ecological system construction of electronic devices (such as mobile phones, tablet computers and the like), data access can be realized among application programs (APP) in the electronic devices, and better use experience is provided for users. Some APPs may store user data and provide an open interface for other APPs to access corresponding user data. In order to ensure the security of user data, the APP accessing the open interface needs to be subjected to security authentication, and the APP is allowed to access the open interface to obtain the corresponding user data after the security authentication is passed.
Illustratively, suppose that APP A provides an open interface, APP B needs to access the open interface to obtain user data provided by APP A. When the APP B accesses the open interface, the APP A queries a signature certificate of the APP B, and obtains a fingerprint certificate of the APP B according to the signature certificate. And the APP A checks the acquired fingerprint certificate of the APP B with the registered fingerprint certificate of the APP B, and allows the APP B to access the open interface after the verification is passed.
However, with the development of light weight of electronic devices, the electronic devices do not need to install APP, and the functions of APP can be provided for users through web pages. When the open interface is accessed through the webpage, the webpage does not have a signature certificate, so that the user is required to input an account number and a password for verification in order to ensure the safety of user data. The user needs to memorize the account number and the password, so that the use difficulty of the user is increased, and the use experience of the user is reduced. And, maintenance of user account information increases management costs and risk of leakage.
Disclosure of Invention
The webpage authentication method, the electronic equipment and the system provided by the application can utilize the registered address of the webpage to verify the webpage, and the webpage can obtain the authority of accessing the corresponding open interface after verification. The complexity of webpage authentication is reduced, and the safety of user resources is ensured.
In order to achieve the above purpose, the application adopts the following technical scheme:
in a first aspect, the present application provides a web page authentication method, applied to a first electronic device, where the method may include: the address of the current webpage and the first identification of the current webpage are obtained. And acquiring the first address from the first server according to the first identification. The first address is a registration address of the current webpage. And checking whether the address of the current webpage is matched with the first address. If so, allowing the current webpage to access a first open interface, wherein the first open interface comprises one or more of the following: data interface, control interface, authorization interface.
Optionally, the first open interface is all or part of the open interfaces provided by the sports health service. The data interface is used for obtaining data in the first electronic device or a wearable device connected with the first electronic device. The control interface is used for accessing and/or controlling a wearable device connected with the first electronic device. The authorization interface is used for receiving the authorization of the current webpage by the user.
After the web page is developed, registration needs to be applied to the first server. After the first server completes registration, the web page is a trusted web page. Subsequently, when the mobile phone opens the webpage, the registration information can be used for authenticating the webpage. The first identity is an identity of a web page (also may be described as app id). The identity is a unique identifier allocated to a first address corresponding to a webpage by a first server in the webpage registration process. Then, the first electronic device may obtain the registration address (i.e., the first address) corresponding to the first identifier from the first server using the first identifier.
Therefore, the first electronic equipment can authenticate the current webpage by using the registration address of the webpage, and rapidly confirm the open interface which is allowed to be accessed by the current webpage. The efficiency of webpage authentication is improved, the account name and the password of the user do not need to be saved and managed, and the management cost and the leakage risk are reduced.
In one possible implementation, the method further includes: and acquiring the first authority corresponding to the first identifier from the first server according to the first identifier. The first authority is the registered authority of the current webpage.
Wherein the first rights comprise all or part of the rights provided by the open service. That is, the web page determines the scope authority of the application in the registration process.
Thus, the webpage can obtain the first authority corresponding to the first identifier from the first server by utilizing the first identifier. Subsequently, after the verification of the webpage passes, the first electronic device confirms whether the first permission of the webpage application is allowed to be obtained or not.
In one possible implementation, if there is a match, allowing the current web page to access the first open interface, including: and if so, allowing the current webpage to access the authorization interface, and displaying the authorization interface, wherein the authorization interface is used for displaying the first authority. And detecting an operation of confirming the authorization, and obtaining a second right, wherein the second right is a right for accessing the data interface and/or the control interface.
In some embodiments, the web page will invoke the authorization interface to obtain and display the authorization interface before first accessing the user's resources, prompting the user for authorization. After the user authorizes, the webpage can access the open interface to obtain corresponding user resources, so that the user privacy is further protected, and the user experience is improved. And the right to be authorized displayed by the current authorization interface is the first right applied when the webpage is registered, and is stored by the first server, so that the risk of changing the right is reduced. Wherein the user confirms that the authorized rights (i.e., the second rights) are all or part of the rights in the first rights.
In one possible implementation, before obtaining the address of the current web page and the first identifier of the current web page, the method further includes: detecting an operation for indicating to open a webpage, acquiring an original address of the webpage, and sending a first request to a second server; the first request is used for requesting to download codes corresponding to the webpage, and the first request carries an original address. Receiving a code corresponding to the webpage sent by the second server, and displaying the current webpage; the corresponding code of the webpage is determined for the second server according to the original address.
In one possible implementation, obtaining the address of the current web page includes: and acquiring the address of the current webpage through a system interface.
In some embodiments, the code corresponding to the web page obtained by the first electronic device from the second server includes a web domain name of the web page and codes corresponding to a plurality of URLs under the web directory. After the first electronic device displays the web page, the URL may change. The change is, for example, an operation trigger to gain access to the open interface rights. Thus, the first electronic device needs to confirm the address of the current web page. Specifically, the first electronic device invokes a system interface to obtain an address of a current webpage. For example, the first electronic device invokes a Webview component in the system interface to obtain the address of the currently displayed H5 page. Subsequently, the first electronic device is also an open interface that needs to authenticate the currently displayed web page and confirm that the current web page is allowed to be accessed.
In one possible implementation, the first address includes a first web page domain name and a first web page directory corresponding to the first identifier; the address of the current webpage comprises a second webpage domain name and a second webpage catalog; checking whether the address of the current webpage is matched with the first address comprises the following steps: checking whether the first webpage domain name is matched with the second webpage domain name, and checking whether the first webpage catalogue is matched with the second webpage catalogue.
The URLs of the web pages contain web domain names and web directories, and different URLs can correspond to the same web domain names and web directories. That is, a web page domain name and web page directory may correspond to one or more URLs. And in the registration process of the webpage, registering the webpage domain name and the webpage catalog of the webpage. Then, in the subsequent verification process of the webpage, that is, whether the webpage domain name and the webpage catalog in the URL of the current webpage are matched with the registered webpage domain name and the registered webpage catalog is checked.
In one possible implementation, the first right includes one or more of the following: the message informs the class rights, the data class rights, and the device manages the class rights. The message notification type authority comprises a first notification which is allowed to be received by the third electronic equipment through the control interface and/or a second notification which is sent to the third electronic equipment through the control interface; the data class rights include allowing the first data to be acquired through the data interface; the device management class authority includes a permission to manage the third electronic device through the control interface; the third electronic device is a device in communication with the first electronic device.
The first data is user data, including sleep data, weight data, heart rate data, electrocardiographic data, blood sugar data, pressure data, step number data, exercise records and the like. Such as allowing the viewing and/or storage of first data in the first electronic device, or allowing the viewing and/or storage of first data obtained by a sensor of a device connected to the first electronic device, etc.
Therefore, after the webpage passes the authentication, the corresponding open interface can be accessed according to the obtained authority, so that the user resource can be obtained. Alternatively, an open interface is utilized to access or control a wearable device in communication with the first electronic device.
In a second aspect, the present application provides a web page authentication method, applied to a first server, where the method may include: and receiving a first identification of the current webpage sent by the first electronic equipment. Determining a first address corresponding to the current webpage according to the first identification; the first address is a registration address of the current webpage; the first address is used for checking the address of the current webpage and confirming whether the current webpage is allowed to access the first open interface, and the first open interface comprises one or more of the following: data interface, control interface, authorization interface. The first address is sent to the first electronic device.
In one possible implementation, the method further includes: determining a first authority corresponding to the first identifier according to the first identifier; the first authority is the registered authority of the current webpage.
In one possible implementation, the method further includes: receiving a registration request of a current webpage sent by second electronic equipment; the registration request carries the first address and the first authority. And responding to the registration request, finishing registration of the first address and the first authority, and distributing a first identification for the current webpage.
In one possible implementation, the first address is an address corresponding to the first open interface.
In one possible implementation, the first right includes one or more of the following: the message informs the class rights, the data class rights, and the device manages the class rights. The message notification type authority comprises a first notification which is allowed to be received by the third electronic equipment through the control interface and/or a second notification which is sent to the third electronic equipment through the control interface; the data class rights include allowing the first data to be acquired through the data interface; the device management class authority includes a permission to manage the third electronic device through the control interface; the third electronic device is a device in communication with the first electronic device.
In one possible implementation, the first open interface is all or part of the open interfaces provided by the sports health service.
In addition, the technical effects of the web page authentication method of the second aspect may refer to the technical effects of the web page authentication method of the first aspect, which are not described herein.
In a third aspect, the present application provides a web page authentication system that includes a first electronic device and a first server. The first electronic device is used for obtaining the address of the current webpage and the first identification of the current webpage. The first electronic device is further configured to send the first identification to the first server. The first server is used for determining a first address corresponding to the current webpage according to the first identification and sending the first address to the first electronic equipment; the first address is a registration address of the current webpage. The first electronic device is further used for checking whether the address of the current webpage is matched with the first address; if so, allowing the current webpage to access a first open interface, wherein the first open interface comprises one or more of the following: data interface, control interface, authorization interface.
In one possible implementation manner, the first server is further configured to determine, according to the first identifier, a first right corresponding to the current web page; the first authority is the registered authority of the current webpage.
In one possible implementation manner, the first electronic device is specifically configured to, if the first electronic device matches, allow the current web page to access the authorization interface, and display the authorization interface, where the authorization interface is used to display the first right. The first electronic device is further configured to obtain a second right after detecting the operation of confirming the authorization, where the second right is a right to access the data interface and/or the control interface.
In one possible implementation, the first electronic device is specifically configured to obtain, through the system interface, an address of a current web page.
In one possible implementation, the first address includes a first web page domain name and a first web page directory corresponding to the first identifier; the address of the current web page includes a second web domain name and a second web directory. The first electronic device is specifically configured to check whether the first web page domain name matches the second web page domain name, and check whether the first web page directory matches the second web page directory.
In one possible implementation, the system further includes a second electronic device. The second electronic equipment is used for sending a registration request of the webpage to the first server; the registration request carries the first address and the first authority. The first server is further configured to complete registration of the first address and the first authority in response to the registration request, and allocate a first identifier to a current web page.
In one possible implementation, the system further includes a second server. The first electronic device is further used for acquiring an original address of the webpage after detecting the operation of indicating to open the webpage, and sending a first request to the second server; the first request is used for requesting to download codes corresponding to the webpage, and the first request carries an original address. The second server is used for receiving the first request and determining codes corresponding to the webpage according to the original address; and sending codes corresponding to the webpage to the first electronic equipment. The first electronic device is further configured to receive a code corresponding to the web page, and display a current web page.
In a possible implementation manner, the system further comprises a third electronic device, and the first authority includes one or several of the following: the message informs the class authority, the data class authority and the equipment management class authority; the message notification type authority comprises a first notification which is allowed to be received by the third electronic equipment through the control interface and/or a second notification which is sent to the third electronic equipment through the control interface; the data class rights include allowing the first data to be acquired through the data interface; the device management class authority includes a permission to manage the third electronic device through the control interface.
In one possible implementation, the first open interface is all or part of the open interfaces provided by the sports health service.
In addition, the technical effects of the web page authentication system of the third aspect may refer to the technical effects of the web page authentication method of the first aspect, which are not described herein.
In a fourth aspect, the present application provides an electronic device comprising: the device comprises a processor, a memory and a display screen; a memory, a display screen, and a processor are coupled, the memory is for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the electronic device to perform the operations of: the address of the current webpage and the first identification of the current webpage are obtained. Acquiring a first address from a first server according to the first identifier; the first address is a registration address of the current webpage. And checking whether the address of the current webpage is matched with the first address. If so, allowing the current webpage to access a first open interface, wherein the first open interface comprises one or more of the following: data interface, control interface, authorization interface.
In one possible implementation, when the processor reads the computer instructions from the memory, the electronic device is further caused to: and acquiring the first authority corresponding to the first identifier from the first server according to the first identifier. The first authority is the registered authority of the current webpage.
In one possible implementation, if there is a match, allowing the current web page to access the first open interface, including: and if so, allowing the current webpage to access the authorization interface, and displaying the authorization interface, wherein the authorization interface is used for displaying the first authority. And detecting an operation of confirming the authorization, and obtaining a second right, wherein the second right is a right for accessing the data interface and/or the control interface.
In one possible implementation, obtaining the address of the current web page includes: and acquiring the address of the current webpage through a system interface.
In one possible implementation, the first address includes a first web page domain name and a first web page directory corresponding to the first identifier; the address of the current webpage comprises a second webpage domain name and a second webpage catalog; checking whether the address of the current webpage is matched with the first address comprises the following steps: checking whether the first webpage domain name is matched with the second webpage domain name, and checking whether the first webpage catalogue is matched with the second webpage catalogue.
In one possible implementation, the first right includes one or more of the following: the message informs the class rights, the data class rights, and the device manages the class rights. The message notification type authority comprises a first notification which is allowed to be received by the third electronic equipment through the control interface and/or a second notification which is sent to the third electronic equipment through the control interface; the data class rights include allowing the first data to be acquired through the data interface; the device management class authority includes a permission to manage the third electronic device through the control interface; the third electronic device is a device in communication with the first electronic device.
In one possible implementation, when the processor reads the computer instructions from the memory, the electronic device is further caused to: detecting an operation for indicating to open a webpage, acquiring an original address of the webpage, and sending a first request to a second server; the first request is used for requesting to download codes corresponding to the webpage, and the first request carries an original address. Receiving a code corresponding to the webpage sent by the second server, and displaying the current webpage; the corresponding code of the webpage is determined for the second server according to the original address.
In one possible implementation, the first open interface is all or part of the open interfaces provided by the sports health service.
In addition, the technical effects of the electronic device described in the fourth aspect may refer to the technical effects of the web page authentication method described in the first aspect, which are not described herein.
In a fifth aspect, the present application provides a server comprising: a processor and a memory; a memory is coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the server to: and receiving a first identification of the current webpage sent by the first electronic equipment. Determining a first address corresponding to the current webpage according to the first identification; the first address is a registration address of the current webpage; the first address is used for checking the address of the current webpage and confirming whether the current webpage is allowed to access the first open interface, and the first open interface comprises one or more of the following: data interface, control interface, authorization interface. The first address is sent to the first electronic device.
In one possible implementation, when the processor reads the computer instructions from the memory, the server is further caused to: determining a first authority corresponding to the first identifier according to the first identifier; the first authority is the registered authority of the current webpage.
In one possible implementation, when the processor reads the computer instructions from the memory, the server is further caused to: receiving a registration request of a current webpage sent by second electronic equipment; the registration request carries the first address and the first authority. And responding to the registration request, finishing registration of the first address and the first authority, and distributing a first identification for the current webpage.
In one possible implementation, the first address is an address corresponding to the first open interface.
In one possible implementation, the first right includes one or more of the following: the message informs the class rights, the data class rights, and the device manages the class rights. The message notification type authority comprises a first notification which is allowed to be received by the third electronic equipment through the control interface and/or a second notification which is sent to the third electronic equipment through the control interface; the data class rights include allowing the first data to be acquired through the data interface; the device management class authority includes a permission to manage the third electronic device through the control interface; the third electronic device is a device in communication with the first electronic device.
In one possible implementation, the first open interface is all or part of the open interfaces provided by the sports health service.
In addition, the technical effects of the electronic device described in the fifth aspect may refer to the technical effects of the web page authentication method described in the first aspect, which are not described herein.
In a sixth aspect, the present application provides an electronic device having a function of implementing the web page authentication method as described in the first aspect and any one of possible implementation manners. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In a seventh aspect, the present application provides a server having the functionality to implement the web page authentication method as described in the second aspect and any one of the possible implementations. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In an eighth aspect, the present application provides a computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the web page authentication method as in the first aspect and any one of the possible implementations thereof.
In a ninth aspect, the present application provides a computer readable storage medium comprising computer instructions which, when run on a server, cause the server to perform the web page authentication method according to any one of the second aspect and any one of the possible implementations.
In a tenth aspect, the present application provides a computer program product for, when run on an electronic device, causing the electronic device to perform the web page authentication method as described in the first aspect and any one of the possible implementations.
In an eleventh aspect, the present application provides a computer program product which, when run on a server, causes the server to perform the web page authentication method as in the second aspect and any one of the possible implementations.
In a twelfth aspect, there is provided circuitry comprising processing circuitry configured to perform the web page authentication method as described in the first aspect and any one of the possible implementations; or configured to perform a web page authentication method as described in the second aspect and any one of the possible implementations.
In a thirteenth aspect, an embodiment of the present application provides a chip system, including at least one processor and at least one interface circuit, where the at least one interface circuit is configured to perform a transceiver function and send an instruction to the at least one processor, and when the at least one processor executes the instruction, the at least one processor performs a web page authentication method as described in the first aspect and any one of possible implementation manners of the first aspect; alternatively, at least one processor performs a web page authentication method as described in the second aspect and any one of the possible implementations.
Drawings
Fig. 1A is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 1B is a schematic diagram two of an application scenario provided in an embodiment of the present application;
fig. 1C is a schematic diagram III of an application scenario provided in an embodiment of the present application;
fig. 2A is a schematic structural diagram of a first electronic device according to an embodiment of the present application;
fig. 2B is a schematic diagram of a software architecture of a first electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart of a web page authentication method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an interface provided by an embodiment of the present application;
FIG. 5 is a flowchart of a second method for authenticating a web page according to an embodiment of the present application;
FIG. 6 is a flowchart III of a web page authentication method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a set of interfaces according to an embodiment of the present application;
FIG. 8 is a second set of interface diagrams according to an embodiment of the present application;
FIG. 9 is a third set of interface diagrams according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a set of interfaces according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a set of interfaces according to an embodiment of the present application;
FIG. 12 is a flowchart of a web page authentication method according to an embodiment of the present application;
FIG. 13 is a flowchart fifth method for web page authentication according to an embodiment of the present application;
FIG. 14 is a flowchart sixth of a web page authentication method according to an embodiment of the present application;
fig. 15 is a second schematic structural diagram of the first electronic device according to the embodiment of the present application;
fig. 16 is a schematic structural diagram of a first server according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of a second server according to an embodiment of the present application.
Detailed Description
The webpage authentication method, the electronic equipment and the system provided by the embodiment of the application are described in detail below with reference to the accompanying drawings.
The terms "comprising" and "having" and any variations thereof, as referred to in the description of the application, are intended to cover non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or apparatus.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone.
First, for ease of understanding, related terms and concepts that may be related to embodiments of the present application are described below.
(1) Ecological system
The ecosystem in the embodiment of the application refers to an ecosystem of electronic equipment, and refers to a system for optimizing hardware and an operating system of the electronic equipment so that an application program (hereinafter also simply referred to as an application) in the electronic equipment can run better.
(2) Open interface
In the ecosystem, the open service provides service for the third-party webpage through the open interface, so that better use experience is provided for users. Wherein the open service may be an application or module in the electronic device. Services that open services can provide include providing user data, providing the ability to manage devices connected to electronic devices, and the like. The open interface is a standard interface, such as JavaScript interface, that provides services to third-party web pages. The third-party web pages include, for example, web pages provided by other vendors.
For example, application a for managing a wearable device connected to an electronic device may provide an open interface, i.e., application a is an open service. The functions of the application A comprise obtaining user data collected by the wearable device, managing the connection state of the wearable device, managing interaction information between the wearable device and the application A, and the like. The services corresponding to the open interface provided by the application a include, for example, providing user data, managing the wearable device, receiving information sent by the wearable device, sending information to the wearable device, and so on.
(3) Scope (scope) rights
After the third-party webpage is developed, the interface authority (permission) of the open interface can be applied according to the requirement. The subsequent third-party webpage can access the open interface within the scope of the applied authority. Further, to improve the protection of the user resources, a corresponding scope of user authorization (scope) may be defined for the applied rights. Before the application program accesses the user resource, the application program prompts the user on the authorization interface, and after the user is authorized, the application program can access the user resource through the open interface.
Illustratively, an application A is installed on an electronic device. The application A is used for managing the wearable device, and can acquire heart rate data, step numbers, sleep data, blood pressure data, weight data and other user data through the wearable device. Then, scope rights can be respectively corresponding to user data available by the application a one by one, each scope right corresponds to one open interface, and user data can be obtained. After the third-party webpage is developed, the scope permission required by the user, such as scope permission for obtaining heart rate data, step number and sleep data, can be applied. Alternatively, the service that the application a can provide is classified, and scope rights may correspond to different classification results. For example, data obtained by a sensor such as heart rate data, step number, etc. is classified as category 1, permission to send a notification to the wearable device is classified as category 2, and device information viewing the connected wearable device is classified as category 3. After the third party application program is developed, the scope authority required by the category application can be applied according to the category, such as the scope authority of the category 1 is applied.
(4) Uniform resource locator (uniform resource locator, URL)
A URL is a compact representation of the location and access method of a resource available from a network, for locating web pages, multimedia files, etc. The URL may include a web page domain name and a web page directory of the web site. For example, the URL may be expressed as a protocol type:https:// server address/path/filename. Wherein the server address is typically replaced with a web page domain name. The path is typically replaced by a web page directory, and one web page domain name may correspond to one or more web page directories. When applying scope rights for web pages, the same or different scope rights can be applied for different URLs according to the web page domain name and the web page directory. Subsequently, in the verification process of the webpage page, the webpage domain name and the webpage catalog need to be verified. If the verification of the webpage domain name and the webpage catalogue passes, the verification of the corresponding one or more URLs is indicated.
(5)HTML5
HTML5 is the latest revised version of the hypertext markup language (hyper text markup language) announced by the web consortium on day 29, 10, 2014, and its newly introduced grammatical features can support multimedia display on electronic devices, which can better adapt to electronic devices.
H5 pages written based on HTML5 typically cover a variety of elements, such as text, pictures, music or sounds, videos, links, etc., creating a variety of user usage scenarios in a rich media format. In general, the electronic device may open a corresponding H5 page using the URL.
Fig. 1A is a schematic diagram of an application scenario of a web page authentication method according to an embodiment of the present application. The webpage authentication method is applied to the first electronic equipment 100 or a system comprising the first electronic equipment 100. The system includes a first electronic device 100, a first server 200 and/or a second server 300 in communication with the first electronic device 100.
Optionally, the first electronic device 100 may be a mobile phone, a tablet computer, a vehicle-mounted device, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), an artificial intelligence (artificial intelligence) device, or a terminal device with a display function, which is not limited in the specific type of the first electronic device 100 in the embodiment of the present application.
Alternatively, the first server 200 and the second server 300 may be devices or network devices having a computing function, such as a cloud server or a network server. The first server 200 and the second server 300 may be one server, a server cluster formed by a plurality of servers, or a cloud computing service center.
The first server 200 is configured to manage web pages, including, for example, H5 pages. Specifically, the method is used for open interface registration management, webpage registration and the like. After the application program and the H5 page are developed, registration and registration are required in the first server 200. The registration process includes registering page addresses of the H5 pages, such as web page domain names and web page directories. Also included is registration of registration developer information (e.g., company information, etc.), address of the second server 300 developing the application or H5 page, etc. Further, the scope authority may also be applied to the application program or the H5 page by the first server 200. After registration is completed, the first server 200 assigns a number, such as a software number (app id), to the H5 page. Subsequently, the application program or the H5 page is identified by an app id, which may also be described as an identity, a label, etc. of the web page. The first server 200 may also be described as a developer federation, an open server, a management server, or the like.
It should be noted that, hereinafter, the H5 page refers to a web page, and the H5 page is used to describe the web page authentication method provided by the embodiment of the present application. It can be understood that, with the development of technology, the web page may also include other types of web pages, and the web page authentication method provided by the embodiment of the present application is also applicable to other types of web pages, which are not specifically described herein.
The second server 300 is used for providing web pages. Specifically, the second server 300 is configured to deploy an H5 page, after the first electronic device 100 is connected to the second server 300, an H5 page code may be downloaded from the second server 300, and after the H5 page code is executed, the H5 page is displayed. The first electronic device 100 can provide the latest function of the application program for the user without downloading or updating the application program through the H5 page, thereby realizing the light weight of the first electronic device 100. The second server 300 may also be described as a developer server, a development server, or the like.
In other scenarios, if the registration information and scope authority after the application program or the H5 page is developed are preset in the first electronic device 100, the application scenario may not include the first server 200. In still other scenarios, if the H5 page is integrated in the first electronic device 100, the application scenario may not include the second server 300. That is, the first electronic device 100 may implement the functions of the first server 200 and the second server 300. In the embodiment of the present application, specific functional descriptions of the first server 200 and the second server 300 are described in detail below.
In some embodiments, after the third-party webpage is developed, registration with the first server 200 is required, and the first server 200 opens scope rights for the third-party webpage. Subsequently, when the third-party webpage is opened, the first electronic device 100 needs to confirm, to the first server 200, that the scope authority of the current webpage is opened. Illustratively, as shown in FIG. 1B, the second electronic device 400 communicates with the first server 200, enabling registration of web pages.
The second electronic device 400 may provide a related man-machine interaction interface, so that a user (developer) outputs registration information and application authority in the process of registering a web page with the first server 200 by using the second electronic device 400.
Alternatively, the second electronic device 400 may be a personal computer (personal computer, PC), such as a terminal device of a desktop, laptop, handheld computer, notebook, or the like. The embodiment of the present application is not particularly limited to the specific form of the second electronic device 400.
In some embodiments, the first electronic device 100 opens a web page and authorizes the current web page. Allowing the web page to access the open interface, obtaining data in the first electronic device 100, such as user data collected by the first electronic device 100, or displaying subscription information, etc. The authority authorized by the web page is part or all of the authorities registered by the web page to the first server 200.
In still other embodiments, as shown in fig. 1C, the first electronic device 100 may establish a wireless connection with the wearable device 500 through wireless communication technology. The wireless communication technology may include Bluetooth (BT), which may be conventional bluetooth or low energy BLE bluetooth, wireless local area network (wireless local area networks, WLAN) (such as a wireless fidelity (wireless fidelity, wi-Fi) network), zigbee, frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), or general 2.4G/5G frequency band wireless communication technology, etc.
Alternatively, the wearable device 500 may be a smart watch, a smart bracelet, a wireless headset, smart glasses, a smart helmet, a blood glucose meter, a blood pressure meter, or the like. The first electronic device 100 receives user data collected by the wearable device 500 through a wireless connection. Such as heart rate data, number of steps, blood pressure data, etc. Alternatively, the first electronic device 100 may implement data transceiving with the wearable device 500 through a wireless connection. For example, the first electronic device 100 sends information to the wearable device 500, and the user directly reads the information with the wearable device 500. For another example, the first electronic device 100 collects user speech using the wearable device 500. Alternatively, the first electronic device 100 manages the wearable device 500 through a wireless connection. Such as scanning, pairing and/or unbinding the wearable device 500, receiving a device status of the wearable device 500, etc.
In the scenario shown in fig. 1C, the first electronic device 100 opens a web page and authorizes the current web page. Allowing the web page to access the open interface causes the web page to obtain the functionality implemented by the first electronic device 100 using the wearable device 500 described above. Such as web pages, obtain user data collected by wearable device 500, and the like.
By way of example, fig. 2A shows a schematic structural diagram of the first electronic device 100. The first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the first electronic device 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments of the application, the first electronic device 100 may authenticate the web page using the processor 110. Such as by the processor 110 obtaining the URL of the currently launched web page. And then, comparing the acquired URL of the current webpage with the registered webpage domain name and the registered webpage catalog (namely the registered address) of the webpage to carry out security verification. And after the verification is passed, providing scope authority corresponding to the registration address for the webpage.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the first electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied on the first electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied on the first electronic device 100.
The first electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. In some embodiments, the first electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The first electronic device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The camera 193 is used to capture still images or video.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the first electronic device 100.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The internal memory 121 may include a high-speed random access memory, and may also include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the first electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The audio module 170 includes speakers, receivers, microphones, earphone interfaces, and the like.
The audio module 170 is used to convert digital audio data into an analog audio electrical signal output and also to convert an analog audio electrical signal input into digital audio data, and the audio module 170 may include an analog/digital converter and a digital/analog converter.
In some embodiments, the first electronic device 100 may implement audio functionality through the audio module 170, an application processor, and the like. Such as music playing, recording, etc.
The sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100. In other embodiments of the application, the first electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The software system of the first electronic device 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, taking an Android system with a layered architecture as an example, a software structure of the first electronic device 100 is illustrated.
Fig. 2B is a software structural block diagram of the first electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, a An Zhuoyun row (Android time) system library, and a kernel layer.
The application layer may include a series of application packages.
As shown in fig. 2B, the application package may include applications such as a camera, calendar, map, WLAN, music, short message, gallery, call, navigation, first application, etc.
The open service may be implemented as a first application that provides an open interface. And displaying the H5 page in the first application. After detecting the operation of opening the H5 page, the electronic equipment authenticates the H5 page to be opened, and confirms whether the current H5 page has the authority of accessing the open interface provided by the first application or not so as to obtain the open service provided by the first application.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2B, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
In some embodiments, the open services may also be implemented as modules in an electronic device application framework layer, such as an open services module. The mobile phone displays an H5 page, and needs to confirm whether the H5 page has the authority to access the open service interface provided by the open service module.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is for providing communication functions of the first electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is presented in a status bar, a prompt tone is emitted, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), two-dimensional graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The two-dimensional graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The web page authentication method provided by the embodiment of the application will be described below by taking a first electronic device as a mobile phone with the structure shown in fig. 2A and fig. 2B and taking a second electronic device as a PC as an example.
After the development of the web page is completed, the web page needs to be registered first. During registration, the web page may be applied for the rights of the available open services. And then after the mobile phone completes the authentication of the webpage, the webpage can obtain the applied authority and access the corresponding open interface.
Fig. 3 is a schematic diagram of a web page registration process according to an embodiment of the present application. Referring to fig. 3, the registration process includes S301-S302.
S301, the PC sends a webpage registration request to the first server, wherein the registration request carries a first address and a first authority.
The web page may also be called as an H5 page, an H5 application, an installation-free application, and the like. The first address includes a web page domain name and a web page directory of the currently registered web page. The first rights include all or part of the rights provided by the open service, that is, the scope rights of the web page determination application.
In some embodiments, after the H5 page development, the PC needs to apply for registration with the first server. After the first server completes registration, the H5 page is a trusted web page. Subsequently, when the mobile phone opens the H5 page, the mobile phone can use the registration information to authenticate the H5 page.
S302, responding to the registration request, the first server completes the registration of the first address and the first authority, and allocates an identity for the webpage.
The mobile phone can open a corresponding H5 page by using a URL, wherein the URL comprises a webpage domain name and a webpage catalog, and different URLs can correspond to the same webpage domain name and webpage catalog. That is, a web page domain name and web page directory may correspond to one or more URLs. The first server allocates an identity (also referred to as app id) to the web page according to the web domain name and the web directory. Subsequently, in the webpage authentication process, whether the current webpage is registered can be confirmed only by confirming whether the webpage in the URL and the webpage catalog are registered.
Specifically, the first server sends the web page domain name and the web page directory of the H5 page to the first server for registration, and the first server allocates app id for the H5 page by using the rule. Further, other information, such as developer information, registration company information, second server address information, etc., may be included in the registration request.
In some embodiments, the first rights correspond to a first open service interface that is all or part of the open interfaces provided by the open service. That is, the PC may apply for the right to access the first open service interface for the currently registered web page. After the first server completes the registration of the first right. And subsequently, if the verification of the webpage passes, allowing the current webpage to access the first open interface. Wherein the first open interface comprises one or more of the following: data interface, control interface, authorization interface. The data interface is used for obtaining data in the mobile phone or a wearable device connected with the mobile phone. The control interface is used for accessing and/or controlling a wearable device connected with the mobile phone. The authorization interface is used for receiving the authorization of the current webpage by the user. The specific webpage verification and authorization process is described in detail below.
In some embodiments, the implementation of the open service in the mobile phone may be to install an application in the mobile phone, where the application provides the open service for the web page. Or, the open service module in the mobile phone provides open service for the webpage.
For example, one or more first applications are installed in the mobile phone, the first applications are trusted applications provided by mobile phone developers, and the first applications can obtain user resources, store, edit the user resources, and the like. The first application may provide scope rights for the open interface. The first server may learn scope rights of the first application and send the scope rights to the PC, where the PC confirms all or part of the scope rights applied for. In the embodiment of the application, the first application is taken as an application (such as a sports health application) which can be connected with the wearable device and performs information interaction with the wearable device, and the description is given by taking the scope authority of the first application as an example. It will be appreciated that the first application may also be an application where other user resources are available.
For another example, the open service is provided by an open service module in the handset. Correspondingly, the first authority of the H5 page application is the authority corresponding to the open interface provided by the current open service module. Such as the current open service being an athletic health open service. Then, the first open service interface is all or part of the open interfaces provided by the sports health open service.
In some embodiments, the first permissions include, for example, one or more of a message notification class permission, a data class permission, and a device capability management class permission. The message notification permission comprises, for example, permission to send a notification to other devices connected with the mobile phone through a control interface; and/or allow to receive notifications sent by other devices connected to the handset, etc. through the control interface. The dataclass permissions for example comprise allowing the first data to be retrieved via the data interface. Such as allowing the viewing and/or storage of first data in the handset, or allowing the viewing and/or storage of first data obtained by a device connected to the handset via a sensor, etc. The first data is user data, including sleep data, weight data, heart rate data, electrocardiographic data, blood sugar data, pressure data, step number data, exercise records and the like. The device capability management class permissions include, for example, allowing management of other devices connected to the handset through the control interface. Such as permissions to allow viewing and/or storing device information, permissions to allow viewing device status, permissions to allow scanning, pairing and unbinding devices, etc.
Illustratively, as shown in interface 401 of fig. 4, interface 401 is a registration request interface displayed by a PC, and a user (e.g., developer) may perform registration and authority application of an H5 page on interface 401. As shown in interface 401, the PC receives the product selected by the user as an H5 page, and receives the access address input by the user, i.e., the web domain name and the web directory of the H5 page. The PC then uses interface 401 to collect the rights that the user applies for the H5 page. In this regard, as shown in interface 401 of fig. 4, the user may select "full selection", that is, apply for all scope rights provided by the open service for the web page currently being registered. Or selecting rights to be applied according to the category, for example, applying a message to notify the category rights. Alternatively still, a specific scope right is selected. Therefore, the user can flexibly apply the scope permission required in the webpage registering process according to the requirement. Subsequently, when the mobile phone needs to open the webpage, the scope authority of the application needs to be confirmed so as to confirm whether the corresponding open interface can be accessed.
After the PC detects that the user clicks the submit control 41, a registration request is sent to the first server, where the registration request includes the content collected in the interface 401 and filled in and selected by the user. The first server may then assign an app id to the H5 page and register a web page address and scope permissions based on the registration request.
The registration of the web page can be completed through the above steps S301 and S302, and the process of authenticating the web page currently opened by the mobile phone and obtaining the open interface for accessing the open service will be described in detail below through the flow chart of the web authentication method shown in fig. 5. As shown in fig. 5, the method includes steps S501 to S511.
S501, detecting an operation of opening a webpage by a user through the mobile phone, and obtaining an original address of the webpage.
The operation of indicating to open the web page may include various operations. For example, clicking a preset jump control, clicking a web page link, scanning a two-dimensional code, and the like. The original address is an address corresponding to the operation of opening the webpage indicated by the user. If the current operation is the clicked web page link, the original address is the web page link.
In some embodiments, the original address of the web page is, for example, a URL of the web page, and the handset needs to determine the URL to open the web page. Therefore, after detecting the operation of opening the webpage indicated by the user, the mobile phone needs to determine the URL of the webpage corresponding to the current operation.
S502, the mobile phone sends a first request to the second server, wherein the first request carries an original address of a webpage.
The first request is used for requesting to download codes corresponding to the webpage.
In some embodiments, after detecting that the user indicates to open the web page and determining the URL of the web page, the mobile phone needs to request to the second server to download the code corresponding to the web page that needs to be opened currently. And after downloading and executing codes corresponding to the webpage from the second server, displaying the webpage.
S503, the second server determines the code corresponding to the webpage and the identity of the webpage according to the original address of the webpage.
In some embodiments, the second server obtains the original address of the web page after receiving the first request. And then, determining the corresponding webpage codes according to the original addresses of the webpage. Further, the original address of the webpage corresponds to a unique identity, and the second server determines the identity corresponding to the webpage according to the original address of the webpage.
In some embodiments, the second server may further perform domain name detection during determining the code corresponding to the web page, so as to avoid the occurrence of anomalies such as a false domain name or a malicious domain name. After the true domain name is confirmed, the second server is allowed to obtain the corresponding webpage codes, so that abnormal URL (uniform resource locator) is avoided. Then, after the domain name verification, the URL of the web page opened by the subsequent mobile phone must be the real URL of the current web page. The flow of domain name detection may refer to the prior art, and embodiments of the present application are not specifically described.
S504, the second server sends codes corresponding to the webpage and the identity of the webpage to the mobile phone.
S505, the mobile phone receives the codes corresponding to the webpage and the identity of the webpage, and displays the webpage.
In the above steps S501-S505, after detecting that the user instructs to open the web page, the mobile phone opens the first application and displays the web page on other applications or interfaces except the first application. Or when the mobile phone detects that the user indicates to open the webpage in the process of running the first application, the webpage is directly switched and displayed in the first application.
Illustratively, as shown in (a) of fig. 7 as a main interface 701, the mobile phone detects an operation of the user to instruct to open the third party application, such as an operation of clicking on the first hospital application icon 71, opens the first hospital application, and displays an interface 702 as shown in (b) of fig. 7. The mobile phone detects the operation of clicking the health detection control 72 by the user at the interface 702, starts the sports health application (i.e., the first application), and displays the interface 703 as shown in fig. 7 (c), and displays the H5 page of the health detection in the sports health application. The current H5 page needs to obtain user health data, such as heart rate data. Therefore, the H5 page needs to be authenticated to confirm whether it has the right to access the open interface to obtain the user health data. Assuming that the current H5 page is first started and no user authorization has been performed, the history data displayed in the history data area 73 is empty. The handset directly performs H5 page authentication after jumping to the interface 703 to obtain history data, or opens H5 page authentication after detecting that the user clicks the start test control 74. I.e. in response to a user indicating an operation to acquire a user resource, H5 page authentication is started.
Also exemplary, as shown in fig. 8 (a) for the main interface 801, after detecting the user's operation of clicking on the sports health application icon 81, the mobile phone opens the sports health application and displays a discovery interface 802 as shown in fig. 8 (b). The handset detects a user click on the service control 82 at the discovery interface 802, and displays a service interface 803 as shown in fig. 8 (c). And after detecting the operation of clicking the control corresponding to each service window, the mobile phone displays a corresponding H5 page. For example, after detecting the operation of clicking the control 83 corresponding to "step by step", the mobile phone displays the corresponding H5 page and starts to authenticate the H5 page. I.e. directly in sports health applications, the H5 page is switched to be displayed.
In some embodiments, in the process of obtaining the code corresponding to the displayed web page, the mobile phone further obtains the app id (i.e. the identity identifier) allocated by the first server for the current web page. Subsequently, the mobile phone can utilize the app id to check the webpage and confirm the authority.
It should be noted that, the mobile phone may display the URL of the web page on the web page, or may not display the URL of the web page.
S506, the mobile phone sends the identity of the webpage to the first server.
In some embodiments, the mobile phone sends the obtained app id of the H5 page to the first server, where the app id is used to request to obtain registration information corresponding to the app id.
S507, the first server determines a corresponding first address and first authority according to the identity of the webpage.
For example, referring to the web page registration flow shown in fig. 3, and the above steps S301-S302, it is known that, in the registration process, the first server has completed the registration of the first address and the first authority of the web page, and has allocated the app id to the web page. Then, the first server may determine the corresponding registered first address and first authority according to the app id.
S508, the first server sends the first address and the first authority corresponding to the identity to the mobile phone.
S509, the mobile phone obtains the address of the current webpage.
S510, the mobile phone checks whether the address of the current webpage is matched with the first address. If so, executing step S511; if not, access to the open interface is not allowed.
In some embodiments, the code corresponding to the web page obtained by the mobile phone from the second server includes a web domain name of the web page and codes corresponding to a plurality of URLs under the web directory. After the mobile phone displays the webpage, the URL may change, and the address of the current webpage is the same as or different from the original address. In the scenario shown in fig. 7, the web page that the mobile phone currently needs to check is the web page displayed on the interface 703 shown in fig. 7 (c). Therefore, the mobile phone needs to confirm the address of the web page displayed on the current interface 703. Specifically, the mobile phone calls a system interface to obtain the address of the current webpage. For example, the mobile phone calls a Webview component in the Android system interface to obtain the address of the currently displayed H5 page.
In some embodiments, the mobile phone receives a first address and a first authority corresponding to the identity identifier sent by the first server. The mobile phone checks whether the first address is matched with the URL of the current webpage. As described above for the URL, it is assumed that the first address includes a first web domain name and a first web directory corresponding to the first identifier, and the address of the current web page includes a second web domain name and a second web directory. Then, in the verification process, it is required to verify whether the first web page domain name matches the second web page domain name, and to verify whether the first web page directory matches the second web page directory. And if the current webpage is matched with the current webpage, checking is passed, and the current webpage is safe and is qualified for obtaining the first authority. If the user interface is not matched with the current webpage, checking is not passed, the current webpage is unsafe, the qualification of obtaining the first authority is not achieved, and the open interface cannot be accessed, so that the risk of user resource leakage is avoided.
S511, the mobile phone allows the current webpage to access the first open interface.
Wherein, as described above, the first open interface is a registered open interface among open interfaces provided by the open service. The first open interface includes one or more of the following: data interface, control interface, authorization interface.
In some embodiments, after the mobile phone confirms that the verification of the current webpage passes, the current webpage is allowed to obtain the first authority. I.e. after verification is passed, the current web page is allowed to obtain registered rights and access the registered open interface.
In other embodiments, in order to further secure the user resources, user authorization may be required after the current web page passes verification. After obtaining the user authorization, the current webpage is allowed to access the open interface authorized by the user. For example, if the current webpage is the webpage that is opened by the mobile phone for the first time, the mobile phone needs to perform user authorization on the first authority corresponding to the current webpage, and allows access to the open interface authorized by the user. For another example, if the current webpage is not the webpage that is opened for the first time, that is, the current webpage is opened before the mobile phone. And then, the mobile phone does not need to perform user authorization on the current webpage any more, directly obtains the authorization result of the previous user, and allows the webpage to access the corresponding first open interface. Specifically, as shown in fig. 6, step S511 may also be implemented as step S601 and step S602.
In some scenarios, after the verification of the current web page passes, the mobile phone confirms that the current web page accesses the first open interface for the first time, and then step S601 is executed. Wherein step S601 includes step S6011 and step S6012.
S6011, allowing the current webpage to access an authorization interface by the mobile phone, and displaying the authorization interface, wherein the authorization interface is used for displaying the first authority and receiving the user authorization.
In some embodiments, the H5 page will invoke the authorization interface to obtain and display the authorization interface before first accessing the user's resources, prompting the user for authorization. After the user authorizes, the H5 page can access the open interface to obtain corresponding user resources, so that the user privacy is further protected, and the user experience is improved. And the right to be authorized displayed by the current authorization interface is the first right applied when the H5 page is registered, and is stored by the first server, so that the risk of changing the right is reduced. The user confirms that the authorized authority is all or part of the first authority.
For example, as shown in an interface 901 in fig. 9 (a), after the URL of the H5 page passes verification, the mobile phone displays the scope authority applied corresponding to the current app id on the interface 901. The mobile phone opens or closes the corresponding scope authority by detecting the operation of the user on the open or close control 91. And opening scope permission, namely authorizing the H5 page to access the corresponding open interface to obtain corresponding user resources. And closing the scope permission, namely indicating that the H5 page does not obtain the corresponding authorization, and cannot access an open interface corresponding to the scope permission which is not obtained with the authorization to obtain the corresponding user resource. For example, as shown in interface 902 of fig. 9 (b), the handset closes the scan, pairing and unbinding device permissions in response to a user clicking on the open or close control 91. The mobile phone detects that the user clicks the confirmation control 92 to complete the authorization of the current H5 page, and obtains the user authorization result. In the scenario shown in interface 902, the permissions granted by the user obtained by the H5 page include permissions to receive or send notifications and permissions to view heart rate, number of steps, distance data, and permissions to scan, pair and unbind devices.
And S6012, detecting the operation of confirming the authorization by the mobile phone, and obtaining a second authority, wherein the second authority is the authority for accessing the data interface and/or the control interface.
The operation of confirming the authorization includes, for example, an operation of clicking a confirmation authorization control, a voice indication operation, and the like. The second authority is all or part of the first authority, namely, the user selects the authority which allows the webpage to obtain in all the authorities applied by the webpage.
In some embodiments, the web page obtains user data by accessing a data interface, such as user data collected by a wearable device, or user data collected by a cell phone, or the like. The web page may also perform corresponding operations through the access control interface, e.g., the access control interface sends a notification message to the wearable device, unbinds the wearable device, controls the wearable device to vibrate, etc.
Illustratively, as shown in interface 902 of fig. 9 (b), after detecting the operation of clicking the confirm control 92 by the user, the handset displays an interface 1001 as shown in fig. 10 (a). And the current H5 page is indicated to have obtained the access data interface, and the permission of viewing the heart rate, the step number and the distance data is obtained. Then, as shown in interface 1001, the H5 page displays heart rate detection history data obtained by accessing the data interface in area 101.
Further, it is assumed that the current mobile phone is already connected with a wearable device (such as a smart watch, a smart bracelet, etc.) through a connection manner such as bluetooth, and the connected wearable device has a heart rate detection function, and the H5 page obtains authorization of a user to access the data interface and the control interface, such as obtaining permission to view heart rate data and permission to receive or send a notification. As in the scenario shown in fig. 7 (c), in response to a user clicking on the start test control 74, the handset sends a request to the wearable device via the H5 page for requesting measurement of heart rate data. Then, the H5 page may access the first open interface to obtain the heart rate detection result, and display an interface 1002 as shown in (b) of fig. 10, and display the heart rate detection result in the area 102, and display heart rate detection history data.
For further example, as shown in the interface 803 in fig. 8 (c), after detecting that the user clicks the control 83, the mobile phone authenticates the H5 interface (i.e. the "step-by-step" interface) corresponding to the control 83, and after passing the authentication, confirms that the current H5 interface obtains the authorization of the user to access the data interface and has the authority of checking the step number and the distance data, so that the mobile phone may display the interface 804 in fig. 8 (d), and the step number data obtained by the H5 interface through the access data interface is displayed in the interface 804.
In some embodiments, the open service maintains the user authorization record along with the second rights after the handset obtains the second rights. Therefore, after the operation of opening the same webpage is detected by the follow-up mobile phone, the second authority authorized by the user can be directly obtained after the verification of the webpage is passed, and the corresponding open interface is accessed.
In some embodiments, after obtaining the authorization result of the user on the scope authority, the mobile phone further needs to confirm whether the scope authority authorized by the user is the scope authority already applied by the current H5 page according to the user authorization result, so as to avoid the abnormality of the authorization. That is, the H5 page has applied for and is simultaneously enabled to invoke access to the corresponding open interface by the scope rights granted by the user.
For example, the mobile phone may send an authorization confirmation request to the second server, where the authorization confirmation request carries the authorization result of the user. And the second server confirms whether the scope authority authorized by the current user is the scope authority of the H5 page already applied. And the mobile phone receives the authorization response of the second server, and if the authorization confirmation response is a confirmation response, the H5 page is allowed to call and access the corresponding open interface. If the authorization confirmation response is a denial response, the H5 page call is not allowed to access the corresponding open interface. Alternatively, the second server, when sending the negative acknowledgement, also sends a scope right that can be opened by the acknowledgement, i.e. the scope right that the second server acknowledges the user authorization and that the first server has opened. The mobile phone allows to call and access the open interface corresponding to the openable authority. For another example, the mobile phone may directly confirm the user authorization result by using the obtained first authority.
In other scenarios, after the verification of the current web page passes, if the mobile phone confirms that the current web page does not access the first open interface for the first time, step S602 is executed.
S602, the mobile phone allows the current webpage to access the data interface and/or the control interface according to the second authority.
In some embodiments, after the H5 page has obtained user authorization, the handset opens the same H5 page again, only requiring verification of the H5 page. After the verification is passed, the mobile phone can obtain the user authorization record and the second authority saved in step S6012, and determine the authorized second authority. According to the second authority, the open interface which allows the access is confirmed without repeatedly requesting the authorization of the user. Therefore, repeated authorization of the user is avoided, and the use experience of the user is improved.
Illustratively, as shown in interface 702 of FIG. 7 (b), assume that the user has previously completed authorizing permission to view heart rate, number of steps, distance data for the H5 page corresponding to health detection control 72. Then, the mobile phone detects that the user clicks the health detection control 72, and after the H5 page passes the verification, the H5 page can directly access the data interface to obtain the history data of the heart rate data. The handset directly displays the H5 page as shown in fig. 11 and displays the history of heart rate data in region 1101.
Therefore, the webpage authentication method provided by the embodiment of the application can obtain the registered webpage address and authority according to the app id of the webpage application, and authenticate the webpage according to the registered webpage address and authority. Compared with the method for authenticating the webpage by logging in the user account in the prior art, the embodiment of the application does not need to maintain the user account and the password, reduces development and maintenance cost, and simplifies webpage authentication difficulty. In addition, the user account name and the password do not need to be saved, so that the safety of the user resources is further improved, and the risk of user resource leakage is reduced.
In other scenarios, such as interface 903 shown in fig. 9 (c), the handset may also provide the user with the ability to cancel authorization of a web page. For example, as shown in interface 903, detect all rights to the H5 page for heart rate that have been granted. The user may cancel some or all of the permissions of the heart rate detection H5 page through interface 903. After detecting the user's click on the confirmation control 93, the mobile phone confirms the cancelled authorization. And after the next detection of the operation of opening the heart rate detection H5 page by the user, the heart rate detection H5 page is not allowed to access the data interface, and the authority which is cancelled is obtained. That is, the mobile phone will not display the historical heart rate data on the heart rate detection H5 page, and will display an authorization interface to the user for obtaining the user's re-authorization. Further, the operation of closing the authorization is also avoided as a false operation. Or the mobile phone can not directly prompt the user to authorize again, and prompt is performed after the user clicks the historical data display area. Alternatively, the handset does not prompt the user for authorization again.
In other scenarios, the mobile phone may also implement opening a web page without using the second server. That is, as shown in fig. 12, the above-described step S501 to step S505 may be implemented as step S1201 to step S1204.
S1201, presetting a webpage data packet in the mobile phone.
In some embodiments, after the H5 page is developed and registered, a download service may be provided to the mobile phone, which may download the H5 page data packet. The webpage data packet comprises a code corresponding to an H5 webpage, an app id registered by the H5 webpage, a first address and a first authority.
The details of the web page registration method are shown in the above step S301 and step S302, which are not described herein.
S1202, detecting an operation of opening a webpage by a user through the mobile phone, and obtaining an original address of the webpage.
The original address of the webpage does not contain the webpage domain name and the webpage catalog any more, but is the storage position address of the current webpage data packet in the mobile phone. Correspondingly, in the webpage registration process, the registered webpage address is also the storage position address in the mobile phone.
The rest of the content may refer to the related description of step S501, which is not described herein.
And S1203, the mobile phone obtains a webpage data packet according to the original address of the webpage.
S1204, the mobile phone displays the webpage by using the webpage data packet, and obtains the identity of the webpage.
In some embodiments, after detecting the operation that the user instructs to open the H5 page, the mobile phone does not need to download the code corresponding to the H5 page from the second server. And directly obtaining codes corresponding to the H5 page from a preset H5 page data packet according to the address of the webpage page, and displaying the H5 page after loading.
Therefore, the mobile phone can display the H5 page without requesting codes corresponding to the H5 page from the second server, and the efficiency of displaying the webpage page is improved.
In the process that the mobile phone opens the H5 page by using the H5 page data packet, the app id of the H5 page is directly obtained from the preset H5 page data packet.
The rest of the content may refer to the related description of step S505, and will not be described herein.
The steps S506-S511 shown in fig. 12 are the steps S506-S511, and are not described herein.
In other scenarios, the mobile phone may also implement verification of the web page without using the first server. That is, as shown in fig. 13, step S1301 is further included before step S501, and steps S506 to S508 may be implemented as step S1302.
S1301, presetting a webpage identity in the mobile phone, and corresponding first address and first authority.
In some embodiments, after the H5 page is developed and registered, the mobile phone may obtain its registration information, such as the app id of the H5 page, and the corresponding registered first address and first authority.
The details of the web page registration method are shown in the above step S301 and step S302, which are not described herein.
The steps S501-S505 shown in fig. 13 are the steps S501-S505, and are not described herein.
S1302, the mobile phone determines a preset first address and a first authority according to the identity of the webpage.
In some embodiments, the mobile phone obtains a first address of an H5 page preset in the mobile phone according to an app id of the H5 page. And then checking the URL of the displayed H5 page by using the first address of the preset H5 page, and obtaining the user authorization by using the preset first authority. Furthermore, the mobile phone can also determine an accessible open interface by using the preset first authority.
Therefore, the mobile phone can complete the verification of the H5 page without interaction with the first server, the verification efficiency is improved, and the operation cost is saved.
In combination with the above scenarios of application of the web page authentication methods described in fig. 4, fig. 12 and fig. 13, if the mobile phone can independently execute loading a web page and authenticating the web page. In yet another scenario, as shown in fig. 14, in combination with the flow diagrams of the web page authentication method shown in fig. 4, 12 and 13, an embodiment of the present application provides a flow diagram of another web page authentication method.
The order of step S1301 and step S1201 is not particularly limited in the embodiment of the present application. For example, as shown in fig. 14, the mobile phone may preset the web page identity, the corresponding first address and the first authority in the mobile phone. And presetting the webpage data packet in the mobile phone. Alternatively, the mobile phone may complete step S1301 and step S1201 simultaneously.
The details of the steps shown in fig. 14 may be found in the above description of the steps, and are not repeated here.
It will be appreciated that in order to achieve the above-described functionality, the electronic device comprises corresponding hardware and/or software modules that perform the respective functionality. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The present embodiment may divide the functional modules of the electronic device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules described above may be implemented in hardware. It should be noted that, in this embodiment, the division of the modules is schematic, only one logic function is divided, and another division manner may be implemented in actual implementation.
As shown in fig. 15, an embodiment of the present application discloses a structural schematic diagram of a first electronic device. The first electronic device 1500 may be used to implement the methods described in the various method embodiments above. By way of example, the first electronic device 1500 may specifically include: a receiving unit 1501 and a processing unit 1502. The receiving unit 1501 is configured to support the first electronic device 1500 to perform step S504 and step S508 in fig. 5. And/or, the receiving unit 1501 is further configured to support the first electronic device 1500 to perform other steps performed by the first electronic device in the embodiment of the present application. The processing unit 1502 is configured to support the first electronic device 1500 to perform step S501, step S505, step S509, step S510 and step S511 in fig. 5. And/or, the processing unit 1502 is further configured to support the first electronic device 1500 to perform step S601 or step S602 in fig. 6. And/or, the processing unit 1502 is further configured to support the first electronic device 1500 to perform step S1201, step S1202, step S1203 and step S1204 in fig. 12. And/or, the processing unit 1502 is further configured to support the first electronic device 1500 to perform step S1301 and step S1302 in fig. 13. And/or the processing unit 1502 is further configured to support the first electronic device 1500 to perform other steps performed by the first electronic device in the embodiment of the present application.
Optionally, the first electronic device 1500 shown in fig. 15 may further include a transmitting unit 1503, where the transmitting unit 1503 is configured to support the first electronic device 1500 to perform step S502 and step S506 in fig. 5. And/or, the sending unit 1503 is further configured to support the first electronic device 1500 to perform other steps performed by the first electronic device in the embodiment of the present application.
Optionally, the first electronic device 1500 shown in fig. 15 may further include a storage unit (not shown in fig. 15) storing a program or instructions. When the processing unit executes the program or instructions, the first electronic device 1500 shown in fig. 15 may perform the web page authentication methods shown in fig. 5, fig. 6, fig. 12, fig. 13, and fig. 14.
The technical effects of the first electronic device 1500 shown in fig. 15 may refer to the technical effects of the web page authentication method shown in fig. 5, 6, 12, 13 and 14, and will not be described herein.
The processing units involved in the first electronic device 1500 shown in fig. 15 may be implemented by a processor or processor-related circuit components, which may be processors or processing modules. The receiving unit 1501 and the transmitting unit 1503 may be combined into a transceiver unit, which may be implemented by a transceiver or a transceiver related circuit component, and may be a transceiver or a transceiver module.
As shown in fig. 16, an embodiment of the present application discloses a structural schematic diagram of a first server. The first server 1600 may be used to implement the methods described in the various method embodiments above. By way of example, the first server 1600 may specifically include: a receiving unit 1601, a processing unit 1602 and a transmitting unit 1603. Wherein the receiving unit 1601 is configured to support the first server 1600 to perform step S301 in fig. 3. And/or, the receiving unit 1601 is further configured to support the first server 1600 to perform step S506 in fig. 5. And/or, the receiving unit 1601 is further configured to support the first server 1600 to perform other steps performed by the first server in the embodiment of the present application. The processing unit 1602 is configured to support the first server 1600 to execute step S302 in fig. 3. And/or, the processing unit 1602 is further configured to support the first server 1600 to perform step S507 in fig. 5. And/or, the processing unit 1602 is further configured to support the first server 1600 to perform other steps performed by the first server in the embodiment of the present application. The sending unit 1603 is used to support the first server 1600 to perform step S508 in fig. 5. And/or, the sending unit 1603 is further configured to support the first server 1600 to perform other steps performed by the first server in the embodiment of the present application.
Optionally, the first server 1600 shown in fig. 16 may further include a storage unit (not shown in fig. 16) storing a program or instructions. When executed by the processing unit, causes the first server 1600 shown in fig. 16 to perform the web page authentication methods shown in fig. 3, 5, and 12.
The technical effects of the first server 1600 shown in fig. 16 may refer to the technical effects of the web page authentication method shown in fig. 3, 5 and 12, and are not described herein again.
The processing units involved in the first server 1600 shown in fig. 16 may be implemented by a processor or processor-related circuit components, and may be processors or processing modules. The receiving unit 1601 and the transmitting unit 1603 may be combined into a transceiver unit, which may be implemented by a transceiver or a transceiver related circuit component, and may be a transceiver or a transceiver module.
As shown in fig. 17, an embodiment of the present application discloses a structural schematic diagram of a second server. The second server 1700 may be used to implement the methods described in the various method embodiments above. By way of example, the second server 1700 may specifically include: a receiving unit 1701, a processing unit 1702 and a transmitting unit 1703. Wherein the receiving unit 1701 is configured to support the second server 1700 to perform step S502 in fig. 5. And/or, the receiving unit 1701 is further configured to support the second server 1700 to perform other steps performed by the second server in the embodiment of the present application. The processing unit 1702 is configured to support the second server 1700 to perform step S503 in fig. 5. And/or the processing unit 1702 is further configured to support the second server 1700 to perform other steps performed by the second server in the embodiment of the present application. The transmission unit 1703 is configured to support the second server 1700 to perform step S504 in fig. 5. And/or, the sending unit 1703 is further configured to support the second server 1700 to perform other steps performed by the second server in the embodiment of the present application.
Optionally, the second server 1700 shown in fig. 17 may further include a storage unit (not shown in fig. 17) storing a program or instructions. When executed by the processing unit, causes the second server 1700 shown in fig. 17 to perform the web page authentication method shown in fig. 5 and 13.
The technical effects of the second server 1700 shown in fig. 17 may refer to the technical effects of the web page authentication method shown in fig. 5 and 13, and will not be described herein.
The processing elements referred to in the second server 1700 shown in fig. 17 may be implemented by a processor or processor-related circuit components, and may be processors or processing modules. The receiving unit 1701 and the transmitting unit 1703 may be combined into a transceiver unit, which may be implemented by a transceiver or a transceiver related circuit component, and may be a transceiver or a transceiver module.
The embodiment of the application also provides a chip system, which comprises: a processor coupled to a memory for storing programs or instructions which, when executed by the processor, cause the system-on-a-chip to implement the method of any of the method embodiments described above.
Alternatively, the processor in the system-on-chip may be one or more. The processor may be implemented in hardware or in software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general purpose processor, implemented by reading software code stored in a memory.
Alternatively, the memory in the system-on-chip may be one or more. The memory may be integral with the processor or separate from the processor, and the application is not limited. The memory may be a non-transitory processor, such as a ROM, which may be integrated on the same chip as the processor, or may be separately provided on different chips, and the type of memory and the manner of providing the memory and the processor are not particularly limited in the present application.
The system-on-chip may be, for example, a field programmable gate array (field programmable gate array, FPGA), an application specific integrated chip (application specific integrated circuit, ASIC), a system on chip (SoC), a central processing unit (central processor unit, CPU), a network processor (network processor, NP), a digital signal processing circuit (digital signal processor, DSP), a microcontroller (micro controller unit, MCU), a programmable controller (programmable logic device, PLD) or other integrated chip.
It should be understood that the steps in the above-described method embodiments may be accomplished by integrated logic circuitry in hardware in a processor or instructions in the form of software. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
The embodiment of the application also provides a storage medium for storing instructions for the webpage authentication device.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer instructions, which when run on the terminal device, cause the terminal device to execute the related method steps to implement the webpage authentication method in the embodiment.
The embodiment of the application also provides a computer program product, which when run on a computer, causes the computer to execute the related steps so as to realize the webpage authentication method in the embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be a component or module in particular, which may include a processor and a memory connected; the memory is configured to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory, so that the device performs the web page authentication method in the above method embodiments.
The terminal device, the computer readable storage medium, the computer program product or the chip provided by the embodiments of the present application are used to execute the corresponding method provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding method provided above, and will not be described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
In the several embodiments provided in the present application, it should be understood that the disclosed method may be implemented in other manners. For example, the above-described embodiments of the terminal device are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via interfaces, modules or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) or a processor to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (22)

1. A web page authentication method, applied to a first electronic device, the method comprising:
obtaining an address of a current webpage and a first identification of the current webpage;
acquiring a first address and a first authority from a first server according to the first identifier; the first address is a registered address of the current webpage, and the first authority is an authority registered by the current webpage;
checking whether the address of the current webpage is matched with the first address;
if so, allowing the current webpage to access an authorization interface and displaying the authorization interface, wherein the authorization interface is used for displaying the first authority;
detecting an operation of confirming authorization, and obtaining a second right, wherein the second right is a right for accessing a data interface and/or a control interface;
The data interface is used for obtaining data in the first electronic device or third electronic device connected with the first electronic device; the control interface is used for accessing and/or controlling the third electronic device.
2. The method of claim 1, wherein obtaining the address of the current web page comprises:
and acquiring the address of the current webpage through a system interface.
3. The method according to claim 1 or 2, wherein the first address comprises a first web page domain name and a first web page directory corresponding to the first identification; the address of the current webpage comprises a second webpage domain name and a second webpage catalogue; the verifying whether the address of the current webpage matches the first address includes:
checking whether the first webpage domain name is matched with the second webpage domain name, and checking whether the first webpage catalogue is matched with the second webpage catalogue.
4. A method according to claim 1 or 2, characterized in that the first rights comprise one or more of the following: the message informs the class authority, the data class authority and the equipment management class authority;
the message notification type authority comprises a first notification which is allowed to be received by the control interface and sent by the third electronic equipment, and/or a second notification which is allowed to be sent by the control interface and sent to the third electronic equipment; the data class authority comprises a first data which is allowed to be acquired through the data interface; the device management class authority includes a permission to manage the third electronic device through the control interface; the third electronic device is a device in communication with the first electronic device.
5. The method according to claim 1 or 2, wherein prior to said obtaining the address of the current web page and the first identification of the current web page, the method further comprises:
detecting an operation of indicating to open a webpage, acquiring an original address of the webpage, and sending a first request to a second server; the first request is used for requesting to download codes corresponding to the webpage, and the first request carries the original address;
receiving codes corresponding to the webpage sent by the second server, and displaying the current webpage; and determining the corresponding code of the webpage for the second server according to the original address.
6. The method according to claim 1 or 2, wherein the authorization interface, the data interface, and the control interface are all or part of the open interfaces provided for sports health services.
7. A web page authentication method, applied to a first server, the method comprising:
receiving a first identification of a current webpage sent by first electronic equipment;
determining a first address and a first authority corresponding to the current webpage according to the first identifier; the first address is a registered address of the current webpage, and the first authority is an authority registered by the current webpage; the first address is used for checking the address of the current webpage, and confirming whether the current webpage is allowed to access a first open interface or not, and the first open interface comprises one or more of the following: a data interface, a control interface and an authorization interface; the data interface is used for obtaining data in the first electronic device or third electronic device connected with the first electronic device; the control interface is used for accessing and/or controlling the third electronic equipment; the authorization interface is used for receiving the authorization of the user to the current webpage;
And sending the first address and the first authority to the first electronic equipment.
8. The method of claim 7, wherein the method further comprises:
receiving a registration request of the current webpage sent by second electronic equipment; the registration request carries the first address and the first authority;
and responding to the registration request, finishing the registration of the first address and the first authority, and distributing the first identification for the current webpage.
9. The method of claim 7 or 8, wherein the first address is an address corresponding to the first open interface.
10. A method according to claim 7 or 8, wherein the first rights comprise one or more of the following: the message informs the class authority, the data class authority and the equipment management class authority;
the message notification type authority comprises a first notification which is allowed to be received by the control interface and sent by the third electronic equipment, and/or a second notification which is allowed to be sent by the control interface and sent to the third electronic equipment; the data class authority comprises a first data which is allowed to be acquired through the data interface; the device management class authority includes a permission to manage the third electronic device through the control interface; the third electronic device is a device in communication with the first electronic device.
11. The method according to claim 7 or 8, wherein the first open interface is all or part of the open interfaces provided by the sports health service.
12. A web page authentication system, the system comprising a first electronic device and a first server;
the first electronic device is configured to obtain an address of a current web page and a first identifier of the current web page;
the first electronic device is further configured to send the first identifier to the first server;
the first server is configured to determine, according to the first identifier, a first address and a first right corresponding to the current web page, and send the first address and the first right to the first electronic device; the first address is a registered address of the current webpage, and the first authority is an authority registered by the current webpage;
the first electronic device is further configured to check whether an address of the current webpage matches the first address; if so, allowing the current webpage to access an authorization interface and displaying the authorization interface, wherein the authorization interface is used for displaying the first authority; detecting an operation of confirming authorization, and obtaining a second right, wherein the second right is a right for accessing a data interface and/or a control interface; the data interface is used for obtaining data in the first electronic device or third electronic device connected with the first electronic device; the control interface is used for accessing and/or controlling the third electronic device.
13. The system of claim 12, wherein the system further comprises a controller configured to control the controller,
the first electronic device is specifically configured to obtain, through a system interface, an address of the current web page.
14. The system of claim 12 or 13, wherein the first address comprises a first web page domain name and a first web page directory corresponding to the first identification; the address of the current webpage comprises a second webpage domain name and a second webpage catalogue;
the first electronic device is specifically configured to check whether the first web page domain name matches the second web page domain name, and check whether the first web page directory matches the second web page directory.
15. The system of claim 12 or 13, wherein the system further comprises a second electronic device;
the second electronic device is configured to send a registration request of the web page to the first server; the registration request carries the first address and the first authority;
the first server is further configured to complete registration of the first address and the first authority in response to the registration request, and allocate the first identifier to the current web page.
16. The system of claim 12 or 13, wherein the system further comprises a second server;
the first electronic device is further configured to obtain an original address of a web page after detecting an operation indicating to open the web page, and send a first request to the second server; the first request is used for requesting to download codes corresponding to the webpage, and the first request carries the original address;
the second server is used for receiving the first request and determining codes corresponding to the webpage according to the original address; and sending codes corresponding to the webpage to the first electronic equipment;
the first electronic device is further configured to receive a code corresponding to the webpage, and display the current webpage.
17. The system of claim 12 or 13, further comprising a third electronic device, wherein the first right comprises one or more of: the message informs the class authority, the data class authority and the equipment management class authority; the message notification type authority comprises a first notification which is allowed to be received by the control interface and sent by the third electronic equipment, and/or a second notification which is allowed to be sent by the control interface and sent to the third electronic equipment; the data class authority comprises a first data which is allowed to be acquired through the data interface; the device management class authority includes allowing management of the third electronic device through the control interface.
18. The system of claim 12 or 13, wherein the authorization interface, the data interface, and the control interface are all or part of the open interfaces provided for sports health services.
19. An electronic device, comprising: a processor, a memory, and a display screen, the memory, the display screen being coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the electronic device to perform the web page authentication method of any of claims 1-6.
20. A server, comprising: a processor and a memory coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions that, when read from the memory by the processor, cause the server to perform the web page authentication method of any of claims 7-11.
21. A computer readable storage medium having instructions stored therein, which when run on an electronic device, cause the electronic device to perform the web page authentication method of any of claims 1-6.
22. A computer readable storage medium having instructions stored therein, which when run on a server cause the server to perform the web page authentication method of any of claims 7-11.
CN202010899519.3A 2020-08-31 2020-08-31 Webpage authentication method, electronic equipment and system Active CN114205099B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010899519.3A CN114205099B (en) 2020-08-31 2020-08-31 Webpage authentication method, electronic equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010899519.3A CN114205099B (en) 2020-08-31 2020-08-31 Webpage authentication method, electronic equipment and system

Publications (2)

Publication Number Publication Date
CN114205099A CN114205099A (en) 2022-03-18
CN114205099B true CN114205099B (en) 2023-11-10

Family

ID=80644396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010899519.3A Active CN114205099B (en) 2020-08-31 2020-08-31 Webpage authentication method, electronic equipment and system

Country Status (1)

Country Link
CN (1) CN114205099B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523288A (en) * 2011-12-16 2012-06-27 北京视博云科技有限公司 System for providing webpage service for terminal equipment and method thereof
CN102984117A (en) * 2011-09-07 2013-03-20 中国移动通信集团公司 Authentication method and authentication server and authentication system of webpage assembly
CN104426861A (en) * 2013-08-27 2015-03-18 中国银联股份有限公司 Webpage detection method and system
WO2018131910A1 (en) * 2017-01-16 2018-07-19 Samsung Electronics Co., Ltd. Electronic device and method for creating shortcut to web page in electronic device
CN111083093A (en) * 2018-10-22 2020-04-28 中国移动通信集团浙江有限公司 Method and device for calling terminal capability
CN111177672A (en) * 2019-12-20 2020-05-19 北京淇瑀信息科技有限公司 Page access control method and device and electronic equipment
CN111552987A (en) * 2020-04-16 2020-08-18 重庆富民银行股份有限公司 Page access authority control method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984117A (en) * 2011-09-07 2013-03-20 中国移动通信集团公司 Authentication method and authentication server and authentication system of webpage assembly
CN102523288A (en) * 2011-12-16 2012-06-27 北京视博云科技有限公司 System for providing webpage service for terminal equipment and method thereof
CN104426861A (en) * 2013-08-27 2015-03-18 中国银联股份有限公司 Webpage detection method and system
WO2018131910A1 (en) * 2017-01-16 2018-07-19 Samsung Electronics Co., Ltd. Electronic device and method for creating shortcut to web page in electronic device
CN111083093A (en) * 2018-10-22 2020-04-28 中国移动通信集团浙江有限公司 Method and device for calling terminal capability
CN111177672A (en) * 2019-12-20 2020-05-19 北京淇瑀信息科技有限公司 Page access control method and device and electronic equipment
CN111552987A (en) * 2020-04-16 2020-08-18 重庆富民银行股份有限公司 Page access authority control method

Also Published As

Publication number Publication date
CN114205099A (en) 2022-03-18

Similar Documents

Publication Publication Date Title
CN112583784B9 (en) Application programming interface authorization conversion system
KR101874081B1 (en) Cloud Service Supporting Method And System based on a Enhanced Security
CN110245144B (en) Protocol data management method, device, storage medium and system
US10623410B2 (en) Multi-level, distributed access control between services and applications
CN112417425A (en) Equipment authentication method, device, system, terminal equipment and storage medium
CN113032766B (en) Application authority management method and device
WO2013075412A1 (en) Security control method and device for mobile terminal
JP6640869B2 (en) Method and system for anti-phishing using smart images
CN108769992B (en) User authentication method, device, terminal and storage medium
EP3817322A1 (en) Method for upgrading service application range of electronic identity card, and terminal device
CN115102744B (en) Data access method and device
CN111340482A (en) Conflict detection method, device, node equipment and storage medium
KR20190069574A (en) Wireless network type detection method and apparatus, and electronic device
CN107959727A (en) The method and device communicated between webpage and client
CN115048642B (en) Communication method between trusted applications in multi-trusted execution environment and electronic equipment
CN114371963A (en) Fault detection method and electronic terminal
CN114915618B (en) Upgrade package downloading method and device
CN114205099B (en) Webpage authentication method, electronic equipment and system
CN115132305A (en) Data sharing method, data verification method and terminal equipment
CN113496039A (en) Authority management method and terminal
CN117857646B (en) Data network sharing method, electronic equipment and storage medium
CN114692093B (en) Application program installation method and electronic equipment
CN117852565B (en) NFC card generation method, system, device, electronic equipment and server
CN112261659B (en) Control method and device for terminal and server, terminal and storage medium
CN113850633B (en) Information pushing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant