Device identification method, device, computer readable storage medium, and electronic device

By obtaining the network identification and network port transmission status changes of the target device, and using the machine learning model to identify the device type, it solves the problems of low device identification efficiency and poor accuracy in the existing technology, reduces false alarms, and improves user experience.

CN114513399BActive Publication Date: 2024-09-24RUIJIE NETWORKS CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202111667337.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-09-24
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The low efficiency and poor accuracy of device identification in the existing technology causes users to receive invalid alarms in the cloud service platform, which increases maintenance workload and affects user experience.

Method used

By obtaining the network identification of the target device and the network port transmission status changes within the predetermined time window, the device type is determined, and machine learning models such as random forest classifiers are used for training and identification to avoid false alarms.

Benefits of technology

It improves the accuracy of device identification, reduces user maintenance workload, and improves user experience using cloud services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114513399B
    Figure CN114513399B
Patent Text Reader

Abstract

The present application discloses a device identification method, apparatus, system and electronic device. The method includes: obtaining a network identification of a target device; obtaining a change in the transmission state of a network port of the target device within a predetermined time window; and determining the device type of the target device according to the change in the transmission state of the network port of the target device. The present application can identify the device type by using the change in the transmission state of the network port of the target device as an identification feature, thereby avoiding the problem in the prior art that the normal state of the target device is mistakenly identified as an abnormal state and causes an erroneous alarm due to the inability to distinguish the type of the connected target device, saving the workload of user maintenance and improving the user experience of using cloud services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a device identification method, apparatus, computer-readable storage medium, and electronic device. Background Art

[0002] With the development of network technology, people can already use network-based cloud service technology in their daily life and work. For example, multiple terminals can be connected together through the network to form a network-based network cloud platform system. In such a platform system, the management of the status of each terminal is one of the most important tasks for the operation and maintenance of the entire platform.

[0003] For example, in such a cloud service platform system, a personal computer PC device can be connected to a switch by wire and finally access the network. Such personal computer PC devices require special specialized management in the management service of the platform due to their unique characteristics. For example, the uplink switch port of the PC device often generates an alarm that the negotiation rate drops to 10M, but the alarm actually occurs because the PC and the switch drop to 10M after negotiation, and no abnormal conditions such as equipment or network cables occur. Therefore, if such an "invalid" alarm is issued to the user during management, it will cause trouble to the user and deteriorate the user's experience. Summary of the invention

[0004] The embodiments of the present application provide a device identification method, apparatus, computer-readable storage medium, and electronic device to solve the defects of the prior art that rely on manual identification with low efficiency and poor accuracy.

[0005] To achieve the above object, the present application provides a device identification method, including:

[0006] Get the network ID of the target device;

[0007] Acquiring a transmission status change of a network port of the target device within a predetermined time window;

[0008] The device type of the target device is determined according to a change in the transmission state of the network port of the target device.

[0009] The present application also provides a device identification apparatus, including:

[0010] A first acquisition module, used to acquire a network identifier of a target device;

[0011] A second acquisition module, used to acquire a transmission state change of a network port of the target device within a predetermined time window;

[0012] The determination module is used to determine the device type of the target device according to the transmission state change of the network port of the target device.

[0013] An embodiment of the present application further provides a computer-readable storage medium on which a computer program executable by a processor is stored, wherein when the program is executed by the processor, the device identification method provided in the embodiment of the present application is implemented.

[0014] The present application also provides an electronic device, including:

[0015] Memory, used to store programs;

[0016] A processor is used to run the program stored in the memory to execute the device identification method provided in the embodiment of the present application.

[0017] The device identification method, apparatus, computer-readable storage medium and electronic device provided in the embodiments of the present application obtain the network identification of the target device;

[0018] Acquiring a transmission status change of a network port of the target device within a predetermined time window;

[0019] The device type of the target device is determined according to a change in the transmission state of the network port of the target device.

