Device identification method and device, storage medium and routing device

By acquiring and matching auxiliary information of the target electronic device, the problem of routers being unable to identify random MAC addresses is solved, enabling accurate and rapid device identification and improved security.

CN114745324BActive Publication Date: 2026-05-15SHENZHEN QIHOO INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN QIHOO INTELLIGENT TECH CO LTD
Filing Date
2021-01-07
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

The router's inability to accurately identify the device's random MAC address affects application and device identification functions, resulting in a degraded user connection experience.

Method used

By obtaining the address information of the target electronic device, it is determined whether it is a random address. Auxiliary information is obtained and matched with a preset correspondence table. If the matching degree reaches the preset value, the address information is added to the table to ensure the accuracy and speed of device identification.

Benefits of technology

Even after the device is switched to a random address, the routing device can still accurately and quickly identify it, improving device security and ensuring a normal user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114745324B_ABST
    Figure CN114745324B_ABST
Patent Text Reader

Abstract

The application discloses a device identification method and device, a storage medium and a routing device. The method comprises the following steps: obtaining address information of a target electronic device, and judging whether the address information of the target electronic device is random address information; in the case that it is determined that the address information is random address information, obtaining auxiliary information of the target electronic device, and matching the auxiliary information of the target electronic device with a preset correspondence table; and in the case that the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to the device address information connected with the routing device in any one of the preset correspondence table is greater than or equal to a preset matching degree, the address information of the target electronic device is added to the preset correspondence table. The embodiment can ensure that the routing device can still accurately and quickly identify the target electronic device after the target electronic device is replaced with random address information, and perform corresponding application identification and device identification functions, thereby improving the security of the electronic device and guaranteeing the normal use experience of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a device identification method, apparatus, storage medium, and routing device. Background Technology

[0002] Nowadays, mobile phones have increasingly diverse functions. For example, many mobile phone manufacturers provide mobile phones with random local area network (Media Access Control Address, MAC) addresses so that the mobile phone's MAC address changes randomly every time it connects to WIFI, which can avoid the risk of personal privacy being leaked due to the collection of MAC addresses.

[0003] However, functions such as application identification and device identification on a router rely on accurate device identification. When a device connects to the router using a generated random MAC address, the router cannot accurately and quickly identify the device. This not only affects the router's application identification and device identification functions, but also the user's experience when connecting to the router. Summary of the Invention

[0004] This application provides a device identification method, apparatus, storage medium, and routing device, which can accurately identify an electronic device when it generates a random address, thus providing users with a continuous user experience.

[0005] In a first aspect, embodiments of this application provide a device identification method, which is applied to a routing device and includes:

[0006] Obtain the address information of the target electronic device and determine whether the address information of the target electronic device is random address information;

[0007] If the address information of the target electronic device is determined to be random, the auxiliary information of the target electronic device is obtained and matched with a preset correspondence table. The auxiliary information of the target electronic device is used to characterize the model information of the target electronic device. The preset correspondence table includes multiple device address information connected to the routing device and the auxiliary information corresponding to each device address information.

[0008] If the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to any device address information connected to the routing device in the preset correspondence table is greater than or equal to the preset matching degree, the address information of the target electronic device is added to the preset correspondence table.

[0009] In one alternative to the first aspect, determining whether the address information of the target electronic device is random address information includes:

[0010] Determine if a preset string exists in the address information of the target electronic device;

[0011] If a preset string is detected in the address information of the target electronic device, the address information of the target electronic device is determined to be random address information.

[0012] In another alternative to the first aspect, the method further includes:

[0013] If the target electronic device's address information does not contain a preset string, obtain the target electronic device's auxiliary information;

[0014] Add the address information and auxiliary information of the target electronic device to the preset corresponding table.

[0015] In another alternative to the first aspect, after obtaining the auxiliary information of the target electronic device and before matching the auxiliary information of the target electronic device with a preset correspondence table, the method further includes:

[0016] The auxiliary information of the target electronic device is matched with a preset first database to determine the category information of the target electronic device; the preset first database includes multiple different device model information and the category information corresponding to each device model information.

[0017] Matching the auxiliary information of the target electronic device with a preset mapping table, including:

[0018] If the target electronic device is determined to be a smart electronic device, the auxiliary information of the target electronic device is matched with a preset correspondence table; wherein, the address information of the smart electronic device is random address information.

[0019] In another alternative to the first aspect, auxiliary information of the target electronic device is obtained, including:

[0020] Determine the data information of the target electronic device from the Hypertext Transfer Protocol information sent by the target electronic device;

[0021] The data information of the target electronic device is matched with a preset second database; the preset second database includes data information of multiple different devices connected to the routing device and model information corresponding to each device data information;

[0022] If the data information of the target electronic device is successfully matched with the preset second database, the model information corresponding to the device data information connected to the routing device in the preset second database is used as auxiliary information of the target electronic device.

[0023] In another alternative to the first aspect, auxiliary information of the target electronic device is obtained, including:

[0024] Obtain the hostname information of the target electronic device from the Dynamic Host Configuration Protocol (DHCP) information sent by the target electronic device;

