Device programming method, device programming system and computer device

By obtaining the device serial number and verifying it using a preset error-proofing mechanism, the programming and testing parameters are determined, enabling efficient batch programming and testing of the devices. This solves the problems of low efficiency and error-proneness in existing technologies and supports parallel operation of multiple devices.

CN122431685APending Publication Date: 2026-07-21SHENZHEN FEIYOUQUE NEW ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN FEIYOUQUE NEW ENERGY TECH CO LTD
Filing Date
2026-03-24
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, the equipment programming process is inefficient and prone to errors, cannot effectively prevent errors, and cannot support parallel programming and testing of multiple devices, which severely restricts equipment production capacity.

Method used

By obtaining the original device's serial number, a preset serial number error-proofing mechanism is used for verification to determine the target serial number. Based on the target serial number, the programming and testing parameters are determined. Batch programming and testing are then performed using the programming and testing window, achieving efficient error prevention for the device.

Benefits of technology

It improves the efficiency of device programming and testing, ensures the correctness of batch programming and testing, reduces human error, and supports parallel operation of multiple devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431685A_ABST
    Figure CN122431685A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a device burning method, a device burning system and a computer device, comprising: obtaining an original serial number corresponding to an original device; checking the original serial number by using a preset serial number foolproof mechanism to determine a target serial number corresponding to the original device; determining a device material number corresponding to the target serial number based on the target serial number, and determining a burning parameter according to the device material number; burning the original device in a burning test window based on the burning parameter to determine a burned device; determining a target parameter table based on the device material number, and testing the burned device in the burning test window based on the target parameter table to determine a device test result. The method can effectively prevent errors of the original serial number by using the preset serial number foolproof mechanism, and can improve the burning and testing efficiency of the device by batch burning and testing the original devices corresponding to multiple target serial numbers, thereby achieving the purpose of efficiently and effectively preventing errors of batch burning and testing of the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of device programming technology, and in particular to a device programming method, a device programming system, and a computer device. Background Technology

[0002] With the acceleration of the global energy transition, the demand for data acquisition and monitoring equipment in photovoltaic-storage-charging systems (PV-SGC-CSCEC), the core of energy conversion, is increasing rapidly. In these systems, data acquisition and monitoring equipment require programming and testing. Current technologies typically require manual configuration of parameters, firmware programming, and functional testing of these devices. This process is not only disjointed and inefficient but also highly susceptible to human error, making effective error prevention impossible. Existing technologies often employ a single-machine, single-station model with limited test ports, failing to support parallel programming and testing of multiple devices and severely restricting production capacity. Therefore, how to perform efficient and error-proof batch programming and testing of equipment is a pressing technical problem that needs to be solved. Summary of the Invention

[0003] This application provides a device programming method, a device programming system, and a computer device, aiming to improve the technical problem of efficient and effective error-proof batch programming and testing of devices.

[0004] A device programming method, comprising: Obtain the original serial number corresponding to the original device; A preset serial number error prevention mechanism is used to verify the original serial number to determine the target serial number corresponding to the original device; Based on the target serial number, determine the device part number corresponding to the target serial number, and determine the programming parameters according to the device part number; Based on the programming parameters, the original device is programmed in the programming test window to determine the programmed device. Based on the device part number, a target parameter table is determined. Based on the target parameter table, the device is tested after programming in the programming test window, and the device test results are determined. 。 Preferably, the preset serial number error prevention mechanism includes: If the original serial number contains a NULL character and / or the original serial number is not arranged in the preset order, an error will be reported and all original serial numbers in the current burning station will be cleared. If the original serial number contains spaces, then the original serial number will not be entered. If the original serial number is not in the current burning station and / or the original number length of the original serial number does not reach the preset number length, then the original serial number is cleared.

[0005] Preferably, the programming parameters include the chip type, flash memory size, flash memory mode, flash memory frequency, firmware path, offset address, programming baud rate, and programming COM port of the original device.

[0006] Preferably, the step of programming the original device in the programming test window based on the programming parameters to determine the programmed device includes: Perform a program erase process on the original device to determine the device after program erase; The device after program erasure is programmed using the programming parameters and the preset programming error prevention mechanism in the programming test window to determine the programmed device.

[0007] Preferably, the preset programming error prevention mechanism includes: Repeated burning is prohibited; After the flashing process is complete, you are only allowed to reset the flashing program or test the flashed device. If an error occurs in the serial number station of the device after program erasure and / or an error occurs in the COM status during the burning process, the burning process will be aborted. Upon successful programming, the corresponding programming success information will be uploaded to the Manufacturing Execution System. If the burning process fails, the burning process will be stopped, or the device after the program has been erased will be re-burned, and the burning result of the failed burning will be recorded in the system log.

[0008] Preferably, the step of testing the programmed device in the programming test window based on the target parameter table and determining the device test results includes: Based on the target parameter table, generate test instructions and corresponding test items for the test instructions; Based on the test items, the device after programming is tested in the programming test window to determine the device test results.

