A method and apparatus for controlling terminal device internet access

By obtaining the MAC address and extended parameters of the terminal device through ONT to form a parameter set, and combining it with the pre-stored target parameter set, the problem of Internet access control failure caused by changes in the MAC address of home routers is solved, and effective Internet access control of terminal devices is achieved.

CN115225614BActive Publication Date: 2026-11-10HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110402162.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-14
Publication Date
2026-11-10
Estimated Expiration
2041-04-14

AI Technical Summary

Technical Problem

The home router's function of controlling internet access based on the MAC address of the terminal device has failed because the MAC address of the terminal device changes periodically, making it impossible to effectively control the terminal device's internet access permissions.

Method used

ONT obtains the terminal device's MAC address and extended parameters (such as hardware address, user ID, device model, device operating system, and browser used to access the webpage) to form a parameter set, and combines it with a pre-stored target parameter set to determine whether to restrict the terminal device's internet access.

Benefits of technology

Even if the MAC address of the terminal device changes, the internet access permissions of the terminal device can still be effectively controlled by extending the parameters, thus solving the problem of control failure caused by MAC address changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115225614B_ABST
    Figure CN115225614B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method and device for controlling terminal equipment to access the Internet, the method comprising: an optical network terminal (ONT) obtaining a first parameter set, the first parameter set comprising a media access control (MAC) address of a first terminal equipment and one or more extended parameters: a hardware address, a user identification (ID), a device model, a device operating system, a browser used by the first terminal equipment to access a webpage; and the ONT determining whether to restrict the first terminal equipment to access the Internet based on the first parameter set and at least one pre-stored target parameter set, so that when the MAC address of the first terminal equipment changes randomly, the extended parameters in the first parameter set can be used to determine whether to restrict the first terminal equipment to access the Internet, thereby solving the problem of invalidation of the ONT's control function over the first terminal equipment to access the Internet due to the change of the MAC address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and more specifically, to a method and apparatus for controlling terminal devices to access the Internet. Background Technology

[0002] With the development of Internet technology, optical network terminals (ONTs) now support secure access control functions for connected terminal devices. Taking a home router as an example, it can control whether connected terminal devices can access the Internet.

[0003] Currently, home routers mainly control access to terminal devices based on the media access control (MAC) address of the terminal device. However, for user privacy and security reasons, the original factory MAC address is usually not used. Instead, a randomly generated MAC address is used, which causes the MAC address of the terminal device to change periodically. As a result, the home router's control function over the terminal device's Internet access fails. Summary of the Invention

[0004] This application provides a method and apparatus for controlling a terminal device's internet access. The ONT can determine whether to restrict the terminal device's internet access based on the parameter set corresponding to the terminal device, thereby realizing the function of controlling the terminal device's internet access.

[0005] Firstly, this application provides a method for controlling a terminal device to access the internet. This method can be executed by an ONT (On-Demand Controller), or by a component (such as a chip, chip system, etc.) deployed in the ONT. The embodiments of this application do not limit this. The following is merely an example, using the ONT as the executing entity to describe the method provided in the first aspect.

[0006] For example, the method includes: the ONT obtaining a first parameter set, the first parameter set including the Media Access Control (MAC) address of a first terminal device and one or more of the following extended parameters: hardware address, user identity (ID), device model, device operating system, and a browser for the first terminal device to access web pages, wherein the first terminal device is a terminal device connected to the ONT; the ONT determining whether to restrict the first terminal device from accessing the Internet based on the first parameter set and at least one pre-stored target parameter set; each target parameter set corresponds to a target terminal device for which Internet access needs to be controlled, the target parameter set including the MAC address of the target terminal device and one or more of the following extended parameters: hardware address, user ID, device model, device operating system, and a browser for the target terminal device to access web pages.

[0007] Based on the above technical solution, the ONT can determine whether to restrict the Internet access of the first terminal device based on any one or more parameters in the first parameter set. In other words, when it is impossible to make a judgment based on the MAC address of the first terminal device in the first parameter set, it can determine whether to restrict the Internet access of the first terminal device based on one or more extended parameters, thereby realizing the function of controlling the Internet access of the first terminal device and solving the problem that the ONT's Internet access control function for the first terminal device fails due to the periodic change of the MAC address.

[0008] In conjunction with the first aspect, in some possible implementations of the first aspect, the ONT obtains the first parameter set by: the ONT receiving a Dynamic Host Configuration Protocol (DHCP) message and / or a Hypertext Transfer Protocol (HTTP) message from the first terminal device, wherein the DHCP message is a message sent by the first terminal device to the ONT to request internet access, and the HTTP message is a message sent by the first terminal device to the ONT to request access to a webpage; and the ONT obtains the first parameter set from the DHCP message and / or the HTTP message.

[0009] ONT can obtain parameters from the first parameter set from DHCP messages and / or HTTP messages. Therefore, by combining DHCP messages and HTTP messages to obtain the first parameter set, more methods for obtaining the first parameter set are provided, reducing the risk of not being able to obtain the first parameter set.

[0010] In conjunction with the first aspect, in some possible implementations of the first aspect, the ONT determines whether to restrict the first terminal device from accessing the Internet based on the first parameter set and at least one pre-stored target parameter set, including: if the MAC address of the first terminal device does not match any MAC address in at least one target parameter set, the ONT determines whether to restrict the first terminal device from accessing the Internet based on extended parameters in the first parameter set and extended parameters in at least one target parameter set.

