Method for starting test program and electronic device

By writing the identifier during the restart process of the electronic device to intercept the secondary aging test, the test is not started until the restart log is uploaded, which solves the problem of missing restart logs in the aging test and ensures the integrity of the log and the quality of the equipment.

CN117724894BActive Publication Date: 2024-08-23HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311112789.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2024-08-23
Estimated Expiration
2043-08-30

AI Technical Summary

Technical Problem

During the aging test of electronic equipment, the restart logs of abnormal restarts may be missed to be uploaded, resulting in incomplete logs collected by the server, and there are hidden quality risks.

Method used

During the restart process of electronic equipment, if an abnormal restart occurs, write the identifier of the preset storage address to intercept the secondary aging test. The aging test APP will not be launched until the restart log is uploaded to the server to ensure that the restart log is uploaded in time.

Benefits of technology

This effectively avoids missing uploads of restart logs, ensures the integrity of logs collected by the server, and reduces the quality risk of electronic equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117724894B
    Figure CN117724894B
Patent Text Reader

Abstract

The embodiments of the present application relate to the field of electronic device testing, and more particularly to a method for starting a test program and an electronic device, which can avoid the problem of missing the upload of the restart log of an abnormal restart of an electronic device during an aging test. The method includes: if the first electronic device restarts abnormally during the aging test, the first electronic device writes a first identifier at a preset storage address during the restart process, the first identifier is used to indicate that the aging test APP is not started, and the aging test APP is used to perform an aging test on the first electronic device; after the first electronic device restarts successfully, a first operation is received, and the first operation is used to trigger the first electronic device to start the aging test APP; in response to the first operation, the first electronic device recognizes that the preset storage address stores the first identifier, and the first electronic device does not start the aging test APP; the first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device starts the aging test APP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic equipment testing, and more particularly to a method for starting a test program and an electronic equipment. Background Art

[0002] When electronic equipment is manufactured, it needs to undergo stability testing before leaving the factory to ensure the reliability of the electronic equipment. Aging test is a type of stability test. Aging test is to apply accelerated environmental stress, such as temperature stress, electrical stress, humid heat stress, mechanical stress, etc., to electronic products, so as to accelerate the exposure of potential defects of electronic products into failures in harsh environments, so as to achieve the purpose of discovering and eliminating potential defects. Usually, aging tests can be used to test various software and hardware functional modules in electronic equipment to dig out faults in software and hardware functional modules and avoid missing fault problems.

[0003] The electronic device may be installed with an aging test application (APP). In response to a tester starting the aging test APP, the aging test APP may send a test instruction to the electronic device, and the electronic device automatically performs various test actions in response to the test instruction.

[0004] During the aging test, the electronic device may restart abnormally. For example, after the electronic device crashes, the tester forces a restart. When the electronic device restarts abnormally, the electronic device will generate a restart log. The restart log can be used to locate the cause of the abnormal restart. During the aging test, if the electronic device restarts abnormally, the tester is usually required to upload the restart log to the cloud server to facilitate R&D personnel to analyze and track the problem. However, in the prior art, testers may miss uploading the restart log, resulting in incomplete restart logs collected by the server, and there may be a risk of missing faults, resulting in hidden quality risks in the electronic device. Summary of the invention

[0005] The embodiments of the present application provide a method for starting a test program and an electronic device, which are used to solve the problem of missing restart log upload when an electronic device abnormally restarts during an aging test.

