Software design method and system for avoiding false triggering of yield measurement mode

By separating the production test function and the user mode program and storing them separately, the problem of accidental triggering of the production test mode in traditional software design is solved, and the product stability and test accuracy are improved, ensuring that the product can be used normally after delivery.

CN120687068APending Publication Date: 2025-09-23JIAN IGOR ELECTRIC CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510746562.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

In traditional software design, user mode programs and production test mode programs are not separated, which can easily lead to accidental triggering of production test mode due to user errors or program design omissions, resulting in product function interruption, affecting user experience and product stability.

Method used

The product program of the production test function is decomposed into independent user mode program and production test mode program, and burned into different storage areas respectively. After passing the test, it switches to the user mode program to ensure that the two run independently.

Benefits of technology

Effectively avoid false triggering of production test mode, ensure stable product operation, improve product reliability and the accuracy of test results, quickly locate problems and make corrections, and ensure product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687068A_ABST
    Figure CN120687068A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of product testing, and provides a software design method and system for avoiding false triggering of a production test mode, the software design method is applied to a product provided with a storage unit, and the storage unit comprises an upgrade program storage area and a program running area; the software design method comprises the following steps: decomposing a product program with a yield measurement function into a user mode program and a yield measurement mode program which are mutually independent; burning the user mode program to an upgrade program storage area, and burning the yield measurement mode program to a program operation area; enabling the production test mode program to enter a running state, and testing the product to obtain a test result; and if the test result is passed, erasing the production test mode program in the program running area, and transferring the user mode program in the upgrade program storage area to the program running area. The method can effectively avoid accidental starting of the production test mode caused by misoperation or program logic vulnerabilities when a user normally uses a product, and ensures that the product can stably run after being delivered to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of product testing, and in particular to a software design method and system for avoiding false triggering of a production test mode. Background Art

[0002] In traditional software design, product programs are often integrated into a single entity, without a clear distinction between user mode and production test mode programs. These programs are often stored in the same program storage area. Once the product is delivered to the user, unfamiliarity with the product can lead to incorrect operation, or the product program itself may contain design flaws, such as insufficiently rigorous state transition logic or insufficient constraints to prevent false triggers. This can easily cause the product to accidentally enter production test mode.

[0003] Once the product enters production test mode, its normal functions will be interrupted and users will not be able to use the product normally. This will not only cause great inconvenience to users, but may also affect the normal service life of the product and may even cause user data loss or damage, seriously damaging the user experience and product reputation. Summary of the Invention

[0004] In response to the above-mentioned defects, the purpose of the present invention is to propose a software design method and system for avoiding false triggering of the production test mode. The method aims to decompose the product program of the production test function into mutually independent user mode programs and production test mode programs, and rationally utilize the partition characteristics of the storage unit to operate and switch the production test mode without affecting the normal use of the product, thereby effectively avoiding the problem of accidentally entering the production test mode due to user misoperation or program design omissions, ensuring that users can use the product normally and guaranteeing the stability and reliability of the product functions.

[0005] To achieve this object, the present invention adopts the following technical solutions:

[0006] A software design method for avoiding false triggering of a production test mode, the software design method being applied to a product provided with a storage unit, the storage unit including an upgrade program storage area and a program execution area; the software design method comprising:

[0007] Decompose the product program of the production test function into independent user mode programs and production test mode programs;

[0008] Burn the user mode program to the upgrade program storage area, and burn the production test mode program to the program running area;

[0009] Make the production test mode program enter the running state, test the product, and obtain the test results;

[0010] If the test result is passed, the production test mode program in the program running area is erased, and the user mode program in the upgrade program storage area is transferred to the program running area.

[0011] Preferably, before erasing the production test mode program in the program running area, the method includes: setting a reset flag of the storage unit to a program upgrade state, and restarting the product.

[0012] Preferably, before the production test mode program enters the running state, it includes using an LED power supply to power on and enter the production test mode.

[0013] Preferably, if the test result is a failure, failure analysis and rectification are performed.

[0014] A software design system for preventing false triggering of a production test mode, the software design system being applied to a product provided with a storage unit, the storage unit including an upgrade program storage area and a program execution area; the software design system comprising:

[0015] Program decoupling module, used to decompose the product program of the production and test function into independent user mode programs and production and test mode programs;

