Building communication protocol identification method, device and equipment and computer readable medium

By constructing and optimizing the convolutional neural network model, self-identification of communication protocols between building network devices is achieved, solving the problem of difficult to realize building system protocol recognition in the prior art, and improving identification efficiency and accuracy.

CN120017563AActive Publication Date: 2025-05-16GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411988691.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-16
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The prior art is difficult to realize self-identification of communication protocols between building network equipment, and cannot meet the comprehensive and accurate protocol identification requirements of building systems.

Method used

By collecting communication signals from the building network for preprocessing and marking, identifying the byte meanings to build a convolutional neural network model, optimizing the model recognition degree, and using the optimal model to identify the accessed communication data.

Benefits of technology

It realizes automatic identification and standard definition of building communication protocols, improves work efficiency, ensures the accuracy and consistency of protocol standards, is suitable for various types of communication protocols, and supports stable communication and collaborative work between building network equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017563A_ABST
    Figure CN120017563A_ABST
Patent Text Reader

Abstract

The invention relates to a building communication protocol identification method, device and equipment and a computer readable medium. The method comprises the following steps: collecting a communication signal of a building network, preprocessing the communication signal, and marking a communication protocol type to obtain first communication data; the byte meaning of the first communication data is identified to determine a corresponding first standard protocol frame, and a convolutional neural network model used for identifying the communication protocol type is constructed through the first standard protocol frame; optimizing the recognition degree of the convolutional neural network model through a historical communication protocol frame to obtain an optimal convolutional neural network model; and identifying second communication data accessed by a digital base 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. According to the invention, the problem that a building network is difficult to realize communication protocol self-identification between devices in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of communication protocol identification, and in particular to a building communication protocol identification method, device, equipment and computer-readable medium. Background Art

[0002] With the development of information technology and the advent of the digital age, communication protocols play an extremely important role in the communication and data exchange between devices in many fields (such as network communication, data exchange, Internet of Things, intelligent manufacturing, etc.). Communication protocols comprehensively standardize data formats, transmission methods, and error detection and correction mechanisms to ensure normal communication and data exchange between devices, which is a key factor in achieving efficient operation in various fields. The identification and definition of communication protocols for traditional building systems mainly rely on manual methods, that is, relying on professionals to analyze and define the protocols. When faced with complex building control communication protocols, professionals need to study the protocol text in depth, observe actual communication data, etc., and rely on their own professional knowledge and experience to determine the various standards of the protocol. For complex protocol standards, manual analysis and definition of protocols requires a lot of time and manpower costs.

[0003] The communication protocol identification in the existing technology is mainly carried out through deep learning. Although it can realize automatic identification of communication protocols, it is difficult to adapt to building systems with numerous devices and complex communication protocols, and cannot meet the comprehensive and accurate protocol identification needs of building systems. Therefore, there is no automatic identification method of communication protocols that can be applied to building systems, and it is difficult to realize self-identification of communication protocols between devices in building networks.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The present application provides a building communication protocol identification method, device, equipment and computer-readable medium to solve the above-mentioned technical problem that "it is difficult for building networks in the prior art to achieve self-identification of communication protocols between devices".

[0006] According to one aspect of an embodiment of the present application, the present application provides a method for identifying a building communication protocol, including: 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 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 through the first standard protocol frame; optimizing the recognition degree of the convolutional neural network model through historical communication protocol frames to obtain an optimal convolutional neural network model; identifying second communication data accessed by a digital base corresponding to the building network through the optimal convolutional neural network model to obtain a second standard protocol frame corresponding to the second communication data.

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

[0008] Optionally, the 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 through the first standard protocol frame, includes: cutting the communication protocol type of the first communication data in bytes to obtain the byte meanings corresponding to all bytes in the first communication data; defining the standard protocol corresponding to the first communication data according to the byte meanings, and generating a first standard protocol frame according to the standard protocol; extracting key features corresponding to the first standard protocol frame, and generating a first feature vector according to the key features; and performing model training on the first feature vector to obtain a convolutional neural network model for identifying the communication protocol.