[0025] The model information of the target electronic device is determined based on its hostname information, and this model information is used as auxiliary information for the target electronic device.

[0026] Secondly, embodiments of this application provide a device identification apparatus, which is applied to a routing device and includes:

[0027] The first acquisition module is used to acquire the address information of the target electronic device and determine whether the address information of the target electronic device is random address information;

[0028] The second acquisition module is used to acquire auxiliary information of the target electronic device when the address information of the target electronic device is determined to be random address information, and to match the auxiliary information of the target electronic device with a preset correspondence table; the auxiliary information of the target electronic device is used to characterize the model information of the target electronic device; the preset correspondence table includes multiple device address information connected to the routing device and auxiliary information corresponding to each device address information;

[0029] The first processing module is used to add the address information of the target electronic device to the preset correspondence table if the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to any device address information connected to the routing device in the preset correspondence table is greater than or equal to the preset matching degree.

[0030] In one alternative embodiment of the second aspect, the first acquisition module includes:

[0031] The judgment unit is used to determine whether a preset string exists in the address information of the target electronic device;

[0032] The first determining unit is used to determine that the address information of the target electronic device is random address information when a preset string is detected in the address information of the target electronic device.

[0033] In another alternative embodiment of the second aspect, the device further includes:

[0034] The third acquisition module is used to acquire auxiliary information of the target electronic device when the preset string is not detected in the address information of the target electronic device;

[0035] The second processing module is used to add the address information and auxiliary information of the target electronic device to a preset corresponding table.

[0036] In another alternative embodiment of the second aspect, the device further includes:

[0037] The third processing module is used to match the auxiliary information of the target electronic device with a preset first database after obtaining the auxiliary information of the target electronic device, and before matching the auxiliary information of the target electronic device with a preset correspondence table, and to determine the category information of the target electronic device; the preset first database includes multiple different device model information and the category information corresponding to each device model information;

[0038] The second acquisition module is specifically used for:

[0039] If the target electronic device is determined to be a smart electronic device, the auxiliary information of the target electronic device is matched with a preset correspondence table; wherein, the address information of the smart electronic device is random address information.

[0040] In another alternative embodiment of the second aspect, the second acquisition module includes:

[0041] The third determining unit is used to determine the data information of the target electronic device from the hypertext transfer protocol information sent by the target electronic device;

[0042] The processing unit is used to match the data information of the target electronic device with a preset second database; the preset second database includes multiple different device data information connected to the routing device and the model information corresponding to each device data information;

[0043] The fourth determining unit is used to use the model information corresponding to the device data information connected to the routing device in the preset second database as auxiliary information of the target electronic device when the data information of the target electronic device is successfully matched with the preset second database.

[0044] In another alternative embodiment of the second aspect, the second acquisition module further includes:

[0045] The acquisition unit is used to obtain the hostname information of the target electronic device from the dynamic host configuration protocol information sent by the target electronic device;

[0046] The fifth determining unit is used to determine the model information of the target electronic device based on the hostname information of the target electronic device, and to use the model information of the target electronic device as auxiliary information of the target electronic device.

[0047] Thirdly, embodiments of this application provide a device identification apparatus, including a processor and a memory; the processor is connected to the memory; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the device identification method provided by the first aspect or any implementation of the first aspect of the embodiments of this application.

[0048] Fourthly, embodiments of this application provide a routing device, including the device identification device provided in the third aspect implementation.

[0049] Fifthly, embodiments of this application also provide a computer storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, can implement the device identification method provided by the first aspect or any implementation thereof of the embodiments of this application.

[0050] It is understood that the computer storage medium provided in the fifth aspect above is used to execute the device identification method provided in the first aspect or any implementation of the first aspect. Therefore, the beneficial effects it can achieve can be referred to the beneficial effects in the device identification method provided in the first aspect or any implementation of the first aspect, which will not be repeated here.

[0051] In this embodiment, after obtaining the address information of the target electronic device, it can be determined whether it is random address information. If it is determined to be random address information, the auxiliary information of the target electronic device can be obtained and matched with a preset correspondence table. If the matching degree of the auxiliary information is greater than or equal to the preset matching degree, the obtained address information can be added to the preset correspondence table. This can ensure that the routing device can still accurately and quickly identify the target electronic device after it is changed to random address information, and perform corresponding application identification and device identification functions. This can improve the security of electronic devices and ensure the normal user experience. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 This is a schematic diagram of the architecture of a device identification system provided in an embodiment of this application;

[0054] Figure 2 A flowchart illustrating a device identification method provided in an embodiment of this application;

[0055] Figure 3 This is a schematic diagram illustrating the effect of a preset correspondence table provided in an embodiment of this application;

[0056] Figure 4 A flowchart illustrating yet another device identification method provided in this application embodiment;

[0057] Figure 5 This is a schematic diagram illustrating the effect of a preset first database provided in an embodiment of this application;

[0058] Figure 6 This is a schematic diagram illustrating the effect of another preset correspondence table provided in the embodiments of this application;

[0059] Figure 7 This is a schematic diagram illustrating the effect of another preset correspondence table provided in the embodiments of this application;