[0011] If the MAC address of the first terminal device in the first parameter set does not match any MAC address in at least one target parameter set, it can be determined whether to restrict the first terminal device's internet access based on the extended parameters in the first parameter set and at least one extended parameter set. This provides more parameters for determining whether to restrict the first terminal device's internet access, enabling more effective control over its internet access.

[0012] In conjunction with the first aspect, in some possible implementations of the first aspect, the ONT determines whether to restrict the first terminal device from accessing the Internet based on the extended parameters in the first parameter set and the extended parameters in at least one target parameter set, including: the ONT determines to restrict the first terminal device from accessing the Internet if the extended parameters of the first terminal device match at least one extended parameter in at least one target parameter set; or the ONT determines to allow the first terminal device from accessing the Internet if the extended parameters of the first terminal device do not match any of the extended parameters in at least one target parameter set.

[0013] If the extended parameters of the first terminal device match at least one extended parameter in at least one target parameter set, the ONT restricts the first terminal device from accessing the Internet. If the extended parameters of the first terminal device do not match any of the extended parameters in at least one target parameter set, the ONT allows the first terminal device to access the Internet. This concretizes the determination of whether to restrict the first terminal device from accessing the Internet based on the extended parameters, thereby realizing the control of the first terminal device's Internet access.

[0014] Optionally, the extended parameters include: hardware address, user ID, and device model; and the extended parameters of the first terminal device match at least one extended parameter in at least one target parameter set, including: at least one of the extended parameters of the first terminal device matches at least one extended parameter in at least one target parameter set.

[0015] The extended parameters include three parameters: hardware address, user ID, and device model. These three parameters are highly relevant to the first terminal device. The ONT can match these three parameters with the parameters in the target parameter set to control the first terminal device's internet access.

[0016] Optionally, the extended parameters include: hardware address, user ID, device signal, device operating system, and browser for accessing web pages; and the extended parameters of the first terminal device match at least one extended parameter in at least one target parameter set, including: at least one of the extended parameters of the first terminal device matches at least one extended parameter in at least one target parameter set.

[0017] The extended parameters include: hardware address, user ID, device signal, device operating system, and browser used to access web pages. This increases the number of parameters in the extended parameters, making it easier for the extended parameters of the first terminal device to match the extended parameters of the target parameter set, thus facilitating the control of the first terminal device's Internet access.

[0018] In conjunction with the first aspect, in some possible implementations of the first aspect, the method further includes: ONT updating at least one target parameter set based on the first parameter set.

[0019] The ONT can save the first parameter to the ONT, so that when the first terminal device reconnects to the ONT, the record of the parameter set corresponding to the first terminal device has been saved, which facilitates the control of the first terminal device's Internet access.

[0020] In conjunction with the first aspect, in some possible implementations of the first aspect, the ONT determines whether to restrict the first terminal device from accessing the Internet based on the first parameter set and at least one pre-stored target parameter set, including: the ONT determines to restrict the first terminal device from accessing the Internet if the MAC address of the first terminal device matches the MAC address in at least one target parameter set.

[0021] If the MAC address of the first terminal device matches a MAC address in at least one target parameter set, the ONT can restrict the first terminal device from accessing the Internet. Thus, the ONT can also control the first terminal device's Internet access based on its MAC address.

[0022] Secondly, this application provides an apparatus for controlling a terminal device to access the Internet, including modules or units for implementing the methods of the first aspect and any possible implementation thereof. It should be understood that each module or unit can implement its corresponding function by executing a computer program.

[0023] Thirdly, this application provides an apparatus for controlling a terminal device to access the Internet, including a processor, the processor being configured to execute the method for controlling a terminal device to access the Internet as described in the first aspect and any possible implementation thereof.

[0024] The device may further include a memory for storing instructions and data. The memory is coupled to the processor, which, when executing the instructions stored in the memory, can implement the methods described in the foregoing aspects. The device may also include a communication interface for communicating with other devices; exemplary, the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface.

[0025] Fourthly, this application provides a chip system including at least one processor for supporting the implementation of the functions involved in the first aspect and any possible implementation of the first aspect, such as receiving or processing data and / or information involved in the above methods.

[0026] In one possible design, the chip system also includes a memory for storing program instructions and data, which may be located within or outside the processor.

[0027] The chip system can consist of chips or include chips and other discrete components.

[0028] Fifthly, this application provides a computer-readable storage medium including a computer program that, when run on a computer, causes the computer to implement the methods of the first aspect and any possible implementation of the first aspect.

[0029] In a sixth aspect, this application provides a computer program product comprising: a computer program (also referred to as code or instructions) that, when executed, causes a computer to perform the methods of the first aspect and any possible implementation thereof.

[0030] It should be understood that the second to sixth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of a wireless communication system applicable to the methods provided in the embodiments of this application;

[0032] Figure 2 This is a schematic flowchart illustrating the method for controlling a terminal device to access the Internet provided in an embodiment of this application;

[0033] Figure 3 This is a schematic diagram of the process of matching the first parameter set with the target parameter set provided in an embodiment of this application;