[0009] Optionally, the model training of the first feature vector to obtain a convolutional neural network model for identifying the communication protocol includes: dividing the first feature vector into a training set and a validation set based on a preset rule; 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; starting from the output layer through a backpropagation algorithm, calculating the gradients of the convolutional layer, the pooling layer, and the fully connected layer according to the loss function of the convolutional neural network; updating the weight parameters and bias parameters of the convolutional neural network through an optimization algorithm according to the gradient and a preset learning rate to obtain a convolutional neural network model; iteratively performing the steps of forward propagation, backpropagation, and parameter updating until the maximum number of iterations is reached, evaluating the performance indicators 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 indicators to obtain the final convolutional neural network model.

[0010] Optionally, before optimizing the recognition degree of the convolutional neural network model through historical communication protocol frames to obtain the optimal convolutional neural network model, it also 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 a corresponding protocol type frame; adding the protocol type frame to a corresponding protocol type library through a preset distinction 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 recognition degree of the convolutional neural network model is optimized through historical communication protocol frames to obtain an optimal convolutional neural network model, including: obtaining historical communication protocol frames of the building network and extracting corresponding historical key features; marking the historical communication protocol frames based on the historical key features; verifying the recognition degree of the convolutional neural network model based on the marked historical communication protocol frames, and adjusting the parameters of the convolutional neural network model according to the verification results to obtain the optimal communication protocol frame.

[0012] Optionally, the second communication data accessed by the digital base corresponding to the building network is identified by the optimal convolutional neural network model to obtain a second standard protocol frame corresponding to the target communication data, including: obtaining the second communication data of the digital base accessed to the building network and preprocessing the second communication data; cutting the preprocessed second communication data into bytes, and generating a second feature vector based on the cut second communication data; inputting the second feature vector into the optimal convolutional neural network model to obtain the corresponding protocol feature pattern through forward propagation calculation; 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 an embodiment of the present application, the present application provides a building communication protocol identification device, including: a signal processing module, used to collect communication signals of a building network and pre-process the communication signals and mark the communication protocol type to obtain first communication data; a model construction module, used to identify the byte meaning of the first communication data to determine the corresponding first standard protocol frame, and to construct a convolutional neural network model for identifying the communication protocol type through the first standard protocol frame; a model optimization module, used to optimize the recognition degree of the convolutional neural network model through historical communication protocol frames to obtain an optimal convolutional neural network model; a protocol identification module, used to identify the second communication data accessed by the digital base corresponding to the building network through the optimal convolutional neural network model, and obtain the second standard protocol frame corresponding to the target communication data.

[0014] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the processor implements the steps of the above-mentioned building communication protocol identification method when executing the computer program.

[0015] According to another aspect of the embodiment of the present application, the present application also provides a computer-readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to execute the above-mentioned building communication protocol identification method.

[0016] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:

[0017] This application realizes the automatic identification and standard definition of communication protocols through deep learning technology, which changes the situation that the traditional manual method is time-consuming and labor-intensive and easily interfered by subjective factors. The neural network model is trained with a large number of protocol data sets to automatically extract different protocol features, which greatly improves work efficiency, ensures the accuracy and consistency of the protocol standard definition, and effectively avoids the problem of inconsistent standards caused by differences in manual understanding. This application has good versatility and adaptability, and can be widely used in various types of communication protocols. Whether it is a common protocol or a newly emerging protocol, it can be effectively identified and defined, effectively responding to the continuous updating and changes of the protocol, and always maintaining the practicality and advancement of the technology. For building networks, this application collects communication signals and preprocesses them, builds a convolutional neural network model, optimizes the model using historical data, and finally identifies the access data to obtain the standard protocol frame, forming a complete and efficient building communication protocol identification system, which can accurately handle complex and diverse communication protocols in the building, ensure stable communication and collaborative work between various building devices, and improve the level of intelligent management of buildings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 A schematic diagram of a hardware environment for a building communication protocol identification method provided according to an embodiment of the present application;

[0021] Figure 2 A schematic diagram of a building communication protocol identification method according to an embodiment of the present application;

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

[0023] Figure 4 A schematic diagram of a convolutional neural network model provided according to an embodiment of the present application;

[0024] Figure 5 A block diagram of a building communication protocol identification device provided according to an embodiment of the present application;

[0025] Figure 6 A schematic diagram of an optional electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0027] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.

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

