Test methods, feature phones and related products

By detecting system failures and performing USB interface backup operations when the function machine is turned on, the problem of USB interface reset and re-enumeration in function machine testing is solved, and the testing efficiency and fault diagnosis capabilities are improved.

CN112732512BActive Publication Date: 2024-12-27SPREADTRUM SEMICON(CHENGDU) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110104085.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-26
Publication Date
2024-12-27
Estimated Expiration
2041-01-26

AI Technical Summary

Technical Problem

During the testing phase, the USB interface reset and re-enumer was caused by system failure, which reduced the testing efficiency and the existing technology was difficult to effectively solve this problem.

Method used

Detect system failures when the function machine is turned on, and connect to electronic devices through the USB interface to maintain communication and perform backup operations to ensure that the USB interface does not fall off during failure, and realize backup of automated testing tools.

Benefits of technology

It improves the efficiency of function machine testing, ensures that the USB interface remains communication without interruption in the event of system failure, and supports the normal operation of automated testing tools and fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112732512B_ABST
    Figure CN112732512B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a test method, a feature machine and related products, which are applied to a feature machine, and the method includes: when the feature machine is in a powered-on state, detecting whether the feature machine has a system failure; when the feature machine has a system failure, detecting whether the feature machine has been connected to an electronic device via a USB interface; when the feature machine has been connected to the electronic device via the USB interface, maintaining the USB interface for communication, and performing a backup operation based on the USB interface through a preset data transmission tool. The embodiment of the present application can improve the test efficiency of the feature machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a testing method, a functional machine and related products. Background Art

[0002] With the development of automated testing, a large number of tests will be required after the product development phase is completed. In order to save the testers' repetitive work, it is necessary to develop some auxiliary functions on the product and adapt to some automated testing tools as much as possible. Many products have various stability issues to be solved before they are mass-produced. For example, for feature phones, every time the system assert mechanism appears, the USB will be reset and re-enumerated. This requires manual operation of the tool, which reduces the test efficiency. Therefore, the problem of how to improve the test efficiency of feature phones needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present application provide a testing method, a feature machine and related products, which can improve the testing efficiency of the feature machine.

[0004] In a first aspect, an embodiment of the present application provides a testing method, which is applied to a feature phone, and the method includes:

[0005] When the functional machine is in a powered-on state, detecting whether a system failure occurs in the functional machine;

[0006] When a system failure occurs in the feature phone, detecting whether the feature phone is connected to an electronic device via a USB interface;

[0007] When the functional machine is connected to the electronic device via the USB interface, the USB interface is maintained for communication, and a backup operation is performed based on the USB interface through a preset data transmission tool.

[0008] In a second aspect, an embodiment of the present application provides a testing device, which is applied to a functional machine, and the device includes: a detection unit and a communication unit, wherein:

[0009] The detection unit is used to detect whether a system failure occurs in the functional machine when the functional machine is in a powered-on state;

[0010] The detection unit is further used to detect whether the feature machine is connected to the electronic device through the USB interface when a system failure occurs in the feature machine;

[0011] The communication unit is used to keep the USB interface communicating when the functional machine is connected to the electronic device via the USB interface, and to perform a backup operation based on the USB interface through a preset data transmission tool.

[0012] In the third aspect, an embodiment of the present application provides a functional machine, including a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiment of the present application.

[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0015] The implementation of the embodiments of the present application has the following beneficial effects:

[0016] It can be seen that the test method, feature machine and related products described in the embodiments of the present application are applied to feature machines. When the feature machine is in the power-on state, it is detected whether a system failure occurs in the feature machine. When a system failure occurs in the feature machine, it is detected whether the feature machine has been connected to an electronic device through a USB interface. When the feature machine has been connected to an electronic device through a USB interface, the USB interface is maintained for communication, and a backup operation is performed based on the USB interface through a preset data transmission tool. In this way, when a failure occurs in the operation of the feature machine system, the USB interface can maintain communication without loss of communication, allowing the automated testing tool to perform backup, thereby improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of a testing method provided in an embodiment of the present application;

[0019] Figure 2 It is a flow chart of another testing method provided in an embodiment of the present application;

[0020] Figure 3It is a structural schematic diagram of a functional machine provided in an embodiment of the present application;

[0021] Figure 4 It is a block diagram of the functional units of a testing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but in a possible example also includes steps or units that are not listed, or in a possible example also includes other steps or units inherent to these processes, methods, products or devices.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0025] In the embodiments of the present application, feature phones can be understood as feature phones, which are a major category of mobile phones. Feature phones can meet the needs of many groups of consumers. Some feature phones have more applications than ordinary mobile phones that can only be used for making calls and sending and receiving text messages, such as being able to take photos, play your own music files, surf the Internet, and use map functions. Like smart phones, some applications can be run on feature phones, but most of them are JAVA language programs, and most of these programs are based on JAVA ME or BREW, which is related to JAVA's cross-platform capabilities. Feature phones can be single-core devices.

[0026] The electronic devices involved in the embodiments of the present application may be handheld devices including various image processing functions, intelligent robots, vehicle-mounted devices, wearable devices, desktops, personal computers (PCs), computing devices or other processing devices connected to wireless modems, as well as various forms of user equipment (UE), mobile stations (MS), terminal devices, etc. The electronic devices may also be servers or smart home devices.

