Building communication protocol identification methods, apparatus, equipment and computer-readable media

CN120017563BActive Publication Date: 2026-08-14GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

对于复杂的协议标准,人工分析和定义协议需要投入大量的时间和人力成本

Benefits of technology

[0017]This application utilizes deep learning technology to achieve automatic identification and standard definition of communication protocols, overcoming the time-consuming, labor-intensive, and subjectively susceptible nature of traditional manual methods. By training a neural network model with a large protocol dataset, it automatically extracts features from different protocols, significantly improving work efficiency and ensuring the accuracy and consistency of protocol standard definitions. This effectively avoids inconsistencies caused by differences in human interpretation. This application possesses excellent versatility and adaptability, and can be widely applied to various types of communication protocols. Whether common or newly emerging, protocols can be effectively identified and defined, effectively addressing continuous updates and changes in protocols and maintaining the practicality and advancement of the technology. For building networks, this application forms a complete and efficient building communication protocol identification system, from collecting and preprocessing communication signals, constructing a convolutional neural network model, optimizing the model using historical data, and finally identifying standard protocol frames from access data. This system can accurately handle the complex and diverse communication protocols within buildings, ensuring stable communication and collaborative operation between various devices in the building, and improving the level of intelligent building management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017563B_ABST
    Figure CN120017563B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, device, and computer-readable medium for identifying building communication protocols. The method includes: acquiring communication signals from a building network and preprocessing and marking the communication signals with communication protocol types to obtain first communication data; identifying the byte meanings of the first communication data to determine the corresponding first standard protocol frame; constructing a convolutional neural network model for identifying communication protocol types using the first standard protocol frame; optimizing the recognition accuracy of the convolutional neural network model using historical communication protocol frames to obtain an optimal convolutional neural network model; and identifying second communication data accessed by a digital docking station corresponding to the building network using the optimal convolutional neural network model to obtain a second standard protocol frame corresponding to the target communication data. This application solves the problem in the prior art where building networks struggle to achieve self-identification of communication protocols between devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication protocol identification technology, and in particular to a method, apparatus, device and computer-readable medium for identifying building communication protocols. Background Technology

[0002] With the development of information technology and the advent of the digital age, communication protocols play a crucial role in device-to-device communication and data exchange across numerous fields (such as network communication, data exchange, the Internet of Things, and smart manufacturing). Communication protocols comprehensively standardize data formats, transmission methods, and error detection and correction mechanisms, thereby ensuring normal communication and data exchange between devices and serving as a key element for efficient operation in various fields. Traditionally, the identification and definition of communication protocols in building systems relied primarily on manual methods, requiring professionals to analyze and define the protocols. When faced with complex building control communication protocols, professionals need to thoroughly study the protocol text, observe actual communication data, and rely on their professional knowledge and experience to determine the various standards of the protocol. For complex protocol standards, manual analysis and definition require a significant investment of time and manpower.

[0003] Existing communication protocol identification technologies mainly rely on deep learning. While this can achieve automatic identification of communication protocols, it is difficult to adapt to building systems with numerous devices and complex communication protocols. It cannot meet the comprehensive and accurate protocol identification requirements of building systems. Therefore, there is no automatic communication protocol identification method suitable for building systems, making it difficult to achieve self-identification of communication protocols between devices in a building network.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a building communication protocol identification method, apparatus, device, and computer-readable medium to solve the aforementioned technical problem that "building networks in the prior art have difficulty in achieving self-identification of communication protocols between devices."

[0006] According to one aspect of the embodiments of this application, this application provides a method for identifying building communication protocols, comprising: collecting communication signals of a building network and preprocessing and marking the communication signals with communication protocol types to obtain first communication data; identifying the byte meanings of the first communication data to determine the corresponding first standard protocol frame; constructing a convolutional neural network model for identifying communication protocol types using the first standard protocol frame; optimizing the recognition rate of the convolutional neural network model using historical communication protocol frames to obtain an optimal convolutional neural network model; and identifying second communication data accessed by a digital docking station corresponding to the building network using the optimal convolutional neural network model to obtain a second standard protocol frame corresponding to the second communication data.

[0007] Optionally, the step of collecting communication signals from the building network and preprocessing and marking the communication signals to obtain first communication data includes: capturing communication signals between different devices through a communication protocol parser of the building network; preprocessing the communication signals to obtain qualified communication signals, wherein the preprocessing includes at least data cleaning and format conversion; decoding the qualified communication signals to convert the communication signals from byte format to physical format; and marking the communication signals based on the communication protocol type to obtain the first communication data.

[0008] Optionally, identifying the byte meaning of the first communication data to determine the corresponding first standard protocol frame, and constructing a convolutional neural network model for identifying the communication protocol type using the first standard protocol frame, includes: segmenting the communication protocol type of the first communication data byte by byte to obtain the byte meaning corresponding to all bytes in the first communication data; defining the standard protocol corresponding to the first communication data according to the byte meaning; generating a first standard protocol frame according to the standard protocol; extracting key features corresponding to the first standard protocol frame; generating a first feature vector according to the key features; and training the first feature vector to obtain a convolutional neural network model for identifying the communication protocol.