[0034] Figure 4 This is a schematic block diagram of a device for controlling a terminal device to access the Internet, as provided in an embodiment of this application.

[0035] Figure 5 This is another schematic block diagram of the device for controlling the terminal device to access the Internet provided in the embodiments of this application. Detailed Implementation

[0036] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0037] The technical solutions of this application embodiment can be applied to wireless local area network (WLAN) communication systems.

[0038] Before introducing the embodiments of this application, the terminology involved in this application will be briefly explained.

[0039] 1. ONT: An ONT is an optical network device used at the user end, part of an optical network unit, located directly at the user end, enabling home broadband access. For example, an ONT can be a home router manufactured by different companies.

[0040] 2. Terminal devices: including but not limited to mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), distributed devices, printers, etc. This application does not limit the specific type of terminal device.

[0041] In this embodiment of the application, the terminal device can access the ONT via WLAN technology.

[0042] 3. MAC address: also known as physical address, is equivalent to the identifier of a terminal device. It is written into the hardware by the manufacturer when the terminal device is manufactured. Each terminal device has a unique MAC address. For example, the MAC address of a terminal device is "2C:45:53:AO:54:44".

[0043] 4. DHCP message:

[0044] Table 1 shows an example of a DHCP message. As shown in Table 1, the header of a DHCP message from a terminal device connected to the router contains the IP address and MAC address of the terminal device; the option field contains the device model, user ID, and device operating system; and the client hardware address (CHADDR) field contains the hardware address of the terminal device. The hardware address in the CHADDR field can have two possibilities: either it is a randomly generated MAC address, or it is the terminal device's factory default MAC address. Table 1 shows examples of DHCP messages from multiple terminal devices connected to the router.

[0045] Table 1

[0046]

[0047] As an example, in the DHCP message fields shown in item 2 of the table above, the option12 field "HW_20-c969264" indicates that the terminal device's model is HW 20 and the user ID is c969264. It should be noted that if the user does not have a logged-in account, the message will not include the user ID.

[0048] In another example, in the DCHP message fields shown in item 4 of the table above, the device model of the terminal device is MZ-PRO-6, as indicated by the option12 field "MZ-PRO-6". This field does not carry a user ID, suggesting that the user may not have logged into an account on this terminal device. The option60 field "android-dhcp-7.1.1" indicates that the operating system of the terminal device is Android. The request header fields contain a MAC address, which is "F0:**:**:E0:**:6F". This MAC address may be the MAC address that came with the terminal device at the factory, i.e., the hardware address of the terminal device; it may also be a randomly generated MAC address, for example, one that changes periodically, such as every day. This embodiment of the application does not limit this.

[0049] 5. HTTP Message: HTTP is a network transmission protocol on the Internet, used for requests and responses between clients and servers. HTTP messages can carry user agent (UA) information, which may include: the device's operating system, the browser used to access web pages, and the device model.

[0050] An example of User Agent (UA) information is as follows: "Mozilla / 5.0 (Linux; Android10; LIO-AN00 Build / HWLIO-AN00:wv) AppleWebKit / 537.36 (KHTML, like Gecko) Version / 4.0 Chrome / 76.0.3809.89M". From the above UA information, we can see that the device model is "HWLIO-AN00", the operating system is "Android10", and the browser used to access the webpage is "Chrome".

[0051] Another example of UA information is as follows: "Mozilla / 5.0 (CPU iPhone OS 6_0 like Mac OS X) AppleWebKit / 536.26 (KHTML, like Gecko) Version / 6.0 Mobile / 10A403 Safari / 8536.25". From the above UA information, it can be seen that the operating system of this terminal device is "Mac OS X", and the browser used to access the webpage is "Safari".

[0052] Another example of UA information is as follows: "Mozilla / 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit / 537.36 (KHTML, like Gecko) Chrome / 86.0.4240.111 Safari / 537.36". From the above UA information, it can be seen that the operating system of this terminal device is "Windows NT 10.0", and the browser used to access the webpage is "Safari".

[0053] The following is an illustrative example, using a WLAN system as an example, to describe the application scenarios of the embodiments of this application and the methods provided by the embodiments of this application.

[0054] ONT is a device for terminal devices to access the network in WLAN. The following describes in detail the method for controlling terminal devices to access the Internet provided in the embodiments of this application, taking a router as an example. It should be understood that the router is only one example of ONT.

[0055] With the development of internet technology, routers, through wireless fidelity (WiFi) technology, provide network services to various connected terminal devices, and have become an indispensable part of people's lives, with increasingly rich functions. Currently, routers support secure access control functions for connected terminal devices, such as restricting terminal devices from accessing the internet or prohibiting terminal devices from connecting.

[0056] Figure 1 This is a schematic diagram of a wireless communication system applicable to the methods provided in the embodiments of this application.

[0057] like Figure 1 As shown, the communication system 100 includes a router 110 and terminal devices 121 and 122. After terminal devices 121 and 122 are connected to router 110, users can control terminal devices 121 and / or 122 connected to router 110 through the WiFi management interface. For example, the internet access function of terminal devices 121 and / or 122 can be restricted. The first terminal device mentioned below can be any of the terminal devices connected to router 110.