[0027] In the embodiments of the present application, the smart home device may be at least one of the following: a refrigerator, a washing machine, an electric rice cooker, smart curtains, smart lights, a smart bed, a smart trash can, a microwave oven, an oven, a steamer, an air conditioner, a range hood, a server, a smart door, a smart window, a window door wardrobe, a smart speaker, a smart home, a smart chair, a smart clothes rack, a smart shower, a water dispenser, a water purifier, an air purifier, a doorbell, a monitoring system, a smart garage, a television, a projector, a smart dining table, a smart sofa, a massage chair, a treadmill, etc., and of course, other devices may also be included.

[0028] See also Figure 1 , Figure 1 This is a flow chart of a test method provided in an embodiment of the present application. As shown in the figure, it is applied to a functional machine. The test method includes:

[0029] 101. When the feature machine is in a powered-on state, detect whether the feature machine has a system failure.

[0030] Among them, in the embodiment of the present application, the feature machine can be in a power-on state, and then the electronic device can perform a self-check to detect whether the feature machine has a system failure.

[0031] Optionally, the above step 101, detecting whether the functional machine has a system failure, may include the following steps:

[0032] 11. Obtaining target operation data of the functional machine within a preset time period;

[0033] 12. Extract keywords from the target operation data to obtain target keywords;

[0034] 13. When a preset keyword set exists for the target keyword, confirm that a system failure has occurred in the feature machine.

[0035] The preset time period may be set by the user or by the system by default. A preset keyword set may be pre-stored in the electronic device, and the preset keyword set may include at least one keyword.

[0036] In a specific implementation, the electronic device can obtain the target operation data of the feature machine within a preset time period, and can also perform keyword extraction on the target operation data to obtain the target keyword. When the target keyword exists in a preset keyword set, it can be confirmed that a system failure has occurred in the feature machine. Conversely, when the target keyword does not exist in the preset keyword set, it can be confirmed that the feature machine has not experienced a system failure.

[0037] 102. When a system failure occurs in the feature phone, detect whether the feature phone is connected to an electronic device via a USB interface.

[0038] Among them, when a system failure occurs in the feature machine, the electronic device can detect whether the feature machine has been connected to the electronic device through the USB interface, that is, through the USB data cable. It can also detect whether the feature machine is in communication with the log software tool in the electronic device. The log software tool can be used to read the system operation data in the feature machine. The system operation data can be an operation log, log data, etc., which are not limited here.

[0039] Optionally, between step 101 and step 102, the following steps may also be included:

[0040] A1. Determine the target fault level corresponding to the target keyword according to the mapping relationship between the preset keywords and the fault levels;

[0041] A2. When the target fault level is higher than the preset fault level, execute the step of detecting whether the functional machine is connected to the electronic device via the USB interface.

[0042] The preset fault level may be preset or set by system default. In the embodiment of the present application, the electronic device may pre-store a mapping relationship between preset keywords and fault levels.

[0043] In a specific implementation, the electronic device can determine the target fault level corresponding to the target keyword according to the mapping relationship between the preset keyword and the fault level, and when the target fault level is higher than the preset fault level, execute the step of detecting whether the functional machine has been connected to the electronic device through the USB interface; otherwise, it can be considered that the fault is not serious and can be recovered by the system itself.

[0044] 103. When the functional machine is connected to the electronic device via the USB interface, the USB interface is maintained for communication, and a backup operation is performed based on the USB interface through a preset data transmission tool.

[0045] Among them, the preset data transmission tool can be pre-set or system default, which can be used to realize data transmission. For example, the preset data transmission tool can be a logel tool. In a specific implementation, when the feature machine is connected to an electronic device through a USB interface, the USB interface can be maintained for communication, that is, the USB interface is guaranteed not to be disconnected, and a backup operation is performed based on the USB interface through a preset data transmission tool, and the data in the feature machine can be backed up to the electronic device. For example, the backup operation can be a fault site protection operation, specifically saving fault site data for maintenance personnel or testers to implement system fault diagnosis. Of course, the feature machine can also receive a repair instruction sent by an electronic device, and the feature machine responds to the repair instruction to implement system fault repair for the feature machine. The backup operation can also back up other data, for example, the stored data in the feature machine, and the stored data can be at least one of the following: address book, application cache data, system operation data, etc., which are not limited here.

[0046] For example, since the application processor AP and the communication processor CP on the feature phone are both running on the CA7 of the feature phone, once the system asserts, the system cannot be scheduled, and the software code architecture running in normal mode will not be able to run normally in assert mode, so it is necessary to switch the USB function from normal mode to assert mode in software logic, so as to ensure that the USB will not drop the port, and there will be no problem in sending and receiving data normally. For feature phones, since the tools used for automated testing are identified based on the port, when the assert mechanism is triggered during system operation, the port enumerated by the USB needs to continue to maintain communication without dropping the port, so that the automated testing tool can automatically dump and restart the system for the next automated test, thereby improving efficiency.

[0047] Furthermore, when the system triggers the assert, because of the assert mechanism of both the application processor (AP) and the communication processor (CP), the system will not be able to schedule, and all tasks running on the RTOS platform cannot continue to execute. Therefore, some data structures used by the USB serial port enumerated before the assert cannot be used after the assert, and their key information needs to be saved in another data structure. After the assert mechanism, the data device sent by the logel tool can be received normally, and the system is notified to process it, and then the important stack information on the scene is dumped.