[0060] Figure 8 This is a schematic diagram of the structure of a device identification device provided in an embodiment of this application;

[0061] Figure 9 This is a schematic diagram of the structure of a routing device provided in an embodiment of this application. Detailed Implementation

[0062] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0063] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0064] Please see Figure 1 , Figure 1 A schematic diagram of the architecture of a device identification system provided in an embodiment of this application is shown.

[0065] like Figure 1 As shown, the device identification system includes routing device 10 and electronic devices, wherein:

[0066] Routing device 10 can be a computer system or device that provides data conversion services between multiple networks, such as, but not limited to, routers and electronic devices that support hotspots. Taking router 10 as an example, the router can assign Internet Protocol (IP) addresses to electronic devices that want to connect to the router. These IP addresses can correspond to the Media Access Control (MAC) addresses of the electronic devices, and data can be sent or received to their respective corresponding electronic devices through different IP addresses. When an electronic device that has already connected to the router reconnects to the router, the router can accurately identify the electronic device through the MAC address it sends and execute corresponding application functions based on the data transmitted by the electronic device. The connection between the router and the electronic device can be wireless or wired.

[0067] The electronic device can be one or more electronic devices, and multiple electronic devices may include electronic device 20a, electronic device 20b, electronic device 20c, etc. The electronic device can connect to the routing device 10 to achieve data transmission between different electronic devices. Taking the routing device 10 as a router as an example, the electronic device can establish a connection with the router via wireless or wired connection. Possibly, when the electronic device is wirelessly connected to the router, the electronic device can open the wireless LAN settings, search for the router name to connect to wirelessly, and enter the corresponding router password to establish a connection. Possibly, when the electronic device is wiredly connected to the router, the electronic device can find the network corresponding to the router name in the network and Internet settings and enter the password to establish a connection.

[0068] The electronic devices involved in the embodiments of this application may be mobile phones, tablets, desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), routing devices, virtual reality devices, etc.

[0069] Please see Figure 2 , Figure 2 A flowchart illustrating a device identification method provided in an embodiment of this application is shown.

[0070] like Figure 2 As shown, this device identification method is applied to routing devices and includes:

[0071] Step 201: Obtain the address information of the target electronic device and determine whether the address information of the target electronic device is random address information.

[0072] Specifically, after establishing a connection with the target electronic device, the routing device can obtain the MAC address of the target electronic device and determine whether the MAC address is a generated random address.

[0073] Specifically, taking a router as the routing device and a wireless connection between the target electronic device and the router as an example, the user can find and enable Wi-Fi in the target electronic device's system settings to search for nearby Wi-Fi networks. When the target electronic device finds the name corresponding to the router in the Wi-Fi network, it can choose to establish a connection with that router. It's possible that when the target electronic device is connecting to the router for the first time, the user will need to enter the password corresponding to the router to complete the connection. It's also possible that when the target electronic device is not connecting to the router for the first time, it will automatically connect to the router when it enables Wi-Fi. However, if the target electronic device does not save the router password each time it connects to the router, it will still need to re-enter the router password to complete the connection when it finds the router's name.

[0074] Furthermore, after the router establishes a connection with the target electronic device, it obtains the MAC address sent by the target electronic device. It can then use this information, along with the saved address mappings, to determine if the target electronic device is a newly connected device. Specifically, the router can search the mappings of the MAC addresses of already connected electronic devices against their corresponding IP addresses to see if the obtained MAC address of the target electronic device exists. If not found, it indicates that the target electronic device is either a newly connected device or an device that has changed its MAC address; if found, it indicates that the target electronic device is an already connected device.

[0075] If it is determined that the MAC address of the target electronic device does not exist in the router's saved list of MAC addresses and corresponding IP addresses of connected electronic devices, it can be further determined whether the MAC address of the target electronic device is a generated random MAC address. It should be noted that the random MAC address is automatically generated by the electronic device already connected to the router; that is, after the electronic device establishes a connection with the router using its MAC address, it then re-establishes a connection with the router using the generated random MAC address.

[0076] Step 202: If the address information of the target electronic device is determined to be random address information, obtain the auxiliary information of the target electronic device and match the auxiliary information of the target electronic device with a preset correspondence table.

[0077] Specifically, the auxiliary information of the target electronic device is used to characterize the model information of the target electronic device. This model information may include, but is not limited to, the brand, model number, system version, etc.

[0078] Specifically, the preset mapping table includes multiple device address information connected to the routing device and corresponding auxiliary information for each device address. Specifically, after successfully connecting to each new electronic device for the first time, the routing device can obtain the MAC address of each new electronic device and its corresponding auxiliary information, and store them in the preset mapping table accordingly. For example, taking a router as an example, see the schematic diagram of the effect of a preset mapping table provided in this embodiment of the application shown in Figure 3. Figure 3 As shown, the preset mapping table can be viewed by logging into the client where the router is located. This table displays auxiliary information for the three devices currently connected to the router, their respective MAC addresses, and the IP addresses assigned to those MAC addresses. Specifically, the MAC address of the device with auxiliary information "Ipaid8" is 0C:EE:E6:FE:01:CF, and its assigned IP address is 192.168.3.103; the MAC address of the device with auxiliary information "Miipcam" is C4:6A:B7:09:59:08, and its assigned IP address is 192.168.3.105; and the MAC address of the device with auxiliary information "Huaweix10" is 34:60:B3:10:F6:1E, and its assigned IP address is 192.168.3.106. The preset correspondence table also displays the corresponding connection validity time for each device. For example, the validity time for the device with auxiliary information Ipaid8 is 00:38:48, the validity time for the device with auxiliary information Miipcam is 01:48:07, and the validity time for the device with auxiliary information Huaweix10 is 01:40:26.

