A remote monitoring method and system for operating state of an intelligent metering box

CN123020595APending Publication Date: 2026-10-30ZHEJIANG ZHENGRUN INTELLIGENT ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611115513.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]为了解决现有技术状态获取效率低下、缺乏对组播请求源的认证且无法区分事件紧急程度的问题

Benefits of technology

[0007]本发明通过在CoAP组播请求中输入携带资源状态谓词及认证令牌,并由智能计量箱执行先轻量级安全预检、后在判定需响应时才基于公钥验证数字签名合法性的分步式安全机制,不仅构建了一套安全的双向认证机制,提升了监控通信的安全性与可靠性,防止了非法访问及重放攻击,更有效避免了高强度验签操作对受限设备算力的无效消耗。利用自身各监测点的实时运行参数及其变化趋势对资源状态谓词进行布尔运算,实现了在设备端基于自身实时状态的自主判断响应,从源头过滤了不必要的应答报文,减轻了监控中心的处理负担和网络通信负载。通过设立基于运行风险指数的响应优先级和延时窗口机制,确保了高风险或状态异常的设备能够优先上报信息,结合随机延时规避了多设备并发应答可能引发的网络响应风暴;同时,将具体响应时隙与计量箱侧交流电波形的特征对齐,避开了内部电磁干扰,提升了传输的成功率。此外,在生成响应报文时根据当前设备资源的受限状态采用自适应降级的数据结构,缩减了原本标准格式下的报文载荷体积,避免了受限网络环境下的报文丢失,在保证关键告警信息高可靠、高实时上报的同时,也确保了整个监控系统的稳定运行。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020595A_ABST
    Figure CN123020595A_ABST
Patent Text Reader

Abstract

The application provides a kind of intelligent meter box operating state remote monitoring method and system, including monitoring center issues CoAP multicast request carrying resource state predicate and authentication token;Meter box receives and completes lightweight pre-inspection, extracts predicate, combines self alarm level and data importance to calculate operating risk index, assigns priority and random delay window to determine response time slot, and aligns with alternating current waveform characteristics to lock target execution opportunity;Meter box uses real-time parameters and change trend to perform Boolean logic operation on predicate to determine whether to respond;If it is determined to respond, the legality of digital signature is verified;After verification, the device generates CoAP response message using adaptive degraded data structure according to the current resource limited level, and sends it to the monitoring center accurately through unicast at the target execution opportunity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of monitoring, and in particular relates to a method and system for remote monitoring the operating status of an intelligent metering box. Background Technology

[0002] Smart metering boxes are deployed in complex environments and are numerous, undertaking critical tasks such as energy metering, data acquisition, load control, and status monitoring. Existing monitoring methods mostly employ a polling mechanism, where the monitoring center queries each metering box for status information via unicast. In large-scale deployments, this approach generates significant network signaling overhead and server polling pressure, resulting in high monitoring latency, poor real-time performance, difficulty in quickly detecting and responding to emergency alarms such as over-temperature, over-pressure, and abnormal door opening, and serious scalability issues.

[0003] CoAP is a lightweight application-layer protocol designed specifically for resource-constrained IoT devices. It supports multicast communication, enabling monitoring centers to reach all devices within a region with a single request, thus improving communication efficiency. However, standard CoAP resource discovery only retrieves the list of resources provided by a device, not its status value. To understand the specific status, the monitoring center still needs to initiate additional unicast requests to interested devices after discovery, failing to perform pre-condition filtering based on operating parameters and their trends on the device side, thus not fundamentally solving the problem of low status acquisition efficiency. When a multicast request is sent, all devices receiving the request within the region may respond simultaneously within a short period, leading to network congestion, significant packet loss, and even causing the monitoring center server to crash due to excessive instantaneous load. Furthermore, the inability to authenticate the source of multicast requests means any node in the network can forge multicast requests, potentially triggering response storms and causing denial-of-service attacks, or being used for illegal probing of network devices, posing a threat to power system security. Conversely, requiring metering boxes with limited computing power to directly perform high-strength digital signature verification on all received multicast requests would consume enormous device resources and could even cause device downtime. Meanwhile, while the random backoff delay strategy can alleviate response storms to some extent, it cannot distinguish the urgency of events, which may cause critical alarm information to be unable to be processed in priority due to random delays, thus missing the best time to deal with the situation. In addition, there is a complex AC electromagnetic environment inside the metering box. The traditional random transmission timing is very likely to overlap with the interference peak of the AC waveform, causing packet loss. Moreover, the fixed response message structure often leads to message fragmentation or transmission failure due to excessive load when the equipment faces resource constraints. Summary of the Invention