[0009] Optionally, the step of training the first feature vector to obtain a convolutional neural network model for identifying communication protocols includes: dividing the first feature vector into a training set and a validation set based on preset rules; inputting the first feature vector in the training set into the input layer of the convolutional neural network for forward propagation, and obtaining the predicted probability distribution of each protocol category at the output layer; calculating the gradients of the convolutional layer, pooling layer, and fully connected layer from the output layer using a backpropagation algorithm based on the loss function of the convolutional neural network; updating the weight parameters and bias parameters of the convolutional neural network using an optimization algorithm based on the gradients and a preset learning rate to obtain the convolutional neural network model; iteratively executing the forward propagation, backpropagation, and parameter update steps until the maximum number of iterations is reached; evaluating the performance metrics of the convolutional neural network model based on the validation set; and adjusting the parameters of the convolutional neural network model according to the performance metrics to obtain the final convolutional neural network model.

[0010] Optionally, before optimizing the recognition rate of the convolutional neural network model using historical communication protocol frames to obtain the optimal convolutional neural network model, the method further includes: constructing a generative adversarial network corresponding to the first standard protocol; inputting the first standard protocol frame into the generative adversarial network to obtain the corresponding protocol type frame; adding the protocol type frame to the corresponding protocol type library using a preset discrimination model; and updating the convolutional neural network model based on the protocol type library as the output of the convolutional neural network model.

[0011] Optionally, the step of optimizing the recognition rate of the convolutional neural network model using historical communication protocol frames to obtain the optimal convolutional neural network model includes: acquiring historical communication protocol frames of the building network and extracting corresponding historical key features; annotating the historical communication protocol frames based on the historical key features; verifying the recognition rate of the convolutional neural network model based on the annotated historical communication protocol frames, and adjusting the parameters of the convolutional neural network model according to the verification result to obtain the optimal communication protocol frame.

[0012] Optionally, the step of identifying the second communication data accessed by the digital dock corresponding to the building network through the optimal convolutional neural network model to obtain the second standard protocol frame corresponding to the target communication data includes: acquiring the second communication data of the digital dock accessing the building network and preprocessing the second communication data; segmenting the preprocessed second communication data into bytes and generating a second feature vector based on the segmented second communication data; inputting the second feature vector into the optimal convolutional neural network model and calculating the corresponding protocol feature pattern through forward propagation; determining the communication protocol type, data format, and communication rules corresponding to the second communication data according to the protocol feature pattern; and generating a second standard protocol frame based on the communication protocol type, the data format, and the communication rules.

[0013] According to another aspect of the embodiments of this application, this application provides a building communication protocol identification device, comprising: a signal processing module, configured to collect communication signals of a building network and preprocess the communication signals and mark the communication protocol type to obtain first communication data; a model building module, configured to identify the byte meaning of the first communication data to determine the corresponding first standard protocol frame, and construct a convolutional neural network model for identifying the communication protocol type through the first standard protocol frame; a model optimization module, configured to optimize the recognition degree of the convolutional neural network model through historical communication protocol frames to obtain an optimal convolutional neural network model; and a protocol identification module, configured to identify second communication data accessed by a digital dock corresponding to the building network through the optimal convolutional neural network model to obtain a second standard protocol frame corresponding to the target communication data.

[0014] According to another aspect of the embodiments of this application, this application provides an electronic device, including a memory, a processor, a communication interface and a communication bus. The memory stores a computer program that can run on the processor. The memory and the processor communicate with each other through the communication bus and the communication interface. When the processor executes the computer program, it implements the steps of the above-described building communication protocol identification method.

[0015] According to another aspect of the embodiments of this application, this application also provides a computer-readable medium having processor-executable non-volatile program code, the program code causing the processor to execute the above-described building communication protocol identification method.

[0016] Compared with related technologies, the technical solutions provided in this application have the following advantages:

[0017] This application utilizes deep learning technology to achieve automatic identification and standard definition of communication protocols, overcoming the time-consuming, labor-intensive, and subjectively susceptible nature of traditional manual methods. By training a neural network model with a large protocol dataset, it automatically extracts features from different protocols, significantly improving work efficiency and ensuring the accuracy and consistency of protocol standard definitions. This effectively avoids inconsistencies caused by differences in human interpretation. This application possesses excellent versatility and adaptability, and can be widely applied to various types of communication protocols. Whether common or newly emerging, protocols can be effectively identified and defined, effectively addressing continuous updates and changes in protocols and maintaining the practicality and advancement of the technology. For building networks, this application forms a complete and efficient building communication protocol identification system, from collecting and preprocessing communication signals, constructing a convolutional neural network model, optimizing the model using historical data, and finally identifying standard protocol frames from access data. This system can accurately handle the complex and diverse communication protocols within buildings, ensuring stable communication and collaborative operation between various devices in the building, and improving the level of intelligent building management. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the hardware environment for a building communication protocol identification method provided in an embodiment of this application;

[0021] Figure 2 This is a schematic flowchart of a building communication protocol identification method according to an embodiment of this application;

