Beidou power internet of things sensor identification coding method, system, device and medium

By employing a multi-segment coding method for power IoT sensors, combined with attribution, location, and attribute data, and utilizing the BeiDou positioning system and encryption technology, the problem of data fragmentation in sensor identification coding was solved, enabling accurate sensor identification and management, and improving the refined management capabilities of power businesses.

CN122113846APending Publication Date: 2026-05-29STATE GRID ZHEJIANG ELECTRIC POWER CO LTD +4

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
Filing Date
2026-04-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing power IoT sensor identification and coding methods have a single data dimension and rely on static latitude and longitude coding, resulting in data history gaps and making it difficult to meet the power system's needs for refined equipment management.

Method used

A multi-segment coding method is adopted, including attribution coding, location coding and fusion coding. By combining the attribution data, location data and attribute data of the sensor, the Beidou positioning system is used to obtain accurate location information, and dynamic keys are generated through encryption processing for encoding, which supports cross-domain collaboration and location migration of the sensor.

Benefits of technology

It enables precise identification and management of sensors, ensures continuous traceability of data history, and improves the refined management capabilities and operation and maintenance efficiency of power business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122113846A_ABST
    Figure CN122113846A_ABST
Patent Text Reader

Abstract

The application discloses a Beidou power internet of things sensor identification coding method, system, device and medium, relates to the technical field of power internet of things, and the method comprises the following steps: acquiring the home data, position data and attribute data of a target power internet of things sensor; sequentially performing basic layer coding and temporary authorization layer coding on the home data to obtain home coding information; extracting a power area grid code and Beidou longitude and latitude coordinates of the sensor from the position data to generate position coding information; respectively converting different categories of data in the attribute data into fixed-length sub-codes, splicing the fixed-length sub-codes to obtain fusion coding information; and sequentially splicing the home coding information, the position coding information and the fusion coding information into a coding prefix, taking real-time Beidou information of the sensor as a coding suffix to obtain a target identification code, thereby improving the operation and maintenance efficiency of the power internet of things device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power Internet of Things (IoT) technology, and in particular to a BeiDou power IoT sensor identification encoding method, system, device and medium. Background Technology

[0002] With the rapid development of the power Internet of Things (IoT), sensors, as core data acquisition devices, have been deployed on a scale of tens of millions of units, covering various types of monitoring equipment such as temperature, current, voltage, and power. To effectively identify and manage these large-scale heterogeneous devices, uniquely identifying and coding them is the primary and fundamental technical step.

[0003] Currently, the identification coding of power sensors mainly adopts the conventional coding method of "attribution information + basic location", such as manufacturer serial number combined with substation number. This coding method has a single data dimension, insufficient coding support capability, and often relies on static latitude and longitude coding, which leads to frequent data history breakage problems and makes it difficult to meet the power system's needs for refined equipment management.

[0004] Therefore, how to effectively encode and manage IoT sensors to ensure the efficient operation and maintenance of the power IoT has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] This invention provides a Beidou power Internet of Things sensor identification encoding method, system, device and medium, which solves the problem of how to improve the efficiency of power business management by encoding sensor data in multiple segments.

[0006] To address the aforementioned technical problems, embodiments of the present invention provide a BeiDou power IoT sensor identification encoding method, comprising: Acquire the attribution data, location data, and attribute data of the target power IoT sensor; The attribution data is sequentially encoded using basic layer encoding and temporary authorization layer encoding to obtain attribution encoding information; The power area grid code and the BeiDou latitude and longitude coordinates of the sensor are extracted from the location data to generate location coding information; The data of different categories in the attribute data are converted into fixed-length sub-codes respectively, and the fixed-length sub-codes are concatenated to obtain the fused encoding information; The attribution coding information, the location coding information, and the fusion coding information are sequentially concatenated into a coding prefix, and the real-time BeiDou information from the sensor is used as the coding suffix to obtain the target identification code.

[0007] Furthermore, the step of sequentially performing basic layer encoding and temporary authorization layer encoding on the attribution data includes: The attribution data is fixedly encoded according to a preset hierarchical format to obtain the basic layer code; When a cross-domain collaboration event is detected by a sensor, the temporary authorization layer code is generated and appended to the base layer code, and the temporary authorization layer code is removed when the cross-domain collaboration event ends.

[0008] Furthermore, the step of extracting the power area grid code from the location data and calculating the relative coordinates of the sensors within the power area grid to generate location coding information includes: Calculate the offset between the BeiDou latitude and longitude coordinates and the origin coordinates within the power grid area, and determine the sensor's relative coordinates based on the offset. The location coding information is generated by concatenating the power area grid code with the relative coordinates of the sensor in a preset format.

