Terminal message processing method, management system and storage medium

By using an intelligent gateway to process the converged messages between terminal devices and the cloud platform, the reliability and power consumption issues of data reporting for low-cost terminal devices are resolved, and efficient and stable communication connections are achieved.

CN122053672APending Publication Date: 2026-05-15GUANGZHOU HEMI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU HEMI TECHNOLOGY CO LTD
Filing Date
2026-03-10
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, long connections between low-computing-power, low-power terminal devices and cloud platforms consume a large amount of computing power and bandwidth resources, resulting in low data reporting reliability and high power consumption, which cannot meet the needs of low-cost terminal devices.

Method used

The intelligent gateway enables communication between terminal devices and the cloud platform. It uses converged messages to carry business data and heartbeat data. The intelligent gateway processes these messages uniformly and reduces the frequency of message reporting, thereby reducing the power consumption of terminal devices and improving the reliability of data reporting.

Benefits of technology

It reduces the probability of connection interruption and message loss on terminal devices, ensures the efficiency of business data processing, reduces the connection maintenance pressure on the cloud platform, and improves the system's operational stability and data reporting reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122053672A_ABST
    Figure CN122053672A_ABST
Patent Text Reader

Abstract

The invention discloses a terminal message processing method, a management system and a storage medium, and relates to the technical field of Internet of Things, the method is applied to an intelligent gateway, the intelligent gateway is connected with a cloud platform and terminal equipment, and the method comprises the following steps: under the condition that a fusion message reported by the terminal equipment is received, extracting target data of the fusion message, the target data comprises service data and heartbeat data of the terminal equipment; reporting the service data to a cloud platform; and updating the device state summarized data based on the heartbeat data, and reporting the device state summarized data to the cloud platform based on a preset period. The communication connection between the terminal equipment and the cloud platform is realized through the intelligent gateway, the computing power and bandwidth resources required by connecting the terminal equipment with the cloud platform are reduced, the message reporting frequency of the terminal equipment is reduced by fusing the service data and the heartbeat data carried by the message, the message reporting power consumption of the terminal equipment is reduced, and the user experience is improved. The problems of low data reporting reliability and high power consumption of the terminal equipment are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a terminal message processing method, management system, and storage medium. Background Technology

[0002] With the rapid iteration of IoT technology, the smart home industry has entered a new stage of large-scale development. The number of terminal devices such as sensors, smart switches, and motors has exploded, and the types of devices are becoming increasingly diversified, covering various forms such as active devices and low-power devices. Accurate and real-time reporting of online status by terminal devices to the cloud platform is a core prerequisite for ensuring the stable operation of smart home systems and realizing remote control and intelligent linkage. The rationality of the online status reporting method determines the performance, power consumption, and security of the entire smart home system.

[0003] In existing technologies, terminal devices can establish long-term connections with cloud platforms via networks and maintain their connection status and report their online status by periodically sending heartbeat messages, thereby achieving point-to-point interaction between the terminal device and the cloud platform. However, as terminal devices gradually evolve towards low-cost, low-computing-power, and narrow-bandwidth designs, long-term connections between terminal devices and cloud platforms consume significant computing and bandwidth resources, exceeding the hardware capabilities of such terminal devices and failing to guarantee the reliability of data reporting. Furthermore, continuous heartbeat reporting increases device power consumption, failing to meet the low-power requirements of such terminal devices in practical applications. Therefore, the existing long-term connection and continuous heartbeat message sending method is unsuitable for low-cost terminal devices. If terminal devices use this method to report their online status, the reliability of data reporting is low and the power consumption is high. Summary of the Invention

[0004] This application provides a terminal message processing method, management system, and storage medium to realize the communication connection between terminal devices and cloud platforms through a smart gateway, effectively reducing the computing power and bandwidth resources required for terminal devices to connect to the cloud platform, and reducing the message reporting frequency of terminal devices by integrating message carrying business data and heartbeat data, thereby effectively reducing the message reporting power consumption of terminal devices, and solving the problems of low data reporting reliability and high power consumption of terminal devices in the prior art.

[0005] In a first aspect, this application provides a terminal message processing method applied to a smart gateway, the smart gateway connecting a cloud platform and a terminal device, the method comprising:

[0006] Upon receiving a fusion message reported by the terminal device, the target data of the fusion message is extracted, and the target data includes the service data and heartbeat data of the terminal device; The business data is reported to the cloud platform; The device status summary data is updated based on the heartbeat data, and the device status summary data is reported to the cloud platform according to a preset period.

[0007] Secondly, a management system includes a cloud platform, a smart gateway, and terminal devices, wherein the smart gateway connects the cloud platform and the terminal devices, wherein: The terminal device is used to generate a fusion message based on the target data and report the fusion message to the smart gateway. The target data includes the terminal device's service data and heartbeat data. The intelligent gateway is used to receive the fusion message reported by the terminal device, extract the target data of the fusion message; report the service data to the cloud platform; update the device status summary data based on the heartbeat data, and report the device status summary data to the cloud platform according to a preset period. The cloud platform is used to receive business data and device status summary data reported by the smart gateway, and to manage the data based on the business data and device status summary data.

[0008] Thirdly, a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the terminal message processing method as described in the first aspect.

[0009] In this application, upon receiving a fused message reported by a terminal device, the target data of the fused message is extracted. The target data includes the terminal device's service data and heartbeat data. The service data is then reported to the cloud platform. Based on the heartbeat data, the device status summary data is updated and reported to the cloud platform at a preset period. Through these technical means, the smart gateway can act as a communication terminal node between the terminal device and the cloud platform. The smart gateway uniformly receives, processes, and reports the terminal device's messages, eliminating the need for a direct long-term connection between the terminal device and the cloud platform. This reduces the probability of connection interruption and message loss, ensuring accurate reporting of terminal device messages to the cloud platform and improving the reliability of data reporting. The terminal device reports messages that integrate service data and heartbeat data, avoiding separate periodic reporting of heartbeat messages, reducing the number of message reports from the terminal device, and thus reducing the power consumption of data reporting. The intelligent gateway immediately reports business data to the cloud platform, while heartbeat data is reported periodically. This avoids heartbeat data consuming excessive network bandwidth and affecting the upload efficiency of business data, ensuring efficient processing of business data and thus guaranteeing the normal operation of terminal devices. The cloud platform does not need to establish separate connections with multiple terminal devices and process scattered heartbeat messages; it only needs to interact with the intelligent gateway. This reduces the connection maintenance burden and data processing frequency of the cloud platform, improving its operational stability. Attached Figure Description