[0058] It should be understood that Figure 1 This is merely an example, showing two terminal devices connected to router 110. This application does not limit the number of terminal devices connected to the router.

[0059] Currently, there is a technology where routers determine whether to restrict internet access for terminal devices based on their MAC addresses. However, for user security and privacy reasons, the industry has proposed MAC address randomization. This means that when a terminal device transmits network data, it does not use the device's factory-installed MAC address, but rather a randomly generated MAC address (also known as a dynamic MAC address). This renders the router's method of determining internet access restriction based on the terminal device's MAC address ineffective. Consequently, the router cannot effectively control internet access for terminal devices.

[0060] This application provides a method for controlling internet access for terminal devices. In addition to the MAC address, it introduces one or more extended parameters. When the MAC address alone cannot determine whether to restrict internet access, these extended parameters are used to further determine whether to restrict the terminal device's internet access. Therefore, when a terminal device uses a dynamic MAC address for internet access, more parameters can be used for judgment, thereby enabling the ONT to effectively control the terminal device's internet access.

[0061] The following will describe in detail, with reference to the accompanying drawings, a method for controlling a terminal device to access the Internet provided by an embodiment of this application.

[0062] It should be understood that the embodiments shown below describe the method from the perspective of the interaction between the first terminal device and the router, wherein the first terminal device may be... Figure 1 The terminal device 121 or 122 shown can be a router. Figure 1 The router 110 shown is used to connect a first terminal device to the router. This device can access the internet through the router, such as accessing or browsing web pages, shopping online, or watching videos online.

[0063] It should also be understood that although the embodiments shown below are described using the interaction between a first terminal device and a router as an example, they should not be construed as limiting the subject of execution of the method. The method provided in this application can be executed as long as a program containing the code of the method provided in the embodiments of this application is run. For example, the first terminal device can be replaced by a component configured in the first terminal device (e.g., a chip, a chip system, or other functional modules capable of calling and executing programs), and the router can be replaced by a component configured in the router (e.g., a chip, a chip system, or other functional modules capable of calling and executing programs). This application does not limit this.

[0064] It should also be noted that in the embodiments of this application, descriptions such as "when," "under the circumstances," "if," and "if" all refer to the fact that the device (e.g., a terminal device or a network device) will make corresponding processing under certain objective circumstances. They are not time limits, nor do they require the device (e.g., a terminal device or a network device) to have a judgment or determination action when implementing it, nor do they mean that there are other limitations.

[0065] Figure 2 This is a schematic flowchart of a method 200 for controlling a terminal device to access the Internet, provided in an embodiment of this application. Figure 2 The method shown may include S210 and S220, which are described below. Figure 2 Each step in the process will be explained in detail.

[0066] S210, The router obtains the first parameter set.

[0067] The first parameter set is the parameter set corresponding to the first terminal device. Specifically, the first parameter set may include the MAC address of the first terminal device and one or more of the following extended parameters: hardware address, user ID, device model, device operating system, and the browser used by the first terminal device to access web pages. The router obtains the first parameter set, that is, it obtains the parameters within the first parameter set.

[0068] One possible way for a router to obtain the first parameter set is to obtain it from a DHCP message from the first terminal device.

[0069] When a user wishes to access the internet through a first terminal device, the first terminal device can respond to the user's action by sending a DHCP message to the router to request internet access. This DHCP message can be a message used to request internet access, such as a DHCP request message. Accordingly, the router receives the DHCP message from the first terminal device.

[0070] Optionally, S210 specifically includes: the router receiving a DHCP message from the first terminal device and obtaining a first parameter set from the DHCP message.

[0071] The DHCP message may carry one or more parameters from the first parameter set listed above. The router can obtain one or more parameters from the first parameter set by parsing the DHCP message. The DHCP message has already been explained in detail above with reference to Table 1; for the sake of brevity, it will not be repeated here.

[0072] Another possible way for the router to obtain the first parameter set is to obtain it from the HTTP message from the first terminal device.

[0073] When a user wishes to access a webpage through a first terminal device, the first terminal device can respond to the user's action by sending an HTTP message to the router to request access to the webpage. Accordingly, the router receives the HTTP message from the first terminal device.

[0074] Optionally, S210 specifically includes: the router receiving an HTTP message from the first terminal device and obtaining a first parameter set from the HTTP message.

[0075] Routers can obtain one or more parameters from the first parameter set by parsing HTTP messages. The above text has already provided a detailed explanation of retrieving parameters from the first parameter set in an HTTP message with examples; for the sake of brevity, it will not be repeated here.

[0076] It should be understood that the DHCP message sent by the first terminal device may contain incomplete information. That is, the router may not be able to resolve all the parameters in the first parameter set. For example, in item 7 of Table 1, the message cannot resolve the device's operating system, device model, and user ID. In this case, some extended parameters can be obtained through HTTP messages. In other words, DHCP messages and HTTP messages can be used together for the router to extract the first parameter set.

[0077] One possible implementation is that after receiving the DHCP message and HTTP message from the first terminal device, the router obtains the first parameter set of the first terminal device, including: MAC address and extended parameters. The extended parameters include at least one of the following: hardware address, user ID, device model, operating system, and browser used to access web pages.