[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, a method for starting a test program is provided, and the method is applied to a first electronic device. The method includes: if the first electronic device restarts abnormally during an aging test, the first electronic device writes a first identifier at a preset storage address during the restart process, the first identifier is used to indicate that an aging test APP is not started, and the aging test APP is used to perform an aging test on the first electronic device; after the first electronic device restarts successfully, a first operation is received, and the first operation is used to trigger the first electronic device to start the aging test APP; in response to the first operation, the first electronic device recognizes that the preset storage address stores the first identifier, and the first electronic device does not start the aging test APP; the first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device starts the aging test APP.

[0008] In this application, the electronic device restarts during the aging test. If the restart is an abnormal restart (such as restarting after a shutdown), the electronic device can write a first identifier at a preset storage address during the restart process. The first identifier is used to indicate that the aging test APP is not started. In response to receiving the second operation for triggering the mobile phone to start the aging APP, the electronic device recognizes that there is a first identifier at the preset storage address, and the electronic device does not start the aging test APP, that is, intercepts the secondary aging test. After the electronic device recognizes that the restart log of this abnormal restart has been uploaded to the server on the cloud side, the electronic device will start the aging test APP and perform a secondary aging test.

[0009] It can be seen that in this application, if the electronic device abnormally restarts during the aging test, the electronic device will control the electronic device not to start the aging test APP, that is, intercept the secondary aging test. Only after the restart log of this abnormal restart is recognized and uploaded to the server, the electronic device will start the aging test APP for secondary aging. In this way, the restart log of the abnormal restart can be uploaded to the server in time to avoid missing uploads.

[0010] In a possible implementation of the first aspect, during the aging test, the first electronic device is restarted, and it is identified whether the first electronic device is an abnormal restart. During the aging test, the restart type of the first electronic device may include an abnormal restart and a normal restart. Among them, the abnormal restart may be, for example, the restart of the first electronic device after the shutdown, and the normal restart may be, for example, a restart in response to the test instruction of the aging test APP. During the aging test, the first electronic device is restarted, and the first electronic device can identify whether this restart is an abnormal restart. If this restart is an abnormal restart, the first electronic device writes a first identifier at a preset storage address. If this restart is not an abnormal restart, the first electronic device can continue to execute the test instruction. In this application, if the electronic device is restarted during the aging test, it can be first identified whether it is an abnormal restart. Only when it is abnormally restarted, the electronic device will set the first identifier to intercept the second aging test. If the electronic device is a normal restart, for example, the electronic device restarts in response to the instruction of the application APP, then the electronic device continues to be tested.

[0011] In a possible implementation of the first aspect, after the first electronic device is successfully restarted, in response to the first operation, the first electronic device outputs a first reminder message, and the first reminder message is used to remind the tester to operate the first electronic device to upload the restart log of the abnormal restart to the server. The first reminder message can be text and / or voice. The reminder message can remind the tester to operate the first electronic device in time to upload the restart log to the server on the cloud side.

[0012] In a possible implementation of the first aspect, the first electronic device may be connected to the second electronic device, and the restart log of the abnormal restart may be uploaded to the server through the second electronic device. The second electronic device may be, for example, a computer in a data acquisition station in a factory.

[0013] Specifically, the first electronic device is connected to the second electronic device, and receives an acquisition instruction from the second electronic device, where the acquisition instruction is used to acquire a restart log of an abnormal restart. In response to the acquisition instruction, the first electronic device acquires the restart log of the abnormal restart and sends the restart log to the second electronic device. The first electronic device receives first indication information from the second electronic device, where the first indication information indicates that the second electronic device has uploaded the restart log to the server. In response to receiving the first indication information, the first electronic device recognizes that the restart log has been uploaded to the server.

[0014] In a possible implementation of the first aspect, the first electronic device may also obtain and upload a restart log. In response to the first operation, the first electronic device does not start the aging test APP. The first electronic device obtains a restart log of an abnormal restart and uploads the restart log to a server. In the present application, the first electronic device may directly obtain and upload the restart log, which may save device overhead.

[0015] In a possible implementation of the first aspect, the first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device deletes the first identifier in the preset storage address. The first electronic device receives a second operation, and the second operation is used to trigger the first electronic device to start an aging test APP. In response to the second operation, the first electronic device recognizes that the first identifier is not stored at the preset storage address, and the first electronic device starts the aging test APP. In the present application, the first electronic device can release the interception of the aging test when recognizing that the restart log has been uploaded.

[0016] In a possible implementation of the first aspect, the first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device deletes the first identifier in the preset storage address. After that, the first electronic device writes the second identifier in the preset storage address, wherein the second identifier is used to indicate the start of the aging test APP. The first electronic device receives a second operation, and the second operation is used to trigger the first electronic device to start the aging test APP. In response to the second operation, the first electronic device recognizes that the second identifier is stored in the preset storage address, and the first electronic device starts the aging test APP. This implementation provides another implementation method for the first electronic device to release the interception of the aging test when recognizing that the restart log has been uploaded.

[0017] In a possible implementation of the first aspect, the present application can write a fault code during the abnormal restart of the first electronic device to accurately control the tester to upload the restart log. During the restart process, the first electronic device writes a first identifier and a fault code at a preset storage address. The fault code corresponds to the software and hardware modules being tested before the abnormal restart of the first electronic device. The first electronic device includes multiple software and hardware modules, and the aging test APP is specifically used to test multiple software and hardware modules in the first electronic device. After the first electronic device is successfully restarted, a first operation is received, and the first operation is used to start the aging test APP. In response to the first operation, the first electronic device outputs a second reminder message, and the second reminder message is used to remind the tester responsible for the software and hardware module corresponding to the fault code to operate the first electronic device to upload the restart log of the abnormal restart to the server. The second reminder message includes a fault code.

[0018] In a second aspect, the present application provides a system for starting a test program, including a first electronic device and a second electronic device. The second electronic device is used to send an acquisition instruction to the first electronic device, and the acquisition instruction is used to obtain a restart log of an abnormal restart of the first electronic device during an aging test. After obtaining the restart log, the second electronic device is also used to upload the restart log to a cloud server. The first electronic device is used to execute a method as described in any one of the first aspects.

[0019] In a third aspect, the present application provides an electronic device, which includes: a memory, a communication module and one or more processors. The memory, the communication module and the processor are coupled; wherein the communication module is used to interact with the electronic device, and the memory is used to store computer program codes, and the computer program codes include computer instructions. When the above-mentioned computer instructions are executed by the processor, the electronic device executes the following method: if the first electronic device restarts abnormally during the aging test process, the first electronic device writes a first identifier at a preset storage address during the restart process, and the first identifier is used to indicate that the aging test APP is not started, and the aging test APP is used to perform an aging test on the first electronic device; after the first electronic device restarts successfully, a first operation is received, and the first operation is used to trigger the first electronic device to start the aging test APP; in response to the first operation, the first electronic device recognizes that the preset storage address stores the first identifier, and the first electronic device does not start the aging test APP; the first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device starts the aging test APP.

[0020] In combination with the third aspect, in a possible implementation, when the above computer instructions are executed by a processor, the electronic device executes the following method: during the aging test, the first electronic device is restarted, and whether the first electronic device is restarted abnormally is identified.

[0021] In conjunction with the third aspect, in a possible implementation, when the above-mentioned computer instructions are executed by the processor, the electronic device executes the following method: after the first electronic device is successfully restarted, in response to the first operation, the first electronic device outputs a first reminder message, and the first reminder message is used to remind the tester to operate the first electronic device to upload the restart log of the abnormal restart to the server. The first reminder message can be text and / or voice.

[0022] In conjunction with the third aspect, in a possible implementation, when the above-mentioned computer instructions are executed by the processor, the electronic device executes the following method: the first electronic device is connected to the second electronic device, and receives an acquisition instruction of the second electronic device, where the acquisition instruction is used to obtain a restart log of an abnormal restart. In response to the acquisition instruction, the first electronic device obtains the restart log of the abnormal restart and sends the restart log to the second electronic device. The first electronic device receives first indication information of the second electronic device, and the first indication information indicates that the second electronic device has uploaded the restart log to the server. In response to receiving the first indication information, the first electronic device recognizes that the restart log has been uploaded to the server.

[0023] In conjunction with the third aspect, in a possible implementation, when the above computer instructions are executed by the processor, the electronic device executes the following method: in response to the first operation, the first electronic device does not start the aging test APP. The first electronic device obtains a restart log of the abnormal restart and uploads the restart log to the server.

[0024] In conjunction with the third aspect, in a possible implementation, when the above-mentioned computer instructions are executed by the processor, the electronic device executes the following method: the first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device deletes the first identifier in the preset storage address. The first electronic device receives a second operation, and the second operation is used to trigger the first electronic device to start the aging test APP. In response to the second operation, the first electronic device recognizes that the preset storage address does not store the first identifier, and the first electronic device starts the aging test APP.

[0025] In conjunction with the third aspect, in a possible implementation, when the above-mentioned computer instructions are executed by the processor, the electronic device executes the following method: the first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device deletes the first identifier in the preset storage address, and then the first electronic device writes the second identifier in the preset storage address, wherein the second identifier is used to indicate the start of the aging test APP. The first electronic device receives the second operation, and the second operation is used to trigger the first electronic device to start the aging test APP. In response to the second operation, the first electronic device recognizes that the second identifier is stored in the preset storage address, and the first electronic device starts the aging test APP.

[0026] In combination with the third aspect, in a possible implementation, when the above-mentioned computer instructions are executed by the processor, the electronic device executes the following method: during the restart process, the first electronic device writes a first identifier and a fault code at a preset storage address, the fault code corresponds to the software and hardware module being tested before the abnormal restart of the first electronic device, the first electronic device includes multiple software and hardware modules, and the aging test APP is specifically used to test multiple software and hardware modules in the first electronic device. After the first electronic device is successfully restarted, a first operation is received, and the first operation is used to start the aging test APP. In response to the first operation, the first electronic device outputs a second reminder message, and the second reminder message is used to remind the tester responsible for the software and hardware module corresponding to the fault code to operate the first electronic device to upload the restart log of the abnormal restart to the server. The second reminder message includes a fault code.

[0027] In a fourth aspect, the present application provides a chip system, which can be applied to an electronic device including a memory. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from the above-mentioned memory and send the signal to the processor, and the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the method as in the first aspect and any possible design thereof.

[0028] In a fifth aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the first aspect and any possible design thereof.

[0029] In a sixth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method of the first aspect and any possible design thereof.

[0030] It can be understood that the beneficial effects that can be achieved by the system for starting the test program of the second aspect, the electronic device of any possible form of the third aspect, the chip system of the fourth aspect, the computer-readable storage medium of the fifth aspect, and the computer program product of the sixth aspect can be referred to as the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A system architecture diagram of an aging test provided in an embodiment of the present application;

[0032] Figure 2 A flowchart of two different schemes for starting the aging test APP provided in the embodiments of the present application;

[0033] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0034] Figure 4 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;

[0035] Figure 5 A schematic diagram of a method for starting a test program provided in an embodiment of the present application;

[0036] Figure 6 A flowchart of another method for starting a test program provided in an embodiment of the present application;

[0037] Figure 7 A flowchart of another method for starting a test program provided in an embodiment of the present application;

[0038] Figure 8 A schematic diagram of a display interface of an electronic device provided in an embodiment of the present application;

[0039] Fig. 9 A schematic diagram of a flow chart of internal module interaction of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] Electronic devices such as mobile phones need to undergo stability testing during the manufacturing process to ensure the reliability of the electronic devices. Stability testing can also be called reliability testing. The purpose of stability testing is to verify the stability and durability of electronic products during long-term use. Common stability tests can include aging tests, stress tests, etc.

[0041] Aging testing is to apply accelerated environmental stress to electronic products, such as temperature stress, electrical stress, heat stress, mechanical stress, etc., to accelerate the exposure of potential defects of electronic products into failures in harsh environments, so as to achieve the purpose of discovering and eliminating potential defects.

[0042] Generally, aging tests can be used to test various software and hardware functional modules in electronic devices to uncover faults in the software and hardware functional modules and avoid missing fault problems.