[0079] Specifically, after determining that the MAC address of the target electronic device is a random MAC address, the routing device can obtain the auxiliary information of the target electronic device through the data information sent or received by the target electronic device, and match the obtained auxiliary information with the auxiliary information stored in the preset correspondence table of the routing device.

[0080] Step 203: If the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to any device address information connected to the routing device in the preset correspondence table is greater than or equal to the preset matching degree, add the address information of the target electronic device to the preset correspondence table.

[0081] Specifically, the routing device can match the auxiliary information of the target electronic device with any one of the auxiliary information in the preset correspondence table. When the matching degree is greater than or equal to the preset matching degree, it can determine that the target electronic device is an electronic device that has been connected to the routing device, and add the MAC address of the target electronic device to the MAC address corresponding to the auxiliary information of the target electronic device in the preset correspondence table.

[0082] It should be noted that the preset matching degree mentioned above can be set by the routing device by default. For example, the preset matching degree can be set to 100% by default, and the preset matching degree in this embodiment is not limited to 100%.

[0083] In this embodiment, after obtaining the address information of the target electronic device, it can be determined whether it is random address information. If it is determined to be random address information, the auxiliary information of the target electronic device can be obtained and matched with a preset correspondence table. If the matching degree of the auxiliary information is greater than or equal to the preset matching degree, the obtained address information can be added to the preset correspondence table. This can ensure that the routing device can still accurately and quickly identify the target electronic device after it is changed to random address information, and perform corresponding application identification and device identification functions. This can improve the security of electronic devices and ensure the normal user experience.

[0084] As one embodiment of this application, see [reference needed]. Figure 4 A flowchart illustrating another device identification method is shown.

[0085] like Figure 4 As shown, this device identification method is applied to routing devices and includes:

[0086] Step 401: Determine whether a preset string exists in the address information of the target electronic device.

[0087] Step 402: If a preset string is detected in the address information of the target electronic device, determine that the address information of the target electronic device is random address information.

[0088] Specifically, to better distinguish whether the target electronic device is already connected to the routing device, the string corresponding to the target electronic device's MAC address can be used to determine whether the MAC address is a random MAC address. Specifically, taking a router as an example, the router can determine whether the string at a preset location is a preset string based on the string corresponding to the target electronic device's MAC address. If the string at the preset location is detected as a preset string, the target electronic device's MAC address is then used as a random MAC address.

[0089] For example, the target electronic device's MAC address is 36:43:6E:6A:9A:09 (the MAC address is represented by 12 hexadecimal numbers). The router has a preset string where the second digit of the MAC address is 2, 6, A, or E. That is, when the router detects that the second digit of the target electronic device's MAC address is any one of 2, 6, A, or E, it can determine that the target electronic device's MAC address is a random MAC address.

[0090] Step 403: Obtain the auxiliary information of the target electronic device and match the auxiliary information of the target electronic device with a preset correspondence table.

[0091] Specifically, step 403 is the same as step 202, and will not be repeated here.

[0092] Step 404: If the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to any device address information connected to the routing device in the preset correspondence table is greater than or equal to the preset matching degree, add the address information of the target electronic device to the preset correspondence table.

[0093] Specifically, step 404 is the same as step 203, and will not be repeated here.

[0094] Step 405: If the preset string is not found in the address information of the target electronic device, obtain the auxiliary information of the target electronic device.

[0095] Step 406: Add the address information and auxiliary information of the target electronic device to the preset corresponding table.

[0096] Specifically, when the routing device detects that the string corresponding to the MAC address of the target electronic device does not exist in the preset string, it can treat the target electronic device as the electronic device that is being connected for the first time. Then, it can further obtain the auxiliary information of the target electronic device and add it to the preset correspondence table along with the MAC address, so that the routing device can quickly identify it when the electronic device generates a random MAC address and connects to the routing device.

[0097] As another embodiment of this application, after obtaining the auxiliary information of the target electronic device and before matching the auxiliary information of the target electronic device with a preset correspondence table, the method further includes:

[0098] The auxiliary information of the target electronic device is matched with a preset first database to determine the category information of the target electronic device; the preset first database includes multiple different device model information and the category information corresponding to each device model information.

[0099] Matching the auxiliary information of the target electronic device with a preset mapping table, including:

[0100] If the target electronic device is determined to be a smart electronic device, the auxiliary information of the target electronic device is matched with a preset correspondence table.