[0048] Optionally, the above step 103, performing the backup operation based on the USB interface and using a preset data transmission tool, may include the following steps:

[0049] 31. Determine the target diagnosis result corresponding to the system fault;

[0050] 32. Determine a target cache data storage identifier corresponding to the target diagnostic result according to a preset mapping relationship between the diagnostic result and the cache data storage identifier;

[0051] 33. Acquire corresponding target cache data from a preset cache area according to the target cache data storage identifier;

[0052] 34. Backing up the target cache data to the electronic device based on the USB interface and through the preset data transmission tool.

[0053] In a specific implementation, the electronic device may pre-store a mapping relationship between a preset diagnosis result and a cache data storage identifier. The preset cache area may be used to store the operation data of the functional machine.

[0054] Specifically, the electronic device can determine the target diagnostic result corresponding to the system fault, and the functional machine can have a preliminary diagnostic function, and then the system fault can be diagnosed to obtain the target diagnostic result. Then, the electronic device can determine the target cache data storage identifier corresponding to the target diagnostic result according to the mapping relationship between the preset diagnostic result and the cache data storage identifier, and obtain the corresponding target cache data from the preset cache area according to the target cache data storage identifier, and then back up the target cache data to the electronic device based on the USB interface and through the preset data transmission tool.

[0055] Optionally, after the above step 102, the following steps may also be included:

[0056] B1. When the functional machine is not connected to the electronic device through the USB interface, prompting the user to establish a connection with the electronic device through the USB interface;

[0057] B2. When the functional machine has completed the connection with the electronic device through the USB interface, push at least one standby virtual interface;

[0058] B3, selecting a target standby virtual interface from the at least one standby virtual interface;

[0059] B4. Perform a backup operation based on the target standby virtual interface and through the preset data transmission tool.

[0060] In a specific implementation, when the feature phone is not connected to the electronic device through the USB interface, the user may be prompted to establish a connection with the electronic device through the USB interface, and the specific implementation method of the prompt may be at least one of the following: voice prompt, vibration prompt, and display prompt. When the feature phone has completed the connection with the electronic device through the USB interface, at least one backup virtual interface is pushed, a target backup virtual interface may be selected from the at least one backup virtual interface, and then a backup operation is performed based on the target backup virtual interface and through a preset data transmission tool.

[0061] In an embodiment of the present application, when the system of the feature machine triggers the assert mechanism, the system will not be able to schedule. In order to ensure that the USB enumerated port can still send and receive data normally, first, the USB hardware can be kept from being reset at will. At the same time, the data structure used by the USB before the assert mechanism can be saved in a global variable, and it can also respond to the port opening and closing commands, thereby ensuring that the data interaction between the device and the tool can proceed normally during the assert period.

[0062] In a possible example, the above step 103, before performing the backup operation based on the USB interface through the preset data transmission tool, may further include the following steps:

[0063] C1. Acquire a target face image sent by the electronic device;

[0064] C2. Performing image quality evaluation on the target face image to obtain a face image quality evaluation value;

[0065] C3. When the face image quality evaluation value is greater than a preset image quality evaluation value, matching the target face image with a preset face image;

[0066] C4. When the target facial image successfully matches the preset facial image, executing the step of performing a backup operation based on the USB interface through a preset data transmission tool.

[0067] Among them, in the embodiment of the present application, the preset image quality evaluation value and the preset face image can be pre-saved in the feature phone, which can be set by the user or by the system default.

[0068] In a specific implementation, the functional machine can use at least one image quality evaluation index to evaluate the image quality of the target face image to obtain a face image quality evaluation value. The image quality evaluation index can be at least one of the following: face deviation, face integrity, clarity, feature point distribution density, average gradient, information entropy, signal-to-noise ratio, etc., which are not limited here. Among them, the face deviation is the deviation between the face angle in the image and the face angle of the front face, and the face integrity is the ratio between the area of ​​the face in the image and the area of ​​the complete face. Then, the target face image is matched with the preset face image, and when the target face image matches the preset face image successfully, the subsequent backup operation is performed. Otherwise, the subsequent operation may not be performed, which can improve the test security.

[0069] In a possible example, the above step C2, performing image quality evaluation on the target face image to obtain a face image quality evaluation value, may include the following steps:

[0070] C21, obtaining a target face deviation degree of a target face image, a target face completeness degree of the target face image, a target feature point distribution density of the target face image, and a target information entropy;

[0071] C22, when the target face deviation is greater than a preset deviation and the target face integrity is greater than a preset integrity, determining a target first reference evaluation value corresponding to the target face deviation according to a mapping relationship between a preset face deviation and a first reference evaluation value;

[0072] C23, determining a target second reference evaluation value corresponding to the target face integrity according to a preset mapping relationship between the face integrity and the second reference evaluation value;

[0073] C24, according to the preset mapping relationship between the feature point distribution density and the weight pair, determine the target weight pair corresponding to the target feature point distribution density, the target weight pair includes a target first weight and a target second weight, the target first weight is the weight corresponding to the first reference evaluation value, and the target second weight is the weight corresponding to the second reference evaluation value;

[0074] C25, performing a weighted operation according to the target first weight, the target second weight, the target first reference evaluation value, and the target second reference evaluation value to obtain a first reference evaluation value;