[0020] Therefore, the device identification method and apparatus, computer-readable storage medium and electronic device of the embodiments of the present application obtain the network identification of the target device and obtain the transmission status change of the network port of the target device within a predetermined time window, so as to determine the device type of the target device according to the transmission status change of the network port of the target device. Therefore, the device type can be identified by using the transmission status change of the network port of the target device as an identification feature, thereby avoiding the problem in the prior art that the normal state of the target device is mistakenly identified as an abnormal situation and causes an error alarm due to the inability to distinguish the type of the connected target device, saving the user's maintenance workload and improving the user's experience of using cloud services.

[0021] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0023] Figure 1 A schematic diagram of an application scenario of the device identification solution provided in an embodiment of the present application;

[0024] Figure 2 A flowchart of an embodiment of a device identification method provided by the present application;

[0025] Figure 3 A schematic diagram of the structure of an embodiment of a device identification apparatus provided in this application;

[0026] Figure 4 A schematic diagram of the structure of an electronic device embodiment provided in this application. DETAILED DESCRIPTION

[0027] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0028] The solution provided in the embodiments of the present application can be applied to any device or system with network communication capabilities, etc. Figure 1 A schematic diagram of an application scenario of the device identification solution provided in an embodiment of the present application, Figure 1 The scenario shown is only one example of a scenario to which the technical solution of the present application can be applied.

[0029] With the development of network technology, people can already use network-based cloud service technology in their daily life and work. For example, multiple terminals can be connected together through the network to form a network-based network cloud platform system. In such a platform system, the management of the status of each terminal is one of the most important tasks for the operation and maintenance of the entire platform.

[0030] For example, in such a cloud service platform system, a personal computer PC device can be connected to a switch by wire and finally access the network. Such personal computer PC devices require special specialized management in the management service of the platform due to their unique characteristics. For example, the uplink switch port of the PC device often generates an alarm that the negotiation rate drops to 10M, but the alarm actually occurs because the PC and the switch drop to 10M after negotiation, and no abnormal conditions such as equipment or network cables occur. Therefore, if such an "invalid" alarm is issued to the user during management, it will cause trouble to the user and deteriorate the user's experience.

[0031] For example, Figure 1 In the scenario shown in , two PCs (personal computers) and two mobile terminals can be connected to a switch, and connected to a cloud service platform through the switch, so that the cloud service platform can manage these terminals. During the management process, the cloud service platform can obtain the status of the terminal from the log and issue an alarm to the user based on whether the status is abnormal. For example, as mentioned above, if the cloud service platform detects that the connection rate of a terminal has suddenly dropped significantly, for example, it suddenly dropped to 10M, then the management module of the cloud service platform can regard this situation as an abnormal situation and issue a reminder or alarm to the user.

[0032] However, such a sudden drop in network rate does not mean an abnormal situation for all terminals. For example, as mentioned above, the PC device will directly drop the transmission rate to 10M after negotiation with the switch during normal operation, but the management module of the cloud service platform will regard the sudden drop in the transmission rate of the PC device as an abnormal situation, and therefore determine that such a sudden drop in the network transmission rate of the PC device is due to abnormal situations such as unplugging or breaking the network cable or damage to the PC device. Therefore, the management module of the cloud service platform will issue an alarm to the user based on the abnormal situation. However, since this situation is not caused by the abnormality of the PC device, even if the user checks the PC device according to the alarm of the cloud service platform, no abnormal situation will be found, so that the alarm will become a "wolf cry" alarm for the user, which not only increases the user's maintenance workload for the PC device, but also greatly affects the user's experience.

[0033] To this end, the present application proposes a device identification solution, which can be used in, for example, Figure 1 The cloud service platform shown in the figure identifies whether the connected terminal device is a PC device, thereby avoiding the management module from thinking that an abnormal situation has occurred and issuing an erroneous alarm due to the characteristics of the PC device itself.