[0022] Figure 3 This is a schematic diagram of the structure of a digital base provided according to an embodiment of this application;

[0023] Figure 4 This is a schematic diagram of a convolutional neural network model provided according to an embodiment of this application;

[0024] Figure 5 This is a block diagram of a building communication protocol identification device according to an embodiment of this application;

[0025] Figure 6 This is a schematic diagram of an optional electronic device structure provided in an embodiment of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0027] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustration and has no specific meaning in itself. Therefore, "module" and "part" may be used interchangeably.

[0028] In related technologies, the communication protocols between devices in a building network are mainly identified manually. However, manual identification is subject to subjective influences, resulting in large errors, and it cannot achieve self-identification of communication protocols.

[0029] To address the problems mentioned in the background art, according to one aspect of the embodiments of this application, an embodiment of a building communication protocol identification method is provided.

[0030] Optionally, in the embodiments of this application, the above-described building communication protocol identification method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal 101 and server 103. Figure 1 As shown, server 103 is connected to terminal 101 via a network and can be used to provide services to the terminal or clients installed on the terminal. Database 105 can be set up on the server or independently of the server to provide data storage services for server 103. The network mentioned above includes, but is not limited to, wide area network, metropolitan area network or local area network. Terminal 101 includes, but is not limited to, PC, mobile phone, tablet computer, etc.

[0031] The building communication protocol identification method in this application embodiment can be executed by server 103, or it can be jointly executed by server 103 and terminal 101, such as... Figure 2 As shown, the method may include the following steps:

[0032] Step S202: Collect the communication signals of the building network and preprocess the communication signals and mark the communication protocol type to obtain the first communication data.

[0033] Optionally, the communication signals of the building network are collected, and the communication signals are preprocessed and the communication protocol type is marked to obtain the first communication data, including:

[0034] The communication signals between different devices are captured using a building network communication protocol parser.

[0035] To obtain qualified communication signals, the communication signals are preprocessed. The preprocessing includes at least data cleaning and format conversion.

[0036] Decode qualified communication signals to convert them from byte format to physical format;

[0037] The communication signals are labeled based on the communication protocol type to obtain the first communication data.

[0038] Understandably, this embodiment is mainly used for identifying communication protocols in building networks. It uses a convolutional neural network combined with a digital base to identify the communication protocols between different devices in the target area's building network, such as... Figure 3 The diagram shows the structure of the digital base in this embodiment, including a logic execution end and a device access end. The logic execution end includes an AI control unit and an AI neural network model. AI control includes functions such as high-efficiency data center control, air-cooled unit group control, refrigeration and cold storage group control, and multi-unit intelligent control based on a cloud-based operating system. The AI ​​neural network model includes an input layer, a hidden layer, and an output layer. Communication protocols are input to the input layer, and the corresponding communication protocol standard is output through the output layer. The device access end includes functions such as data parsing, data interface, and data access. Data parsing includes data cleaning, data transformation, and data classification, mainly used for data preprocessing and classification. Data interfaces include types such as MQTT, HTTP, OPC, and Modbus TCP. Data access includes types such as static datasets, HTTP datasets, MQTT datasets, and JSON datasets. This embodiment uses a temperature control system in a building network as an example. Of course, this embodiment is also applicable to building intelligent control systems such as access control systems, parking management systems, and intelligent energy consumption management systems.

[0039] Specifically, in a building temperature control system, various temperature sensors (such as wall-mounted temperature sensors and pipe temperature sensors) and control devices (such as air conditioning units and heating valve controllers) are pre-deployed. These devices are connected to the building intelligent control system via communication protocols such as CAN bus or Ethernet (CAN bus is used as an example in this embodiment). A CAN tool is used to capture communication signals between different temperature control devices. For example, for CAN bus communication, the CAN tool captures temperature data, device status information, and control commands transmitted on the CAN bus. The captured signals are then pre-processed. Abnormal temperature values ​​(such as values ​​significantly exceeding the normal ambient temperature range) caused by sensor malfunctions or communication interference, as well as duplicate data records, are removed to ensure data accuracy and integrity. The data formats sent by different sensors are uniformly converted to a standard format suitable for subsequent processing. For example, temperature data represented in hexadecimal by some sensors is converted to decimal values ​​and arranged in chronological order. The cleaned and format-converted qualified communication signals are decoded, converting them from byte format into actual physical temperature values ​​and device status information. For example, based on the byte definition of the CAN protocol, specific byte combinations are parsed into corresponding temperature measurement values ​​(accurate to one decimal place) and air conditioning operating modes (cooling, heating, ventilation, etc.). The temperature control protocol under the CAN protocol is used to label the communication signals, clarifying the protocol category and specific meaning of each data sample, thus obtaining the first communication data. For example, data transmitted from a wall-mounted temperature sensor via the CAN protocol is labeled "CAN-Wall-mounted Temperature Sensor Data," and its corresponding temperature range, acquisition time, and other metadata information are recorded.