[0029] In order to solve the problem mentioned in the background technology, according to one aspect of an embodiment of the present application, an embodiment of a building communication protocol identification method is provided.

[0030] Optionally, in an embodiment of the present application, the above-mentioned building communication protocol identification method can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1 As shown, the server 103 is connected to the terminal 101 via a network, and can be used to provide services for the terminal or a client installed on the terminal. A database 105 can be set on the server or independently of the server to provide data storage services for the server 103. The above-mentioned network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 includes but is not limited to a PC, a mobile phone, a tablet computer, etc.

[0031] A building communication protocol identification method in an embodiment of the present application can be executed by the server 103, or can be executed by the server 103 and the terminal 101 together, such as Figure 2 As shown, the method may include the following steps:

[0032] Step S202: collect communication signals of the building network, pre-process the communication signals and mark the communication protocol types to obtain first communication data.

[0033] Optionally, collecting a communication signal of a building network and preprocessing the communication signal and marking the communication protocol type to obtain first communication data includes:

[0034] Capture the communication signals between different devices through the communication protocol parser of the building network;

[0035] Preprocessing the communication signal to obtain a qualified communication signal, the preprocessing at least including data cleaning and format conversion;

[0036] decoding the qualified communication signal to convert the communication signal from a byte format to a physical format;

[0037] The communication signal is marked based on the communication protocol type to obtain first communication data.

[0038] It can be understood that this embodiment is mainly used for identifying the communication protocol of the building network. The communication protocol between different devices in the building network of the target area is identified by combining the convolutional neural network with the digital base. Figure 3 The structure diagram of the digital base of this embodiment is shown, which includes a logic execution end and a device access segment. The logic execution end includes an AI control unit and an AI neural network model. The AI ​​control includes functions such as efficient computer rooms, air-cooled unit group control, refrigeration group control, and multi-connected intelligent control based on a cloud operating system. The AI ​​neural network model includes an input layer, a hidden layer, and an output layer. The communication protocol is input to the input layer, and the corresponding communication protocol standard can be output through the output layer. The device access end includes functions such as data analysis, data interface, and data access. Data analysis includes data cleaning, data conversion, and data classification, which are mainly used for data preprocessing and classification. The data interface includes MQTT, HTTP, OPC, ModbusTCP, etc., and the data access includes static data sets, HTTP data sets, MQTT data sets, json data sets, etc. This embodiment takes the temperature control system in the building network as an example. Of course, this embodiment is also applicable to building intelligent control systems such as access control systems, parking lot management systems, and intelligent energy consumption management systems.

[0039] Specifically, in the building temperature control system, a variety of temperature sensors (such as wall-mounted temperature sensors, pipe temperature sensors, etc.) and control devices (such as air-conditioning units, heating valve controllers, etc.) are deployed in advance, and the deployed devices are connected to the building intelligent control system through communication protocols such as CAN bus or Ethernet (this embodiment takes CAN bus as an example). Use CAN tools to capture communication signals between different temperature control devices. For example, for CAN bus communication, the CAN tool captures signals such as temperature data, device status information, and control instructions transmitted on the CAN bus. Then the captured signal is preprocessed, first removing abnormal temperature values ​​(such as values ​​that clearly exceed the normal ambient temperature range) and repeated data records caused by sensor failure or communication interference to ensure the accuracy and integrity of the data. The data formats sent by different sensors are uniformly converted into a standard format that is convenient for subsequent processing. For example, the temperature data of some sensors expressed in hexadecimal is converted to decimal values ​​and arranged in chronological order. Decode the qualified communication signal after cleaning and format conversion, and convert it from byte format to actual physical temperature value and device status information. For example, according to the byte definition of the CAN protocol, a specific byte combination is parsed into the corresponding temperature measurement value (accurate to one decimal place) and the air conditioning operation mode (cooling, heating, ventilation, etc.). The communication signal is labeled based on the temperature control protocol under the communication protocol type CAN protocol, and the protocol category and specific meaning of each data sample are clarified to obtain the first communication data. For example, for the data transmitted from the wall-mounted temperature sensor through the CAN protocol, it is marked as "CAN-wall-mounted temperature sensing data", and its corresponding temperature range, collection time and other metadata information are recorded.

