A communication method, system and device for a sensing device in an intelligent transportation system
By using a dual-mode detection mechanism and information entropy weighting algorithm in the intelligent transportation system, the communication protocol of heterogeneous sensing devices is automatically identified and converted, and the problem of inconsistent communication protocol of perception equipment in the intelligent transportation system is solved, and efficient and flexible sensing equipment communication is achieved.
Patent Information
- Application Number
- CN202510414341.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-04-03
AI Technical Summary
The communication protocols of heterogeneous sensing devices in intelligent transportation systems are not unified, which leads to difficulty in system integration and data interaction, requiring manual configuration and update, which is inefficient and has high deployment cost.
The preset dual-mode detection mechanism is used to obtain the initial communication packets of the perception device, and dynamically empower the packet protocol feature vectors through the information entropy weighting algorithm, and match them with the preset protocol fingerprint library to automatically complete the protocol conversion and data synchronization transmission.
It realizes automated discovery and packet acquisition of perceived device communication, improves the accuracy of protocol matching, reduces deployment costs, and improves communication resource utilization.
Smart Images

Figure CN119922245B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent transportation control technology, and in particular, to a communication method, system and device for sensing devices in an intelligent transportation system. Background Art
[0002] With the rapid development of intelligent transportation systems, sensing devices (such as cameras, radars, sensors, etc.) are playing an increasingly important role in traffic management, vehicle navigation, road condition monitoring and other fields. However, a variety of heterogeneous sensing devices are usually deployed in intelligent transportation systems, and these devices may adopt different communication protocols and data formats, resulting in huge challenges in system integration and data interaction.
[0003] In the prior art, inconsistent communication protocols of sensing devices are usually identified and converted through manual configuration or pre-implanted protocol libraries. This method is difficult to fully address the problem of protocol diversity of actually installed devices. At the same time, when new devices are introduced, manual intervention is required for protocol updates, and the data sharing efficiency is low. In scenarios with a large number of sensing devices installed, the system deployment and maintenance costs are increased.
[0004] Based on this, there is an urgent need for a communication technology solution for sensing devices in an intelligent transportation system to achieve efficient, flexible and adaptive communication of sensing devices. Summary of the Invention
[0005] To solve the above problems, embodiments of this application provide a communication method, system and device for sensing devices in an intelligent transportation system.
[0006] On the one hand, embodiments of this application provide a communication method for sensing devices in an intelligent transportation system, and the method includes:
[0007] Based on a preset dual-mode detection mechanism, obtain an initial communication message of the sensing device; wherein, the preset dual-mode detection mechanism includes sending a verification instruction set to the sensing device that has established a communication connection and listening for a power-on data packet from the sensing device;
[0008] According to the initial communication message, determine the corresponding message protocol feature vector, and dynamically assign weights to each feature dimension through an information entropy weighting algorithm;
[0009] Match the weighted message protocol feature vector with a preset protocol fingerprint library to determine whether there is a matching protocol for the initial communication message;
[0010] Convert the initial communication message into first protocol data according to the protocol conversion rules corresponding to the matching results, and compress the initial communication message into second protocol data, so as to synchronously send the first protocol data and the second protocol data to the management terminal; wherein, the protocol conversion rules include: converting the initial communication message without a matching protocol based on a temporary protocol mapping rule, and converting the initial communication message based on the matching protocol.
[0011] In an implementation manner of the present application, the verification instruction set at least includes one or more of the following: protocol handshake instructions in a preset format, compatibility detection instructions based on a standard protocol, and test instructions for random data fields.
[0012] In an implementation manner of the present application, according to the initial communication message, determine the corresponding message protocol feature vector, and dynamically assign weights to each feature dimension through an information entropy weighting algorithm, specifically including:
[0013] Extract the message structure feature information corresponding to the initial communication message and encode it into the corresponding message protocol feature vector; wherein, the message structure feature information at least includes: a header field, a tail field, a check code type, and a data segment length;
[0014] According to the information entropy weighting algorithm and the historical feature vector samples corresponding to the message structure feature information, determine the feature weights of each feature dimension of the message protocol feature vector, so as to dynamically assign weights to the message protocol feature vector according to each feature weight.
[0015] In an implementation manner of the present application, match the weighted message protocol feature vector with a preset protocol fingerprint library to determine whether there is a matching protocol for the initial communication message, specifically including:
[0016] Calculate the similarity of each feature dimension between the message protocol feature vector and each protocol feature vector in the preset protocol fingerprint library; wherein, the similarity of the feature dimension is obtained by calculating the cosine similarity of the corresponding feature dimensions of the message protocol feature vector and the protocol feature vector.
[0017] According to each feature weight and each feature dimension similarity, perform a weighted sum of each feature dimension similarity to determine the protocol similarity corresponding to the same protocol feature vector;
[0018] Compare each protocol similarity with a first preset threshold;
[0019] When the protocol similarity is greater than the first preset threshold, determine that there is a matching protocol for the initial communication message, and add the fingerprint library protocol corresponding to the protocol similarity to the matching result;
[0020] Otherwise, it is determined that there is no matching protocol for the initial communication message, and no matching protocol is used as the matching result.
[0021] In an implementation manner of the present application, the method further includes:
[0022] In the case where it is determined that there is no matching protocol for the initial communication message, the initial communication message is input into a preset LSTM model to determine each key data field of the initial communication message;
[0023] Perform dynamic mapping between each key data field and the fields in a preset standard protocol template, so as to generate a temporary protocol mapping rule including a field mapping table and a check rule conversion logic according to the dynamic mapping result.
[0024] In an implementation manner of the present application, for generating a temporary protocol mapping rule including a field mapping table and a check rule conversion logic according to the dynamic mapping result, the method further includes:
[0025] Convert the temporary protocol mapping rule into machine instructions through a just-in-time compiler, so as to convert the initial communication message into first protocol data through the machine instructions.
[0026] In an implementation manner of the present application, after converting the initial communication message into first protocol data and compressing the initial communication message into second protocol data, the method further includes:
[0027] Perform byte difference comparison between the first protocol data and the second protocol data to obtain a comparison difference value;
[0028] Accumulate multiple comparison difference values within a first preset number of cycles, and compare each comparison difference value with a second preset threshold;
[0029] In the case where each comparison difference value corresponding to a second preset number of consecutive cycles is less than the second preset threshold, stop sending the first protocol data, and generate and send a temporary protocol mapping rule update prompt message to the management terminal.
[0030] In an implementation manner of the present application, the method further includes:
[0031] Generate a difference change curve according to each comparison difference value; wherein, the abscissa of the difference change curve is time, and the ordinate is the value of the comparison difference value;
[0032] Slide a preset sliding time window along the difference change curve with a preset step length, and determine whether there is a communication anomaly in the difference change curve; wherein, the communication anomaly is that the curve slope within the preset sliding time window is greater than a preset warning value;
[0033] If so, generate a warning message for abnormal communication of the device, and send it to the management terminal, so as to update the preset protocol fingerprint database based on the feedback information from the management terminal.
[0034] On the other hand, an embodiment of the present application further provides a perception device communication system for an intelligent transportation system, and the system includes:
[0035] An acquisition module, configured to acquire an initial communication message of a perception device based on a preset dual-mode detection mechanism; wherein, the preset dual-mode detection mechanism includes sending a verification instruction set to the perception device establishing a communication connection and listening for a power-on data packet from the perception device;
[0036] A determination and empowerment module, configured to determine a corresponding message protocol feature vector according to the initial communication message, and dynamically empower each feature dimension through an information entropy weighting algorithm;
[0037] A matching module, configured to match the weighted message protocol feature vector with a preset protocol fingerprint database to determine whether there is a matching protocol for the initial communication message;
[0038] A conversion module, configured to convert the initial communication message into first protocol data according to a protocol conversion rule corresponding to the matching result, and compress the initial communication message into second protocol data, so as to synchronously send the first protocol data and the second protocol data to a management terminal; wherein, the protocol conversion rule includes: converting the initial communication message without a matching protocol based on a temporary protocol mapping rule and converting the initial communication message based on a matching protocol.
[0039] On yet another aspect, an embodiment of the present application further provides a perception device communication device for an intelligent transportation system, and the device includes:
[0040] At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute a perception device communication method for an intelligent transportation system as described above.
[0041] Compared with the prior art, the present application has the following remarkable effects:
[0042] Through the above technical solutions, the present application realizes the automatic discovery and message acquisition of the communication connection of the sensing device based on the dual-mode detection mechanism, which can reduce manual intervention. At the same time, the information entropy weighting algorithm is used to dynamically weight the message protocol feature vector, quantify the discrimination of different feature dimensions, and improve the accuracy of protocol matching. It also combines protocol fingerprint library matching and protocol conversion rules to automatically complete the standardization process of messages without matching protocols, which can be compatible with the communication requirements of heterogeneous devices and reduce the deployment cost in a multi-protocol environment. In addition, through protocol data compression and multi-protocol data synchronous transmission, the network bandwidth occupancy is reduced, and at the same time, the parallel processing ability of the management terminal for the original data and the standardized data is ensured, and the communication resource utilization rate is improved. Therefore, the present application effectively solves the problems of low efficiency and poor flexibility in traditional deployment relying on manual configuration, and provides high-compatibility and low-latency communication support for the intelligent transportation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation of the present application. In the drawings:
[0044] Figure 1 is a schematic flow chart of a method for communicating a sensing device in an intelligent transportation system according to an embodiment of the present application;
[0045] Figure 2 is a schematic structural diagram of a system for communicating a sensing device in an intelligent transportation system according to an embodiment of the present application;
[0046] Figure 3 is a schematic structural diagram of a device for communicating a sensing device in an intelligent transportation system according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present application.
[0048] The embodiments of the present application provide a method, a system and a device for communicating a sensing device in an intelligent transportation system, which are used to solve the technical problems that the current communication configuration of the sensing device is too dependent on manual work, the communication deployment is not intelligent enough, and the efficiency is low and the flexibility is poor.
[0049] The following will describe in detail each embodiment of the present application with reference to the drawings.
[0050] An embodiment of the present application provides a communication method for a sensing device in an intelligent transportation system, as Figure 1 shown. The method may include steps S101 - S104:
[0051] S101, the microcontroller obtains an initial communication message of the sensing device based on a preset dual - mode detection mechanism.
[0052] Among them, the preset dual - mode detection mechanism includes sending a verification instruction set to the sensing device that has established a communication connection and listening for the power - on data packet from the sensing device.
[0053] It should be noted that the microcontroller, as the execution entity of the communication method for the sensing device in the intelligent transportation system, is only an exemplary existence. The execution entity is not limited to the microcontroller, and the present application does not make specific limitations in this regard. The microcontroller can be a device connecting the sensing device and the edge computing device or the server, such as being set in a digital - electric simultaneous transmission centralized controller.
[0054] The sensing devices mentioned in the present application include but are not limited to cameras installed on roads, geomagnetic vehicle detectors, environmental detection sensors, radar speed measurement devices, etc.
[0055] The present application can obtain the initial communication message of the sensing device through the preset dual - mode detection mechanism during a preset period after the sensing device is powered on and connected. The preset dual - mode detection mechanism can be generally understood as obtaining the initial communication message in two different ways. One is through the active detection module, which actively sends a verification instruction set to the sensing device that has established a communication connection after the sensing device is powered on. The other is to use the passive listening module to listen for the power - on data packet from the sensing device. The first method is more suitable for sensing devices that do not actively send power - on data packets, enabling the present application to be applicable to more types of sensing devices. That is, the above - mentioned dual - mode detection combines actively sending detection signals and passively listening to device data, which can improve the coverage rate and accuracy of protocol recognition. Active detection can trigger the response of the device and quickly identify known protocols; passive listening is applicable to those devices that do not respond to detection signals but will actively send data. The combination of the two can more comprehensively cover the communication characteristics of different devices and reduce the possibility of missed detection.
[0056] In the first method, as long as a physical connection is established with the sensing device, the active detection module will immediately send a verification instruction set containing multiple protocol handshake signals to the device. This is because active detection can quickly trigger device responses. For most devices that can respond to instructions normally, this method can efficiently obtain information related to their communication protocols. Even during the device initialization process, actively sending instructions can also obtain key information from its feedback for subsequent protocol identification. For example, for common camera devices that support the Transmission Control Protocol / Internet Protocol (TCP / IP) protocol, after establishing a physical connection, sending a verification instruction set is likely to receive a handshake response based on the TCP / IP protocol.
[0057] In the second method, from the moment the sensing device is powered on, the passive monitoring module begins to capture the power-on broadcast data packets during the device initialization phase in real time. This is mainly to deal with devices that may not be able to respond to the actively sent verification instruction set, such as some old devices or devices set to broadcast communication only in specific scenarios. They do not respond to active instructions, but will reveal clues about their own communication protocols through broadcast data packets during initialization. Passive monitoring can ensure that the protocol identification opportunities of such devices are not missed. Some environmental monitoring sensors may only broadcast their own configuration information at startup, and passive monitoring comes into play at this time.
[0058] The above-mentioned verification instruction set includes at least one or more of the following: protocol handshake instructions in a preset format, compatibility detection instructions based on standard protocols, and test instructions for random data fields. Among them, the protocol handshake instructions in a preset format can be set according to the actual usage scenario, and this application does not make specific restrictions on this. It can confirm the protocol version, parameters and basic compatibility of both parties in the communication initialization stage to establish a reliable communication foundation. Compatibility detection instructions based on standard protocols verify the device's adaptability to standard protocols (such as NTCIP, GB / T 20999) to ensure interoperability of core functions. Test instructions for random data fields can verify the device's fault tolerance and protocol robustness by injecting unconventional data to expose potential vulnerabilities. The verification instruction set of this application can also be used to trigger device responses by pre-setting the handshake signal format and sequence of multiple common communication protocols.
[0059] S102, the microcontroller determines the corresponding message protocol feature vector according to the initial communication message, and dynamically assigns weights to each feature dimension through an information entropy weighting algorithm.
[0060] In the embodiment of the present application, the above-mentioned method determines the corresponding message protocol feature vector according to the initial communication message, and dynamically weights each feature dimension through the information entropy weighting algorithm, specifically including:
[0061] Extract the message structure feature information corresponding to the initial communication message and encode it into the corresponding message protocol feature vector. Among them, the message structure feature information at least includes: header field, tail field, check code type, and data segment length. Determine the feature weights of each feature dimension of the message protocol feature vector according to the information entropy weighting algorithm and the historical feature vector samples corresponding to the message structure feature information, so as to dynamically weight the message protocol feature vector according to each feature weight.
[0062] That is to say, the present application can extract multi-dimensional features such as the header field, tail field, check code type, and data segment length from the initial communication insulation. In addition, it can also identify multi-dimensional features including the message header identification bit, the distribution pattern of data segment check bits, and the timing response interval, so as to construct the message protocol feature vector of the initial communication message using the multi-dimensional features. Subsequently, the information entropy weighting algorithm is used to dynamically weight each feature dimension, so as to increase the recognition weight of key feature items. The information entropy weighting algorithm calculates the information entropy of each feature dimension , and through calculate the information gain , where is the preset number of samples. Calculate the feature weight of each feature dimension through the following formula :
[0063]
[0064] Among them, is the number of feature dimensions, and each item in the message protocol feature vector has a unique feature weight corresponding to it.
[0065] S103. The microcontroller matches the weighted message protocol feature vector with the preset protocol fingerprint library to determine whether there is a matching protocol for the initial communication message.
[0066] In the embodiment of the present application, matching the weighted message protocol feature vector with the preset protocol fingerprint library to determine whether there is a matching protocol for the initial communication message specifically includes:
[0067] Calculate the similarity of each feature dimension between the message protocol feature vector and each protocol feature vector in the preset protocol fingerprint database. Among them, the feature dimension similarity is obtained by calculating the cosine similarity of the corresponding feature dimensions of the message protocol feature vector and the protocol feature vector. According to each feature weight and each feature dimension similarity, perform a weighted sum on each feature dimension similarity to determine the protocol similarity corresponding to the same protocol feature vector. Compare each protocol similarity with a first preset threshold. In the case where the protocol similarity is greater than the first preset threshold, determine that there is a matching protocol for the initial communication message, and add the fingerprint database protocol corresponding to the protocol similarity to the matching result. Otherwise, determine that there is no matching protocol for the initial communication message, and use no matching protocol as the matching result.
[0068] In other words, through the cosine similarity calculation formula of the present application, calculate the cosine similarity between the message protocol feature vector and the protocol feature vector pre-stored in the preset protocol fingerprint database, that is, calculate the cosine similarity of the feature values of each feature dimension of the vector, and perform weighted processing to obtain the protocol similarity. For example, the protocol similarity between the message protocol feature vector and the th protocol feature vector , is the feature value of the th feature dimension of the message protocol feature vector, is the th protocol feature vector's th feature dimension's feature value.
[0069] Compare the sizes of each protocol similarity and the first preset threshold. The first preset threshold is a value preset by the user, and the present application does not make specific limitations on this. The present application uses the initial communication message corresponding to the protocol similarity greater than the first preset threshold as the message with a matching protocol. At this time, add the matching protocol in the preset protocol fingerprint database to the matching result to facilitate the operation of converting the initial communication message based on the matching protocol.
[0070] The present application uses the initial communication message corresponding to the protocol similarity less than or equal to the first preset threshold as the message without a matching protocol. At this time, use no matching protocol as the matching result to facilitate the operation of converting the initial communication message without a matching protocol based on the temporary protocol mapping rule.
[0071] Through the above solution, the initial communication message can be quickly classified, and when the microcontroller of the present application docks several sensing devices, the communication efficiency can be effectively improved.
[0072] In an embodiment of the present application, when it is determined that there is no matching protocol for the initial communication message, the initial communication message is input into a preset Long Short-Term Memory (LSTM) model to determine each key data field of the initial communication message. Each key data field is dynamically mapped to the fields in the preset standard protocol template to generate a temporary protocol mapping rule including a field mapping table and a verification rule conversion logic according to the dynamic mapping result.
[0073] That is to say, the present application is pre-trained with an LSTM model, which can be trained through a number of historical communication messages. The historical communication messages are marked with key data fields, which can be actively marked by experts or users, and the present application does not make specific limitations on this. Through the pre-trained LSTM model, the key data fields in the initial communication message can be recognized. For example, when an initial communication message is input, the LSTM model will analyze the time series data of the message bit by bit, and use its memory unit and gating mechanism to capture the relationship between the data at different positions in the message, so as to determine each key data field in the message. Specifically, in a communication message containing information such as vehicle speed and position, the LSTM model can identify the field representing speed data, the field representing position data, etc.
[0074] The present application also pre-sets a preset standard protocol template, which contains multiple fields for mapping and includes various common or general protocol structure definitions. For the determined key data fields, dynamic mapping is to attempt to match these fields with each field in the standard protocol template. For example, a key data field is identified from the initial communication message, and its data format looks like a timestamp (such as a string of consecutive numbers and within the general range of time representation). In the preset standard protocol template, there may be multiple protocol templates containing timestamp fields. The dynamic mapping process will compare this key data field with these possible timestamp fields, comparing their data formats, lengths, value ranges and other characteristics. If the timestamp field in a certain standard protocol template best matches the identified key data field in these characteristics, a mapping relationship is established between the two. This mapping is not fixed, but is dynamically determined according to the specific key data field situation of each initial communication message, so it is called dynamic mapping.
[0075] The above field mapping table is a record of the dynamic mapping results. It records the correspondence between the key data fields identified from the initial communication message and the fields in the preset standard protocol template. For example, assume that a field A is identified from the initial communication message. After dynamic mapping, it is found that it best matches the field X1 in the preset standard protocol template X. Then, in the field mapping table, it will be recorded that: field A -> field X1 in the preset standard protocol template X. The field mapping table may also contain some additional information, such as the data type mapping of the fields (for example, the data type of field A in the initial communication message is unsigned integer, and the data type of field X1 in the preset standard protocol template X is also unsigned integer), the correspondence of the field lengths, etc. In this way, during subsequent protocol conversion, the data in the initial communication message can be accurately converted according to the requirements of the target standard protocol template based on the field mapping table.
[0076] When the key data fields of the initial communication message are determined and dynamically mapped to the preset standard protocol template, it is necessary to convert the original verification rules of the initial communication message into the verification rules of the target standard protocol template. For example, if the initial communication message uses simple parity check, while the target standard protocol template uses CRC-16 check in the standard CRC code. The verification rule conversion logic first needs to analyze the data range used for parity check in the initial communication message (which key data fields participate in the check), and then determine how to recombine and calculate the CRC value for these key data fields according to the CRC-16 check requirements of the target standard protocol template. This may involve adjusting the byte order in the initial communication message (if the target protocol requires a different byte order), or padding the data (if the CRC calculation of the target protocol requires a specific data length), etc., to generate a verification value that conforms to the verification rules of the target standard protocol template.
[0077] Example of temporary protocol mapping rules:
[0078] Field mapping table part:
[0079] Device ID field (identified from the initial communication message) -> Device identification field in the preset standard protocol template Y. Speed data field (identified from the initial communication message) -> Speed information field in the preset standard protocol template Y.
[0080] Verification rule conversion logic part:
[0081] The initial communication message uses simple sum check, and the target standard protocol template Y uses CRC-8 check. The conversion logic is to reorganize the key data fields participating in the sum check in the initial communication message (such as the device ID field, speed data field, etc.) according to the calculation requirements of CRC-8, calculate the CRC-8 verification value, and replace the original sum check value.
[0082] The temporary protocol mapping rule can convert the communication message of the sensing device into a format that conforms to a preset standard protocol template during subsequent communication processes, so as to enable the system to perform unified processing and analysis. At the same time, it also provides a basis for possible subsequent protocol recognition and optimization.
[0083] Through the above technical solution, when the microcontroller docks with a sensing device without a matching protocol, it can obtain the temporary protocol mapping rule corresponding to its communication message, making the sensing devices docked by this application more extensive and not restricted by fixed protocols.
[0084] In another embodiment of this application, for the above method of generating a temporary protocol mapping rule including a field mapping table and a check rule conversion logic according to the dynamic mapping result, it further includes:
[0085] Convert the temporary protocol mapping rule into machine instructions through an immediate compiler, so as to convert the initial communication message into the first protocol data through the machine instructions.
[0086] In other words, this application can use an immediate compiler to convert the temporary protocol mapping rule into machine instruction-level parsing logic, realize real-time optimization of protocol conversion, reduce the time delay of protocol conversion, and ensure the communication efficiency of the sensing device.
[0087] S104. The microcontroller converts the initial communication message into the first protocol data according to the protocol conversion rule corresponding to the matching result, and compresses the initial communication message into the second protocol data, so as to synchronously send the first protocol data and the second protocol data to the management terminal.
[0088] Among them, the protocol conversion rule includes: converting the initial communication message without a matching protocol based on the temporary protocol mapping rule, and converting the initial communication message based on the matching protocol.
[0089] That is to say, after obtaining the matching result according to the matching operation in S103 above, the message conversion can be performed through the protocol conversion rule corresponding to the matching result. Specifically, the temporary protocol mapping rule is used for message conversion and the matching protocol is used for message conversion. Subsequently, the converted first protocol data is sent to the management terminal. At the same time, the original initial communication message is also compressed into the second protocol data and synchronously sent to the management terminal. The management terminal can be understood as devices such as the mobile phones and computers of traffic management or management department personnel. This application does not make specific limitations on this. Transmitting the second protocol data to the management terminal can avoid errors in message conversion and can perform message backup, and can, to a certain extent, cope with data loss caused by malicious attacks or human errors.
[0090] In an embodiment of the present application, after converting the initial communication message into the first protocol data and compressing the initial communication message into the second protocol data, the method further includes:
[0091] Perform a byte difference comparison between the first protocol data and the second protocol data to obtain a comparison difference value. Accumulate multiple comparison difference values within the first preset number of cycles, and compare each comparison difference value with a second preset threshold. When each comparison difference value corresponding to the second preset number of consecutive cycles is less than the second preset threshold, stop sending the first protocol data, and generate and send a temporary protocol mapping rule update prompt message to the management terminal.
[0092] In other words, the present application can perform a difference comparison by bytes. The first protocol data is the data after message conversion through a communication protocol that can be recognized by a subsequent signal receiving terminal, and the second protocol data is the data obtained by compressing the initial communication message directly sent by the sensing device. When the byte differences are the same, it is recorded as 0, and when they are different, it is recorded as 1, and the comparison difference value is accumulated. During the continuous communication with the sensing device, the present application can receive several communication messages from the sensing device, and thus several comparison difference values corresponding to the time will be obtained. The present application presets a communication cycle, accumulates multiple comparison difference values within the first preset number of cycles preset by the user, and then compares the accumulated comparison difference values with the second preset threshold respectively. The second preset threshold is set by the user according to the actual usage scenario and is not specifically limited herein. If the present application monitors that the comparison difference values of the second preset number of consecutive cycles are all less than the second preset threshold, stop sending the first protocol data at this time. The second preset number is less than the first preset number.
[0093] For example, the first preset number is 10, and the comparison difference values within 10 cycles are {a1, a2, a3,..., a10}. If the comparison difference values {a4, a5, a6, a7, a8, a9} of 6 consecutive cycles of the second preset number are all less than the second preset threshold, stop sending the above-mentioned first protocol data at this time, and generate a temporary protocol mapping rule update prompt message and send it to the management terminal for manual intervention to update the temporary protocol mapping rule.
[0094] Through the above solution, the problem that the conversion of the communication message by the temporary protocol mapping rule has too large a deviation, resulting in the inability to guarantee the authenticity of the communication result, can be avoided.
[0095] In an embodiment of the present application, there may also be an abnormal conversion of the matching protocol in the message conversion of the sensing device communication. Therefore, the present application provides the following embodiments, including:
[0096] According to each comparison difference value, a difference change curve is generated. Among them, the abscissa of the difference change curve is time, and the ordinate is the value of the comparison difference value. Slide the preset sliding time window along the difference change curve with a preset step length, and determine whether there is a communication anomaly in the difference change curve. Among them, the communication anomaly is that the curve slope within the preset sliding time window is greater than the preset warning value. When it is determined that there is a communication anomaly in the difference change curve, a device communication anomaly warning message is generated and sent to the management terminal to update the preset protocol fingerprint library based on the feedback information from the management terminal.
[0097] That is to say, in this application, a plane rectangular coordinate system is established with time as the abscissa and the comparison difference value as the ordinate, and a difference change curve is generated through the comparison difference value obtained by the above steps. The preset sliding time window with a preset window size and a preset step length slides sequentially on the difference change curve, and the curve slope corresponding to the curve within the window is judged in real time whether it is greater than the preset warning value. If so, a device communication anomaly warning message is generated, and the device communication anomaly warning message includes the time point where the preset sliding time window is located at this time, and then the preset sliding time window continues to slide. If the curve slope is not greater than the preset warning value, the preset sliding time window continues to slide. The above window size, preset step length and preset warning value can be set by the user according to the actual usage scenario, or the default value can be selected, and this application does not make specific limitations on this. After the management terminal receives the communication anomaly warning message, it can send feedback information by itself. The feedback information can include the update time and update method of the preset protocol fingerprint library, such as at XX:XX on XX day, manually update the preset protocol fingerprint library.
[0098] Figure 2 It is a schematic structural diagram of a perception device communication system for an intelligent transportation system provided by an embodiment of the present application, as Figure 2 shown, the perception device communication system 200 for the intelligent transportation system includes:
[0099] An acquisition module 201, configured to obtain an initial communication message of a sensing device based on a preset dual-mode detection mechanism. The preset dual-mode detection mechanism includes sending a verification instruction set to the sensing device that has established a communication connection and listening for power-on data packets from the sensing device. A determination and authorization module 202, configured to determine a corresponding message protocol feature vector according to the initial communication message, and dynamically assign weights to each feature dimension through an information entropy weighting algorithm. A matching module 203, configured to match the weighted message protocol feature vector with a preset protocol fingerprint database to determine whether there is a matching protocol for the initial communication message. A conversion module 204, configured to convert the initial communication message into first protocol data according to a protocol conversion rule corresponding to the matching result, and compress the initial communication message into second protocol data, so as to synchronously send the first protocol data and the second protocol data to a management terminal. The protocol conversion rule includes: converting the initial communication message without a matching protocol based on a temporary protocol mapping rule, and converting the initial communication message based on the matching protocol.
[0100] Figure 3 FIG. is a schematic structural diagram of a communication device for a sensing device in an intelligent transportation system provided by an embodiment of the present application, as Figure 3 shown, the device includes:
[0101] At least one processor; and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0102] Obtain an initial communication message of a sensing device based on a preset dual-mode detection mechanism. The preset dual-mode detection mechanism includes sending a verification instruction set to the sensing device that has established a communication connection and listening for power-on data packets from the sensing device. Determine a corresponding message protocol feature vector according to the initial communication message, and dynamically assign weights to each feature dimension through an information entropy weighting algorithm. Match the weighted message protocol feature vector with a preset protocol fingerprint database to determine whether there is a matching protocol for the initial communication message. Convert the initial communication message into first protocol data according to a protocol conversion rule corresponding to the matching result, and compress the initial communication message into second protocol data, so as to synchronously send the first protocol data and the second protocol data to a management terminal. The protocol conversion rule includes: converting the initial communication message without a matching protocol based on a temporary protocol mapping rule, and converting the initial communication message based on the matching protocol.
[0103] Each embodiment in the present application is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the system and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the description of the method embodiments.
[0104] The system, device, and method provided by the embodiments of the present application are in one-to-one correspondence. Therefore, the system and device also have beneficial technical effects similar to those of their corresponding methods. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the system and device will not be elaborated here.
[0105] It should also be noted that the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity, or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity, or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, commodity, or device comprising the element.
[0106] The above are only the embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A sensing device communication method for an intelligent transportation system, characterized in that: The method comprises: Based on a preset dual-mode detection mechanism, an initial communication message of the sensing device is obtained; wherein the preset dual-mode detection mechanism includes sending a verification instruction set to the sensing device that establishes a communication connection and monitoring a power-on data packet from the sensing device; According to the initial communication message, a corresponding message protocol feature vector is determined, and each feature dimension is dynamically weighted by an information entropy weighting algorithm; Matching the weighted message protocol feature vector with a preset protocol fingerprint library to determine whether the initial communication message has a matching protocol; According to the protocol conversion rule corresponding to the matching result, the initial communication message is converted into the first protocol data, and the initial communication message is compressed into the second protocol data, so as to synchronously send the first protocol data and the second protocol data to the management terminal; wherein the protocol conversion rule includes: converting the initial communication message without matching protocol based on the temporary protocol mapping rule, and converting the initial communication message based on the matching protocol; After converting the initial communication message into the first protocol data and compressing the initial communication message into the second protocol data, the method further includes: Performing a byte difference comparison between the first protocol data and the second protocol data to obtain a comparison difference value; Accumulating a plurality of the comparison difference values within a first preset number of cycles, and comparing each of the comparison difference values with a second preset threshold; When the comparison difference values corresponding to the second preset number of consecutive cycles are all less than the second preset threshold, stop sending the first protocol data, generate temporary protocol mapping rule update prompt information and send it to the management terminal; Wherein, the method further comprises: Generate a difference change curve according to each of the comparison difference values; wherein the horizontal axis of the difference change curve is time, and the vertical axis is the value of the comparison difference value; Slide the preset sliding time window along the difference change curve with a preset step length to determine whether there is a communication anomaly in the difference change curve; wherein the communication anomaly is that the slope of the curve in the preset sliding time window is greater than a preset warning value; If so, generate device communication abnormality alarm information and send it to the management terminal, so as to update the preset protocol fingerprint library based on the feedback information from the management terminal.
2. A method for communication of sensing devices for intelligent transportation systems according to claim 1, characterized in that: The verification instruction set includes at least one or more of the following: a protocol handshake instruction in a preset format, a compatibility detection instruction based on a standard protocol, and a test instruction of a random data field.
3. A method for communication of sensing devices for intelligent transportation systems according to claim 1, characterized in that: According to the initial communication message, the corresponding message protocol feature vector is determined, and each feature dimension is dynamically weighted by an information entropy weighting algorithm, specifically including: Extracting the message structure feature information corresponding to the initial communication message and encoding it into the corresponding message protocol feature vector; wherein the message structure feature information at least includes: a header field, a tail field, a check code type and a data segment length; According to the information entropy weighting algorithm and the historical feature vector samples corresponding to the message structure feature information, the feature weights of each feature dimension of the message protocol feature vector are determined, so as to dynamically weight the message protocol feature vector according to each feature weight.
4. A method for communication of sensing devices for intelligent transportation systems according to claim 3, characterized in that: The weighted message protocol feature vector is matched with a preset protocol fingerprint library to determine whether the initial communication message has a matching protocol, specifically including: Calculating the similarity of each feature dimension between the message protocol feature vector and each protocol feature vector in the preset protocol fingerprint library; wherein the feature dimension similarity is obtained based on the cosine similarity calculation of the corresponding feature dimension between the message protocol feature vector and the protocol feature vector; According to the feature weights and the feature dimension similarities, weighted summation is performed on the feature dimension similarities to determine the protocol similarity corresponding to the same protocol feature vector; Comparing the similarity of each of the protocols with a first preset threshold; In the case where the protocol similarity is greater than the first preset threshold, determining that the initial communication message has a matching protocol, and adding the fingerprint library protocol corresponding to the protocol similarity to the matching result; Otherwise, it is determined that there is no matching protocol for the initial communication message, and no matching protocol is used as the matching result.
5. The method for communication of sensing devices for intelligent transportation system according to claim 1, characterized in that: The method further comprises: In the case where it is determined that the initial communication message does not have a matching protocol, the initial communication message is input into a preset LSTM model to determine each key data field of the initial communication message; Dynamically map each of the key data fields with the fields in the preset standard protocol template to generate a temporary protocol mapping rule including a field mapping table and a verification rule conversion logic according to the dynamic mapping result.
6. A method for communication of sensing devices for intelligent transportation systems according to claim 5, characterized in that: Generating a temporary protocol mapping rule including a field mapping table and a verification rule conversion logic according to the dynamic mapping result, the method further comprising: The temporary protocol mapping rule is converted into a machine instruction by a just-in-time compiler, so as to convert the initial communication message into the first protocol data by the machine instruction.
7. A sensing device communication system for an intelligent transportation system, characterized in that: The system comprises: An acquisition module, configured to acquire an initial communication message of a sensing device based on a preset dual-mode detection mechanism; wherein the preset dual-mode detection mechanism includes sending a verification instruction set to the sensing device that establishes a communication connection and monitoring a power-on data packet from the sensing device; Determine a weighting module, which is used to determine the corresponding message protocol feature vector according to the initial communication message, and dynamically weight each feature dimension through an information entropy weighting algorithm; A matching module, used to match the weighted message protocol feature vector with a preset protocol fingerprint library to determine whether the initial communication message has a matching protocol; A conversion module, configured to convert the initial communication message into first protocol data according to a protocol conversion rule corresponding to a matching result, and compress the initial communication message into second protocol data, so as to synchronously send the first protocol data and the second protocol data to a management terminal; wherein the protocol conversion rule comprises: converting the initial communication message without a matching protocol based on a temporary protocol mapping rule, and converting the initial communication message based on a matching protocol; After converting the initial communication message into the first protocol data and compressing the initial communication message into the second protocol data, the system can also: Performing a byte difference comparison between the first protocol data and the second protocol data to obtain a comparison difference value; Accumulating a plurality of the comparison difference values within a first preset number of cycles, and comparing each of the comparison difference values with a second preset threshold; When the comparison difference values corresponding to the second preset number of consecutive cycles are all less than the second preset threshold, stop sending the first protocol data, generate temporary protocol mapping rule update prompt information and send it to the management terminal; Among other things, the system can also: Generate a difference change curve according to each of the comparison difference values; wherein the horizontal axis of the difference change curve is time, and the vertical axis is the value of the comparison difference value; Slide the preset sliding time window along the difference change curve with a preset step length to determine whether there is a communication anomaly in the difference change curve; wherein the communication anomaly is that the slope of the curve in the preset sliding time window is greater than a preset warning value; If so, generate device communication abnormality alarm information and send it to the management terminal, so as to update the preset protocol fingerprint library based on the feedback information from the management terminal.
8. A sensing device communication device for an intelligent transportation system, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a perception device communication method for an intelligent transportation system as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Electric energy quality monitoring terminal automatic configuration method and system supporting multiple protocols
CN119728505A