[0043] Figure 1 This is a system architecture diagram of an aging test provided in an embodiment of the present application. Figure 1 As shown, the aging test system may include a device under test (such as Figure 1 The device includes a mobile phone in the network, a computer connected to the mobile phone, and a server on the cloud side. Figure 1 The software version in the mobile phone under test can be called a burned-in version. That is, the burned-in version can be the software version used by the electronic device during the manufacturing process before it leaves the factory.

[0044] The mobile phone can be installed with an aging test application (APP). The mobile phone can include multiple software and hardware functional modules, such as a display module, a camera module, a Bluetooth module, a Wi-Fi module, a speaker module, a battery module, a video module, etc. Among them, the screen module can include a fingerprint module, a button module, etc. according to different functions.

[0045] Aging test APP is an automated aging test software. Aging test APP can send test instructions to the mobile phone to run various software and hardware functional modules. Exemplary, for example, the aging test APP can send an instruction to the mobile phone to automatically turn on and off the machine for 20 minutes. In response to the instruction, the mobile phone can automatically turn on and then automatically turn on and off the machine for 20 minutes. For example, the aging test APP can send an instruction to the mobile phone to turn on and off the screen for 10 minutes. In response to receiving the instruction, the mobile phone can automatically turn on the screen and then automatically turn off the screen, and execute it in sequence for 10 minutes. When the aging test APP is running on the mobile phone, for different software and hardware functional modules, the aging test APP can send test instructions in sequence to test each software and hardware functional module. The aging test APP can also send test instructions in a loop to test each software and hardware functional module in a loop. For a hardware module, the aging test APP can send one or more test instructions.

[0046] The mobile phone can be connected to a power source when undergoing an aging test. In response to the tester clicking on the application icon of the aging test APP in the mobile phone, the mobile phone starts the aging test APP. After starting the aging test APP, the aging test APP can run the program and send test instructions to the mobile phone. When the test instruction fails to run, the aging test APP can resend the test instruction. When the number of repeated transmissions of an instruction exceeds a threshold, the aging test APP identifies that the test instruction has failed to execute. For a software and hardware functional module, when the number of failed test instructions is greater than a threshold, the aging test APP identifies that the test of the software and hardware functional module has failed. When a software and hardware functional module fails, the aging test APP identifies that the aging test of the mobile phone has failed.

[0047] When a software or hardware functional module fails to be tested, the aging test APP can output indication information 1, which can be, for example, a text prompt. For example, "Screen aging test failed" is displayed on the mobile phone screen. The tester can see the prompt information in time and handle it in time. Indication information 1 can also be a voice reminder, for example. Alternatively, the mobile phone can be connected to a signal light, and indication information 1 can also be a signal light reminder. For example, when the software or hardware functional module test fails, the aging test APP can control the signal light to be red.

[0048] During the aging test, the phone may have a probability of triggering a failure in the software and hardware functional modules, resulting in a system crash and causing the phone to crash. At this time, the phone will have a black screen, unresponsive programs, restart, blue screen or freeze. Crash refers to the phenomenon that the phone's operating system cannot recover from a system error or there is a problem with the hardware module in the phone, causing the phone to be unresponsive for a long time and having to restart the phone. There are many reasons for the phone to crash, for example, a memory leak causes the phone to crash, or a process deadlock causes the phone to crash, etc.

[0049] After the mobile phone crashes, the tester can obtain the fault data at the data acquisition station and upload the fault data to the server on the cloud side. For example, the tester connects the mobile phone to the computer at the data acquisition station, for example, the mobile phone is connected to the computer via the Universal Serial Bus (USB). The computer can view the fault data when the mobile phone crashes and upload the fault data to the server on the cloud side. Figure 1 As shown, the computer connected to the mobile phone can send an acquisition instruction to the mobile phone, and in response to the acquisition instruction, the mobile phone can send fault data to the computer. Afterwards, the computer can upload the fault data to the server in response to the upload instruction of the tester.

[0050] Fault data helps R&D personnel restore the state of the program when it crashes in the mobile phone, and can help locate and troubleshoot problems. Collecting fault data, tracking fault data, and performing big data analysis on fault data can help R&D personnel deal with downtime problems in a timely manner and take some effective preventive measures. For example, for a type of fault data, when the number of such fault data is greater than the threshold, R&D personnel can locate the problem based on such fault data, and then determine whether the design needs to be modified to avoid batch quality problems.

[0051] However, as mentioned above, when a mobile phone crashes and restarts during the aging test, the tester needs to connect the mobile phone to the computer and trigger the computer to upload the fault data. During the operation, the tester may not connect the mobile phone to the computer to capture and upload the fault data. This will result in incomplete acquisition of fault data, affecting the cloud-side server's monitoring and analysis of fault data.

[0052] For example, Figure 2 As shown in a in . In the related art, after the aging test starts, if the mobile phone crashes during the aging test, the tester may directly force the power button to restart the phone. After the aging test stops, the tester may run the aging test APP again to perform a second aging test on the mobile phone. If the second aging test is successful, the tester believes that the aging test of this mobile phone is successful and meets the quality requirements. The tester will not upload the restart log of the mobile phone restart during the last aging test to the server. In this way, it is equivalent to ignoring the downtime problem that occurred during the first aging test, which makes this mobile phone have hidden quality risks. When the user uses this mobile phone, the mobile phone may have unstable operation problems. For example, the mobile phone may restart, freeze, and other failures, affecting the user's experience.

[0053] Based on this, an embodiment of the present application provides a method for starting a test program and an electronic device. The electronic device restarts during the aging test process. If the restart is an abnormal restart (such as restarting after a shutdown), the electronic device can write a first identifier at a preset storage address during the restart process. The first identifier is used to indicate that the aging test APP is not started. In response to receiving a second operation for triggering the mobile phone to start the aging APP, the electronic device recognizes that there is a first identifier at the preset storage address, and the electronic device does not start the aging test APP, that is, intercepts the secondary aging test. After the electronic device recognizes that the restart log of this abnormal restart has been uploaded to the server on the cloud side, the electronic device will start the aging test APP and perform a secondary aging test.

[0054] It can be seen that in this solution, if the electronic device restarts abnormally during the aging test, the electronic device will control the electronic device not to start the aging test APP, that is, intercept the secondary aging test. Only after the restart log of this abnormal restart is recognized and uploaded to the server, the electronic device will start the aging test APP for secondary aging. In this way, the restart log of the abnormal restart can be uploaded to the server in time to avoid missing uploads.

[0055] like Figure 2 As shown in b, the electronic device writes the first identifier during the restart process. After the electronic device stops the first aging test, the electronic device can intercept the second aging test because the first identifier is written. Only after the restart log of the abnormal restart during the first aging test is uploaded to the server, the electronic device can perform the second aging test.

[0056] The method provided in the embodiment of the present application can be applied to electronic devices with data processing capabilities. The first electronic device and the second electronic device in the embodiment of the present application may include mobile phones, tablet computers, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), handheld computers, netbooks, servers, smart home devices (e.g., smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (PDAs), wearable devices (e.g., smart watches, smart bracelets, etc.), vehicle-mounted devices, virtual reality devices, etc., and the embodiment of the present application does not impose any restrictions on this. In the embodiment of the present application, the above-mentioned electronic devices are electronic devices that can run operating systems and install applications. Optionally, the operating system running on the electronic device may be system, system, System, etc.

[0057] For example, please refer to Figure 3 , which shows a schematic diagram of the structure of an electronic device 300. The first electronic device or the second electronic device may be the electronic device 300. The electronic device 300 may include a processor 310, an external memory interface 320, an internal memory 321, an audio module 330, a speaker 330A, a microphone 330B, a display screen 340, a communication module 350, a power module 360, an input device 370, a sensor module 380, etc. Among them, the sensor module 380 may include a pressure sensor, a touch sensor, etc.

[0058] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 300. In other embodiments of the present application, the electronic device 300 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0059] The processor 310 may include one or more processing units. For example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 300 may also include one or more processors 310.