[0009] Furthermore, the step of converting different categories of data in the attribute data into fixed-length sub-codes and concatenating the fixed-length sub-codes to obtain fused encoding information includes: Map the security category data in the attribute data to a first subcode of a first fixed length; Map the working condition category data in the attribute data to a second sub-code of a second fixed length; Map the lifecycle category data in the attribute data to a third fixed-length subcode; The first subcode, the second subcode, and the third subcode are concatenated in a preset priority order to obtain the fused encoding information.

[0010] Furthermore, after obtaining the target identifier code, the target identifier code is encrypted, including: Acquire electrical parameter data monitored in real time by the sensor, and determine the area hash value based on the power area grid code; A dynamic key is constructed using the electrical parameter data, the area hash value, and the basic key fragment; The obfuscation factor is extracted from the target identifier encoding and obfuscated with the dynamic key to obtain an obfuscated string; The target segment encoded by the target identifier is encrypted using the dynamic key to generate segmented ciphertext; The obfuscated string and the segmented ciphertext are concatenated to generate an encrypted code.

[0011] Furthermore, after generating the encrypted code, the process also includes: When a user's decryption request is received, the dynamic key is restored using the request information; Extract the obfuscated string from the encrypted code and process it in reverse order according to a preset execution order; The segmented ciphertext is decrypted using the restored dynamic key.

[0012] Furthermore, the method also includes: When a sensor location migration event occurs, the location encoding information is updated; When the sensor's state changes, the fused encoding information is updated.

[0013] Another embodiment of the present invention provides a Beidou power Internet of Things sensor identification and encoding system, comprising: The data acquisition module is used to acquire the attribution data, location data, and attribute data of the target power IoT sensor; The attribution coding module is used to sequentially perform basic layer coding and temporary authorization layer coding on the attribution data to obtain attribution coding information; The location encoding module is used to extract the power area grid code and the BeiDou latitude and longitude coordinates of the sensor from the location data to generate location encoding information; The fusion encoding module is used to convert data of different categories in the attribute data into fixed-length sub-codes respectively, and concatenate the fixed-length sub-codes to obtain fusion encoding information; The encoding and splicing module is used to sequentially splice the attribution encoding information, the location encoding information, and the fusion encoding information into an encoding prefix, and use the real-time BeiDou information of the sensor as the encoding suffix to obtain the target identification encoding.

[0014] Another embodiment of the present invention provides a computer device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the Beidou power Internet of Things sensor identification encoding method as described above.

[0015] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the Beidou power Internet of Things sensor identification encoding method as described above.

[0016] Compared with the prior art, the beneficial effects of the embodiments of the present invention are at least one of the following: This invention effectively addresses the challenge of device identification during cross-domain collaboration by performing two-level attribution encoding on the acquired sensor attribution data. Furthermore, by encoding the location data based on the regional grid code and relative coordinates extracted from the sensor location data, it enables local updates during sensor migration, ensuring continuous traceability of data history and avoiding the problem of broken historical data associations due to sensor location changes. By converting attribute data into fixed sub-codes and concatenating them, the carrying capacity of the encoded information is improved, enabling accurate perception of multiple sensor states. Finally, by concatenating and combining multiple encoded segments with real-time BeiDou information from the sensors to achieve the final identification encoding, the invention enhances the ability for refined management of power services and improves operational efficiency. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the Beidou power Internet of Things sensor identification encoding method in one embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the Beidou power Internet of Things sensor identification and coding system in one embodiment of the present invention; Figure 3 This is a structural block diagram of a preferred embodiment of a computer device provided by the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0019] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0020] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. The terms "vertical," "horizontal," "left," "right," "upper," "lower," and similar expressions used herein are for illustrative purposes only and do not indicate or imply that the device or component referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0021] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the invention. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0022] One embodiment of the present invention provides a BeiDou power Internet of Things sensor identification encoding method. For details, please refer to [link to documentation]. Figure 1 , Figure 1 The diagram shown is a flowchart of a Beidou power Internet of Things sensor identification encoding method according to one embodiment of the present invention, including the following steps: S1. Obtain the attribution data, location data, and attribute data of the target power IoT sensor.

[0023] The sensor data collected in this embodiment from the power Internet of Things includes three main categories: attribution data, location data, and attribute data. The attribution data may include the group root prefix (6 characters), subsidiary code (6 characters), sub-subsidiary code (2 characters), maintenance team number (8 characters), and temporary authorizing party code (including validity period), which can be obtained from enterprise organizational structure systems, cross-regional collaborative authorization platforms, etc. The attribution data codes must be 100% unique.