[0078] It should be noted that when a router obtains the first parameter set from DHCP messages and / or HTTP messages, it can read from the DHCP messages and / or HTTP messages based on multiple parameters listed in the first parameter set. However, the router may not be able to read all of the above multiple parameters.

[0079] Optionally, after obtaining the first parameter set, the router sorts the extended parameters in the first parameter set. The sorting of the extended parameters can be based on their association with the first terminal device, or in other words, based on their ability to identify the first terminal device. For example, the hardware address has the highest association with the first terminal and is the most effective at identifying the first terminal device; next is the user ID, as users may log in on the same terminal device regularly, so it can also identify the first terminal device; then comes the device model, followed by the device operating system, and finally the browser used to access the webpage.

[0080] It should be noted that the extended parameters and terminal devices may not correspond one-to-one in some cases. For example, two terminal devices of the same model may use the same operating system, but in a home network, the possibility of this happening is low due to the limited number of terminal devices.

[0081] It should also be noted that when a user is not logged in, the user ID parameter can be ignored, meaning only the MAC address, hardware address, device model, operating system, and browser used to access the webpage are retrieved.

[0082] S220: The router determines whether to restrict the first terminal device from accessing the Internet based on the first parameter set and at least one pre-stored target parameter set.

[0083] Each pre-stored set of target parameters can correspond to a target terminal device that needs to be controlled for internet access. Each set of target parameters can include the MAC address of the corresponding target terminal device and one or more of the following extended parameters: hardware address, user ID, device model, device operating system, and browser used by the target terminal device to access web pages.

[0084] The router matches the first set of parameters with at least one pre-stored target set of parameters to determine whether to restrict the first terminal device from accessing the internet.

[0085] It should be understood that a successful match specifically means that the first parameter set of the first terminal device is compared with the target parameter set pre-stored in the router, and the target parameter set contains one or more parameters that are the same as those in the first parameter set. A failed match specifically means that the target parameter set does not contain any parameters that are the same as those in the first parameter set.

[0086] It should also be understood that the result of determining whether to restrict the first terminal device's internet access can include: restricting the first terminal device's internet access or allowing the first terminal device to access the internet. If it is determined that the first terminal device's internet access should be restricted, the router can directly restrict the first terminal device's internet access; if it is determined that the first terminal device's internet access should be allowed, the router can directly allow the first terminal device to access the internet. "Determined" only indicates the result; the router can directly perform the corresponding operation based on the matching result, and does not necessarily have to perform the action of determining restriction or determination of permission. Furthermore, for the router, the specific implementation of restricting or allowing the first terminal device's internet access can refer to existing technologies, and this application embodiment does not limit this. The following is in conjunction with... Figure 3 Provide a detailed explanation of the matching process between the first parameter set and the target parameter set. Figure 3 This is a schematic diagram of the process of matching a first parameter set with a target parameter set according to an embodiment of this application. For example, S220 may specifically include S2201 to S2205.

[0087] S2201. The router determines whether the MAC address of the first terminal device matches the MAC address in the target parameter set.

[0088] After obtaining the first parameter set via S210, the router matches the MAC address of the first terminal device with the MAC addresses in the pre-stored target parameter set. In other words, it compares the MAC address of the first terminal device with the MAC addresses in the pre-stored target parameter set to determine if there is a MAC address in the target parameter set that matches the MAC address of the first terminal device. It should be understood that the router can have only one pre-stored target parameter set, comparing the MAC address of the first terminal device with one pre-stored target parameter set. Alternatively, it can have multiple pre-stored target parameter sets, comparing the MAC address of the first terminal device with the MAC addresses in multiple pre-stored target parameter sets. If the MAC address of the first terminal device matches any MAC address in at least one target parameter set, the match is successful, and the router can execute S2202, restricting the first terminal device's internet access. If the MAC address of the first terminal device does not match any of the MAC addresses in the pre-stored target parameter sets, the match fails, and the router executes step S2203.

[0089] S2203. Determine whether the extended parameters in the first parameter set match the extended parameters in the target parameter set.

[0090] If the MAC address of the first terminal device does not match any MAC address in at least one of the target parameter sets, then S2203 is executed, and the extended parameters in the first parameter set are matched with the extended parameters in the target parameter set in order. It should be understood that the router can also execute S2205 to update the first parameter set of the first terminal device in the router. When the first terminal device reconnects to the router, the router will have already stored the information of the first parameter set.

[0091] After the first parameter set is saved to the router, the router compares the extended parameters of the first terminal device with the extended parameters in one or more pre-stored target parameter sets. If the extended parameters of the first terminal device are the same as at least one extended parameter in at least one target parameter set, the match is successful, and the router restricts the first terminal device from accessing the internet. If the extended parameters of the first terminal device are not the same as any extended parameter in at least one target parameter set, the match fails, and the router executes S2204, allowing the first terminal device to access the internet.

[0092] In the first possible implementation, the router compares the hardware address, user ID, and device model of the first terminal device in the first parameter set with extended parameters in one or more pre-stored target parameter sets. If one or more of these three extended parameters are the same as at least one extended parameter in the target parameter set, the match is successful, and the router restricts the first terminal device from accessing the internet. For example, the router compares the hardware address of the first terminal device in the first parameter set with a hardware address in a target parameter set. If they are the same, the match is successful. If they are different, the router compares the user ID of the first terminal device in the first parameter set with the user ID in the target parameter set. If they are the same, the match is successful. If none of these three extended parameters are the same as any of the extended parameters in the target parameter set, the match fails, and the router allows the first terminal device to access the internet.