[0075] C26. Determine a first image quality evaluation value corresponding to the target feature point distribution density according to a preset mapping relationship between the feature point distribution density and the image quality evaluation value;

[0076] C27. Determine a target image quality deviation value corresponding to the target information entropy according to a preset mapping relationship between information entropy and image quality deviation value;

[0077] C28, obtaining a first shooting parameter of the target face image;

[0078] C29. Determine a target optimization coefficient corresponding to the first shooting parameter according to a preset mapping relationship between the shooting parameter and the optimization coefficient;

[0079] C30, adjusting the first image quality evaluation value according to the target optimization coefficient and the target image quality deviation value to obtain a second reference evaluation value;

[0080] C31, obtaining target environment parameters corresponding to the target face image;

[0081] C32. Determine a target weight coefficient pair corresponding to the target environmental parameter according to a preset mapping relationship between the environmental parameter and the weight coefficient pair, wherein the target weight coefficient pair includes a target first weight coefficient and a target second weight coefficient, wherein the target first weight coefficient is a weight coefficient corresponding to the first reference evaluation value, and the target second weight coefficient is a weight coefficient corresponding to the second reference evaluation value;

[0082] C33. Perform a weighted operation based on the target first weight coefficient, the target second weight coefficient, the first reference evaluation value, and the second reference evaluation value to obtain a facial image quality evaluation value of the target facial image.

[0083] Among them, in the embodiment of the present application, the preset deviation degree and the preset integrity degree can be set by the user or by the system default, and only when both are within a certain range can the face recognition be successful. The mapping relationship between the preset face deviation degree and the first reference evaluation value, the mapping relationship between the preset face integrity degree and the second reference evaluation value, and the mapping relationship between the preset feature point distribution density and the weight pair can be pre-stored in the function machine. The weight pair may include a first weight and a second weight, the sum of the first weight and the second weight is 1, the first weight is the weight corresponding to the first reference evaluation value, and the second weight is the weight corresponding to the second reference evaluation value. The mapping relationship between the preset feature point distribution density and the image quality evaluation value, the mapping relationship between the preset information entropy and the image quality deviation value, the mapping relationship between the preset shooting parameters and the optimization coefficient, and the mapping relationship between the preset environmental parameters and the weight coefficient pair. Among them, the weight coefficient pair may include a first weight coefficient and a second weight coefficient, the first weight coefficient is the weight coefficient corresponding to the first reference evaluation value, the second weight coefficient is the weight coefficient corresponding to the second reference evaluation value, and the sum of the first weight coefficient and the second weight coefficient is 1.

[0084] Among them, the value range of the image quality evaluation value can be 0 to 1, or, it can also be 0 to 100. The image quality deviation value can be a positive real number, for example, 0 to 1, or, it can also be greater than 1. The value range of the optimization coefficient can be between -1 and 1, for example, the optimization coefficient can be -0.1 to 0.1. In the embodiment of the present application, the shooting parameters can be at least one of the following: exposure time, shooting mode, sensitivity ISO, white balance parameters, focal length, focus, area of ​​interest, etc., which are not limited here. The environmental parameters can be at least one of the following: ambient brightness, ambient temperature, ambient humidity, weather, atmospheric pressure, magnetic field interference intensity, etc., which are not limited here.

[0085] In a specific implementation, the functional machine can obtain the target face deviation degree of the target face image, the target face completeness of the target face image, the target feature point distribution density of the target face image and the target information entropy, wherein the target feature point distribution density can be the ratio between the total number of feature points of the target face image and the area of ​​the target face image.

[0086] Furthermore, when the target face deviation is greater than the preset deviation and the target face integrity is greater than the preset integrity, the functional machine can determine the target first reference evaluation value corresponding to the target face deviation according to the mapping relationship between the preset face deviation and the first reference evaluation value, and can also determine the target second reference evaluation value corresponding to the target face integrity according to the mapping relationship between the preset face integrity and the second reference evaluation value, and determine the target weight pair corresponding to the target feature point distribution density according to the mapping relationship between the preset feature point distribution density and the weight pair, the target weight pair includes a target first weight and a target second weight, the target first weight is the weight corresponding to the first reference evaluation value, and the target second weight is the weight corresponding to the second reference evaluation value, then, a weighted operation can be performed based on the target first weight, the target second weight, the target first reference evaluation value and the target second reference evaluation value to obtain a first reference evaluation value, and the specific calculation formula is as follows:

[0087] First reference evaluation value = target first reference evaluation value * target first weight + target second reference evaluation value * target second weight

[0088] Furthermore, the quality of the image can be evaluated holistically from the perspective of the face and the completeness of the face.

[0089] Further, the feature machine can determine the first image quality evaluation value corresponding to the target feature point distribution density according to the mapping relationship between the preset feature point distribution density and the image quality evaluation value, and determine the target image quality deviation value corresponding to the target information entropy according to the mapping relationship between the preset information entropy and the image quality deviation value. The feature machine can determine the target image quality deviation value corresponding to the target information entropy according to the mapping relationship between the preset information entropy and the image quality deviation value. When generating an image, some noise is generated due to external (weather, light, angle, jitter, etc.) or internal (system, GPU) reasons. These noises will have some impact on the image quality. Therefore, the image quality can be adjusted to a certain extent to ensure an objective evaluation of the image quality.