[0034] Specifically, in e.g. Figure 1In the scenario shown in , the management module can obtain the network identification of the target device. In an embodiment of the present application, the target device can be a PC device connected to the cloud service platform on the network through a switch, or it can be other devices such as a mobile terminal device. Therefore, the management module can obtain the network identification of these connected target devices in real time, and obtain the transmission state change of the network port of the target device within a predetermined time window. For example, for a PC device, its network transmission state at the port directly connected to the switch will have a specific change feature, that is, a series of changes will occur within a certain period of time, and such changes are unique to PC devices. For example, when a PC device using the Windows operating system is inactive for a long time, it can enter a sleep state. At this time, the PC device does not have power outages or network cable abnormalities, but due to the sleep state, the PC negotiates with the switch according to the power saving strategy to change the network transmission speed at the port at the switch to the lowest rate. However, other devices such as mobile terminals will not experience this change phenomenon. Therefore, the change can be used as a unique feature of a PC device in a networked state, and the switch of the cloud service platform can use the series of changes in the network transmission state within a certain period of time as the identification feature of the PC device to determine that the target device with this feature is a PC device.

[0035] For example, the current MACC (Mobile Access Control Cloud) can manage a large number of networks, and whenever a new terminal is associated with the network managed by MACC, the network device will record port history information, terminal MAC address, DHCP (Dynamic Host Configuration Instance) OPTION information, port traffic information, port online time and other information. This information can be stored in the cloud database as operation and maintenance information, and can also be used as the main data source for the management module to identify the target device.

[0036] In addition, based on experience and manual confirmation, some PC terminals are pre-confirmed and marked. And the information of these confirmed PC terminals can be used as training data for the recognition model used by the device solution according to the embodiment of the present application, and used to train the target device recognition model.

[0037] For example, as described above, the network status change of a PC device at a port connected to a switch has a series of obvious characteristics, which can be used as an important feature for determining whether the target device is a PC device.

[0038] For example, the network status change data of the switch port recorded by the MACC can be shown in the following table:

[0039]

[0040] Therefore, in the embodiment of the present application, the following data can be obtained after processing the information in the above table:

[0041]

[0042] From the above data, it can be seen that when the rate information of the network status is a change sequence from 1000M to unknown and then to 10M, it can be considered that the target device connected to the port is likely to be a PC device. Therefore, in the embodiment of the present application, this feature can be used as a device identification feature to identify the target device, or this feature can be introduced into the training sample as a strong feature to train the recognition model, and then use the trained model to identify the target device.

[0043] In addition, the MACC may also store dynamic host configuration instance option information, such as DHCP Option 12, DHCP Option 55, and DHCP Option 60.

[0044] DHCP Option12 may include a device name, such as fields such as ['pc', 'desktop', 'win'], and the data may be used as training data to train the device recognition model. In addition, MACC may also record the mac information of the terminal connected to the port, such as 84a9.3e5e.xxxx, where the 84a9.3e part is the device manufacturer. Therefore, in the embodiment of the present application, the information may also be used as auxiliary judgment information to help determine the type of the target device. For example, the information indicates that the manufacturer of the device is a common PC manufacturer, and combined with the change characteristics, it is judged that the target device is also a PC device, then it can be concluded that the probability that the target device is a PC device is greater.

[0045] In addition, the control module can also assist in determining the type of the target device based on the time when the target device is connected to the port recorded at the switch, that is, the time when the device is connected to the network through the switch as the device online time. For example, the time when a PC device goes online every day has a certain regularity. Therefore, the control module can determine whether the target device online time has regularity by dividing the time into several intervals, such as [[0:8], [9:12], [13:14], [14:18], [19:24]], and mapping the target device online time obtained from the switch to the above time intervals. A target device with regularity may be a PC device.

[0046] In addition, the embodiments of the present application can use various machine learning models as recognition models when identifying target devices, and use the identified data in the above-mentioned data source as training data to train the recognition model, so that the trained model can be used for device identification.

[0047] For example, in the embodiment of the present application, a random forest classifier can be used as a control module for a classification model for device identification. For example, the model can be trained based on the set loss function, optimizer type and evaluation index for the training data obtained from the above data source. The training set includes two parts, namely, a feature matrix and a terminal type identifier. The terminal type is used as the classification target, and the feature matrix is ​​used for training, and the classification model is continuously improved until the accuracy reaches the preset evaluation index, thereby obtaining a trained model.