[0101] Specifically, after determining that the MAC address of the target electronic device is a random MAC address, there may also be some MAC addresses of non-smart electronic devices among these random MAC addresses. These non-smart electronic devices' MAC addresses meet the conditions for being judged as random MAC addresses, for example, the string corresponding to their MAC addresses exists in a preset string. Understandably, non-smart electronic devices cannot generate random MAC addresses. To more accurately distinguish between smart electronic devices that can generate random MAC addresses and non-smart electronic devices whose MAC addresses meet the criteria for being judged as random MAC addresses, the routing device can, after obtaining the auxiliary information of the target electronic device, match the auxiliary information of the target electronic device with a preset first database to determine the category of the target electronic device. If the target electronic device is determined to be a smart device based on its category, the auxiliary information of the target electronic device is then matched with a preset correspondence table.

[0102] Specifically, taking a router as an example, please refer to... Figure 5 The illustration shows the effect of a preset first database provided by an embodiment of this application. Figure 5 As shown, the preset first database can be viewed by logging into the client where the router is located. This preset first database includes auxiliary information for the three devices currently connected to the router, their respective device categories, and whether each belongs to a smart electronic device. Specifically, when the router obtains the auxiliary information of the target electronic device as "Ipaid8", it can match it with the preset first database to determine the device category as "tablet", thus identifying the target electronic device as a smart electronic device. When the router obtains the auxiliary information of the target electronic device as "Miipcam", it can match it with the preset first database to determine the device category as "camera", thus identifying the target electronic device as not a smart electronic device. When the router obtains the auxiliary information of the target electronic device as "Huaweix10", it can match it with the preset first database to determine the device category as "mobile phone", thus identifying the target electronic device as a smart electronic device. It is understood that the embodiments of this application are not limited to the auxiliary information of the electronic devices mentioned above.

[0103] As another embodiment of this application, obtaining auxiliary information of the target electronic device includes:

[0104] Determine the data information of the target electronic device from the Hypertext Transfer Protocol information sent by the target electronic device;

[0105] The data information of the target electronic device is matched with a preset second database; wherein, the preset second database may include multiple different device data information connected to the routing device and the model information corresponding to each device data information;

[0106] If the data information of the target electronic device is successfully matched with the preset second database, the model information corresponding to the device data information connected to the routing device in the preset second database is used as auxiliary information of the target electronic device.

[0107] Specifically, after establishing a connection with the target electronic device, the routing device can forward the data sent by the target electronic device to other devices. When the data sent by the target electronic device is in the form of Hypertext Transfer Protocol (HTTP), the routing device can obtain data information from the user-agent information of the HTTP protocol according to the configuration file preset in the data transmission channel, and match the data information with a preset second database. If the match is successful, the model information corresponding to the data information in the preset second database is used as auxiliary information of the target electronic device.

[0108] As another embodiment of this application, obtaining auxiliary information of the target electronic device may further include:

[0109] Obtain the hostname information of the target electronic device from the Dynamic Host Configuration Protocol (DHCP) information sent by the target electronic device;

[0110] The model information of the target electronic device is determined based on its hostname information, and this model information is used as auxiliary information for the target electronic device.

[0111] Specifically, after the routing device establishes a connection with the target electronic device, the target electronic device can request an IP address from the routing device via Dynamic Host Configuration Protocol (DCHP). The routing device can then obtain the hostname information from the DCHP header sent by the target electronic device. The hostname information obtained by the routing device varies depending on the brand of the electronic device. For example, taking a router as an example, if the electronic device wirelessly connected to the router is a Huawei device, the hostname information obtained by the router might be the device's specific model number plus a string. If the electronic device wirelessly connected to the router is an Apple device, the hostname information obtained by the router might be the device's specific model number. If the electronic device wirelessly connected to the router is a Xiaomi device, the hostname information obtained by the router might be the device's specific model number plus a username.

[0112] As another embodiment of this application for obtaining auxiliary information about the target electronic device, when the target electronic device supports the Multicast Domain Name System (MDNS) protocol, it can also send MDNS data packets to the routing device. The routing device can obtain the device model of the target electronic device based on the domain name information in the MDNS data packet. The MDNS data packet is not limited to including the domain name, multicast address, device model, IP address, etc. of the target electronic device.

[0113] As another embodiment of obtaining auxiliary information of the target electronic device in this application, the routing device can also obtain the device identifier of the target electronic device based on the broadcast sent by the connected target electronic device. For example, taking the routing device as a router, when the target electronic device is a Huawei series device, after the target electronic device connects to the router, it will send a User Datagram Protocol (UDP) broadcast to any device connected to the router. After receiving the UDP broadcast sent by the target electronic device, the router can extract the device UUID information from the UDP broadcast and use the device UUID information as the device identifier of the Huawei series electronic device. That is, when the router extracts the device UUID information from the broadcast sent by the target electronic device, it can determine that the target electronic device is a Huawei series electronic device.

[0114] As another embodiment of this application for obtaining auxiliary information of the target electronic device, the routing device can also obtain the device model of the target device from a request issued by an application running on the target electronic device. For example, when the target electronic device uses an application, the application issues an acquisition request, and the routing device can extract the device model from the acquisition request received by the application. If the routing device extracts uid information or m2 information from the acquisition request, it can use the device model information contained in the uid information or m2 information as the device model of the target electronic device.