[0009] Preferably, the step of testing the programmed device in the programming test window according to the test items and determining the device test results includes: If the test item is a read instruction string, then the read instruction string is converted into read communication data and the read communication data is sent to the programmed device. If the key parameters corresponding to the programmed device can be read, then the device test result is determined to be a successful test. If the test item is a write instruction string, then the write instruction string is converted into write communication data and the write communication data is sent to the programmed device. If the write success data is received from the programmed device, then the device test result is determined to be a successful test. If the test item is a delay waiting time, then a delay operation is performed according to the delay waiting time. If the delay can be performed according to the delay waiting time, then the device test result is determined to be a successful test.

[0010] A device programming system includes an original serial number acquisition module, a serial number error prevention processing module, a programming configuration module, a programming module, and a test execution module; The original serial number acquisition module is used to acquire the original serial number corresponding to the original device; The serial number error prevention processing module is used to process the original serial number using a preset serial number error prevention mechanism to determine the target serial number corresponding to the original device; The programming configuration module determines the device part number corresponding to the target serial number based on the target serial number, and determines the programming parameters according to the device part number. The programming module, based on the programming parameters, programs the original device in the programming test window to determine the programmed device. The test execution module determines a target parameter table based on the device part number, and then tests the programmed device in the programming test window based on the target parameter table to determine the device test results.

[0011] Preferably, the device programming system further includes a barcode scanning module for scanning the original device to determine the original serial number corresponding to the original device.

[0012] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the above-described device programming method.

[0013] The device programming method, system, and computer provided in this embodiment acquire the original serial numbers of multiple original devices in batches. A preset serial number error-proofing mechanism is used to verify the received original serial numbers, accurately obtaining target serial numbers that conform to the mechanism. This achieves error-proof batch management of the original serial numbers, which is highly efficient. Based on programming parameters, the original devices are programmed in a programming test window to determine the programmed device. Based on the target parameter table, the programmed device is tested in the same window to determine the test results, achieving the goal of batch programming and testing of multiple original devices, which is highly efficient. This method effectively prevents errors by using a preset serial number error-proofing mechanism, avoiding programming based on incorrect serial numbers, improving programming accuracy. Batch programming and testing of original devices corresponding to multiple target serial numbers effectively improves programming and testing efficiency, achieving the goal of efficient and error-proof batch programming and testing of devices. Attached Figure Description

[0014] Figure 1 This is a flowchart of a device programming method provided in an embodiment of this application; Figure 2 This is a flowchart of a device programming method provided in another embodiment of this application; Figure 3 This is a flowchart of a device programming method provided in another embodiment of this application; Figure 4 This is a flowchart of a device programming method provided in another embodiment of this application; Figure 5 This is a structural diagram of the device programming system provided in the embodiments of this application; Figure 6 This is a structural diagram of the computer device provided in the embodiments of this application; Figure 7 This is a schematic diagram of a programming test window provided in an embodiment of this application; Figure 8 This is a schematic diagram of the recording interface of a manufacturing execution system provided in an embodiment of this application. Detailed Implementation

[0015] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0016] This application provides a device programming method, comprising: obtaining the original serial number corresponding to the original device; verifying the original serial number using a preset serial number error-proofing mechanism to determine the target serial number corresponding to the original device; determining the device part number corresponding to the target serial number based on the target serial number, and determining programming parameters based on the device part number; programming the original device in a programming test window based on the programming parameters to determine the programmed device; determining a target parameter table based on the device part number, and testing the programmed device in a programming test window based on the target parameter table to determine the device test result. This method effectively prevents errors by using a preset serial number error-proofing mechanism to prevent programming based on erroneous original serial numbers, thereby improving the programming accuracy. For batch programming and testing of original devices corresponding to multiple target serial numbers, it can effectively improve the efficiency of device programming and testing, achieving the goal of efficient and effective error-proof batch programming and testing of devices.

[0017] The device programming method provided in this application embodiment can be used to perform batch programming and testing of devices such as data acquisition units and inverters used in the photovoltaic energy storage and charging system. It can effectively improve the programming and testing efficiency of devices and achieve the purpose of efficient and error-proof batch programming and testing of devices such as data acquisition units and inverters.

[0018] In one embodiment, such as Figure 1 As shown, a device programming method is provided, which is applied to... Figure 6 Taking a computer device as an example, the explanation includes the following steps: S101: Obtain the original serial number corresponding to the original device; S102: The original serial number is verified using a preset serial number error-proofing mechanism to determine the target serial number corresponding to the original device; S103: Based on the target serial number, determine the device part number corresponding to the target serial number, and determine the programming parameters according to the device part number; S104: Based on the programming parameters, program the original device in the programming test window to determine the device after programming; S105: Based on the equipment part number, determine the target parameter table. Based on the target parameter table, test the burned equipment in the burning test window and determine the equipment test results.

[0019] Here, "original device" refers to the device that needs to be programmed. "Original serial number" refers to the unprocessed serial number corresponding to the original device.

[0020] As an example, in step S101, the computer device acquires the original serial numbers corresponding to the original devices to be programmed in batches. In this example, the computer device controls the TCP server to start and receives the original serial numbers of multiple original devices sent in batches by the client. The original serial number can be an SN (Serial Number). In this example, the original serial number can be obtained by scanning the original device with the client's camera, or it can be directly entered into the client's database. In this example, when the original device is a data acquisition unit in the optical storage and charging system, the computer device acquires the original serial numbers corresponding to the data acquisition units in batches. For example, the original serial number is WA23201000, where WA represents the model of the original device, 23 represents the year of manufacture, 20 represents the 20th week of manufacture in that year, and 1000 represents the production serial number of the original device, indicating that this original device is the 1000th unit manufactured.

