Equipment identification method and device, server and storage medium
By obtaining the target data packets and preset relationship tables transmitted by the base station, determining the type of smart device, solving the accuracy of intelligent security device recognition, and achieving rapid identification in the case of dynamic IP addresses.
Patent Information
- Application Number
- CN202310733849.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-19
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art is difficult to accurately identify smart security devices in the network, especially when the IP address range and IP address of the smart security device are not available in advance, resulting in inaccurate identification.
By obtaining the target data packets that the base station transmits to the core network including the preset IP address and the preset port number, the device type is determined using the device description information and the preset relationship table, and the device type library corresponding to the target device type and the intelligent security device is used in the device type. When the match is made, confirm that the device is an intelligent security device.
It realizes rapid and accurate identification of intelligent security devices without the need to obtain the IP address range of the intelligent security device in advance and does not consider the static or dynamic IP address, improving the accuracy and efficiency of identification.
Smart Images

Figure CN119211270A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular to a device identification method, device, server and storage medium. Background Art
[0002] With the rapid development of Internet of Things technology, the security of communities, residences, buildings and factories has changed from manual security to intelligent security. Intelligent security systems including intelligent security devices such as network cameras, visual intelligent door locks, video intercoms and intelligent access control devices have emerged. Intelligent security systems are widely used in industries, finance, public security, transportation, education, medical care and buildings. However, intelligent security systems usually involve multiple intelligent security devices. Any abnormality of any intelligent security device will directly affect the security effect of the entire intelligent security system. Therefore, it is necessary to monitor the status of intelligent security devices in the network. In this way, it is very necessary to identify intelligent security devices to facilitate subsequent monitoring of the status of intelligent security devices. Therefore, how to accurately identify intelligent security devices in the network is a problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present invention provide a device identification method, apparatus, server and storage medium, aiming to accurately identify intelligent security devices in a network.
[0004] In a first aspect, an embodiment of the present invention provides a device identification method, including:
[0005] Acquire a target data packet transmitted by the base station to the core network, wherein the target data packet is a User Datagram Protocol (UDP) data packet including a preset IP address and a preset port number, and the target data packet also includes device description information;
[0006] Determine the target device type to which the smart device corresponding to the device description information belongs according to the device description information and a preset relationship table, wherein the preset relationship table is used to indicate the corresponding relationship between the device description information and the device type;
[0007] When the target device type is the same as any device type in the device type library corresponding to the smart security device, it is determined that the smart device corresponding to the device description information is a smart security device.
[0008] In a second aspect, an embodiment of the present invention further provides a device identification apparatus, including:
[0009] An acquisition module is configured to acquire a target data packet transmitted by the base station to the core network, wherein the target data packet is a User Datagram Protocol (UDP) data packet including a preset IP address and a preset port number, and the target data packet also includes device description information;
[0010] a determination module configured to determine the target device type to which the smart device corresponding to the device description information belongs according to the device description information and a preset relationship table, wherein the preset relationship table is used to indicate the correspondence between the device description information and the device type;
[0011] The determination module is further configured to determine that the smart device corresponding to the device description information is a smart security device when the target device type is the same as any device type in a device type library corresponding to the smart security device.
[0012] In a third aspect, an embodiment of the present invention further provides a server, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the device identification method as described in the first aspect is implemented.
[0013] In a fourth aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the device identification method as described in the first aspect.
[0014] An embodiment of the present invention provides a device identification method, device, server and storage medium. The embodiment of the present invention obtains a target data packet including a preset IP address and a preset port number transmitted by a base station to a core network, and then determines the target device type to which the smart device corresponding to the device description information belongs based on the device description information in the target data packet and a preset relationship table for representing the correspondence between the device description information and the device type. When the target device type is the same as any device type in a device type library corresponding to the smart security device, it can be determined that the smart device corresponding to the device description information is a smart security device, thereby being able to accurately identify the smart security devices in the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 is a schematic block diagram of the structure of a server provided by an embodiment of the present invention;
[0017] Figure 2 is a flow chart of a device identification method provided by an embodiment of the present invention;
[0018] Figure 3 is a schematic diagram of a scenario for implementing the device identification method provided in this embodiment;
[0019] Figure 4 for Figure 2 A schematic diagram of the sub-step flow chart of the device identification method in FIG.
[0020] Figure 5 is another schematic diagram of a scenario for implementing the device identification method provided in this embodiment;
[0021] Figure 6 is another schematic diagram of a scenario for implementing the device identification method provided in this embodiment;
[0022] Figure 7 The present invention is a schematic block diagram of a device identification apparatus provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0025] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0026] With the rapid development of Internet of Things technology, the security of communities, residences, buildings and factories has changed from manual security to intelligent security. Intelligent security systems such as network cameras, visual intelligent door locks, video intercoms and intelligent access control devices have emerged. Intelligent security systems are widely used in industry, finance, public security, transportation, education, medical care and buildings. However, intelligent security systems usually involve multiple intelligent security devices. Any abnormality of any intelligent security device will directly affect the security effect of the entire intelligent security system. Therefore, it is necessary to monitor the status of intelligent security devices in the network. In this way, it is very necessary to identify intelligent security devices to facilitate subsequent monitoring of the status of intelligent security devices. Therefore, how to accurately identify intelligent security devices in the network is a problem that needs to be solved urgently.
[0027] To solve the above problems, the relevant technology needs to first determine the IP address range of the smart security device, and send a data packet in XML (Extensible Markup Language) format to each device with an IP address within the IP address range, and wait and determine whether each device sends back XML format response data. If so, it means that the current device is a smart security device. However, in the actual existing network, there are many occasions where smart security devices are used, and it is impossible to obtain the full IP address range of smart security devices. In addition, the IP address of the smart security device itself may also change dynamically, and the conclusion that the current device is a smart security device directly based on the response data may not be accurate.
[0028] The device identification method, apparatus, server and storage medium provided by the embodiments of the present invention do not need to obtain the IP address range of the smart security device in advance, nor do they need to consider whether the IP address of the smart security device is static or dynamic. It is only necessary to obtain the target data packet including the preset IP address and the preset port number transmitted by the base station to the core network in the network, and then determine the target device type to which the smart device corresponding to the device description information belongs based on the device description information in the target data packet and the preset relationship table used to represent the correspondence between the device description information and the device type. When the target device type is the same as any device type in the device type library corresponding to the smart security device, it can be determined that the smart device corresponding to the device description information is a smart security device, thereby enabling rapid and accurate identification of smart security devices in the network.
[0029] In the embodiment of the present invention, the server can be an independent server or a server cluster composed of multiple servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0030] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0031] See also Figure 1 , Figure 1 The present invention is a schematic structural block diagram of a server provided by an embodiment of the present invention.
[0032] like Figure 1 As shown, the server 100 includes a processor 101 and a memory 102 , and the processor 101 and the memory 102 are connected via a bus 103 , such as an I2C (Inter-integrated Circuit) bus.
[0033] Specifically, the processor 101 is used to provide computing and control capabilities to support the operation of the entire server. The processor 101 can be a central processing unit (CPU), and the processor 101 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0034] Specifically, the memory 102 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0035] Those skilled in the art will understand that Figure 1The structure shown in the figure is only a block diagram of a partial structure related to the embodiment of the present invention, and does not constitute a limitation on the server to which the embodiment of the present invention is applied. The specific server may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0036] Among them, the processor 101 is used to run the computer program stored in the memory 102, and implement any one of the network slice device identification methods provided by the embodiments of the present invention when executing the computer program.
[0037] In some embodiments, the processor 101 is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:
[0038] Acquire a target data packet transmitted by the base station to the core network, wherein the target data packet is a User Datagram Protocol (UDP) data packet including a preset IP address and a preset port number, and the target data packet also includes device description information;
[0039] Determine the target device type to which the smart device corresponding to the device description information belongs according to the device description information and a preset relationship table, wherein the preset relationship table is used to indicate the corresponding relationship between the device description information and the device type;
[0040] When the target device type is the same as any device type in the device type library corresponding to the smart security device, it is determined that the smart device corresponding to the device description information is a smart security device.
[0041] In some embodiments, when the processor 101 obtains the target data packet transmitted by the base station to the core network, it is used to implement:
[0042] Acquire multiple data packets transmitted by the base station to a preset network element of the core network;
[0043] A UDP data packet including a preset IP address and a preset port number is selected from the plurality of data packets as a target data packet.
[0044] In some embodiments, the preset network element includes at least one of a user plane function UPF network element, a service gateway SGW network element and an xGW network element.
[0045] In some embodiments, when the processor 101 implements acquiring multiple data packets transmitted by the base station to the preset network element of the core network, it is used to implement:
[0046] A plurality of data packets transmitted from the base station to a preset network element of the core network are collected by a preset probe, wherein the preset probe is deployed between the base station and the preset network element of the core network.
[0047] In some embodiments, the target data packet further includes a device IP address, a device MAC address, and a product serial number. After the processor 101 determines that the smart device corresponding to the device description information is a smart security device, it is further configured to implement:
[0048] At least one of the device IP address, device MAC address and product serial number is used as the device identification of the intelligent security device.
[0049] In some embodiments, the target data packet further includes a dynamic host configuration protocol DHCP identifier, and the processor 101, when implementing at least one of the device IP address, the device MAC address, and the product serial number as the device identifier of the intelligent security device, is used to implement:
[0050] When the DHCP identifier is the first identifier, at least one of the device MAC address and the product serial number is used as the device identifier of the smart security device, and the first identifier is used to indicate that the DHCP function of the smart security device is in an enabled state.
[0051] In some embodiments, when the processor 101 uses at least one of the device IP address, the device MAC address, and the product serial number as the device identification of the smart security device, it is also used to implement:
[0052] When the DHCP identifier is the second identifier, at least one of the device IP address, the device MAC address and the product serial number is used as the device identifier of the smart security device, and the second identifier is used to indicate that the DHCP function of the smart security device is in a disabled state.
[0053] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the server described above can refer to the corresponding process in the aforementioned device identification method embodiment, and will not be repeated here.
[0054] The following will be combined Figure 1 The server in the embodiment of the present invention provides a detailed introduction to the device identification method. Figure 1 The server is only used to explain the device identification method provided in the embodiment of the present invention, but does not constitute a limitation on the application scenario of the device identification method provided in the embodiment of the present invention.
[0055] See also Figure 2 , Figure 2 The present invention provides a flow chart of a device identification method provided by an embodiment of the present invention. The device identification method can be applied to a server and can accurately identify intelligent security devices in a network.
[0056] like Figure 2As shown, the device identification method includes steps S101 to S103.
[0057] Step S101: Acquire a target data packet transmitted by a base station to a core network.
[0058] In this embodiment, the target data packet is a UDP (User Datagram Protocol) data packet including a preset IP address and a preset port number, and the target data packet also includes device description information. Optionally, the target data packet is a UDP data packet including a preset IP address and a preset port number, and encapsulated based on a preset protocol. Among them, the device description information can be the device model of the smart device, and the preset protocol, preset IP address and preset port number can be set based on actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the preset IP address is 239.255.255.250, the preset port number is 37020, and the preset protocol is ONVIF (Open Network Video Interface Forum) protocol.
[0059] In some embodiments, the method for obtaining the target data packet transmitted by the base station to the core network can be: obtaining multiple data packets transmitted by the base station to the core network; selecting a UDP data packet including a preset IP address and a preset port number and encapsulated based on the ONVIF protocol from the multiple data packets as the target data packet. Among them, the multiple data packets transmitted by the base station to the core network can be sent directly to the base station by the smart device, or sent to the base station by a user terminal connected to the communication with the smart device. It is understandable that the smart device can be a smart security device such as a network camera, a visual smart door lock, a video intercom, and a smart access control device, or it can be an electronic device such as a smart phone, a tablet computer, a laptop computer, or a personal computer.
[0060] In some embodiments, when the base station obtains multiple data packets sent by a smart device or a user terminal, the base station transmits the multiple data packets to the core network, and the base station also transmits the multiple data packets to the server; the server obtains the multiple data packets transmitted by the base station, thereby obtaining the multiple data packets transmitted by the base station to the core network; the server selects a UDP data packet including an IP address of 239.255.255.250, a port number of 37020, and encapsulated based on the ONVIF protocol as the target data packet from the multiple data packets.
[0061] For example, Figure 3As shown, the network camera 11 encapsulates the collected video data into a first data packet. Since the network camera 11 does not include a communication module, the network camera 11 transmits the first data packet to the user terminal 13, and the user terminal 13 including the communication module transmits the first data packet to the base station 14. The smart phone 12 encapsulates the collected video data into a second data packet, and then directly transmits it to the base station 14. When the base station 14 obtains the first data packet and the second data packet, the base station 14 transmits the first data packet and the second data packet to the core network 15. At the same time, the base station 14 sends the first data packet and the second data packet to the server 100, and the server 100 can obtain the first data packet and the second data packet transmitted by the base station 14 to the core network 15. Since the first data packet includes the IP address 239.255.255.250 and the port number 37020, and the first data packet is also encapsulated based on the ONVIF protocol, the first data packet can be determined as the target data packet.
[0062] In some embodiments, Figure 4 As shown, step S101 includes: sub-step S1011 to sub-step S1012.
[0063] Sub-step S1011, obtaining multiple data packets transmitted by the base station to a preset network element of the core network.
[0064] In this embodiment, the preset network elements of the core network can be set based on actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the preset network elements of the core network include at least one of a UPF (User Plane Function) network element, a SGW (Serving GateWay) network element, and an xGW network element. Among them, the xGW network element is composed of an SGW network element and a PGW (PDN GateWay) network element.
[0065] In some embodiments, when the base station obtains multiple data packets sent by a smart device or a user terminal, the base station transmits the multiple data packets to a preset network element of the core network, and the base station also transmits the multiple data packets to the server; the server obtains the multiple data packets transmitted by the base station, thereby obtaining the multiple data packets transmitted by the base station to the preset network element of the core network.
[0066] For example, Figure 5As shown, the network camera 11 encapsulates the collected video data into a first data packet. Since the network camera 11 does not include a communication module, the network camera 11 transmits the first data packet to the user terminal 13, and the user terminal 13 containing the communication module transmits the first data packet to the base station 14. The smart phone 12 encapsulates the collected video data into a second data packet and then directly transmits it to the base station 14. When the base station 14 obtains the first data packet and the second data packet, the base station 14 transmits the first data packet and the second data packet to the UPF network element 16 of the core network. At the same time, the base station 14 sends the first data packet and the second data packet to the server 100. The server 100 can obtain the first data packet and the second data packet transmitted by the base station 14 to the UPF network element 16 of the core network.
[0067] In some embodiments, multiple data packets transmitted from the base station to the preset network element of the core network are collected by preset probes, and the preset probes are deployed between the base station and the preset network element of the core network. Among them, the preset probe is connected to the server in communication, and the communication connection between the preset probe and the server can be a wireless connection or a wireless connection. The preset probe deployed between the base station and the preset network element of the core network can be one or more, and the embodiment of the present invention does not specifically limit this. In this embodiment, by deploying preset probes between the base station and the preset network element of the core network, multiple data packets transmitted from the base station to the preset network element of the core network can be quickly collected, which is convenient for the subsequent accurate identification of smart security devices in the network.
[0068] For example, Figure 6 As shown, a preset probe 17 is deployed between the base station 14 and the UPF network element 16 of the core network. Therefore, when the base station 14 obtains the first data packet sent by the user terminal 13 and the second data packet sent by the smart phone 12, the base station 14 can transmit the first data packet and the second data packet to the UPF network element 16 of the core network. In the process of the base station 14 transmitting the first data packet and the second data packet to the UPF network element 16 of the core network, the preset probe 17 can collect the first data packet and the second data packet, and transmit the collected first data packet and second data packet to the server 100, so that the server 100 can obtain the first data packet and the second data packet transmitted by the base station 14 to the UPF network element 16 of the core network.
[0069] Sub-step S1012: selecting a UDP data packet including a preset IP address and a preset port number from multiple data packets as a target data packet.
[0070] In this embodiment, a UDP data packet containing a preset IP address and a preset port number and encapsulated based on a preset protocol may also be selected from multiple data packets as the target data packet. Figure 5 or Figure 6As shown, after acquiring the first data packet and the second data packet transmitted by the base station 14 to the UPF network element 16 of the core network, the server 100 can determine whether the first data packet is a UDP data packet containing a preset IP address and a preset port number and encapsulated based on a preset protocol, and determine whether the second data packet is a UDP data packet containing a preset IP address and a preset port number and encapsulated based on a preset protocol. If the first data packet is a UDP data packet containing a preset IP address and a preset port number and encapsulated based on a preset protocol, the first data packet can be used as the target data packet, and if the second data packet is a UDP data packet that does not contain a preset IP address but contains a preset port number and is encapsulated based on a preset protocol, the second data packet can be deleted.
[0071] Step S102: Determine the target device type to which the smart device corresponding to the device description information belongs according to the device description information and the preset relationship table.
[0072] In this embodiment, the preset relationship table is used to indicate the correspondence between the device description information and the device type. The device type corresponding to the device description information in the target data packet is queried from the preset relationship table, and the queried device type is determined as the target device type to which the smart device corresponding to the device description information belongs. Among them, the device type can be represented by characters, strings, or words, and the embodiment of the present invention does not specifically limit this. For example, the device type is represented by uppercase English letters. For example, the device types include Class A, Class B, Class C, Class D, Class E, Class F, Class G, and Class H. Class A represents a network camera, Class B represents a visual smart door lock, Class C represents a visual intercom, Class D represents a smart access control device, Class E represents a smart phone, Class F represents a tablet computer, Class G represents a laptop computer, and Class H represents a personal computer.
[0073] It should be noted that the preset relationship table is established in advance based on the device description information and device types of different smart devices. For example, the device models of smart security devices such as network cameras, visual smart door locks, video intercoms, and smart access control devices, as well as other electronic devices, can be collected in advance, and the devices of these smart devices can be classified according to actual conditions to obtain different device types, and then the device models and device types are bound and associated, so that a corresponding relationship table between the device description information and the device type can be established, and then the corresponding relationship table between the device description information and the device type can be stored in the server for subsequent use.
[0074] Step S103: When the target device type is the same as any device type in the device type library corresponding to the smart security device, determine that the smart device corresponding to the device description information is a smart security device.
[0075] In this embodiment, when the target device type is different from any device type in the device type library corresponding to the smart security device, it is determined that the smart device corresponding to the device description information is not a smart security device. Among them, the device type library corresponding to the smart security device is a pre-established device type library, and the device type library corresponding to the smart security device can be set based on actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the device type library corresponding to the smart security device includes Class A, Class B, Class C and Class D, Class A represents network cameras, Class B represents visual smart door locks, Class C represents video intercoms, and Class D represents smart access control devices. For example, if the target device type to which the smart device corresponding to the device description information belongs is Class A, then it can be determined that the smart device corresponding to the device description information is a smart security device such as a network camera, and if the target device type to which the smart device corresponding to the device description information belongs is Class E, then it can be determined that the smart device corresponding to the device description information is not a smart security device.
[0076] In some embodiments, the target data packet also includes a device IP address, a device MAC (Medium Access Control) address, and a product serial number. After step S103, it also includes: using at least one of the device IP address, the device MAC address, and the product serial number as a device identifier of the smart security device. In this embodiment, by determining the device identifier of the smart security device, the device identifier can be used in the network to identify the smart security device, which is convenient for maintaining the smart security device, and can also locate the abnormal smart security device when the smart security device is abnormal.
[0077] In some embodiments, the target data packet further includes a DHCP (Dynamic Host Configuration Protocol) identifier. When the DHCP identifier is the first identifier, at least one of the device MAC address and the product serial number is used as the device identifier of the smart security device. The first identifier is used to indicate that the DHCP function of the smart security device is enabled. In this embodiment, when the DHCP function of the smart security device is enabled, the IP address of the smart security device changes dynamically. Therefore, at least one of the unchanged device MAC address and the product serial number can be used as the device identifier to facilitate subsequent unique identification of the smart security device.
[0078] In some embodiments, when the DHCP identifier is the second identifier, at least one of the device IP address, device MAC address, and product serial number is used as the device identifier of the smart security device, and the second identifier is used to indicate that the DHCP function of the smart security device is in a disabled state. Among them, the first identifier is different from the second identifier, and the first identifier and the second identifier can be set based on actual conditions, and the embodiment of the present invention does not specifically limit this. For example, the first identifier is "true" and the second identifier is "false". In this embodiment, when the DHCP function of the smart security device is not enabled, the IP address of the smart security device is static and unchanged, so at least one of the unchanged device IP address, device MAC address, and product serial number can be used as the device identifier to facilitate the subsequent unique identification of the smart security device.
[0079] The device identification method provided in the above embodiment obtains a target data packet including a preset IP address and a preset port number transmitted by the base station to the core network, and then determines the target device type to which the smart device corresponding to the device description information belongs based on the device description information in the target data packet and a preset relationship table used to represent the correspondence between the device description information and the device type. When the target device type is the same as any device type in the device type library corresponding to the smart security device, it can be determined that the smart device corresponding to the device description information is a smart security device, thereby being able to accurately identify the smart security devices in the network.
[0080] See also Figure 7 , Figure 7 It is a schematic block diagram of the structure of a device identification apparatus provided by an embodiment of the present invention.
[0081] like Figure 7 As shown, the device identification apparatus 200 includes:
[0082] The acquisition module 210 is configured to acquire a target data packet transmitted by the base station to the core network, wherein the target data packet is a User Datagram Protocol (UDP) data packet including a preset IP address and a preset port number, and the target data packet also includes device description information;
[0083] A determination module 220 is configured to determine the target device type to which the smart device corresponding to the device description information belongs according to the device description information and a preset relationship table, wherein the preset relationship table is used to indicate the correspondence between the device description information and the device type;
[0084] The determination module 220 is further configured to determine that the smart device corresponding to the device description information is a smart security device when the target device type is the same as any device type in a device type library corresponding to smart security devices.
[0085] In some embodiments, the acquisition module 210 is further configured to:
[0086] Acquire multiple data packets transmitted by the base station to a preset network element of the core network;
[0087] A UDP data packet including a preset IP address and a preset port number is selected from the plurality of data packets as a target data packet.
[0088] In some embodiments, the preset network element includes at least one of a user plane function UPF network element, a service gateway SGW network element and an xGW network element.
[0089] In some embodiments, the acquisition module 210 is further configured to:
[0090] A plurality of data packets transmitted from the base station to a preset network element of the core network are collected by a preset probe, wherein the preset probe is deployed between the base station and the preset network element of the core network.
[0091] In some embodiments, the target data packet further includes a device IP address, a device MAC address, and a product serial number, and the determination module 220 is further configured to:
[0092] At least one of the device IP address, device MAC address and product serial number is used as the device identification of the intelligent security device.
[0093] In some embodiments, the target data packet further includes a dynamic host configuration protocol DHCP identifier, and the acquisition module 210 is further configured to:
[0094] When the DHCP identifier is a first identifier, at least one of the device MAC address and the product serial number is used as the device identifier of the smart security device, and the first identifier is used to indicate that the DHCP function of the smart security device is in an enabled state;
[0095] Alternatively, when the DHCP identifier is the second identifier, at least one of the device IP address, device MAC address and product serial number is used as the device identifier of the smart security device, and the second identifier is used to indicate that the DHCP function of the smart security device is in a disabled state.
[0096] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device identification apparatus described above can refer to the corresponding process in the aforementioned device identification method embodiment, and will not be repeated here.
[0097] An embodiment of the present invention further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any device identification method provided in the description of the embodiment of the present invention.
[0098] The storage medium may be an internal storage unit of the server described in the foregoing embodiment, such as a hard disk or memory of the server. The storage medium may also be an external storage device of the server, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the server.
[0099] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0100] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0101] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A device identification method, characterized in that: include: Acquire a target data packet transmitted by the base station to the core network, wherein the target data packet is a User Datagram Protocol (UDP) data packet including a preset IP address and a preset port number, and the target data packet also includes device description information; Determine the target device type to which the smart device corresponding to the device description information belongs according to the device description information and a preset relationship table, wherein the preset relationship table is used to indicate the corresponding relationship between the device description information and the device type; When the target device type is the same as any device type in the device type library corresponding to the smart security device, it is determined that the smart device corresponding to the device description information is a smart security device.
2. The device identification method according to claim 1, characterized in that: The obtaining of a target data packet transmitted by the base station to the core network includes: Acquire multiple data packets transmitted by the base station to a preset network element of the core network; A UDP data packet including a preset IP address and a preset port number is selected from the plurality of data packets as a target data packet.
3. The device identification method according to claim 2, characterized in that: The preset network element includes at least one of a user plane function UPF network element, a service gateway SGW network element and an xGW network element.
4. The device identification method according to claim 2, characterized in that: The obtaining of multiple data packets transmitted by the base station to the preset network element of the core network includes: A plurality of data packets transmitted from the base station to a preset network element of the core network are collected by a preset probe, wherein the preset probe is deployed between the base station and the preset network element of the core network.
5. The device identification method according to any one of claims 1 to 4, characterized in that: The target data packet also includes a device IP address, a device MAC address and a product serial number. After determining that the smart device corresponding to the device description information is a smart security device, the method further includes: At least one of the device IP address, device MAC address and product serial number is used as the device identification of the intelligent security device.
6. The device identification method according to claim 5, characterized in that: The target data packet also includes a dynamic host configuration protocol DHCP identifier, and using at least one of the device IP address, the device MAC address, and the product serial number as the device identifier of the intelligent security device includes: When the DHCP identifier is the first identifier, at least one of the device MAC address and the product serial number is used as the device identifier of the smart security device, and the first identifier is used to indicate that the DHCP function of the smart security device is in an enabled state.
7. The device identification method according to claim 6, characterized in that: The using at least one of the device IP address, the device MAC address and the product serial number as the device identification of the intelligent security device also includes: When the DHCP identifier is the second identifier, at least one of the device IP address, the device MAC address and the product serial number is used as the device identifier of the smart security device, and the second identifier is used to indicate that the DHCP function of the smart security device is in a disabled state.
8. A device identification apparatus, characterized in that: include: An acquisition module is configured to acquire a target data packet transmitted by the base station to the core network, wherein the target data packet is a User Datagram Protocol (UDP) data packet including a preset IP address and a preset port number, and the target data packet also includes device description information; a determination module configured to determine the target device type to which the smart device corresponding to the device description information belongs according to the device description information and a preset relationship table, wherein the preset relationship table is used to indicate the correspondence between the device description information and the device type; The determination module is further configured to determine that the smart device corresponding to the device description information is a smart security device when the target device type is the same as any device type in a device type library corresponding to the smart security device.
9. A server, characterized in that: The server includes a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the device identification method according to any one of claims 1 to 7 is realized.
10. A storage medium for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the device identification method according to any one of claims 1 to 7.
