Test method, device, electronic device, and storage medium
By driving the sustain source and setting the sustain duration in the wake-up state of the domain controller, and generating a shutdown command, the problem of insufficient attention to the sustain source in existing tests is solved, resulting in more reliable test results and user experience.
Patent Information
- Application Number
- CN202311738667.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2043-12-15
AI Technical Summary
Existing tests of vehicle domain controller sleep/wake-up subsystems have not adequately addressed the maintenance source, leading to power depletion and safety issues.
When the domain controller is in wake-up state, drive the sustain source and set the target sustain duration, generate a shutdown command to control the sustain source to enter the shutdown state, and determine the test result by comparing the sustain duration with the preset duration.
This improves the reliability of domain controller test results, enhances the user experience, and ensures system stability.
Smart Images

Figure CN117908510B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of testing, more particularly, to a testing method, device, electronic equipment and computer readable storage medium. BACKGROUND
[0002] With the development of automatic driving technology, the test of the hibernation wake-up subsystem of the vehicle domain controller is extremely important, and the working state of the hibernation wake-up subsystem of the vehicle domain controller will affect the working state of other domain controllers of the vehicle. However, the existing test pays more attention to the wake-up and hibernation test of the wake-up source in the hibernation wake-up subsystem, but does not test the maintenance source of the controller. The maintenance source occupies a key position in the entire vehicle system, and insufficient maintenance source test can easily cause power loss and safety problems, reducing the user experience.
[0003] Therefore, there is an urgent need for a testing method to test the maintenance source of the domain controller. SUMMARY
[0004] The present application provides a testing method, device, electronic equipment and computer readable storage medium to improve the above-mentioned defects.
[0005] In a first aspect, the embodiments of the present application provide a testing method, which comprises: in response to a driving instruction, driving a to-be-tested maintenance source when a domain controller is in a wake-up state, a target maintenance duration of the to-be-tested maintenance source being a preset duration; generating a first closing instruction for controlling the to-be-tested maintenance source to enter a closing state; in response to the first closing instruction, controlling the to-be-tested maintenance source to enter the closing state after maintaining a first maintenance duration; and if the first maintenance duration is greater than or equal to the preset duration, determining that a test result of the to-be-tested maintenance source is passed.
[0006] In a second aspect, the embodiments of the present application also provide a testing device, which comprises:
[0007] a driving module, configured to drive a to-be-tested maintenance source in response to a driving instruction when a domain controller is in a wake-up state, a target maintenance duration of the to-be-tested maintenance source being a preset duration;
[0008] a generating module, configured to generate a first closing instruction for controlling the to-be-tested maintenance source to enter a closing state;
[0009] a control module, configured to control the to-be-tested maintenance source to enter the closing state after maintaining a first maintenance duration in response to the first closing instruction;
[0010] a determining module, configured to determine that a test result of the to-be-tested maintenance source is passed if the first maintenance duration is greater than or equal to the preset duration.
[0011] In a third aspect, the embodiments of the present application further provide an electronic device, characterized by comprising: one or more processors; a memory; and one or more application programs stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method described above.
[0012] In a fourth aspect, the embodiments of the present application further provide a computer-readable storage medium, which stores a program code executable by a processor, and the program code, when executed by the processor, causes the processor to perform the method described above.
[0013] The test method, device, electronic device and computer-readable storage medium provided by the present application, in the present application, when the domain controller is in the wake-up state, the driving maintenance source is driven, the target maintenance time of the to-be-tested maintenance source is the preset time, the first closing instruction for controlling the to-be-tested maintenance source to enter the closing state is generated in response to the driving instruction, the to-be-tested maintenance source enters the closing state after maintaining the first maintenance time in response to the first closing instruction, and if the first maintenance time is greater than or equal to the preset time, it is determined that the test result of the to-be-tested maintenance source is passed. By comparing the first maintenance time and the preset time, the test of the maintenance source of the domain controller is realized, the reliability of the test result obtained by the overall test of the domain controller is improved, and the use experience of the user is improved.
[0014] Other features and advantages of the embodiments of the present application will be described in the following description, and some will become apparent from the description, or will be understood through implementation of the embodiments of the present application. The purpose and other advantages of the embodiments of the present application can be achieved and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0016] Figure 1 A test method flowchart according to an embodiment of the present application is shown.
[0017] Figure 2 A structural block diagram of a test device according to an embodiment of the present application is shown.
[0018] Figure 3 A flowchart of a test method application process according to an embodiment of the present application is shown.
[0019] Figure 4 A flow chart of yet another test method according to an embodiment of the present application is shown.
[0020] Figure 5 A flow chart of yet another test method application process according to an embodiment of the present application is shown.
[0021] Figure 6 A structural block diagram of a test device according to yet another embodiment of the present application is shown.
[0022] Figure 7 A schematic diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0024] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms “first”, “second”, etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0025] Please refer to Figure 1 , Figure 1 A flow chart of a test method according to an embodiment of the present application is shown, for an electronic device, the method comprising:
[0026] S101, in response to a driving instruction, driving a to-be-tested maintenance source when the domain controller is in a wake-up state, a target maintenance duration of the to-be-tested maintenance source being a preset duration.
[0027] The domain controller controls the operation of the vehicle-mounted device and is the "brain" of the vehicle-mounted device. The domain controller communicates with each vehicle-mounted device through a vehicle-mounted network such as LIN / CAN / Ethernet, and is responsible for scheduling the operation of the vehicle-mounted device, and making corresponding adjustments according to the operation instructions of the driver and the real-time status of the vehicle. The maintenance source is a device or program responsible for maintaining the operation and stability of the system, including load-type maintenance sources and switch-type maintenance sources. The load-type maintenance source refers to a specific load, such as a high beam, a window motor, a seat motor, a daytime running lamp, etc. The switch-type maintenance source refers to a switch state, such as an open door lock switch, a light switch, etc. The specific value of the preset time length can be selected according to test requirements.
[0028] The relationship between the domain controller and the maintenance source is that when the domain controller is about to enter the sleep state, if it is detected that the maintenance source is driven to be in the working state, the domain controller cannot enter the sleep state and remains in the wake-up state.
[0029] In some embodiments, the driving of the maintenance source can be driven by a script, which can be a CAN bus access programming language (CAPL) script.
[0030] In some embodiments, after driving the maintenance source, the sum of the voltage value of the domain controller and the voltage value of the maintenance source is obtained, and whether the maintenance source is driven is determined according to the sum of the voltage value of the domain controller and the voltage value of the maintenance source.
[0031] In some embodiments, the maintenance source can be driven by a CAPL script, the single-chip microcomputer collects the PIN pin voltage corresponding to the domain controller, outputs different voltage values after digital-to-analog conversion, and the CANoe collects different voltage values output by the single-chip microcomputer. The voltage value collected here is the sum of the voltage value of the domain controller and the voltage value of the maintenance source.
[0032] After obtaining the sum of the voltage value of the domain controller and the voltage value of the maintenance source, the CAPL script analyzes the voltage value collected by the CANoe, and judges the specific maintenance source currently maintained and whether the maintenance source is driven through the analysis result.
[0033] Before responding to the driving instruction, all maintenance sources and / or all wake-up sources associated with the domain controller are in the closed state.
[0034] S102, a first closing instruction for controlling the to-be-tested maintenance source to enter a closed state is generated.
[0035] The first closing instruction can also control other maintenance sources in the domain controller to which the to-be-tested maintenance source belongs, except the to-be-tested wakeup source, and the wakeup source to enter a closing state. The wakeup source is a trigger point for the domain controller to switch from a sleep state to a wakeup state.
[0036] S103, in response to the first closing instruction, controlling the to-be-tested maintenance source to enter a closing state after maintaining a first maintenance duration.
[0037] The first maintenance duration is related to a preset duration. The first maintenance duration can be equal to the preset duration, or slightly less than the preset duration. The specific selection can be based on the specific to-be-tested maintenance source and test requirements.
[0038] S104, if the first maintenance duration is greater than or equal to the preset duration, determining that the test result of the to-be-tested maintenance source is passed.
[0039] The maintenance source needs a certain time from starting to close to entering a closing state. Therefore, the theoretical maintenance duration of the to-be-tested maintenance source, that is, the first maintenance duration, is greater than or equal to the preset duration. The test result of the to-be-tested maintenance source can be determined by comparing the first maintenance duration with the preset duration.
[0040] If the first maintenance duration is less than the preset duration, it is determined that the test result of the to-be-tested maintenance source is not passed.
[0041] As shown in FIG. 1, Figure 2 As shown in FIG. 1, Figure 2 A structural block diagram of a test device is shown. The test device 300 includes a domain controller 310, a single-chip microcomputer 320, a single-chip microcomputer 330, a development environment (CANoe) 340, and a program-controlled power supply 350. The single-chip microcomputer 320 and the single-chip microcomputer 330 are used to collect and analyze voltage values and current values, and send the corresponding voltage values and current values to the domain controller or the CANoe; the development environment 340 is built-in with a script (CAPL script), which is used to control the wakeup and sleep of the domain controller, judge the wakeup result, maintenance result and sleep result of the domain controller, and realize CAN communication between the CANoe and the domain controller; the program-controlled power supply 350 is used to power the domain controller and output different voltage values.
[0042] In an embodiment, before S103, a sleep instruction is generated. The sleep instruction is used to control the domain controller to enter a sleep state after the to-be-tested maintenance source enters a closing state. It is judged whether the duration for which the domain controller maintains a wakeup state after responding to the sleep instruction is greater than or equal to a preset duration.
[0043] According to the relationship between the domain controller and the maintenance source mentioned above, if the maintenance source does not enter the shutdown state, the domain controller will be maintained in the wake-up state until the maintenance source enters the shutdown state, and then the domain controller enters the hibernation state. Therefore, it can be understood that the duration of the domain controller in the wake-up state should be greater than or equal to the preset duration.
[0044] In some embodiments, after responding to the hibernation instruction, the working current value of the domain controller or the network request sending state is obtained; and according to the working current value of the domain controller or the network request sending state, the duration of the domain controller in the wake-up state is determined.
[0045] The network request sending state includes a network request that has been sent and a network request that has not been sent.
[0046] The network request sending state is the sending state of a network request message, and the network request message is a network management (NM) request message. The NM request message is a message sent by an electronic controller unit (ECU) node of the domain controller in the network. When the ECU is in a network request state, the message will be continuously sent to indicate the need for network communication.
[0047] In some embodiments, according to the working current value of the domain controller or the network request sending state, the duration of the domain controller in the wake-up state can include: obtaining the duration of the working current value of the domain controller from the value when responding to the hibernation instruction to the first value as the duration of the domain controller in the wake-up state; or obtaining the duration of the network request sending state of the domain controller from the network request that has been sent when responding to the hibernation instruction to the network request that has not been sent as the duration of the domain controller in the wake-up state.
[0048] The first value can be 0.002A.
[0049] Correspondingly, S104 includes: if the time of the domain controller in the wake-up state after responding to the hibernation instruction is greater than or equal to the preset duration, responding to the first shutdown instruction, controlling the to-be-tested maintenance source to enter the shutdown state after maintaining the first maintenance duration.
[0050] In other words, when the domain controller is in a wake-up state and all maintenance sources associated with the domain controller and / or all wake-up sources are in a closed state, in response to the drive command, the maintenance source under test is driven to generate a first shutdown command to control the maintenance source under test to enter a closed state; in response to the first shutdown command, the maintenance source under test is controlled to enter a closed state after maintaining a first maintenance duration; after responding to the first shutdown command, a sleep command is generated to control the domain controller to enter a sleep state after the maintenance source under test enters a closed state; if, after responding to the sleep command, the domain controller maintains a wake-up state for a time greater than or equal to a preset duration, in response to the first shutdown command, the maintenance source under test is controlled to enter a closed state after maintaining a first maintenance duration, then the maintenance source under test passes the test.
[0051] The testing process for sustaining the source is as follows: Figure 3 As shown, after the test starts, the load-type sustaining source is driven by the CAPL script, and the output voltage value of the programmable power supply is controlled by the CAPL script to drive the switch-type sustaining source. After the sustaining source is driven, the sustaining source is controlled to enter the off state, and the domain controller is controlled to enter the sleep state. The CAPL determines whether the domain controller has maintained a duration of not less than the preset time before entering the sleep state, and the test ends.
[0052] In some embodiments, when the domain controller is in a wake-up state, a sustaining source is driven. In response to a driving command, the sustaining source under test is driven. The target sustaining duration of the sustaining source under test is a preset duration. A first shutdown command is generated to control the sustaining source under test to enter a shutdown state. In response to the first shutdown command, the sustaining source under test is controlled to enter a shutdown state after sustaining for a first sustaining duration. If the first sustaining duration is greater than or equal to the preset duration, the test result of the sustaining source under test is determined to be a pass. By comparing the first sustaining duration and the preset duration, the sustaining source of the domain controller is tested, which improves the reliability of the test results obtained from the overall test of the domain controller and enhances the user experience.
[0053] In some embodiments, such as Figure 4 As shown, the method also includes:
[0054] S201. When the domain controller is in a sleep state, wake up the domain controller in response to the wake-up command.
[0055] The wake-up command is generated by the wake-up source under test. The wake-up source is the trigger point that causes the domain controller to go from sleep state to wake-up state. Wake-up sources include switch-type wake-up sources, such as car door locks, and Partial Network Cluster (PNC) wake-up sources. PNC wake-up sources route between different channels through PNC information to realize network wake-up of the domain controller.
[0056] In some embodiments, the wake-up of the domain controller by the switch type wake-up source requires the program-controlled power supply to output a voltage to trigger the wake-up source, and then wake up the domain controller. Taking the wake-up source of the car door lock as an example, if the operation to be performed is to close the car door lock, the PIN pin corresponding to the car door lock needs to be grounded to wake up the domain controller.
[0057] For the switch type wake-up source, the CAPL script is used to control the program-controlled power supply to output a corresponding voltage value to the domain controller, and the single-chip microcomputer decodes the output voltage value into an electrical signal to trigger the wake-up source and wake up the domain controller.
[0058] For the PNC network wake-up source, the CAPL script is used to send a corresponding PNC network message with a network request to the domain controller to wake up the domain controller.
[0059] In some embodiments, after S201, the following steps can be included: obtaining the wake-up response time of the domain controller or the wake-up message timing of the domain controller; and determining whether the domain controller is woken up according to the wake-up response time of the domain controller or the wake-up message timing of the domain controller.
[0060] The wake-up response time of the domain controller is the time between the time when the wake-up source is triggered to wake up the domain controller and the time when the CANoe detects the working current of the domain controller, or the time between the time when the wake-up source is triggered to wake up the domain controller and the time when the CANoe detects the first frame of network request message sent by the controller after being woken up. The wake-up message timing refers to the timing of the network management request message and the application message sent by the domain controller.
[0061] The correct wake-up response time is not more than the first threshold value, and the correct wake-up message timing is that all application messages are sent within a preset time after the network management request message is sent by the domain controller.
[0062] If the wake-up response time of the domain controller is not more than the first threshold value, and the wake-up message timing of the domain controller is correct, then the wake-up result of the domain controller is that the domain controller is woken up.
[0063] If the wake-up response time of the domain controller exceeds the first threshold value, or the wake-up message timing of the domain controller is incorrect, then the wake-up result of the domain controller is that the domain controller is not woken up.
[0064] In other embodiments, the working current value of the domain controller can be detected by the CANoe first to determine whether the domain controller is woken up, and then the network request message is collected by the CANoe to determine whether the domain controller is woken up by the network or locally woken up through the network request sending state.
[0065] If the working current value of the domain controller is not greater than the second value, it is determined that the wake-up result of the domain controller is that the domain controller is not woken up; if the working current value of the domain controller is greater than the second value and the network request sending state is network request sending, it is determined that the wake-up result of the domain controller is that the domain controller is woken up and woken up by the network; if the working current value of the domain controller is greater than the second value and the network request sending state is network request not sent, it is determined that the wake-up result of the domain controller is that the domain controller is woken up and woken up by the local. The second value can be 0.2.
[0066] In some embodiments, as long as one of the wake-up response time of the domain controller exceeds the first threshold, the wake-up message timing error sent by the domain controller, and the working current value of the domain controller is not greater than the second value is satisfied, the wake-up result of the domain controller is that the domain controller is not woken up.
[0067] S202, a second closing instruction for controlling the to-be-tested wake-up source and all maintenance sources to enter a closing state is generated.
[0068] The second closing instruction can be the same as the first closing instruction.
[0069] S203, in response to the second closing instruction, the to-be-tested wake-up source and all maintenance sources are controlled to enter the closing state.
[0070] When the wake-up source test is performed, the time from the response of the maintenance source to the closing instruction to the entering of the closing state does not need to be considered.
[0071] S204, if the domain controller enters a sleep state in response to the to-be-tested wake-up source and all maintenance sources entering the closing state, it is determined that the test result of the to-be-tested wake-up source is that the test is passed.
[0072] In some embodiments, after S204, the following can be included: the sleep response time of the domain controller or the sleep message timing sent by the domain controller is obtained; and whether the domain controller is woken up is determined according to the sleep response time of the domain controller or the sleep message timing sent by the domain controller.
[0073] The sleep message timing refers to the timing of the network management request message and the application message sent by the domain controller. The correct sleep message timing is the reverse timing of the correct wake-up message timing.
[0074] If the working current value of the domain controller does not exceed the second threshold, and the sleep message timing sent by the domain controller is correct, the sleep test result of the domain controller is that the sleep test is successful.
[0075] If the working current value of the domain controller exceeds the second threshold, or the sleep message timing sent by the domain controller is incorrect, the sleep test result of the domain controller is that the sleep test fails.
[0076] In some embodiments, the hibernation result of the domain controller is that the domain controller does not hibernate if one of the following conditions is met: the working current value of the domain controller exceeds the second threshold value, the timing error of the wake-up message sent by the domain controller, and the domain controller does not meet the hibernation condition.
[0077] If the domain controller does not enter the hibernation state in response to the to-be-tested wake-up source and all the maintenance sources entering the off state, it is determined that the test result of the to-be-tested wake-up source is that the test fails.
[0078] The test process of the wake-up source is as shown in Figure 5 After starting the test, the PNC network wake-up source is controlled by the CAPL script to wake up the domain controller, the switch type wake-up source is triggered by the CAPL script to wake up the domain controller, and then the wake-up result of the domain controller is determined by the CAPL. Finally, the wake-up source and the maintenance source are turned off, and it is determined by the CAPL whether the domain controller enters the hibernation state, and the test is ended.
[0079] In some embodiments, in response to a wake-up instruction, the domain controller is woken up when the domain controller is in the hibernation state, the wake-up instruction is generated by the to-be-tested wake-up source; a second off instruction for controlling the to-be-tested wake-up source and all the maintenance sources to enter the off state is generated; in response to the second off instruction, the to-be-tested wake-up source and all the maintenance sources enter the off state; if the domain controller enters the hibernation state in response to the to-be-tested wake-up source and all the maintenance sources entering the off state, it is determined that the test result of the to-be-tested wake-up source is that the test passes, the test of the wake-up source is realized, the overall test of the hibernation wake-up subsystem of the domain controller is realized by testing the maintenance source and the wake-up source of the domain controller, and the reliability of the test result is improved.
[0080] Reference is made to the accompanying Figure 6 , Figure 6 A structural block diagram of a test device is shown in an embodiment of the present application. The device 300 is used for an electronic device, and comprises:
[0081] The driving module 301 is configured to drive the to-be-tested maintenance source in response to a driving instruction when the domain controller is in the wake-up state, and a target maintenance duration of the to-be-tested maintenance source is a preset duration.
[0082] The generating module 302 is configured to generate a first off instruction for controlling the to-be-tested maintenance source to enter the off state.
[0083] The control module 303 is configured to control the to-be-tested maintenance source to enter the off state after maintaining the first maintenance duration in response to the first off instruction.
[0084] The determining module 304 is configured to determine that the test result of the to-be-tested maintenance source is that the test passes if the first maintenance duration is greater than or equal to the preset duration.
[0085] Optionally, the control module 303 is further configured to generate a hibernation instruction, the hibernation instruction being used to control the domain controller to enter a hibernation state after the to-be-tested maintenance source enters the off state; and determine whether a time duration for which the domain controller maintains the wake-up state after responding to the hibernation instruction is greater than or equal to a preset time duration.
[0086] Optionally, the control module 303 is further configured to, if the time duration for which the domain controller maintains the wake-up state after responding to the hibernation instruction is greater than or equal to the preset time duration, control the to-be-tested maintenance source to enter the off state after maintaining the first maintenance duration in response to the first off instruction.
[0087] Optionally, the control module 303 is further configured to, after responding to the hibernation instruction, acquire a working current value of the domain controller or a network request sending state of the domain controller; and determine the time duration for which the domain controller maintains the wake-up state according to the working current value of the domain controller or the network request sending state of the domain controller.
[0088] Optionally, the control module 303 is further configured to acquire, as the time duration for which the domain controller maintains the wake-up state, a time duration for which the working current value of the domain controller decreases from a value at the time of responding to the hibernation instruction to a first value; or acquire, as the time duration for which the domain controller maintains the wake-up state, a time duration for which the network request sending state of the domain controller changes from a sent network request at the time of responding to the hibernation instruction to an unsent network request.
[0089] Optionally, the apparatus 300 further comprises a wake-up source test module configured to, when the domain controller is in the hibernation state, in response to a wake-up instruction, wake up the domain controller, the wake-up instruction being generated by the to-be-tested wake-up source; generate a second off instruction for controlling the to-be-tested wake-up source and all the maintenance sources to enter the off state; in response to the second off instruction, control the to-be-tested wake-up source and all the maintenance sources to enter the off state; and if the domain controller enters the hibernation state in response to the to-be-tested wake-up source and all the maintenance sources entering the off state, determine that a test result of the to-be-tested wake-up source is passed.
[0090] Optionally, the wake-up source test module is further configured to acquire a wake-up response time of the domain controller or a wake-up packet time sequence sent by the domain controller; and determine whether the domain controller is woken up according to the wake-up response time of the domain controller or the wake-up packet time sequence sent by the domain controller.
[0091] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the apparatus and the modules described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein again.
[0092] In addition, each function in each embodiment of the present application can be integrated in one processing module, or each module can be physically present separately, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software function module.
[0093] Reference is made to Figure 7 Fig. 4 shows a structural block diagram of an electronic device according to an embodiment of the present application. The electronic device 400 can be a smart phone, a tablet computer, an e-book, a vehicle, or the like, which can run an application. The electronic device 400 in the present application can include one or more of the following components: a processor 410, a memory 420, and one or more applications. The one or more applications can be stored in the memory 420 and configured to be executed by the one or more processors 410, and the one or more programs are configured to perform the method as described in the foregoing method embodiments.
[0094] The processor 410 can include one or more processing cores. The processor 410 connects various parts within the entire electronic device 400 by various interfaces and lines, performs various functions of the electronic device 400 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 420, and calling data stored in the memory 420. Optionally, the processor 410 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 410 can integrate a combination of one or more of a central processing unit (CPU), a graphics processor (GPU), and a modem. Among them, the CPU is mainly responsible for processing an operating system, a user interface, and an application program, etc.; the GPU is responsible for rendering and drawing display content; and the modem is responsible for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 410, but be implemented by a separate communication chip.
[0095] The memory 420 can include a random access memory (RAM) and can also include a read-only memory (ROM). The memory 420 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 420 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing each of the methods described below, and the like. The data storage area can also store data created by the electronic device 400 in use (such as a phonebook, audio / video data, chat log data), and the like.
[0096] In addition, each function in each embodiment of the present application can be integrated in one processing module, or each module can be physically present alone, or two or more modules can be integrated in one module. The integrated module can be implemented in the form of hardware or in the form of a software function module.
[0097] On the other hand, the present application also provides a computer readable storage medium, which stores program codes that can be called by a processor to execute the methods described in the above method embodiments.
[0098] The computer readable storage medium can be an electronic storage such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer readable storage medium includes a non-transitory computer readable storage medium. The computer readable storage medium has a storage space for program codes for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program codes can be compressed in an appropriate form, for example.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; even though the above-mentioned embodiments have been described in detail, those skilled in the art should understand that they can still modify the technical solutions recorded in the above-mentioned embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A test method characterized by, The method comprises: driving the to-be-tested maintenance source in response to a driving instruction when the domain controller is in an awake state, the target maintenance duration of the to-be-tested maintenance source being a preset duration; wherein, if the to-be-tested maintenance source is in a working state, the domain controller cannot enter a sleep state; generating a first shutdown instruction for controlling the to-be-tested maintenance source to enter a shutdown state; controlling the to-be-tested maintenance source to enter the shutdown state after maintaining a first maintenance duration in response to the first shutdown instruction; if the first maintenance duration is greater than or equal to the preset duration, determining that a test result of the to-be-tested maintenance source is passed; waking up the domain controller in response to a wake-up instruction when the domain controller is in a sleep state, the wake-up instruction being generated by a to-be-tested wake-up source; generating a second shutdown instruction for controlling the to-be-tested wake-up source and all maintenance sources to enter a shutdown state; controlling the to-be-tested wake-up source and all maintenance sources to enter the shutdown state in response to the second shutdown instruction; if the domain controller enters the sleep state in response to the to-be-tested wake-up source and all maintenance sources entering the shutdown state, determining that a test result of the to-be-tested wake-up source is passed.
2. The method of claim 1, wherein, The method further comprises: generating a sleep instruction for controlling the domain controller to enter the sleep state after the to-be-tested maintenance source enters the shutdown state; determining whether a duration for which the domain controller maintains the awake state after responding to the sleep instruction is greater than or equal to the preset duration; the controlling the to-be-tested maintenance source to enter the shutdown state after maintaining the first maintenance duration in response to the first shutdown instruction comprises: if the duration for which the domain controller maintains the awake state after responding to the sleep instruction is greater than or equal to the preset duration, controlling the to-be-tested maintenance source to enter the shutdown state after maintaining the first maintenance duration in response to the first shutdown instruction.
3. The method of claim 2, wherein, The method further comprises: acquiring a working current value of the domain controller or a network request sending state of the domain controller after responding to the sleep instruction; determining the duration for which the domain controller maintains the awake state according to the working current value of the domain controller or the network request sending state of the domain controller.
4. The method of claim 3, wherein, the determining the duration for which the domain controller maintains the awake state according to the working current value of the domain controller or the network request sending state of the domain controller comprises: acquiring, as the duration for which the domain controller maintains the awake state, a duration for which the working current value of the domain controller decreases from a value at the time of responding to the sleep instruction to a first value; or acquiring, as the duration for which the domain controller maintains the awake state, a duration for which the network request sending state of the domain controller changes from a sent network request at the time of responding to the sleep instruction to an unsent network request.
5. The method of claim 1, wherein, The method comprises, before the responding to the driving instruction: controlling all maintenance sources and / or all wake-up sources associated with the domain controller to be in a shutdown state.
6. The method of claim 1, wherein, after the waking up the domain controller in response to the wake-up instruction when the domain controller is in the sleep state, the method comprises: acquiring a wake-up response time of the domain controller or a wake-up packet timing of the domain controller; According to a wake-up response time of the domain controller or a wake-up message timing issued by the domain controller, it is determined whether the domain controller is woken up.
7. A test device characterized by, The apparatus comprises: A driving module configured to drive a to-be-tested maintenance source in response to a driving instruction when the domain controller is in a wake-up state, the to-be-tested maintenance source having a target maintenance duration of a preset duration; wherein the domain controller cannot enter a sleep state if the to-be-tested maintenance source is in a working state; A generating module configured to generate a first shutdown instruction for controlling the to-be-tested maintenance source to enter a shutdown state; A control module configured to control the to-be-tested maintenance source to enter the shutdown state after a first maintenance duration in response to the first shutdown instruction; A determining module configured to determine that a test result of the to-be-tested maintenance source is passed if the first maintenance duration is greater than or equal to the preset duration; A wake-up source test module configured to wake up the domain controller in response to a wake-up instruction when the domain controller is in a sleep state, the wake-up instruction being generated by a to-be-tested wake-up source; generate a second shutdown instruction for controlling the to-be-tested wake-up source and all maintenance sources to enter a shutdown state; control the to-be-tested wake-up source and all maintenance sources to enter the shutdown state in response to the second shutdown instruction; and determine that a test result of the to-be-tested wake-up source is passed if the domain controller enters the sleep state in response to the to-be-tested wake-up source and all maintenance sources entering the shutdown state.
8. An electronic device, comprising: comprise: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more application programs being configured to perform the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores processor-executable program code, which, when executed by the processor, causes the processor to perform the method of any one of claims 1-6.
Citation Information
Patent Citations
Vehicle wake-up anomaly detection method and system
CN116719304A