[0021] Among them, the preset serial number error prevention mechanism refers to the preset mechanism for error prevention verification of the original serial number, so as to effectively prevent errors in the original serial number.

[0022] As an example, in step S102, the computer device uses a preset serial number error prevention mechanism to perform error prevention verification on the received original serial number, accurately obtaining the target serial number that conforms to the preset serial number error prevention mechanism. For example, the preset serial number error prevention mechanism limits the number length of the original serial number to a fixed value. The computer device judges the number length of the received original serial number, excludes the original serial number whose number length is not the fixed value, and determines the original serial number whose number length is the fixed value as the target serial number, so as to effectively prevent errors in the original serial number, avoid burning based on the incorrect original serial number, and improve the accuracy of burning.

[0023] Here, the device part number refers to the unique number corresponding to the original equipment (OEM) used to identify and manage the programming parameters. The configuration file is a pre-configured file containing the mapping relationship between the device part number and the programming parameters. The programming parameters are the parameters used to program the original equipment.

[0024] As an example, in step S103, the computer device calls the interface corresponding to the target serial number in the Manufacturing Execution System (MES system) according to the target serial number to obtain the equipment part number corresponding to the target serial number, parses the equipment part number to obtain the burning parameters corresponding to the equipment part number, so as to burn the original equipment according to the burning parameters in the future.

[0025] The programming and testing form refers to the interface used for programming and testing the device. The programmed device refers to the device after programming the original device.

[0026] As an example, in step S104, the computer device jumps to and opens the programming test window corresponding to the device part number. According to the programming parameters corresponding to each COM port in the programming test window, the original device corresponding to each COM port is programmed. After programming is completed, the programmed device corresponding to each COM port is obtained, realizing the purpose of batch programming of multiple original devices, which is more efficient. Figure 7 This is a schematic diagram of the programming test window. Figure 7 In the diagram, the blank box corresponding to each COM port is used to fill in the target serial number corresponding to that COM port. Figure 7 As can be seen, the programming test window includes multiple COM ports, each COM port corresponding to a target serial number and corresponding programming parameters. By controlling each COM port to program and test the corresponding original device, the purpose of batch programming and testing of the device can be achieved, which can effectively improve the efficiency of device programming and testing.

[0027] The target parameter table refers to the parameter table used for device testing. The device test results characterize whether the original device was successfully programmed. Device test results include two types: test pass and test fail. A test pass indicates successful programming of the original device. A test fail indicates a programming failure of the original device.

[0028] As an example, in step S105, the computer device reads the parameters corresponding to the device part number from a pre-set file according to the device part number to form a target parameter table. Based on the target parameter table corresponding to each programmed device, the computer device is tested sequentially through each COM port of the programming test window. Based on the color indication corresponding to each COM port, the test result of each programmed device is determined to be either a pass or a fail. For example, if the color corresponding to the COM port is green, the test result is determined to be a pass; if the color corresponding to the COM port is red, the test result is determined to be a fail.

[0029] In this embodiment, by batch acquiring the original serial numbers of multiple original devices, a preset serial number error-proofing mechanism is used to verify the received original serial numbers, accurately obtaining the target serial numbers that conform to the preset serial number error-proofing mechanism. This achieves error-proof batch management of the original serial numbers, which is relatively efficient. Based on the programming parameters, the original devices are programmed in the programming test window to determine the programmed device. Based on the target parameter table, the programmed device is tested in the programming test window to determine the device test results. This achieves the purpose of batch programming and testing of multiple original devices, which is relatively efficient. This method effectively prevents errors by using a preset serial number error-proofing mechanism to prevent programming based on erroneous original serial numbers, improving the programming accuracy. Batch programming and testing of original devices corresponding to multiple target serial numbers can effectively improve the programming and testing efficiency of devices, achieving the goal of efficient and effective error-proof batch programming and testing of devices.

[0030] In another embodiment, after step S104, the device programming method further includes: S1041: Upload the target serial number and corresponding programming parameters to the system shared database; S1042: Based on the pre-configured machine ID, production line ID, workstation ID, and operator ID, determine the target API interface corresponding to the Manufacturing Execution System, and upload the target serial number and programming parameters to the Manufacturing Execution System through the target API interface.

[0031] In this context, a shared database refers to a public database accessible to users, used to record the programming and testing of equipment to facilitate traceable management of local data. A Manufacturing Execution System (MES) is a system used to manage the equipment's production process. In this example, the MES is used to manage the programming and testing processes.

[0032] As an example, in step S1041, after the computer device determines that the original device has been successfully programmed, it obtains the programmed device and uploads the target serial number and programming parameters of the programmed device to the system's shared database to facilitate local traceability management of the programmed data.

[0033] Among them, the Machine ID refers to the ID of the computer device used to program the original equipment. The Production Line ID refers to the ID of the production line corresponding to the production process of the original equipment. In other words, to perform batch programming and testing, different production lines need to be set up for different types of equipment. For example, the production lines for inverters and data acquisition units correspond to different IDs to distinguish between different types of equipment. The Workstation ID identifies the workstation where the computer device is located. The Operator ID identifies the personnel operating the original equipment and computer devices. The Target API Interface refers to the peripheral API interface used to upload programming parameters.