[0090] Furthermore, the feature phone can also obtain the first shooting parameter of the target face image, and determine the target optimization coefficient corresponding to the first shooting parameter according to the mapping relationship between the preset shooting parameter and the optimization coefficient. The shooting parameter setting may also have a certain impact on the image quality evaluation. Therefore, it is necessary to determine the impact component of the shooting parameter on the image quality. Finally, the first image quality evaluation value is adjusted according to the target optimization coefficient and the target image quality deviation value to obtain a second reference evaluation value, wherein the second reference evaluation value can be obtained according to the following formula:

[0091] When the image quality evaluation value is a percentage system, the specific calculation formula is as follows:

[0092] Second reference evaluation value = (first image quality evaluation value + target image quality deviation value) * (1 + target optimization coefficient)

[0093] When the image quality evaluation value is a percentage, the specific calculation formula is as follows:

[0094] Second reference evaluation value = first image quality evaluation value * (1 + target image quality deviation value) * (1 + target optimization coefficient)

[0095] Furthermore, the functional machine can obtain the target environmental parameters corresponding to the target facial image, and determine the target weight coefficient pair corresponding to the target environmental parameters according to the mapping relationship between the preset environmental parameters and the weight coefficient pair, the target weight coefficient pair includes a target first weight coefficient and a target second weight coefficient, the target first weight coefficient is the weight coefficient corresponding to the first reference evaluation value, and the target second weight coefficient is the weight coefficient corresponding to the second reference evaluation value. Then, a weighted operation can be performed based on the target first weight coefficient, the target second weight coefficient, the first reference evaluation value, and the second reference evaluation value to obtain the facial image quality evaluation value of the target facial image. The specific calculation formula is as follows:

[0096] The face image quality evaluation value of the target face image = the first reference evaluation value * the target first weight coefficient + the second reference evaluation value * the target second weight coefficient

[0097] In this way, the image quality can be objectively evaluated by combining internal and external environmental factors, shooting setting factors, and the influence of face angle and completeness, which helps to improve the accuracy of face image quality evaluation.

[0098] It can be seen that the test method described in the embodiment of the present application is applied to a feature phone. When the feature phone is in the power-on state, it is detected whether a system failure occurs in the feature phone. When a system failure occurs in the feature phone, it is detected whether the feature phone has been connected to an electronic device via a USB interface. When the feature phone has been connected to an electronic device via a USB interface, the USB interface is maintained for communication, and a backup operation is performed based on the USB interface through a preset data transmission tool. In this way, when a failure occurs in the system operation of the feature phone, the USB interface can maintain communication without loss of communication, allowing the automated testing tool to perform backup, thereby improving test efficiency.

[0099] With the above Figure 1 For the embodiments shown, please refer to Figure 2 , Figure 2 : is a flow chart of a test method provided in an embodiment of the present application, which is applied to a feature phone. The test method includes:

[0100] 201. When the feature machine is in a powered-on state, detect whether the feature machine has a system failure.

[0101] 202. When a system failure occurs in the feature phone, detect whether the feature phone is connected to an electronic device via a USB interface.

[0102] 203. When the functional machine is connected to the electronic device via the USB interface, the USB interface is maintained for communication, and a backup operation is performed based on the USB interface through a preset data transmission tool.

[0103] 204. When the feature machine is not connected to the electronic device through the USB interface, prompt the user to establish a connection with the electronic device through the USB interface.

[0104] 205. When the functional machine has completed the connection with the electronic device through the USB interface, push at least one backup virtual interface.

[0105] 206. Select a target backup virtual interface from the at least one backup virtual interface.

[0106] 207. Perform a backup operation based on the target backup virtual interface and through the preset data transmission tool.

[0107] The specific description of the above steps 201 to 207 can refer to the above Figure 1 The corresponding steps of the described test method will not be repeated here.

[0108] It can be seen that the test method described in the embodiment of the present application is applied to a feature phone. When the feature phone is in the power-on state, it is detected whether a system failure occurs in the feature phone. When a system failure occurs in the feature phone, it is detected whether the feature phone has been connected to an electronic device through a USB interface. When the feature phone has been connected to an electronic device through a USB interface, the USB interface is maintained for communication, and a backup operation is performed based on the USB interface through a preset data transmission tool. When the feature phone is not connected to the electronic device through the USB interface, the user is prompted to establish a connection with the electronic device through the USB interface. When the feature phone has completed the connection with the electronic device through the USB interface, at least one backup virtual interface is pushed, a target backup virtual interface is selected from the at least one backup virtual interface, and a backup operation is performed based on the target backup virtual interface and through a preset data transmission tool. In this way, when a failure occurs in the system operation of the feature phone, the USB interface can maintain communication without dropping the interface, allowing the automated testing tool to perform backup, thereby improving the testing efficiency.

[0109] In accordance with the above embodiment, please refer to Figure 3 , Figure 3 : is a structural diagram of a functional machine provided in an embodiment of the present application. As shown in the figure, the functional machine includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor. In the embodiment of the present application, the program includes instructions for executing the following steps:

[0110] When the functional machine is in a powered-on state, detecting whether a system failure occurs in the functional machine;

[0111] When a system failure occurs in the feature phone, detecting whether the feature phone is connected to an electronic device via a USB interface;