[0040] In the above embodiments, by removing duplicate and erroneous data from communication signals, the data used for training the convolutional neural network model can be made more accurate and reliable. In building networks, the communication environment of various devices is complex and subject to numerous interference factors. Data cleaning can effectively reduce the negative impact of this "noise" data on the model, enabling the model to learn based on high-quality data and thus improving the accuracy of protocol identification. Different devices may use different data formats for communication. Converting them to a standard format simplifies subsequent data processing, improves data processing efficiency, and avoids data parsing errors caused by inconsistent formats, further enhancing data accuracy and usability, and improving the accuracy of protocol identification. By converting communication signals from byte format to physical format, the byte data, originally existing in binary form, is transformed into data with actual physical meaning (such as temperature values, device status codes, etc.), improving data readability and understandability. This allows the model to more easily learn the protocol features and patterns in the data, contributing to improved training effects and performance of the protocol identification model. Labeling communication signals based on communication protocol types clearly defines the protocol category of each data sample, helping the convolutional neural network model to learn the characteristics of different protocols in a targeted manner and improving its ability to identify various protocols.

[0041] Step S204: Identify the meaning of the bytes in the first communication data to determine the corresponding first standard protocol frame, and construct a convolutional neural network model for identifying the communication protocol type using the first standard protocol frame.

[0042] Optionally, the meaning of the bytes in the first communication data is identified to determine the corresponding first standard protocol frame, and a convolutional neural network model for identifying the communication protocol type is constructed using the first standard protocol frame, including:

[0043] The communication protocol type of the first communication data is divided into bytes to obtain the byte meanings corresponding to all bytes in the first communication data.

[0044] Define the standard protocol corresponding to the first communication data according to the meaning of the bytes, and generate the first standard protocol frame according to the standard protocol.

[0045] Extract the key features corresponding to the first standard protocol frame, and generate the first feature vector based on the key features;

[0046] The first feature vector is used to train a model to obtain a convolutional neural network model for identifying communication protocols.

[0047] In the above implementation, segmenting the communication protocol type of the first communication data byte by byte allows for a deeper understanding of the meaning carried by each byte, improving the accuracy of protocol identification. Defining the standard protocol corresponding to the first communication data based on the byte meaning and generating a first standard protocol frame signifies the integration and organization of scattered and diverse communication data according to a unified standard. In building networks, devices may interact using different versions or slightly different communication protocols. Defining a standard protocol transforms this into a standardized protocol framework that is easy for the model to identify, helping to eliminate identification confusion caused by protocol differences. It also allows the model to summarize the commonalities and characteristics of protocol types based on a unified standard, improving the ability to distinguish and identify different protocols and enhancing the model's versatility and generalization ability. By extracting corresponding key features from the first standard protocol frame and generating a first feature vector, when faced with massive and complex communication protocol data, the high dimensionality and information redundancy of the original data can lead to inefficiency and overfitting when directly used for model training. By extracting key features (such as the value range of specific bytes, byte sequence patterns, and data frame length features), the most representative and discriminative information can be extracted, reducing interference from irrelevant information and improving the model's accuracy and robustness in identifying protocol types. Based on the extracted first feature vector, a convolutional neural network model is constructed through training. Convolutional neural networks excel at processing data with spatial structure or sequence features, and communication protocol data precisely matches these characteristics, thus improving the efficiency and accuracy of protocol identification.

[0048] Optionally, a convolutional neural network model for identifying communication protocols is obtained by training the first feature vector, including:

[0049] The first feature vector is divided into a training set and a validation set based on a preset rule;

[0050] The first feature vector in the training set is input into the input layer of the convolutional neural network for forward propagation, and the predicted probability distribution of each protocol category is obtained in the output layer.

[0051] Starting from the output layer, the gradients of the convolutional, pooling, and fully connected layers are calculated based on the loss function of the convolutional neural network using the backpropagation algorithm.

[0052] Based on the gradient and a pre-set learning rate, the weight parameters and bias parameters of the convolutional neural network are updated using an optimization algorithm to obtain the convolutional neural network model.

[0053] The forward propagation, backward propagation, and parameter update steps are executed iteratively until the maximum number of iterations is reached. The performance metrics of the convolutional neural network model are evaluated based on the validation set, and the parameters of the convolutional neural network model are adjusted according to the performance metrics to obtain the final convolutional neural network model.

[0054] In the above implementation, the forward propagation stage, based on the input feature vector, processes it through each layer of the convolutional neural network to output the predicted probability distribution of each protocol category, achieving a mapping from features to protocol category judgment. This provides an intuitive basis for accurate identification, improving recognition efficiency and accuracy. The backpropagation algorithm calculates the gradient of each layer based on the loss function, precisely identifying the impact of each parameter on the result. It finds the adjustment direction among the network parameters, prompting the convolutional neural network model to specifically correct the parameters, gradually optimizing performance and improving protocol recognition. Through multiple iterative training steps, repeatedly performing forward and backpropagation and parameter update steps, and combining validation set evaluation to dynamically adjust parameters, the maximum number of iterations is reached to obtain the final model. This achieves continuous model optimization and stable convergence, ensuring that the convolutional neural network model can more accurately and efficiently identify communication protocol types.