[0040] In the above implementation, by removing duplicate data and erroneous data in the communication signal, the data used for training the convolutional neural network model can be guaranteed to be more accurate and reliable. In the building network, the communication environment of various devices is complex and there are many interference factors. The data cleaning operation can effectively reduce the negative impact of these "noise" data on the model, so that the model can learn based on high-quality data, thereby improving the accuracy of protocol recognition. Different devices may use different data formats for communication. Converting them to a standard format can help simplify the subsequent data processing process and improve data processing efficiency. At the same time, it can avoid data parsing errors caused by inconsistent formats, further enhance the accuracy and availability of data, and improve the accuracy of protocol recognition. By converting the communication signal from byte format to physical format, the byte data originally in binary form is converted into data with actual physical meaning (such as temperature value, device status code, etc.), which improves the readability and comprehensibility of the data, enables the model to learn the protocol features and laws in the data more easily, and helps to improve the training effect and performance of the protocol recognition model. The communication signal is labeled based on the communication protocol type, and the protocol category to which each data sample belongs is clearly defined, which helps the convolutional neural network model to learn the characteristics of different protocols in a targeted manner and improve the recognition ability of various protocols.

[0041] Step S204: 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.

[0042] 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 through the first standard protocol frame, including:

[0043] The communication protocol type of the first communication data is segmented in units of bytes to obtain 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 a first standard protocol frame according to the standard protocol;

[0045] Extracting key features corresponding to the first standard protocol frame, and generating a first feature vector according to the key features;

[0046] Model training is performed on the first feature vector to obtain a convolutional neural network model for identifying the communication protocol.

[0047] In the above implementation, the communication protocol type of the first communication data is cut in units of bytes, which can deeply explore the meaning carried by each byte in the data and improve the accuracy of protocol recognition. The standard protocol corresponding to the first communication data is defined according to the byte meaning, and the first standard protocol frame is generated, indicating that the scattered and different communication data are integrated and sorted according to a unified specification. In the building network, each device may interact with different versions or slightly different communication protocols. By defining a standard protocol, it can be converted into a standardized protocol framework form that is easy for the model to recognize, which helps to eliminate the recognition confusion caused by protocol differences, and also allows the model to summarize the commonalities and characteristics of the protocol type based on a unified standard, improve the ability to distinguish and recognize different protocols, and enhance the versatility and generalization of the model. By extracting the corresponding key features from the first standard protocol frame and generating the first feature vector, when facing massive and complex communication protocol data, the original data has high dimensionality and information redundancy. Directly using it for model training may lead to inefficiency and prone to overfitting. By extracting key features (such as the value range of specific bytes, the pattern of byte sequences, the length characteristics of data frames, etc.), the most representative and discriminative information can be extracted, reducing the interference of irrelevant information and improving the recognition accuracy and robustness of the model for protocol types. Based on the first feature vector extracted above, model training is performed to construct a convolutional neural network model. Convolutional neural networks are good at processing data with spatial structure or sequence characteristics, and communication protocol data just meets such characteristics, which improves the efficiency and accuracy of protocol recognition.

[0048] Optionally, performing model training on the first feature vector to obtain a convolutional neural network model for identifying the communication protocol includes:

[0049] Dividing the first feature vector 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 at the output layer;

[0051] Starting from the output layer, the back-propagation algorithm calculates the gradients of the convolutional layer, pooling layer, and fully connected layer according to the loss function of the convolutional neural network.

[0052] According to the gradient and the pre-set learning rate, the weight parameters and bias parameters of the convolutional neural network are updated through the optimization algorithm to obtain the convolutional neural network model;

[0053] Iteratively execute the steps of forward propagation, back propagation, and parameter update until the maximum number of iterations is reached, evaluate the performance indicators of the convolutional neural network model based on the validation set, and adjust the parameters of the convolutional neural network model according to the performance indicators to obtain the final convolutional neural network model.