[0060] The controller is the nerve center and command center of the electronic device 300. It can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0061] The application processor can run the operating system of the electronic device 300, which is used to manage the hardware and software resources of the electronic device 300. For example, it can manage and configure memory, determine the priority of system resource supply and demand, control input and output devices, operate the network, manage the file system, manage drivers, etc. The operating system can also be used to provide an operation page for users to interact with the system. Among them, various types of software can be installed in the operating system, such as drivers, applications (applications, Apps), etc.

[0062] NPU is a neural network (NN) computing processor, which can quickly process input information and continuously self-learn by drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain. NPU can realize applications such as intelligent cognition of electronic device 300.

[0063] The processor 310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.

[0064] In some embodiments, the processor 310 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.

[0065] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 300. In other embodiments of the present application, the electronic device 300 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0066] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 300. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0067] The internal memory 321 can be used to store one or more computer programs, which include instructions. The processor 310 can execute the above instructions stored in the internal memory 321, so that the electronic device 300 executes the application operation method provided in some embodiments of the present application, as well as various applications and data management. The internal memory 321 may include a code storage area and a data storage area. Among them, the data storage area can store data created during the use of the electronic device 300, etc. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (universal flash storage, UFS), etc. In some embodiments, the processor 310 can execute the application operation method provided in the embodiment of the present application, as well as other applications and data management by running instructions stored in the internal memory 321, and / or instructions stored in a memory provided in the processor 310. In the embodiment of the present application, the electronic device 300 includes a disk storage component, which includes an original equipment manufacturer (Original Equipment Manufacturer, OEM) partition. The OEM partition stores data such as system acquisition files, drivers, and software pre-installed by the manufacturer. In an embodiment of the present application, if the electronic device 300 restarts abnormally during the aging test process, the electronic device 300 may write a first identifier in the disk OEM partition during the restart process. The first identifier is used to indicate that the aging test APP is not started. When the electronic device 300 receives an operation for triggering the electronic device 300 to start the aging test APP, the electronic device 300 may identify whether the disk OEM partition has the first identifier. If the electronic device 300 reads the first identifier from the disk OEM partition, the electronic device 300 does not start the aging test APP. If the electronic device 300 does not read the first identifier from the disk OEM partition, the electronic device 300 starts the aging test APP. After the electronic device 300 recognizes that the restart log of the abnormal restart has been uploaded to the server, the electronic device 300 may delete the first identifier in the disk OEM partition.

[0068] The electronic device 300 can implement audio functions through an audio module 330, a speaker 330A, a microphone 330B, and an application processor, etc. For example, music playing, recording, etc. The audio module 330 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 330 can also be used to encode and decode audio signals. In some embodiments, the audio module 330 can be arranged in the processor 310, or some functional modules of the audio module 330 can be arranged in the processor 310.

[0069] The speaker 330A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. In the embodiment of the present application, the first reminder information or the second reminder information can be a voice reminder, and the electronic device 300 can output the first reminder information or the second reminder information through the speaker 330A.

[0070] The microphone 330B, also called a "microphone" or a "microphone", is used to convert a sound signal into an electrical signal. A user can make a sound by approaching the microphone 330B with his or her mouth, and the sound signal is input into the microphone 330B.

[0071] The communication function of the electronic device 300 can be realized through the antenna 1, the antenna 2 and the communication module 350.

[0072] The communication module 350 can provide solutions for wireless communications including cellular, Wi-Fi, Bluetooth (BT), wireless data transmission modules (e.g., 433MHz, 868MHz, 915MHz) applied to the electronic device 300. The communication module 350 can be one or more devices integrating at least one communication processing module. The communication module 350 receives electromagnetic waves via antenna 1 or antenna 2, filters and frequency modulates the electromagnetic wave signals, and sends the processed signals to the processor 310. The communication module 350 can also receive the signal to be sent from the processor 310, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through antenna 1 or antenna 2.

[0073] The electronic device 300 implements the display function through a GPU, a display screen 340, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 340 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change display information.

[0074] The display screen 340 is used to display images, videos, etc. The display screen 340 includes a display panel. In the embodiment of the present application, the first reminder information or the second reminder information can be a text reminder, and the electronic device 300 can output the first reminder information or the second reminder information through the display screen 340.

[0075] The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a Micro LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 300 may include 1 or N display screens 340, where N is a positive integer greater than 1. In the embodiment of the present application, the display screen 340 may be used to display a UI and receive user operations on the UI.

[0076] In some embodiments, the display screen 340 is provided with a pressure sensor, a touch sensor, and the like. The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. When a touch operation is applied to the display screen 340, the electronic device 300 detects the strength of the touch operation based on the pressure sensor. The electronic device 300 can also calculate the position of the touch based on the detection signal of the pressure sensor. The touch sensor, also known as a "touch panel", can form a touch screen, also known as a "touch screen", with the display screen 340. The touch sensor is used to detect touch operations applied thereto or thereabout. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can also be provided through the display screen 340.

[0077] The power module 360 ​​can be used to supply power to various components included in the electronic device 300. In some embodiments, the power module 360 ​​can be a battery, such as a rechargeable battery.

[0078] The input device 370 may include a keyboard, a mouse, etc. The keyboard is used to input English letters, numbers, punctuation marks, etc. into the electronic device 300, thereby issuing commands to the electronic device 300, inputting data, etc. The mouse is an indicator for the vertical and horizontal coordinates of the display system of the electronic device 300, and is used to input instructions, etc. to the electronic device 300. Among them, the input device 370 can be connected to the electronic device 300 through a wired connection, for example, the input device 370 is connected to the electronic device 300 through a GPIO interface, a USB interface, etc. The input device 370 can also be connected to the electronic device 300 wirelessly, for example, the input device 370 is connected to the electronic device 300 through Bluetooth, infrared, etc.

[0079] Take the above electronic device 300 as a mobile phone as an example. The software system of the electronic device 300 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device 300.

[0080] Figure 4 It is a software structure block diagram of the electronic device 300 according to an embodiment of the present invention.

[0081] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime), the system library, and the kernel layer.

[0082] The application layer can include a series of application packages.

[0083] The application layer can include various applications, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, and other applications.

[0084] like Figure 4 As shown, in the embodiment of the present application, the application layer may further include an aging test APP. When the aging test APP is running, a test instruction may be sent to each software and hardware functional module in the electronic device 300 to test each software and hardware functional module.

[0085] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0086] The application framework layer may include content providers, view systems, resource managers, notification managers, input systems, stability service modules, etc.

[0087] The input system is used to monitor the input module (such as touch screen driver) of the electronic device 300, and convert the parameters input by the input module into usable events, and pass them to the relevant modules of the upper layer. For example, the input system is used to monitor the touch screen of the electronic device 300 through the touch screen driver, and convert the touch parameters generated by the touch operation input by the touch screen into usable events, and pass them to the upper layer APP. For example, in an embodiment of the present application, in response to the tester clicking the application icon of the aging test APP on the display interface of the electronic device 300, the input system sends a start instruction to the aging test APP, and the start instruction indicates to start the aging test APP.

[0088] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0089] The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. A display page can be composed of one or more views. For example, a display page including a text notification icon can include a view for displaying text and a view for displaying images.

[0090] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the display in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0091] The stability service module is used to respond to the restart of the electronic device 300 and identify whether it is an abnormal restart. When the restart is identified as an abnormal restart, the stability service module can call the system API interface to write a first identifier or a fault code at a preset storage address. After the restart log of the abnormal restart is identified and uploaded, the stability service module can delete the first identifier or fault code at the preset storage address.

[0092] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.

[0093] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0094] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0095] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0096] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0097] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0098] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0099] A 2D graphics engine is a drawing engine for 2D drawings.

[0100] The kernel layer is a layer between hardware and software. The kernel layer may include display drivers, audio drivers, sensor drivers, log systems, etc. The log system may respond to calls, write logs or read logs. In an embodiment of the present application, a process may call a log system to generate a downtime log when the electronic device 300 is down, and generate a restart log when the electronic device 300 is restarted.