[0048] Therefore, when the control module uses the trained model for device identification, it can input the network status change data of the target device recorded at the above-mentioned switch, for example, into the random forest model trained as above, and use the model to calculate the probability that the target device belongs to various predetermined device types, so that the category with the highest calculated probability can be used as the result of device identification, that is, the type of the target device is determined to be the type with the highest calculated probability.

[0049] The device identification scheme of the embodiment of the present application obtains the network identification of the target device and obtains the transmission state change of the network port of the target device within a predetermined time window, so that the device type of the target device can be determined according to the transmission state change of the network port of the target device. Therefore, the device type can be identified by using the transmission state change of the network port of the target device as an identification feature, avoiding the problem in the prior art of misidentifying the normal state of the target device as an abnormal situation and causing false alarms due to the inability to distinguish the type of the connected target device, saving the user's maintenance workload and improving the user experience of using cloud services.

[0050] Figure 2 This is a flow chart of an embodiment of the device identification method provided by this application. Figure 2 As shown, the device identification method may include the following steps:

[0051] S201, obtaining a network identifier of a target device;

[0052] In step S201, the network identification of the target device can be obtained. In the embodiment of the present application, the target device can be a PC device connected to the cloud service platform on the network through a switch or other devices such as a mobile terminal device. Therefore, the network identifications of these connected target devices can be obtained in real time, so as to understand the various devices currently connected to the network.

[0053] S202: Acquire a transmission status change of a network port of a target device within a predetermined time window.

[0054] In step S202, the transmission state change of the network port of the target device within the predetermined time window can be further obtained. For example, for a PC device, its network transmission state at the port directly connected to the switch will have specific change characteristics, that is, a series of changes will occur within a certain period of time, and such changes are unique to the PC device. For example, when a PC device using the Windows operating system is inactive for a long time, it can enter a sleep state. At this time, the PC device does not have power outages or network cable abnormalities, but due to the sleep state, the PC negotiates with the switch according to the power saving strategy to change the network transmission speed at the port of the switch to the lowest rate. However, this change phenomenon will not occur in other devices such as mobile terminals.

[0055] S203: Determine the device type of the target device according to the change in the transmission state of the network port of the target device.

[0056] In step S203, the network status change obtained in step S202 can be used as the identification feature of the target device to determine the category of the target device. For example, as mentioned above, a PC device will have a unique feature of network speed change in normal use. Therefore, in step S203, the change obtained in step S202 can be used as a unique feature of a PC device in a networked state, and a series of changes in the network transmission state within a certain period of time can be used as the identification feature of the PC device to determine that the target device with this feature is a PC device.

[0057] For example, as described above, the network status change of a PC device at a port connected to a switch has a series of obvious characteristics, which can be used as an important feature for determining whether the target device is a PC device.

[0058] For example, in step S202, the rate information of the network status of the target device can be obtained as a change sequence from 1000M to unknown and then to 10M, and in step S203, it can be judged based on the change sequence that the change sequence conforms to the change characteristics of the network transmission rate of the PC device, so it can be considered that the probability that the target device connected to the port is a PC device is high. Therefore, in the embodiment of the present application, the feature can be used as a device identification feature to perform identification of the target device, or the feature can be introduced into the training sample as a strong feature to train the identification model, and then use the trained model to identify the target device.

[0059] For example, in step S202, the network transmission state change within the predetermined time window can be obtained. The predetermined window may include a first moment, a second moment, and a third moment that are sequential in time, and there is a time interval between the first moment, the second moment, and the third moment. Therefore, the network transmission states of these three moments obtained in step S202 can constitute a network transmission state change sequence. And in step S203, it can be determined whether the change sequence formed in step S202 meets the predetermined change characteristics. For example, if it satisfies the change sequence from 1000M to unknown and then to 10M, then in step S203, it can be determined that the target device is a PC device.

[0060] In addition, in step S203, the type of the target device can be assisted in judging the type of the target device according to the time when the target device is connected to the port recorded at the switch, that is, the time when the switch is connected to the network as the device online time. For example, the time when a PC device goes online every day has a certain regularity. Therefore, the control module can determine whether the target device online time has regularity by dividing the time into several intervals, such as [[0:8], [9:12], [13:14], [14:18], [19:24]], and mapping the online time of the target device obtained from the switch to the above time interval, and the target device with regularity may be a PC device.