[0004] To address the problems of low efficiency in obtaining status information, lack of authentication of multicast request sources, and inability to distinguish the urgency of events in existing technologies.

[0005] In the first aspect, the present invention proposes a method for remote monitoring of the operating status of an intelligent metering box, comprising the following steps: The monitoring center constructs and sends a CoAP multicast request message carrying a resource status predicate and an authentication token; The smart metering box receives the multicast request message and performs a lightweight security pre-check. After the pre-check is passed, it extracts the resource status predicate, determines the response priority based on the operation risk index that represents its own alarm level and data importance, calculates the specific response time slot within the delay window corresponding to the priority by combining random numbers, and aligns the specific response time slot with the characteristics of the AC waveform on the metering box side to determine the target execution time. A high operation risk index corresponds to a high response priority and a shorter delay window. Just before the target execution time is about to arrive, the predicate is subjected to Boolean operation using the real-time operating parameters and their changing trends of each monitoring point to determine whether to respond. If a response is determined, the validity of the digital signature in the authentication token is verified based on the preset public key of the monitoring center. After the signature verification is successful, a CoAP response message is generated. The response message payload adopts an adaptive degradation data structure according to the current limited state of device resources. In the standard format without degradation, each key is the resource path referenced in the predicate, and each value is the state value obtained when performing Boolean operation on the predicate. The CoAP response message is sent to the monitoring center via unicast when the target execution time is triggered.

[0006] In another aspect, the present invention also proposes a remote monitoring system for the operating status of an intelligent metering box, comprising the following modules: The multicast module is used by the monitoring center to construct and send CoAP multicast request messages carrying resource status verbs and authentication tokens; The verification module is used for the smart metering box to receive the multicast request message and perform a lightweight security pre-check. After the pre-check is passed, the resource status predicate is extracted, the response priority is determined based on the operation risk index representing its own alarm level and data importance, the specific response time slot is calculated within the delay window corresponding to the priority by combining random numbers, and the specific response time slot is aligned with the characteristics of the AC waveform on the metering box side to determine the target execution time. Among them, a high operation risk index corresponds to a high response priority and a shorter delay window. The sending module is used to determine whether to respond by performing Boolean operations on the predicate using the real-time operating parameters and their changing trends of each of its monitoring points before the target execution time is about to arrive. If a response is determined, the module verifies the legality of the digital signature in the authentication token based on the preset public key of the monitoring center. After the signature verification is successful, a CoAP response message is generated. The response message payload adopts an adaptive degradation data structure according to the current limited state of device resources. In the standard format without degradation, each key is the resource path referenced in the predicate, and each value is the state value obtained when performing Boolean operations on the predicate. The CoAP response message is sent to the monitoring center via unicast when the target execution time is triggered.

[0007] This invention employs a step-by-step security mechanism: the CoAP multicast request includes a resource status predicate and an authentication token. The smart metering box performs a lightweight security pre-check followed by public key verification of the digital signature's legitimacy only when a response is required. This not only establishes a secure two-way authentication mechanism, improving the security and reliability of monitoring communication and preventing unauthorized access and replay attacks, but also effectively avoids the unnecessary consumption of computing power by high-intensity signature verification operations on limited devices. By utilizing the real-time operating parameters and trends of each monitoring point to perform Boolean operations on the resource status predicate, the device can autonomously determine its response based on its real-time status, filtering unnecessary response messages at the source and reducing the processing burden and network communication load on the monitoring center. By establishing a response priority and delay window mechanism based on an operational risk index, high-risk or abnormally functioning devices are prioritized for reporting information. Combined with random delays, this avoids network response storms that may be caused by concurrent responses from multiple devices. Furthermore, aligning the specific response time slot with the characteristics of the AC waveform on the metering box side avoids internal electromagnetic interference and improves the transmission success rate. In addition, when generating response messages, an adaptive degradation data structure is adopted based on the current limited state of device resources, which reduces the message payload size under the original standard format and avoids message loss in a limited network environment. While ensuring high reliability and real-time reporting of key alarm information, it also ensures the stable operation of the entire monitoring system. Attached Figure Description

[0008] Figure 1 This is a flowchart of the first embodiment. Detailed Implementation

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

[0010] In the first embodiment, the present invention proposes a method for remote monitoring of the operating status of an intelligent metering box, such as... Figure 1 As shown, it includes the following steps: S1, the monitoring center constructs and sends a CoAP multicast request message carrying resource status predicates and authentication tokens.