[0034] As an example, in step S1042, after the computer device determines that the original equipment has been programmed, it obtains the machine ID, production line ID, workstation ID, and operator ID of the original equipment that were pre-configured before programming. Based on the machine ID, production line ID, workstation ID, and operator ID, it determines the peripheral API interface required for uploading to the Manufacturing Execution System (MES). This peripheral API interface is designated as the target API interface. The target serial number and programming parameters are uploaded to the MES through the target API interface to control the production process of the equipment and achieve traceable management of the programmed data.

[0035] In this embodiment, the target serial number and burning parameters of the device after burning are uploaded to the system's shared database to enable local traceability management of the burning data. The target serial number and burning parameters are uploaded to the manufacturing execution system through the target API interface to control the device's production process, achieve traceability management of the burning data, and avoid data silos.

[0036] In another embodiment, after step S105, the device programming method further includes: S1051: Upload the target serial number, target parameter table, and equipment test results to the system shared database. S1052: Based on the pre-configured file, the target serial number, target parameter table and equipment test results are uploaded to the manufacturing execution system.

[0037] As an example, in step S1051, after determining the device test results, the computer device uploads the target serial number, target parameter table and device test results corresponding to each burned device to the system shared database so as to realize local traceability management of test data.

[0038] In this context, a pre-configured configuration file refers to a file pre-configured for uploading data from the equipment testing process to the Manufacturing Execution System (MES). In this example, the pre-configured configuration file includes a .ini format configuration file.

[0039] As an example, in step S1052, after determining the equipment test results, the computer device, according to a pre-configured file, determines the API interface required for data upload. Through this API interface, the target serial number, target parameter table, and equipment test results are uploaded to the Manufacturing Execution System (MES). This facilitates traceable and precise control over equipment information, status, and test results, preventing data silos caused by the disconnect between the equipment testing process and the MES, and enabling data interaction. Figure 8 It can be seen that the manufacturing execution system records the mapping relationship between the target serial number, test time, and equipment test results, thereby achieving traceable and precise control of information.

[0040] In one embodiment, the preset serial number error prevention mechanism includes: S1021: If the original serial number contains a NULL character and / or the original serial number is not arranged in the preset order, an error will be reported and all original serial numbers in the current burning station will be cleared; S1022: If the original serial number contains spaces, then the original serial number is not entered; S1023: If the original serial number is not in the current burning station and / or the original serial number's original number length does not reach the preset number length, then clear the original serial number.

[0041] Here, "current programming station" refers to the station corresponding to the production line where the original equipment needs to be programmed. For example, the current programming station could be the programming station corresponding to the data acquisition unit, or the programming station corresponding to the inverter equipment. Different original equipment production lines correspond to different current programming stations. "Original number length" refers to the length of the original serial number. "Preset number length" refers to the preset length value used to determine the length of the original serial number.

[0042] As an example, in step S1021, when the computer device performs batch verification of the original serial numbers using the preset serial number error prevention mechanism, if it determines that there is an original serial number in the current burning station containing the NULL character, it reports an error and clears all the original serial numbers in the current burning station; if it determines that the original serial numbers in the current burning station are not arranged in the preset order, it reports an error and clears all the original serial numbers in the current burning station; if it determines that there is an original serial number in the current burning station containing the NULL character and the original serial numbers in the current burning station are not arranged in the preset order, it reports an error and clears all the original serial numbers in the current burning station.

[0043] As an example, in step S1022, when the computer device performs batch verification of the original serial numbers using a preset serial number error prevention mechanism, if it determines that at least one original serial number in the batch contains a space, it will not enter all original serial numbers containing spaces.

[0044] As an example, in step S1023, when the computer device performs batch verification of the original serial numbers using the preset serial number error-proofing mechanism, if it determines that an original serial number is not in the current programming station, it clears the original serial number that is not in the current programming station. If it determines that the original number length of an original serial number does not reach the preset number length, it clears the original serial number that does not reach the preset number length. If it determines that an original serial number is not in the current programming station and the original number length of the original serial number does not reach the preset number length, it clears the original serial number.

[0045] In this embodiment, the original serial number is verified by a variety of preset serial number error prevention mechanisms, which can accurately obtain the target serial number that conforms to the preset serial number error prevention mechanism, and realize error-proof batch management of the original serial number, which is more efficient.

[0046] In one embodiment, the programming parameters include the chip type, flash memory size, flash memory mode, flash memory frequency, firmware path, offset address, programming baud rate, and programming COM port of the original device.

[0047] Here, chip type refers to the type of chip in the original device. Flash memory size refers to the capacity of the flash memory in the original device. Flash memory mode refers to the flash memory mode during programming; in this example, "dio" mode is used. Flash memory frequency refers to the frequency at which the flash memory is programmed. Firmware path refers to the path used to program the original device. Offset address refers to the offset of the programming address relative to the base address. Programming baud rate refers to the baud rate used to program the original device. Programming COM port refers to the COM port corresponding to the target serial number of the original device to be programmed.

