Sensor type identification method, device and equipment, readable storage medium and product
By extracting the detection characteristics of the smart sensor and using the identification model, the problem of privacy leakage of smart sensors is solved, and the accurate identification and distinction of sensor types is achieved, which improves security.
Patent Information
- Application Number
- CN202411789706.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-15
AI Technical Summary
While providing convenience, smart sensors bring risks of privacy leakage, and a method that accurately identifies sensor types is needed to remove the risk of privacy violations.
By obtaining the flow data to be measured in the target area, the detection characteristics of the sensor, including image characteristics and text characteristics, are extracted, and the sensor type is identified using the recognition model.
Improve the accuracy of sensor types to identify and distinguish different types of sensors effectively, thereby reducing the risk of privacy leakage.
Smart Images

Figure CN119830092A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a sensor type identification method, device, equipment, readable storage medium and product. Background Art
[0002] With the rapid advancement of the Internet of Things, cloud computing and artificial intelligence technologies, the smart device industry has ushered in unprecedented growth. These devices are widely used in the fields of automated embedded systems and industrial control. Through Internet connection, remote control and automation technology, they have achieved intelligent interconnection in multiple scenarios, facilitating people's daily life and work.
[0003] To achieve smart home automation, smart devices are often equipped with embedded sensors that collect environmental data and transmit it to cloud servers via wireless networks. Users can remotely monitor and set linkage strategies through mobile applications.
[0004] However, while smart sensors provide convenience, they also bring risks of privacy leakage, such as attackers deploying hidden sensors to remotely monitor users' lives and infringe on privacy and security. Therefore, it is particularly important to remove sensors that pose a risk of privacy violation. Summary of the invention
[0005] Based on this, it is necessary to provide a sensor type identification method, device, equipment, readable storage medium and product that can accurately identify the sensor type in response to the above technical problems.
[0006] In a first aspect, the present application provides a sensor type identification method, comprising:
[0007] Acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0008] Extracting features from the flow data to be measured to obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0009] For any sensor, the detection feature corresponding to the sensor is identified to obtain the sensor type of the sensor.
[0010] In one embodiment, feature extraction is performed on the flow data to be measured to obtain detection features corresponding to each sensor, including:
[0011] Separate and process the flow data to be measured to obtain the detection data of each sensor;
[0012] For the detection data of any sensor, feature extraction is performed on the detection data of the sensor to obtain the detection features corresponding to the sensor.
[0013] In one embodiment, feature extraction is performed on the detection data of the sensor to obtain the detection feature of the sensor, including:
[0014] The detection data of the sensor is converted into a data packet sequence; the sequence elements in the data packet sequence are arranged in time order;
[0015] Based on a preset division basis, the data packet sequence is divided into sessions to obtain at least one session data packet;
[0016] For any session data packet, dividing the session data packet into windows according to a preset time window corresponding to the session data packet to obtain at least one window data packet;
[0017] Feature extraction is performed on at least one window data packet to obtain detection features corresponding to the sensor.
[0018] In one embodiment, if the detection feature includes a text feature, feature extraction is performed on at least one window data packet to obtain the detection feature corresponding to the sensor, including:
[0019] Extract text features from each window data packet to obtain text features corresponding to the corresponding window data packet;
[0020] Using the text feature corresponding to at least one window data packet as the text feature corresponding to the sensor;
[0021] The text feature includes at least one of an average packet length, a standard deviation of the packet length, a number of data packets, and an average return time.
[0022] In one embodiment, if the detection feature includes an image feature, feature extraction is performed on at least one window data packet to obtain the detection feature corresponding to the sensor, including:
[0023] For any window data packet, when the byte length in the window data packet exceeds a preset length threshold, converting the target content data in the window data packet into a grayscale image; wherein the byte length of the target content data is the same as the preset length threshold;
[0024] When the byte length in the window data packet does not exceed the preset length threshold, the window data packet is padded to the preset length threshold, and the padded window data packet is converted into a grayscale image;
[0025] A grayscale image corresponding to at least one window data packet is used as an image feature corresponding to the sensor.
[0026] In one embodiment, identifying the detection feature corresponding to the sensor to obtain the sensor type of the sensor includes:
[0027] Inputting the detection features corresponding to the sensor into the sensor identification model to obtain the sensor type of the sensor;
[0028] The sensor recognition model is trained based on the detection features corresponding to the sample sensors and the sensor type labels corresponding to the sample sensors.
[0029] In a second aspect, the present application further provides a sensor type identification device, comprising:
[0030] A data acquisition module is used to acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0031] A feature extraction module is used to extract features from the flow data to be measured, and obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0032] The type identification module is used to identify the detection characteristics corresponding to any sensor and obtain the sensor type of the sensor.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0034] Acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0035] Extracting features from the flow data to be measured to obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0036] For any sensor, the detection feature corresponding to the sensor is identified to obtain the sensor type of the sensor.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0038] Acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0039] Extracting features from the flow data to be measured to obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0040] For any sensor, the detection feature corresponding to the sensor is identified to obtain the sensor type of the sensor.
[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0042] Acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0043] Extracting features from the flow data to be measured to obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0044] For any sensor, the detection feature corresponding to the sensor is identified to obtain the sensor type of the sensor.
[0045] The above-mentioned sensor type identification method, device, equipment, readable storage medium and product obtain the flow data to be measured in the target area where the target object is located, and perform feature extraction on the flow data to be measured. Since the flow data to be measured includes detection data sent by at least one sensor set in the target area to the target object, the detection features corresponding to each sensor can be obtained by extracting features from the flow data to be measured. Furthermore, for any sensor, the detection features corresponding to the corresponding sensor are identified to determine the sensor type of the corresponding sensor. In the above process, the sensor type of the corresponding sensor is determined based on the detection features corresponding to the sensor, which can improve the accuracy of determining the sensor type compared to the method of identifying the flow data to be measured. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 is a schematic flow chart of a sensor type identification method in one embodiment;
[0048] Figure 2 A schematic flow chart of a detection feature determination step in one embodiment;
[0049] Figure 3 A schematic diagram of a flow chart of a sensor type determination step in one embodiment;
[0050] Figure 4 is a flow chart of a sensor type identification method in another embodiment;
[0051] Figure 5 is a structural block diagram of a sensor type identification device in one embodiment;
[0052] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] In one embodiment, Figure 1 As shown, a sensor type identification method is provided. This embodiment takes the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0055] S110, obtaining flow data to be measured in a target area where a target object is located.
[0056] The target object may be a user in the target area. At least one sensor is arranged in the target area, and the target area may be a room, or a preset range where sensor type identification is required. The flow data to be measured includes detection data sent by at least one sensor arranged in the target area for the target object, wherein the detection data is the wireless flow data sent by the sensor.
[0057] Exemplarily, a wireless protocol packet capture device may be used to capture traffic data existing in a target area within a preset time period, and further, the corresponding traffic data may be used as traffic data to be measured.
[0058] S120, extracting features from the flow data to be measured to obtain detection features corresponding to each sensor.
[0059] The detection feature includes at least one of an image feature and a text feature. The image feature is used to characterize the dataset feature of the detection data of the corresponding sensor in the form of a flow image. The text feature is used to characterize the dataset feature of the detection data of the corresponding sensor in the form of a flow text.
[0060] Exemplarily, the flow data to be measured can be input into a pre-trained feature extraction model to obtain the detection features corresponding to each sensor.
[0061] It should be noted that the feature extraction model can be constructed based on a common neural network, which will not be described in detail here. Furthermore, in the process of training the feature extraction network, the sample flow data can be input into the feature extraction model to obtain the predicted detection features, and the model parameters of the feature extraction model can be adjusted according to the predicted detection features and the detection feature labels corresponding to the sample flow data to improve the model accuracy of the feature extraction model.
[0062] S130: For any sensor, identify the detection feature corresponding to the sensor to obtain the sensor type of the sensor.
[0063] Exemplarily, the detection feature corresponding to the sensor may be identified based on a recognition algorithm to obtain the sensor type of the sensor.
[0064] Exemplarily, the detection features may also be identified and distinguished based on manual experience, thereby determining the sensor type of the sensor.
[0065] In the above sensor type identification method, by obtaining the flow data to be measured in the target area where the target object is located, and performing feature extraction on the flow data to be measured, since the flow data to be measured includes detection data sent by at least one sensor set in the target area to the target object, the detection features corresponding to each sensor can be obtained by performing feature extraction on the flow data to be measured. Furthermore, for any sensor, the detection features corresponding to the corresponding sensor are identified to determine the sensor type of the corresponding sensor. In the above process, the sensor type of the corresponding sensor is determined based on the detection features corresponding to the sensor, which can improve the accuracy of determining the sensor type compared to the method of identifying the flow data to be measured.
[0066] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the process of extracting features from the flow data to be measured and obtaining the detection features corresponding to each sensor is refined.
[0067] See also Figure 2 The detection feature determination steps shown include:
[0068] S210, separating and processing the flow data to be measured to obtain detection data of each sensor.
[0069] Optionally, the flow data to be measured can be separated and processed according to the communication characteristics of the wireless protocol to obtain the detection data of each sensor. It should be noted that the communication characteristics of the detection data output by different sensors are different, so the flow data to be measured can be separated and processed according to the different communication characteristics.
[0070] Optionally, the flow data to be measured can be divided according to the communication channel, and the flow data to be measured can be divided into multiple channels. Then, for each channel, the network identifier corresponding to the flow data to be measured in the corresponding channel is extracted. The network identifier can represent the sub-network built by the corresponding intelligent gateway. Furthermore, in each network identifier, there is an intelligent gateway and multiple sensors, each sensor has a unique device short address, and the detection data of each sensor is separated according to the short address of each sub-device.
[0071] S220, for detection data of any sensor, extract features of the detection data of the sensor to obtain detection features corresponding to the sensor.
[0072] Optionally, for the detection data of any sensor, the corresponding detection data can be input into a feature extraction model to obtain the detection features corresponding to the corresponding sensor.
[0073] Optionally, the detection data of the sensor can be converted into a data packet sequence; the sequence elements in the data packet sequence are arranged in chronological order; based on a preset division basis, the data packet sequence is divided into sessions to obtain at least one session data packet; for any session data packet, the session data packet is divided into windows according to a preset time window corresponding to the session data packet to obtain at least one window data packet; and feature extraction is performed on at least one window data packet to obtain the detection feature corresponding to the sensor.
[0074] Specifically, first, the detection data of each sensor is regarded as a data packet sequence constructed by the communicating entities (i.e., the sensor and the target object) in chronological order, and the data packet sequence is divided into each sub-data set (i.e., session data packet) in the form of a session. Secondly, each sub-data set is divided using a time window to obtain at least one window data packet.
[0075] Exemplarily, the above data packet sequence may be a three-column matrix, for example:
[0076] ;
[0077] In the formula, pk i Represents the i-th data packet collected, time represents the timestamp of the data packet, len represents the length of the data packet, and data represents the byte stream data of the data packet.
[0078] The length of the preset time window may be determined based on manual experience, and illustratively, may be 5 seconds or 10 seconds, without any limitation thereto.
[0079] Furthermore, if the detection feature includes a text feature, the detection feature is determined in the following manner: text feature extraction is performed on each window data packet to obtain text features corresponding to the corresponding window data packet; the text features corresponding to at least one window data packet are used as text features corresponding to the sensor; wherein the text features include at least one of average packet length, packet length standard deviation, number of data packets and average return time.
[0080] It should be noted that the detection data of each sensor may be encrypted, but it still cannot conceal the basic characteristics of the corresponding detection data. Therefore, different types of sensors have certain differences in the number of traffic packets, traffic packet size and other basic characteristics generated in an interaction process. Based on this, the text features extracted from each window data packet include at least one of the average packet length, packet length standard deviation, number of data packets and average return time.
[0081] Among them, the average packet length is used to count the average length of all traffic data packets in a time window; the standard deviation of packet length is used to count the standard deviation of the length of all traffic data packets in a time window; the number of data packets is used to count the number of all traffic data packets in a time window; the average return time is used to count the average return time of the communication between the two parties in a time window.
[0082] If the detection feature includes an image feature, the detection feature is determined in the following manner: for any window data packet, when the byte length in the window data packet exceeds a preset length threshold, the target content data in the window data packet is converted into a grayscale image; wherein the byte length of the target content data is the same as the preset length threshold; when the byte length in the window data packet does not exceed the preset length threshold, the window data packet is padded to the preset length threshold, and the padded window data packet is converted into a grayscale image; and the grayscale image corresponding to at least one window data packet is used as the image feature corresponding to the sensor.
[0083] The preset length threshold may be determined based on manual experience or through a large number of experiments. For example, the preset length threshold may be 784 bytes.
[0084] Taking the preset length threshold of 784 bytes as an example, the process of determining the image features is refined. Specifically, when the byte length in the window data packet exceeds the preset length threshold, the redundant bytes are removed, and the content data corresponding to the remaining 784 bytes are converted into a grayscale image. When the byte length in the window data packet does not exceed the preset length threshold, 0*00 bytes are added to the end of the corresponding window data packet until the byte length in the corresponding window data packet reaches 784 bytes, and the content data corresponding to 784 bytes in the corresponding window data packet is converted into a grayscale image. In the above manner, each window data packet is converted into a grayscale image of the same size.
[0085] In the above embodiment, after the measured flow data is separated and processed to obtain the detection data of each sensor, the corresponding detection features are extracted for the detection data of any sensor to maximize the detection features of the sensor, laying the foundation for the subsequent process of identifying the sensor type based on the detection features.
[0086] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the process of identifying the detection features corresponding to the sensor and obtaining the sensor type of the sensor is refined.
[0087] See also Figure 3 The steps for determining the sensor type shown include:
[0088] S310: Input the detection feature corresponding to the sensor into a sensor identification model to obtain the sensor type of the sensor.
[0089] The sensor recognition model is trained based on the detection features corresponding to the sample sensors and the sensor type labels corresponding to the sample sensors.
[0090] Optionally, the text features may be input into a sensor recognition model to obtain the sensor type of the sensor. Accordingly, the sensor recognition model is trained based on the text features corresponding to the sample sensors and the sensor type labels corresponding to the sample sensors.
[0091] Optionally, the image features may be input into a sensor recognition model to obtain the sensor type of the sensor. Accordingly, the sensor recognition model is trained based on the image features corresponding to the sample sensor and the sensor type label corresponding to the sample sensor.
[0092] Optionally, the text features and image features may be input into a sensor recognition model to obtain the sensor type of the sensor. Accordingly, the sensor recognition model is trained based on the text features and image features corresponding to the sample sensor and the sensor type label corresponding to the sample sensor.
[0093] It should be noted that the sensor recognition model can be constructed based on a common neural network, which will not be elaborated here.
[0094] Exemplarily, the sensor recognition model may include a multi-layer structure, for example: two convolutional layers for extracting local features of image features to obtain feature maps; two pooling layers for reducing the spatial dimension of the feature maps, reducing the number of parameters, and improving computational efficiency; and two fully connected layers for further abstracting features, learning high-level feature combinations, and mapping features to category space.
[0095] Correspondingly, the image features and text features corresponding to the sensor are used as the input of the sensor recognition model. After passing through the convolution layer and the pooling layer, the image features obtain the corresponding feature matrix, which is fused with the corresponding text features and input into the fully connected layer to further learn the high-dimensional features of the traffic. The ReLU activation function is used to enhance the expression ability of the model, and finally the sensor type of the sensor is output.
[0096] In the above embodiment, the detection features corresponding to the sensor are directly processed through the sensor recognition model to obtain the sensor type of the corresponding sensor, which can make the sensor type more accurate and improve the efficiency of sensor type determination.
[0097] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this optional embodiment, the sensor type identification method provided by the present application is introduced in detail.
[0098] See also Figure 4 The sensor type identification method shown includes:
[0099] S410, obtaining the flow data to be measured in the target area where the target object is located;
[0100] The flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0101] S420, separating and processing the flow data to be measured to obtain detection data of each sensor;
[0102] S430, converting the detection data of the sensor into a data packet sequence; the sequence elements in the data packet sequence are arranged in chronological order;
[0103] S440, dividing the data packet sequence into sessions based on a preset division basis to obtain at least one session data packet;
[0104] S450, for any session data packet, dividing the session data packet into windows according to a preset time window corresponding to the session data packet to obtain at least one window data packet;
[0105] S460A, when the detection feature includes a text feature, extracting text features from each window data packet to obtain text features corresponding to the corresponding window data packet;
[0106] S470A, using a text feature corresponding to at least one window data packet as a text feature corresponding to the sensor;
[0107] The text feature includes at least one of an average packet length, a standard deviation of the packet length, a number of data packets, and an average return time.
[0108] S460B, when the detected features include image features, for any window data packet, when the byte length in the window data packet exceeds a preset length threshold, converting the target content data in the window data packet into a grayscale image;
[0109] Wherein, the byte length of the target content data is the same as the preset length threshold;
[0110] S470B, when the byte length in the window data packet does not exceed the preset length threshold, padding the window data packet to the preset length threshold, and converting the padded window data packet into a grayscale image;
[0111] S480B, using a grayscale image corresponding to at least one window data packet as an image feature corresponding to the sensor;
[0112] S490, inputting the detection feature corresponding to the sensor into a sensor identification model to obtain a sensor type of the sensor;
[0113] The sensor recognition model is trained based on the detection features corresponding to the sample sensors and the sensor type labels corresponding to the sample sensors.
[0114] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0115] Based on the same inventive concept, the embodiment of the present application also provides a sensor type identification device for implementing the sensor type identification method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more sensor type identification device embodiments provided below can refer to the limitations of the sensor type identification method above, and will not be repeated here.
[0116] In an exemplary embodiment, Figure 5 As shown, a sensor type identification device is provided, including: a data acquisition module 510, a feature extraction module 520 and a type identification module 530, wherein:
[0117] The data acquisition module 510 is used to acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area for the target object;
[0118] A feature extraction module 520 is used to extract features from the flow data to be measured, and obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0119] The type identification module 530 is used to identify the detection features corresponding to any sensor to obtain the sensor type of the sensor.
[0120] In one embodiment, the feature extraction module 520 includes a first determination unit for separating and processing the flow data to be measured to obtain the detection data of each sensor; and a second determination unit for performing feature extraction on the detection data of any sensor to obtain the detection features corresponding to the sensor.
[0121] In one embodiment, the second determination unit includes a first determination subunit, which is used to convert the detection data of the sensor into a data packet sequence; the sequence elements in the data packet sequence are arranged in chronological order; the second determination subunit is used to perform session division on the data packet sequence based on a preset division basis to obtain at least one session data packet; the division subunit is used to perform window division on the session data packet according to a preset time window corresponding to any session data packet to obtain at least one window data packet; the third determination subunit is used to perform feature extraction on at least one window data packet to obtain the detection feature corresponding to the sensor.
[0122] In one embodiment, if the detection feature includes a text feature, the third determination subunit is specifically used to extract text features from each window data packet to obtain text features corresponding to the corresponding window data packet; the text features corresponding to at least one window data packet are used as the text features corresponding to the sensor; wherein the text features include at least one of the average packet length, the standard deviation of the packet length, the number of data packets and the average return time.
[0123] In one embodiment, if the detected feature includes an image feature, the third determination subunit is specifically used to convert the target content data in the window data packet into a grayscale image for any window data packet, if the byte length in the window data packet exceeds a preset length threshold; wherein the byte length of the target content data is the same as the preset length threshold; if the byte length in the window data packet does not exceed the preset length threshold, pad the window data packet to the preset length threshold, and convert the padded window data packet into a grayscale image; and use the grayscale image corresponding to at least one window data packet as the image feature corresponding to the sensor.
[0124] In one embodiment, the type identification module 530 is used to input the detection features corresponding to the sensor into the sensor identification model to obtain the sensor type of the sensor; wherein the sensor identification model is trained based on the detection features corresponding to the sample sensor and the sensor type label corresponding to the sample sensor.
[0125] Each module in the above-mentioned sensor type identification device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0126] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a sensor type identification method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0127] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0129] Acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0130] Extracting features from the flow data to be measured to obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0131] For any sensor, the detection feature corresponding to the sensor is identified to obtain the sensor type of the sensor.
[0132] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0133] Separate and process the flow data to be measured to obtain the detection data of each sensor;
[0134] For the detection data of any sensor, feature extraction is performed on the detection data of the sensor to obtain the detection features corresponding to the sensor.
[0135] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0136] The detection data of the sensor is converted into a data packet sequence; the sequence elements in the data packet sequence are arranged in time order;
[0137] Based on a preset division basis, the data packet sequence is divided into sessions to obtain at least one session data packet;
[0138] For any session data packet, dividing the session data packet into windows according to a preset time window corresponding to the session data packet to obtain at least one window data packet;
[0139] Feature extraction is performed on at least one window data packet to obtain detection features corresponding to the sensor.
[0140] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0141] Extract text features from each window data packet to obtain text features corresponding to the corresponding window data packet;
[0142] Using the text feature corresponding to at least one window data packet as the text feature corresponding to the sensor;
[0143] The text feature includes at least one of an average packet length, a standard deviation of the packet length, a number of data packets, and an average return time.
[0144] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0145] For any window data packet, when the byte length in the window data packet exceeds a preset length threshold, converting the target content data in the window data packet into a grayscale image; wherein the byte length of the target content data is the same as the preset length threshold;
[0146] When the byte length in the window data packet does not exceed the preset length threshold, the window data packet is padded to the preset length threshold, and the padded window data packet is converted into a grayscale image;
[0147] A grayscale image corresponding to at least one window data packet is used as an image feature corresponding to the sensor.
[0148] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0149] Inputting the detection features corresponding to the sensor into the sensor identification model to obtain the sensor type of the sensor;
[0150] The sensor recognition model is trained based on the detection features corresponding to the sample sensors and the sensor type labels corresponding to the sample sensors.
[0151] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0152] Acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0153] Extracting features from the flow data to be measured to obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0154] For any sensor, the detection feature corresponding to the sensor is identified to obtain the sensor type of the sensor.
[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0156] Separate and process the flow data to be measured to obtain the detection data of each sensor;
[0157] For the detection data of any sensor, feature extraction is performed on the detection data of the sensor to obtain the detection features corresponding to the sensor.
[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0159] The detection data of the sensor is converted into a data packet sequence; the sequence elements in the data packet sequence are arranged in time order;
[0160] Based on a preset division basis, the data packet sequence is divided into sessions to obtain at least one session data packet;
[0161] For any session data packet, dividing the session data packet into windows according to a preset time window corresponding to the session data packet to obtain at least one window data packet;
[0162] Feature extraction is performed on at least one window data packet to obtain detection features corresponding to the sensor.
[0163] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0164] Extract text features from each window data packet to obtain text features corresponding to the corresponding window data packet;
[0165] Using the text feature corresponding to at least one window data packet as the text feature corresponding to the sensor;
[0166] The text feature includes at least one of an average packet length, a standard deviation of the packet length, a number of data packets, and an average return time.
[0167] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0168] For any window data packet, when the byte length in the window data packet exceeds a preset length threshold, converting the target content data in the window data packet into a grayscale image; wherein the byte length of the target content data is the same as the preset length threshold;
[0169] When the byte length in the window data packet does not exceed the preset length threshold, the window data packet is padded to the preset length threshold, and the padded window data packet is converted into a grayscale image;
[0170] A grayscale image corresponding to at least one window data packet is used as an image feature corresponding to the sensor.
[0171] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0172] Inputting the detection features corresponding to the sensor into the sensor identification model to obtain the sensor type of the sensor;
[0173] The sensor recognition model is trained based on the detection features corresponding to the sample sensors and the sensor type labels corresponding to the sample sensors.
[0174] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0175] Acquire the flow data to be measured in the target area where the target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area to the target object;
[0176] Extracting features from the flow data to be measured to obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features;
[0177] For any sensor, the detection feature corresponding to the sensor is identified to obtain the sensor type of the sensor.
[0178] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0179] Separate and process the flow data to be measured to obtain the detection data of each sensor;
[0180] For the detection data of any sensor, feature extraction is performed on the detection data of the sensor to obtain the detection features corresponding to the sensor.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0182] The detection data of the sensor is converted into a data packet sequence; the sequence elements in the data packet sequence are arranged in time order;
[0183] Based on a preset division basis, the data packet sequence is divided into sessions to obtain at least one session data packet;
[0184] For any session data packet, dividing the session data packet into windows according to a preset time window corresponding to the session data packet to obtain at least one window data packet;
[0185] Feature extraction is performed on at least one window data packet to obtain detection features corresponding to the sensor.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0187] Extract text features from each window data packet to obtain text features corresponding to the corresponding window data packet;
[0188] Using the text feature corresponding to at least one window data packet as the text feature corresponding to the sensor;
[0189] The text feature includes at least one of an average packet length, a standard deviation of the packet length, a number of data packets, and an average return time.
[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0191] For any window data packet, when the byte length in the window data packet exceeds a preset length threshold, converting the target content data in the window data packet into a grayscale image; wherein the byte length of the target content data is the same as the preset length threshold;
[0192] When the byte length in the window data packet does not exceed the preset length threshold, the window data packet is padded to the preset length threshold, and the padded window data packet is converted into a grayscale image;
[0193] A grayscale image corresponding to at least one window data packet is used as an image feature corresponding to the sensor.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] Inputting the detection features corresponding to the sensor into the sensor identification model to obtain the sensor type of the sensor;
[0196] The sensor recognition model is trained based on the detection features corresponding to the sample sensors and the sensor type labels corresponding to the sample sensors.
[0197] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0198] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0199] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A sensor type identification method, characterized in that: The method comprises: Acquire flow data to be measured in a target area where a target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area for the target object; Extracting features of the flow data to be measured to obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features; For any sensor, the detection feature corresponding to the sensor is identified to obtain the sensor type of the sensor.
2. The method according to claim 1, characterized in that The feature extraction of the flow data to be measured to obtain the detection features corresponding to each sensor includes: Separating and processing the flow data to be measured to obtain detection data of each sensor; For the detection data of any sensor, feature extraction is performed on the detection data of the sensor to obtain the detection feature corresponding to the sensor.
3. The method according to claim 2, characterized in that The extracting features of the detection data of the sensor to obtain the detection features of the sensor includes: Converting the detection data of the sensor into a data packet sequence; the sequence elements in the data packet sequence are arranged in chronological order; Based on a preset division basis, the data packet sequence is divided into sessions to obtain at least one session data packet; For any session data packet, dividing the session data packet into windows according to a preset time window corresponding to the session data packet to obtain at least one window data packet; Feature extraction is performed on the at least one window data packet to obtain detection features corresponding to the sensor.
4. The method according to claim 3, characterized in that If the detection feature includes a text feature, the feature extraction of the at least one window data packet to obtain the detection feature corresponding to the sensor includes: Extract text features from each window data packet to obtain text features corresponding to the corresponding window data packet; Using the text feature corresponding to the at least one window data packet as the text feature corresponding to the sensor; The text feature includes at least one of an average packet length, a standard deviation of the packet length, a number of data packets, and an average return time.
5. The method according to claim 3, characterized in that: If the detection feature includes an image feature, the step of extracting features from the at least one window data packet to obtain the detection feature corresponding to the sensor includes: For any window data packet, when the byte length in the window data packet exceeds a preset length threshold, converting the target content data in the window data packet into a grayscale image; wherein the byte length of the target content data is the same as the preset length threshold; When the byte length in the window data packet does not exceed the preset length threshold, padding the window data packet to the preset length threshold, and converting the padded window data packet into a grayscale image; The grayscale image corresponding to the at least one window data packet is used as the image feature corresponding to the sensor.
6. The method according to claim 3, characterized in that The identifying the detection feature corresponding to the sensor to obtain the sensor type of the sensor includes: Inputting the detection feature corresponding to the sensor into a sensor identification model to obtain the sensor type of the sensor; The sensor recognition model is trained based on detection features corresponding to sample sensors and sensor type labels corresponding to the sample sensors.
7. A sensor type identification device, characterized in that: The device comprises: A data acquisition module, used to acquire flow data to be measured in a target area where a target object is located; wherein the flow data to be measured includes detection data sent by at least one sensor arranged in the target area for the target object; A feature extraction module, used to extract features from the flow data to be measured, and obtain detection features corresponding to each sensor; wherein the detection features include at least one of image features and text features; The type identification module is used to identify the detection characteristics corresponding to any sensor and obtain the sensor type of the sensor.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.