[0112] When the functional machine is connected to the electronic device via the USB interface, the USB interface is maintained for communication, and a backup operation is performed based on the USB interface through a preset data transmission tool.

[0113] It can be seen that the feature machine described in the embodiments of the present application detects whether a system failure occurs in the feature machine when the feature machine is in the power-on state. When a system failure occurs in the feature machine, it detects whether the feature machine has been connected to an electronic device via a USB interface. When the feature machine has been connected to an electronic device via a USB interface, it maintains communication via the USB interface and performs backup operations based on the USB interface through a preset data transmission tool. In this way, when a failure occurs in the operation of the feature machine system, the USB interface can maintain communication without interruption, allowing the automated testing tool to perform backup, thereby improving testing efficiency.

[0114] Optionally, the program further includes instructions for executing the following steps:

[0115] When the functional machine is not connected to the electronic device through the USB interface, prompting the user to establish a connection with the electronic device through the USB interface;

[0116] When the functional machine has completed the connection with the electronic device through the USB interface, pushing at least one spare virtual interface;

[0117] Selecting a target standby virtual interface from the at least one standby virtual interface;

[0118] A backup operation is performed based on the target backup virtual interface and through the preset data transfer tool.

[0119] Optionally, in the aspect of performing the backup operation based on the USB interface and through a preset data transmission tool, the program includes instructions for performing the following steps:

[0120] Determine a target diagnostic result corresponding to the system fault;

[0121] Determine the target cache data storage identifier corresponding to the target diagnostic result according to the preset mapping relationship between the diagnostic result and the cache data storage identifier;

[0122] Acquire corresponding target cache data from a preset cache area according to the target cache data storage identifier;

[0123] The target cache data is backed up to the electronic device based on the USB interface and through the preset data transmission tool.

[0124] Optionally, in the aspect of detecting whether the functional machine has a system failure, the program includes instructions for executing the following steps:

[0125] Obtaining target operation data of the functional machine within a preset time period;

[0126] Performing keyword extraction on the target operation data to obtain target keywords;

[0127] When a preset keyword set exists in the target keyword, it is confirmed that a system failure has occurred in the functional machine.

[0128] Optionally, before detecting whether the functional machine is connected to the electronic device via the USB interface, the program further includes instructions for executing the following steps:

[0129] Determine the target fault level corresponding to the target keyword according to the mapping relationship between the preset keywords and the fault levels;

[0130] When the target fault level is higher than the preset fault level, the step of detecting whether the functional machine is connected to the electronic device via the USB interface is performed.

[0131] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should be easily aware that, in combination with the units and algorithm steps of each example described in the embodiment provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0132] The embodiment of the present application can divide the functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0133] Figure 4 4 is a functional unit composition block diagram of a test device 400 involved in an embodiment of the present application. The device 400 is applied to a functional machine. The device 400 includes: a detection unit 401 and a communication unit 402, wherein:

[0134] The detection unit 401 is used to detect whether a system failure occurs in the feature machine when the feature machine is in a powered-on state;

[0135] The detection unit 401 is further used to detect whether the feature machine is connected to the electronic device through the USB interface when a system failure occurs in the feature machine;

[0136] The communication unit 402 is used to keep the USB interface communicating when the functional machine is connected to the electronic device via the USB interface, and to perform a backup operation based on the USB interface through a preset data transmission tool.

[0137] It can be seen that the testing device described in the embodiment of the present application is applied to a feature machine. When the feature machine is in the power-on state, it detects whether a system failure occurs in the feature machine. When a system failure occurs in the feature machine, it detects whether the feature machine has been connected to an electronic device via a USB interface. When the feature machine has been connected to an electronic device via a USB interface, it maintains communication via the USB interface and performs a backup operation based on the USB interface through a preset data transmission tool. In this way, when a failure occurs in the operation of the feature machine system, the USB interface can maintain communication without interruption, allowing the automated testing tool to perform backup, thereby improving testing efficiency.

[0138] Optionally, the device 400 is further specifically configured to:

[0139] When the functional machine is not connected to the electronic device through the USB interface, prompting the user to establish a connection with the electronic device through the USB interface;

[0140] When the functional machine has completed the connection with the electronic device through the USB interface, pushing at least one spare virtual interface;

[0141] Selecting a target standby virtual interface from the at least one standby virtual interface;

[0142] A backup operation is performed based on the target backup virtual interface and through the preset data transfer tool.

[0143] Optionally, in the aspect of performing the backup operation based on the USB interface and through a preset data transmission tool, the communication unit 402 is specifically used for:

[0144] Determine a target diagnostic result corresponding to the system fault;

[0145] Determine the target cache data storage identifier corresponding to the target diagnostic result according to the preset mapping relationship between the diagnostic result and the cache data storage identifier;

[0146] Acquire corresponding target cache data from a preset cache area according to the target cache data storage identifier;

[0147] The target cache data is backed up to the electronic device based on the USB interface and through the preset data transmission tool.

[0148] Optionally, in the aspect of detecting whether the functional machine has a system failure, the detection unit 401 is specifically used for:

[0149] Obtaining target operation data of the functional machine within a preset time period;

[0150] Performing keyword extraction on the target operation data to obtain target keywords;

[0151] When a preset keyword set exists in the target keyword, it is confirmed that a system failure has occurred in the functional machine.