[0011] On the monitoring center server, a unique request identifier is generated by calling the `uuid_generate` function of a UUID generation library such as `libuuid`, and the current UNIX timestamp is obtained by calling the `time` function of the C standard library. The request identifier and timestamp are concatenated into a byte stream, and the SHA-256 hash value of this byte stream is calculated using the `mbedtls_sha256` function in the `mbedTLS` cryptographic library. The hash value is then signed using the `mbedtls_ecdsa_sign` function and the ECDSA private key pre-stored at the monitoring center to generate a digital signature. Finally, the request identifier, timestamp, and digital signature are encoded together into a CBOR byte stream as an authentication token using the TinyCBOR encoding library. The `coap_new_pdu` function in the libcoap library is called to create a `CoAPPDU`, setting the message type to `COAP_MESSAGE_NON`, the request method to `COAP_REQUEST_GET`, and the target address to either the IPv6 link-local multicast address FF02::1 or the site-local multicast address FF05::1. The `coap_add_option` function is used to add the Uri-Path option to ` / .well-known / core`, and the `Uri-Query` option is added with the content being a resource status predicate, such as `p=temp>60&&voltage<210`. The previously generated CBOR authentication token is added as the payload to the message using the `coap_add_data` function, and the multicast request message is sent via a UDP socket using the `coap_send` function.

[0012] In an optional embodiment, the monitoring center constructs and sends a CoAP multicast request message carrying a resource status predicate and an authentication token, including: The monitoring center generates a globally unique request identifier and obtains the current UTC time accurate to the second as a timestamp; The request identifier and the timestamp are concatenated to obtain the data M to be signed; The hash value H is obtained by calculating the digest of the data M to be signed using the SHA-256 hash algorithm. The hash value H is signed using the ECC-P256 private key of the monitoring center to generate a digital signature S. The request identifier, timestamp, and digital signature are combined into an authentication token, and the authentication token and resource status predicate are placed in the Option field of the CoAP request message.

[0013] The monitoring center uses the UUID library to generate a version 4 universally unique identifier as the request identifier ID, for example, 550e8400-e29b-41d4-a716-446655440000. Simultaneously, it obtains the number of UTC seconds since January 1, 1970, as the timestamp T, for example, 1678886400. These two are concatenated with a colon to form the data to be signed, M, with the content 550e8400-e29b-41d4-a716-446655440000:1678886400. Using the Elliptic Curve Digital Signature Algorithm (ECDSA), based on the secp256r1 curve (P-256) and the private key, the generated 256-bit hash value H is signed, resulting in a 64-byte digital signature S. The request identifier ID, timestamp T, and Base64 encoded digital signature S are separated by periods and combined into an authentication token string, such as 550e8400-e29b-41d4-a716-446655440000.1678886400.MEUCIQ..., and this string is written as the value into a custom, non-critical CoAPOption field, such as using Option number 2049 within the private usage scope. In addition, the monitoring center adds the resource status predicate as the value of the Uri-Query option to the CoAP request message, for example, setting the Uri-Query option to "p=temp>60&&voltage<210".

[0014] S2, the smart metering box receives the multicast request message and performs a lightweight security pre-check. After the pre-check is passed, it extracts the resource status predicate, determines the response priority based on the operation risk index representing its own alarm level and data importance, calculates the specific response time slot within the delay window corresponding to the priority by combining a random number, and aligns the specific response time slot with the characteristics of the AC waveform on the metering box side to determine the target execution timing. A high operation risk index corresponds to a high response priority and a shorter delay window.

[0015] The smart metering box listens for UDP packets on a multicast IP address such as FF05::1 via its built-in NB-IoT or Ethernet communication module, waking up the microcontroller's CoAP protocol stack to extract the packet header and Option. After performing lightweight timestamp verification and anti-replay comparison in memory, it uses the MCU's built-in hardware true random number generator (TRNG) combined with a predefined risk level delay lookup table to calculate a baseline delay value. Subsequently, the MCU uses an external interrupt generated by a hardware zero-crossing detection circuit connected to the AC power input side, such as a comparator circuit with optocoupler isolation, to fine-tune and align the baseline delay value to the most recent AC voltage zero-crossing moment. This absolute time point is then written into the MCU's hardware RTC timer and configured as an RTC wake-up interrupt to establish the target execution timing.