[0061] In addition, the MACC may also store dynamic host configuration instance option information, such as DHCP Option 12, DHCP Option 55, and DHCP Option 60.

[0062] DHCP Option12 may include a device name, such as fields such as ['pc', 'desktop', 'win'], and the data may be used as training data to train the device recognition model. In addition, MACC may also record the mac information of the terminal connected to the port, such as 84a9.3e5e.xxxx, where the 84a9.3e part is the device manufacturer. Therefore, in the embodiment of the present application, the information may also be used as auxiliary judgment information to help determine the type of the target device. For example, the information indicates that the manufacturer of the device is a common PC manufacturer, and combined with the change characteristics, it is judged that the target device is also a PC device, then it can be concluded that the probability that the target device is a PC device is greater.

[0063] In addition, the control module can also assist in determining the type of the target device based on the time when the target device is connected to the port recorded at the switch, that is, the time when the device is connected to the network through the switch as the device online time. For example, the time when a PC device goes online every day has a certain regularity. Therefore, the control module can determine whether the target device online time has regularity by dividing the time into several intervals, such as [[0:8], [9:12], [13:14], [14:18], [19:24]], and mapping the target device online time obtained from the switch to the above time intervals. A target device with regularity may be a PC device.

[0064] In addition, the embodiments of the present application can use various machine learning models as recognition models when identifying target devices, and use the identified data in the above-mentioned data source as training data to train the recognition model, so that the trained model can be used for device identification.

[0065] For example, in the embodiment of the present application, a random forest classifier can be used as a control module for a classification model for device identification. For example, the model can be trained based on the set loss function, optimizer type and evaluation index for the training data obtained from the above data source. The training set includes two parts, namely, a feature matrix and a terminal type identifier. The terminal type is used as the classification target, and the feature matrix is ​​used for training, and the classification model is continuously improved until the accuracy reaches the preset evaluation index, thereby obtaining a trained model.

[0066] Therefore, when the control module uses the trained model for device identification, it can input the network status change data of the target device recorded at the above-mentioned switch, for example, into the random forest model trained as above, and use the model to calculate the probability that the target device belongs to various predetermined device types, so that the category with the highest calculated probability can be used as the result of device identification, that is, the type of the target device is determined to be the type with the highest calculated probability.

[0067] The device identification scheme of the embodiment of the present application obtains the network identification of the target device and obtains the transmission state change of the network port of the target device within a predetermined time window, so that the device type of the target device can be determined according to the transmission state change of the network port of the target device. Therefore, the device type can be identified by using the transmission state change of the network port of the target device as an identification feature, avoiding the problem in the prior art of misidentifying the normal state of the target device as an abnormal situation and causing false alarms due to the inability to distinguish the type of the connected target device, saving the user's maintenance workload and improving the user experience of using cloud services.

[0068] Figure 3A schematic diagram of a device identification apparatus according to an embodiment of the present application can be used to perform the following steps: Figure 2 The method steps shown. Figure 3 As shown, the device identification apparatus may include: a first acquisition module 31 , a second acquisition module 32 and a determination module 33 .

[0069] The first acquisition module 31 may be used to acquire a network identifier of a target device;

[0070] The network identification of the target device can be obtained by the first acquisition module 31. In the embodiment of the present application, the target device can be a PC device connected to the cloud service platform on the network through a switch, or other devices such as a mobile terminal device. Therefore, the network identifications of these connected target devices can be obtained in real time, so as to understand the various devices currently connected to the network.

[0071] The second acquisition module 32 may be used to acquire a transmission state change of a network port of a target device within a predetermined time window.