[0010] Figure 1 This is a schematic diagram of the framework of the management system provided in the embodiments of this application; Figure 2 This is a flowchart of a terminal message processing method provided in an embodiment of this application; Figure 3 This is a flowchart provided in an embodiment of the present application, showing how the data access layer and the security verification layer determine whether a fused message is an abnormal message; Figure 4 This is a flowchart illustrating the online status of the active detection terminal device provided in an embodiment of this application; Figure 5 This is a flowchart of a health check for a terminal device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a terminal message processing device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a terminal message processing device provided in an embodiment of this application. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. A process can be terminated when its operation is completed, but it may also have additional steps not included in the drawings. A process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0012] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0013] In common existing implementations, terminal devices establish long-lived connections with cloud platforms via a network and maintain their connection status and report their online status by periodically sending heartbeat messages, thus enabling point-to-point interaction between the terminal device and the cloud platform. However, as terminal devices increasingly focus on low-cost, low-power, and narrow-bandwidth computing power, long-lived connections between terminal devices and cloud platforms consume significant computing and bandwidth resources, exceeding the hardware capabilities of such devices and compromising the reliability of data reporting. Furthermore, continuous heartbeat transmissions increase device power consumption, failing to meet the low-power requirements of these terminal devices in practical applications. Therefore, existing long-lived connections and continuous heartbeat message transmissions are unsuitable for low-cost terminal devices. If terminal devices use this method to report their online status, the reliability of data reporting is low and the power consumption is high.

[0014] To address the technical problems existing in the above-mentioned implementation methods, this application proposes a terminal message processing method to realize the communication connection between the terminal device and the cloud platform through a smart gateway, effectively reducing the computing power and bandwidth resources required for the terminal device to connect to the cloud platform, and reducing the message reporting frequency of the terminal device by fusing messages to carry business data and heartbeat data, thereby effectively reducing the message reporting power consumption of the terminal device.

[0015] The terminal message processing method provided in this embodiment can be executed by a terminal message processing device. This device can be implemented through software and / or hardware, and can consist of two or more physical entities, or a single physical entity. For example, the terminal message processing device can be a smart gateway connected between the terminal device and the cloud platform, or it can be a management system composed of the terminal device, the cloud platform, and the smart gateway. In the management system, the terminal device reports its own business data and heartbeat data to the smart gateway, the smart gateway reports the business data and heartbeat data to the cloud platform, and the cloud platform monitors and manages the terminal device based on the business data and heartbeat data. For example, Figure 1 This is a schematic diagram of the framework of the management system provided in the embodiments of this application. Figure 1As shown, the management system includes a cloud platform, a smart gateway, and multiple terminal devices. The smart gateway pre-establishes a network connection with the cloud platform, such as through Wi-Fi or Ethernet, to create a stable communication link. The smart gateway's high computing power allows it to use high-bandwidth, low-latency protocols to ensure efficient communication with the cloud platform. Subsequently, the smart gateway establishes communication connections with the terminal devices, using low-power communication protocols such as Zigbee, LoRa, BLE, and TPUNB (Techphant Ultra-Narrow Band), adapting to the hardware characteristics of low-computing-power, low-power terminal devices. Each terminal device can generate a fused message based on service data and heartbeat data, and report the fused message to the smart gateway through the communication connection. Each time the smart gateway receives a fused message from a terminal device, it reports the service data of the fused message to the cloud platform through the communication connection and updates the device status summary data with the heartbeat data of the fused message. The device status summary data includes heartbeat data reported by multiple terminal devices within a certain period. When the reporting period ends, the smart gateway reports the device status summary data generated in the current period to the cloud platform through the communication connection between the gateway and the cloud platform. The cloud platform can perform business management and operation control of each terminal device based on business data and device status summary data.

[0016] Optionally, the terminal device can be a smart home device, then the management system can be a smart home system, and the smart gateway and cloud platform are the smart home gateway and home cloud platform set up for the smart home system.

[0017] The terminal message processing device is equipped with at least one type of operating system, including but not limited to Android, Linux, and Windows. The terminal message processing device can install at least one application based on the operating system. This application can be a built-in application of the operating system or an application downloaded from a third-party device or server. In this embodiment, the terminal message processing device has at least one application capable of executing terminal message processing methods.

[0018] For ease of understanding, this embodiment uses a smart gateway as the main body for executing the terminal message processing method as an example for description.

[0019] Figure 2 A flowchart of a terminal message processing method provided in an embodiment of this application is given. (Reference) Figure 2 The steps of this terminal message processing method include S110-S130: S110. Upon receiving a fusion message reported by the terminal device, extract the target data of the fusion message. The target data includes the terminal device's service data and heartbeat data.

[0020] The fused message is a message used by the terminal device to jointly report service data and heartbeat data. Service data refers to service-related data from the terminal device; for example, if the terminal device is a sensor device, the service data is sensor data collected by the sensor device; if the terminal device is a switch device, the service data is status data during switch state transitions. Heartbeat data indicates whether the terminal device is online. For example, when a service event triggers sensor data acquisition or switch state transition, the terminal device obtains the corresponding service data and the current heartbeat data. It then encapsulates the service data and heartbeat data into a fused message according to a preset message frame structure and sends the fused message to the smart gateway via a communication protocol. Upon receiving the fused message, the smart gateway records the reception time and source address of the fused message. The source address can be the communication address of the terminal device that sent the fused message. Since the terminal device only generates a fused message carrying heartbeat data and service data when the service is triggered, it realizes the heartbeat reporting mechanism and the service reporting mechanism through a single mechanism. This eliminates the need to generate heartbeat data according to the heartbeat mechanism and process the heartbeat response from the smart gateway, simplifying the message generation and response operations of the terminal device and thus reducing the operating power consumption of the terminal device.

[0021] Optionally, the message frame structure of the fused message is a frame header plus target data. The frame header may include the device identifier of the terminal device and the message type of the fused message. The terminal device can encapsulate the device identifier and message type into a frame header, encapsulate the service data and target data into target data, and then encapsulate the frame header and target data into a fused message, according to the message frame structure of the fused message. Afterwards, the fused message is reported to the intelligent gateway.