[0152] Optionally, before detecting whether the functional machine is connected to the electronic device via the USB interface, the device 400 is further specifically configured to:

[0153] Determine the target fault level corresponding to the target keyword according to the mapping relationship between the preset keywords and the fault levels;

[0154] When the target fault level is higher than the preset fault level, the step of detecting whether the functional machine is connected to the electronic device via the USB interface is performed.

[0155] It can be understood that the functions of each program module of the testing device of this embodiment can be specifically implemented according to the method in the above method embodiment, and its specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.

[0156] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method recorded in the above method embodiment, and the above computer includes a functional machine.

[0157] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes a functional machine.

[0158] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0159] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0160] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, 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, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0161] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0162] 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.

[0163] If the above-mentioned 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 computer-readable memory. Based on this understanding, the technical solution 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, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0164] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0165] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A testing method, characterized in that: Applied to a feature phone, the method includes: When the functional machine is in a powered-on state, detecting whether a system failure occurs in the functional machine; When a system failure occurs in the feature machine, detecting whether the feature machine is connected to an electronic device via a USB interface, specifically: detecting whether the feature machine is in communication connection with a log software tool in the electronic device, the log software tool being used to read system operation data in the feature machine; When the functional machine is connected to the electronic device through the USB interface, the USB interface is kept in communication, that is, the USB interface is ensured not to be disconnected, and a backup operation is performed based on the USB interface through a preset data transmission tool, wherein the backup operation is a fault site protection operation, specifically, saving fault site data for maintenance personnel or test personnel to implement system fault diagnosis; Receiving a repair instruction sent by the electronic device, responding to the repair instruction, and implementing system fault repair on the functional device; Wherein, the method further comprises: Acquire a target face image sent by the electronic device; Performing image quality evaluation on the target face image to obtain a face image quality evaluation value; When the face image quality evaluation value is greater than a preset image quality evaluation value, matching the target face image with a preset face image; When the target face image successfully matches the preset face image, executing the step of performing a backup operation based on the USB interface through a preset data transmission tool; The step of performing image quality evaluation on the target face image to obtain a face image quality evaluation value includes: Obtaining a target face deviation degree of a target face image, a target face completeness degree of the target face image, a target feature point distribution density of the target face image, and a target information entropy; When the target face deviation is greater than a preset deviation and the target face integrity is greater than a preset integrity, determining a target first reference evaluation value corresponding to the target face deviation according to a mapping relationship between a preset face deviation and a first reference evaluation value; Determine the target second reference evaluation value corresponding to the target face integrity according to a preset mapping relationship between the face integrity and the second reference evaluation value; According to a preset mapping relationship between feature point distribution density and weight pair, determine a target weight pair corresponding to the target feature point distribution density, the target weight pair comprising a target first weight and a target second weight, the target first weight being the weight corresponding to the first reference evaluation value, and the target second weight being the weight corresponding to the second reference evaluation value; Performing a weighted operation according to the target first weight, the target second weight, the target first reference evaluation value, and the target second reference evaluation value to obtain a first reference evaluation value; Determine a first image quality evaluation value corresponding to the target feature point distribution density according to a preset mapping relationship between the feature point distribution density and the image quality evaluation value; Determine the target image quality deviation value corresponding to the target information entropy according to the preset mapping relationship between the information entropy and the image quality deviation value; Acquire a first shooting parameter of the target face image; Determining a target optimization coefficient corresponding to the first shooting parameter according to a preset mapping relationship between the shooting parameter and the optimization coefficient; Adjusting the first image quality evaluation value according to the target optimization coefficient and the target image quality deviation value to obtain a second reference evaluation value; Obtaining target environment parameters corresponding to the target face image; According to the mapping relationship between the preset environmental parameters and the weight coefficient pairs, determine the target weight coefficient pair corresponding to the target environmental parameters, the target weight coefficient pair includes a target first weight coefficient and a target second weight coefficient, the target first weight coefficient is the weight coefficient corresponding to the first reference evaluation value, and the target second weight coefficient is the weight coefficient corresponding to the second reference evaluation value; A weighted operation is performed according to the target first weight coefficient, the target second weight coefficient, the first reference evaluation value, and the second reference evaluation value to obtain a facial image quality evaluation value of the target facial image.

2. The method according to claim 1, characterized in that The method further comprises: When the functional machine is not connected to the electronic device through the USB interface, prompting the user to establish a connection with the electronic device through the USB interface; When the functional machine has completed the connection with the electronic device through the USB interface, pushing at least one spare virtual interface; Selecting a target standby virtual interface from the at least one standby virtual interface; A backup operation is performed based on the target backup virtual interface and through the preset data transfer tool.

3. The method according to claim 1 or 2, characterized in that: The performing the backup operation based on the USB interface and through a preset data transmission tool includes: Determine a target diagnostic result corresponding to the system fault; Determine the target cache data storage identifier corresponding to the target diagnostic result according to the preset mapping relationship between the diagnostic result and the cache data storage identifier; Acquire corresponding target cache data from a preset cache area according to the target cache data storage identifier; The target cache data is backed up to the electronic device based on the USB interface and through the preset data transmission tool.