[0115] In conjunction with the above embodiments for obtaining auxiliary information of the target electronic device, please refer to... Figure 6 , Figure 6 This illustration shows the effect of another preset correspondence table provided in an embodiment of this application. For example... Figure 6As shown, the preset mapping table can be viewed by logging into the client where the router is located. The preset mapping table displays the MAC addresses of the three devices currently connected to the router, their respective hostnames, domain names, and device types. The hostname, domain name, and device type information can be used to characterize the electronic devices. Specifically, the hostname, domain name, and device type information of the electronic device with MAC address 0C:EE:E6:FE:01:CF are Ipad, Ipad, Ipad8, respectively; the hostname, domain name, and device type information of the electronic device with MAC address C4:6A:B7:09:59:08 are Miipcam, Miipcam, Miipcam, respectively; and the hostname, domain name, and device type information of the electronic device with MAC address 34:60:B3:10:F6:1E are Huawei, Huawei, Huaweix10, respectively.

[0116] Combination Figure 6 You can also refer to Figure 7 The illustration shows the effect of another preset correspondence table provided in an embodiment of this application. For example... Figure 7 As shown, the hostname, domain name, and device type information of the Huawei, Huawei, and Huaweix10 electronic devices are respectively 34:60:B3:10:F6:1E and 3E:43:6E:6A:9A:09. This indicates that the MAC address of the electronic device has changed to a random MAC address, and 3E:43:6E:6A:9A:09 is the current MAC address of the electronic device.

[0117] Please see Figure 8 , Figure 8 An embodiment of this application is shown, which provides a device identification device.

[0118] like Figure 8 As shown, the device identification device 800 may include at least a first acquisition module 801, a second acquisition module 802, and a first processing module 803, wherein:

[0119] The first acquisition module 801 is used to acquire the address information of the target electronic device and determine whether the address information of the target electronic device is random address information;

[0120] The second acquisition module 802 is used to acquire auxiliary information of the target electronic device when the address information of the target electronic device is determined to be random address information, and to match the auxiliary information of the target electronic device with a preset correspondence table; the auxiliary information of the target electronic device is used to characterize the model information of the target electronic device; the preset correspondence table includes multiple device address information connected to the routing device and auxiliary information corresponding to each device address information;

[0121] The first processing module 803 is used to add the address information of the target electronic device to the preset correspondence table when the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to any device address information connected to the routing device in the preset correspondence table is greater than or equal to the preset matching degree.

[0122] In some possible embodiments, the first acquisition module 801 includes:

[0123] The judgment unit is used to determine whether a preset string exists in the address information of the target electronic device;

[0124] The first determining unit is used to determine that the address information of the target electronic device is random address information when a preset string is detected in the address information of the target electronic device.

[0125] In some possible embodiments, the device identification device 800 further includes:

[0126] The third acquisition module is used to acquire auxiliary information of the target electronic device when the preset string is not detected in the address information of the target electronic device;

[0127] The second processing module is used to add the address information and auxiliary information of the target electronic device to a preset corresponding table.

[0128] In some possible embodiments, the device identification device 800 further includes:

[0129] The third processing module is used to match the auxiliary information of the target electronic device with a preset first database after obtaining the auxiliary information of the target electronic device, and before matching the auxiliary information of the target electronic device with a preset correspondence table, and to determine the category information of the target electronic device; the preset first database includes multiple different device model information and the category information corresponding to each device model information;

[0130] The second acquisition module 802 is specifically used for:

[0131] If the target electronic device is determined to be a smart electronic device, the auxiliary information of the target electronic device is matched with a preset correspondence table; wherein, the address information of the smart electronic device is random address information.

[0132] In some possible embodiments, the second acquisition module 802 includes:

[0133] The third determining unit is used to determine the data information of the target electronic device from the hypertext transfer protocol information sent by the target electronic device;

[0134] The processing unit is used to match the data information of the target electronic device with a preset second database; the preset second database includes multiple different device data information connected to the routing device and the model information corresponding to each device data information;

[0135] The fourth determining unit is used to use the model information corresponding to the device data information connected to the routing device in the preset second database as auxiliary information of the target electronic device when the data information of the target electronic device is successfully matched with the preset second database.

[0136] In some possible embodiments, the second acquisition module 802 further includes:

[0137] The acquisition unit is used to obtain the hostname information of the target electronic device from the dynamic host configuration protocol information sent by the target electronic device;

[0138] The fifth determining unit is used to determine the model information of the target electronic device based on the hostname information of the target electronic device, and to use the model information of the target electronic device as auxiliary information of the target electronic device.

[0139] In this embodiment, after obtaining the address information of the target electronic device, it can be determined whether it is random address information. If it is determined to be random address information, the auxiliary information of the target electronic device can be obtained and matched with a preset correspondence table. If the matching degree of the auxiliary information is greater than or equal to the preset matching degree, the obtained address information can be added to the preset correspondence table. This can ensure that the routing device can still accurately and quickly identify the target electronic device after it is changed to random address information, and perform corresponding application identification and device identification functions. This can improve the security of electronic devices and ensure the normal user experience.