[0054] In the above implementation, the forward propagation link can output the predicted probability distribution of each protocol category based on the input feature vector through the processing of each layer of the convolutional neural network, realize the mapping from features to protocol category judgment, provide an intuitive basis for accurate identification, and improve the recognition efficiency and accuracy. Through the back-propagation algorithm, the gradients of each layer are calculated according to the loss function, the influence of each parameter on the result is accurately determined, and the adjustment direction is found in the network parameters, which prompts the convolutional neural network model to correct the parameters in a targeted manner, gradually optimize the performance, and improve the protocol recognition effect. Through multiple iterative training, the forward, backward propagation and parameter update steps are repeated continuously, and the parameters are dynamically adjusted in combination with the verification set evaluation until the maximum number of iterations is reached to obtain the final model. Continuous optimization and stable convergence of the model are achieved, ensuring that the convolutional neural network model can more accurately and efficiently identify the type of communication protocol.

[0055] refer to Figure 4 The figure shows a schematic diagram of the convolutional neural network model of this embodiment, wherein the data accessed to the digital base is trained by a neural network trainer, and each communication protocol is input into the input layer of the convolutional neural network model, and then the corresponding standard protocol is output through the output layer after being processed by the hidden layer. In this embodiment, after obtaining the first communication data, the communication protocol type of the first communication data is first cut in bytes, and the meaning of each byte in the temperature control protocol is analyzed. For example, in the temperature data frame of the CAN protocol, a certain byte is determined to represent the integer part of the temperature, another byte represents the decimal part, and there are bytes for device identification and verification, etc. The standard protocol corresponding to the first communication data is defined according to the meaning of the byte, and the structure of the data frame, the meaning of each field, and the rules for data transmission are determined. For example, a CAN temperature protocol standard is formulated to specify the starting byte of the data frame, the position and length of the temperature data byte, the encoding method of the control instruction byte, etc., and then the first standard protocol frame is generated according to this standard for subsequent model training. Then the key features corresponding to the first standard protocol frame are extracted, such as the numerical range of the temperature data, the change trend, the fixed mode of the byte sequence, and the conversion law 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, maximum temperature, minimum temperature, and temperature fluctuation range over a period of time can be counted as part of the feature vector; for byte sequence features, the frequency and combination of specific bytes can be quantified and encoded.

[0056] Furthermore, the first eigenvector obtained is subjected to model training to obtain a convolutional neural network model for identifying the communication protocol. First, the first eigenvector is divided into a training set and a validation set based on a preset rule (such as 80% as a training set and 20% as a validation set). The first eigenvector 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 at the output layer. For example, the probability that the output may be "CAN-temperature control protocol" is 0.8. Starting from the output layer, the back propagation algorithm is used to calculate the gradients of the convolutional layer, the pooling layer, and the fully connected layer according to the loss function of the convolutional neural network (such as the cross entropy loss function), and determine the update direction and step size of each parameter. According to the gradient and the pre-set learning rate (such as 0.001), the weight parameters and bias parameters of the convolutional neural network are updated by the Adam optimizer to obtain the convolutional neural network model. The above steps of forward propagation, back propagation and parameter update are iteratively performed until the maximum number of iterations (e.g., 1000 times) is reached. The performance indicators of the convolutional neural network model are evaluated based on the validation set. The performance indicators include accuracy, precision, recall, etc. The parameters of the convolutional neural network model are adjusted according to the performance indicators (e.g., increasing the depth of the convolutional layer, adjusting the size of the convolutional kernel, etc.) to obtain the final convolutional neural network model.

[0057] Step S206, optimizing the recognition degree of the convolutional neural network model through historical communication protocol frames to obtain the optimal convolutional neural network model.

[0058] Optionally, before optimizing the recognition degree of the convolutional neural network model through the historical communication protocol frames to obtain the optimal convolutional neural network model, the method further includes:

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

[0060] Inputting the first standard protocol frame into the generative adversarial network to obtain a corresponding protocol type frame;

[0061] Add the protocol type frame to the corresponding protocol type library through the preset differentiation model;

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