[0101] In the embodiment of the present application, the electronic device is an electronic device to be tested, for example, a test version electronic device.

[0102] The following takes the example that the first electronic device of the test version is a test version mobile phone (hereinafter referred to as mobile phone) and the second electronic device is a computer to introduce a testing method of an electronic device provided in an embodiment of the present application. Figure 5 A flowchart of a method for testing an electronic device provided in an embodiment of the present application.

[0103] In S501, the mobile phone receives a third operation.

[0104] The aging test APP can be an application installed in the mobile phone. The aging test APP can be an application written by developers using the Java language. The aging test APP is used to send test instructions to the mobile phone, and the test instructions are used to test various software and hardware functional modules in the mobile phone.

[0105] The third operation is used to trigger the mobile phone to start the aging test APP. The third operation may be, for example, that the tester clicks the application icon of the aging test APP on the display interface of the mobile phone.

[0106] In S502 , the mobile phone starts and runs the aging test APP in response to the third operation.

[0107] In response to the tester clicking the application icon of the aging test APP, the mobile phone can start and run the aging test APP.

[0108] If the mobile phone restarts abnormally during the aging test, the mobile phone writes the first identifier at the preset storage address. Further, if the mobile phone restarts during the aging test, the mobile phone can first identify whether the restart is an abnormal restart. If the mobile phone identifies that the restart is an abnormal restart, the mobile phone can write the first identifier at the preset storage address. Optionally, the mobile phone can execute S503.

[0109] In S503, if the mobile phone is restarted during the aging test, it is identified during the restart process whether the restart is an abnormal restart.

[0110] During the aging test, the phone may crash due to hardware or software failures. There are many reasons for the phone to crash. Hardware failures can cause the phone to crash. For example, hardware failures such as hard disk failure, memory failure, abnormal heat dissipation such as local overtemperature, circuit damage, etc. can cause the phone to crash during the aging test. Software failures can also cause the phone to crash. For example, the operating system is damaged, the program has code vulnerabilities, etc. For example, the program has code vulnerabilities that cause memory leaks, memory overflows, process deadlocks, and other abnormalities, which can also cause the phone to crash during the aging test.

[0111] After the phone crashes, the tester needs to restart the phone. After the phone crashes, a black screen, blue screen, flashing screen, white screen, long-term unresponsiveness, etc. will appear. The tester can identify the phone crash based on the changes in the phone screen and restart the phone in time. In some embodiments, after the phone crashes, a black screen, blue screen, flashing screen, white screen, long-term unresponsiveness, etc. will appear, which can be called a DUMP failure of the phone.

[0112] After the mobile phone crashes during the aging test, there are many ways to restart the mobile phone. For example, the tester long presses the power button (Power button) of the mobile phone, and in response to this operation, the mobile phone restarts. For another example, the tester runs an application for capturing crash fault data, and the application can trigger the restart of the mobile phone after capturing the crash fault data. The application can, for example, be a transmission software developed for a class of chips, and the transmission software can be installed in a mobile phone or a PC. If the transmission software is installed in the mobile phone, the mobile phone crashes during the aging test, and the tester can open the software, and the transmission software can automatically capture the crash data of the program at the time of the crash and save it. After that, the transmission software will trigger the restart of the mobile phone. If the transmission software is installed in the PC, after the tester connects the mobile phone to the PC, the transmission software is started and run on the PC side, and the transmission software triggers the restart of the mobile phone after capturing the crash data of the mobile phone. For another example, after the mobile phone crashes, the tester connects the mobile phone to the PC, and in response to the tester inputting a control command in the PC, the PC sends a restart instruction to the mobile phone, and in response to the restart instruction, the mobile phone restarts.

[0113] During the aging test, the phone will not only restart due to a crash, but also restart in response to a restart command sent by an application installed in the phone. For example, when testing the power on / off module in the phone, the aging test APP will also send a restart command to the phone. The phone restarts after receiving the restart command sent by the aging test APP.

[0114] It should be understood that the mobile phone is always connected to a power source during the aging test, and therefore, the restart of the mobile phone during the aging test is a non-stop restart.

[0115] If the mobile phone restarts during the aging test, the mobile phone identifies whether this restart is an abnormal restart during the restart process. During the aging test, when the mobile phone restarts in response to receiving a restart instruction sent by an application such as an aging test APP, the restart is a normal restart. All other restarts are abnormal restarts. The restart process can be the process from the mobile phone restarting in response to the restart instruction until the mobile phone is completely restarted. That is, before the mobile phone is completely restarted, the mobile phone can identify whether this restart is an abnormal restart.

[0116] The mobile phone can first identify the restart reason of the current restart, and then identify whether the current restart is an abnormal restart based on the restart reason.

[0117] Exemplarily, before the mobile phone restarts, it writes the restart reason into a dedicated hardware resource or a preset memory address. After the mobile phone restarts, it can read the reason for the current restart from the dedicated hardware resource or the preset memory address. For another example, the mobile phone can obtain the restart log of the current restart. The restart log includes the restart reason of the current restart, and the mobile phone can obtain the reason for the current restart from the restart log.

[0118] The mobile phone restarts during the aging test. The reasons for the mobile phone restart may include application restart and abnormal restart. Application restart may be that the mobile phone receives a restart instruction sent by the application installed in the mobile phone and restarts. Abnormal restart may be a restart other than application restart.

[0119] The mobile phone can obtain the restart flag of this restart, which is used to mark a type of restart reason. For example, the restart flag 1 can be "0", and the restart flag 1 can indicate that the restart reason is an application restart. The restart flag 2 can be "1", and the restart flag 2 can indicate that the restart reason is an abnormal restart.

[0120] Alternatively, the mobile phone may obtain the process that triggers the restart of the mobile phone, and directly identify whether the restart is an abnormal restart based on the call stack information of the process.

[0121] When the mobile phone identifies that the restart is an abnormal restart, the mobile phone can execute S504. If the restart is not an abnormal restart, for example, the mobile phone restarts in response to the test instruction of the aging test APP, the mobile phone can continue to receive the test instruction of the aging test APP after the restart and continue to perform the aging test.

[0122] In S504, if the current restart is an abnormal restart, the mobile phone may write a first identifier into a preset storage address.

[0123] The first identifier indicates not to start the aging test APP, and the first identifier may be “Y”.

[0124] The preset storage address is used to store the first identifier. The preset storage address may be a preset storage address in the memory. The preset storage address may also be a disk OEM partition (Oemifno). The disk OEM partition is used to store drivers and other software provided by the operating system manufacturer. For example, the disk OEM partition may store software that comes with the mobile phone when it leaves the factory, one-key restore software, etc.

[0125] At S505, the mobile phone is restarted successfully.

[0126] In S506 , the mobile phone receives a first operation.

[0127] Usually, the aging test app will run after it is started until the aging test is completed. Even if the phone is restarted during the aging test, the aging test of the phone will continue to run after the restart.

[0128] If the mobile phone restarts abnormally during the aging test, the aging test APP can output an indication of test failure after the aging test APP ends. After the first aging test fails, the tester may perform another aging test on the mobile phone. Or, in order to save test time, since the mobile phone restarts abnormally during the aging test, after the restart, the tester may not wait until the aging test APP ends before performing the second aging test. The tester can use a script to stop the previous aging test.

[0129] After the first aging test stops, the mobile phone may receive a first operation for starting the aging test APP. That is, the first operation is used to trigger the mobile phone to start the aging test APP. The first operation is similar to the third operation, which can be seen in the previous description and will not be repeated here.

[0130] After the mobile phone receives the operation for starting the aging test APP (such as the third operation or the first operation mentioned above), the mobile phone can first identify whether the preset storage address stores the first identifier. After the mobile phone receives the third operation or the first operation, if it is identified that the preset storage address stores the first identifier, the mobile phone may not start and execute the aging test APP. After the mobile phone receives the third operation or the first operation, if it is identified that the preset storage address does not store the first identifier, the mobile phone can start and execute the aging test APP.

