SN code solidification and management method for optical storage all-in-one machine
By generating SN codes that conform to predefined naming rules for the integrated PV and energy storage unit and enabling temporary debugging identifiers when verification fails, the problem of device hard locking in SN code management of the integrated PV and energy storage unit is solved, and flexible device management and fault diagnosis are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-04-10
AI Technical Summary
The existing SN code management method for integrated optical storage devices can easily lead to a hard lock of the device when verification fails, making it impossible to repair. Furthermore, some verification failures are not due to malicious behavior, and directly disabling the function is too strict and affects the efficiency of operation and maintenance.
By generating a raw SN code that conforms to predefined naming rules, encapsulating it into a standard format string, and generating a temporary debugging identifier when verification fails, it serves as an identity credential to enable restricted operation mode, supporting remote fault diagnosis and on-site debugging.
It enables flexible management of the integrated optical storage unit when the SN code verification fails, avoids hard locking of the device, supports basic communication and fault diagnosis, and improves operation and maintenance efficiency.
Smart Images

Figure CN121835600A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of SN code management, in particular to a SN code solidification and management method for optical storage integrated machine. BACKGROUND
[0002] In the production and operation process of intelligent energy equipment such as optical storage integrated machine, serial number (SN code) as the unique identity of the device is widely used in production traceability, cloud platform registration and other key links. Usually, the SN code is solidified into the internal non-volatile memory (such as EEPROM) of the device before leaving the factory, and is read and verified by the main control program when the device is powered on for the first time. If the verification is passed, the device initiates a registration request to the remote cloud platform and enters the normal operation state; if the verification fails (such as SN code missing or illegal due to barcode contamination, scanning error, storage abnormality or human tampering).
[0003] The prior art scheme with publication number CN111104993A discloses an SN barcode management method and system, which can improve the reliability of SN barcode verification; however, similar schemes including the above-mentioned prior art generally adopt a forced locking strategy - that is, to prohibit the device from starting or completely cut off the communication ability to prevent illegal devices from accessing the system. However, the above-mentioned processing method exposes significant defects in actual application. Once the device is hard-locked due to SN code abnormality, the operation and maintenance personnel cannot repair it, and often need to return the whole machine to the factory for processing; on the other hand, part of the SN verification failure is not caused by malicious behavior, but only by occasional data error in the production or transportation process, at which time directly disabling all functions is obviously too harsh. SUMMARY
[0004] In view of the deficiencies of the prior art, the present application provides a SN code solidification and management method for optical storage integrated machine, which solves the technical problems proposed in the background art by introducing the construction of a temporary identifier.
[0005] To achieve the above purpose, the present application is realized by the following technical scheme: A SN code solidification and management method for optical storage integrated machine, comprising the following steps: S1, generating a unique SN barcode for the optical storage integrated machine based on a predefined naming rule; S2, scanning the SN barcode to generate an original SN code stored in the SN solidification tool; S3, formatting and packaging the original SN code to obtain an SN string in standard format; S4, establishing an effective connection channel between the SN code solidification tool and the optical storage integrated machine; S5. Write the standard format SN string into the designated address range of the optical storage unit through the effective connection channel; S6. Detect the power-on signal of the integrated optical storage unit, and read the standard format SN string from the specified address range based on the power-on signal; S7. Perform a validity check on the standard format SN string and obtain the check result of the SN string; S8. If the verification result is successful, a registration request for the integrated optical storage machine is initiated to the remote cloud platform; otherwise, a temporary debugging identifier is generated and the temporary debugging identifier is used as the identity credential to enable the restricted operation mode.
[0006] In some of these embodiments, a unique serial number (SN) barcode is generated for the integrated optic and storage unit based on predefined naming rules, including: S1-1. Obtain the manufacturer identification information and encode it into a two-character fixed starting field; S1-2. After the starting field, generate a reserved field with three fixed values; S1-3. Obtain the rated power parameters of the integrated photovoltaic and energy storage unit and determine the corresponding equipment identification field; S1-4. Obtain the target sales region and hardware version of the integrated optical storage machine, and generate a two-digit version field; S1-5. Obtain the currently available five-digit incremental sequence number from the production sequence database and use it as the unique serial number field of the integrated optical storage unit; S1-6. Concatenate the starting field, reserved field, device type identifier, version field and serial number field in sequence to generate a complete original SN code.
[0007] In some embodiments, scanning the SN barcode to generate the original SN code stored in the SN curing fixture includes: S3-1. Obtain the fixed prefix string "SN:"; S3-2. Concatenate the fixed prefix string with the original SN code to generate an intermediate concatenated string; S3-3. Append a null character to the end of the concatenated string as a string terminator; S3-4. Treat the 20-byte data containing the prefix, original SN code, and end character as a standard format SN string; In some embodiments, an effective connection channel is established between the SN code curing fixture and the integrated optical storage unit, including: S4-1. Control the SN code curing fixture to continuously send a preset handshake request signal to the integrated optical storage unit; S4-2. Receive the handshake request signal and return a valid response signal to the SN curing fixture based on the handshake request signal; S4-3. Upon receiving a valid response signal, the serial communication link is locked as the valid connection channel; In some embodiments, based on the effective connection channel, a standard format SN string is written into a designated address range of the integrated optical storage device, including: S5-1. Determine the starting physical address and length of the specified address range; S5-2. Before writing, verify whether the specified address range is in a writable state; S5-3. Write the standard format SN string into the specified address range in batches according to byte order; S5-4. After all writes are completed, perform a readback verification operation; S5-5. After successful writing, return a write completion response to the SN code solidification fixture.
[0008] In some embodiments, a validity check is performed on the standard format SN string to obtain the check result of the SN string, including: S7-1. Extract the original SN code portion from the SN string in the standard format; S7-2. The original SN code is divided according to predefined field boundaries to obtain five sub-fields; S7-3. Perform rule validation on each subfield separately; S7-4. If all subfields pass the corresponding rule validation, the SN string is deemed to have passed validation; otherwise, the validation is deemed to have failed.
[0009] In some embodiments, a temporary debug identifier is generated, and the temporary debug identifier is used as an identity credential to enable a restricted operating mode, including: S8-1, Factory-set parameters for the integrated optical storage and data acquisition unit; S8-2. Generate a temporary debugging identifier based on the factory-set parameters; S8-3. Load the temporary debugging identifier into the operating context of the integrated optical storage machine as its identity credential to enable the restricted operating mode.
[0010] In some embodiments, a temporary debugging identifier is generated based on the factory-set parameters, including: S8-2-1. Concatenate the factory-set parameters into the original hardware string; S8-2-2. Perform a CRC16 check operation on the original hardware string to generate a 16-bit check code; S8-2-3. Convert the 16-bit check code into a 4-bit uppercase hexadecimal string as the basic identifier segment; S8-2-4. Extract the last 6 characters of the original hardware string as a device feature suffix; S8-2-5. Concatenate the basic identifier segment and the device feature suffix in sequence to generate a 10-digit temporary debugging identifier; In some embodiments, the last six characters of the original hardware string are extracted as a device feature suffix, including: S8-2-4-1. Convert each byte in the original hardware string into two hexadecimal characters to obtain a byte sequence of length L; S8-2-4-2. If the length L of the byte sequence is greater than or equal to 6, then the last 6 characters of the byte sequence are extracted and used as the device feature suffix. S8-2-4-3. If the length L of the byte sequence is less than 6, then zeros are padded to the front of the byte sequence until the total length is 6, and then the zero-padded sequence is used as the device feature suffix.
[0011] This invention provides a method for fixing and managing the serial number (SN) of an integrated optical storage device, which has the following beneficial effects: This invention generates an original serial number (SN) that conforms to predefined naming rules for the integrated photovoltaic and energy storage device, and encapsulates it into a standard format SN string. Then, it verifies the validity of the standard format SN string. If the verification passes, a registration request is initiated to the remote cloud platform. If the verification fails, the unique ID of the main control chip and / or the Ethernet MAC address are collected, concatenated into an original hardware string, and a CRC16 checksum is performed on this string to generate a 16-bit checksum. This checksum is converted into a 4-bit hexadecimal basic identifier segment, and the last 6 characters of the original hardware string are extracted as a device feature suffix. These are then concatenated to form a 10-bit temporary debugging identifier, which serves as the identity credential for enabling restricted operation mode. Therefore, even if the SN string verification fails, the integrated photovoltaic and energy storage device can still be identified and communication established. Attached Figure Description
[0012] Figure 1 This is a flowchart of a method for fixing and managing the SN code of an integrated optical storage device according to the present invention; Figure 2 This is a schematic diagram of the rule verification process described in this invention; Figure 3 This is a schematic diagram illustrating the construction process of an embodiment of the temporary debugging identifier described in this invention; Figure 4 This is a schematic diagram illustrating the construction process of another embodiment of the temporary debugging identifier described in this invention; Figure 5This is a schematic diagram of the conversion process for the feature suffix of the device described in this invention. Detailed Implementation
[0013] 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] First, the prior art and related concepts involved in the embodiments of the present invention will be described: CRC16 Checksum Operation: Cyclic Redundancy Check (CRC) is a method used to detect errors during data transmission or storage. CRC16 indicates that the generated checksum is 16 bits long. Its basic principle is to treat the data to be checked as a binary polynomial, divide it by a predefined generator polynomial, and the remainder is the CRC checksum. In embedded systems, CRC16 is often used to ensure the integrity of critical data. CRC-16 / CCITT-FALSE is a widely used variant of CRC16.
[0015] Example 1: This invention provides a method for fixing and managing the SN code of an integrated optical storage device. Figure 1 This is a flowchart of a method for fixing and managing the SN code of an integrated optical storage device according to the present invention. The process includes: S1. Generate a unique SN barcode for the integrated optical storage unit based on predefined naming rules; S2. Scan the SN barcode to generate the original SN code stored in the SN curing fixture; S3. Encapsulate the original SN code to obtain a standard format SN string; S4. Establish an effective connection channel between the SN code curing fixture and the integrated optical storage unit; S5. Write the standard format SN string into the designated address range of the optical storage unit through the effective connection channel; Specifically, the designated address range refers to a continuous 20-byte storage space in the EEPROM memory inside the optical storage unit, starting from physical address 0xFF80, which is dedicated to persistently storing the standard format SN string.
[0016] S6. Detect the power-on signal of the integrated optical storage unit, and read the standard format SN string from the specified address range based on the power-on signal; S7. Perform a validity check on the standard format SN string and obtain the check result of the SN string; S8. If the verification result is successful, a registration request for the integrated optical storage machine is initiated to the remote cloud platform; otherwise, a temporary debugging identifier is generated and the temporary debugging identifier is used as the identity credential to enable the restricted operation mode.
[0017] Specifically, the temporary identifier represents a unique debug ID generated by the device hardware parameters; it is used to maintain basic communication capabilities when SN verification fails, and supports remote fault diagnosis and on-site debugging.
[0018] In this embodiment, by integrating the SN code generation, solidification, verification and operation control process in a closed loop, the integrated photovoltaic storage machine can complete the identity legality determination upon first power-on and automatically enter the normal registration or restricted debugging state based on the determination result, thus avoiding invalid devices from accessing the cloud platform.
[0019] Example 2: See Figures 2 to 5 The technical solution that differs from that of Embodiment 1 in this Embodiment 2 is that it discloses the sub-steps of each process in Embodiment 1.
[0020] Specifically, in this embodiment, step S1 includes: S1-1. Obtain the manufacturer identification information and encode it into a two-character fixed starting field; Specifically, the starting field consists of two uppercase letters and serves as a manufacturer identification prefix. Its value is predefined in the SN code naming rules.
[0021] S1-2. After the starting field, generate a reserved field with three fixed values; Specifically, the reserved field can be represented as "000" as a reserved field for the SN code, which can be used for future expansion of functions or product line changes; S1-3. Obtain the rated power parameters of the integrated photovoltaic and energy storage unit and determine the corresponding equipment identification field; For example, if the rated power parameter is 6kW, then the equipment type is determined to be 06kW; if the rated power parameter is 10kW, then the equipment type is determined to be 10kW.
[0022] S1-4. Obtain the target sales region and hardware version of the integrated optical storage machine, and generate a two-digit version field; The first digit indicates the sales region label, such as "A" for the domestic version and "B" for the overseas version; the second digit indicates the hardware version label, such as "0" for the first batch and "1" for the second batch. S1-5. Obtain the currently available five-digit incremental sequence number from the production sequence database and use it as the unique serial number field of the integrated optical storage unit; Specifically, the production sequence database is represented by the device number table in the MES system, which is used to record the production sequence of each integrated optical storage unit to ensure that the SN code is unique under the same model.
[0023] S1-6. Concatenate the starting field, reserved field, device type identifier, version field and serial number field in sequence to generate a complete original SN code.
[0024] In this embodiment, the original SN code is generated by a five-segment structure of manufacturer identification, reserved space, power type, regional version and incremental serial number. This ensures that each integrated photovoltaic and energy storage unit obtains a globally unique serial number with clear field semantics during the production stage, providing a structured data foundation for subsequent automated identification and classification management.
[0025] Specifically, in this embodiment, step S3 includes: S3-1. Obtain the fixed prefix string "SN:"; Specifically, the fixed prefix string consists of four ASCII characters, where “S”, “N”, and “:” correspond to ASCII values 0x53, 0x4E, and 0x3A, respectively, and are used to quickly identify the data type as serial number information during the reading process.
[0026] S3-2. Concatenate the fixed prefix string with the original SN code to generate an intermediate concatenated string; Specifically, the splicing order is prefix first, followed by the original SN code, and all characters are represented using ASCII encoding to ensure cross-platform compatibility; Furthermore, the splicing process is completed in the memory buffer of the SN code solidification fixture, avoiding direct operation of the target memory.
[0027] S3-3. Append a null character to the end of the concatenated string as a string terminator; Specifically, the null character is the ASCII value 0x00, which is used to mark the end of the string and prevent the main program from accessing the string out of bounds during reading. S3-4. Treat the 20-byte data containing the prefix, original SN code, and end character as a standard format SN string; Specifically, the 20 bytes of data are organized in memory in the form of consecutive bytes, starting at address 0x0000, and sequentially as "SN:GL00006KW0A00001\0", with the last byte being 0x00; Furthermore, the standard format SN string is used to write the specified address range of the EEPROM of the optical storage device through the serial communication channel, and is available for the main program to read and verify after the device is started.
[0028] In this embodiment, by adding the prefix "SN:" and appending a null terminator before the original SN code, a 20-byte standard format SN string is formed, making the string conform to the string specification and correctly truncated by the reading logic that recognizes the null terminator.
[0029] Specifically, in this embodiment, step S4 includes: S4-1. Control the SN code curing fixture to continuously send a preset handshake request signal to the integrated optical storage unit; Specifically, the handshake request signal is a fixed byte sequence "0xAA 0x55 0x01", which is sent cyclically at a period of 100 milliseconds to wake up the integrated optical storage machine in bootloader mode.
[0030] S4-2. Receive the handshake request signal and return a valid response signal to the SN curing fixture based on the handshake request signal; Specifically, the response signal is generated by the bootloader program of the integrated optical storage device after receiving the handshake request, and is transmitted back through the serial interface. Its content is "0x55 0xAA 0x02". Furthermore, if no valid response is received within three consecutive transmission cycles, the connection is deemed to have failed and the operator is prompted to check the wiring.
[0031] S4-3. If a valid response signal is received, the communication link that receives the valid response signal is determined as the valid connection channel; It should be noted that the communication link refers to the physical or logical connection path between the SN code curing fixture and the integrated optical storage unit for transmitting handshake request and response signals; in this embodiment, this path is the signal connection channel. When the SN code curing fixture receives a valid response signal from the integrated optical storage unit, it indicates that the two parties have successfully established bidirectional communication, and at this time, the connection path is officially designated as the signal connection channel for subsequent SN string writing.
[0032] Specifically, in order to clearly provide feedback to the operator on the successful connection status, a human-machine interaction feedback mechanism will be triggered after a valid response signal is received. The human-machine interaction feedback mechanism includes: driving the built-in buzzer of the SN code solidification fixture to emit a single short beep, and controlling the running indicator light to flash alternately at a frequency of 200 milliseconds high level and 200 milliseconds low level, indicating that the SN code input preparation state has been entered.
[0033] Specifically, in this embodiment, step S5 includes: S5-1. Determine the starting physical address and length of the specified address range; Specifically, the designated address range is located on the last page of the EEPROM memory inside the optical storage integrated machine, with a starting physical address of 0xFF80 and a total length of 20 bytes, and is used exclusively for storing SN string data.
[0034] S5-2. Before writing, verify whether the specified address range is in a writable state; Specifically, the status bits of the EEPROM control register are read to determine whether a write protection flag exists; if it exists, the bootloader program temporarily clears the write protection enable bit to ensure that the write operation can be performed.
[0035] S5-3. Write the standard format SN string into the specified address range in batches according to byte order; Specifically, 4 bytes are written each time, and the entire 20 bytes of data are transmitted in 5 separate writes; after each write, the EEPROM waits for the internal programming cycle to complete.
[0036] S5-4. After all writes are completed, perform a readback verification operation; Specifically, 20 bytes of data are reread from the specified address range and compared byte by byte with the original SN string; if all bytes are consistent, the write is considered successful; otherwise, a retry mechanism is triggered, with a maximum of three attempts.
[0037] S5-5. After successful writing, return a write completion response to the SN code solidification fixture.
[0038] In this embodiment, by writing in batches and performing readback comparison verification, it is ensured that the 20-byte SN string is completely and accurately stored in the specified address range of EEPROM. Even if voltage fluctuations or communication interference occur during the writing process, the retry mechanism can ensure the persistence and consistency of data.
[0039] Specifically, in this embodiment, step S7 includes: S7-1. Extract the original SN code portion from the SN string in the standard format; Specifically, the original SN code portion consists of 16 consecutive bytes of data after removing the prefix "SN:" and the trailing null character.
[0040] S7-2. The original SN code is divided according to predefined field boundaries to obtain five sub-fields; Specifically, the five subfields are as follows: start field (position 0-1), reserved field (position 2-4), device type field (position 5-8), version field (position 9-10), and serial number field (position 11-15).
[0041] S7-3. Perform rule validation on each subfield separately; The rule verification includes: Does the starting field consist of two uppercase letters? Is the reserved field equal to "000"? Does the device type field belong to the preset power identifier set {"06KW", "10KW"}? Check if the first character of the version field is "A" or "B", and if the second character is a numeric character; The serial number field consists of five numeric characters, and not all of them are zero.
[0042] S7-4. If all subfields pass the corresponding rule validation, the SN string is deemed to have passed validation; otherwise, the validation is deemed to have failed.
[0043] In this embodiment, by segmenting the standard format SN string according to predefined field boundaries and verifying its character composition and value range item by item, it can be determined whether the SN string conforms to the preset naming rules.
[0044] Specifically, in this embodiment, the steps for generating a temporary debug identifier include: S8-1, Factory-set parameters for the integrated optical storage and data acquisition unit; Specifically, the factory-fixed parameters include at least one of the main control chip's unique ID and the Ethernet MAC address, ensuring that a unique identifier can still be generated even if the SN is missing.
[0045] S8-2. Generate a temporary debugging identifier based on the factory-set parameters; Specifically, a fixed-length string is generated by truncating the first 16 characters using CRC16 or MD5, and used as a temporary identity credential.
[0046] S8-3. Load the temporary debugging identifier into the operating context of the integrated optical storage machine as its identity credential to enable the restricted operating mode.
[0047] Specifically, the restricted operation mode means that the integrated photovoltaic and energy storage unit is limited to performing only the following operations: Respond to firmware upgrade commands; Report device status to local debugging tools; Core business functions such as grid-connected power generation, energy dispatch, and cloud platform registration are prohibited.
[0048] In this embodiment, a temporary debugging identifier is generated based on the factory fixed parameters when the SN verification fails, and the temporary debugging identifier is used as an identity credential to enable the restricted operation mode. This allows the device to respond to local debugging commands even when it cannot complete cloud registration, supporting on-site troubleshooting and firmware repair, and avoiding the need for the entire device to be returned to the factory.
[0049] Furthermore, step S8-2 also includes: S8-2-1. Concatenate the factory-set parameters into the original hardware string; Specifically, when both the unique ID of the main control chip and the Ethernet MAC address exist, the strings are concatenated in the order of "chip ID + MAC address"; if only one of them exists, that item is directly used as the original hardware string.
[0050] S8-2-2. Perform a CRC16 check operation on the original hardware string to generate a 16-bit check code; Specifically, the CRC16 check operation uses the standard CRC-16 / CCITT-FALSE algorithm, with an initial value of 0xFFFF, and the input data is processed in byte order.
[0051] S8-2-3. Convert the 16-bit check code into a 4-bit uppercase hexadecimal string as the basic identifier segment; S8-2-4. Extract the last 6 characters of the original hardware string as a device feature suffix; S8-2-5. Concatenate the basic identifier segment and the device feature suffix in sequence to generate a 10-digit temporary debugging identifier; For example, if the basic identifier segment is “A3F1” and the device feature suffix is “B2C9D0”, then the generated temporary debugging identifier is “A3F1B2C9D0”.
[0052] In this embodiment, a 10-bit traceable temporary debugging identifier is generated by concatenating the chip ID and MAC address and calculating CRC16 as the basic identifier segment, and then adding a suffix with the end feature of the original string. This ensures the uniqueness of the identifier between different devices while retaining some hardware information for easy manual identification.
[0053] Furthermore, step S8-2-4 also includes: S8-2-4-1. Convert each byte in the original hardware string into two hexadecimal characters to obtain a byte sequence of length L; Specifically, the conversion process uses big-endian format to ensure cross-platform consistency.
[0054] S8-2-4-2. If the length L of the byte sequence is greater than or equal to 6, then the last 6 characters of the byte sequence are extracted and used as the device feature suffix. S8-2-4-3. If the length L of the byte sequence is less than 6, then pad the beginning of the byte sequence with zeros until the total length is 6, and then use the zero-padding sequence as the device feature suffix. For example, if the original byte sequence is "1A3F" and the length L=4, then after padding with zeros, it becomes "001A3F", which is used as a device feature suffix.
[0055] In this embodiment, the original hardware string is uniformly converted into a byte sequence and padded with zeros to align to a length of 6 bits. This ensures that the extracted device feature suffix is always a fixed 6-character format, regardless of the length of the input parameters, thus avoiding the confusion of the debug identifier structure due to inconsistent truncation lengths.
[0056] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means.
[0057] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0058] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0059] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for fixing and managing SN codes in an integrated optical storage system, characterized in that, include: S1. Generate a unique SN barcode for the integrated optical storage unit based on predefined naming rules; S2. Scan the SN barcode to generate the original SN code stored in the SN curing fixture; S3. Encapsulate the original SN code to obtain a standard format SN string; S4. Establish an effective connection channel between the SN code curing fixture and the integrated optical storage unit; S5. Write the standard format SN string into the designated address range of the optical storage unit through the effective connection channel; S6. Detect the power-on signal of the integrated optical storage unit, and read the standard format SN string from the specified address range based on the power-on signal; S7. Perform a validity check on the standard format SN string and obtain the check result of the SN string; S8. If the verification result is successful, a registration request for the integrated optical storage machine is initiated to the remote cloud platform; otherwise, a temporary debugging identifier is generated and the temporary debugging identifier is used as the identity credential to enable the restricted operation mode.
2. The method for SN code fixing and management for an integrated optical storage device according to claim 1, characterized in that, Based on predefined naming rules, a unique serial number (SN) barcode is generated for the integrated optic and storage unit, including: S1-1. Obtain the manufacturer identification information and encode it into a two-character fixed starting field; S1-2. After the starting field, generate a reserved field with three fixed values; S1-3. Obtain the rated power parameters of the integrated photovoltaic and energy storage unit and determine the corresponding equipment identification field; S1-4. Obtain the target sales region and hardware version of the integrated optical storage machine, and generate a two-digit version field; S1-5. Obtain the currently available five-digit incremental sequence number from the production sequence database and use it as the unique serial number field of the integrated optical storage unit; S1-6. Concatenate the starting field, reserved field, device type identifier, version field and serial number field in sequence to generate a complete original SN code.
3. The method for SN code solidification and management for an integrated optical storage device according to claim 1, comprising scanning the SN barcode and generating the original SN code stored in the SN solidification fixture, including: S3-1. Obtain the fixed prefix string "SN:"; S3-2. Concatenate the fixed prefix string with the original SN code to generate an intermediate concatenated string; S3-3. Append a null character to the end of the concatenated string as a string terminator; S3-4. Treat the 20-byte data containing the prefix, original SN code, and end character as a standard format SN string.
4. The SN code fixing and management method for an integrated photovoltaic and energy storage system according to claim 1, comprising establishing an effective connection channel between the SN code fixing fixture and the integrated photovoltaic and energy storage system, including: S4-1. Control the SN code curing fixture to continuously send a preset handshake request signal to the integrated optical storage unit; S4-2. Receive the handshake request signal and return a valid response signal to the SN curing fixture based on the handshake request signal; S4-3. If a valid response signal is received, the communication link that receives the valid response signal is determined as the valid connection channel.
5. The method for SN code fixing and management for an integrated optical-storage system according to claim 1, wherein, based on the effective connection channel, a standard format SN string is written into a specified address range of the integrated optical-storage system, comprising: S5-1. Determine the starting physical address and length of the specified address range; S5-2. Before writing, verify whether the specified address range is in a writable state; S5-3. Write the standard format SN string into the specified address range in batches according to byte order; S5-4. After all writes are completed, perform a readback verification operation; S5-5. After successful writing, return a write completion response to the SN code solidification fixture.
6. The method for SN code fixing and management for an integrated optical storage device according to claim 5, characterized in that, Perform a validity check on the standard format SN string and obtain the validation result of the SN string, including: S7-1. Extract the original SN code portion from the SN string in the standard format; S7-2. The original SN code is divided according to predefined field boundaries to obtain five sub-fields; S7-3. Perform rule validation on each subfield separately; S7-4. If all subfields pass the corresponding rule validation, the SN string is deemed to have passed validation; otherwise, the validation is deemed to have failed.
7. The method for SN code fixing and management for an integrated optical storage device according to claim 6, characterized in that, Generate a temporary debug identifier and use it as credentials to enable restricted run mode, including: S8-1, Factory-set parameters for the integrated optical storage and data acquisition unit; S8-2. Generate a temporary debugging identifier based on the factory-set parameters; S8-3. Load the temporary debugging identifier into the operating context of the integrated optical storage machine as its identity credential to enable the restricted operating mode.
8. The method for SN code fixing and management for an integrated optical storage device according to claim 7, characterized in that, Based on the factory-set parameters, a temporary debugging identifier is generated, including: S8-2-1. Concatenate the factory-set parameters into the original hardware string; S8-2-2. Perform a CRC16 check operation on the original hardware string to generate a 16-bit check code; S8-2-3. Convert the 16-bit check code into a 4-bit uppercase hexadecimal string as the basic identifier segment; S8-2-4. Extract the last 6 characters of the original hardware string as a device feature suffix; S8-2-5. Concatenate the basic identifier segment and the device feature suffix in sequence to generate a 10-digit temporary debugging identifier.
9. The method for SN code fixing and management for an integrated optical storage device according to claim 8, characterized in that, Extract the last 6 characters of the original hardware string as a device feature suffix, including: S8-2-4-1. Convert each byte in the original hardware string into two hexadecimal characters to obtain a byte sequence of length L; S8-2-4-2. If the length L of the byte sequence is greater than or equal to 6, then the last 6 characters of the byte sequence are extracted and used as the device feature suffix. S8-2-4-3. If the length L of the byte sequence is less than 6, then zeros are padded to the front of the byte sequence until the total length is 6, and then the zero-padded sequence is used as the device feature suffix.
Citation Information
Patent Citations
SN bar code management method and system
CN111104993A