[0072] After the first acquisition module 31 acquires the network identifier, the second acquisition module 32 can further acquire the transmission state change of the network port of the target device within a predetermined time window. For example, for a PC device, its network transmission state at the port directly connected to the switch will have specific change characteristics, that is, a series of changes will occur within a certain period of time, and such changes are unique to the PC device. For example, when a PC device using the Windows operating system is inactive for a long time, it can enter a sleep state. At this time, the PC device does not have power outages or network cable abnormalities, but due to the sleep state, the PC negotiates with the switch according to the power saving strategy to change the network transmission speed at the port of the switch to the lowest rate. However, this change phenomenon will not occur in other devices such as mobile terminals.

[0073] The determination module 33 may be configured to determine the device type of the target device according to a change in the transmission state of a network port of the target device.

[0074] The determination module 33 can use the network status change obtained by the second acquisition module 32 as the identification feature of the target device to determine the category of the target device. For example, as mentioned above, the PC device will have a unique feature of network speed change in normal use. Therefore, the determination module 33 can use the change obtained by the second acquisition module 32 as a unique feature of the PC device in the networked state, and thus use the series of changes in the network transmission state within a certain period of time as the identification feature of the PC device to determine that the target device with this feature is a PC device.

[0075] For example, as described above, the network status change of a PC device at a port connected to a switch has a series of obvious characteristics, which can be used as an important feature for determining whether the target device is a PC device.

[0076] For example, the second acquisition module 32 can obtain the rate information of the network status of the target device as a change sequence from 1000M to unknown and then to 10M, and the determination module 33 can judge that the change sequence conforms to the change characteristics of the network transmission rate of the PC device based on the change sequence, so it can be considered that the probability that the target device connected to the port is a PC device is high. Therefore, in the embodiment of the present application, the feature can be used as a device identification feature to perform identification of the target device, or the feature can be introduced into the training sample as a strong feature to train the identification model, and then use the trained model to identify the target device.

[0077] For example, the second acquisition module 32 can acquire the network transmission state change within a predetermined time window. The predetermined window may include a first moment, a second moment, and a third moment that are sequential in time, and there is a time interval between the first moment, the second moment, and the third moment. Therefore, the network transmission states acquired at these three moments can constitute a network transmission state change sequence. And the determination module 33 can determine whether the change sequence constituted by a series of network transmission states acquired by the second acquisition module 32 meets the predetermined change characteristics. For example, if it satisfies the change sequence from 1000M to unknown and then to 10M, it can be determined that the target device is a PC device.

[0078] In addition, the type of the target device can be determined based on the time when the target device is connected to the port recorded at the switch, that is, the time when the device is connected to the network through the switch as the device online time. For example, the time when a PC device goes online every day has a certain regularity. Therefore, the time can be divided into several intervals, such as [[0:8], [9:12], [13:14], [14:18], [19:24]], and the online time of the target device obtained from the switch is mapped to the above time interval to determine whether the target device online time has regularity, and a target device with regularity may be a PC device.

[0079] In addition, the MACC may also store dynamic host configuration instance option information, such as DHCP Option 12, DHCP Option 55, and DHCP Option 60.

[0080] DHCP Option12 may include a device name, such as fields such as ['pc', 'desktop', 'win'], and the data may be used as training data to train the device recognition model. In addition, MACC may also record the mac information of the terminal connected to the port, such as 84a9.3e5e.xxxx, where the 84a9.3e part is the device manufacturer. Therefore, in the embodiment of the present application, the information may also be used as auxiliary judgment information to help determine the type of the target device. For example, the information indicates that the manufacturer of the device is a common PC manufacturer, and combined with the change characteristics, it is judged that the target device is also a PC device, then it can be concluded that the probability that the target device is a PC device is greater.

[0081] In addition, the determination module 33 can also assist in determining the type of the target device based on the time when the target device is connected to the port recorded at the switch, that is, the time when the switch is connected to the network as the device online time. For example, the time when a PC device goes online every day has a certain regularity. Therefore, the control module can determine whether the target device online time has regularity by dividing the time into several intervals, such as [[0:8], [9:12], [13:14], [14:18], [19:24]], and mapping the online time of the target device obtained from the switch to the above time interval, and the target device with regularity may be a PC device.