[0093] In this implementation, the extended parameters include the hardware address, user ID, and device model. When the router executes S210, it can obtain the MAC address and the three extended parameters of hardware address, user ID, and device model, but it does not obtain the device operating system and the browser used to access the webpage.

[0094] In the second possible implementation, the router compares the hardware address, user ID, device model, operating system, and browser used to access the webpage of the first terminal device in the first parameter set with extended parameters from one or more pre-stored target parameter sets. If one or more of these five extended parameters match at least one extended parameter in the target parameter set, the match is successful, and the router restricts the first terminal device from accessing the internet. For example, the router compares the hardware address of the first terminal device in the first parameter set with a hardware address in a target parameter set. If they match, the match is successful. If they do not match, the router compares the user ID of the first terminal device in the first parameter set with the user ID in the target parameter set until one of the extended parameters matches. If a match is found, the router restricts the first terminal device from accessing the internet. If none of these five extended parameters match any of the extended parameters in the target parameter set, the match fails, and the router allows the first terminal device to access the internet.

[0095] In this implementation, the extended parameters include the hardware address, user ID, device model, device operating system, and the browser used to access the webpage. When the router executes S210, it can obtain the MAC address and these five extended parameters: hardware address, user ID, device model, device operating system, and the browser used to access the webpage.

[0096] Unlike the second implementation, in the third possible implementation, the first parameter set may include any one or more of the following: hardware address, user ID, device model, device operating system, and the browser used by the first terminal device to access the webpage. When executing S210, the router can obtain the MAC address and one or more extended parameters included in the first parameter set, but it does not necessarily need to obtain the five extended parameters: hardware address, user ID, device model, device operating system, and the browser used by the first terminal device to access the webpage. The specific extended parameters included in the first parameter set can be predefined; for example, it may include the hardware address; or it may include the hardware address and user ID; or it may include the hardware address and device model, etc. This application embodiment does not limit this.

[0097] In the third possible implementation, the router matches the obtained extended parameters with the target parameter set. If even one parameter matches, the match is successful, and the router restricts the first terminal device from accessing the internet. If no parameter matches any of the extended parameters in the target parameter set, the match fails, and the router allows the first terminal device to access the internet.

[0098] It should be noted that, regardless of how the first parameter set is defined, when the router obtains the first parameter set from DHCP messages and / or HTTP messages, it can read from the DHCP messages and / or HTTP messages according to each parameter in the first parameter set listed above. However, the router may not be able to read all of the parameters in the first parameter set.

[0099] It should be understood that the above method may restrict the first terminal device from accessing the Internet when the first parameter set matches the target parameter set, or it may allow the first terminal device to access the Internet when the first parameter set matches the target parameter set, and restrict the first terminal device from accessing the Internet when the match fails. This application does not limit this.

[0100] It should be understood that the target terminal devices corresponding to the target parameter set in the above embodiments are a set of terminal devices that need to be controlled for internet access. This is similar to a "blacklist," where terminal devices in the "blacklist" are restricted from accessing the internet, while terminal devices not in the "blacklist" are allowed to access the internet.

[0101] It should also be understood that in the method for controlling the internet access of terminal devices provided above, the target parameter set pre-stored by the router can also correspond to target terminal devices that do not require internet access control, that is, similar to a "whitelist". Terminal devices that belong to the "whitelist" are allowed to access the internet, while terminal devices that do not belong to the "whitelist" are restricted from accessing the internet. In this case, S220 can specifically include: if the first parameter set matches the target parameter set successfully, the router allows the first terminal device to access the internet; if the match fails, the router restricts the first terminal device from accessing the internet.

[0102] Specifically, after obtaining the first parameter set, the router matches the MAC address of the first terminal device with the MAC addresses in the pre-stored target parameter set. That is, it compares the MAC address of the first terminal device with the MAC addresses in the pre-stored target parameter set to determine if a MAC address exists in the target parameter set that matches the MAC address of the first terminal device. If it does, the router allows the first terminal device to access the internet. If not, it matches the extended parameters in the first parameter set with the extended parameters in the target parameter set. The router compares the extended parameters in the first parameter set with the extended parameters in one or more pre-stored target parameter sets. If they match at least one extended parameter in at least one target parameter set, the match is successful, and the router allows the first terminal device to access the internet. If the extended parameters of the first terminal device do not match any extended parameter in at least one target parameter set, the match fails, and the router restricts the first terminal device from accessing the internet.

[0103] The implementation method for comparing the extended parameters of the first parameter set with the extended parameters of the target parameter set can be found in the description of step S2203 above, and will not be repeated here.

[0104] Based on the above technical solution, the router obtains a first parameter set, which includes the MAC address of the first terminal device and one or more of the following extended parameters: hardware address, user ID, device model, device operating system, and the browser used by the first terminal to access the webpage. Based on the first parameter set and at least one pre-stored target parameter set, the router determines whether to restrict the first terminal device from accessing the internet. This allows the router to determine whether to restrict the first terminal device's internet access based on the extended parameters in the first parameter set when the MAC address of the first terminal device changes randomly, thereby solving the problem of router control services for the first terminal device failing.

