An off-line serial number generation and verification method and device for a power monitoring system and a storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]然而,该方法在实际应用中仍存在以下显著缺陷:首先一个完整的电力监控系统通常包含多个主机节点,复杂的应用往往需要分布式部署在多个机器上协同运行
[0018]Compared with existing technologies, the beneficial effects achieved by this invention are as follows: By encrypting and verifying the name of the power station, this application avoids reliance on machine hardware information, enabling authorization to be completed using only one serial number within the same power monitoring system environment. This eliminates the need to apply for a separate serial number for each node, effectively simplifying the deployment process. Furthermore, by combining encryption verification with an anti-time tampering detection mechanism, the overall security and reliability of offline serial number authorization are improved, ensuring stable operation even in complex environments. Moreover, this solution is widely adaptable to various offline power monitoring systems, possessing strong scenario compatibility.
Smart Images

Figure CN122528181A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system automation technology, and particularly relates to a method, device and storage medium for generating and verifying offline serial numbers in a power monitoring system. Background Technology
[0002] In recent years, with the large-scale deployment and widespread application of power plant monitoring systems, the licensing management of advanced application software has gradually become a key technical challenge. Given that most current power monitoring systems operate offline and are physically isolated from external networks, how to effectively license monitoring application software in offline mode has become an important issue that urgently needs to be addressed and resolved during system design.
[0003] To ensure effective management of application software licenses for power monitoring systems in offline mode, a complete and reliable offline licensing mechanism is urgently needed. Extensive research has been conducted in this field to address this requirement. Current mainstream solutions typically generate serial numbers based on simple hardware information using one-way hash operations, thereby enabling software licensing management in offline mode.
[0004] However, this method still has the following significant drawbacks in practical applications: First, a complete power monitoring system typically contains multiple host nodes, and complex applications often require distributed deployment across multiple machines for collaborative operation. Under existing solutions, maintenance personnel need to collect hardware information and apply for serial numbers for each node individually, a cumbersome and inefficient process, especially in sites with a large number of devices. Second, existing authorization systems usually rely on local system time for validity verification, but due to the lack of reliable protection for the time source, users can manually modify the operating system time, causing expired serial numbers to still pass verification, rendering time control of authorization ineffective. Finally, the serial number generation method based on one-way hashing has a relatively simple structure. Attackers can easily extract the algorithm logic through reverse engineering or brute-force enumeration of legitimate serial numbers using a "keygen," thus causing the authorization mechanism to fail and seriously threatening software intellectual property rights and system access security.
[0005] Therefore, there is an urgent need to design a permission management method that is suitable for offline environments, has simple operation, high security, and strong anti-tampering capabilities to solve the above problems. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide an offline serial number generation and verification method, device and storage medium for power monitoring systems. Through the design of secondary approval of serial number validity period, binding relationship between station name and serial number and anti-time tampering mechanism, the invention achieves simple and safe offline serial number authorization.
[0007] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0008] In a first aspect, the present invention provides an offline serial number generation and verification method for a power monitoring system, comprising: In response to the application for a serial number, obtain the name of the power plant and the expected validity period of the serial number; In response to the serial number application being transferred to the approval end, the validity period of the approved serial number is obtained; the approval end has the right to adjust the validity period of the serial number according to the actual business scenario; An encrypted serial number is generated based on the name of the power station and the validity period of the approved serial number. The encrypted serial number is initially verified. Upon successful verification, the encrypted serial number is bound to the corresponding power plant name, and the initial verification time is saved. During the initial verification, the power plant name can be entered. The encrypted serial number bound to the power station name is subsequently verified, and the system time is checked for malicious tampering based on the verification time record of each verification. If tampering is detected, the verification is deemed to have failed. The power station name is automatically loaded during subsequent verifications and cannot be changed. The last verification time is updated after each successful verification.
[0009] Optionally, the approval end can adjust the validity period of the serial number according to the actual business scenario, including shortening or extending the expected validity period of the serial number according to the project execution cycle.
[0010] Optionally, the step of generating an encrypted serial number based on the power station name and the approved serial number validity period includes: The name of the power station is encrypted using the national cryptographic algorithm according to preset rules to generate the first encrypted string; The validity period of the approved serial number is encrypted using the national cryptographic algorithm according to preset rules to generate a second encrypted string; The first encrypted string and the second encrypted string are combined according to specific rules to construct the target encrypted serial number.
[0011] Optionally, binding the encrypted serial number to the corresponding power station name includes: Digitally sign the names of power stations; The digitally signed name of the power station is stored in a secure chip or protected storage area, thus completing the binding process.
[0012] Optionally, the step of detecting whether the system time has been maliciously tampered with based on the time records of previous verifications includes: Read the last successful verification time of the current power monitoring environment; The system compares the current time with the last successful verification time. If the current time is earlier than the last successful verification time and the difference exceeds a preset time threshold, it is determined that the time has been maliciously tampered with.
[0013] Optionally, the preset time threshold is set according to the time tolerance of the power monitoring system during normal operation.
[0014] Optionally, each verification includes the encrypted serial number format, the correspondence between the power station name and the encrypted serial number, and whether the encrypted serial number is within its validity period.
[0015] Optionally, the encrypted serial number is universal across all nodes in the same power monitoring system environment and does not depend on the hardware information of each node.
[0016] Secondly, the present invention provides an offline serial number generation and verification device for a power monitoring system, comprising: Serial Number Request Module: Used to respond to a serial number request from the requesting end, and obtain the name of the power station and the expected validity period of the serial number; Serial Number Approval Module: This module is used to respond to serial number applications being transferred to the approval end and obtain the validity period of the approved serial number. The approval end has the right to adjust the validity period of the serial number according to the actual business scenario. Serial number generation module: used to generate encrypted serial numbers based on the name of the power station and the validity period of the approved serial number; Power station binding module: Used to perform initial verification of the encrypted serial number. After successful verification, the encrypted serial number is bound to the corresponding power station name, and the initial verification time is saved. The power station name can be entered during the initial verification. Serial Number Verification Module: Used to perform subsequent verification on the encrypted serial number bound to the power station name, and to detect whether the system time has been maliciously tampered with based on the verification time record of each verification. If tampering is detected, the verification is deemed to have failed. The power station name is automatically loaded during subsequent verification and cannot be changed. The last verification time is updated after each successful verification.
[0017] Thirdly, the present invention provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the offline serial number generation and verification method for power monitoring systems as described in any of the first aspects.
[0018] Compared with existing technologies, the beneficial effects achieved by this invention are as follows: By encrypting and verifying the name of the power station, this application avoids reliance on machine hardware information, enabling authorization to be completed using only one serial number within the same power monitoring system environment. This eliminates the need to apply for a separate serial number for each node, effectively simplifying the deployment process. Furthermore, by combining encryption verification with an anti-time tampering detection mechanism, the overall security and reliability of offline serial number authorization are improved, ensuring stable operation even in complex environments. Moreover, this solution is widely adaptable to various offline power monitoring systems, possessing strong scenario compatibility. Attached Figure Description
[0019] Figure 1 The diagram shown is a flowchart of an offline serial number generation and verification method for a power monitoring system according to one embodiment of the present invention.
[0020] Figure 2 The diagram shown is a flowchart of the anti-time tampering detection process in one embodiment of the present invention. Detailed Implementation
[0021] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0022] Example 1
[0023] like Figure 1 As shown in the figure, this embodiment provides a method for generating and verifying offline serial numbers in a power monitoring system, including the following steps:
[0024] Step S1: The application terminal sends a serial number application, and the power monitoring system obtains the name of the power station and the expected validity period of the serial number.
[0025] The applicant initiates the serial number application process in the internal work system, fills in the name of the target power station and the desired serial number validity period, and submits the application information to the approver through the internal network.
[0026] Step S2: The serial number application is transferred to the approval end, which approves the serial number application, and the power monitoring system obtains the validity period of the approved serial number.
[0027] After receiving the application, the approver can review and modify the expected validity period based on business scenarios such as the actual project execution cycle. For example, if the applicant expects a validity period of 6 months, but the approver assesses that the actual project cycle is 3 months, the validity period will be adjusted to 3 months. Once approved, the process is archived.
[0028] Step S3: Generate an encrypted serial number based on the power station name and the approved serial number validity period. The system calls the serial number generation interface to perform the following encryption operations:
[0029] S31: Encrypt the name of the power station using the national cryptographic algorithm according to the preset rules to generate the first encrypted string;
[0030] S32: Encrypt the validity period of the approved serial number using the national cryptographic algorithm according to preset rules to generate a second encrypted string;
[0031] S33: Combine the first encrypted string and the second encrypted string according to specific rules to construct the target encrypted serial number.
[0032] The generated encrypted serial number is sent to the serial number applicant through a secure channel for authorization and activation in the target power monitoring system.
[0033] Step S4: Perform initial verification of the encrypted serial number. For example... Figure 1 As shown, the following operations are performed during the initial verification:
[0034] S41: Verify the validity of the encrypted serial number format and check whether the serial number conforms to the preset encoding rules and length requirements;
[0035] S42: Verify the correspondence between the power station name and the encrypted serial number, and compare the power station name entered by the user with the station name decrypted from the encrypted serial number;
[0036] S43: Verify whether the encrypted serial number is within its validity period by comparing the current system time with the validity period decrypted from the serial number.
[0037] During the initial verification, the system provides an interface for inputting the power station name, allowing users to manually enter the station name. The initial verification is considered successful once all three verification steps pass.
[0038] S44: After successful verification, the encrypted serial number is bound to the corresponding power station name. Specifically, the power station name is digitally signed, and the digitally signed station name is stored in a security chip or protected storage area (such as a TPM module or an operating system-level protected directory), completing the binding. Simultaneously, the first verification time is recorded in the local database.
[0039] Step S5: Perform subsequent verification on the encrypted serial number after binding the power station name. The power station name is automatically loaded and cannot be changed. For example... Figure 1 As shown, the following operations will be performed during subsequent verification:
[0040] S51: During subsequent verification, the system automatically reads the fixed site name from the security chip or protected storage area, sets the input box to an uneditable state, and directly participates in the verification;
[0041] S52: Verify the validity of the encrypted serial number format;
[0042] S53: Verify the correspondence between the power station name and the encrypted serial number;
[0043] S54: Verify whether the encrypted serial number is within its validity period.
[0044] S55: After all the above verification items pass, proceed to the anti-time tampering detection step.
[0045] like Figure 2 As shown, the following operations are performed during time tampering detection:
[0046] S551: Read the last successful verification time T of the current power monitoring environment from the database. last ;
[0047] S552: Get the current system time T now ;
[0048] S553: Comparison with T now With T last If T now Earlier than T last If T now No earlier than T last Then proceed to S556;
[0049] S554: Calculate the time difference ΔT =|T last - T now |;
[0050] S555: Determine whether ΔT exceeds the preset threshold T. h If ΔT>T h If the time is maliciously altered, proceed to S557; if ΔT≤T h If so, it is considered a normal clock drift and enters S556;
[0051] S556: Time detection passed, verification successful, proceed to S558;
[0052] S557: Verification failed, authorization was denied, and an exception log was recorded;
[0053] S558: Update the last verification time in the database to T. now This completes the verification.
[0054] Among them, the preset threshold T h The system's normal operating time tolerance is set, for example, to 1 hour, to distinguish between normal clock synchronization adjustments and malicious time rollback behavior.
[0055] In this embodiment, the encrypted serial number is universal across all nodes within the same power monitoring system environment and does not depend on the hardware information of each node (such as MAC address, CPU serial number, etc.). In a distributed power monitoring system, unified authorization can be achieved by sharing the same encrypted serial number among all nodes, without the need to apply for a separate serial number for each node.
[0056] Example 2
[0057] This embodiment provides an offline serial number generation and verification device for a power monitoring system, including: Serial Number Request Module: Used to respond to a serial number request from the requesting end, and obtain the name of the power station and the expected validity period of the serial number; Serial Number Approval Module: This module is used to respond to serial number applications being transferred to the approval end and obtain the validity period of the approved serial number. The approval end has the right to adjust the validity period of the serial number according to the actual business scenario. Serial number generation module: used to generate encrypted serial numbers based on the name of the power station and the validity period of the approved serial number; Power station binding module: Used to perform initial verification of the encrypted serial number. After successful verification, the encrypted serial number is bound to the corresponding power station name, and the initial verification time is saved. The power station name can be entered during the initial verification. Serial Number Verification Module: Used to perform subsequent verification on the encrypted serial number bound to the power station name, and to detect whether the system time has been maliciously tampered with based on the verification time record of each verification. If tampering is detected, the verification is deemed to have failed. The power station name is automatically loaded during subsequent verification and cannot be changed. The last verification time is updated after each successful verification.
[0058] The device provided in this embodiment can execute the offline serial number generation and verification method for power monitoring system provided in any step of Embodiment 1, and has the corresponding functional modules and beneficial effects of the execution method.
[0059] Example 3
[0060] This embodiment provides a computer storage medium storing a computer program. When the computer program is executed by a processor, it implements the offline serial number generation and verification method for power monitoring systems provided in any step of this embodiment.
[0061] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0062] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0063] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0064] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0065] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for generating and verifying offline serial numbers in a power monitoring system, characterized in that, include: In response to the application for a serial number, obtain the name of the power plant and the expected validity period of the serial number; In response to the serial number application being transferred to the approval end, the validity period of the approved serial number is obtained; the approval end has the right to adjust the validity period of the serial number according to the actual business scenario; An encrypted serial number is generated based on the name of the power station and the validity period of the approved serial number. The encrypted serial number is initially verified. Upon successful verification, the encrypted serial number is bound to the corresponding power plant name, and the initial verification time is saved. During the initial verification, the power plant name can be entered. The encrypted serial number bound to the power station name is subsequently verified, and the system time is checked for malicious tampering based on the verification time record of each verification. If tampering is detected, the verification is deemed to have failed. The power station name is automatically loaded during subsequent verifications and cannot be changed. The last verification time is updated after each successful verification.
2. The offline serial number generation and verification method for a power monitoring system according to claim 1, characterized in that, The approval process adjusts the validity period of the serial number based on the actual business scenario, including shortening or extending the expected validity period of the serial number according to the project execution cycle.
3. The offline serial number generation and verification method for a power monitoring system according to claim 1, characterized in that, The generation of encrypted serial numbers based on the power station name and the approved serial number validity period includes: The name of the power station is encrypted using the national cryptographic algorithm according to preset rules to generate the first encrypted string; The validity period of the approved serial number is encrypted using the national cryptographic algorithm according to preset rules to generate a second encrypted string; The first encrypted string and the second encrypted string are combined according to the preset format to construct the target encrypted serial number.
4. The offline serial number generation and verification method for a power monitoring system according to claim 1, characterized in that, The step of binding the encrypted serial number with the corresponding power station name includes: Digitally sign the names of power stations; The digitally signed name of the power station is stored in a secure chip or protected storage area, thus completing the binding process.
5. The offline serial number generation and verification method for a power monitoring system according to claim 1, characterized in that, The method of detecting whether the system time has been maliciously tampered with based on the time records of previous verifications includes: Read the last successful verification time of the current power monitoring environment; The system compares the current time with the last successful verification time. If the current time is earlier than the last successful verification time and the difference exceeds a preset time threshold, it is determined that the time has been maliciously tampered with.
6. The offline serial number generation and verification method for a power monitoring system according to claim 5, characterized in that, The preset time threshold is set according to the time tolerance of the power monitoring system during normal operation.
7. The offline serial number generation and verification method for a power monitoring system according to claim 1, characterized in that, Each verification includes the encrypted serial number format, the correspondence between the power station name and the encrypted serial number, and whether the encrypted serial number is within its validity period.
8. The offline serial number generation and verification method for a power monitoring system according to claim 1, characterized in that, The encrypted serial number is universal across all nodes within the same power monitoring system environment.
9. An offline serial number generation and verification device for a power monitoring system, characterized in that, include: Serial Number Request Module: Used to respond to a serial number request from the requesting end, and obtain the name of the power station and the expected validity period of the serial number; Serial Number Approval Module: This module is used to respond to serial number applications being transferred to the approval end and obtain the validity period of the approved serial number. The approval end has the right to adjust the validity period of the serial number according to the actual business scenario. Serial number generation module: used to generate encrypted serial numbers based on the name of the power station and the validity period of the approved serial number; Power station binding module: Used to perform initial verification of the encrypted serial number. After successful verification, the encrypted serial number is bound to the corresponding power station name, and the initial verification time is saved. The power station name can be entered during the initial verification. Serial Number Verification Module: Used to perform subsequent verification on the encrypted serial number bound to the power station name, and to detect whether the system time has been maliciously tampered with based on the verification time record of each verification. If tampering is detected, the verification is deemed to have failed. The power station name is automatically loaded during subsequent verification and cannot be changed. The last verification time is updated after each successful verification.
10. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the offline serial number generation and verification method for power monitoring systems as described in any one of claims 1-8.