[0024] In this embodiment, the location data of the sensor is obtained through the BeiDou positioning system, such as a GNSS positioning module (accuracy ≤ 1 meter), the power GIS system, or the substation asset ledger. Specifically, it includes: BeiDou data latitude and longitude (accurate to 6 decimal places), power area grid code (format: voltage level + area + segment), installation tower number (8 characters), and relative coordinates within the grid (3 digits for each of the X and Y axes, such as X003-Y012).

[0025] The attribute data reflects the sensor's operating condition, safety, and lifespan. For example, the following operating condition category data can be extracted from the sensor's factory configuration file, deployment and commissioning terminal, or real-time monitoring system: sampling frequency (unit: times / second), measurement range (including temperature, current, and voltage), voltage adaptation level (e.g., 10kV / 35kV / 110kV / 220kV / 500kV), communication protocol type (e.g., LoRa / 6LoWPAN / 4G / 5G), real-time operating condition threshold (e.g., current overload threshold 120A), sampling frequency error ≤ 0.1 times / second, and range labeling deviation ≤ 1%.

[0026] Security category data, including data encryption level (confidential / secret, corresponding codes 10 / 01), access permission matrix (format: role-permission, such as operation and maintenance-read-only / security-read-write), and data transmission encryption protocol (TLS1.3 / SM4 algorithm), can be collected from the power safety management platform and data security level protection system.

[0027] Furthermore, the calibration validity period (e.g., 2023-12-01), expected replacement cycle (unit: year), last maintenance record ID (12 characters), manufacturing date (e.g., 2010-12-12), and historical failure count (integer) can be obtained from the operation and maintenance management system and the equipment life cycle ledger.

[0028] Before encoding these sensor data, preprocessing is required. In this embodiment, this includes data cleaning, outlier mining, correlation matching, and standardization transformation. Specifically, during the data cleaning process, the sensor data can be formatted in terms of date, code (uppercase characters), and numerical value (keeping one decimal place), and data with incorrect formatting can be removed, such as converting "2025 / 12 / 31" to "2025-12-31".

[0029] At the same time, duplicate data is deleted and related data is merged. For example, for duplicate attribution codes of the same sensor, "sampling frequency 1 time / second" and "protocol supports maximum frequency 50 times / second" are merged and stored.

[0030] After the cleaning is completed, outlier detection is performed on the data. For example, for anomaly detection in operating condition data, threshold comparison or protocol compatibility analysis can be used. For instance, if the sampling frequency of a current sensor is entered as "60 times / second", the communication protocol database will be automatically called to query the maximum supported frequency of the LoRa protocol, which is "50 times / second", thus determining it as an outlier and triggering manual review.

[0031] For anomaly detection in location data, latitude and longitude can be matched with grid codes in the power GIS system. If the latitude and longitude are not within the coverage area of ​​the corresponding grid code, the grid code will be automatically corrected.

[0032] For anomaly detection in lifecycle data: if the "calibration validity period" is earlier than the current date, it is determined to be in the "pending calibration" state and a warning mark is added to the code.

[0033] Next, perform association matching. For example: For association matching between attribution data and location data, it can be verified whether the "maintenance team" in the attribution dimension has a management attribution relationship with the "substation" in the location dimension. For example, if team A only manages substation A, an alert will be issued if the location of substation B is matched.

[0034] The correlation between operating condition category data and safety category data can be determined by matching the "voltage adaptation level" of the operating condition dimension with the "encryption level" of the safety dimension (e.g., the default level for 500kV sensors is confidential, and the default level for 10kV sensors is secret). If they do not match, the data will be automatically adjusted.

[0035] Finally, the data is standardized by converting text-based data into an encoding-compatible format, such as converting "Confidential" to "10" and "LoRa" to "01". Numerical data is converted into fixed-length strings, such as converting "1 time / second" to "001" and "220kV" to "220". This yields a standardized multidimensional dataset containing attribution, location, and attribute data.

[0036] S2. Perform basic layer coding and temporary authorization layer coding on the attribution data in sequence to obtain the attribution coding information.

[0037] In this embodiment, sensor data undergoes three-stage encoding: attribution encoding, location encoding, and fusion encoding. The encoding system used in the encoding process is the Handle system. This step is the attribution encoding step, which includes two-level attribution encoding. Specifically, at the basic level, the attribution data is fixedly encoded according to a preset hierarchical format to obtain the basic layer encoding. For example, the attribution data is encoded in the format of "Group Root Prefix.Subsidiary Code.Subsidiary Code.Maintenance Team Number" to generate the following encoding information: "100000.100001.01.00010001".

[0038] The temporary authorization layer is generated only during cross-domain collaboration. That is, when a cross-domain collaboration event is detected by a sensor, a temporary authorization layer code is generated and appended to the base layer code, and it is removed when the cross-domain collaboration event ends. Its encoding format is "temporary authorizer code-validity period", for example: "100002-20241231".