[0016] Because application layer data packets need to sequentially pass through operating system kernel thread scheduling, network layer protocol processing, and peripheral bus transmission, this process typically involves system jitter of tens to hundreds of milliseconds. If the application layer directly predicts and triggers zero-crossing transmission, the message often deviates from the noise-free window by the time it reaches the physical medium. In a preferred embodiment of the present invention, the alignment of the specific response time slot with the characteristics of the AC waveform on the metering box side to determine the target execution timing adopts a cross-layer collaborative mechanism of application layer pre-deployment and underlying hardware fine alignment. Specifically, after calculating the specific response time slot, the main control application layer of the smart metering box pre-deploys the encapsulated CoAP response message along with the specific response time slot as a transmission primitive carrying a scheduling time tag to the underlying power line carrier communication or radio frequency communication module, and caches it in the media access control layer of the communication module. The communication module has an independently operating high-precision hardware timer and is associated with a hardware-level AC voltage zero-crossing detection circuit. When the timer reaches the time window of the specific response slot, the MAC layer of the communication module actively enters a microsecond-level blocking listening state until the zero-crossing detection circuit captures the first real zero-crossing point immediately following the current mains waveform. At this point, the communication module uses this real zero-crossing point as the physical layer target execution timing, modulates the buffered response message, and injects it into the physical medium to complete the transmission. This overcomes the uncontrollable system latency defects caused by cross-layer network protocol stack transmission in IoT devices.

[0017] In an optional embodiment, the smart metering box receives the multicast request message and performs a lightweight security pre-check, specifically: Parse the authentication token in the Option field of the multicast request message, and extract the request identifier and the timestamp; The extracted timestamp is subtracted from the local system time of the smart meter box, and it is determined whether the absolute value of the time difference is less than the preset anti-replay time window threshold. If it is greater than or equal to the threshold, the pre-detection is determined to be a failure and the message is discarded. If the value is less than the threshold, the recently processed request identifier queue in the local cache is queried to check if there is a record with the same extracted request identifier. If it exists, the pre-detection is deemed to have failed and the message is discarded. If it does not exist, the lightweight security pre-detection is deemed to have passed and the request identifier is stored in the local cache.

[0018] The smart meter parses the Option2049 field, splits the string by periods ".", and extracts the second part, the UTC timestamp T. It then uses the MCU's RTC module to obtain the current local time in seconds. ,calculate Optionally, the preset anti-replay time window threshold is set to 300 seconds. If a replay cache lookup is initiated: the smart meter maintains a 64-bit circular buffer in SRAM as a queue of recently processed request identifiers. This queue stores the high 64 bits of the request identifier UUID's hash digest to save memory. The system iterates through this circular buffer; if no hash collision is found, a security pre-check is performed, and the hash digest of the current UUID is overwritten to the tail pointer of the circular buffer, which is then moved one bit to the right.

[0019] In an optional embodiment, determining the response priority based on an operational risk index representing its own alarm level and data importance, and calculating the specific response time slot within the delay window corresponding to the priority using a random number, includes: Obtain the highest current device alarm level constant of the smart meter box and the data importance weight corresponding to the requested resource, and calculate the operation risk index by weighted summation; The operational risk index is matched with a preset priority mapping table to determine the corresponding response priority, and the start and end time limits of the delay window assigned to that response priority are obtained. ; exist Generate a uniformly distributed pseudo-random time offset within the interval. ; The time when the message is received is compared with the pseudo-random time offset. By adding them together, we obtain the preliminary specific response time slots.

[0020] The intelligent metering box acquires the current device alarm level constant A and the preset importance weight W of the requested resource, such as temperature and voltage. The weight w is preferably 1 to 5, with A=1 for no alarm, A=2 for minor alarm, A=3 for moderate alarm, A=4 for severe alarm, and A=5 for critical alarm. The formula is used... Calculate the operational risk index R.

[0021] Matching the preset priority mapping table: like It is determined to be of high priority and a delay window is allocated. ; like It is determined to be of medium priority and a delay window is allocated. ; like It is determined to be of low priority and a delay window is allocated. .

[0022] The MCU generates a random seed through a hardware TRNG and generates millisecond-level pseudo-random time offsets within the corresponding interval based on a linear congruence generator. For example, 345ms, plus the message reception time. To obtain the preliminary specific response time slots .

[0023] In an optional embodiment, aligning the specific response time slot with the characteristics of the AC waveform on the metering box side to determine the target execution timing includes: The voltage waveform data of the AC power input side of the metering box is collected in real time through the built-in AC voltage sampling circuit of the intelligent metering box. Analyze the voltage waveform data to identify the zero-crossing point of the AC waveform, and extrapolate the mains frequency to predict the expected zero-crossing time sequence near the specific response time slot; Calculate the absolute value of the time difference between the specific response time slot and each time point in the expected zero-crossing time sequence; The expected zero-crossing moment with the smallest absolute value of the time difference is selected as the execution time of the target.

