Authorization management method and device, and electronic device
Patent Information
- Application Number
- CN202611331262.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]本申请实施例提供了一种授权管理方法、装置及电子设备,能够解决现有BMS设备授权管理中,篡改系统时间可绕过授权约束、旧版证书重复导入产生证书回滚漏洞的问题
[0012]本申请实施例提供的授权管理方法、装置及电子设备,能够将证书生成的第一时间与本地记录的设备最近一次完成授权的第二时间做时间先后比对;只有第一时间晚于第二时间,才判定为新版合法证书,允许执行授权更新,能够阻止旧证书被重复导入生效,解决了证书回滚的问题,同时证书合法校验不再依赖系统时间,避免了非法用户篡改系统时间可绕过授权约束的问题。
Smart Images

Figure CN122994060A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an authorization management method, apparatus, and electronic device. Background Technology
[0002] In the energy storage industry, the Battery Management System (BMS) serves as the core control unit of an energy storage power station, responsible for key functions such as battery status monitoring, equalization management, thermal management, and communication and coordination with the Power Conversion System (PCS) and the Management System (EMS).
[0003] Currently, common authorization management methods for BMS devices mainly include: authorization based on system time and authorization based on certificate files.
[0004] The system time-based authorization method requires the BMS device to read the local system time and compare it with the expiration time in the certificate for verification. Unauthorized users can extend the authorization indefinitely by modifying the device's system time, bypassing authorization constraints and allowing expired authorization certificates to continue to be used, thus rendering authorization control ineffective.
[0005] Certificate-based authorization methods activate or extend the authorization period by importing the certificate file. However, most existing certificate verification methods only check whether the certificate itself is valid, which creates a certificate rollback vulnerability: if a user first imports a long-term valid certificate to complete the authorization, and then re-imports the old version of the certificate, the device can repeatedly obtain authorization, thus compromising the authorization control mechanism. Summary of the Invention
[0006] This application provides an authorization management method, device, and electronic device that can solve the problems in existing BMS device authorization management, such as the ability to bypass authorization constraints by tampering with the system time and the vulnerability of certificate rollback caused by repeated import of old certificates.
[0007] To solve the above-mentioned technical problems, this application is implemented as follows: Firstly, an authorization management method is provided, including: Obtain the authorization certificate, and parse the authorization certificate to obtain the first time the certificate was generated; Obtain the second time, which is the time when the battery management system (BMS) device last completed certificate authorization; Only if the first time is later than the second time, the authorization update is completed based on the authorization certificate, and the first time is taken as the new second time, and the authorization operation status of the BMS device is set to the authorization normal state.
[0008] Secondly, an authorization management device is provided, comprising: The first acquisition module is used to acquire the authorization certificate and parse the authorization certificate to obtain the first time the certificate was generated. The second acquisition module is used to acquire the second time, which is the time when the battery management system (BMS) device last completed certificate authorization. The authorization verification module is used to complete the authorization update based on the authorization certificate only when the first time is later than the second time, and to take the first time as the new second time, so that the authorization operation status of the BMS device is the authorization normal status.
[0009] Thirdly, an electronic device is provided, comprising a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the above-described authorization management method.
[0010] Fourthly, a readable storage medium is provided, wherein at least one computer program is stored in the readable storage medium, the computer program being loaded and executed by a processor to implement the above-described authorization management method.
[0011] Fifthly, a computer program product is provided, the computer program product comprising at least one computer program, the computer program being loaded and executed by a processor to implement the authorization management method provided in the various optional implementations described above.
[0012] The authorization management method, apparatus, and electronic device provided in this application can compare the first time the certificate was generated with the second time the device last completed authorization, which is recorded locally. Only if the first time is later than the second time is it determined to be a new and valid certificate, allowing authorization updates to be performed. This can prevent old certificates from being repeatedly imported and made effective, solving the problem of certificate rollback. At the same time, the certificate validity verification no longer depends on the system time, avoiding the problem that unauthorized users can bypass authorization constraints by tampering with the system time.
[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0014] Figure 1 A flowchart of the authorization management method provided in an embodiment of this application is shown; Figure 2 A flowchart of an authorization management method provided in another embodiment of this application is shown; Figure 3 A flowchart of the authorization management method provided in an application example of this application is shown; Figure 4 A block diagram of an authorization management device provided in one embodiment of this application is shown; Figure 5 A block diagram of an authorization management device provided in another embodiment of this application is shown; Figure 6 A structural block diagram of an electronic device provided in one embodiment of this application is shown. Detailed Implementation
[0015] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0016] To address the issues in existing BMS device authorization management, such as the ability to bypass authorization constraints by tampering with the system time and the vulnerability of certificate rollback caused by repeated import of old certificates, this application provides an authorization management method.
[0017] The executing entity of this method can be a BMS device. For example, in this embodiment, the BMS device is the Battery Control Unit (BAU) in the energy storage system. Of course, the executing entity can also be other energy storage hardware devices with certificate parsing, time storage, and device business logic management capabilities, such as an energy storage control cabinet with integrated BMS functions or a PCS integrated control unit. This application embodiment does not limit this.
[0018] The business scenarios adapted to this application include energy storage power station equipment leasing management, installment payment risk control for energy storage equipment, and permanent authorization management for the sale of complete energy storage equipment. Of course, this application can also be used in other electrochemical energy storage application scenarios requiring wired or offline certificate authorization management; this application embodiment does not impose any limitations on this. For example, the authorization certificate can be issued via a general-purpose USB flash drive; alternatively, it can be issued via an SD memory card, network remote message push, etc.; this application embodiment does not impose any limitations on this.
[0019] The following will combine Figure 1 The licensing management method provided in the embodiments of this application will be explained and described in detail. These embodiments are only used to explain this application and do not constitute a limitation thereof.
[0020] Figure 1 A flowchart illustrating an exemplary embodiment of this application is shown, which can be executed by a BMS device. Figure 1 As shown, this authorization management method mainly includes the following steps (S101) S103): S101. Obtain the authorization certificate and parse the authorization certificate to obtain the first time the certificate was generated. This step is a pre-processing step for authorization renewal. The BMS device first obtains the externally input authorization certificate, then performs parsing processing on the data content of the authorization certificate to extract the first time the certificate was generated. This first time represents the moment when the authorization certificate was created and is the basis data for subsequent authorization legitimacy comparison.
[0021] In some embodiments, before obtaining the authorization certificate, the method provided in this application further includes: monitoring authorization certificate access events; the access events include mobile storage medium access events or network authorization push events; and in response to detecting the authorization certificate access event, performing the operation of obtaining the authorization certificate.
[0022] For example, the BMS device continuously monitors its USB interface. When maintenance personnel insert a USB flash drive containing an authorization certificate into the BMS device's USB interface, the BMS device detects the removable storage medium access event, automatically mounts the USB flash drive, and reads the authorization certificate stored on the USB flash drive. When the energy storage power station has network access, the remote authorization management platform can send an authorization push event via the network, and the BMS device establishes a network receiving channel to receive the authorization certificate message transmitted over the network. Of course, the authorization certificate access event can also import certificate events for the local debugging interface; this embodiment does not limit this.
[0023] In this embodiment, both offline media distribution and remote network push are considered as certificate acquisition methods, which are suitable for offline use scenarios of remote energy storage power stations without network and remote management scenarios with network conditions.
[0024] In some embodiments, before obtaining the authorization certificate, the method provided in this application further includes: generating an authorization certificate, wherein the authorization certificate records the first time of certificate generation. For example, the authorization administrator, on the authorization management terminal, uses a certificate generation tool to input a valid duration parameter. The tool automatically obtains the current system time of the authorization management terminal as the first time of certificate generation, combines the data according to a predetermined format to generate an authorization certificate file, and stores the file in a designated directory on a USB flash drive or distributes it to the BMS device to be authorized via the network.
[0025] For example, the authorization certificate file contains multiple business fields for legitimacy identification, validity control, and rollback prevention verification. These business fields include at least one of the following: a header, validity period, and generation timestamp. Of course, the authorization certificate may also include other business fields such as verification fields and device identification fields; this embodiment does not impose any limitations on this.
[0026] The flag header is a fixed-format field used to identify whether the file is a valid authorization certificate. An example flag header value is BMSER. The validity period represents the time that the device can continue to run after the certificate takes effect. The unit can be days, hours, minutes, etc. For example, the validity period value is 432000 minutes, which corresponds to 30 days. The generation timestamp is the moment when the certificate is created, that is, the first time in this application. For example, the first time can be accurate to the year, month, day, hour, minute, and second. This application embodiment does not limit this. For example, the generation timestamp value is 202609011000.
[0027] In some embodiments, step S101 above, parsing the authorization certificate to obtain the first time of certificate generation, includes: searching for the authorization certificate file in a predetermined path of the removable storage medium; if the authorization certificate file is found, reading the authorization certificate file and parsing it according to a predetermined format to obtain the header, validity period, and generation timestamp; if the authorization certificate file is not found, or the certificate file format does not conform to the predetermined format, terminating the current authorization update process and outputting an error message.
[0028] For example, the predetermined path can be / update / license.dat on the USB drive. When the BMS device detects the USB drive being connected, it accesses this predetermined path. If the corresponding certificate file is not found, or the file read cannot be parsed to produce the required header and timestamp fields, the current authorization update will be terminated directly, and a message indicating that the certificate file is missing or has an incorrect format will be displayed on the human-machine interface. Of course, the storage path and name of the certificate file can be adjusted according to the actual project, and this embodiment does not impose any restrictions on this.
[0029] In this embodiment, the assembly of each business field is completed during the certificate generation stage, supporting multiple distribution methods such as local storage on USB flash drive or network distribution; during the parsing stage, the existence and file format of the certificate file are checked in advance to filter out invalid and illegal certificate files, avoid performing unnecessary comparison operations in the future, and improve the efficiency of authorization update processing.
[0030] S102. Obtain the second time, which is the time when the battery management system (BMS) device last completed certificate authorization. In this step, the BMS device reads the second time from local non-volatile storage media. This non-volatile storage media can be a Flash memory chip, an EEPROM chip, etc., and the data within this storage media will not be lost after the device is powered off. If the BMS device is a brand new, unauthorized device that has never undergone certificate authorization, the second time read will be the initial time preset at the factory.
[0031] For example, the certificate generation time corresponding to the last successful authorization on a certain BMS device was 2026. 03 1514:30 is used as the second time stored locally on the device; for brand new BMS devices that have not undergone any certificate authorization, the second time read is the factory preset initial time, such as 1970. 01 0100:00.
[0032] In this embodiment, the second time is stored in non-volatile memory, ensuring that historical authorization records are not lost after the device is powered off and cannot be tampered with by modifying the system time or formatting the storage area. This provides a reliable comparison benchmark for subsequent one-way incrementing certificate comparison.
[0033] S103. Only when the first time is later than the second time, complete the authorization update based on the authorization certificate, and take the first time as the new second time, and set the authorization operation status of the BMS device to the authorization normal state.
[0034] This step is the core of the entire solution: verifying the validity of the certificate to prevent rollback. It compares the parsed certificate generation time with the locally read time. Only if the certificate generation time is later than the device's most recent authorization record time is it considered a new, valid certificate. The certificate validity verification passes, allowing authorization updates. In this embodiment, certificate validity verification does not depend on the device's current system time and prevents old certificates from being repeatedly imported and validated, thus solving the certificate rollback problem. Furthermore, the certificate validity verification no longer relies on the system time, preventing unauthorized users from tampering with the system time to bypass authorization constraints.
[0035] In some embodiments, the time of the most recent certificate authorization completed by the BMS device is updated, i.e., the new second time, and saved locally as the second time for the next certificate validity verification. The authorization operation status of the BMS device is set to the authorization normal state, and the device can perform all normal business functions.
[0036] In other embodiments, such as Figure 4 As shown, the authorization management method provided in this application mainly includes the following steps (S201) S203): S201. Obtain the authorization certificate and parse the authorization certificate to obtain the first time the certificate was generated. S202. Obtain the second time, which is the time when the battery management system (BMS) device last completed certificate authorization. In this embodiment, steps S201-S202 are the same as steps S101-S102, and will not be described again here.
[0037] S203. If the first time is earlier than or equal to the second time, this authorization update shall be terminated.
[0038] For example, the second time stored locally on the BMS device is 2026. 03 At 15:14:30, the operations and maintenance personnel inserted another document with a generation time of 2026. 01 The old long-term license certificate at 1009:00; if the first time is earlier than the second time, the BMS will directly terminate this license update without updating the device's license status. Of course, while terminating the license update, an error message can also be output locally on the device; this embodiment does not limit this.
[0039] In this embodiment, by identifying the old rollback certificate and directly terminating the update process, invalid subsequent calculations are avoided, certificate replay attacks are intercepted, and the authorization control logic is protected from being bypassed.
[0040] In this embodiment, in addition to carrying the first time the certificate was generated, the authorization certificate also records the authorization validity period, which is used to limit the duration of use of this authorization. In some embodiments, the authorization certificate also records the authorization validity period; after the authorization is updated based on the authorization certificate, the method provided in this application embodiment further includes: determining the authorization expiration time of this authorization based on the first time and the authorization validity period.
[0041] For example, the authorization certificate resolution yields a time of 2026. 03 At 1514:30, the authorized validity period was set to 432,000 minutes (30 days). Based on the first instance and the authorized validity period, the authorized expiration date is calculated to be 2026. 04 1414:30. Of course, the unit of measurement for the authorized effective duration can also be hours or days, and this application embodiment does not limit this.
[0042] In this embodiment, the authorization expiration time is calculated based on the first time the certificate is generated and the validity period of the authorization, providing a time calculation benchmark for subsequent authorization operation status switching, and realizing certificate authorization control with time limit.
[0043] In this embodiment, the authorized validity period can be divided into different types according to business needs to adapt to different business operations. In some embodiments, the authorized validity period includes: long-term validity period and short-term validity period; the long-term validity period is greater than a first preset validity period threshold, the short-term validity period is less than a second preset validity period threshold, and the first preset validity period threshold is greater than the second preset validity period threshold.
[0044] For example, the first preset duration threshold is set to 1,000,000 minutes, with 4,294,967,295 minutes (approximately 8,169 years) serving as a long-term valid duration for one-time equipment sales scenarios, achieving an equivalent perpetual license. For example, the second preset duration threshold is set to 60 minutes, with 60 minutes serving as a short-term valid duration for lease expiration or business disputes scenarios, enabling rapid early device locking. Of course, the thresholds for long-term and short-term valid durations can be reconfigured according to actual project needs; this application embodiment does not impose such limitations.
[0045] In this embodiment, by distinguishing between long-term and short-term authorization validity periods, the different business needs of permanent equipment sales and rapid authorization recycling are adapted to improve the flexibility of energy storage business management.
[0046] In some embodiments, the authorization certificate may also carry a recovery instruction field, such as a BACKUP recovery field, which carries the original authorization time information to be recovered, including the remaining validity period or the original validity expiration date.
[0047] Before obtaining the second time in step S102 or S202, the method provided in this application embodiment further includes: the BMS device parses the authorization certificate to identify whether it carries a recovery instruction field; if the authorization certificate is parsed to carry a recovery instruction field, the authorization update is completed based on the authorization certificate, and the first time is used as the new second time, the authorization operation status of the BMS device is set to the authorization normal status, and the authorization expiration time of this authorization is determined according to the original authorization time information and the first time.
[0048] For example, when a business dispute occurs, the operations and maintenance side issues a certificate with a very short validity period. After the BMS device completes the update, it records an early termination flag, and the device enters a restricted operation state. When the business dispute is resolved, the authorization management end generates an authorization certificate with a BACKUP recovery field. The recovery instruction field contains the original authorization expiration time before the dispute occurred. This certificate is imported via USB flash drive or pushed to the BMS device via the network. The BMS parses and recognizes the BACKUP recovery field, no longer executes the "first time is later than the second time" verification condition, directly clears the local early termination flag, and reverts to the original authorization time and authorization status before the dispute.
[0049] It should be noted that the authorization certificate carrying the recovery command field also has a valid certificate header and needs to be signed and encrypted by the authorization management terminal to prevent users from arbitrarily forging and generating it, and to prevent illegal use of the recovery command to bypass the anti-rollback verification. In this embodiment, based on the anti-certificate rollback, authorization recovery capability is provided for business scenarios where the device is locked due to business disputes; normal new version authorization updates still strictly implement the first and second time unidirectional incremental comparison, and only special certificates carrying recovery commands are exempt from this comparison logic, which takes into account both the security constraints of anti-replay attack and the flexible recovery needs of business scenarios.
[0050] In this embodiment, after obtaining the authorization expiration time, the BMS device can periodically calculate the remaining authorization time to achieve multi-level authorization status management. In some embodiments, the method provided in this application further includes: determining the remaining authorization time based on the current time and the authorization expiration time; setting the BMS's authorization operation status to normal authorization status when the remaining authorization time is greater than a warning threshold; switching the authorization operation status to a warning status and outputting an expiration reminder when the remaining authorization time is greater than zero and less than or equal to the warning threshold; and switching the authorization operation status to a locked status when the remaining authorization time is not greater than zero. In the locked status, the BMS refuses to execute external network scheduling commands but supports monitoring authorization certificate access events and maintains the ability to acquire new authorization certificates.
[0051] For example, the warning threshold is set to 7 days. If the remaining authorization time before the current time is greater than 7 days, the BMS maintains normal authorization status and responds normally to all business commands. If the remaining authorization time before the current time is less than 7 days and has not yet expired, the device screen displays a pop-up reminder: "License is about to expire, please contact the supplier." If the remaining authorization time is less than or equal to zero, the device enters a locked state, rejecting external grid-connected scheduling commands issued by the EMS, including not responding to PCS charging and discharging scheduling and not responding to EMS power commands, but retaining USB flash drive mounting and certificate parsing capabilities to receive new certificates for unlocking. Of course, the expiration reminder output format can also be serial port logs or remote alarm messages, and the warning threshold can also be modified as needed. This application embodiment does not limit this.
[0052] In this embodiment, the authorized operation status of the BMS device is divided into three levels: normal, warning, and locked. Warnings are issued before the expiration date to avoid sudden interruption of energy storage services. In the locked state, grid connection scheduling instructions are intercepted to achieve service constraints after the authorization expires.
[0053] In practical applications, BMS devices often manage multiple battery clusters simultaneously, requiring consistent authorization status across all clusters. In some embodiments, the BMS device manages multiple battery clusters; the method provided in this application further includes: synchronously managing the authorization status of multiple battery clusters based on the BMS's authorization status. This enables synchronized linkage of authorization statuses across multiple battery clusters, ensuring consistency in the overall battery stack management logic and aligning with the hardware architecture of multi-cluster management in energy storage BMS.
[0054] For example, the BMS manages three battery clusters simultaneously. When the BMS switches to a locked state, all three battery clusters simultaneously enter a locked state, disallowing charging and discharging. When the authorized normal state is restored, all three battery clusters simultaneously unlock. Of course, the number of battery clusters can be adjusted according to the actual configuration of the energy storage power station, and this application embodiment does not limit this.
[0055] In some embodiments, after entering the locked state, the BMS device can also interact with the PCS to issue a shutdown command. In some embodiments, the method provided in this application further includes: in the locked state, the BMS sends a shutdown command to the energy storage converter. Thus, in the locked state, the shutdown command is issued in conjunction with the PCS, fully realizing the shutdown control of the energy storage system from the device interaction level, and strengthening the constraint capability after the authorization expires.
[0056] For example, after the BMS enters the locked state, it sends a stop command to the PCS via the CAN bus or RS485 communication interface, notifying the PCS to stop charging and discharging. Of course, the communication interface can also be an Ethernet interface, and this application embodiment does not limit this.
[0057] The authorization management method provided in this application can prevent rollback and replay attacks of old certificates by comparing the certificate generation time (first time) with the most recent local authorization time (second time). It is compatible with various certificate delivery methods, including mobile storage media and network push. It differentiates between long-term and short-term authorization durations to adapt to various business scenarios such as energy storage leasing, installment payments, and whole-unit sales. It ensures normal operation. Warning It locks the three-level authorization status control, and supports simultaneous control of multiple battery clusters and linkage shutdown with PCS equipment, adapting to the offline authorization control needs of networkless energy storage power stations.
[0058] One application example illustrates the entire business process from certificate generation and media distribution to BMS authorization taking effect. This application example is adapted to the actual application scenario of energy storage power station leasing projects. Figure 5 A flowchart of the authorization management method provided in an application example of this application is shown, such as Figure 5 As shown, the authorization management method includes step S301. S305: S301. The authorization management terminal generates an authorization certificate; For example, a new BMS device is deployed in an energy storage leasing project, requiring a 30-day lease authorization. The authorization administrator inputs the validity period parameter 432000 minutes into the certificate generation tool on the authorization management terminal. The certificate generation tool reads the current time on the authorization management terminal as the first time for certificate generation, resulting in the first time being 2026. 09 0110:00; Generate an authorization certificate according to the predetermined format. The header of the authorization certificate is BMSER, the validity period is 432,000 minutes, and the generation timestamp is 2026. 09 0110:00. Of course, the authorization certificate can also selectively carry a recovery instruction field according to business needs, and this application embodiment does not impose any restrictions on this.
[0059] S302. Issuance of authorization certificate; Save the generated license certificate to the designated path / update / license.dat on the USB drive; alternatively, you can choose to send it directly to the BMS device via network message. This example uses the offline USB drive sending method.
[0060] S303, BMS device monitors authorization certificate access events and obtains authorization certificates; The maintenance personnel insert the USB flash drive containing the authorization certificate into the USB port of the BMS device; the BMS device detects the access event of the removable storage medium, automatically mounts the USB flash drive, and reads the authorization certificate file in the predetermined path.
[0061] S304. Parse the authorization certificate to obtain the first time and read the second time stored locally; BMS parses the certificate file, verifies the validity of the header, and obtains the first date as 2026. 09 0110:00, valid duration 432000 minutes; This BMS is a brand new, unauthorized device. The second time read from the Flash non-volatile memory is the factory preset initial time of 1970. 01 0100:00.
[0062] S305. Time comparison and execution of authorization update.
[0063] First comparison in 2026 09 0110:00 and the second time 1970 01 0100:00; Since the first timeout is later than the second timeout, it is determined to be a legitimate new certificate, and the authorization update is performed; the second timeout stored locally is updated to 2026. 09 At 0110:00, the BMS device's authorized operation status was set to normal; simultaneously, based on the first time and the effective duration, the authorization expiration time was calculated to be 2026. 10 0110:00.
[0064] Furthermore, this business example can continue to execute subsequent business processing procedures. For example, if a customer defaults on payments during the lease period, the operations and maintenance personnel can generate a document on the authorized management terminal with a first-time date of 2026. 09 A new authorization certificate, valid for only 10 minutes and issued at 10:09:00, is stored on a USB drive and inserted into the BMS device. The BMS recognizes that the first time is later than the local second time and accepts the authorization update. After 10 minutes, the device enters a locked state, rejecting external network scheduling commands, thus enabling early termination of authorization in business scenarios. Once subsequent business disputes are resolved, the authorization management terminal generates an authorization certificate with a BACKUP recovery instruction field, containing the original authorization time information before the dispute occurred. This certificate is imported into the BMS device. The BMS recognizes the recovery instruction field, exempts the one-way time comparison logic, clears the local early termination flag, and restores the device to its original authorization state. Of course, the above business processing steps can be adjusted according to the actual project situation; this embodiment does not impose any restrictions.
[0065] In this embodiment, a complete business process is implemented for new BMS devices, from certificate generation, offline media distribution, certificate parsing and verification, authorization activation, to early locking of the device after expiration and authorization restoration after dispute resolution. It can realize the initial authorization of new devices, as well as cover the business requirements of early locking and authorization restoration for lease installment projects, and fully adapt to the actual engineering scenarios of offline business management of energy storage BMS.
[0066] An exemplary embodiment of this application provides an authorization management device 10. Figure 4 This illustration shows a structural block diagram of an authorization management device 10 provided in an exemplary embodiment of this application. The aforementioned authorization management device can achieve the following: Figure 1 The embodiments shown include all or part of the content. The following is only a brief description of the structure and function of the authorization management device; for other matters not covered herein, please refer to the relevant descriptions in the above authorization management method. The embodiments of this authorization management device correspond to the embodiments of the above authorization management method. All implementation processes and methods of the above method embodiments can be applied to the embodiments of this authorization management device and achieve the same technical effects.
[0067] like Figure 4 As shown, the authorization management device includes: a first acquisition module 100, a second acquisition module 200, and an authorization verification module 300. In this embodiment: The first acquisition module 100 is used to acquire the authorization certificate and parse the authorization certificate to obtain the first time the certificate was generated. The second acquisition module 200 is used to acquire the second time, which is the time when the battery management system (BMS) device last completed certificate authorization. The authorization verification module 300 is used to complete the authorization update based on the authorization certificate only when the first time is later than the second time, and to take the first time as the new second time, so that the authorization operation status of the BMS device is the authorization normal status.
[0068] In some embodiments, such as Figure 5 As shown, the authorization management device further includes: a monitoring module 400, used to monitor authorization certificate access events; the access events include mobile storage medium access events or network authorization push events; in response to the detection of an authorization certificate access event, the first acquisition module 100 is triggered to perform the operation of acquiring the authorization certificate.
[0069] In some embodiments, the authorization verification module 300 is further configured to terminate the current authorization update if the first time is earlier than or equal to the second time.
[0070] In some embodiments, the authorization certificate also records the duration of authorization validity; In some embodiments, the authorized validity period includes: long-term validity period and short-term validity period; the long-term validity period is greater than a first preset validity period threshold, the short-term validity period is less than a second preset validity period threshold, and the real-time first preset validity period threshold is greater than the real-time second preset validity period threshold.
[0071] In some embodiments, such as Figure 5 As shown, the authorization management device 10 also includes an authorization status management module 500, which is used to obtain the authorization validity period and determine the authorization expiration time based on the first time and the authorization validity period.
[0072] In some embodiments, the authorization status management module 500 is further configured to determine the remaining authorization duration based on the current time and the authorization expiration time; if the remaining authorization duration is greater than the warning threshold, the authorization operation status of the BMS is set to the normal authorization status; if the remaining authorization duration is greater than zero and less than or equal to the warning threshold, the authorization operation status is switched to the warning status and an expiration reminder is output; if the remaining authorization duration is not greater than zero, the authorization operation status is switched to the locked status, wherein, in the locked status, the BMS device refuses to execute external grid connection scheduling commands, but retains the ability to obtain new authorization certificates.
[0073] The BMS device manages multiple battery clusters; in some embodiments, the authorization status management module is also used to synchronously manage the authorization operation status of multiple battery clusters based on the authorization operation status of the BMS device.
[0074] In some embodiments, the authorization status management module 500 is further configured to send a shutdown command to the energy storage converter when the BMS device is in a locked state.
[0075] The authorization management device provided in this application embodiment can prevent rollback and replay attacks of old certificates by comparing the certificate generation time (first time) with the most recent local authorization time (second time); it is compatible with various certificate issuance methods such as mobile storage media and network push; it differentiates between long-term and short-term authorization durations to adapt to various business scenarios such as energy storage leasing, installment payments, and whole-unit sales; and it enables normal operation. Warning It locks the three-level authorization status control, and supports simultaneous control of multiple battery clusters and linkage shutdown with PCS equipment, adapting to the offline authorization control needs of networkless energy storage power stations.
[0076] Figure 6 A structural block diagram of an electronic device 1000 illustrating an exemplary embodiment of this application is shown. The electronic device 1000 can be implemented as the aforementioned license management device, which can be configured in electronic devices such as smartphones, tablets, laptops, desktop computers, smartwatches, televisions, or servers.
[0077] Typically, electronic device 1000 includes a processor 1001 and a memory 1002.
[0078] Processor 1001 may include one or more processing cores, such as a quad-core processor, a deca-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0079] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 is used to store at least one instruction, which is executed by the processor 1001 to implement all or part of the steps in the above-described authorization management method.
[0080] Those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on the electronic device 1000, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0081] In one exemplary embodiment, a readable storage medium is also provided, which stores a program or instructions that, when executed by a processor, implement all or part of the steps in the above-described authorization management method. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, or optical data storage device, etc.
[0082] In one exemplary embodiment, a computer program product is also provided, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform all or part of the steps of the above-described authorization management method.
[0083] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0084] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. An authorization management method, characterized in that, include: Obtain the authorization certificate, and parse the authorization certificate to obtain the first time the certificate was generated; Obtain the second time, which is the time when the battery management system (BMS) device last completed certificate authorization; Only if the first time is later than the second time, the authorization update is completed based on the authorization certificate, and the first time is taken as the new second time, and the authorization operation status of the BMS device is set to the authorization normal state.
2. The method according to claim 1, characterized in that, Prior to obtaining the authorization certificate, the method further includes: Monitor authorized certificate access events; the access events include mobile storage media access events or network authorization push events. In response to the detection of the authorized certificate access event, the operation of obtaining the authorized certificate is performed.
3. The method according to claim 1, characterized in that, The method further includes: If the first time is earlier than or equal to the second time, this authorization update shall be terminated.
4. The method according to claim 1, characterized in that, The authorization certificate also records the duration of the authorization validity period; After the authorization update is completed based on the authorization certificate, the method further includes: Obtain the validity period of the authorization; The expiration time of this authorization is determined based on the first time and the validity period of the authorization.
5. The method according to claim 4, characterized in that, The authorized validity period includes: long-term validity period and short-term validity period; the long-term validity period is greater than a first preset validity period threshold, the short-term validity period is less than a second preset validity period threshold, and the first preset validity period threshold is greater than the second preset validity period threshold.
6. The method according to claim 4 or 5, characterized in that, The method further includes: The remaining duration of the authorization is determined based on the current time and the authorization expiration time. If the remaining authorized time exceeds the warning threshold, the authorization operation status of the BMS will be changed to the normal authorization status. If the remaining authorized time is greater than zero and less than or equal to the warning threshold, the authorized operation status is switched to the warning status, and an expiration reminder is output; If the remaining authorized time is not greater than zero, the authorized operation state is switched to a locked state, wherein the BMS device refuses to execute external grid-connected scheduling commands in the locked state.
7. The method according to claim 6, characterized in that, The BMS device manages multiple battery clusters; The method further includes: synchronously managing the authorized operating status of the multiple battery clusters based on the authorized operating status of the BMS device.
8. The method according to claim 6, characterized in that, The method further includes: In the locked state, the BMS device sends a shutdown command to the energy storage converter.
9. An authorization management device, characterized in that, include: The first acquisition module is used to acquire the authorization certificate and parse the authorization certificate to obtain the first time the certificate was generated. The second acquisition module is used to acquire the second time, which is the time when the battery management system (BMS) device last completed certificate authorization. The authorization verification module is used to complete the authorization update based on the authorization certificate only when the first time is later than the second time, and to take the first time as the new second time, so that the authorization operation status of the BMS device is the authorization normal status.
10. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the authorization management method as described in any one of claims 1 to 8.