[0039] In this embodiment, the encoded information generated at these two levels is separated by the separator "|", forming a two-level attribution code, such as: "100000.100001.01.00010001|100002-20241231". Only the basic level is retained when there is no temporary authorization layer.

[0040] S3. Extract the grid code of the power area and the BeiDou latitude and longitude coordinates of the sensor from the location data to generate location coding information.

[0041] This step is the location encoding step. First, extract the power grid code from the location data, such as: a certain segment of a 500kV regional network. Then, calculate the offset between the sensor's BeiDou latitude and longitude coordinates and the origin coordinates within the power grid, and determine the sensor's relative coordinates based on the offset. For example, with the top left corner of the grid as the origin, the X-axis is east and the Y-axis is north, with each 10 meters as a unit. If the offset is 30 meters, the relative coordinates are: X003-Y003.

[0042] The power area grid code and the sensor's relative coordinates are concatenated in a preset format to generate location coding information. For example, the concatenation format is: power area grid code - relative coordinates | tower number, such as 500kV A network - A section - X003 - Y012 | G00123456.

[0043] S4. Convert the data of different categories in the attribute data into fixed-length sub-codes respectively, and concatenate the fixed-length sub-codes to obtain the fused encoding information.

[0044] This step is the fusion encoding step. Since the attribute data involves safety categories, operating condition categories, and lifecycle categories, this embodiment encodes the data of different categories separately using bit mapping before fusing them.

[0045] Specifically, the security category data in the attribute data is mapped to a first subcode of a first fixed length. For example, the security category data is mapped to a first subcode of 4 bits, namely the security subcode "1001", which includes: encryption level (2 bits) + access permission (2 bits). Example: confidential level (10) + subsidiary read / write (01). The operating condition category data is mapped to a second fixed-length second subcode, i.e., the operating condition subcode. For example, it is mapped to a 6-bit second subcode "010301", which includes sampling frequency (2 bits) + voltage adaptation level (2 bits) + communication protocol (2 bits). Example: 1 time / second (01) + 220kV (03) + LoRa (01). The lifecycle category data is mapped to a third fixed-length third subcode, namely the lifecycle subcode. For example, it is mapped to a 4-digit third subcode "1005", which includes: calibration status (2 digits: normal 10 / to be calibrated 01) + expected replacement cycle (2 digits: 5 years 05).

[0046] The first subcode, second subcode, and third subcode are concatenated in a preset priority order to obtain the fused encoding information. For example, concatenating the subcode in the order of safety subcode + operating condition subcode + life cycle subcode yields fused encoding information in the format: 10010103011005.

[0047] S5. The attribution coding information, location coding information and fusion coding information are concatenated in sequence to form a coding prefix, and the real-time BeiDou information of the sensor is used as the coding suffix to obtain the target identification code.

[0048] After the three segments are encoded, they are concatenated using "|" as the separator, in the format of belonging code|location code|fusion code, as the prefix of the Handle identifier.

[0049] Here is an example of a complete prefix format: 100000.100001.01.00010001|100002-20241231|500kV A network-A segment-X003-Y012|G00123456|10010103011005.

[0050] It can be seen that the attribution code is “100000.100001.01.00010001|100002-20241231”, which can carry the organizational attribution information of the equipment. The location code is “500kV A network-A segment-X003-Y012|G00123456”, which describes the precise location of the sensor in the power grid area. The fusion code “10010103011005” integrates the core attributes of the equipment such as safety, operating condition and life cycle.

[0051] Furthermore, in this embodiment, the real-time BeiDou information of the sensor is concatenated as a suffix and prefix of the Handle identifier, so that the final encoding can reflect the spatiotemporal state of the sensor. Its format is: latitude and longitude_equipment type_warning identifier. Among them, the equipment type is labeled according to the function of the sensor's physical quantity, such as temp (temperature), current (current), voltage (voltage), and the equipment status is dynamically labeled according to the data mining results as the warning identifier, such as CAL-NORMAL (equipment normal) and CAL-EXP (equipment abnormal).

[0052] Here is a complete example of a target identifier encoding format: 100000.100001.01.00010001|100002-20241231|500kV A network-A segment-X003-Y012|G00123456|10010103011005 / lat22.543211_lon114.067822_temp_CAL-NORMAL.

[0053] Based on this, a complete, multi-segment target identification code for the sensor is generated. In some embodiments of the present invention, this target identification code is used as the processing object for encryption, decryption, and update management.