[0024] The ADC inside the intelligent metering box continuously acquires the stepped-down AC voltage signal at a sampling rate of 10kHz. The MCU monitors three consecutive sampling points, and if the conditions are met... , , That is, whether it is a positive zero crossing or a negative zero crossing, the current zero crossing time is recorded. In China's standard 50Hz mains power network, the interval between adjacent zero-crossing points is approximately 10ms.

[0025] MCU extrapolation formula Calculate the expected zero-crossing time sequence. Find the sequence that makes... The smallest integer k will correspond to Locking in the timing of execution for the ultimate goal Ensure that response messages are sent at the point when the grid voltage crosses zero, i.e., when electromagnetic interference (EMI) is at its minimum, to improve communication success rate in weak network environments.

[0026] S3, just before the target execution time is about to arrive, use the real-time operating parameters and their changing trends of each monitoring point to perform a Boolean operation on the predicate to determine whether to respond; if a response is determined, verify the legality of the digital signature in the authentication token based on the preset monitoring center public key; after the signature verification is successful, generate a CoAP response message. The response message payload adopts an adaptive degradation data structure according to the current limited state of device resources. In the standard format without degradation, each key is the resource path referenced in the predicate, and each value is the state value obtained when performing a Boolean operation on the predicate; the CoAP response message is sent to the monitoring center via unicast when the target execution time is triggered.

[0027] Configure the MCU to use the RTC timer at a distance There is also a preset lead time to trigger a wake-up interrupt, which reads the latest data from each sensor via the SPI / I2C bus. A lightweight lexical analyzer, such as a state machine-based C language parser, is used to calculate the logical result of temp>60&&voltage<210. If the result is true, the MCU calls the mbedtls_ecdsa_read_signature function of the mbedTLS library, using the factory-preset monitoring center ECC-P256 public key to verify the digital signature S after Base64 decoding in the Option field. After successful signature verification, a CoAP unicast response of type COAP_MESSAGE_NON non-acknowledgment message is assembled, and the Payload data area is constructed according to the degradation strategy. The communication module pushes the data onto the stack and waits. The precise moment the hardware timer is triggered is sent via a UDP socket.

[0028] In an optional embodiment, the step of using the real-time operating parameters and their changing trends of each monitoring point to perform Boolean operations on the predicate to determine whether to respond includes: The main control program is woken up at a preset lead time before the target execution time arrives, and the current operating parameter values ​​of each monitoring point referenced in the resource status predicate are collected; Retrieve historical parameter values ​​of the corresponding monitoring points stored locally, and calculate the first derivative or difference value of the current operating parameter value with respect to time to generate the change trend representing the rate of parameter change; Substitute the current operating parameter values ​​and the changing trend into the logical relational expression of the resource status predicate; If the result of the logical relational expression is true, the subsequent signature verification and response actions are confirmed and triggered; if the result is false, the response actions are canceled, and the metering box communication module remains in a sleep or low-power state.

[0029] When the main control program executes the target The system is woken up by an RTC interrupt 50 milliseconds in advance. For example, it can retrieve the current temperature. It also reads historical temperatures recorded 10 seconds ago from Flash or non-volatile SRAM. .

[0030] The trend of change can be obtained by calculating the difference value: .

[0031] If the predicate received at this time contains a trend condition, such as: temp>60&& The current value of 65 and the trend value of 1.0 are substituted into a Boolean expression. If the result is True, signature verification is triggered; if it is False, for example, if the current temperature is high but is rapidly cooling down, the communication module's RF power supply is immediately shut down via a command, and the MCU enters a STOP or STANDBY low-power mode.

[0032] In an optional embodiment, the response message payload adopts an adaptively degraded data structure based on the current limited state of device resources. In the standard format without degradation, each key is the resource path referenced in the predicate, and each value is a state value obtained when performing Boolean operations on the predicate, including: Real-time monitoring of the smart meter box's remaining memory, battery level, and available network bandwidth allows for an assessment of the device's resource limitation level. The state values ​​of each monitoring point involved in the predicate are pre-constructed into a multi-level state semantic tree according to semantic importance. The state semantic tree includes a root node representing the core judgment conclusion, an intermediate node representing the main operating parameters, and a leaf node representing the auxiliary environmental parameters. When the restricted level is normal, the complete hierarchical data of the state semantic tree is serialized to generate the response message payload using the standard format without degradation, wherein the resource path in complete string format is used as the key and the corresponding state value is concatenated. When the restriction level is slightly restricted, semantic pruning and degradation are triggered. The leaf node data is stripped and discarded from the state semantic tree, and only the data of the root node and intermediate nodes are retained to generate the response message payload. The resource path mapping in the retained level is replaced with a short integer index identifier as the key. When the restriction level is severely restricted, the root node mask is downgraded, all key information and intermediate node data in the message payload are omitted, and only the core judgment conclusion of the root node is extracted and converted into a core status word mask of a preset width as the response message payload.