[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 changes, simulate more possible protocol situations, and enrich the diversity of data. In the actual building network environment, the communication protocol may be affected by various factors and produce subtle changes. The generated data can help the model better adapt to these changes and improve the model's recognition ability for complex and variable protocol situations. The data enhancement method makes up for the problem of insufficient real data that may exist, especially for some special or rare protocol states, so that the model has more samples to learn during the training process, thereby improving its generalization performance, reducing excessive dependence on specific data patterns, and enhancing the stability and accuracy of the model in different scenarios. By presetting the distinction model, the generated protocol type frame is added to the corresponding protocol type library, which helps to further refine the classification system of the protocol. The distinction model accurately classifies the protocol frame according to its 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, optimizing the recognition degree of the convolutional neural network model through historical communication protocol frames to obtain an optimal convolutional neural network model includes:

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

[0066] Annotate historical communication protocol frames based on historical key features;

[0067] The recognition degree of the convolutional neural network model is verified based on the annotated 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, the historical communication protocol frames are annotated based on the historical key features, and the annotated historical communication protocol frames can guide the model to more accurately grasp the relationship between the protocol features and the actual application scenarios, thereby improving the recognition accuracy and rationality of the model in complex actual scenarios. Based on the annotated historical communication protocol frames, the recognition degree of the convolutional neural network model is verified, and the performance of the model on the actual historical data can be directly and accurately evaluated. By comparing the prediction results of the model on the historical data with the known annotation information, it can be clearly found that the model has errors in the recognition of which protocol types, and the judgment in which scenarios is not accurate enough. According to the verification results, the parameters of the convolutional neural network model are adjusted to make up for the shortcomings of the model in a targeted manner and realize the gradual improvement of the model performance. Through continuous feedback and adjustment, the model can more accurately fit the protocol features and laws in the historical data, thereby improving the recognition ability and accuracy of future communication protocol data, and finally obtaining the recognition model of the optimal communication protocol frame, providing strong technical support for the efficient and stable operation of the building network, ensuring that the communication protocols between various devices can be 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: the generator network structure is designed, a random noise vector is used as input, and a simulated temperature protocol type frame is gradually generated through multiple hidden layers (including fully connected layers and transposed convolution layers), so that it is similar to the real first standard protocol frame in structure and data features. The discriminator network structure is constructed, and the discriminator is used to distinguish whether the input protocol frame is from real data or data generated by the generator. After extracting features through multiple hidden layers, a probability value representing the authenticity of the data is output. The loss functions of the generator and the discriminator are defined, such as the loss function of the generator is to maximize the probability of misjudgment of the discriminator, and the loss function of the discriminator is to maximize the probability of accurately distinguishing true and false data. The temperature protocol data is used to train the GAN, and by alternately updating the parameters of the generator and the discriminator, the generator can generate more realistic temperature protocol type frames, and the discriminator can more accurately distinguish true and false data. The first standard protocol frame is input into the generative adversarial network to obtain the corresponding protocol type frame, and the generated protocol type frame is used as an expanded training data set to help the convolutional neural network model better learn the various characteristics and changes of the temperature protocol.

[0070] Furthermore, the protocol type frames are added to the corresponding protocol type library through a preset differentiation model, and 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 corresponding libraries respectively. The historical communication protocol frames of the building network are obtained and the corresponding historical key features are extracted, including historical temperature change trends, equipment operation time, temperature control modes in different seasons, etc. The historical communication protocol frames are annotated based on the historical key features. The recognition degree of the convolutional neural network model is verified based on the annotated historical communication protocol frames, and the historical data is input into the convolutional neural network model to determine the degree of match between the prediction results of the convolutional neural network model and the actual situation, and to check whether the convolutional neural network model can accurately identify the type and meaning of the historical protocol frames. The parameters of the convolutional neural network model are adjusted according to the verification results to obtain the optimal communication protocol frame recognition model.

[0071] Step S208, identifying the second communication data accessed by the digital base corresponding to the building network through the optimal convolutional neural network model, and obtaining a second standard protocol frame corresponding to the target communication data.

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

[0073] Acquire second communication data of a digital base connected to a building network and pre-process the second communication data;

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

[0075] The second feature vector is input into the optimal convolutional neural network model to obtain the corresponding protocol feature pattern through forward propagation calculation;

[0076] Determine the communication protocol type, data format and communication rules corresponding to the second communication data according to the protocol characteristic pattern;

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

[0078] In the above implementation, the second communication data of the digital base connected to the building network is obtained and preprocessed, which can effectively remove interference factors in the data, such as noise, error values, and irregular formats. By cutting the preprocessed second communication data into bytes and then generating a second feature vector based on the cut data, the key information contained in the data can be deeply mined to extract the most representative and distinguishing features. Communication protocol data often has a complex byte structure. By extracting the core features related to the protocol and presenting them to the optimal convolutional neural network model in the form of feature vectors, irrelevant information interference is reduced, the recognition accuracy of the optimal convolutional neural network model for different protocol types is greatly improved, and the model's discrimination ability is enhanced. 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, and automatic, efficient and accurate protocol recognition is achieved, which improves the efficiency and reliability of the entire protocol recognition process. The second standard protocol frame is generated based on the determined communication protocol type, data format and communication rules, which can realize the collaborative work between different devices in the building network. The standard protocol frame is easy to understand and apply, and it is convenient for each control subsystem of each building network to parse and process communication data according to unified rules, thereby ensuring the smooth and orderly communication of the entire building network, promoting the improvement of intelligent management level, and realizing efficient collaboration of various devices and overall stable operation.

[0079] Specifically, the second communication data of the digital base connected to the building network (i.e., the real-time data transmitted from the temperature sensor and the control device at the current moment) is obtained and the second communication data is preprocessed, and 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 cut into bytes, and a second feature vector is generated based on the cut second communication data. The features of the current temperature data and the features of the device status information are extracted and converted into a feature vector of the same format as when the model was trained. The second feature vector is input into the optimal convolutional neural network model to obtain the corresponding protocol feature pattern through forward propagation calculation. The model determines the protocol type to which the current data belongs based on the learned temperature protocol features, and extracts key information therein, such as temperature values, device control instructions, etc. The communication protocol type corresponding to the second communication data (for example, it is determined to be the CAN temperature control protocol), data format (such as the specific meaning and arrangement order of the data bytes) and communication rules (such as the frequency of data transmission, response mechanism, etc.) are determined according to the protocol feature pattern. The second standard protocol frame is generated based on the communication protocol type, data format and communication rules. The second standard protocol frame indicates the communication status and status information of the current temperature control device. Finally, the building intelligent control system automatically makes intelligent control decisions for the corresponding equipment based on the second standard protocol frame. For example, if the optimal convolutional neural network model recognizes 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 instruction to the air conditioner unit, and by adjusting the cooling power and wind speed of the air conditioner and other parameters, the indoor temperature is maintained within a comfortable range, thereby realizing intelligent control and management of the temperature control system.

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

[0081] The signal processing module 501 is used to collect the communication signal of the building network and pre-process the communication signal and mark the communication protocol type to obtain the first communication data;

[0082] A 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] A model optimization module 505 is used to optimize the recognition degree of the convolutional neural network model through historical communication protocol frames to obtain an optimal convolutional neural network model;