[0055] refer to Figure 4 The diagram shows a convolutional neural network model in this embodiment. Data from the digital dock is used for training via a neural network trainer. Each communication protocol is input into the input layer of the convolutional neural network model, processed by the hidden layers, and then output as a corresponding standard protocol through the output layer. In this embodiment, after obtaining the first communication data, the communication protocol type of the first communication data is first segmented byte-by-byte, and the meaning of each byte in the temperature control protocol is analyzed. For example, in a CAN protocol temperature data frame, one byte represents the integer part of the temperature, another byte represents the decimal part, and other bytes are used for device identification and verification. Based on the byte meanings, the standard protocol corresponding to the first communication data is defined, determining the structure of the data frame, the meaning of each field, and the rules for data transmission. For example, a CAN temperature protocol standard is established, specifying the starting byte of the data frame, the position and length of the temperature data bytes, the encoding method of the control command bytes, etc. Then, a first standard protocol frame is generated based on this standard for subsequent model training. Then, key features corresponding to the first standard protocol frame are extracted, such as the numerical range and trend of the temperature data, the fixed pattern of the byte sequence, and the transition rules of the device state. The extracted features are converted into numerical form to generate a first feature vector. For example, for temperature data features, the average temperature, highest temperature, lowest temperature, and temperature fluctuation range over a period of time can be statistically analyzed and used as part of the feature vector; for byte sequence features, the frequency and combination of specific bytes can be quantized and encoded.

[0056] Furthermore, the obtained first feature vector is used to train a convolutional neural network (CNN) model for identifying communication protocols. First, the first feature vector is divided into a training set and a validation set based on a preset rule (e.g., 80% as the training set and 20% as the validation set). The first feature vector in the training set is input into the input layer of the CNN for forward propagation, resulting in a predicted probability distribution for each protocol category at the output layer. For example, the probability that the output might be "CAN-temperature control protocol" is 0.8. Starting from the output layer, the gradients of the convolutional, pooling, and fully connected layers are calculated using the CNN's loss function (e.g., cross-entropy loss function) to determine the update direction and step size for each parameter. Based on the gradients and a preset learning rate (e.g., 0.001), the weight and bias parameters of the CNN are updated using the Adam optimizer to obtain the CNN model. The forward propagation, backward propagation, and parameter update steps are executed iteratively until the maximum number of iterations (e.g., 1000) is reached. The performance metrics of the convolutional neural network model are evaluated based on the validation set. These performance metrics include accuracy, precision, and recall. The parameters of the convolutional neural network model are adjusted according to the performance metrics (e.g., increasing the depth of the convolutional layers, adjusting the size of the convolutional kernels, etc.) to obtain the final convolutional neural network model.

[0057] Step S206: Optimize the recognition rate of the convolutional neural network model by using historical communication protocol frames to obtain the optimal convolutional neural network model.

[0058] Optionally, before optimizing the recognition rate of the convolutional neural network model using historical communication protocol frames to obtain the optimal convolutional neural network model, the following steps are also included:

[0059] Construct a generative adversarial network corresponding to the first standard protocol;

[0060] The first standard protocol frame is input into the generative adversarial network to obtain the corresponding protocol type frame;

[0061] The protocol type frames are added to the corresponding protocol type library by using a preset differentiation model;

[0062] The convolutional neural network model is updated based on the protocol type library as its output.

[0063] In the above implementation, by constructing a Generative Adversarial Network (GAN) corresponding to the first standard protocol and inputting the first standard protocol frame into it to obtain the corresponding protocol type frame, the data sample is effectively expanded. GAN can generate new protocol type frames that are similar to real protocol frames but have certain variations, simulating more possible protocol situations and enriching the diversity of data. In actual building network environments, communication protocols may be affected by various factors and undergo subtle changes. The generated data can help the model better adapt to these changes and improve the model's ability to identify complex and variable protocol situations. Data augmentation compensates for the potential lack of real data, especially for some special or rare protocol states, allowing the model to have more samples to learn from during training, thereby improving its generalization performance, reducing over-reliance on specific data patterns, and enhancing the model's stability and accuracy in different scenarios. Adding the generated protocol type frames to the corresponding protocol type library by using a preset discrimination model helps to further refine the protocol classification system. The discrimination model accurately classifies protocol frames according to their characteristics, making the protocol type library more complete and orderly. As newly generated protocol type frames are continuously classified and stored, the model can more accurately identify the communication protocols between different devices in the building network.

[0064] Optionally, the optimal convolutional neural network model is obtained by optimizing the recognition accuracy of the convolutional neural network model using historical communication protocol frames, including:

[0065] Obtain historical communication protocol frames of the building network and extract corresponding historical key features;

[0066] Historical communication protocol frames are annotated based on key historical features;

[0067] The recognition accuracy of the convolutional neural network model is verified based on the labeled historical communication protocol frames, and the parameters of the convolutional neural network model are adjusted according to the verification results to obtain the optimal communication protocol frame.