[0033] Assuming that in the state semantic tree, the root node represents the device's overall judgment conclusion, such as / sts / alarm; the intermediate nodes represent the main operating parameters, such as / sen / temp and / sen / voltage; and the leaf nodes represent auxiliary environmental parameters, such as / sen / humidity. When the restriction level is normal: the entire semantic tree is serialized using the standard format without degradation, generating a complete JSON payload, for example, { / sts / alarm:1, / sen / temp:85.5, / sen / voltage:208.5, / sen / humidity:45.2}, consuming approximately 85 bytes.

[0034] When the confinement level is mildly confined: semantic pruning downgrade is triggered, stripping and discarding leaf node data representing humidity. A local pre-built dictionary is consulted to map the retained levels to short integers, such as 0 for / sts / alarm, 1 for / sen / temp, and 2 for / sen / voltage. A dictionary format {0:1,1:85.5,2:208.5} containing only root and intermediate node data is generated. After encoding, the payload size is reduced to approximately 16 bytes, preserving key operating parameters during network congestion.

[0035] When the limitation level is severely limited, such as when a supercapacitor is about to run out: trigger root node mask degradation, completely discard all key names and intermediate node data such as temperature and voltage, and only extract the core judgment conclusion of the root node, such as: high temperature critical alarm. This is directly converted into a preset 1-byte core status word mask, such as: binary 11111111 or hexadecimal 0xFF, compressing the load size to 1 byte to the extreme, ensuring that even when the device is on the verge of power failure and network disconnection, the most critical risk signal can still be successfully reported with the lowest RF power consumption.

[0036] In an optional embodiment, the real-time monitoring of the smart metering box's current remaining memory, battery level, and available network bandwidth, and the assessment of the device's resource constraint level, includes: For the remaining memory capacity, remaining battery power, and available network bandwidth, respectively, the corresponding first performance threshold and second performance threshold preset by the system are retrieved, wherein the first performance threshold is greater than the second performance threshold; Compare the obtained parameters with the corresponding performance thresholds: If any one of the remaining memory capacity, remaining battery power, and available network bandwidth is less than its corresponding second performance threshold, the device resource limitation level will be assessed as severely limited. If all of the parameters are greater than or equal to their respective second performance thresholds, and any parameter is less than its corresponding first performance threshold, then the resource limitation level of the device is assessed as slightly limited. If all of the parameters are greater than or equal to their respective first performance thresholds, the resource limitation level of the device is assessed as normal.

[0037] The preset performance thresholds are as follows: Remaining RAM: First performance threshold Second performance threshold .

[0038] Battery remaining charge (SOC): First performance threshold Second performance threshold .

[0039] Network available bandwidth: First performance threshold Second performance threshold .

[0040] Example of operational status assessment: The MCU calls the ADC to detect that the current battery level is 15%, the remaining memory is 15KB, and the current NB-IoT cell signal bandwidth is estimated to be 30Kbps. Since the battery level of 15% satisfies the condition of being greater than the second threshold and less than the first threshold, while the other two conditions are both greater than the first threshold, according to the judgment logic, if any one condition is between the first and second thresholds and none is less than the second threshold, the current device resource limitation level is assessed as slightly limited, thereby triggering the corresponding first-level degradation data assembly strategy.

[0041] In the second embodiment, the present invention proposes a remote monitoring system for the operating status of an intelligent metering box, comprising the following modules: The multicast module is used by the monitoring center to construct and send CoAP multicast request messages carrying resource status verbs and authentication tokens; The verification module is used for the smart metering box to receive the multicast request message and perform a lightweight security pre-check. After the pre-check is passed, the resource status predicate is extracted, the response priority is determined based on the operation risk index representing its own alarm level and data importance, the specific response time slot is calculated in the delay window corresponding to the priority by combining random numbers, and the specific response time slot is aligned with the characteristics of the AC waveform on the metering box side to determine the target execution time. The sending module is used to determine whether to respond by performing Boolean operations on the predicate using the real-time operating parameters and their changing trends of each of its monitoring points before the target execution time is about to arrive. If a response is determined, the module verifies the legality of the digital signature in the authentication token based on the preset public key of the monitoring center. After the signature verification is successful, a CoAP response message is generated. The response message payload adopts an adaptive degradation data structure according to the current limited state of device resources. In the standard format without degradation, each key is the resource path referenced in the predicate, and each value is the state value obtained when performing Boolean operations on the predicate. The CoAP response message is sent to the monitoring center via unicast when the target execution time is triggered.