[0016] Partition burning module, used to burn user mode programs into the upgrade program storage area and burn production test mode programs into the program running area;

[0017] The production test module is used to put the production test mode program into operation, test the product, and obtain the test results;

[0018] The program conversion module is used to erase the production test mode program in the program running area and transfer the user mode program in the upgrade program storage area to the program running area after the product with the storage unit completes the product test.

[0019] Preferably, the storage unit includes a user data storage area, and the user data storage area is used to store NVM power-off memory data.

[0020] Preferably, it further comprises a state changing module, which is used to set the reset flag of the storage unit to the program upgrade state and restart the product before the program conversion module erases the production test mode program in the program running area.

[0021] Preferably, a rectification module is included, and the rectification module is used to perform failure analysis and rectification on the test when the test result obtained by the production test module is a failure.

[0022] Preferably, the storage unit is MCU Flash.

[0023] One of the above technical solutions has the following advantages or beneficial effects:

[0024] By separating the user mode program and the production test mode program and burning them into different storage areas, the present invention effectively prevents the production test mode from being accidentally activated due to improper operation or program logic vulnerabilities during normal user use of the product, thereby ensuring that the product can operate stably after delivery to the user without functional interruptions or abnormalities. Partitioned storage makes the programs in the two modes independent of each other, effectively reducing program conflicts or errors that may occur during the mode switching process, avoiding the probability of unstable product operation or failure due to mutual interference between programs, and improving the overall reliability and stability of the product. During the production test phase, the production test mode program can run in an independent program running area, unaffected by the user mode program, and can more accurately perform comprehensive testing on various performance indicators of the product, ensuring the objectivity and accuracy of the test results, thereby more effectively discovering and resolving potential quality issues and ensuring product quality. If the test result is a failure, the independence of the user mode program and the production test mode program makes it easier to perform failure analysis on the product that failed the test, quickly locate the problem, and clearly determine whether the problem lies with the user mode program or the production test mode program, so that targeted rectification can be carried out to improve the level of product quality assurance. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0026] Figure 1 This is a flowchart of a software design method for avoiding false triggering of a production test mode provided by the first embodiment of the present invention;

[0027] Figure 2 Schematic diagram of the structure of a software design system for preventing false triggering of a production test mode provided by an embodiment of the present invention;

[0028] Figure 3 This is a flowchart of a software design method for avoiding false triggering of a production test mode provided by a second embodiment of the present invention;

[0029] Figure 4 It is a diagram of the MCU flash storage area division in the prior art;

[0030] Figure 5 This is a diagram of the MCU flash storage area partition provided by an embodiment of the present invention;

[0031] Figure 6Schematic diagram of the transfer process of the user mode program provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0033] In the present invention, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0034] A software design method for avoiding false triggering of a production test mode, the software design method is applied to products with a storage unit, such as Figure 1 As shown, the storage unit includes an upgrade program storage area and a program running area; the software design method includes the following steps:

[0035] S1: Decompose the product program of the production test function into independent user mode programs and production test mode programs;

[0036] Specifically, based on the modularization philosophy of software design, the production test function and normal user functions are separated from the software architecture, forming two independent program modules. This is done to prevent interference between user mode and production test mode after the product is delivered to the user. In particular, it prevents accidental activation of production test mode due to program logic vulnerabilities or misoperation during normal user use. By making the two modes independent from each other, the risk of accidental activation of production test mode is fundamentally reduced. It also facilitates the targeted development, testing, and optimization of programs in each mode, improving the overall stability and reliability of the software.

[0037] The production test function is a set of functions used on the production line to test whether a product's performance and functionality meet standards. By executing specific test procedures, it verifies that all product indicators meet the standards. Its role is to ensure product quality, ensuring that the product functions properly and meets design requirements, and is a key quality control measure in the production process. The product program is the software code that controls product operation. It contains the implementation logic and operating instructions for all product functions. It operates on the product's hardware, enabling the product to perform various tasks as intended, and is the core of the product's functionality. The user mode program is the program that runs when the product is delivered to the user. It includes user-operable and perceptible functions, such as brightness adjustment and on / off control of smart lighting power supplies. Its role is to provide users with a range of interactive methods and functional experiences tailored to their usage scenarios, meeting their daily needs. The production test mode program is a program specifically run during the product's production test phase. It contains a series of test codes for the product's hardware and performance, used to verify that various product indicators meet compliance. It comprehensively inspects products before they leave the factory, promptly identifying and resolving potential quality issues, and is a key step in product quality assurance.