[0084] The protocol identification module 507 is used to identify the second communication data accessed by the digital base corresponding to the building network through the optimal convolutional neural network model to obtain a 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 the embodiment of the present application, the model building module 503 in this embodiment can be used to execute step S204 in the embodiment of the present application, the model optimization module 505 in this embodiment can be used to execute step S206 in the embodiment of the present application, and the protocol identification module 507 in this embodiment can be used to execute step S208 in the embodiment of the present application.

[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 contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.

[0087] According to another aspect of the embodiments of the present application, the present application provides an electronic device, such as Figure 6 As shown, it 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 be 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, the steps of the above method are implemented.

[0088] The memory and processor in the above electronic device communicate via a communication bus and a communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc.

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

[0090] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0091] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any of the above embodiments.

[0092] Optionally, in an embodiment of the present application, the computer-readable medium is configured to store program codes for the processor to perform the following steps:

[0093] Step S202: collect communication signals of the building network, pre-process the communication signals and mark the communication protocol types to obtain first communication data.

[0094] Step S204: 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.

[0095] Step S206, optimizing the recognition degree of the convolutional neural network model through 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 corresponding to the building network through the optimal convolutional neural network model to obtain a second standard protocol frame corresponding to the second communication data.

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

[0098] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.

[0099] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.

[0100] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0101] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

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

[0103] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

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