[0022] After receiving a message reported by a terminal device, the smart gateway parses the message frame header to obtain the device identifier and message type of the terminal device. Based on the message type, it determines that the message is a fusion message. Then, based on the message frame structure of the fusion message, it extracts the target data from the fusion message, thereby obtaining the business data and heartbeat data from the target data.

[0023] It should be noted that during transmission, merged messages may experience data loss or errors due to network interference, signal attenuation, and other factors. To address this, when generating merged messages, terminal devices can generate a checksum based on the frame header and target data to verify the integrity of the merged message. This checksum is then appended to the end of the merged message frame before being uploaded to the smart gateway. Correspondingly, the smart gateway receives merged messages including the checksum. The smart gateway can verify the integrity of the merged message based on this checksum, filtering out incomplete messages to prevent subsequent invalidation of incomplete messages. Specifically, after receiving a merged message from a terminal device, the smart gateway extracts the checksum from the merged message and calculates its own checksum. If the extracted checksum differs from the calculated checksum, the merged message is marked as an abnormal message to be filtered.

[0024] For example, the smart gateway extracts the checksum from the frame end of the fused message and calculates the checksum of the fused message based on the frame header and target data. Optionally, both the smart gateway and the terminal device can use a Cyclic Redundancy Check (CRC) algorithm to calculate the checksum from the frame header and target data of the fused message. If the checksum calculated by the smart gateway matches the checksum extracted from the fused message, it indicates that the frame header and target data used by the smart gateway and the terminal device to calculate the checksum are the same, and the smart gateway confirms that it has received a complete fused message. If the checksum calculated by the smart gateway matches the checksum extracted from the fused message, it indicates that the frame header and target data used by the smart gateway and the terminal device to calculate the checksum are different, and the smart gateway confirms that it has received an incomplete fused message. When the smart gateway receives an incomplete fused message, it marks the fused message as an abnormal message to be filtered, so that abnormal messages can be filtered subsequently without further data extraction and uploading operations for abnormal messages.

[0025] This embodiment uses the checksum of the fused message to perform consistency verification, quickly identifying data errors, loss, or tampering that occur during the transmission of the fused message. This avoids the smart gateway from invalidating abnormal messages, reducing the computing power consumption of the smart gateway, and also avoids reporting erroneous data from abnormal messages to the cloud platform, ensuring the management reliability of the cloud platform.

[0026] Furthermore, after marking the fused messages as abnormal messages to be filtered, abnormal logs can be generated based on the abnormal messages and their source addresses, receiving events, and checksum mismatches. The abnormal logs can be saved locally so that they can be uploaded to the cloud platform when the log transmission cycle arrives.

[0027] When the smart gateway receives a complete fusion message, it can extract the target data from the fusion message, thereby obtaining the business data and heartbeat data in the target data.

[0028] Besides data errors and loss in the fused message causing it to become an unprocessable anomalous message, format errors and invalid target data can also lead to this issue. To address this, the format and content of the target data can be verified to filter out anomalous messages with format errors or invalid content. Specifically, after extracting the target data from the fused message, the smart gateway verifies the format and content of the target data; if the target data has format errors or invalid content, the fused message is marked as an anomalous message to be filtered.

[0029] For example, after extracting the target data from the fused message, the smart gateway can first verify the format of the target data. The smart gateway stores a standard format specification for the target data, which clearly defines the content type, data length, and data order of the target data. The smart gateway verifies whether the target data contains the corresponding type of content, whether the data content is concatenated in the corresponding data order, and whether the length of the data content is equal to the data length. If the target data format meets all the above requirements, the target data format is confirmed to be correct; if any requirement is not met, the target data format is confirmed to be incorrect. After the target data format verification is passed, the validity of the target data content can be verified. This includes verifying whether the data type of the target data meets preset requirements, such as sensor data being floating-point, switch status data being Boolean, and time data being integer. It also verifies whether the values ​​of the target data content are within a preset range, such as switch status data only including "on" and "off". Finally, it verifies whether there are logical contradictions in the target data content, such as the timestamp of the sensor data being later than the current time. If the target data content meets all the above requirements, the target data content is confirmed to be valid; if any requirement is not met, the target data content is confirmed to be invalid. In the case of an incorrect format in the merged message, the data of the merged message is no longer checked for invalidity; instead, the merged message is directly marked as an abnormal message to be filtered. If the format of the merged message passes the validation but the data of the merged message is checked for invalidity, and the data of the merged message is confirmed to be invalid, the merged message is marked as an abnormal message to be filtered.

[0030] Besides verifying the format of the target data before verifying its content, one can also verify the content of the target data before verifying its format, or verify both the format and content of the target data simultaneously. That is, this embodiment does not restrict the order in which the format and content of the target data are verified. However, if the format is incorrect or the content is invalid, the fused message is immediately marked as an abnormal message to be filtered, so that the intelligent gateway can filter the abnormal message without requiring subsequent data processing and uploading operations.

[0031] This embodiment performs format and data verification on the fused messages, filtering out abnormal messages with incorrect format and invalid data in advance. This avoids the smart gateway from invalidating abnormal messages, reducing the computing power consumption of the smart gateway, and also avoids reporting the erroneous data of abnormal messages to the cloud platform, ensuring the management reliability of the cloud platform.

[0032] Furthermore, after marking the fused messages as abnormal messages to be filtered, abnormal logs can be generated based on the abnormal messages and their source addresses, received events, and the abnormal types of target data, such as format errors or invalid data. The abnormal logs are saved locally so that they can be uploaded to the cloud platform when the log transmission cycle arrives.

[0033] When the smart gateway receives target data that is correctly formatted and valid, it performs subsequent processing on the target data.

[0034] It should be noted that the integrity verification, format correctness verification, and data validity verification of the checksum are mainly used to detect non-malicious errors in the merged message. They can typically detect random errors caused by noise during transmission, but are less effective against malicious attacks. This is because attackers can easily modify the data and the checksum, ensuring the checksum matches the subsequently calculated checksum, and modifying the data content without altering its format or ensuring content validity. Therefore, security verification can be performed on the merged message to determine if it has been maliciously tampered with or if it represents a malicious attack.

[0035] Optionally, the target data includes a digital signature, which is pre-calculated by the terminal device based on a preset key. The terminal device uploads the fused message carrying the digital signature to the smart gateway. The smart gateway performs signature verification on the fused message based on the digital signature to filter out abnormal messages that fail signature verification. Specifically, after extracting the target data of the fused message, the smart gateway performs signature verification on the fused message based on the digital signature in the target data; if the signature verification fails, the fused message is marked as an abnormal message to be filtered.