4. The method according to claim 1 or 2, characterized in that: The detecting whether the functional machine has a system failure includes: Obtaining target operation data of the functional machine within a preset time period; Performing keyword extraction on the target operation data to obtain target keywords; When a preset keyword set exists in the target keyword, it is confirmed that a system failure has occurred in the functional machine.

5. The method according to claim 4, characterized in that Before detecting whether the functional machine is connected to the electronic device via the USB interface, the method further includes: Determine the target fault level corresponding to the target keyword according to the mapping relationship between the preset keywords and the fault levels; When the target fault level is higher than the preset fault level, the step of detecting whether the functional machine is connected to the electronic device via the USB interface is performed.

6. A testing device, characterized in that: Applied to a functional machine, the device comprises: a detection unit and a communication unit, wherein: The detection unit is used to detect whether a system failure occurs in the functional machine when the functional machine is in a powered-on state; The detection unit is further used to detect whether the feature machine is connected to the electronic device through the USB interface when a system failure occurs in the feature machine, specifically: detecting whether the feature machine is connected to a log software tool in the electronic device for communication, the log software tool being used to read system operation data in the feature machine; The communication unit is used to keep the USB interface communicating when the functional machine is connected to the electronic device through the USB interface, that is, to ensure that the USB interface is not disconnected, and to perform a backup operation based on the USB interface through a preset data transmission tool, wherein the backup operation is a fault site protection operation, specifically, saving fault site data for maintenance personnel or test personnel to implement system fault diagnosis; Receiving a repair instruction sent by the electronic device, responding to the repair instruction, and implementing system fault repair on the functional device; The device is also specifically used for: Acquire a target face image sent by the electronic device; Performing image quality evaluation on the target face image to obtain a face image quality evaluation value; When the face image quality evaluation value is greater than a preset image quality evaluation value, matching the target face image with a preset face image; When the target face image successfully matches the preset face image, executing the step of performing a backup operation based on the USB interface through a preset data transmission tool; The step of performing image quality evaluation on the target face image to obtain a face image quality evaluation value includes: Obtaining a target face deviation degree of a target face image, a target face completeness degree of the target face image, a target feature point distribution density of the target face image, and a target information entropy; When the target face deviation is greater than a preset deviation and the target face integrity is greater than a preset integrity, determining a target first reference evaluation value corresponding to the target face deviation according to a mapping relationship between a preset face deviation and a first reference evaluation value; Determine the target second reference evaluation value corresponding to the target face integrity according to a preset mapping relationship between the face integrity and the second reference evaluation value; According to a preset mapping relationship between feature point distribution density and weight pair, determine a target weight pair corresponding to the target feature point distribution density, the target weight pair comprising a target first weight and a target second weight, the target first weight being the weight corresponding to the first reference evaluation value, and the target second weight being the weight corresponding to the second reference evaluation value; Performing a weighted operation according to the target first weight, the target second weight, the target first reference evaluation value, and the target second reference evaluation value to obtain a first reference evaluation value; Determine a first image quality evaluation value corresponding to the target feature point distribution density according to a preset mapping relationship between the feature point distribution density and the image quality evaluation value; Determine the target image quality deviation value corresponding to the target information entropy according to the preset mapping relationship between the information entropy and the image quality deviation value; Acquire a first shooting parameter of the target face image; Determining a target optimization coefficient corresponding to the first shooting parameter according to a preset mapping relationship between the shooting parameter and the optimization coefficient; Adjusting the first image quality evaluation value according to the target optimization coefficient and the target image quality deviation value to obtain a second reference evaluation value; Obtaining target environment parameters corresponding to the target face image; According to the mapping relationship between the preset environmental parameters and the weight coefficient pairs, determine the target weight coefficient pair corresponding to the target environmental parameters, the target weight coefficient pair includes a target first weight coefficient and a target second weight coefficient, the target first weight coefficient is the weight coefficient corresponding to the first reference evaluation value, and the target second weight coefficient is the weight coefficient corresponding to the second reference evaluation value; A weighted operation is performed according to the target first weight coefficient, the target second weight coefficient, the first reference evaluation value, and the second reference evaluation value to obtain a facial image quality evaluation value of the target facial image.

7. The device according to claim 6, characterized in that The device is also specifically used for: When the functional machine is not connected to the electronic device through the USB interface, prompting the user to establish a connection with the electronic device through the USB interface; When the functional machine has completed the connection with the electronic device through the USB interface, pushing at least one spare virtual interface; Selecting a target standby virtual interface from the at least one standby virtual interface; A backup operation is performed based on the target backup virtual interface and through the preset data transfer tool.

8. The device according to claim 6 or 7, characterized in that In the aspect of performing the backup operation based on the USB interface and through a preset data transmission tool, the communication unit is specifically used for: Determine a target diagnostic result corresponding to the system fault; Determine the target cache data storage identifier corresponding to the target diagnostic result according to the preset mapping relationship between the diagnostic result and the cache data storage identifier; Acquire corresponding target cache data from a preset cache area according to the target cache data storage identifier; The target cache data is backed up to the electronic device based on the USB interface and through the preset data transmission tool.

9. A functional machine, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the program comprises instructions for executing the steps in the method according to any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for recovering storage system

    CN103383656A

  • Data backup method and mobile terminal

    CN106528347A

  • Terminal device testing method and terminal device

    CN106649010A

  • Shooting processing method and related product

    CN107832675A

  • Test system and test method and device

    CN111090553A