[0068] In the above implementation, historical communication protocol frames are annotated based on key historical features. These annotated frames guide the model to more accurately grasp the correlation between protocol features and actual application scenarios, thereby improving the model's recognition accuracy and decision-making rationality in complex real-world scenarios. Verifying the recognition performance of the convolutional neural network model based on these annotated frames allows for a direct and accurate evaluation of the model's performance on actual historical data. By comparing the model's predictions of historical data with known annotation information, it is clear which protocol types the model misidentifies and in which scenarios its judgments are inaccurate. Adjusting the parameters of the convolutional neural network model based on the verification results can specifically address the model's shortcomings, achieving a gradual improvement in model performance. Through continuous feedback and adjustment, the model can more accurately fit the protocol features and patterns in historical data, thereby improving its ability and accuracy in recognizing future communication protocol data. Ultimately, this yields the optimal communication protocol frame recognition model, providing strong technical support for the efficient and stable operation of building networks, ensuring that communication protocols between various devices are accurately identified and correctly processed, and improving the performance and reliability of the entire building intelligent system.

[0069] Specifically, a Generative Adversarial Network (GAN) corresponding to the first standard protocol is constructed: A generator network structure is designed, taking a random noise vector as input, and progressively generating simulated temperature protocol type frames through multiple hidden layers (including fully connected layers and transposed convolutional layers), making them similar to real first standard protocol frames in structure and data features. A discriminator network structure is constructed, used to distinguish whether the input protocol frame comes from real data or data generated by the generator. After extracting features through multiple hidden layers, it outputs a probability value representing the authenticity of the data. Loss functions for the generator and discriminator are defined; for example, the generator's loss function maximizes the probability of the discriminator misclassifying, and the discriminator's loss function maximizes the probability of accurately distinguishing between real and fake data. The GAN is trained using temperature protocol data. By alternately updating the parameters of the generator and discriminator, the generator can generate more realistic temperature protocol type frames, and the discriminator can more accurately distinguish between real and fake data. The first standard protocol frame is input into the GAN to obtain the corresponding protocol type frame. The generated protocol type frame is used as an expanded training dataset to help the convolutional neural network model better learn various features and changes in the temperature protocol.

[0070] Furthermore, protocol type frames are added to the corresponding protocol type library through a preset differentiation model. The differentiation model classifies and stores the protocol frames according to their characteristics; for example, different types of CAN temperature protocol frames are stored in their respective libraries. Historical communication protocol frames of the building network are acquired, and corresponding key historical features are extracted, including historical temperature change trends, equipment runtime, and temperature control modes in different seasons. Historical communication protocol frames are labeled based on these key historical features. The recognition accuracy of the convolutional neural network model is verified based on the labeled historical communication protocol frames. Historical data is input into the convolutional neural network model to determine the degree of matching between the model's predictions and the actual situation, checking whether the model can accurately identify the type and meaning of historical protocol frames. The parameters of the convolutional neural network model are adjusted based on the verification results to obtain the optimal communication protocol frame recognition model.

[0071] Step S208: Identify the second communication data accessed by the digital base station corresponding to the building network using the optimal convolutional neural network model to obtain the second standard protocol frame corresponding to the target communication data.

[0072] Optionally, the second communication data accessed by the digital dock corresponding to the building network is identified using an optimal convolutional neural network model to obtain the second standard protocol frame corresponding to the second communication data, including:

[0073] Acquire the second communication data of the digital base station connected to the building network and preprocess the second communication data;

[0074] The preprocessed second communication data is divided into bytes, and a second feature vector is generated based on the divided second communication data.

[0075] The second feature vector is input into the optimal convolutional neural network model, and the corresponding protocol feature pattern is obtained through forward propagation.

[0076] The communication protocol type, data format, and communication rules corresponding to the second communication data are determined based on the protocol feature pattern.

[0077] A second standard protocol frame is generated based on the communication protocol type, data format, and communication rules.

[0078] In the above embodiments, acquiring and preprocessing the second communication data of the digital base station accessing the building network effectively removes interference factors such as noise, error values, and non-standard formats. By segmenting the preprocessed second communication data into bytes and generating a second feature vector based on the segmented data, the key information contained in the data can be deeply mined, and the most representative and distinguishable features can be extracted. Communication protocol data often has a complex byte structure. By extracting the core features related to the protocol and presenting them as feature vectors to the optimal convolutional neural network model, irrelevant information interference is reduced, greatly improving the accuracy of the optimal convolutional neural network model in identifying different protocol types and enhancing the model's discrimination ability. By inputting the second feature vector into the optimal convolutional neural network model and calculating the corresponding protocol feature pattern through forward propagation, the logic of manually analyzing protocol features and making judgments is simulated, realizing automated, efficient, and accurate protocol identification, and improving the efficiency and reliability of the entire protocol identification process. Based on the defined communication protocol type, data format, and communication rules, a second standard protocol frame is generated, which enables collaborative work between different devices in the building network. The standard protocol frame is easy to understand and apply, and facilitates the various control subsystems of each building network to parse and process communication data according to unified rules. This ensures smooth and orderly communication throughout the building network, promotes the improvement of intelligent management, and achieves efficient collaboration among devices and overall stable operation.