[0082] In addition, the first acquisition module 31 can also obtain the history data of the switch port, such as the target device identifier recorded by the switch port, the number of the port to which the target device is connected, the content of the history data, and the writing time of the content of the history data. Therefore, the second acquisition module can generate the transmission status change of the switch port based on the content of the history data of the switch port obtained by the first acquisition module 31, and generate the starting time of the transmission status change of the switch port according to the writing time of the content of the history data.

[0083] In this case, the device identification apparatus of the embodiment of the present application may further include a training module 34, which may be used to use multiple historical data of the resume data as training data to train the predetermined model. For example, when identifying a target device, the device identification apparatus according to the embodiment of the present application may use various machine learning models as identification models through the training module 34, and use the identified data such as the resume data in the above data source as training data to train the identification model, so that the trained model can be used for device identification.

[0084] For example, in the case where the recognition model is trained using the training module 34, the determination module 33 according to the embodiment of the present application can be further used to use the model trained by the training module 34 to determine the device type of the target device based on the transmission state change of the network port of the target device acquired by the second acquisition module 32. For example, in the embodiment of the present application, the determination module 33 can use a random forest classifier as a classification model for device identification. For example, the training module 34 can train the model based on the set loss function, optimizer type and evaluation index for the training data acquired from the above-mentioned data source. The training set includes two parts, namely, a feature matrix and a terminal type identifier. The terminal type is used as the classification target, and the feature matrix is ​​used for training, and then the classification model is continuously improved until the accuracy reaches the preset evaluation index, thereby obtaining a trained model.

[0085] Therefore, when the determination module 33 uses the trained model for device identification, it can input the network status change data of the target device recorded at the above-mentioned switch, for example, into the random forest model trained as above, and use the model to calculate the probability that the target device belongs to various predetermined device types, so that the category with the highest calculated probability can be used as the result of device identification, that is, the type of the target device is determined to be the type with the highest calculated probability.

[0086] The device identification device of the embodiment of the present application obtains the network identification of the target device and obtains the transmission status change of the network port of the target device within a predetermined time window, so that the device type of the target device can be determined according to the transmission status change of the network port of the target device. Therefore, the device type can be identified by using the transmission status change of the network port of the target device as an identification feature, avoiding the problem in the prior art that the normal state of the target device is mistakenly identified as an abnormal situation and causes an error alarm due to the inability to distinguish the type of the connected target device, saving the user's maintenance workload and improving the user's experience of using cloud services.

[0087] The internal functions and structure of the device identification apparatus are described above. The device can be implemented as an electronic device. Figure 4 This is a schematic diagram of the structure of an electronic device embodiment provided by this application. Figure 4 As shown, the electronic device includes a memory 41 and a processor 42 .

[0088] The memory 41 is used to store programs. In addition to the above programs, the memory 41 can also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0089] The memory 41 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0090] The processor 42 is not limited to a central processing unit (CPU), but may also be a processing chip such as a graphics processing unit (GPU), a field programmable gate array (FPGA), an embedded neural network processor (NPU) or an artificial intelligence (AI) chip. The processor 42 is coupled to the memory 41 to execute a program stored in the memory 41, and the device identification method of the above embodiment is executed when the program is run.

[0091] Further, if Figure 4 As shown, the electronic device may also include: a communication component 43, a power component 44, an audio component 45, a display 46 and other components. Figure 4 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 4 Components shown.

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

[0093] The power supply assembly 44 provides power to various components of the electronic device. The power supply assembly 44 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.

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

[0095] The display 46 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0096] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A device identification method, comprising: Get the network ID of the target device; Acquiring a transmission status change of a network port of the target device within a predetermined time window; Determining the device type of the target device according to a change in the transmission state of the network port of the target device; The predetermined time window includes a first moment, a second moment, and a third moment that are sequential in time, and there is a time interval between the first moment, the second moment, and the third moment, and the acquiring of the transmission state change of the network port of the target device within the predetermined time window includes: Acquire a first transmission state of a network port of the target device at a first moment; Acquire a second transmission state of the network port of the target device at a second moment; Acquire a third transmission state of the network port of the target device at a third moment; The first transmission state, the second transmission state and the third transmission state are arranged in time sequence to form a transmission state change sequence, and Determining the device type of the target device according to the change in the transmission state of the network port of the target device includes: comparing the transmission state change sequence with a predetermined sequence; When the transmission state change sequence is consistent with the predetermined sequence, it is determined that the device type of the target device is a predetermined type corresponding to the predetermined sequence.