[0105] The methods provided in the embodiments of this application above are described from the perspective of the interaction between the router and the terminal device. To implement the functions of the methods provided in the embodiments of this application above, the router and the terminal device may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.

[0106] The following will combine Figure 4 and Figure 5 This application provides a detailed description of the device for controlling a terminal device to access the internet, as described in the embodiments of this application.

[0107] Figure 4This is a schematic block diagram of a device 400 for controlling a terminal device to access the internet, provided in an embodiment of this application. Figure 4 As shown, the device 400 may include a transceiver unit 410 and a processing unit 420.

[0108] Optionally, the device 400 may correspond to the router in the above method embodiments. It should be understood that the router is merely one example of an ONT. For example, the device 400 may correspond to the router in the above method embodiments, or to components configured in a router, such as chips, chip systems, etc. Furthermore, each unit in the device 400 can be used to implement... Figure 2 The corresponding procedures executed by the router in method 200 are shown below. For example, the transceiver unit 410 can be used to receive DHCP messages and / or HTTP messages from the first terminal device; the processing unit 420 can be used to obtain a first parameter set from the DHCP messages and / or HTTP messages, and to determine whether to restrict the first terminal device from accessing the Internet based on the first parameter set and at least one pre-stored target parameter set. See the detailed description in the method embodiments for specific details, which will not be repeated here.

[0109] It should be understood that the module division in the embodiments of this application is illustrative and only represents a logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0110] Figure 5 This is another schematic block diagram of the device 500 for controlling a terminal device to access the internet, provided in an embodiment of this application. The device 500 can be a chip system, or it can be a device configured with a chip system to implement the function of controlling the terminal device to access the internet in the above-described method embodiments. In this embodiment, the chip system can be composed of chips, or it can include chips and other discrete components.

[0111] like Figure 5 As shown, the device 500 may include a processor 510 and a communication interface 520. The communication interface 520 can be used to communicate with other devices via a transmission medium, thereby enabling the devices in the device 500 to communicate with other devices. The communication interface 520 may be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of transmitting and receiving functions. The processor 510 can use the communication interface 520 to input and output data and to implement… Figure 2 or Figure 3 The corresponding embodiment describes a method for controlling a terminal device to access the internet. Specifically, the device 500 can be used to implement the router function described in the above method embodiment.

[0112] For example, if the device 500 is used to implement the router function in the method provided in the embodiments of this application, the processor 510 can be used to control the communication interface 520 to receive DHCP messages and / or HTTP messages from the first terminal device; and can be used to determine whether to restrict the first terminal device from accessing the Internet based on the first parameter set and at least one pre-stored target parameter set. See the detailed description in the method embodiments for details, which will not be repeated here.

[0113] Optionally, the device 500 further includes at least one memory 530 for storing program instructions and / or data. The memory 530 is coupled to the processor 510. The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, and can be electrical, mechanical, or other forms, used for information exchange between devices, units, or modules. The processor 510 may operate in conjunction with the memory 530. The processor 510 may execute program instructions stored in the memory 530. At least one of the at least one memory may be included in the processor.

[0114] This application embodiment does not limit the specific connection medium between the processor 510, communication interface 520, and memory 530. This application embodiment... Figure 5 The processor 510, communication interface 520, and memory 530 are connected via bus 540. Bus 540 is... Figure 5 The connections between other components are shown in bold and are for illustrative purposes only, not as limiting information. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0115] This application also provides a computer program product, the computer program product comprising: a computer program (also referred to as code or instructions), which, when executed, causes a computer to perform... Figure 2 or Figure 3 The method executed by the router in the illustrated embodiment.

[0116] This application also provides a computer-readable storage medium storing a computer program (also referred to as code or instructions). When the computer program is executed, it causes the computer to perform... Figure 2 or Figure 3 The method executed by the router in the illustrated embodiment.

[0117] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0118] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0119] The terms “unit”, “module”, etc., used in this specification may be used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution.

[0120] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. In the several embodiments provided in this application, it should be understood that the disclosed apparatus, devices, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0121] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0122] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0123] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs), etc.

[0124] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0125] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for controlling a terminal device to access the internet, characterized in that, include: The optical network terminal (ONT) acquires a first parameter set, which includes the media access control (MAC) address of the first terminal device and one or more of the following extended parameters: hardware address, user ID, device model, device operating system, and browser used by the first terminal device to access web pages. The first terminal device is a terminal device connected to the ONT. The ONT determines whether to restrict the first terminal device from accessing the Internet based on the first parameter set and at least one pre-stored target parameter set. Each target parameter set corresponds to a target terminal device that needs to be controlled to access the Internet. The target parameter set includes the MAC address of the target terminal device and one or more of the following extended parameters: hardware address, user ID, device model, device operating system, and browser used by the target terminal device to access web pages. The ONT determines whether to restrict the first terminal device's internet access based on the first parameter set and at least one pre-stored target parameter set, including: If the MAC address of the first terminal device does not match any MAC address in the at least one target parameter set, the ONT determines whether to restrict the first terminal device from accessing the Internet based on the extended parameters in the first parameter set and the extended parameters in the at least one target parameter set.