[0140] Please see Figure 9 , Figure 9 A schematic diagram of the structure of a routing device provided in an embodiment of this application is shown.

[0141] like Figure 9As shown, the routing device 900 may include: at least one processor 901, at least one network interface 904, a user interface 903, a memory 905, and at least one communication bus 902.

[0142] The communication bus 902 can be used to realize the connection and communication of the above components.

[0143] The user interface 903 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0144] Among them, the network interface 904 can optionally include a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0145] The processor 901 may include one or more processing cores. The processor 901 connects to various parts within the electronic device 900 using various interfaces and lines. It executes instructions, programs, code sets, or instruction sets stored in the memory 905, and calls data stored in the memory 905 to perform various functions and process data within the routing device 900. Optionally, the processor 901 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 901 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 901 and may be implemented as a separate chip.

[0146] The memory 905 may include RAM or ROM. Optionally, the memory 905 may include a non-transitory computer-readable medium. The memory 905 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 905 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 905 may also be at least one storage device located remotely from the aforementioned processor 901. Figure 9 As shown, the memory 905, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device identification application.

[0147] Specifically, the processor 901 can be used to call the device identifier application stored in the memory 905 and perform the following operations:

[0148] Obtain the address information of the target electronic device and determine whether the address information of the target electronic device is random address information;

[0149] If the address information of the target electronic device is determined to be random, the auxiliary information of the target electronic device is obtained and matched with a preset correspondence table. The auxiliary information of the target electronic device is used to characterize the model information of the target electronic device. The preset correspondence table includes multiple device address information connected to the routing device and the auxiliary information corresponding to each device address information.

[0150] If the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to any device address information connected to the routing device in the preset correspondence table is greater than or equal to the preset matching degree, the address information of the target electronic device is added to the preset correspondence table.

[0151] In some possible embodiments, when the processor 901 determines whether the address information of the target electronic device is random address information, it specifically executes the following:

[0152] Determine if a preset string exists in the address information of the target electronic device;

[0153] If a preset string is detected in the address information of the target electronic device, the address information of the target electronic device is determined to be random address information.

[0154] In some possible embodiments, processor 901 also performs:

[0155] If the target electronic device's address information does not contain a preset string, obtain the target electronic device's auxiliary information;

[0156] Add the address information and auxiliary information of the target electronic device to the preset corresponding table.

[0157] In some possible embodiments, after the processor 901 obtains the auxiliary information of the target electronic device, and before matching the auxiliary information of the target electronic device with a preset correspondence table, it is also used to perform:

[0158] The auxiliary information of the target electronic device is matched with a preset first database to determine the category information of the target electronic device; the preset first database includes multiple different device model information and the category information corresponding to each device model information.

[0159] When processor 901 matches the auxiliary information of the target electronic device with a preset correspondence table, it performs the following:

[0160] If the target electronic device is determined to be a smart electronic device, the auxiliary information of the target electronic device is matched with a preset correspondence table; wherein, the address information of the smart electronic device is random address information.

[0161] In some possible embodiments, when the processor 901 acquires auxiliary information of the target electronic device, it performs the following:

[0162] Determine the data information of the target electronic device from the Hypertext Transfer Protocol information sent by the target electronic device;

[0163] The data information of the target electronic device is matched with a preset second database; the preset second database includes data information of multiple different devices connected to the routing device and model information corresponding to each device data information;

[0164] If the data information of the target electronic device is successfully matched with the preset second database, the model information corresponding to the device data information connected to the routing device in the preset second database is used as auxiliary information of the target electronic device.

[0165] In some possible embodiments, when the processor 901 acquires auxiliary information of the target electronic device, it performs the following:

[0166] Obtain the hostname information of the target electronic device from the Dynamic Host Configuration Protocol (DHCP) information sent by the target electronic device;

[0167] The model information of the target electronic device is determined based on its hostname information, and this model information is used as auxiliary information for the target electronic device.

[0168] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform the above-described instructions. Figure 2 or Figure 4 One or more steps in the illustrated embodiment. If the constituent modules of the above-described routing device are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0169] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions 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 through the computer-readable storage medium. 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., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).

[0170] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and its implementation can be combined arbitrarily.

[0171] The embodiments described above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications and improvements made by those skilled in the art to the technical solutions of this application without departing from the spirit of this application should fall within the protection scope defined by the claims of this application.

Claims

1. A device identification method, the method being applied to a routing device, characterized in that, include: Obtain the address information of the target electronic device and determine whether the address information of the target electronic device is random address information; If the address information of the target electronic device is determined to be random address information, the auxiliary information of the target electronic device is obtained and matched with a preset correspondence table; the auxiliary information of the target electronic device is used to characterize the model information of the target electronic device. The preset correspondence table includes multiple device address information connected to the routing device and auxiliary information corresponding to each device address information; If the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to any device address information connected to the routing device in the preset correspondence table is greater than or equal to the preset matching degree, the address information of the target electronic device is added to the preset correspondence table.