[0036] For example, when generating a fused message, the terminal device can retrieve relevant hash values ​​from a pre-calculated hash library based on business data and heartbeat data. This hash value is then added as a digital signature to the target data, and the fused message is generated based on the target data. The hash values ​​in the hash library can be pre-calculated by a smart gateway or cloud server using hash algorithms such as HMAC-MD5 / HMAC-SHA256 based on a preset key, processing strings composed of various business data and heartbeat data. The smart gateway or cloud server then configures the hash library on the terminal device so that the terminal device can directly retrieve the pre-calculated hash values ​​from the hash library when generating the digital signature, eliminating the need for complex hash calculations on the business data and heartbeat data, thus reducing the terminal device's power consumption. Afterward, the terminal device reports the fused message to the smart gateway. The smart gateway extracts the target data from the fused message, retrieving the business data, heartbeat data, and digital signature from the target data. Based on a locally stored preset key, it calculates hash values ​​for the business data and heartbeat data in the target data using HMAC-SHA256 or HMAC-MD5, and compares the digital signature with the calculated hash values ​​for consistency. If the digital signature matches the calculated hash value, it indicates that the source of the merged message is correct and its content has not been tampered with, thus confirming that the merged message has passed security verification. If the digital signature does not match the calculated hash value, it indicates that the source of the merged message is incorrect and its content has been tampered with, thus confirming that the merged message has failed signature verification. If the merged message fails signature verification, the target data cannot be processed correctly, and the merged message can be directly marked as an abnormal message to be filtered, so that the intelligent gateway can filter abnormal messages without requiring subsequent data processing and reporting operations.

[0037] This embodiment verifies the fused messages using digital signatures on the target data to identify whether the fused messages are forged or tampered with. Forged or tampered messages are then filtered out, ensuring that the data processed and reported by the smart gateway originates from legitimate terminal devices, thus guaranteeing the reliability of business data and device status data. Furthermore, digital signature verification adds a security checkpoint to the communication between the terminal device and the smart gateway, compensating for the insufficient security protection capabilities of low-computing-power terminals, preventing message tampering attacks and forged terminal attacks from damaging the system, and ensuring the stability of system operation.

[0038] Furthermore, after marking the fused message as an abnormal message to be filtered, an abnormal log can be generated based on the abnormal message, its source address, receiving event, and the type of abnormality that failed signature verification. The abnormal log is saved locally so that it can be uploaded to the cloud platform when the log transmission cycle arrives.

[0039] Once the digital signature of the merged message passes security verification, subsequent processing can be performed on the target data.

[0040] Besides message tampering and forgery attacks, malicious attackers also use messages to launch replay attacks or denial-of-service (DoS) attacks against smart gateways. If these malicious attacks are not identified and blocked, the smart gateway will process a large number of invalid messages, leading to computing overload, interrupting normal business operations, and severely impacting system stability. To address this, replay attack detection and / or DoS attack detection can be performed on the merged messages to filter out abnormal messages belonging to malicious attacks. Specifically, after extracting the target data from the merged messages, the smart gateway performs replay attack detection based on the message timestamp, and / or DoS attack detection based on the message reporting frequency of the terminal devices.

[0041] For example, after the smart gateway extracts the target data of the fused message, it queries the time cache queue of the corresponding terminal device. If a timestamp matching the target data's timestamp exists in the time cache queue, the fused message is confirmed as a replay attack. If no timestamp matching the target data's timestamp exists in the time cache queue, the fused message is confirmed as not a replay attack, and the target data's timestamp is stored in the terminal device's time cache queue. Timestamps in the time cache queue are removed after a preset storage time to avoid misidentifying normally reported fused messages from the terminal device as replay attacks. Furthermore, the smart gateway can use the timestamps in the terminal device's time cache queue to calculate the reporting frequency of fused messages from the terminal device. If the reporting frequency exceeds a preset frequency threshold for the terminal device, it indicates that the terminal device's reporting frequency is too high, and the fused message reported by the terminal device can be determined as a denial-of-service attack. If the reporting frequency is less than or equal to the preset frequency threshold for the terminal device, it indicates that the terminal device's reporting frequency is normal, and the fused message reported by the terminal device can be determined as not a denial-of-service attack.

[0042] The intelligent gateway can first detect replay attacks on the merged packets. If the merged packets are not subject to replay attacks, then a denial-of-service (DoS) attack can be launched. Once a merged packet is confirmed to be a replay attack, the DoS attack will not be launched; instead, the merged packet will be directly marked as an abnormal packet to be filtered. If a DoS attack is launched on a merged packet after it is not a replay attack, and the DoS attack is confirmed to be a DoS attack, the merged packet will be marked as an abnormal packet to be filtered.

[0043] In addition to performing replay attack detection on the merged packets before performing denial-of-service attack detection, it is also possible to perform denial-of-service attack detection on the merged packets before performing replay attack detection, or to perform denial-of-service attack and replay attack detection on the merged packets simultaneously. However, once a merged packet is detected to be a replay attack and / or denial-of-service attack, it is immediately marked as an abnormal packet to be filtered, so that the smart gateway can filter the abnormal packets without performing subsequent data processing and uploading operations on the abnormal packets.

[0044] This embodiment detects replay attacks and denial-of-service attacks on the fused packets to identify malicious and abnormal packets. These abnormal packets are then filtered out, effectively blocking replay and denial-of-service attacks and preventing them from interfering with the normal operation of the system, thus ensuring system reliability. Furthermore, the smart gateway can intercept attack packets to prevent them from entering subsequent processing flows, reducing the computing power consumed by the smart gateway and ensuring its operational performance.

[0045] Furthermore, after marking the fused messages as abnormal messages to be filtered, abnormal logs can be generated based on the abnormal messages, their source addresses, receiving events, and the abnormal types of replay attacks or denial-of-service attacks. The abnormal logs are stored locally so that they can be uploaded to the cloud platform when the log transmission cycle arrives.

[0046] When the smart gateway confirms that the fused message is not a replay attack or a denial-of-service attack, it performs subsequent processing on the target data.