[0048] As an example, the computer equipment parses the device part number to determine the original device's chip type, flash memory size, flash memory mode, flash memory frequency, firmware path, offset address, programming baud rate, and programming COM port, etc. This allows for efficient programming of the original device based on the programming parameters. This method does not rely on manual labor, which not only effectively reduces reliance on operators and personnel training costs, but also effectively reduces the probability of programming parameters being misconfigured, increases the reliability of subsequent programming tests, and improves equipment quality.

[0049] In one embodiment, such as Figure 2 As shown, step S105, which involves programming the original device based on the programming parameters in the programming test window to determine the programmed device, includes: S201: Perform program erasure on the original equipment and determine the equipment after program erasure; S202: Using the programming parameters and preset programming error prevention mechanism in the programming test window, the device after program erasure is programmed to determine the device after programming.

[0050] Among them, program erasure processing refers to the process of initializing the program in the original device before burning.

[0051] As an example, in step S201, the computer device erases the existing program in the chip (Flash) of the original device, clearing the program from the original device and determining the device after program erasure. In this example, program erasure is a fixed step before programming the original device to ensure the reliability of the programming process. In this example, the computer device uses the programming tool to call "esptool.exe" to send build instructions to erase the program. Performing program erasure before programming ensures that if a problem occurs during programming and reprogramming is required, issues such as Flash storage data will not affect the next programming result, and it also facilitates rework operations.

[0052] As an example, in step S202, after the computer device determines the device after program erasure, it programs the parameters to the device after program erasure through the COM port corresponding to each device in the programming test window under the preset programming error prevention mechanism, thereby obtaining the programmed device. The programmed device is programmed sequentially for each COM port corresponding to the device after program erasure, thereby realizing the batch programming of the device and achieving the goal of moving from single-point programming to batch automated programming.

[0053] In this embodiment, program erasure is performed as a fixed step before burning the original device to ensure the reliability of the burning process. Batch burning of devices is carried out through a preset burning error prevention mechanism, which not only reduces the error rate during the burning process, but also enables efficient burning.

[0054] In another embodiment, after step S202, that is, after determining the burned device, the device burning method further includes: controlling the burned device to switch from download mode to run mode.

[0055] As an example, after identifying the device to be programmed, the computer sends a communication command to the programmed device, controlling it to switch directly from download mode to running mode. Understandably, during the device programming process, the original device is in download mode; after programming is complete, the programmed device is obtained. At this point, controlling the programmed device to switch from download mode to running mode eliminates the need for a physical power-off restart, allowing for direct control of the programmed device to enter the testing process, saving time and improving efficiency.

[0056] In one embodiment, the preset programming error prevention mechanism includes: Repeated burning is prohibited; After the flashing process is complete, you are only allowed to reset the flashing program or test the flashed device. If an error occurs in the serial number station of the device after program erasure and / or an error occurs in the COM status during the burning process, the burning process will be aborted. Upon successful programming, the corresponding programming success information will be uploaded to the Manufacturing Execution System. If the burning process fails, the burning process will be stopped, or the device after the program has been erased will be re-burned, and the burning result of the failed burning will be recorded in the system log.

[0057] Here, "Serial Number Station" refers to the station corresponding to the target serial number of the original device. Different types of devices correspond to different programming stations, and the identifiers of the serial numbers for different types of devices are not the same. By determining the serial number identifier through the serial number station, it is possible to determine whether the device corresponding to the target serial number is being programmed at the correct programming station. "COM Status" refers to the status of the COM port in the programming test window.

[0058] As an example, during the process of burning the device according to the burning parameters, the computer device monitors the burning progress. When the burning progress reaches 100%, the burning is considered complete and the burning process is stopped to avoid repeated burning.

[0059] As an example, after determining that the burning process is complete and the burned device is obtained, the computer device only allows resetting the burning program, re-burning the burned device, and testing the burned device to improve the efficiency of burning and testing the device.

[0060] As an example, during the device programming process, the serial number station and COM status of the target serial number of the device after the program is erased are monitored. If an error is detected in the serial number station, the programming process is stopped; if an error is detected in the COM status, the programming process is stopped; if both the serial number station and COM status are incorrect, the programming process is stopped. Understandably, different devices correspond to different serial number stations. For example, for the target serial number WA23201000, WA is used to determine the programming station corresponding to the data acquisition unit. If the target serial number of a device is not WA, a serial number station error is determined, and the programming process should be stopped immediately to prevent errors during programming and ensure programming accuracy and efficiency. Similarly, if an error is detected in the COM status corresponding to a device, a programming error is determined, and the programming process needs to be stopped to prevent errors during programming and ensure programming accuracy.

[0061] As an example, when a computer device determines that the device has been successfully flashed after program erasure, it uploads the information corresponding to the successful flashing to the Manufacturing Execution System (MES) to achieve traceability of information data.

[0062] As an example, the computer device may abort the burning process if it determines that burning at least one device after program erasure has failed. Alternatively, if the computer device determines that burning at least one device after program erasure has failed, it may prompt the user on the burning test window, respond to the user's re-burning command, control the start of the single-port re-burning button, re-burn each device after program erasure individually, and record the burning failure results in the system log for data traceability.