[0079] Specifically, the second communication data (i.e., real-time data transmitted from temperature sensors and control devices at the current moment) of the digital base connected to the building network is acquired and preprocessed. The previous data cleaning and format conversion steps are repeated to ensure that the data quality and format meet the model input requirements. The preprocessed second communication data is segmented into bytes, and a second feature vector is generated based on the segmented second communication data. Features of the current temperature data and device status information are extracted and transformed into feature vectors in the same format as those used during model training. The second feature vector is input into the optimal convolutional neural network model, and the corresponding protocol feature pattern is obtained through forward propagation. Based on the learned temperature protocol features, the model determines the protocol type of the current data and extracts key information such as temperature values ​​and device control commands. The communication protocol type (e.g., CAN temperature control protocol), data format (e.g., the specific meaning and order of data bytes), and communication rules (e.g., data transmission frequency and response mechanism) corresponding to the second communication data are determined based on the protocol feature pattern. A second standard protocol frame is generated based on the communication protocol type, data format, and communication rules. This second standard protocol frame represents the current communication status and position information of the temperature control device. Finally, the building intelligent control system automatically makes intelligent control decisions for the corresponding device based on the second standard protocol frame. For example, if the optimal convolutional neural network model identifies that the current temperature is higher than the set comfortable temperature range, and the communication protocol indicates that the air conditioner is in an adjustable state, the building intelligent control system will send a cooling command to the air conditioning unit. By adjusting parameters such as the air conditioner's cooling power and fan speed, the indoor temperature will be maintained within a comfortable range, thus achieving intelligent control and management of the temperature control system.

[0080] According to another aspect of the embodiments of this application, such as Figure 5 As shown, a building communication protocol identification device is provided, comprising:

[0081] The signal processing module 501 is used to collect communication signals from the building network and preprocess the communication signals and mark the communication protocol type to obtain the first communication data.

[0082] The model building module 503 is used to identify the byte meaning of the first communication data to determine the corresponding first standard protocol frame, and to build a convolutional neural network model for identifying the communication protocol type through the first standard protocol frame.

[0083] The model optimization module 505 is used to optimize the recognition rate of the convolutional neural network model through historical communication protocol frames to obtain the optimal convolutional neural network model.

[0084] The protocol identification module 507 is used to identify the second communication data accessed by the digital base station corresponding to the building network through the optimal convolutional neural network model, and obtain the second standard protocol frame corresponding to the second communication data.

[0085] It should be noted that the signal processing module 501 in this embodiment can be used to execute step S202 in this application embodiment, the model building module 503 in this embodiment can be used to execute step S204 in this application embodiment, the model optimization module 505 in this embodiment can be used to execute step S206 in this application embodiment, and the protocol identification module 507 in this embodiment can be used to execute step S208 in this application embodiment.

[0086] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented either through software or through hardware.

[0087] According to another aspect of the embodiments of this application, this application provides an electronic device, such as... Figure 6 As shown, the system includes a memory 601, a processor 603, a communication interface 605, and a communication bus 607. The memory 601 stores a computer program that can run on the processor 603. The memory 601 and the processor 603 communicate through the communication interface 605 and the communication bus 607. When the processor 603 executes the computer program, it implements the steps of the above method.

[0088] The memory and processor in the aforementioned electronic devices communicate with each other via a communication bus and a communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0089] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0090] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0091] According to another aspect of the embodiments of this application, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the above embodiments.

[0092] Optionally, in embodiments of this application, the computer-readable medium is configured to store program code for the processor to perform the following steps:

[0093] Step S202: Collect the communication signals of the building network and preprocess the communication signals and mark the communication protocol type to obtain the first communication data.

[0094] Step S204: Identify the meaning of the bytes in the first communication data to determine the corresponding first standard protocol frame, and construct a convolutional neural network model for identifying the communication protocol type using the first standard protocol frame.

[0095] Step S206: Optimize the recognition rate of the convolutional neural network model by using historical communication protocol frames to obtain the optimal convolutional neural network model.

[0096] Step S208: Identify the second communication data accessed by the digital base station corresponding to the building network using the optimal convolutional neural network model to obtain the second standard protocol frame corresponding to the second communication data.

[0097] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.

[0098] In specific implementation, the embodiments of this application can be referred to the above embodiments and have corresponding technical effects.

[0099] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0100] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0101] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0102] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0103] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

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

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