[0105] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0106] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0107] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A building communication protocol identification method, characterized in that: include: Collecting communication signals of the building network and preprocessing and marking the communication protocol type of the communication signals to obtain first communication data; 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; The recognition degree of the convolutional neural network model is optimized through historical communication protocol frames to obtain an optimal convolutional neural network model; The second communication data accessed by the digital base corresponding to the building network is identified through the optimal convolutional neural network model to obtain a second standard protocol frame corresponding to the second communication data.

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

3. The building communication protocol identification method according to claim 1, characterized in that: The 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 through the first standard protocol frame, includes: Slicing the communication protocol type of the first communication data in bytes to obtain byte meanings corresponding to all bytes in the first communication data; Defining a standard protocol corresponding to the first communication data according to the meaning of the bytes, and generating a first standard protocol frame according to the standard protocol; Extracting key features corresponding to the first standard protocol frame, and generating a first feature vector according to the key features; Model training is performed on the first feature vector to obtain a convolutional neural network model for identifying the communication protocol.

4. The building communication protocol identification method according to claim 3, characterized in that: The performing model training on the first feature vector to obtain a convolutional neural network model for identifying the communication protocol includes: Dividing the first feature vector into a training set and a validation set based on a preset rule; 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; Starting from the output layer through a back-propagation algorithm, the gradients of the convolutional layer, the pooling layer, and the fully connected layer are calculated according to the loss function of the convolutional neural network; According to the gradient and a preset learning rate, weight parameters and bias parameters of the convolutional neural network are updated by an optimization algorithm to obtain a convolutional neural network model; Iteratively perform the steps of forward propagation, back propagation and parameter updating until the maximum number of iterations is reached, evaluate the performance index of the convolutional neural network model based on the validation set, and adjust the parameters of the convolutional neural network model according to the performance index to obtain the final convolutional neural network model.

5. The building communication protocol identification method according to claim 1, characterized in that: Before optimizing the recognition degree of the convolutional neural network model through the historical communication protocol frame 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 a corresponding protocol type frame; Adding the protocol type frame to the corresponding protocol type library through a preset differentiation model; The convolutional neural network model is updated based on the protocol type library as an output of the convolutional neural network model.

6. The building communication protocol identification method according to claim 1, characterized in that: The optimizing the recognition degree of the convolutional neural network model by using the historical communication protocol frame to obtain the optimal convolutional neural network model includes: Obtaining 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; The recognition degree of the convolutional neural network model is verified based on the annotated historical communication protocol frame, and the parameters of the convolutional neural network model are adjusted according to the verification result to obtain the optimal communication protocol frame.

7. The building communication protocol identification method according to claim 1, characterized in that: The step of identifying the second communication data accessed by the digital base corresponding to the building network by using the optimal convolutional neural network model to obtain a second standard protocol frame corresponding to the target communication data includes: Acquire second communication data of a digital base connected to the building network and pre-process the second communication data; Slicing the preprocessed second communication data in bytes, and generating a second feature vector based on the sliced ​​second communication data; Inputting the second feature vector into the optimal convolutional neural network model to obtain the corresponding protocol feature pattern through forward propagation calculation; Determine the communication protocol type, data format and communication rules corresponding to the second communication data according to the protocol characteristic pattern; A second standard protocol frame is generated based on the communication protocol type, the data format and the communication rule.

8. A building communication protocol identification device, characterized in that: include: A signal processing module, used for collecting communication signals of the building network and performing preprocessing and communication protocol type marking on the communication signals to obtain first communication data; A model building module, 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 type of communication protocol through the first standard protocol frame; A model optimization module, used to optimize the recognition degree of the convolutional neural network model through historical communication protocol frames to obtain an optimal convolutional neural network model; A protocol identification module is used to identify the second communication data accessed by the digital base corresponding to the building network through the optimal convolutional neural network model, and obtain a second standard protocol frame corresponding to the second communication data.

9. An electronic device, comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate through the communication bus and the communication interface, characterized in that: When the processor executes the computer program, the building communication protocol identification method described in any one of claims 1 to 7 is implemented.

10. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the building communication protocol identification method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Multi-source data acquisition method and system based on adaptive interface

    CN120856744A

  • Intelligent test method and system for distribution automation terminal compatible with multiple protocols

    CN121283896A