[0038] S2: Burn the user mode program to the upgrade program storage area, and burn the production test mode program to the program running area;

[0039] Specifically, different areas of the product's internal storage unit are rationally utilized to partition and store programs for different purposes. The upgrade program storage area is used to store user mode programs, which is equivalent to a spare, waiting-to-be-activated program storage space; while the program running area is the running place for the production test mode program. The purpose of such partition burning is twofold: on the one hand, during the production test phase, the production test mode program can run without affecting the user mode program, ensuring the independence and integrity of the production test; on the other hand, when the production test is completed, the user mode program can be transferred from the upgrade program storage area to the program running area, quickly and safely taking over the product's operating control, realizing a seamless switch from production test mode to user mode. In addition, due to partition isolation, the probability of program conflicts or errors during the mode switching process is reduced, ensuring the smooth transition of the product from production test to user use.

[0040] The upgrade program storage area is a dedicated area within the product's storage unit for storing user mode programs, acting as backup storage for user mode programs. After the product passes production testing, user mode programs can be transferred from this area to the program execution area, enabling product functionality switching and upgrades. The program execution area is a section of the product's storage unit used to store and execute currently running programs. It stores production test mode programs during the production testing phase and user mode programs during the user phase. It provides a storage and execution environment for currently running programs, ensuring the product operates normally according to the instructions of the current program.

[0041] S3: Make the production test mode program enter the running state, test the product, and obtain the test results;

[0042] Specifically, by running the production test mode program, a series of pre-designed test processes and diagnostic functions inside the product are activated to conduct comprehensive tests on various performance indicators of the product (such as output current, output voltage, antenna transceiver performance, etc.). Its core purpose is to accurately evaluate whether the product meets the preset quality standards and functional requirements, and ensure the reliability and stability of the product. During the operation of the production test mode program, the product will perform a variety of test tasks, such as detecting key performance parameters such as output current, output voltage, antenna transceiver performance, and integrating these test data to generate test results, providing objective and accurate basis for whether the product is allowed to enter user mode in the future. The purpose of this step is to ensure product quality, discover and eliminate potential problems in a timely manner before the product is delivered to users, prevent faulty products from entering the market, and maintain the product brand image and user trust.

[0043] S4: If the test result is passed, the production test mode program in the program running area is erased, and the user mode program in the upgrade program storage area is transferred to the program running area.

[0044] Specifically, the subsequent program switching operation will be triggered only when and only when the test results show that all performance characteristics of the product are qualified. Erasing the production test mode program in the program running area is to completely eliminate the possibility of the product entering the production test mode again during subsequent use, because once the production test mode program is erased, it can no longer be called to run. The purpose of transferring the user mode program from the upgrade program storage area is to enable the product to have normal user use functions and realize the key transition from the production test stage to the user use stage. The purpose of this step is to ensure that only products that have been rigorously tested and qualified can reach the hands of users, and that the products can stably run user mode programs after delivery, providing users with a consistent, reliable and secure product experience, while also avoiding a series of problems that may be caused by residual production test mode, such as resource occupation, functional conflicts or malicious exploitation. Such as Figure 4 and Figure 5 As shown, Figure 4 It is a storage unit in the prior art that integrates the production line test function into the product program, enters the production test mode during the product test phase; and then switches to the normal working mode after the overall test is completed.

[0045] Preferably, before erasing the production test mode program in the program running area, the method includes:

[0046] Set the reset flag of the storage unit to the program upgrade state and restart the product.

[0047] Specifically, the principle is to set the reset flag to notify the system's startup program (such as the Bootloader) to perform specific operations at the next startup, that is, to erase the production test mode program in the program running area, and transfer the user mode program from the upgrade program storage area to the program running area. Its purpose is to ensure that after the test passes, the product can safely and reliably switch from production test mode to user mode. The role of restarting is to make the set reset flag effective and trigger the execution of the Bootloader program, thereby completing the subsequent program switching operation. The role of this step is to provide a reliable mechanism to ensure the accuracy and integrity of program switching, avoid abnormal situations during the switching process, such as program interruption or data inconsistency, thereby ensuring the stability and reliability of the product.