[0131] Figure 5 Specifically, after receiving the third operation, the mobile phone identifies that the preset storage address does not store the first identifier. If the mobile phone identifies that the preset storage address stores the first identifier after receiving the third operation, the mobile phone can directly execute S507, that is, execute S507 after S501, without starting the aging test APP.

[0132] In S507 , in response to the first operation, if the mobile phone recognizes that the preset storage address stores the first identifier, the mobile phone does not start the aging test APP.

[0133] In response to the first operation, the mobile phone recognizes that the preset storage address stores the first identifier, and the mobile phone does not start the aging test APP. After the tester recognizes that the mobile phone does not start the aging test APP, the tester can connect the mobile phone to the computer and upload the fault data of the abnormal restart of the mobile phone through the computer.

[0134] Optionally, the mobile phone does not start the aging test APP, and the mobile phone can output a first reminder message at the same time. The first reminder can be one or more of a text reminder and a voice reminder.

[0135] The first reminder information is used to remind the tester to capture the fault data of the abnormal restart of the mobile phone and upload the fault data to the cloud-side server. The first reminder can be, for example, a voice reminder, and the voice reminder can be, for example, "Please capture the fault data and upload it." After the mobile phone generates the voice reminder, it can play the voice reminder through the speaker.

[0136] The first reminder information may be a text reminder, and the text reminder may be, for example, “Please capture the fault data and upload it.” After the mobile phone generates the first reminder information, the mobile phone screen may display the text reminder.

[0137] After receiving the first reminder information, the tester can connect the mobile phone to the computer, and obtain the fault data of the abnormal restart of the mobile phone on the computer connected to the mobile phone and upload the fault data. For example, the tester can use the computer connected to the mobile phone at the data acquisition station to obtain the fault data of the restart of the mobile phone and upload it.

[0138] At S508, the mobile phone is connected to the computer.

[0139] The mobile phone can establish a connection with the computer via a wired or wireless connection. The mobile phone can establish a wired connection with the computer via a USB cable. The mobile phone can establish a wireless communication connection with the computer, for example, the mobile phone can establish a short-range wireless communication connection with the computer. For example, the mobile phone can establish a wireless LAN 802.11 (wireless fidelity, Wi-Fi) connection, Bluetooth (Bluetooth, BT) connection, short-range communication (near field communication, NFC), etc. with the computer. For example, the mobile phone can also establish an account connection with the computer.

[0140] For example, the tester recognizes that the mobile phone does not start the aging test APP, or the tester receives the first reminder information, and the tester can use a USB cable to connect the mobile phone to the computer.

[0141] This application does not limit the timing of establishing a wireless communication connection between a mobile phone and a computer. Optionally, the tester recognizes that the mobile phone does not start the aging test APP, or the tester triggers the mobile phone to establish a wireless connection with the computer after receiving the first reminder message. Alternatively, before the first aging test begins, that is, before S501, the mobile phone has already established a wireless communication connection with the computer. Alternatively, when the mobile phone executes any step in S501-S508, the mobile phone can establish a wireless communication connection with the computer.

[0142] In S509, the computer sends an acquisition instruction to the mobile phone.

[0143] In such Figure 1 In the data acquisition station shown, the tester can trigger the computer to send an acquisition instruction to the mobile phone, and the acquisition instruction is used to obtain the fault data of the last abnormal restart of the mobile phone. The fault data can be a restart log of the abnormal restart of the mobile phone. The mobile phone can generate a restart log when it restarts. The restart log includes information such as the restart time of the mobile phone, the reason for the restart, the type of mobile phone restart, the process that triggered the restart, the call stack information of the process, and the place where the system is blocked.

[0144] For example, the tester inputs an acquisition instruction on the computer side, and the computer forwards the acquisition instruction to the mobile phone. Alternatively, the tester runs a preset script on the computer. The preset script may be, for example, a code program written in Java. When the preset script is run on the computer, it may automatically send an acquisition instruction to the mobile phone. Alternatively, as another example, a log acquisition software may be installed on the computer, and after the tester starts the software on the computer, the software may automatically send an acquisition instruction to the mobile phone.

[0145] At S510 , in response to the acquisition instruction, the mobile phone acquires the restart log of the last abnormal restart.

[0146] When the mobile phone abnormally restarts, a restart log may be automatically generated, and the mobile phone may obtain the restart log in response to the acquisition instruction. After obtaining the restart log, the mobile phone may execute S509.

[0147] At S511, the mobile phone sends a restart log to the computer.

[0148] At S512 , in response to receiving the restart log, the computer uploads the restart log to the server.

[0149] The computer can upload all the data in the restart log to the server, or upload part of the data in the restart log to the server. For example, the computer can parse the restart log, obtain the restart reason and restart type, and upload the restart reason and restart type to the server. Among them, the restart reason can be, for example, thread blocking, null pointer, illegal address, hardware abnormality, etc. The restart type can be an abnormal restart. For example, after obtaining the restart log, the log analysis software or the preset script can analyze the restart log and locate the restart reason and restart type of the mobile phone restart. The computer can upload the restart log to the server automatically or in response to the trigger of the tester.

[0150] After the mobile phone recognizes that the restart log of the abnormal restart has been uploaded to the cloud-side server, the mobile phone can start the aging test APP to perform a second aging test on the mobile phone. Optionally, after the computer uploads the restart log to the cloud-side server, it can send a first indication message to the mobile phone. In response to receiving the indication message, the mobile phone recognizes that the restart log has been uploaded, and the mobile phone can start the aging test APP. Optionally, the computer can execute S513.

[0151] In S513, the computer sends a first instruction message to the mobile phone.

[0152] The first indication information is used to indicate that the computer has uploaded the restart log to the server. The computer can send the first indication information to the mobile phone automatically or in response to the trigger of the tester. For example, after uploading the restart log to the server, the computer automatically sends the first indication information to the mobile phone. Or, after uploading the restart log to the server, the computer can display an interface indicating that the upload is completed, and the interface includes a first control. In response to the tester clicking the first control, the computer sends the first indication information to the mobile phone.

[0153] In response to receiving the first indication information, the mobile phone can start and run the aging test APP. Further, in response to receiving the first indication information, the mobile phone can first delete the first identifier in the preset storage address, and then, when the mobile phone recognizes that the preset storage address does not store the first identifier, the mobile phone can start the aging test APP. That is, the mobile phone can execute S514-S515.

[0154] In S514, in response to receiving the first indication information, the mobile phone deletes the first identifier in the preset storage address.

[0155] At S515 , the mobile phone recognizes that the preset storage location does not store the first identifier, and the mobile phone starts and runs the aging test APP.

[0156] After deleting the first identifier, the mobile phone can start and run the aging test APP automatically or in response to the second operation of the tester. The second operation is used to trigger the mobile phone to start the aging test APP. The second operation is consistent with the first and third operations in the previous text and will not be repeated here. After deleting the first identifier, the mobile phone recognizes that the first identifier is not stored in the preset storage location, and the mobile phone can start and run the aging test APP.

[0157] Optionally, after deleting the first identifier in the preset storage address, the mobile phone can write a second identifier in the preset storage address, and the second identifier is used to indicate starting the aging test APP. When the mobile phone recognizes that the preset storage location stores the second identifier, the mobile phone can start the aging test APP.

[0158] In this way, after the mobile phone recognizes that the restart log of the last abnormal restart has been uploaded, it can start the aging test APP again to perform a second aging test on the mobile phone to avoid missing the upload of the restart log of the abnormal restart.

[0159] The mobile phone can not only respond to the trigger acquisition command of the computer, obtain the restart log of the last abnormal restart, and upload the restart log through the computer. The mobile phone can also automatically obtain the restart log and upload the restart log to the server on the cloud side. Figure 6 shown.

[0160] Optionally, after executing S507, the mobile phone may execute S601.