[0047] Optionally, the intelligent gateway includes a data access layer, a security verification layer, a data processing layer, and a cloud interaction layer. The intelligent gateway receives fused messages sent by terminal devices through the data access layer, performs preliminary verification and extracts target data from the fused messages, performs security verification on the target data through the security verification layer, processes the target data through the data processing layer, and uploads the processed target data to the cloud platform through the cloud interaction layer. That is, the intelligent gateway executes steps S110-S130 in cooperation with the data access layer, security verification layer, data processing layer, and cloud interaction layer.

[0048] In this embodiment, Figure 3 This is a flowchart provided in an embodiment of this application, showing how the data access layer and the security verification layer determine whether a fused message is an abnormal message. Figure 3As shown, after receiving the fused message reported by the terminal device, the data access layer can calculate and extract the checksum based on the target data of the fused message. It then determines whether the extracted checksum matches the calculated checksum to determine if the fused message has passed integrity verification. If the checksum matches and verification is successful, the target data of the fused message is extracted, and its format and content are verified. After confirming that the format is correct and the content is valid, the target data is transmitted to the security verification layer. The security verification layer first performs signature verification on the fused message based on the digital signature of the target data. After the fused message passes signature verification, it performs replay attack and denial-of-service attack detection. If the fused message does not fall under replay attack or denial-of-service attack detection, it is determined to be a secure message and the target data is transmitted to the data processing layer for further processing. Conversely, if the checksum is inconsistent, the format is incorrect, the content is invalid, the signature verification fails, or the merged message is a replay attack and / or a denial-of-service attack, the merged message is marked as an abnormal message to be filtered, thus achieving effective filtering of abnormal messages. This embodiment performs layer-by-layer verification of the integrity, format accuracy, content validity, and security of the merged message through the data access layer and the security verification layer to effectively filter abnormal messages. The target data of complete, formatted, and valid secure messages is transmitted to the data processing layer for subsequent processing, effectively avoiding invalid processing of abnormal messages by the smart gateway and saving the smart gateway's computing power.

[0049] S120, Report business data to the cloud platform.

[0050] For example, after receiving the target data, the data processing layer extracts the business data from the target data and transmits the business data to the cloud interaction layer. The cloud interaction layer then reports the business data to the cloud platform, ensuring that the cloud platform processes high-priority business data in a timely manner and guarantees the normal operation of the system business.

[0051] S130. Update the device status summary data based on heartbeat data, and report the device status summary data to the cloud platform based on a preset period.

[0052] For example, after receiving the target data, the data processing layer retrieves heartbeat data from it. This heartbeat data is not reported to the cloud platform along with the business data; instead, it is periodically aggregated and reported to the cloud platform. That is, the data processing layer pre-sets a reporting cycle for the heartbeat data. It generates summarized device status data from the heartbeat data within the current reporting cycle and transmits this summarized data to the cloud interaction layer at the end of the current reporting cycle. The cloud interaction layer then reports the summarized device status data to the cloud platform.

[0053] The device status summary data can be either a summary file of heartbeat data from all terminal devices received by the data processing layer within a cycle, or a device status summary table generated by the data processing layer based on the heartbeat data received from all terminal devices within a cycle. The device status summary table records the online status, heartbeat timestamp, and device identifier corresponding to each heartbeat data in rows. The heartbeat timestamp can be the message timestamp from the target data, as the message generation time is close to the heartbeat data generation time. Whenever the data processing layer receives target data, it retrieves the heartbeat data from the target data and records the corresponding online status, heartbeat timestamp, and device identifier in the same row of the device status summary table, thus updating the device status summary table based on the heartbeat data. It should be noted that at the beginning of the current reporting cycle, the data processing layer obtains an empty device status summary table. During the reporting cycle, newly acquired heartbeat data is added to the device status summary table one by one. At the end of the reporting cycle, the device status summary table is reported to the cloud platform so that the cloud platform can confirm the online status of each terminal device within the corresponding reporting cycle through the device status summary table.

[0054] Since the fusion message is generated by the terminal device when a service event is triggered, if the terminal device does not trigger a service event for an extended period, it will not report the fusion message to the intelligent gateway for a long time. Consequently, the intelligent gateway will not receive heartbeat data from the terminal device for an extended period, effectively losing monitoring of the terminal device's online status and unable to determine whether the terminal device is online or offline. Therefore, to ensure effective monitoring of the terminal device's online status, the intelligent gateway can proactively probe the terminal device's online status when it has not received heartbeat data for an extended period, thus preventing the terminal device from remaining offline for too long and affecting the normal operation of the system. Specifically… Figure 4 This is a flowchart illustrating the online status of the active detection terminal device provided in an embodiment of this application. For example... Figure 4 As shown, the steps for actively detecting the online status of the terminal device specifically include S1401-S1403: S1401. Based on the summarized equipment status data, identify the equipment that has not reported within the time limit and send a detection request to the equipment that has not reported within the time limit.

[0055] For example, the smart gateway iterates through the device status reporting table to check the latest heartbeat timestamps of each terminal device. If the time interval between the latest heartbeat timestamp and the current time is greater than a preset duration, it indicates that the terminal device has not reported heartbeat data for an extended period, and the terminal device is marked as a timeout-out-of-reporting device. Alternatively, at the start of the current reporting cycle and after a preset interval, the smart gateway iterates through the device status reporting table to determine whether the table records heartbeat data for all preset terminal devices. If heartbeat data for a particular terminal device is missing, the terminal device is marked as a timeout-out-of-reporting device.

[0056] Then, based on the device identifier of the device that failed to report within the time limit, the corresponding communication address is queried, and a probe request is sent to the device that failed to report within the time limit based on the communication address.

[0057] S1402. If heartbeat data that has not been reported by the device within the timeout period is received, update the device status summary data based on the received heartbeat data.

[0058] For example, after receiving a probe request, the terminal device can generate a fusion message or a heartbeat message based on the probe request, and report the fusion message or heartbeat message to the smart gateway. The smart gateway extracts heartbeat data from the received fusion message or heartbeat message, and records the online status, heartbeat timestamp, and device identifier corresponding to the heartbeat data in the same row of the device status summary table.

[0059] S1403. If the device fails to report its status within the timeout period and does not respond to the detection request, add the offline status of the device that failed to report its status within the timeout period to the device status summary data.