2. The device identification method according to claim 1, wherein: The device identification method further comprises: Acquire the history data of the switch port, wherein the switch port history data includes: a target device identifier, a number of a port to which the target device is connected, content of the history data, and a writing time of the content of the history data; generating a transmission state change of the switch port according to the content of the history data of the switch port; Generate the start time of the transmission state change of the switch port according to the writing time of the content of the history data, and The device identification method further comprises: Using the plurality of historical data of the history data as training data, a predetermined model is trained, and Determining the device type of the target device according to the change in the transmission state of the network port of the target device includes: The trained predetermined model is used to determine the device type of the target device according to the transmission state change of the network port of the target device.

3. The device identification method according to claim 2, wherein: The using the trained predetermined model to determine the device type of the target device according to the transmission state change of the network port of the target device includes: Using a random forest model to calculate the probability value of the target device belonging to each device type; The probability values ​​are sorted, and the device type with the highest probability value is selected as the device type of the target device.

4. The device identification method according to claim 2, wherein: The device identification method further comprises: Get the online time of multiple target devices; Determine the regularity of the online time of the target device according to the mapping relationship between the online time and the predetermined time interval, and Determining the device type of the target device according to the change in the transmission state of the network port of the target device further includes: Determining the regularity of the online time of the target device according to a mapping relationship between the online time and a predetermined time interval; The device type of the target device is determined according to the transmission state change of the network port of the target device and the regularity of the online time.

5. A device identification apparatus, comprising: A first acquisition module, used to acquire a network identifier of a target device; A second acquisition module, used to acquire a transmission state change of a network port of the target device within a predetermined time window; A determination module, configured to determine a device type of the target device according to a change in a transmission state of a network port of the target device; The predetermined time window includes a first moment, a second moment, and a third moment that are sequential in time, and there is a time interval between the first moment, the second moment, and the third moment, and the second acquisition module is further used for: Acquire a first transmission state of a network port of the target device at a first moment; Acquire a second transmission state of the network port of the target device at a second moment; Acquire a third transmission state of the network port of the target device at a third moment; The first transmission state, the second transmission state and the third transmission state are arranged in time sequence to form a transmission state change sequence, and The determination module is further used for: comparing the transmission state change sequence with a predetermined sequence; When the transmission state change sequence is consistent with the predetermined sequence, it is determined that the device type of the target device is a predetermined type corresponding to the predetermined sequence.

6. The device identification apparatus according to claim 5, wherein: The first acquisition module is further used to: acquire the history data of the switch port, wherein the switch port history data includes: the target device identifier, the number of the port to which the target device is connected, the content of the history data, and the writing time of the content of the history data, and The second acquisition module is further used for: generating a transmission state change of the switch port according to the content of the history data of the switch port; Generate the start time of the transmission state change of the switch port according to the writing time of the content of the history data, and The device identification apparatus further comprises: A training module is used to train a predetermined model using a plurality of historical data of the resume data as training data, and The determination module is further used for: The trained predetermined model is used to determine the device type of the target device according to the transmission state change of the network port of the target device.

7. A computer-readable storage medium having a computer program executable by a processor stored thereon, wherein: When the program is executed by a processor, the device identification method according to any one of claims 1 to 4 is implemented.

8. An electronic device comprising: Memory, used to store programs; A processor, configured to run the program stored in the memory to execute the device identification method as claimed in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Power-saving exchanger and power-saving method thereof

    CN102651709A

  • Method and device for terminal type identification

    CN105656683A

  • Shared terminal access management method and device, computer device and storage medium

    CN108667913A

  • Device type recognition method and device of terminal

    CN108712428A

  • Network scene identification method and system, network management device and storage medium

    CN109586950A