[0161] At S601, the mobile phone obtains a reboot log of the last abnormal reboot.

[0162] Exemplarily, the mobile phone can execute a restart log acquisition instruction to acquire the restart log. The restart log acquisition instruction can be pre-configured in the mobile phone, or can be input into the mobile phone by the tester. For example, the tester can use the keyboard of the mobile phone to input the restart log acquisition instruction.

[0163] In S602, the mobile phone will restart the log upload server.

[0164] After obtaining the restart log, the mobile phone can automatically upload the restart log to the server. Exemplarily, the mobile phone can upload the restart log to the server using wireless transmission technology. The mobile phone can also upload the restart log to the server in response to a trigger by a tester.

[0165] After the mobile phone uploads the restart log to the server, the mobile phone can execute S603 after recognizing that the restart log has been uploaded. Figure 6 As shown, S603 may include S514 and S515.

[0166] The mobile phone can automatically execute S514 to delete the first identifier in the preset storage address. For example, after the mobile phone uploads the restart log to the server, it triggers the mobile phone to automatically execute S514. The mobile phone can also execute S514 in response to the trigger of the tester. For example, the tester can use the mobile phone keyboard to enter a deletion instruction, and in response to the deletion instruction, the mobile phone executes S514.

[0167] It can be seen that in this solution, if an abnormal restart occurs during the first aging test of the mobile phone (i.e., restart after shutdown), the mobile phone can write the first identifier to the preset storage address. In this way, when the mobile phone wants to restart the aging test APP to perform a second aging test on the mobile phone, the mobile phone will not start the aging test APP because it recognizes that there is a first identifier at the preset storage address. After the mobile phone recognizes that the restart log is uploaded to the server, the mobile phone can restart the aging test APP to perform a second aging test on the mobile phone.

[0168] That is to say, in this solution, after the mobile phone abnormally restarts during the first aging test, since the mobile phone writes a first identifier at the preset storage address, the first identifier indicates not to start the aging test APP. Only after uploading the restart log of the last abnormal restart of the mobile phone to the server, can the mobile phone start the aging test APP again. In this way, the problem of missing the upload of the restart log can be avoided, which helps to collect the restart log of the abnormal restart of the mobile phone more comprehensively, and helps to monitor the abnormal restart failure of the mobile phone and analyze big data.

[0169] The aging test APP can perform aging tests on various software and hardware modules in the mobile phone. After the mobile phone restarts abnormally, the mobile phone writes the first identifier to the preset storage address and can also write the fault code. Among them, the fault code corresponds to the software and hardware functional module being tested when the mobile phone crashes during the aging test. For example, when the mobile phone crashes while testing the display module, it causes an abnormal restart. The mobile phone can write the fault code corresponding to the display module to the preset storage address.

[0170] Usually, the aging test positions within the manufacturer can be further subdivided according to the software and hardware functional modules, and different aging test positions are supported by different testers. If the mobile phone crashes during the aging test, the reason for the crash is likely related to the software and hardware modules being tested at the time of the crash. The fault code helps to remind the corresponding tester to handle the abnormal restart failure of the mobile phone. Exemplary, the fault code can be shown in Table 1.

[0171] Table 1

[0172] Software and hardware functional modules Fault Codes Display module XSP Camera Module XJ Speaker Module YQ Battery Module DC

[0173] like Figure 7 As shown, S504 may specifically include S701.

[0174] In S701, if the current restart is an abnormal restart, the mobile phone writes a first identifier and a fault code into a preset storage address.

[0175] After the mobile phone recognizes that the current restart is an abnormal restart, the mobile phone can also identify the software and hardware functional modules that the mobile phone was testing at the time of the last downtime. For example, the mobile phone can read the downtime log and identify the software and hardware functional modules that the mobile phone was testing at the time of the downtime from the downtime log.

[0176] When a mobile phone crashes, a crash log is generated. The crash log can be a memory image file when the mobile phone crashes. The crash log can record information during kernel startup and operation, such as kernel errors, warning information, etc. The crash log can also record the operation of each application in the mobile phone. The crash log can also record information during the startup and operation of the mobile phone system, such as system errors, warning information, etc. The crash log can be, for example, a memory image file (dump file) of a process. The dump file saves relevant information about the program running, such as memory, stack, handle, thread, etc. when the program is running.

[0177] After identifying the software and hardware function modules that the mobile phone was testing at the time of the downtime, the mobile phone can determine the fault code based on the mapping relationship between the software and hardware function modules and the fault code. After that, the mobile phone can write the fault code to the preset storage address.

[0178] Afterwards, the mobile phone executes S505 to S507. After the mobile phone executes S507, the mobile phone can execute S702.

[0179] In S702, the mobile phone outputs a second reminder message, where the second reminder message includes a fault code.

[0180] The second reminder information is of the same type as the first reminder information, and is used to remind the tester to capture the fault data of abnormal restart of the mobile phone and upload the fault data to the cloud-side server. The difference is that the second reminder information can also include a fault code, which is used to remind the tester responsible for handling the fault of the software and hardware functional module corresponding to the fault code to capture the fault data of abnormal restart of the mobile phone and upload the fault data to the cloud-side server.

[0181] The second reminder information can be one or more of text or voice. Taking the first reminder information and the second reminder information as text as an example, Figure 8A possible implementation is shown. Figure 8 The figure a shows that the mobile phone displays the first interface, which includes the first reminder information. Figure 8 The figure b shows that the mobile phone displays the second interface, the second interface includes the second reminder information, and the second reminder information includes the fault code.

[0182] Afterwards, the tester of the software or hardware functional module failure corresponding to the fault code can trigger the interaction between the computer and the mobile phone to execute the method shown in S508-S515.

[0183] After the mobile phone recognizes that the preset storage address stores the first identifier, the mobile phone can automatically obtain the restart log of the last abnormal restart of the mobile phone and upload it. At this time, since the mobile phone can automatically obtain the restart log and upload it without the need for the tester to trigger it, the mobile phone does not need to write the fault code to the preset storage address, nor does it need to output the second reminder information.

[0184] That is to say, if the mobile phone needs to be triggered by the tester to obtain the restart log and upload it to the cloud, the mobile phone needs to output the first reminder information or the second reminder information to remind the tester to trigger the mobile phone in time.

[0185] In the above embodiments, the method of the embodiment of the present application is introduced from the perspective of the mobile phone as the execution subject. The specific implementation of the method provided by the embodiment of the present application requires the support of various software and hardware modules in the mobile phone. In the following embodiments, the method of the embodiment of the present application is introduced through the interaction of various software and hardware modules in the mobile phone.

[0186] The mobile phone may include a stability service module, which can identify whether the current restart of the mobile phone is an abnormal restart, and when it is identified that the current restart of the mobile phone is an abnormal restart, write the first identifier and / or fault code to a preset storage address.

[0187] like Fig. 9 As shown, Fig. 9 The method flow shown can be executed by the stability service module, aging test APP, and log acquisition module in the mobile phone.

[0188] At S901 , in response to a mobile phone restart, the stability service module identifies whether the restart is an abnormal restart.

[0189] In S902, if the current restart is identified as an abnormal restart, the stability service module obtains a fault code.

[0190] At S903 , the stability service module identifies whether the fault code is legitimate.

[0191] The stability service module can identify whether the fault code is one of multiple fault codes based on multiple fault codes pre-stored in the mobile phone. If the fault code is one of multiple fault codes, the stability service module identifies that the fault code is legal. If the fault code is not one of multiple fault codes, the stability service module identifies that the fault code is illegal. After the stability service module identifies that the fault code is legal, the stability service module can execute S904. After the stability service module identifies that the fault code is illegal, the stability service module no longer executes the current write process, and the process ends. Afterwards, the stability module can re-execute S902.

[0192] At S904, the stability service module calls the production general API interface to obtain the software version of the mobile phone.

[0193] After obtaining the software version of the mobile phone, the stability service module may execute S905.