[0054] In the encryption process of the target identifier encoding, firstly, the electrical parameter data monitored in real time by the sensor, including current, voltage, and power, are acquired and converted according to the format of "current (A), hexadecimal + voltage (kV), ASCII code + power factor, binary". For example: 100A current is converted to: 0x64, 220kV voltage is converted to: "220", ASCII code 50 / 50 / 48, and power factor 0.92 is converted to: 10010010, combined into "0x64-505048-10010010", which is used as a real-time operating condition factor in the construction of the key. Simultaneously, a timestamp (accurate to the second, updated every 30 seconds) also needs to be obtained.

[0055] To ensure the uniqueness of keys in different regions, the region hash value is further determined based on the power region grid code. In this embodiment, the region hash value is the first 8 bits of the SHA-256 of the "power region grid code".

[0056] A dynamic key is constructed using electrical parameter data, area hash values, and basic key fragments, as detailed below: Dynamic key = SM3 hash (basic key fragment + real-time operating condition factor + timestamp + area hash value). The basic key fragment is generated by the group's key management center and stored using the SM4 algorithm. Subsidiaries only obtain key fragments (e.g., the group holds the complete key "GD2024PWR001", while the subsidiary obtains "GD2024****").

[0057] It should be understood that when the real-time operating condition factor of the sensor changes beyond the threshold (such as current fluctuation ±10A), or when the timestamp reaches a 30-second cycle, the dynamic key is automatically regenerated to address the security risks of conventional fixed keys.

[0058] Next, obfuscation factors are extracted from the target identifier encoding. For example, the following five types of obfuscation factors can be extracted: The device physical factor is obtained by extracting the last 6 bits of the sensor's factory MAC address (e.g., extracting the first 16 bits of the MD5 value of "00:1B:44:11:3A:B7"). Scene feature factors are obtained by combining the ASCII codes of "voltage level + area code" (e.g., 500HN) corresponding to the power area grid code; The encoding segmentation factor is obtained by splitting the complete target identifier encoding into three segments: attribution, location, and fusion. The first 10 characters of each segment are taken to form a mixed string. The random noise factor is obtained by generating an 8-character random string (containing uppercase and lowercase letters and numbers); Permission identification factor, which is determined by generating an identifier based on the user's permission level (e.g., Operation and Maintenance Level 1 / Security Level 2 / Group Level 3: "P1 / P2 / P3").

[0059] The extracted obfuscation factors are obfuscated with the dynamic key to obtain an obfuscated string. For example, the above five types of obfuscation factors are concatenated in the order of "physical factor, scene factor, encoding segmentation factor, random noise factor, and permission identifier factor" to form the initial obfuscated string.

[0060] The initial obfuscated string undergoes multi-level obfuscation. Specifically, it is shifted left cyclically according to the "current hexadecimal digits" in the real-time operating condition factor (e.g., 2 digits for 0x64), shifting 2 digits to the left to achieve shift obfuscation. Then, the first 16 digits of the dynamic key are XORed bit by bit with the obfuscated string to achieve XOR obfuscation. Next, a power-specific replacement table (e.g., "0:A / 1:B / ... / 9:J") is established to replace numeric characters in the XOR obfuscated string, resulting in the string to be merged.

[0061] Finally, the string to be merged is combined with the last 8 bits of the dynamic key to obtain the final obfuscated string.

[0062] During the encryption of the target identifier encoding, the obfuscated string is combined with the encrypted ciphertext to obtain the encrypted encoding for transmission. Specifically, the home segment (i.e., the home encoding information part) of the target identifier encoding is encrypted using the SM4 algorithm with a dynamic key to generate 256-bit ciphertext; the "tower number" in the location encoding information is used as the initial vector (IV) to encrypt the location segment (i.e., the location encoding information part); and the secure subcode in the fusion encoding is used as the key to perform XOR encryption on the fusion segment (i.e., the fusion encoding information part) to generate segmented ciphertext.

[0063] By concatenating the obfuscated string and the aforementioned segmented ciphertext, the generated format is: SM4 (home segment) - AES128 (location segment) - XOR (fusion segment) | final obfuscated string | encrypted code of the checksum.

[0064] In some embodiments of the present invention, to address the transmission bandwidth limitations of narrowband communication protocols such as LoRa and NB-IoT in the power Internet of Things (e.g., the maximum number of bytes transmitted per LoRa packet is ≤256 bytes), the encrypted code is divided into data blocks of 200 bytes each and transmitted to the receiving end. Each data block header is appended with "block sequence number (2 bytes) + total number of blocks (2 bytes) + check bit (1 byte)", for example: "01-05-0A+8A3F7C2D... (195 bytes)" "02-05-0B+5B9E4A1C... (195 bytes)", ensuring that a single data block does not exceed the narrowband protocol transmission limit.

[0065] The next step is the decryption process. Specifically, when a user's decryption request is received, the dynamic key is restored using the request information.