2. The method as described in claim 1, characterized in that, The ONT obtains the first parameter set, including: The ONT receives Dynamic Host Configuration Protocol (DHCP) messages and / or Hypertext Transfer Protocol (HTTP) messages from the first terminal device. The DHCP message is a message sent by the first terminal device to the ONT to request internet access, and the HTTP message is a message sent by the first terminal device to the ONT to request access to a webpage. The ONT obtains the first parameter set from the DHCP message and / or the HTTP message.

3. The method as described in claim 1, characterized in that, The ONT determines whether to restrict the first terminal device's internet access based on the extended parameters in the first parameter set and the extended parameters in the at least one target parameter set, including: The ONT determines to restrict the first terminal device's internet access if the extended parameters of the first terminal device match at least one extended parameter in the at least one target parameter set; or If the extended parameters of the first terminal device do not match any of the extended parameters in the at least one target parameter set, the ONT determines that the first terminal device is allowed to access the Internet.

4. The method as described in claim 3, characterized in that, The extended parameters include: hardware address, user ID, and device model; and The extended parameters of the first terminal device match at least one extended parameter in the at least one target parameter set, including: At least one of the extended parameters of the first terminal device matches the extended parameters in the at least one target parameter set.

5. The method as described in claim 3, characterized in that, The extended parameters include: hardware address, user ID, device signal, device operating system, and browser used to access web pages; and The extended parameters of the first terminal device match at least one extended parameter in the at least one target parameter set, including: At least one of the extended parameters of the first terminal device matches the extended parameters in the at least one target parameter set.

6. The method as described in claim 1, characterized in that, The method further includes: The ONT updates the at least one target parameter set based on the first parameter set.

7. The method as described in claim 1 or 2, characterized in that, The ONT determines whether to restrict the first terminal device's internet access based on the first parameter set and at least one pre-stored target parameter set, including: If the MAC address of the first terminal device matches the MAC address in the at least one target parameter set, the ONT determines to restrict the first terminal device from accessing the Internet.

8. A device for controlling terminal devices to access the Internet, characterized in that, include: The processing unit is configured to acquire a first parameter set, the first parameter set including the Media Access Control (MAC) address of the first terminal device and one or more of the following extended parameters: hardware address, user ID, device model, device operating system, and a browser for the first terminal device to access web pages, wherein the first terminal device is a terminal device connected to the device. The processing unit is also configured to determine whether to restrict the first terminal device from accessing the Internet based on the first parameter set and at least one pre-stored target parameter set. Each target parameter set corresponds to a target terminal device that needs to be controlled to access the Internet. The target parameter set includes the MAC address of the target terminal device and one or more of the following extended parameters: hardware address, user ID, device model, device operating system, and browser used by the target terminal device to access web pages. The processing unit is specifically used for: If the MAC address of the first terminal device does not match any MAC address in the at least one target parameter set, a determination is made as to whether to restrict the first terminal device from accessing the Internet based on the extended parameters in the first parameter set and the extended parameters in the at least one target parameter set.

9. The apparatus as claimed in claim 8, characterized in that, The device further includes: The transceiver unit is configured to receive Dynamic Host Configuration Protocol (DHCP) messages and / or Hypertext Transfer Protocol (HTTP) messages from the first terminal device. The DHCP message is a message sent by the first terminal device to the device to request internet access, and the HTTP message is a message sent by the first terminal device to the device to request access to a webpage. The processing unit is specifically used to obtain the first parameter set from the DHCP message and / or the HTTP message.

10. The apparatus as claimed in claim 8, characterized in that, The processing unit is specifically used for: If the extended parameters of the first terminal device match at least one extended parameter in the at least one target parameter set, then it is determined that the first terminal device's internet access will be restricted; or If the extended parameters of the first terminal device do not match any of the extended parameters in the at least one target parameter set, then the first terminal device is allowed to access the Internet.

11. The apparatus as claimed in claim 10, characterized in that, The extended parameters include: hardware address, user ID, and device model; and The extended parameters of the first terminal device match at least one extended parameter in the at least one target parameter set, including: At least one of the extended parameters of the first terminal device matches the extended parameters in the at least one target parameter set.

12. The apparatus as claimed in claim 10, characterized in that, The extended parameters include: hardware address, user ID, device signal, device operating system, and browser used to access web pages; and The extended parameters of the first terminal device match at least one extended parameter in the at least one target parameter set, including: At least one of the extended parameters of the first terminal device matches the extended parameters in the at least one target parameter set.

13. The apparatus as claimed in claim 8, characterized in that, The processing unit is also used for: Based on the first parameter set, update the at least one target parameter set.

14. The apparatus as claimed in claim 8 or 9, characterized in that, The processing unit is specifically used for: If the MAC address of the first terminal device matches the MAC address in the at least one target parameter set, it is determined that the first terminal device's Internet access will be restricted.

15. A device for controlling terminal devices to access the Internet, characterized in that, Includes a processor for performing the method of any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that, Includes a computer program that, when run on a computer, causes the computer to perform the method of any one of claims 1 to 7.

17. A computer program product, characterized in that, Includes a computer program that, when run, causes the computer to perform the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Wlan authentication method based on MAC address and device thereof

    CN102204307A

  • Wireless network connection control method and wireless network access device

    CN107659934A