[0048] Among them, the reset flag is a flag used to indicate which state the system enters after restarting. In this step, the purpose of setting it to the program upgrade state is to notify the Bootloader program to perform the operations of erasing the production test mode program and transferring the user mode program at the next startup, to ensure that the product can smoothly switch to user mode. The program upgrade state is a special system state, which means that the system needs to perform a program upgrade operation. In this state, the Bootloader program will execute the erasing of the program running area and the transfer of the user mode program according to the preset logic, thereby realizing the switch from production test mode to user mode. Restarting is to restart the product, so that the system reinitializes and reads the state of the reset flag, thereby triggering the corresponding operation process. The purpose of restarting is to ensure that the system can recognize the new reset flag setting, and process it according to the predetermined procedure to ensure the smooth progress of the program switching operation. As Figure 3 As shown, it means that after the test passes, the boot program flag needs to be set and the system needs to be restarted before the production test program can be deleted.

[0049] Preferably, before the production test mode program enters the running state, it includes using an LED power supply to power on and enter the production test mode. The LED power supply is used as the trigger source of the test signal, and a specific power signal is provided to the product to activate the product's production test mode program. Its purpose is to provide a clear and controllable trigger condition before the product enters the production test mode, ensuring that the product can enter the test state under predetermined conditions. The purpose of using the LED power supply to power on is to provide a stable power signal, and at the same time serve as a physical trigger mechanism for entering the production test mode, ensuring the reliability and consistency of the test process. This method of triggering by an external power signal can effectively avoid false triggering caused by other interference signals, ensuring the accurate startup of the production test mode.

[0050] Preferably, if the test result is a failure, failure analysis and rectification are performed.

[0051] Through in-depth failure analysis of products that failed tests, we identify the root causes of these failures and develop corrective measures to address them. The goal is to ensure that products meet expected quality standards and performance requirements before delivery to customers, preventing substandard products from entering the market. Failure analysis identifies defects or deficiencies in product design, manufacturing processes, or raw materials. Corrective measures aim to mitigate these issues through design optimization, process improvements, or material replacement, thereby improving product reliability and stability.

[0052] A software design system for avoiding false triggering of a production test mode, wherein the software design system is applied to a product provided with a storage unit, such as Figure 2 As shown, the storage unit includes an upgrade program storage area and a program running area; the software design system includes:

[0053] Program decoupling module, used to decompose the product program of the production and test function into independent user mode programs and production and test mode programs;

[0054] Partition burning module, used to burn user mode programs into the upgrade program storage area and burn production test mode programs into the program running area;

[0055] The production test module is used to put the production test mode program into operation, test the product, and obtain the test results;

[0056] The program conversion module is used to erase the production test mode program in the program running area and transfer the user mode program in the upgrade program storage area to the program running area after the product with the storage unit completes the product test.

[0057] This embodiment implements a software design method and implementation process for avoiding false triggering of the production test mode. Please refer to the above embodiments and will not be described in detail here.

[0058] Preferably, the storage unit includes a user data storage area, and the user data storage area is used to store NVM power-off memory data.

[0059] In addition, the program conversion module can be set in the bootloader program of the program boot area of ​​the storage module, such as Figure 5 and Figure 6 The memory unit, which is the MCU Flash, includes the program boot area (0x00000000-0x0000 4000): used to store the bootloader program. Its function is to initialize the system at product startup and determine subsequent operations based on the reset flag, such as erasing the production test mode program and migrating the user mode program. Located at the beginning of the memory unit, this area is the first code executed after the product is powered on. The program run area (0x0000 4000-0x0007 A000): initially stores the production test mode program and is used to run test tasks during the production test phase. Located immediately after the program boot area, it is the place where the production test mode program runs and is also the target area to which the user mode program is ultimately transferred, allowing the product to operate normally after passing the test. The upgrade program storage area (0x0007 A000-0x000F 6000): used to store user mode programs and serves as a backup storage space for user mode programs. Located after the program execution area, it waits for the user mode program to be transferred to the program execution area after production testing is completed, enabling the product to switch from production test mode to user mode. The user data storage area (0x000F 6000-0x000F E000) is used to store NVM power-off memory data, i.e., non-volatile storage data that is retained even when the product loses power. Located at a higher address in the storage unit, it is used to store user data, such as configuration parameters and usage records, to ensure the stability and durability of user data in different product usage scenarios. Figure 6 The test describes two states: the initial state and the production test completion state. In the initial state, the upgrade program storage area stores the user mode program, the program execution area stores the production test mode program, the program boot area stores the bootloader program, and the user data storage area stores NVM power-off memory data. If the test result passes, the production test mode program is erased, and the user mode program in the upgrade program storage area is transferred to the program execution area, overwriting the original production test mode program. After the transfer is complete, the user mode program is stored in the program execution area. The user mode program will run on subsequent product startups, completing the transition from production test mode to user mode.