[0063] In this embodiment, during the device programming process based on programming parameters, multiple preset programming error prevention mechanisms are used to monitor and control the programming process, perform programming error prevention processing during the programming process, ensure programming accuracy and efficiency, and improve the reliability of device programming.

[0064] In one embodiment, such as Figure 3 As shown, step S106, which involves testing the programmed device in the programming test window based on the target parameter table, and determining the device test results, includes: S301: Generate test instructions and corresponding test items based on the target parameter table; S302: Based on the test items, test the burned device in the burning test window and determine the device test results.

[0065] Test commands refer to instructions used to test the programmed device, including test commands such as "read," "write," and "delay." Test items refer to the specific test content corresponding to the test commands.

[0066] As an example, in step S301, the computer device queries the target parameter table corresponding to the programmed device to determine the test instructions used to test the programmed device and generates test items corresponding to the test instructions. In this example, the test items specifically include: a read instruction string containing the read address, a write instruction string containing the write address and the write value, and a delay waiting duration. When the computer device determines that the test instruction is "read", it generates a read instruction string containing the read address. When the computer device determines that the test instruction is "write", it generates a write instruction string containing the write address and the write value. When the computer device determines that the test instruction is "delay", it does not generate a string, but instead determines the delay waiting duration.

[0067] As an example, in step S302, the computer device tests the programmed device on the COM port corresponding to the programming test window according to at least one of reading instruction strings, writing instruction strings, and delay waiting time. When the COM port corresponding to the programming test window is green, the device test result is determined to be a successful test; when the COM port corresponding to the programming test window is red, the device test result is determined to be a failed test.

[0068] In this embodiment, by querying the target parameter table, test items corresponding to the test instructions are generated, and the burned device is tested according to the test items corresponding to the test instructions to determine the device test results. A flexible instruction generation mechanism is formed based on the target parameter table, so that the test process can be adapted to the test requirements of different types of devices without modification. It has high versatility and high scalability. This process does not require manual configuration and operation and has high test efficiency.

[0069] In one embodiment, such as Figure 4 As shown, step S302 involves testing the programmed device in the programming test window according to the test items, and determining the device test results, including: S401: If the test item is to read the instruction string, then the instruction string will be converted into read communication data and sent to the programmed device. If the key parameters corresponding to the programmed device can be read, then the device test result is determined to be successful. S402: If the test item is a write command string, the write command string is converted into write communication data and the write communication data is sent to the programmed device. If the written success data is received from the programmed device, the device test result is determined to be a successful test. S403: If the test item is the delay waiting time, then the delay operation is performed according to the delay waiting time. If the delay can be performed according to the delay waiting time, then the test result of the device is determined to be successful.

[0070] Reading communication data refers to the communication data used to perform reading operations on the programmed device. Key parameters refer to the parameters that have been read.

[0071] As an example, in step S401, when the computer device determines that the test item is a read instruction string containing a read address, it converts the read instruction string containing the read address into read communication data corresponding to the read address, and sends the read communication data to the read address of the burned device. When the computer device determines that it has received the key parameters corresponding to the burned device, it determines that the device test result is successful. When it determines that it has not received the key parameters corresponding to the burned device, it determines that the device test result is unsuccessful.

[0072] As an example, in step S402, when the computer device determines that the test item is a write instruction string containing a write address and a write value, it converts the write instruction string into write communication data, writes the write value into the write address of the device after it has been programmed, and determines whether it has received write success data from the device after it has been programmed. If the write success data can be received, the device test result is determined to be a test success; if the write success data cannot be received, the device test result is determined to be a test failure.

[0073] As an example, in step S403, when the computer device determines that the test item is the delay waiting time, it controls the device to perform a delay operation after burning according to the delay waiting time. When it is determined that the device can delay according to the delay waiting time after burning, the device test result is determined to be a successful test. When it is determined that the device cannot delay according to the delay waiting time after burning, the device test result is determined to be a failed test.

[0074] In this embodiment, the device after burning is tested through different test items in the test process. This test process can be adapted to the test requirements of different types of devices without modification, and has high versatility and high scalability.

[0075] In another embodiment, before step S105, the device programming method further includes: when it is determined that the pre-set configuration file needs to be modified, controlling the unlock function in the startup programming test window to open the account login verification window, and when it is determined that user information is entered in the account login verification window and the user information is verified by the account login verification window, it is determined that the pre-set configuration file can be modified.

[0076] As an example, when a computer device receives a trigger signal indicating that a pre-set configuration file needs modification, it determines that the configuration file needs to be modified. At this point, the computer device activates the unlock function in the programming test window and opens the account login verification window, prompting the user to enter user information. Once the user information is entered into the account login verification window and the verification passes, it is determined that the pre-set configuration file can be modified. This method, by verifying information through the account login verification window when modification of the configuration file is determined, effectively prevents accidental operations during the equipment production operation phase, improving the reliability and security of equipment programming and testing.

[0077] In another embodiment, the device programming method further includes: scanning the original device to determine the original serial number corresponding to the original device.