[0060] For example, when a device that has not reported for a timeout is offline, it cannot respond to a probe request. Therefore, if the smart gateway cannot receive heartbeat data within a preset time interval after the probe request is sent, it will confirm that the device that has not reported for a timeout is not responding to the probe request, thereby automatically confirming that the device that has not reported for a timeout is offline. The offline status of the device that has not reported for a timeout, the device identifier, and the offline time will be recorded in the same cell of the device status summary table. The offline time can be the time when the device that has not reported for a timeout is confirmed to be offline.

[0061] This embodiment utilizes an active detection mechanism to confirm the online status of terminal devices that have not reported within the timeout period. This avoids online devices being mistakenly identified as offline devices due to non-offline reasons such as business events not being triggered, network latency, or packet loss. It also prevents offline devices from being in an unknown state for a long time, ensuring that the cloud platform can effectively grasp the status of each terminal device and improve the operational reliability of the cloud platform.

[0062] In one embodiment, the target data further includes diagnostic data, which is abnormal state data of the corresponding terminal device. For example, the diagnostic data may include the terminal device's low battery status, overheating status, network latency status, and CPU overload status. After triggering a service event, the terminal device acquires service data and heartbeat data, and checks whether the current state is abnormal. If abnormal, it acquires the corresponding abnormal state data as diagnostic data. After encapsulating the service data, heartbeat data, and diagnostic data into target data, the target data is encapsulated into a fusion message. The terminal device then reports the fusion message carrying the service data, heartbeat data, and diagnostic data to the intelligent gateway. Subsequently, the intelligent gateway can extract the target data from the fusion message, obtain the diagnostic data and heartbeat data from the target data, and perform health checks based on the diagnostic data and heartbeat data to achieve fault prediction of the terminal device, thereby improving the cloud platform's operational and maintenance response efficiency for faulty devices. Specifically, Figure 5 This is a flowchart of a health check for a terminal device provided in an embodiment of this application. For example... Figure 5 As shown, the steps for performing a health check on the terminal device specifically include S1501-S1502: S1501. Based on diagnostic data and heart rate data, detect whether the terminal device is in a healthy state.

[0063] For example, after extracting the target data from the fused message, the smart gateway obtains diagnostic data and heartbeat data from the target data. Based on preset health detection rules, it processes the diagnostic data and heartbeat data to determine whether the terminal device is in a healthy state. The health detection rules can be a pre-trained neural network model. The neural network model extracts feature information from the diagnostic data and heartbeat data, predicts the probability value of the terminal device being in a healthy state based on the feature information, and determines that the terminal device is in a healthy state if the probability value is greater than a preset probability threshold; otherwise, it determines that the terminal device is not in a healthy state. The neural network model can be pre-trained by a cloud platform using diagnostic sample data and heartbeat sample data from various terminal devices. The cloud platform generates a configuration file for the neural network model and distributes it to the smart gateway, which then deploys the neural network model locally as a health detection rule according to the configuration file. In addition, the health detection rules also include preset health calculation formulas and health thresholds. The health calculation formulas are used to calculate the health level of the terminal device from the diagnostic data and heartbeat data. If the health level is greater than or equal to the health threshold, the terminal device is determined to be in a healthy state; otherwise, it is determined that the terminal device is not in a healthy state.

[0064] S1502. When the terminal device is not in a healthy state, the diagnostic data, heart rate data and health test results are reported to the cloud platform in real time.

[0065] For example, when a terminal device is not in a healthy state, it indicates that the smart gateway has predicted a potential malfunction. To prevent the malfunction from actually occurring, the smart gateway can upload diagnostic data, heart rate data, and health monitoring results to the cloud platform in real time. That is, once the smart gateway detects that a terminal device is not in a healthy state, it immediately uploads the diagnostic data, heart rate data, and health monitoring results to the cloud platform without waiting for the reporting cycle to arrive. This allows the cloud platform to promptly verify whether a malfunction is likely to occur and, upon successful verification, quickly perform fault maintenance on the terminal device, preventing the malfunction from affecting the system's business operations and improving the reliability of the system's business operations.

[0066] This embodiment uses diagnostic data and heartbeat data to jointly detect the health status of terminal devices. When a terminal device is not in a healthy state, it immediately reports the diagnostic data, heartbeat data, and health detection results to the cloud platform without waiting for a preset period of device status data aggregation. This allows the cloud platform to detect terminal device faults in advance, trigger subsequent maintenance processes in a timely manner, and improve the system's maintenance efficiency and operational reliability.

[0067] Furthermore, if the terminal device is detected to be in a healthy state, the heartbeat data, diagnostic data, and health test results are added to the device status summary data to periodically report the heartbeat data, diagnostic data, and health test results.

[0068] In one embodiment, the health diagnosis rules used by the smart gateway to diagnose whether the terminal device is in a healthy state, the reporting cycle for reporting heartbeat data, and the key used for digital signature verification can all be configured through a cloud platform. Specifically, the smart gateway receives a configuration instruction issued by the cloud platform, which includes at least one of the health diagnosis rules, the reporting cycle, and the key to be rotated; updates at least one of the locally configured health diagnosis rules, the reporting cycle, and the key to be rotated according to the configuration instruction; and after updating the local configuration, sends a corresponding configuration instruction response result back to the cloud platform. Here, the reporting cycle is the period during which the smart gateway reports summarized device status data; the health diagnosis rules are the rules used by the smart gateway to diagnose whether the terminal device is in a healthy state; and the key to be rotated is the key that the terminal device will soon update for digital signature verification.

[0069] Before the smart gateway starts operating, the cloud platform can generate configuration instructions based on pre-set health diagnosis rules and reporting cycles, and send these instructions to the smart gateway. The smart gateway then parses the health diagnosis rules and reporting cycles from the configuration instructions and configures them as its local health diagnosis rules and reporting cycles. Subsequently, during the real-time packet collection process of the smart gateway, the cloud platform can periodically rotate the key to enhance the reliability of digital signatures. When the cloud platform rotates to a new key, it generates configuration instructions based on the new key and sends them to the smart gateway. The smart gateway parses the new key from the configuration instructions, updates its locally configured key with the new key, and sends the new key to the terminal device so that the terminal device can synchronously update its locally configured key. Alternatively, if the terminal device uses a pre-computed digital signature, the smart gateway will update the hash library based on the new key and then send the hash library to the terminal device for hash library reconfiguration, allowing the terminal device to directly obtain the pre-computed digital signature. After configuring the health diagnosis rules, reporting cycle, and / or keys to be rotated, the smart gateway can generate a configuration completion response and send the response back to the cloud platform. This allows the cloud platform to clearly identify the health diagnosis rules, reporting cycle, and / or keys to be rotated currently used by the smart gateway, ensuring that the configurations of the cloud platform and the smart gateway are synchronized.