[0066] For example: Receive real-time operating condition data of the equipment submitted by the user, generate "real-time operating condition factors" according to the S51 conversion rules, such as converting 98A current to 0x62, 220kV voltage to "220" ASCII code 50 / 50 / 48, and power factor 0.91 to 10010001, combined into "0x62-505048-10010001", and then combine the user request timestamp and the first 8 bits of the SHA-256 of the corresponding power area grid code (power area code hash value), call the basic key fragment allocated according to permissions, and restore the dynamic key through the SM3 hash algorithm.

[0067] In some real-time modes of the present invention, a dynamic verification mechanism is also provided, specifically: the current operating condition data of the device on the sensor monitoring platform is retrieved in real time and compared with the real-time operating condition data submitted by the user. If the deviation exceeds the threshold (current ±5A, voltage ±5kV, power factor ±0.02), it is determined as "operating condition mismatch", and the key restoration process is terminated immediately to prevent unauthorized devices from impersonating and decrypting.

[0068] After key restoration, the obfuscated string in the encryption encoding is extracted and processed in reverse order according to a preset execution sequence to complete obfuscation restoration. For example, first, the last 8 bits of the dynamic key fragment are removed from the final obfuscated string (e.g., the final obfuscated string "3D7F2B6E...P2-9B2D5E7F" becomes "3D7F2B6E...P2"), resulting in a three-level processed string. Then, according to the power-specific replacement table, the letter characters in the string are restored to numbers (e.g., "A: 0", "B: 1"), completing the replacement obfuscation restoration. Next, the first 16 bits of the restored dynamic key are XORed bit by bit with the replaced and restored string (the inverse XOR operation is itself), completing the XOR obfuscation restoration. Finally, the "current hexadecimal digits" (e.g., 0x62 is 2 digits) in the real-time operating condition factor are extracted and cyclically shifted in the opposite direction (left shift during encryption, right shift during decryption) to complete the final restoration.

[0069] The segmented ciphertext is decrypted using the restored dynamic key. For example: the restored dynamic key is used to perform SM4 algorithm decryption (SM4 algorithm is symmetric encryption, and the decryption key is the same as the encryption key) to complete the decryption of the home segment. Then, the "tower number" in the flexible position code is extracted as the initial vector (IV), and AES-128 decryption is performed to obtain the decryption of the completed position segment. Next, the "security subcode" in the fusion code is extracted as the key, and XOR decryption is performed (XOR inverse operation is itself) to complete the decryption of the fusion segment.

[0070] After obfuscation restoration and ciphertext decryption are completed, this embodiment also requires comparing the decryption result of the segmented ciphertext with the "encoded segmentation factor" in the obfuscation restoration result, such as whether the first 10 bits of the segment are consistent. Simultaneously, the checksum of the decryption result and the obfuscation restoration result is recalculated using the CRC32 algorithm and compared with the checksum in the encrypted code. If they match, the decryption is valid; otherwise, the code is considered tampered with, and the decryption result is rejected.

[0071] After successful decryption, data is returned according to different user permissions. For example, for a Level 1 operations and maintenance user, the system returns "basic level attribution code (excluding temporary authorization level) + location code (excluding tower number, only retaining grid code and relative coordinates) + working condition sub-code in fusion code (excluding security sub-code and lifecycle sub-code)", thus masking sensitive information such as temporary authorization.

[0072] For example, for subsidiary security level 2 users: return "complete attribution code (including temporary authorization level) + complete location code + security subcode in fusion code + lifecycle subcode (excluding historical failure count)", thus blocking the group-level encryption policy.

[0073] In some embodiments of the present invention, a dynamic coding update mechanism is also designed. Specifically, when a sensor undergoes a location migration event, the location coding information is updated. For example, when a sensor is relocated due to temporary maintenance or tower replacement, the system only updates the "relative coordinates within the grid" in the flexible location coding (e.g., from X003-Y012 to X008-Y020), while the remaining coding segments remain unchanged.

[0074] When a sensor's status changes, the fusion coding information is updated. For example: after a sensor completes calibration or maintenance, the maintenance personnel enter the new calibration validity period and maintenance record ID, automatically updating the lifecycle subcode and the warning flag at the end of the code in the fusion coding, such as updating it from "CAL-EXP" to "CAL-NORMAL", and simultaneously updating the ciphertext of the fusion segment in the encrypted coding.

[0075] The present invention provides the following examples to describe in detail the encoding and encryption process of the above-mentioned sensor data: Taking a 220kV substation temperature sensor as an example, this sensor is an outdoor temperature sensor DS18B20 with a range of -50℃ to 125℃, a sampling frequency of 1 time / second, LoRa protocol, MAC address 00:1B:44:11:3A:B7, deployed in a substation of a certain section of a 220kV regional power grid (grid code format is "220kV A regional network-A section"), tower G00123456, latitude and longitude lat22.543211_lon114.067822, relative coordinates X003-Y012 (these data reflect the location information).