[0194] At S905 , the stability service module identifies whether the software version of the mobile phone is a burned-in version.

[0195] The burned-in version can be the software version used in the manufacturing process of the electronic device before it leaves the factory. The stability service module identifies whether the software version of the mobile phone is a burned-in version, that is, identifies whether the mobile phone is a test version mobile phone in the factory. After identifying that the software version in the mobile phone is a burned-in version, the stability service module can execute S906. When it is identified that the software version in the mobile phone is not a burned-in version, the stability service module identifies that the mobile phone is not a test version mobile phone and may be a commercial mobile phone, and the stability service module no longer executes the write process. That is, if the software version in the mobile phone is not a burned-in version, the process ends.

[0196] At S906 , the stability service module identifies whether the mobile phone is in an aging test process.

[0197] As mentioned above, after the aging test app is started, it will continue to run until the aging test is completed. Even if the phone is restarted during the aging test, the aging test of the phone is still in progress after the restart. The stability service module can identify whether the aging test module is running, and then identify whether it is in the aging test process.

[0198] If the mobile phone is in the aging test process, the stability service module executes S907. If the mobile phone is not in the aging test process, the process ends.

[0199] In S907 , the stability service module calls the production general API interface and writes the first identifier and / or fault code into a preset storage address.

[0200] After the first identifier and / or fault code is written to the preset storage address, the aging test APP may execute S908 in response to the triggering of the instruction for starting the aging test APP. For example, after the first aging test is completed, in response to the tester clicking the application icon of the aging test APP on the mobile phone interface, the aging test APP may execute S908.

[0201] In S908, the aging test APP recognizes that the preset storage location stores the first identifier, triggering the mobile phone to display the second interface, where the first interface includes the second reminder information.

[0202] The second interface can be, for example, Figure 8 As shown in b in the figure. The second interface may be an interface of the aging test APP. For example, in response to the tester clicking the application icon of the aging test APP, the aging test APP displays the second interface.

[0203] The mobile phone displays the second interface, and the tester can connect the mobile phone to the computer to obtain the restart log of the abnormal restart of the mobile phone through the computer. The computer can send an acquisition instruction to the mobile phone, and in response to receiving the instruction, the log acquisition module can execute S909.

[0204] Optionally, the mobile phone can automatically obtain the restart log of the abnormal restart without relying on the trigger of the tester. In this case, step S908 can specifically be: the aging test APP recognizes that the preset storage location stores the first identifier, and triggers the log acquisition module to execute S909.

[0205] In S909, the log acquisition module acquires the restart log of the last abnormal restart of the mobile phone.

[0206] After obtaining the restart log of the last abnormal restart of the mobile phone, the log module can send the restart log to the computer connected to the mobile phone, and the computer uploads the restart log to the server.

[0207] Optionally, the mobile phone may further include an upload module, and the log acquisition module may send the restart log to the upload module, and the upload module uploads the restart log to the server.

[0208] After the computer connected to the mobile phone uploads the restart log to the server, the computer can send a first indication message to the mobile phone. In response to the first indication message, the stability service module can execute S910.

[0209] Optionally, the upload module in the mobile phone restarts the log upload server and triggers the stability service module to execute S910.

[0210] In S910, the stability service module deletes the first identifier in the preset storage address.

[0211] At S911, the aging test APP is started and running.

[0212] After the first identifier in the preset storage address is deleted, the aging test APP can be started and run automatically or in response to a start instruction.

[0213] For example, after deleting the first identifier, the deletion module in the mobile phone triggers the aging test APP to start and run. Alternatively, in response to the tester clicking the application icon of the aging test APP in the mobile phone display interface again, the mobile phone starts and runs the aging test APP.

[0214] The present application embodiment provides an electronic device, which includes: a memory and one or more processors. The memory is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute the various functions or steps executed by the mobile phone in the above method embodiment. The structure of the electronic device can refer to Figure 3 The structure of the electronic device 300 is shown.

[0215] The present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are in the above electronic device (such as Figure 3 When the method is executed on the electronic device 300 shown in the figure, the electronic device executes each function or step in the above method embodiment.

[0216] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step in the above method embodiment.

[0217] The embodiment of the present application also provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected by lines. For example, the interface circuit can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (such as a processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instruction is executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.

[0218] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0219] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0220] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0221] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0222] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0223] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for starting a test program, characterized in that: Applied to a first electronic device, the method includes: If the first electronic device abnormally restarts during the aging test, the first electronic device writes a first identifier at a preset storage address during the restart process, the first identifier is used to indicate not to start the aging test APP, and the aging test APP is used to perform an aging test on the first electronic device; After the first electronic device is successfully restarted, a first operation is received, where the first operation is used to trigger the first electronic device to start the aging test APP; In response to the first operation, the first electronic device recognizes that the preset storage address stores the first identifier, and the first electronic device does not start the aging test APP; The first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device starts the aging test APP.

2. The method according to claim 1, characterized in that If the first electronic device abnormally restarts during the aging test, before the first electronic device writes the first identifier at the preset storage address during the restart process, the method further includes: During the aging test, the first electronic device is restarted, and whether the first electronic device is restarted abnormally is identified.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: In response to the first operation, the first electronic device outputs a first reminder message, where the first reminder message is used to remind the tester to operate the first electronic device to upload the restart log of the abnormal restart to the server.

4. The method according to claim 1, characterized in that: The first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, including: The first electronic device is connected to the second electronic device, and receives an acquisition instruction from the second electronic device, where the acquisition instruction is used to acquire the restart log of the abnormal restart; In response to the acquisition instruction, the first electronic device acquires a restart log of the abnormal restart, and sends the restart log to the second electronic device; The first electronic device receives first indication information of the second electronic device, where the first indication information indicates that the second electronic device has uploaded the restart log to the server; In response to the first indication information, the first electronic device recognizes that the restart log has been uploaded to the server.

5. The method according to claim 1, characterized in that After the first electronic device does not start the aging test APP, the method further includes: The first electronic device obtains a restart log of the abnormal restart, and uploads the restart log to the server.

6. The method according to any one of claims 1, 2, 4 and 5, characterized in that: The first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device starts the aging test APP, including: The first electronic device recognizes that the restart log of the abnormal restart has been uploaded to the server, and the first electronic device deletes the first identifier in the preset storage address; The first electronic device receives a second operation, where the second operation is used to trigger the first electronic device to start the aging test APP; In response to the second operation, the first electronic device recognizes that the preset storage address does not store the first identifier, and the first electronic device starts the aging test APP.

7. The method according to claim 1, characterized in that The step of writing the first identifier at a preset storage address by the first electronic device during the restart process includes: During the restart process, the first electronic device writes a first identifier and a fault code at a preset storage address, wherein the fault code corresponds to a software and hardware module being tested before the first electronic device is abnormally restarted, the first electronic device includes a plurality of software and hardware modules, and the aging test APP is specifically used to test the plurality of software and hardware modules in the first electronic device; After the first electronic device writes the first identifier at the preset storage address, the method further includes: In response to the first operation, the first electronic device outputs a second reminder message, and the second reminder message is used to remind the tester responsible for the software and hardware modules corresponding to the fault code to operate the first electronic device to upload the restart log of the abnormal restart to the server.

8. A system for starting a test program, comprising a first electronic device and a second electronic device, characterized in that: The second electronic device is used to send an acquisition instruction to the first electronic device, and the acquisition instruction is used to obtain a restart log of an abnormal restart of the first electronic device during an aging test. After obtaining the restart log, the second electronic device is also used to upload the restart log to a cloud server. The first electronic device is used to execute the method as described in any one of claims 1-7.

9. An electronic device, characterized in that: The electronic device comprises: a memory, a communication module and one or more processors; the memory and the communication module are coupled to the processor; wherein the communication module is used to interact with other electronic devices, the memory is used to store computer program codes, and the computer program codes include computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 7.