[0060] Preferably, it further comprises a state changing module, which is used to set the reset flag of the storage unit to the program upgrade state and restart the product before the program conversion module erases the production test mode program in the program running area.

[0061] Preferably, a rectification module is included, and the rectification module is used to perform failure analysis and rectification on the test when the test result obtained by the production test module is a failure.

[0062] Preferably, the storage unit is MCU Flash.

[0063] Specifically, MCU Flash supports this flexible partitioning and program transfer mechanism, which can effectively avoid false triggering of production test mode and ensure that the product can stably run user mode programs after delivery to users.

[0064] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative uses of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0065] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.

Claims

1. A software design method for preventing false triggering of a production test mode, the software design method being applied to a product equipped with a storage unit, characterized in that: The storage unit includes an upgrade program storage area and a program running area; The software design method comprises: Decompose the product program of the production test function into independent user mode programs and production test mode programs; Burn the user mode program to the upgrade program storage area, and burn the production test mode program to the program running area; Make the production test mode program enter the running state, test the product, and obtain the test results; If the test result is passed, the production test mode program in the program running area is erased, and the user mode program in the upgrade program storage area is transferred to the program running area.

2. The software design method for avoiding false triggering of the production test mode according to claim 1, characterized in that: Before erasing the production test mode program in the program run area, including: Set the reset flag of the storage unit to the program upgrade state and restart the product.

3. The software design method for avoiding false triggering of the production test mode according to claim 1, characterized in that: Before the production test mode program enters the running state, it uses the LED power supply to power on and enter the production test mode.

4. The software design method for avoiding false triggering of the production test mode according to claim 1, characterized in that: If the test result is failure, failure analysis and rectification will be carried out.

5. A software design system for preventing false triggering of a production test mode, the software design system being applied to a product provided with a storage unit, characterized in that: The storage unit includes an upgrade program storage area and a program running area; The software design system includes: Program decoupling module, used to decompose the product program of the production and test function into independent user mode programs and production and test mode programs; Partition burning module, used to burn user mode programs into the upgrade program storage area and burn production test mode programs into the program running area; The production test module is used to put the production test mode program into operation, test the product, and obtain the test results; The program conversion module is used to erase the production test mode program in the program running area and transfer the user mode program in the upgrade program storage area to the program running area after the product with the storage unit completes the product test.

6. The software design system for avoiding false triggering of the production test mode according to claim 5, characterized in that: The storage unit includes a user data storage area, and the user data storage area is used to store NVM power-off memory data.

7. The software design system for preventing false triggering of the production test mode according to claim 5, characterized in that: It also includes a state changing module, which is used to set the reset flag of the storage unit to the program upgrade state and restart the product before the program conversion module erases the production test mode program in the program running area.

8. The software design system for avoiding false triggering of production test mode according to claim 5, characterized in that: It includes a rectification module, which is used to perform failure analysis and rectification on the test when the test result obtained by the production test module is a failure.

9. The software design system for avoiding false triggering of production test mode according to claim 5, characterized in that: The storage unit is MCU Flash.

Citation Information

Patent Citations

  • Upgrading method and device

    CN109144532A

  • Firmware burning updating method and firmware burning system applying firmware burning updating method

    CN115437649A

  • Equipment upgrading method and device, electronic equipment and storage medium

    CN119105784A

  • Method and apparatus for upgrading electronic device

    WO2022188690A1