[0042] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0043] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for remotely monitoring the operating status of an intelligent metering box, characterized in that, Includes the following steps: The monitoring center constructs and sends a CoAP multicast request message carrying a resource status predicate and an authentication token; The smart metering box receives the multicast request message and performs a lightweight security pre-check; After the pre-inspection is passed, the resource status predicate is extracted, and the response priority is determined based on the operation risk index that represents its own alarm level and data importance. The specific response time slot is calculated within the delay window corresponding to the priority by combining random numbers, and the specific response time slot is aligned with the characteristics of the AC waveform on the metering box side to determine the target execution time. Just before the target execution time is about to arrive, the predicate is subjected to Boolean operation using the real-time operating parameters and their changing trends of each monitoring point to determine whether to respond. If a response is determined, the validity of the digital signature in the authentication token is verified based on the preset public key of the monitoring center. After the signature verification is successful, a CoAP response message is generated. The response message payload adopts an adaptive degradation data structure according to the current limited state of device resources. In the standard format without degradation, each key is the resource path referenced in the predicate, and each value is the state value obtained when performing Boolean operation on the predicate. The CoAP response message is sent to the monitoring center via unicast when the target execution time is triggered.

2. The method according to claim 1, characterized in that, The monitoring center constructs and sends a CoAP multicast request message carrying a resource status predicate and an authentication token, including: The monitoring center generates a globally unique request identifier and obtains the current UTC time accurate to the second as a timestamp; The request identifier and the timestamp are concatenated to obtain the data M to be signed; The hash value H is obtained by calculating the digest of the data M to be signed using the SHA-256 hash algorithm. The hash value H is signed using the ECC-P256 private key of the monitoring center to generate a digital signature S. The request identifier, timestamp, and digital signature are combined into an authentication token, and the authentication token and resource status predicate are placed in the Option field of the CoAP request message.

3. The method according to claim 2, characterized in that, The smart metering box receives the multicast request message and performs a lightweight security pre-check, specifically: Parse the authentication token in the Option field of the multicast request message, and extract the request identifier and the timestamp; The extracted timestamp is subtracted from the local system time of the smart meter box, and it is determined whether the absolute value of the time difference is less than the preset anti-replay time window threshold. If it is greater than or equal to the threshold, the pre-detection is determined to be a failure and the message is discarded. If the value is less than the threshold, the recently processed request identifier queue in the local cache is queried to check if there is a record with the same extracted request identifier. If it exists, the pre-detection is deemed to have failed and the message is discarded. If it does not exist, the lightweight security pre-detection is deemed to have passed and the request identifier is stored in the local cache.

4. The method according to claim 1, characterized in that, The process of determining response priorities based on an operational risk index representing the alarm level and data importance, and then calculating specific response time slots within the corresponding delay window using random numbers, includes: Obtain the highest current device alarm level constant of the smart meter box and the data importance weight corresponding to the requested resource, and calculate the operation risk index by weighted summation; The operational risk index is matched with a preset priority mapping table to determine the corresponding response priority, and the start and end time limits of the delay window assigned to that response priority are obtained. ; exist Generate a uniformly distributed pseudo-random time offset within the interval. ; The time when the message is received is compared with the pseudo-random time offset. By adding them together, we obtain the preliminary specific response time slots.

5. The method according to claim 1, characterized in that, Aligning the specific response time slot with the characteristics of the AC waveform on the metering box side to determine the target execution timing includes: The voltage waveform data of the AC power input side of the metering box is collected in real time through the built-in AC voltage sampling circuit of the intelligent metering box. Analyze the voltage waveform data to identify the zero-crossing point of the AC waveform, and extrapolate the mains frequency to predict the expected zero-crossing time sequence near the specific response time slot; Calculate the absolute value of the time difference between the specific response time slot and each time point in the expected zero-crossing time sequence; The expected zero-crossing moment with the smallest absolute value of the time difference is selected as the execution time of the target.