[0076] Further, the group root prefix 100000, subsidiary 100001, sub-subsidiary 01, work group 00010001, and temporary authorization 100002-20241231 are obtained. These data reflect the attribution information. Security category data including: confidential level (10), permissions "Operation and Maintenance - Read Only / Subsidiary - Read and Write / Group - Full Permission", TLS1.3 transmission, etc. are also obtained; as well as life cycle category data including: calibration 2025-12-31, replacement 5 years, maintenance ID WM20240520001, 0 failures, etc.; and real-time operating condition category data involving current 0A, voltage 220kV, power factor 0, temperature 25℃, etc. are also obtained.

[0077] After preprocessing this data, three-segment encoding is performed to obtain the attribution encoding information: 100000.100001.01.00010001|100002-20241231; Location coding information: 220kV A-section network - A-section - X003-Y012|G00123456; The merged encoding information, 001001003011005, forms the following target identifier encoding: 100000.100001.01.00010001|100002-20241231|220kV Certain Area- Certain Section- X003-Y012|G00123456|1001001003011005 / lat22.543211_lon114.067822_temp_CAL-NORMAL.

[0078] If a temperature sensor is temporarily relocated to a substation in another 220kV power grid area (e.g., grid code format: "220kV A-B") due to maintenance at substation A, with tower number G00123457, relative coordinates within the grid X008-Y020, and relocation time 20240526, then the following code update steps will be triggered: 1. Maintenance personnel submit a "migration application" in the management module and enter the new location information (grid code, tower number, relative coordinates); 2. Only update the location code to: "220kV A network - B segment - X008-Y020|G00123457", and keep the other code segments (attribution, merging) unchanged; 3. Bind the data from segment A (20240520-20240525) and segment B (from 20240526 onwards) to the same code to generate a complete temperature change curve; 4. Only re-encrypt the location segment to generate the following new location ciphertext: "7C2D9E4A1F3B5G7H9J0K2L4M6N8P0Q2R4S6T8U0V2W4X6Y8Z0A2B4C6D8E0F2G4"; the attribution and fusion ciphertext remain unchanged.

[0079] In summary, this embodiment first acquires multidimensional data from the sensor, including attribution, location, and attribute data. Then, it performs corresponding encoding operations on the attribution data, location data, and attribute data respectively. The three encoded segments are then concatenated sequentially to form a structured prefix for the Handle identifier code. Finally, the sensor's real-time BeiDou information is used as a dynamic suffix to generate a complete target identifier code, significantly improving the efficiency and accuracy of sensor encoding in the power Internet of Things.

[0080] One embodiment of the present invention provides a BeiDou power Internet of Things sensor identification and encoding system. For details, please refer to [link / reference]. Figure 2 , Figure 2 The diagram shown is a schematic representation of the structure of a Beidou power Internet of Things sensor identification and encoding system according to one embodiment of the present invention, including: The data acquisition module M1 is used to acquire the attribution data, location data, and attribute data of the target power IoT sensor; The attribution coding module M2 is used to sequentially perform basic layer coding and temporary authorization layer coding on the attribution data to obtain attribution coding information; The location encoding module M3 is used to extract the power area grid code and the BeiDou latitude and longitude coordinates of the sensor from the location data to generate location encoding information; The fusion encoding module M4 is used to convert data of different categories in the attribute data into fixed-length sub-codes respectively, and to concatenate the fixed-length sub-codes to obtain fusion encoding information; The encoding and splicing module M5 is used to sequentially splice the attribution encoding information, the location encoding information, and the fusion encoding information into an encoding prefix, and use the real-time BeiDou information of the sensor as the encoding suffix to obtain the target identification encoding.

[0081] like Figure 3 As shown, this embodiment of the invention also provides a computer device. Figure 3 This is a structural block diagram of a preferred embodiment of a computer device provided by the present invention. The computer device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the method described above.

[0082] Preferably, the computer program can be divided into one or more modules / units (such as computer program 1, computer program 2, ...), and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.

[0083] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor can be any conventional processor. The processor is the control center of the terminal device, connecting various parts of the terminal device through various interfaces and lines.

[0084] The memory mainly includes a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc., while the data storage area can store related data, etc. Furthermore, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard drive, a SmartMedia Card (SMC), a Secure Digital (SD) card, and a Flash Card, or other volatile solid-state storage devices.

[0085] It should be noted that the aforementioned terminal devices may include, but are not limited to, processors and memory, as will be understood by those skilled in the art. Figure 3 The structural block diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or use different components. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0086] Accordingly, embodiments of the present invention provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the steps in the method of the above embodiments, for example... Figure 1 Steps S1 to S5 as described above.