[0106] If the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks. It should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0107] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for identifying building communication protocols, characterized in that, include: The communication signals of the building network are collected, and the communication signals are preprocessed and the communication protocol type is marked to obtain the first communication data; Identify the byte meanings of the first communication data to determine the corresponding first standard protocol frame, and construct a convolutional neural network model for identifying the communication protocol type using the first standard protocol frame; The optimal convolutional neural network model is obtained by optimizing the recognition accuracy of the convolutional neural network model using historical communication protocol frames. The second communication data accessed by the digital base station corresponding to the building network is identified by the optimal convolutional neural network model to obtain the second standard protocol frame corresponding to the second communication data. The step of identifying the byte meaning of the first communication data to determine the corresponding first standard protocol frame, and constructing a convolutional neural network model for identifying the communication protocol type using the first standard protocol frame, specifically includes: segmenting the communication protocol type of the first communication data byte by byte to obtain the byte meaning of all bytes in the first communication data; defining the standard protocol corresponding to the first communication data according to the byte meaning; generating a first standard protocol frame according to the standard protocol; extracting key features corresponding to the first standard protocol frame; generating a first feature vector according to the key features; and training the first feature vector to obtain a convolutional neural network model for identifying the communication protocol. The step of identifying the second communication data accessed by the digital docking station corresponding to the building network using the optimal convolutional neural network model to obtain the second standard protocol frame corresponding to the second communication data includes: acquiring the second communication data of the digital docking station accessing the building network and preprocessing the second communication data; segmenting the preprocessed second communication data into bytes and generating a second feature vector based on the segmented second communication data; inputting the second feature vector into the optimal convolutional neural network model and calculating the corresponding protocol feature pattern through forward propagation; determining the communication protocol type, data format, and communication rules corresponding to the second communication data according to the protocol feature pattern; and generating a second standard protocol frame based on the communication protocol type, the data format, and the communication rules.

2. The building communication protocol identification method according to claim 1, characterized in that, The process of collecting building network communication signals, preprocessing the communication signals, and marking the communication protocol type to obtain first communication data includes: The communication signals between different devices are captured using a building network communication protocol parser. The communication signal is preprocessed to obtain a qualified communication signal. The preprocessing includes at least data cleaning and format conversion. The qualified communication signal is decoded to convert the communication signal from byte format to physical format; The communication signals are labeled based on the communication protocol type to obtain the first communication data.

3. The building communication protocol identification method according to claim 1, characterized in that, The step of training the first feature vector to obtain a convolutional neural network model for identifying communication protocols includes: The first feature vector is divided into a training set and a validation set based on preset rules; The first feature vector in the training set is input into the input layer of the convolutional neural network for forward propagation, and the predicted probability distribution of each protocol category is obtained in the output layer. Starting from the output layer, the gradients of the convolutional layer, pooling layer, and fully connected layer are calculated based on the loss function of the convolutional neural network using the backpropagation algorithm. Based on the gradient and the pre-set learning rate, the weight parameters and bias parameters of the convolutional neural network are updated using an optimization algorithm to obtain the convolutional neural network model. The forward propagation, backward propagation, and parameter update steps are performed iteratively until the maximum number of iterations is reached. The performance metrics of the convolutional neural network model are evaluated based on the validation set. The parameters of the convolutional neural network model are adjusted according to the performance metrics to obtain the final convolutional neural network model.

4. The building communication protocol identification method according to claim 1, characterized in that, Before optimizing the recognition rate of the convolutional neural network model using historical communication protocol frames to obtain the optimal convolutional neural network model, the method further includes: Construct a generative adversarial network corresponding to the first standard protocol; The first standard protocol frame is input into the generative adversarial network to obtain the corresponding protocol type frame; The protocol type frames are added to the corresponding protocol type library using a preset differentiation model; The convolutional neural network model is updated based on the protocol type library as its output.

5. The building communication protocol identification method according to claim 1, characterized in that, The step of optimizing the recognition accuracy of the convolutional neural network model using historical communication protocol frames to obtain the optimal convolutional neural network model includes: Obtain the historical communication protocol frames of the building network and extract the corresponding historical key features; The historical communication protocol frames are labeled based on the aforementioned key historical features; The recognition accuracy of the convolutional neural network model is verified based on the labeled historical communication protocol frames, and the parameters of the convolutional neural network model are adjusted according to the verification results to obtain the optimal communication protocol frame.

6. A building communication protocol identification device, used to implement the building communication protocol identification method as described in any one of claims 1 to 5, characterized in that, include: The signal processing module is used to collect communication signals from the building network and preprocess the communication signals and mark the communication protocol type to obtain the first communication data; The model building module is used to identify the byte meaning of the first communication data to determine the corresponding first standard protocol frame, and to build a convolutional neural network model for identifying the communication protocol type using the first standard protocol frame. The model optimization module is used to optimize the recognition rate of the convolutional neural network model through historical communication protocol frames to obtain the optimal convolutional neural network model. The protocol identification module is used to identify the second communication data accessed by the digital base station corresponding to the building network through the optimal convolutional neural network model, and obtain the second standard protocol frame corresponding to the second communication data.

7. An electronic device comprising a memory, a processor, a communication interface, and a communication bus, wherein the memory stores a computer program executable on the processor, and the memory and the processor communicate via the communication bus and the communication interface, characterized in that... When the processor executes the computer program, it implements the building communication protocol identification method according to any one of claims 1 to 5.

8. A computer-readable medium having processor-executable non-volatile program code, characterized in that, The program code causes the processor to execute the building communication protocol identification method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Communication protocol recognition method based on deep learning

    CN108712397A

  • Military communication encrypted traffic identification method based on generative adversarial network and model compression

    CN114301850A