[0078] As an example, the client scans the original device in batches using a scanning device (such as a camera) to obtain the string of the original serial number corresponding to the original device. The string of the original serial number is then transmitted in batches to the TCP server. The TCP server parses the strings of multiple original serial numbers and obtains the original serial number corresponding to the original device in batches. This achieves the purpose of batch input of the original serial number corresponding to the original device, which can significantly improve the efficiency of device burning and testing and increase production capacity. For example, batch scanning yields strings of original serial numbers including "WATEST0001,WATEST0002,WATEST0003,WATEST0004,WATEST0005,WATEST0006". These strings are then transmitted to a TCP server. The TCP server parses these strings, batch-retrieving the original serial numbers corresponding to the original devices: WATEST0001, WATEST0002, WATEST0003, WATEST0004, WATEST0005, and WATEST0006. Following the order of the original serial numbers corresponding to the original devices, the server transmits these serial numbers sequentially and fills them into the blank boxes corresponding to each COM port in the programming test window. Figure 7 As shown, in the programming test window, each COM has a corresponding blank box for entering the serial number. This serial number can be the original serial number or the target serial number after the original serial number has passed the foolproof verification.

[0079] In one embodiment, such as Figure 5 As shown, a device programming system is provided, including an original serial number acquisition module 501, a serial number error prevention processing module 502, a programming configuration module 503, a programming module 504, and a test execution module 505; The original serial number acquisition module 501 is used to acquire the original serial number corresponding to the original device. The serial number error prevention module 502 is used to verify the original serial number using a preset serial number error prevention mechanism to determine the target serial number corresponding to the original device. The programming configuration module 503 determines the device part number corresponding to the target serial number based on the target serial number, and determines the programming parameters according to the device part number. The programming module 504 programs the original device based on programming parameters in the programming test window to determine the device after programming. The test execution module 505 determines the target parameter table based on the device part number, and then tests the device after programming in the programming test window based on the target parameter table to determine the device test results.

[0080] As an example, in the original serial number acquisition module 501, the computer device acquires the original serial numbers corresponding to the original devices to be programmed in batches. In this example, the computer device controls the TCP server to start and receives the original serial numbers of multiple original devices sent in batches by the client. The original serial number can be an SN (Serial Number). In this example, the original serial number can be obtained by scanning the original device with the client's camera, or it can be directly input into the client. In this example, when the original device is a data acquisition unit in the optical storage and charging system, the computer device acquires the original serial numbers corresponding to the data acquisition units in batches. For example, the original serial number is WA23201000, where WA represents the model of the original device, 23 represents the year of manufacture, 20 represents the 20th week of manufacture in that year, and 1000 represents the production serial number of the original device, indicating that this original device is the 1000th unit manufactured.

[0081] As an example, in the serial number error prevention processing module 502, the computer device uses a preset serial number error prevention mechanism to perform error prevention verification on the received original serial number, accurately obtaining the target serial number that conforms to the preset serial number error prevention mechanism. For example, the preset serial number error prevention mechanism limits the number length of the original serial number to a fixed value. The computer device judges the number length of the received original serial number, excludes the original serial number whose number length is not the fixed value, and determines the original serial number whose number length is the fixed value as the target serial number, so as to effectively prevent errors in the original serial number, avoid burning based on the incorrect original serial number, and improve the accuracy of burning.

[0082] As an example, in the programming configuration module 503, the computer device calls the interface corresponding to the target serial number in the manufacturing execution system (MES system) according to the target serial number to obtain the equipment part number corresponding to the target serial number. The equipment part number is then parsed to obtain the programming parameters corresponding to the equipment part number, so that the original equipment can be programmed according to the programming parameters in the future.

[0083] As an example, in the programming module 504, the computer device jumps to and opens the programming test window corresponding to the device part number according to the device part number. According to the programming parameters corresponding to each COM port in the programming test window, the original device corresponding to each COM port is programmed. After programming is completed, the programmed device corresponding to each COM port is obtained, realizing the purpose of batch programming of multiple original devices, which is more efficient. Figure 7 This is a schematic diagram of the programming test window, provided by... Figure 7 As can be seen, the programming test window includes multiple COM ports, each corresponding to a target serial number. By controlling each COM port, the corresponding original device can be programmed and tested, thereby achieving the purpose of batch programming and testing of the device, which can effectively improve the efficiency of device programming and testing.

[0084] As an example, in the test execution module 505, the computer device reads the parameters corresponding to the device part number from a pre-set file according to the device part number, forming a target parameter table. Based on the target parameter table corresponding to each programmed device, the computer device is tested sequentially through each COM port of the programming test window. Based on the color indication corresponding to each COM port, the test result of each programmed device is determined to be either a pass or a fail. For example, if the color corresponding to the COM port is green, the test result is determined to be a pass; if the color corresponding to the COM port is red, the test result is determined to be a fail.

[0085] In this embodiment, the original serial number acquisition module acquires the original serial numbers of multiple original devices in batches. The serial number error-proofing module uses a preset serial number error-proofing mechanism to verify the received original serial numbers, accurately obtaining target serial numbers that conform to the preset serial number error-proofing mechanism. This achieves error-proof batch management of original serial numbers, which is relatively efficient. The programming module programs the original devices based on programming parameters in the programming test window, determining the programmed device. The test execution module tests the programmed device based on the target parameter table in the programming test window, determining the device test results. This achieves the purpose of batch programming and testing of multiple original devices, which is relatively efficient. This device programming system effectively prevents errors by using a preset serial number error-proofing mechanism to avoid programming based on erroneous original serial numbers, improving the programming accuracy. Batch programming and testing of original devices corresponding to multiple target serial numbers can effectively improve the efficiency of device programming and testing, achieving the goal of efficient and effective error-proof batch programming and testing of devices.