[0070] In this embodiment, the smart gateway can receive configuration instructions from the cloud platform through the cloud interaction layer, and then complete the local configuration update according to the configuration instructions, and send the corresponding response results back to the cloud platform.

[0071] In summary, the terminal message processing method provided in this application, upon receiving a fused message reported by a terminal device, extracts the target data of the fused message, which includes the terminal device's service data and heartbeat data; reports the service data to the cloud platform; updates the device status summary data based on the heartbeat data; and reports the device status summary data to the cloud platform according to a preset period. Through these technical means, the smart gateway can act as a communication terminal node between the terminal device and the cloud platform. The smart gateway uniformly receives, processes, and reports the terminal device's messages, eliminating the need for a direct long-term connection between the terminal device and the cloud platform. This reduces the probability of connection interruption and message loss, ensuring that the terminal device's messages can be accurately reported to the cloud platform, thus improving the reliability of the terminal device's data reporting. The terminal device reports messages that integrate service data and heartbeat data, avoiding the separate periodic reporting of heartbeat messages, reducing the number of message reports by the terminal device, and thereby reducing the power consumption of the terminal device's data reporting. The intelligent gateway immediately reports business data to the cloud platform, while heartbeat data is reported periodically. This avoids heartbeat data consuming excessive network bandwidth and affecting the upload efficiency of business data, ensuring efficient processing of business data and thus guaranteeing the normal operation of terminal devices. The cloud platform does not need to establish separate connections with multiple terminal devices and process scattered heartbeat messages; it only needs to interact with the intelligent gateway. This reduces the connection maintenance burden and data processing frequency of the cloud platform, improving its operational stability.

[0072] Based on the above embodiments, Figure 6 This is a schematic diagram of a terminal message processing device provided in an embodiment of this application. (Reference) Figure 6 The terminal message processing device provided in this embodiment specifically includes: a fusion message processing module 21, a service data reporting module 22, and a heartbeat data reporting module 23.

[0073] The fusion message processing module 21 is configured to extract the target data of the fusion message when it receives the fusion message reported by the terminal device. The target data includes the service data and heartbeat data of the terminal device. The business data reporting module 22 is configured to report business data to the cloud platform; The heartbeat data reporting module 23 is configured to update the device status summary data based on heartbeat data and report the device status summary data to the cloud platform according to a preset period. Based on the above embodiments, the target data also includes diagnostic data, which is the abnormal status data of the corresponding terminal device; correspondingly, the terminal message processing device also includes a health detection module, which is configured to detect whether the terminal device is in a healthy state based on the diagnostic data and heartbeat data after extracting the target data of the fused message; if the terminal device is not in a healthy state, the diagnostic data, heartbeat data and health detection results are reported to the cloud platform in real time.

[0074] Based on the above embodiments, the terminal message processing device further includes: an active detection module, configured to, after updating the device status summary data based on heartbeat data, determine the devices that have not reported within the timeout period according to the device status summary data, and send a detection request to the devices that have not reported within the timeout period; upon receiving heartbeat data reported by the devices that have not reported within the timeout period, update the device status summary data based on the received heartbeat data; and if the devices that have not reported within the timeout period do not respond to the detection request, add the offline status of the devices that have not reported within the timeout period to the device status summary data.

[0075] Based on the above embodiments, the target data also includes a digital signature; correspondingly, the fusion message processing module 21 further includes: a first abnormal message detection unit, configured to perform signature verification on the fusion message based on the digital signature in the target data after extracting the target data of the fusion message; if the signature verification fails, the fusion message is marked as an abnormal message to be filtered.

[0076] Based on the above embodiments, the target data also includes a message timestamp; correspondingly, the fused message processing module 21 further includes: a second abnormal message detection unit, configured to perform replay attack detection on the fused message based on the message timestamp after extracting the target data of the fused message, and / or perform denial-of-service attack detection on the fused message based on the message reporting frequency of the terminal device; in the case of a replay attack and / or denial-of-service attack, the fused message is marked as an abnormal message to be filtered.

[0077] Based on the above embodiments, the fused message includes a checksum; after receiving the fused message reported by the terminal device, the fused message processing module 21 further includes: a third abnormal message detection unit, configured to extract the checksum from the fused message and calculate the checksum of the fused message; if the extracted checksum is inconsistent with the calculated checksum, the fused message is marked as an abnormal message to be filtered.

[0078] Based on the above embodiments, the fusion message processing module 21 further includes: a fourth abnormal message detection unit, configured to verify the format and content of the target data after extracting the target data of the fusion message; and to mark the fusion message as an abnormal message to be filtered if the format of the fusion message is incorrect or the content is invalid.

[0079] Based on the above embodiments, the terminal message processing device further includes: a configuration instruction response module, configured to receive a configuration instruction issued by the cloud platform, the configuration instruction including at least one of health diagnosis rules, reporting period, and key to be rotated; update at least one of the locally configured health diagnosis rules, reporting period, and key to be rotated according to the configuration instruction; and after updating the local configuration, send a corresponding configuration instruction response result back to the cloud platform.

[0080] The terminal message processing apparatus provided in this application, upon receiving a fused message reported by a terminal device, extracts the target data of the fused message. The target data includes the terminal device's service data and heartbeat data. The service data is then reported to the cloud platform. Based on the heartbeat data, the device status summary data is updated, and the device status summary data is reported to the cloud platform according to a preset period. Through these technical means, the smart gateway can act as a communication terminal node between the terminal device and the cloud platform. The smart gateway uniformly receives, processes, and reports the terminal device's messages, eliminating the need for a direct long-term connection between the terminal device and the cloud platform. This reduces the probability of connection interruption and message loss, ensuring accurate reporting of terminal device messages to the cloud platform and improving the reliability of data reporting. The terminal device reports messages that integrate service data and heartbeat data, avoiding separate periodic reporting of heartbeat messages, reducing the number of message reports from the terminal device, and thus reducing the power consumption of data reporting. The intelligent gateway immediately reports business data to the cloud platform, while heartbeat data is reported periodically. This avoids heartbeat data consuming excessive network bandwidth and affecting the upload efficiency of business data, ensuring efficient processing of business data and thus guaranteeing the normal operation of terminal devices. The cloud platform does not need to establish separate connections with multiple terminal devices and process scattered heartbeat messages; it only needs to interact with the intelligent gateway. This reduces the connection maintenance burden and data processing frequency of the cloud platform, improving its operational stability.