2. The method according to claim 1, characterized in that, The step of determining whether the address information of the target electronic device is random address information includes: Determine whether a preset string exists in the address information of the target electronic device; If the preset string is detected in the address information of the target electronic device, the address information of the target electronic device is determined to be random address information.

3. The method according to claim 2, characterized in that, The method further includes: If the preset string is not found in the address information of the target electronic device, the auxiliary information of the target electronic device is obtained; Add the address information and auxiliary information of the target electronic device to the preset correspondence table.

4. The method according to claim 1, characterized in that, After obtaining the auxiliary information of the target electronic device, and before matching the auxiliary information of the target electronic device with a preset correspondence table, the method further includes: The auxiliary information of the target electronic device is matched with a preset first database to determine the category information of the target electronic device; the preset first database includes multiple different device model information and category information corresponding to each device model information. The step of matching the auxiliary information of the target electronic device with a preset correspondence table includes: If the category information of the target electronic device is determined to be a smart electronic device, the auxiliary information of the target electronic device is matched with a preset correspondence table; wherein, the address information of the smart electronic device is random address information.

5. The method according to claim 4, characterized in that, The step of acquiring auxiliary information about the target electronic device includes: The data information of the target electronic device is determined from the hypertext transfer protocol information sent by the target electronic device; The data information of the target electronic device is matched with a preset second database; the preset second database includes multiple different device data information connected to the routing device and model information corresponding to each device data information. If the data information of the target electronic device is successfully matched with the preset second database, the model information corresponding to the device data information connected to the routing device in the preset second database is used as auxiliary information of the target electronic device.

6. The method according to claim 4 or 5, characterized in that, The step of acquiring auxiliary information about the target electronic device includes: Obtain the hostname information of the target electronic device from the Dynamic Host Configuration Protocol information sent by the target electronic device; The model information of the target electronic device is determined based on the hostname information of the target electronic device, and the model information of the target electronic device is used as auxiliary information of the target electronic device.

7. A device identification apparatus, said apparatus being applied to routing equipment, characterized in that, include: The first acquisition module is used to acquire the address information of the target electronic device and determine whether the address information of the target electronic device is random address information; The second acquisition module is used to acquire auxiliary information of the target electronic device when it is determined that the address information of the target electronic device is random address information, and to match the auxiliary information of the target electronic device with a preset correspondence table; the auxiliary information of the target electronic device is used to characterize the model information of the target electronic device. The preset correspondence table includes multiple device address information connected to the routing device and auxiliary information corresponding to each device address information; The first processing module is used to add the address information of the target electronic device to the preset correspondence table when the matching degree between the auxiliary information of the target electronic device and the auxiliary information corresponding to any device address information connected to the routing device in the preset correspondence table is greater than or equal to the preset matching degree.

8. The apparatus according to claim 7, characterized in that, The first acquisition module includes: The judgment unit is used to determine whether a preset string exists in the address information of the target electronic device; The first determining unit is configured to determine that the address information of the target electronic device is random address information when the preset string is detected in the address information of the target electronic device.

9. The apparatus according to claim 8, characterized in that, The device further includes: The third acquisition module is used to acquire auxiliary information of the target electronic device when the preset string is not detected in the address information of the target electronic device; The second processing module is used to add the address information and auxiliary information of the target electronic device to the preset correspondence table.

10. The apparatus according to claim 7, characterized in that, The device further includes: The third processing module is used to, after obtaining the auxiliary information of the target electronic device, before matching the auxiliary information of the target electronic device with a preset first database and determining the category information of the target electronic device before matching the auxiliary information of the target electronic device with a preset correspondence table; the preset first database includes multiple different device model information and category information corresponding to each device model information. The second acquisition module is specifically used for: If the category information of the target electronic device is determined to be a smart electronic device, the auxiliary information of the target electronic device is matched with a preset correspondence table; wherein, the address information of the smart electronic device is random address information.

11. The apparatus according to claim 10, characterized in that, The second acquisition module includes: The third determining unit is used to determine the data information of the target electronic device from the hypertext transfer protocol information sent by the target electronic device; The processing unit is used to match the data information of the target electronic device with a preset second database; the preset second database includes multiple different device data information connected to the routing device and model information corresponding to each device data information. The fourth determining unit is used to, when the data information of the target electronic device is successfully matched with the preset second database, use the model information corresponding to the device data information connected to the routing device in the preset second database as auxiliary information of the target electronic device.

12. The apparatus according to claim 10 or 11, characterized in that, The second acquisition module also includes: The acquisition unit is used to acquire the hostname information of the target electronic device from the dynamic host configuration protocol information sent by the target electronic device; The fifth determining unit is used to determine the model information of the target electronic device based on the hostname information of the target electronic device, and to use the model information of the target electronic device as auxiliary information of the target electronic device.

13. A device identification apparatus, characterized in that, This includes the processor, memory, and communication interface; The processor is connected to the memory and the communication interface; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading executable program code stored in the memory, for use in performing the method of any one of claims 1-6.

14. A routing device, characterized in that, The routing device includes the device identification device as described in claim 13.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.