[0086] In one embodiment, the device programming system further includes a barcode scanning module for scanning the original device to determine the original serial number corresponding to the original device.

[0087] As an example, the barcode scanning module of the device programming system is used to scan the original device in batches using a barcode scanning device (such as a camera) to obtain the original serial number corresponding to the original device, and transmit the original serial number corresponding to the original device to the TCP server, thereby realizing the batch entry of the original serial number corresponding to the original device, which can significantly improve the efficiency of device programming and testing and increase production capacity.

[0088] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data used or generated during the execution of the device programming method. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a device programming method.

[0089] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the device programming method described in the above embodiment, for example... Figure 1As shown in S101-S105, or Figures 2 to 4 As shown, to avoid repetition, it will not be described again here. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in this embodiment of the device programming device, for example... Figure 5 The functions of the original serial number acquisition module 501, serial number error prevention module 502, programming configuration module 503, programming module 504, and test execution module 505 shown are not described again here to avoid repetition.

[0090] In this application, "multiple" refers to two or more.

[0091] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0092] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0093] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0094] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if the method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if the method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.

[0095] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for programming a device, characterized in that, include: Obtain the original serial number corresponding to the original device; A preset serial number error prevention mechanism is used to verify the original serial number to determine the target serial number corresponding to the original device; Based on the target serial number, determine the device part number corresponding to the target serial number, and determine the programming parameters according to the device part number; Based on the programming parameters, the original device is programmed in the programming test window to determine the programmed device. Based on the device part number, a target parameter table is determined. Based on the target parameter table, the device is tested in the programming test window, and the device test results are determined.

2. The device programming method according to claim 1, characterized in that, The preset serial number error prevention mechanism includes: If the original serial number contains a NULL character and / or the original serial number is not arranged in the preset order, an error will be reported and all original serial numbers in the current burning station will be cleared. If the original serial number contains spaces, then the original serial number will not be entered. If the original serial number is not in the current burning station and / or the original number length of the original serial number does not reach the preset number length, then the original serial number is cleared.

3. The device programming method according to claim 1, characterized in that, The programming parameters include the chip type, flash memory size, flash memory mode, flash memory frequency, firmware path, offset address, programming baud rate, and programming COM port of the original device.

4. The device programming method according to claim 1, characterized in that, The step of programming the original device based on the programming parameters and determining the programmed device in the programming test window includes: Perform a program erase process on the original device to determine the device after program erase; The device after program erasure is programmed using the programming parameters and preset programming error prevention mechanism in the programming test window to determine the programmed device.

5. The device programming method according to claim 4, characterized in that, The preset programming error prevention mechanism includes: Repeated burning is prohibited; After the flashing process is complete, you are only allowed to reset the flashing program or test the flashed device. If an error occurs in the serial number station of the device after program erasure and / or an error occurs in the COM status during the burning process, the burning process will be aborted. Upon successful programming, the corresponding programming success information will be uploaded to the Manufacturing Execution System. If the burning process fails, the burning process will be stopped, or the device after the program has been erased will be re-burned, and the burning result of the failed burning will be recorded in the system log.

6. The device programming method according to claim 1, characterized in that, Based on the target parameter table, the device is tested in the programming test window to determine the device test results, including: Based on the target parameter table, generate test instructions and test items corresponding to the test instructions; Based on the test items, the device after programming is tested in the programming test window to determine the device test results.

7. The device programming method according to claim 6, characterized in that, The step of testing the programmed device in the programming test window according to the test items and determining the device test results includes: If the test item is a read instruction string, then the read instruction string is converted into read communication data and the read communication data is sent to the programmed device. If the key parameters corresponding to the programmed device can be read, then the device test result is determined to be a successful test. If the test item is a write instruction string, then the write instruction string is converted into write communication data and the write communication data is sent to the programmed device. If the write success data is received from the programmed device, then the device test result is determined to be a successful test. If the test item is a delay waiting time, then a delay operation is performed according to the delay waiting time. If the delay can be performed according to the delay waiting time, then the device test result is determined to be a successful test.

8. A device programming system, characterized in that, It includes a module for obtaining the original serial number, a module for preventing serial number errors, a module for programming and configuration, a programming module, and a test execution module; The original serial number acquisition module is used to acquire the original serial number corresponding to the original device; The serial number error prevention module is used to verify the original serial number using a preset serial number error prevention mechanism to determine the target serial number corresponding to the original device. The programming configuration module determines the device part number corresponding to the target serial number based on the target serial number, and determines the programming parameters according to the device part number. The programming module, based on the programming parameters, programs the original device in the programming test window to determine the programmed device. The test execution module determines a target parameter table based on the device part number, and then tests the programmed device in the programming test window based on the target parameter table to determine the device test results.

9. The device programming system according to claim 8, characterized in that, The device programming system also includes a barcode scanning module, which is used to scan the original device to determine the original serial number corresponding to the original device.

10. A computer device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the device programming method as described in any one of claims 1 to 7.