6. The method according to claim 5, characterized in that, The step of using the real-time operating parameters and their changing trends of each monitoring point to perform Boolean operations on the predicate to determine whether to respond includes: The main control program is woken up at a preset lead time before the target execution time arrives, and the current operating parameter values ​​of each monitoring point referenced in the resource status predicate are collected; Retrieve historical parameter values ​​of the corresponding monitoring points stored locally, and calculate the first derivative or difference value of the current operating parameter value with respect to time to generate the change trend representing the rate of parameter change; Substitute the current operating parameter values ​​and the changing trend into the logical relational expression of the resource status predicate; If the result of the logical relational expression is true, the subsequent signature verification and response actions are confirmed and triggered; if the result is false, the response actions are canceled, and the metering box communication module remains in a sleep or low-power state.

7. The method according to claim 1, characterized in that, The response message payload adopts an adaptive degradation data structure based on the current resource-constrained state of the device. In the standard format without degradation, each key is the resource path referenced in the predicate, and each value is the state value obtained when performing Boolean operations on the predicate, including: Real-time monitoring of the smart meter box's remaining memory, battery level, and available network bandwidth allows for an assessment of the device's resource limitation level. The state values ​​of each monitoring point involved in the predicate are pre-constructed into a multi-level state semantic tree according to semantic importance. The state semantic tree includes a root node representing the core judgment conclusion, an intermediate node representing the main operating parameters, and a leaf node representing the auxiliary environmental parameters. When the restricted level is normal, the complete hierarchical data of the state semantic tree is serialized to generate the response message payload using the standard format without degradation, wherein the resource path in complete string format is used as the key and the corresponding state value is concatenated. When the restriction level is slightly restricted, semantic pruning and degradation are triggered. The leaf node data is stripped and discarded from the state semantic tree, and only the data of the root node and intermediate nodes are retained to generate the response message payload. The resource path mapping in the retained level is replaced with a short integer index identifier as the key. When the restriction level is severely restricted, the root node mask is downgraded, all key information and intermediate node data in the message payload are omitted, and only the core judgment conclusion of the root node is extracted and converted into a core status word mask of a preset width as the response message payload.

8. The method according to claim 7, characterized in that, The real-time monitoring of the smart meter box's current remaining memory, battery level, and available network bandwidth assesses the device's resource constraint level, including: For the remaining memory capacity, remaining battery power, and available network bandwidth, respectively, the corresponding first performance threshold and second performance threshold preset by the system are retrieved, wherein the first performance threshold is greater than the second performance threshold; Compare the obtained parameters with the corresponding performance thresholds: If any one of the remaining memory capacity, remaining battery power, and available network bandwidth is less than its corresponding second performance threshold, the device resource limitation level will be assessed as severely limited. If all of the parameters are greater than or equal to their respective second performance thresholds, and any parameter is less than its corresponding first performance threshold, then the resource limitation level of the device is assessed as slightly limited. If all of the parameters are greater than or equal to their respective first performance thresholds, the resource limitation level of the device is assessed as normal.

9. A remote monitoring system for the operating status of an intelligent metering box, characterized in that, Includes the following modules: The multicast module is used by the monitoring center to construct and send CoAP multicast request messages carrying resource status verbs and authentication tokens; The verification module is used for the smart metering box to receive the multicast request message and perform a lightweight security pre-check. After the pre-inspection is passed, the resource status predicate is extracted, and the response priority is determined based on the operation risk index that represents its own alarm level and data importance. The specific response time slot is calculated within the delay window corresponding to the priority by combining random numbers, and the specific response time slot is aligned with the characteristics of the AC waveform on the metering box side to determine the target execution time. The sending module is used to determine whether to respond by performing Boolean operations on the predicate using the real-time operating parameters and their changing trends of each of its monitoring points before the target execution time is about to arrive. If a response is determined, the module verifies the legality of the digital signature in the authentication token based on the preset public key of the monitoring center. After the signature verification is successful, a CoAP response message is generated. The response message payload adopts an adaptive degradation data structure according to the current limited state of device resources. In the standard format without degradation, each key is the resource path referenced in the predicate, and each value is the state value obtained when performing Boolean operations on the predicate. The CoAP response message is sent to the monitoring center via unicast when the target execution time is triggered.

10. The system according to claim 9, characterized in that, The monitoring center constructs and sends a CoAP multicast request message carrying a resource status predicate and an authentication token, including: The monitoring center generates a globally unique request identifier and obtains the current UTC time accurate to the second as a timestamp; The request identifier and the timestamp are concatenated to obtain the data M to be signed; The hash value H is obtained by calculating the digest of the data M to be signed using the SHA-256 hash algorithm. The hash value H is signed using the ECC-P256 private key of the monitoring center to generate a digital signature S. The request identifier, timestamp, and digital signature are combined into an authentication token, and the authentication token and resource status predicate are placed in the Option field of the CoAP request message.