[0081] The terminal message processing apparatus provided in this application embodiment can be used to execute the terminal message processing method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0082] Figure 7 This is a schematic diagram of the structure of a terminal message processing device provided in an embodiment of this application, with reference to... Figure 7The terminal message processing device includes a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The number of processors 31 and the number of memories 32 in the terminal message processing device can be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the terminal message processing device can be connected via a bus or other means.

[0083] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the terminal message processing methods in any embodiment of this application (e.g., the converged message processing module 21, the service data reporting module 22, and the heartbeat data reporting module 23 in the terminal message processing device). The memory 32 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory 32 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0084] The communication device 33 is used for data transmission.

[0085] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 32, thereby implementing the aforementioned terminal message processing method.

[0086] Input device 34 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 35 may include display devices such as a display screen.

[0087] The terminal message processing device provided above can be used to execute the terminal message processing method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0088] This application also provides a management system, including a cloud platform, a smart gateway, and terminal devices, wherein the smart gateway connects the cloud platform and the terminal devices, and: The terminal device is used to generate a fusion message based on the target data and report the fusion message to the smart gateway. The target data includes the terminal device's service data and heartbeat data. The intelligent gateway is used to receive the fusion messages reported by the terminal devices, extract the target data of the fusion messages, report the business data to the cloud platform, update the device status summary data based on heartbeat data, and report the device status summary data to the cloud platform according to a preset period. The cloud platform is used to receive business data and device status summary data reported by the smart gateway, and to manage the data based on these data.

[0089] The management system provided above can be used to execute the terminal message processing method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0090] This application embodiment also provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform a terminal message processing method. The terminal message processing method includes: upon receiving a fused message reported by a terminal device, extracting target data from the fused message, the target data including service data and heartbeat data of the terminal device; reporting the service data to a cloud platform; updating device status summary data based on the heartbeat data; and reporting the device status summary data to the cloud platform based on a preset period.

[0091] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.

[0092] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the terminal message processing method described above, but can also execute related operations in the terminal message processing method provided in any embodiment of this application.

[0093] The terminal message processing apparatus, storage medium, and management system provided in the above embodiments can execute the terminal message processing method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the terminal message processing method provided in any embodiment of this application.

[0094] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application. The scope of this application is determined by the scope of the claims.

Claims

1. A terminal message processing method, characterized in that, Applied to a smart gateway, which connects a cloud platform and a terminal device, the method includes: Upon receiving a fusion message reported by the terminal device, the target data of the fusion message is extracted, and the target data includes the service data and heartbeat data of the terminal device; The business data is reported to the cloud platform; The device status summary data is updated based on the heartbeat data, and the device status summary data is reported to the cloud platform according to a preset period.

2. The terminal message processing method according to claim 1, characterized in that, The target data also includes diagnostic data, which is abnormal status data of the corresponding terminal device; correspondingly, after extracting the target data of the fused message, the following is also included: Based on the diagnostic data and the heart rate data, detect whether the terminal device is in a healthy state; If the terminal device is not in a healthy state, the diagnostic data, heart rate data, and health test results will be reported to the cloud platform in real time.

3. The terminal message processing method according to claim 1, characterized in that, After updating the device status summary data based on the heartbeat data, the method further includes: Based on the summarized device status data, identify devices that have not reported within the time limit and send a probe request to those devices. Upon receiving heartbeat data from the device that has not reported within the timeout period, the device status summary data is updated based on the received heartbeat data; If the device that has not reported the timeout does not respond to the probe request, the offline status of the device that has not reported the timeout will be added to the device status summary data.

4. The terminal message processing method according to claim 1, characterized in that, The target data also includes a digital signature, which is pre-calculated by the terminal device based on a preset key; correspondingly, after extracting the target data of the fused message, the following is also included: The fused message is signed and verified based on the digital signature in the target data. If the signature verification fails, the fused message will be marked as an abnormal message to be filtered.

5. The terminal message processing method according to claim 1, characterized in that, The target data also includes a message timestamp; correspondingly, after extracting the target data of the fused message, the following is also included: Replay attack detection is performed on the fused message based on the message timestamp, and / or denial-of-service attack detection is performed on the fused message based on the message reporting frequency of the terminal device; If the merged message is a replay attack and / or a denial-of-service attack, the merged message will be marked as an abnormal message to be filtered.

6. The terminal message processing method according to claim 1, characterized in that, The fusion message includes a checksum; correspondingly, after receiving the fusion message reported by the terminal device, it also includes: Extract the checksum from the fused message and calculate the checksum of the fused message; If the extracted checksum does not match the calculated checksum, the fused message is marked as an abnormal message to be filtered.

7. The terminal message processing method according to claim 1, characterized in that, After extracting the target data of the fused message, the method further includes: Verify the format and content of the target data; If the format of the fused message is incorrect or the content is invalid, the fused message will be marked as an abnormal message to be filtered.

8. The terminal message processing method according to claim 1, characterized in that, The method further includes: Receive configuration instructions issued by the cloud platform, the configuration instructions including at least one of health diagnosis rules, reporting cycle and key to be rotated; Update at least one of the locally configured health diagnostic rules, reporting cycle, and key to be rotated according to the configuration instructions; After updating the local configuration, the system sends the corresponding configuration command response result back to the cloud platform.

9. A management system, characterized in that, It includes a cloud platform, a smart gateway, and terminal devices, wherein the smart gateway connects the cloud platform and the terminal devices, and: The terminal device is used to generate a fusion message based on the target data and report the fusion message to the smart gateway. The target data includes the terminal device's service data and heartbeat data. The intelligent gateway is used to receive the fusion message reported by the terminal device, extract the target data of the fusion message; report the service data to the cloud platform; update the device status summary data based on the heartbeat data, and report the device status summary data to the cloud platform according to a preset period. The cloud platform is used to receive business data and device status summary data reported by the smart gateway, and to manage the data based on the business data and device status summary data.

10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the terminal message processing method as described in any one of claims 1-8.