[0087] The technical features and effects of the Beidou power Internet of Things sensor identification coding system proposed in this embodiment are the same as those of the Beidou power Internet of Things sensor identification coding method proposed in this embodiment, and will not be repeated here.

[0088] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A Beidou power Internet of Things sensor identification and encoding method, characterized in that, include: Acquire the attribution data, location data, and attribute data of the target power IoT sensor; The attribution data is sequentially encoded using basic layer encoding and temporary authorization layer encoding to obtain attribution encoding information; The power area grid code and the BeiDou latitude and longitude coordinates of the sensor are extracted from the location data to generate location coding information; The data of different categories in the attribute data are converted into fixed-length sub-codes respectively, and the fixed-length sub-codes are concatenated to obtain the fused encoding information; The attribution coding information, the location coding information, and the fusion coding information are sequentially concatenated into a coding prefix, and the real-time BeiDou information from the sensor is used as the coding suffix to obtain the target identification code.

2. The Beidou power IoT sensor identification and encoding method as described in claim 1, characterized in that, The step of sequentially performing basic layer encoding and temporary authorization layer encoding on the attribution data includes: The attribution data is fixedly encoded according to a preset hierarchical format to obtain the basic layer code; When a cross-domain collaboration event is detected by a sensor, the temporary authorization layer code is generated and appended to the base layer code, and the temporary authorization layer code is removed when the cross-domain collaboration event ends.

3. The Beidou power IoT sensor identification and encoding method as described in claim 1, characterized in that, The step of extracting the power area grid code from the location data and calculating the relative coordinates of the sensors within the power area grid to generate location coding information includes: Calculate the offset between the BeiDou latitude and longitude coordinates and the origin coordinates within the power grid area, and determine the sensor's relative coordinates based on the offset. The location coding information is generated by concatenating the power area grid code with the relative coordinates of the sensor in a preset format.

4. The Beidou power IoT sensor identification and encoding method as described in claim 1, characterized in that, The step of converting different categories of data in the attribute data into fixed-length sub-codes and concatenating the fixed-length sub-codes to obtain fused encoding information includes: Map the security category data in the attribute data to a first subcode of a first fixed length; Map the working condition category data in the attribute data to a second sub-code of a second fixed length; Map the lifecycle category data in the attribute data to a third fixed-length subcode; The first subcode, the second subcode, and the third subcode are concatenated in a preset priority order to obtain the fused encoding information.

5. The Beidou power IoT sensor identification and encoding method as described in claim 1, characterized in that, After obtaining the target identifier code, the target identifier code is encrypted, including: Acquire electrical parameter data monitored in real time by the sensor, and determine the area hash value based on the power area grid code; A dynamic key is constructed using the electrical parameter data, the area hash value, and the basic key fragment; The obfuscation factor is extracted from the target identifier encoding and obfuscated with the dynamic key to obtain an obfuscated string; The target segment encoded by the target identifier is encrypted using the dynamic key to generate segmented ciphertext; The obfuscated string and the segmented ciphertext are concatenated to generate an encrypted code.

6. The Beidou power IoT sensor identification and encoding method as described in claim 5, characterized in that, After generating the encrypted code, the process also includes: When a user's decryption request is received, the dynamic key is restored using the request information; Extract the obfuscated string from the encrypted code and process it in reverse order according to a preset execution order; The segmented ciphertext is decrypted using the restored dynamic key.

7. The Beidou power IoT sensor identification and encoding method as described in claim 1, characterized in that, The method further includes: When a sensor location migration event occurs, the location encoding information is updated; When the sensor's state changes, the fused encoding information is updated.

8. A Beidou power Internet of Things sensor identification and coding system, characterized in that, include: The data acquisition module is used to acquire the attribution data, location data, and attribute data of the target power IoT sensor; The attribution coding module is used to sequentially perform basic layer coding and temporary authorization layer coding on the attribution data to obtain attribution coding information; The location encoding module is used to extract the power area grid code and the BeiDou latitude and longitude coordinates of the sensor from the location data to generate location encoding information; The fusion encoding module is used to convert data of different categories in the attribute data into fixed-length sub-codes respectively, and concatenate the fixed-length sub-codes to obtain fusion encoding information; The encoding and splicing module is used to sequentially splice the attribution encoding information, the location encoding information, and the fusion encoding information into an encoding prefix, and use the real-time BeiDou information of the sensor as the encoding suffix to obtain the target identification encoding.

9. A computer device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the BeiDou power Internet of Things sensor identification encoding method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the Beidou power Internet of Things sensor identification encoding method as described in any one of claims 1 to 7.