Maintenance and testing method and electronic equipment

By collecting and storing log information in real time, identifying and processing abnormal points of application products, we solve the problem of positioning and analyzing root causes during application product development and delivery, and improve development efficiency and delivery speed.

CN117130901BActive Publication Date: 2025-02-18HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310208874.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2025-02-18
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

During the development and delivery of application products, it is difficult to locate and analyze the root cause, which leads to difficulty in converging version stability, which takes time and reduces development efficiency.

Method used

Provide a dimensional measurement method, by collecting and storing log information related to the target application in real time, identifying abnormal point information, and restoring normal functions when the abnormal point information can be restored, or determining responsible persons when it is unrecoverable.

Benefits of technology

It reduces the difficulty of abnormal analysis of application products, reduces delivery time, shortens the delivery time of application products, and improves development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117130901B_ABST
    Figure CN117130901B_ABST
Patent Text Reader

Abstract

The present application provides a maintenance and testing method and electronic device. The method includes: in the process of development and delivery of the target application, real-time collection of log information from the maintenance and testing targets related to the target application, and packaging the log information according to a preset data format to obtain maintenance and testing information; storing the maintenance and testing information; and identifying abnormal point information related to the target application based on the stored maintenance and testing information. In this way, by timely collecting and storing maintenance and testing information, rich and timely data can be provided for maintenance and testing, and the electronic device can automatically, intelligently and quickly identify abnormal points of the target application, such as the camera application, during the development and delivery process, thereby reducing the difficulty of abnormal analysis of the application product, reducing the delivery time, shortening the delivery time of the application product, and improving development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal equipment, and in particular to a maintenance and testing method and electronic equipment. Background Art

[0002] During the development and delivery process of application products, problems such as the inability to locate or analyze the root causes are often encountered on the development or platform side, hindering the stability convergence of the application product version.

[0003] Currently, during the development and delivery process after development and before commercial use, maintenance and testing are performed by manually checking a large number of logs. This method is difficult and time-consuming to analyze abnormalities in application products, resulting in longer delivery time for application products and reduced development efficiency. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a maintenance and testing method and electronic equipment, which can reduce the difficulty of abnormal analysis of application products, reduce delivery time, shorten the delivery time of application products, and improve development efficiency.

[0005] In the first aspect, the present application provides a maintenance and testing method. The method is applied to electronic devices. The method may include: in the process of development and delivery of the target application, collecting log information in real time from the maintenance and testing targets related to the target application, and encapsulating the log information according to a preset data format to obtain maintenance and testing information; storing the maintenance and testing information; and identifying abnormal point information related to the target application based on the stored maintenance and testing information. In this way, by timely collecting and storing maintenance and testing information, rich and timely data can be provided for maintenance and testing, and electronic devices can automatically, intelligently and quickly identify abnormal points of target applications (such as cameras) during the development and delivery process, thereby reducing the difficulty of abnormal analysis of application products, reducing delivery time, shortening the delivery time of application products, and improving development efficiency.

[0006] According to the first aspect, it also includes: when the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information, so that the abnormal fault can be quickly eliminated and the processing time can be reduced.

[0007] According to the first aspect, when the abnormal point information is recoverable, the normal function corresponding to the abnormal point information is restored, including: determining the target recovery method corresponding to the abnormal point information, the target recovery method is pre-set; and restoring the normal function corresponding to the abnormal point information according to the target recovery method. In this way, for common abnormalities, it can be automatically restored according to the set recovery method, reducing time consumption and speeding up delivery progress.

[0008] According to the first aspect, it also includes: when the abnormal point information cannot be restored, the person responsible for the abnormal point information is determined according to the preset delimitation conditions. In this way, the person responsible for the abnormal problem can be quickly found, which helps to speed up the handling of the abnormal problem and avoid the "passing the buck" between different fields that affects the delivery progress.

[0009] According to the first aspect, based on the stored maintenance and measurement information, the abnormal point information related to the target application is identified, including: the maintenance and measurement information is performance maintenance and measurement information, and the performance maintenance and measurement information is counted to obtain a first statistical result; according to the preset segmentation index, the target segment corresponding to the first statistical result is determined; in the configuration file library, the target configuration file corresponding to the target segment is searched, and the configuration file library stores the configuration files corresponding to each segment of the segmentation index; according to the target configuration file, the performance abnormal point information is identified and the performance abnormal point position is marked. In this way, the performance abnormality problem can be automatically and quickly identified, the time-consuming problem analysis is reduced, and the delivery progress is accelerated.

[0010] According to the first aspect, based on the stored maintenance and measurement information, the abnormal point information related to the target application is identified, including: the maintenance and measurement information is power consumption maintenance and measurement information, and the power consumption maintenance and measurement information is counted according to the preset power consumption statistics method to obtain a second statistical result; based on the second statistical result, the power consumption abnormal point information is identified and the power consumption abnormal point position is marked; the power consumption abnormal point information is saved. In this way, the power consumption abnormal problem can be automatically and quickly identified, the time spent on problem analysis can be reduced, and the delivery progress can be accelerated.

[0011] According to the first aspect, based on the stored maintenance and measurement information, abnormal point information related to the target application is identified, including: the maintenance and measurement information is memory maintenance and measurement information, and the memory maintenance and measurement information is counted according to the preset memory statistics method and memory tracking method to obtain a third statistical result; based on the third statistical result, the memory abnormal point information and the memory abnormal type to which the memory abnormal point information belongs are identified; warning information is issued for the memory abnormal point information, and / or the memory abnormal point information is saved. In this way, memory abnormal problems can be automatically and quickly identified, the time spent on problem analysis is reduced, and the delivery progress is accelerated.

[0012] According to the first aspect, when the abnormal point information is recoverable, the normal function corresponding to the abnormal point information is restored, including: the abnormal point information is the process abnormal point information, and the process at the abnormal point is restored to the normal process using the WatchDog mechanism. In this way, the process can be quickly restored after the abnormality is identified, reducing the time spent on problem handling and speeding up the delivery progress.

[0013] According to the first aspect, when the abnormal point information is recoverable, the normal function corresponding to the abnormal point information is restored, including: if the abnormal point information is image loss information, the lost image is restored and output according to the cause of the image loss. In this way, it is possible to quickly restore after the image loss problem is identified, reduce the time spent on problem handling, and speed up the delivery progress.

[0014] According to the first aspect, when the abnormal point information is recoverable, the normal function corresponding to the abnormal point information is restored, including: if the abnormal point information is a memory leak, the memory that has not been released is detected, and the memory is released. In this way, it is possible to quickly recover after identifying the memory leak problem, reduce the time spent on problem handling, and speed up the delivery progress.

[0015] According to the first aspect, when the abnormal point information is recoverable, the normal function corresponding to the abnormal point information is restored, including: if the abnormal point information is performance abnormal point information, dynamically adjust the CPU frequency and / or bind the core according to the statistical results of the performance maintenance information. In this way, it is possible to quickly recover after identifying the performance abnormality, reduce the time spent on problem handling, and speed up the delivery progress.

[0016] According to the first aspect, when the abnormal point information is recoverable, the normal function corresponding to the abnormal point information is restored, including: when the abnormal point information is the abnormal point information that causes the target application to freeze during operation, the stuck process is restored using the WatchDog mechanism. In this way, the system can quickly recover after the freeze problem is identified, reducing the time spent on problem handling and speeding up delivery progress.

[0017] According to a first aspect, storing maintenance and measurement information includes: presetting a data format including classification information of the maintenance and measurement information, determining a target category to which the maintenance and measurement information belongs according to the classification information of the maintenance and measurement information; and storing the maintenance and measurement information in a data set corresponding to the target category.

[0018] According to the first aspect, it also includes: generating and outputting data analysis results of the maintenance and measurement information, wherein the data analysis results include abnormal point information.

[0019] According to a first aspect, the target application is a camera application.

[0020] On the second aspect, the present application provides an electronic device, which includes a data acquisition system, a data storage system, and an abnormality analysis and recovery system connected in sequence, wherein: the data acquisition system is used to collect log information from the maintenance and measurement targets related to the target application in real time during the development and delivery process of the target application, and encapsulate the log information according to a preset data format to obtain maintenance and measurement information; the data storage system is used to store the maintenance and measurement information; the abnormality analysis and recovery system is used to identify abnormal point information related to the target application based on the stored maintenance and measurement information. In this way, the electronic device can provide rich and timely data for maintenance and measurement by timely collecting and storing maintenance and measurement information. The electronic device can automatically, intelligently and quickly identify the abnormal points of the target application (such as a camera) during the development and delivery process, thereby reducing the difficulty of abnormal analysis of the application product, reducing the delivery time, shortening the delivery time of the application product, and improving development efficiency.

[0021] According to the second aspect, the abnormality analysis and recovery system is further used to: restore the normal function corresponding to the abnormal point information when the abnormal point information is recoverable.

[0022] According to the second aspect, the data acquisition system, the data storage system and the abnormality analysis and recovery system are located in the kernel layer of the electronic device.

[0023] In a third aspect, the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is coupled to the processor; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes any one of the maintenance and measurement methods of the first aspect.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium, comprising a computer program, which, when executed on an electronic device, enables the electronic device to execute any one of the maintenance and measurement methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a schematic structural diagram of an illustrative electronic device 100;

[0026] Figure 2 1 is a software structure block diagram of an electronic device 100 according to an embodiment of the present application;

[0027] Figure 3 is an exemplary diagram showing the internal structure of a maintenance and testing system;

[0028] Figure 4 The following is an example diagram of the workflow of the maintenance and testing system. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are 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.

[0030] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0031] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0032] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0033] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0034] In the related technologies, abnormal analysis of application products after development and before commercial use is relatively difficult and time-consuming, which results in extended delivery time of application products and reduced development efficiency.

[0035] Taking the camera application as an example, in the related technology, the camera application has the following problems before delivery:

[0036] During the product camera delivery process, we often encounter problems such as being unable to locate or analyze the root cause on the development or platform side, which hinders the stability convergence of the version. These problems mainly include the following:

[0037] 1. The stability module often encounters problems that cannot be analyzed. The platform side analysis LOG (i.e. log) is invalid, the LOG is incomplete, and it is not enough to support problem analysis, etc., and then reproduce; when a small probability problem is difficult to reproduce, it is basically difficult to capture the real-time log of the problem to support problem analysis. Moreover, it often overlaps with surrounding areas, and the boundary of the problem is not clear, resulting in buck-passing.

[0038] 2. Memory problems cannot be analyzed in a timely manner, and memory leaks cannot track memory behavior in a timely manner. The memory blocks requested by each algorithm in the camera (such as portrait algorithm, skin beautification algorithm, and beauty algorithm, etc.) have the same name, which will lead to the inability to effectively implement memory problem analysis. The problem of being unable to take pictures due to inaccurate memory statistics is also quite prominent, which often causes user complaints.

[0039] 3. The performance module was not tested in time when it was merged, resulting in performance regression after it was uploaded to the library. The version quality declined, and it was impossible to directly locate which submission caused it, making it difficult for developers to analyze. The time consumed by each section was unclear, and the analysis of problems in surrounding areas was not timely, resulting in slow convergence of problems and failure to close the loop in time.

[0040] 4. Power consumption data is similar to performance data. Modifications often lead to deterioration of power consumption, and problems need to be discovered during independent testing. Power consumption data statistics are overly dependent on the test department and power consumption field, and problem analysis is relatively passive.

[0041] 5. Insufficient maintenance and testing information. There are often no logs at key nodes, making development and analysis difficult.

[0042] This embodiment provides a maintenance and testing method and electronic equipment, which can reduce the difficulty of abnormal analysis of application products, reduce delivery time, shorten the delivery time of application products, and improve development efficiency.

[0043] This embodiment can be applied to electronic devices such as mobile phones and tablets. The structure of the electronic device can be as follows: Figure 1 shown.

[0044] Figure 1 FIG. 1 is a schematic diagram of the structure of an electronic device 100 exemplarily shown. It should be understood that Figure 1 The illustrated electronic device 100 is merely one example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different configuration of components. Figure 1 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0045] See also Figure 1The electronic device 100 may include: a processor 110, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, an indicator 192, a camera 193, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0046] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0047] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0048] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.

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

[0050] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0051] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0052] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0053] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0054] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0055] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0056] Figure 2 1 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.

[0057] The layered architecture of the electronic device 100 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system may include an application layer, an application framework layer, a system library, and a kernel layer.

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

[0059] like Figure 2 As shown, the application package may include applications such as camera, calendar, map, WLAN, music, short message, gallery, video, call, Bluetooth, etc.

[0060] like Figure 2 As shown, the application framework layer may include a window manager, a content provider, a resource manager, a view system, etc.

[0061] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

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

[0063] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

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

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

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

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

[0068] like Figure 2 As shown, the hardware abstraction layer (ie, HAL layer) is located between the application framework layer and the kernel layer, and can transfer information between the application framework layer and the kernel layer.

[0069] The kernel layer is the layer between hardware and software.

[0070] like Figure 2 As shown, the kernel layer may include modules such as audio driver, display driver, camera driver, sensor driver, and maintenance system.

[0071] Among them, the maintenance and testing system is used to implement the maintenance and testing method of the embodiment of the present application. For the functions of the maintenance and testing system, please refer to the subsequent description of this embodiment.

[0072] Understandably, Figure 2 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.

[0073] Figure 3 The following is an example diagram of the internal structure of the maintenance and testing system. Figure 3 The maintenance and testing system may include a data acquisition system, a data storage system and an abnormality analysis and recovery system, which are connected in sequence.

[0074] The overall workflow of the maintenance and testing system can include the following steps:

[0075] During the development and delivery process of the target application, the data acquisition system collects log information from the maintenance and testing targets related to the target application in real time, and encapsulates the log information according to a preset data format to obtain maintenance and testing information.

[0076] The data storage system stores maintenance and measurement information.

[0077] The abnormality analysis and recovery system identifies abnormal point information related to the target application based on the stored maintenance and measurement information.

[0078] The preset data format may include a data packet header and data content. The data packet header may include timestamp information and a maintenance and measurement information type identifier. The maintenance and measurement information type identifier is used to identify the type of maintenance and measurement information of the data content part, so as to facilitate classification of the maintenance and measurement information.

[0079] The maintenance information type may be, for example, memory maintenance information, performance maintenance information, power consumption maintenance information, etc. Thus, maintenance information of different maintenance information types may be classified according to the maintenance information type identifier in the data packet header of the maintenance information, so that maintenance information of the same type may be stored together.

[0080] In this embodiment, the abnormality analysis and recovery system can analyze the maintenance information, obtain abnormal point information and recover the abnormal point. Abnormality analysis requires the establishment of a reasonable information analysis framework and analysis standards. The analysis standards are established on the basis of maintenance and can be gradually improved.

[0081] In this embodiment, respective standards are established for performance, memory, power consumption, etc., so that after obtaining maintenance information, data analysis can be performed to identify anomalies in the current scenario, and feedback can be given to developers to achieve the ability of intelligent anomaly identification. After the anomaly analysis is completed, the analysis results can be output to analyze the nodes where the problem occurs in the current process. When the anomaly point can be restored or needs to be restored, the anomaly is restored to ensure the operation of the target application, such as a camera, and improve the user experience.

[0082] Figure 4 The following is an example of the workflow of the maintenance and testing system. Figure 4 In this embodiment, the workflow of the maintenance and testing system may include the following steps:

[0083] D1. During the development and delivery process of the target application, the data acquisition system collects log information from the maintenance and testing targets related to the target application in real time, and encapsulates the log information according to the preset data format to obtain maintenance and testing information.

[0084] There may be one or more measurement targets related to the target application. The measurement targets may be located in the hardware abstraction layer HAL. For example, the measurement targets of the camera are located in the camera HAL layer.

[0085] D2, the data storage system stores maintenance and measurement information.

[0086] D3, the abnormality analysis and recovery system analyzes the stored maintenance and measurement information to generate a data analysis result of the maintenance and measurement information, wherein the data analysis result includes abnormal point information, which is abnormal point information related to the target application identified based on the stored maintenance and measurement information.

[0087] The abnormal point information is used to indicate where the abnormal situation occurs in the target application. For example, the abnormal point information may be performance abnormal point information indicating abnormal performance, power consumption abnormal point information indicating abnormal power consumption, memory abnormal point information indicating abnormal memory, etc.

[0088] D4, the abnormality analysis and recovery system outputs the data analysis results.

[0089] The data analysis result may include the abnormal reason of the abnormal point, for example, the abnormal reason may be a certain algorithm timeout.

[0090] D5, when the abnormal point information can be restored, restore the normal function corresponding to the abnormal point information.

[0091] D6, output the abnormal reason of the abnormal point. The abnormal reason in this step can be read from the data analysis result in step D4.

[0092] It should be noted that some abnormal point information can be restored, while some abnormal point information cannot be restored. For abnormal point information that can be restored, in this embodiment, a corresponding restoration method is set for each abnormal point information, and the normal function corresponding to the abnormal point information can be restored according to the restoration method.

[0093] For abnormal point information that cannot be restored, the person responsible for the abnormal point information is determined according to the preset delimitation conditions. In this way, for abnormal points that cannot be automatically restored, the person responsible can be quickly and accurately determined according to the delimitation conditions, without the need to manually find the person responsible, avoiding the situation of passing the buck between different fields, saving time, and thus improving the efficiency of problem solving.

[0094] The delimitation conditions include the corresponding relationship between each type of abnormal point information and the corresponding responsible person.

[0095] In an exemplary process, when the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information may include:

[0096] Determine the target recovery method corresponding to the abnormal point information. The target recovery method is pre-set.

[0097] According to the target recovery method, restore the normal functions corresponding to the abnormal point information.

[0098] In this embodiment, according to different types of maintenance and measurement information, abnormal point information corresponding to the maintenance and measurement information type can be identified respectively.

[0099] In one example, identifying abnormal point information related to the target application according to the stored maintenance and measurement information may include:

[0100] The maintenance and measurement information is performance maintenance and measurement information, and statistics are performed on the performance maintenance and measurement information to obtain a first statistical result;

[0101] According to the preset segmentation index, determine the target segmentation corresponding to the first statistical result;

[0102] In the configuration file library, a target configuration file corresponding to the target segment is searched, and the configuration file library stores configuration files corresponding to each segment of the segmentation indicator;

[0103] According to the target configuration file, the performance anomaly information is identified and the location of the performance anomaly point is marked.

[0104] For example, if the actual performance data of a certain point (i.e., the collected performance maintenance information) is consistent with the performance calculation results of the corresponding configuration file, it means that the performance data of the point is normal. Otherwise, if the actual performance data of a certain point does not meet the performance calculation results of the corresponding configuration file, it means that the performance data of the point is abnormal, and the point is a performance abnormality point.

[0105] In addition, this embodiment can also save the performance maintenance information in the process of identifying the performance abnormal point information.

[0106] As can be seen from the above, this embodiment can automatically and timely identify performance anomalies when they occur, thereby improving the efficiency of performance problem analysis.

[0107] In one example, identifying abnormal point information related to the target application according to the stored maintenance and measurement information may include:

[0108] The maintenance and measurement information is power consumption maintenance and measurement information, and the power consumption maintenance and measurement information is counted according to a preset power consumption statistical method to obtain a second statistical result;

[0109] According to the second statistical result, identify the abnormal power consumption point information and mark the abnormal power consumption point location;

[0110] Save the power consumption abnormal point information.

[0111] For example, if the measured power consumption data (i.e., the collected power consumption measurement information) at a certain point is much greater than the theoretical power consumption data, it means that the point is a power consumption abnormal point.

[0112] In other embodiments, after identifying the abnormal power consumption point information, the following may also be included:

[0113] Dynamic alarms are issued for abnormal power consumption points. For example, the program throws an exception or prints a warning when an abnormality occurs.

[0114] This embodiment can automatically and timely identify power consumption anomalies when they occur, thereby improving the efficiency of power consumption problem analysis.

[0115] In one example, identifying abnormal point information related to the target application according to the stored maintenance and measurement information may include:

[0116] The maintenance and measurement information is memory maintenance and measurement information, and the memory maintenance and measurement information is counted according to a preset memory statistical method and a memory tracking method to obtain a third statistical result;

[0117] According to the third statistical result, identifying the memory abnormal point information and the memory abnormal type to which the memory abnormal point information belongs;

[0118] Send out warning information for memory abnormal point information, and / or save memory abnormal point information.

[0119] The memory exception type may be, for example, memory leak, memory overload, memory limit exceeded, etc.

[0120] In an example, when the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information may include:

[0121] The abnormal point information is the abnormal point information of the process, and the WatchDog mechanism is used to restore the process at the abnormal point to the normal process.

[0122] For example, when a program runs to the xth statement (x is a natural number), an exception occurs. The xth statement is the process exception point. Then, according to the WatchDog mechanism, process y where the xth statement is located can be killed, and process y can be re-executed from the first statement of process y.

[0123] This embodiment can automatically and timely restore the normal process when a process abnormality occurs, thereby reducing the time spent on handling the abnormality and improving efficiency.

[0124] In an example, when the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information may include:

[0125] The abnormal point information is the image loss information. According to the reason for the image loss, the lost image is restored and output.

[0126] For example, in one example, if the image loss is caused by an algorithm timeout, the WatchDog mechanism can be used to recover.

[0127] In one example, if the image loss is caused by insufficient input frames to the algorithm, a recovery solution designed for this reason can be used.

[0128] In an example, when the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information may include:

[0129] The abnormal point information is a memory leak. It is detected that the requested but unreleased memory is released.

[0130] For example, it is detected through an internal detection tool that a certain memory block application is still not released after the camera system ends its operation. In this case, the unreleased memory can be released.

[0131] This embodiment can handle memory leak exceptions in a timely manner, thereby avoiding low memory problems, and further avoiding the problem of being unable to take photos due to insufficient memory, thereby improving user experience.

[0132] In an example, when the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information may include:

[0133] The abnormal point information is performance abnormal point information. According to the statistical results of the performance maintenance information, the CPU frequency and / or the bound core are dynamically adjusted.

[0134] For example, you can use adb shell commands to adjust the CPU frequency or bind cores.

[0135] Binding a large core can increase the CPU's operating frequency.

[0136] This embodiment can solve the problem of instantaneous freeze, reduce the probability of freeze in the target application, and improve user experience.

[0137] In an example, when the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information may include:

[0138] The abnormal point information is the abnormal point information at which the target application is stuck during runtime, and the stuck process is restored using the WatchDog mechanism.

[0139] This embodiment can restore the target application to a normal state in time when the target application is stuck, thereby improving the user experience and avoiding the problem that the user cannot open the target application after exiting the target application.

[0140] In one example, storing maintenance information may include:

[0141] The preset data format includes classification information of the maintenance and measurement information, and the target category to which the maintenance and measurement information belongs is determined according to the classification information of the maintenance and measurement information;

[0142] The measurement information is stored in a data set corresponding to the target category. The data set can be located in a file system.

[0143] In one example, the target application may be a camera application. It is understandable that this is only an example of the target application and does not limit the target application.

[0144] The maintenance and testing method of this embodiment can reduce the difficulty of abnormal analysis of application products, reduce delivery time, shorten the delivery time of application products, and thus improve the development efficiency of application products.

[0145] For example, when the target application in the maintenance and measurement method of this embodiment is a camera, the following beneficial effects can be obtained:

[0146] First, this embodiment can collect and store maintenance and measurement information in real time to support the analysis of abnormal problems. In addition, since this embodiment can automatically analyze and identify abnormal points after collecting maintenance and measurement information in real time, it can not only capture problematic log data in real time, but also avoid the problem that low-probability problems are difficult to reproduce and difficult to identify.

[0147] Second, it can conduct timely tests when the performance module is merged, ensuring the performance of the application product after it is uploaded to the library and ensuring the quality of the application product version.

[0148] Third, this embodiment can directly locate which submission caused the exception through automatic identification and analysis, reducing the difficulty of analysis for developers. In addition, this embodiment can clearly obtain the time-consuming information of each segment, timely analyze the problems in the surrounding areas, speed up the convergence of problems, and close the loop in time.

[0149] Fourth, the maintenance and testing information collected by this embodiment is rich, and the logs of key nodes can be collected and stored in a timely manner, reducing the difficulty of product development and analysis.

[0150] This embodiment also provides an electronic device. The electronic device may include Figure 3 Therefore, the electronic device may include a data acquisition system, a data storage system and an abnormality analysis and recovery system connected in sequence, wherein:

[0151] The data collection system is used to collect log information from the maintenance and testing targets related to the target application in real time during the development and delivery process of the target application, and to encapsulate the log information according to a preset data format to obtain maintenance and testing information;

[0152] Data storage system, used to store maintenance and testing information;

[0153] The anomaly analysis and recovery system is used to identify anomaly point information related to the target application based on the stored maintenance and measurement information.

[0154] In this way, electronic devices can automatically, intelligently and quickly identify abnormal points of target applications (such as cameras) during the development and delivery process, reduce the difficulty of abnormal analysis of application products, reduce delivery time, shorten the delivery time of application products, and thus improve the development efficiency of application products.

[0155] In one example, the abnormality analysis and recovery system may also be used to: restore the normal function corresponding to the abnormal point information when the abnormal point information is recoverable.

[0156] In one example, the data acquisition system, the data storage system, and the abnormality analysis and recovery system are located in the kernel layer of the electronic device.

[0157] The electronic device in this embodiment can implement any of the aforementioned maintenance and testing methods, which will not be described in detail here.

[0158] The electronic device in this embodiment may be, for example, a mobile phone, a tablet, etc.

[0159] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory is coupled to the processor, and the memory stores program instructions. When the program instructions are executed by the processor, the electronic device performs the maintenance and testing method performed by the aforementioned electronic device.

[0160] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed 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. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.

[0161] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the maintenance and measurement method in the above-mentioned embodiment.

[0162] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the maintenance and testing method in the above-mentioned embodiment.

[0163] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the maintenance and measurement methods in the above-mentioned method embodiments.

[0164] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.

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

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

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

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

[0169] Any content of each embodiment of the present application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of the present application.

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

[0171] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0172] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0173] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0174] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A maintenance method, characterized in that: Used in electronic equipment, including: In the development and delivery process of the target application, log information is collected in real time from the maintenance and testing targets related to the target application, and the log information is packaged according to a preset data format to obtain maintenance and testing information; Storing the maintenance and measurement information; Identifying abnormal point information related to the target application according to the stored maintenance and measurement information; If the abnormal point information is recoverable, restore the normal function corresponding to the abnormal point information; The step of identifying abnormal point information related to the target application according to the stored maintenance and measurement information includes: The maintenance and measurement information is performance maintenance and measurement information, and statistics are performed on the performance maintenance and measurement information to obtain a first statistical result; Determine the target segment corresponding to the first statistical result according to the preset segmentation index; Searching for a target configuration file corresponding to the target segment in a configuration file library, wherein the configuration files corresponding to each segment of the segmentation indicator are stored in the configuration file library; According to the target configuration file, identify performance abnormal point information and mark the location of the performance abnormal point; wherein the performance abnormal point information includes image loss information of the target application; The step of identifying abnormal point information related to the target application according to the stored maintenance and measurement information includes: The maintenance and measurement information is power consumption maintenance and measurement information, and statistics are performed on the power consumption maintenance and measurement information according to a preset power consumption statistics method to obtain a second statistical result; According to the second statistical result, identifying the abnormal power consumption point information, and marking the abnormal power consumption point location; Saving the power consumption abnormal point information; The step of identifying abnormal point information related to the target application according to the stored maintenance and measurement information includes: The maintenance and measurement information is memory maintenance and measurement information, and the memory maintenance and measurement information is counted according to a preset memory statistics method and a memory tracking method to obtain a third statistical result; According to the third statistical result, identifying memory abnormal point information and the memory abnormality type to which the memory abnormal point information belongs; Sending warning information for the memory abnormal point information, and / or saving the memory abnormal point information; wherein the memory abnormal point information includes memory leakage information of the target application; Wherein, in the case where the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information includes: The abnormal point information is the process abnormal point information, and the process at the abnormal point is restored to the normal process by using the WatchDog mechanism; Wherein, in the case where the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information includes: The abnormal point information is the abnormal point information of the target application being stuck during operation, and the stuck process is restored by using the WatchDog mechanism.

2. The method according to claim 1, characterized in that In the case where the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information includes: Determine a target recovery method corresponding to the abnormal point information, wherein the target recovery method is preset; According to the target recovery method, the normal function corresponding to the abnormal point information is restored.

3. The method according to claim 1, characterized in that Also includes: In the case where the abnormal point information is irrecoverable, the person responsible for the abnormal point information is determined according to a preset delimitation condition.

4. The method according to claim 1, characterized in that: In the case where the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information includes: The abnormal point information is image loss information. According to the cause of image loss, the lost image is restored and output.

5. The method according to claim 1, characterized in that In the case where the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information includes: The abnormal point information is a memory leak, and it is detected that the memory requested but not released is released.

6. The method according to claim 1, characterized in that In the case where the abnormal point information is recoverable, restoring the normal function corresponding to the abnormal point information includes: The abnormal point information is performance abnormal point information, and the CPU frequency and / or core binding are dynamically adjusted according to the statistical results of the performance maintenance information.

7. The method according to claim 1, characterized in that Storing the maintenance and measurement information includes: The preset data format includes classification information of the maintenance and measurement information, and the target category to which the maintenance and measurement information belongs is determined according to the classification information of the maintenance and measurement information; The measurement information is stored in a data set corresponding to the target category.

8. The method according to claim 1, characterized in that Also includes: Generate and output data analysis results of the maintenance and measurement information, wherein the data analysis results include the abnormal point information.

9. The method according to claim 1, characterized in that: The target application is a camera application.

10. An electronic device, characterized in that: The electronic device comprises a data acquisition system, a data storage system and an abnormality analysis and recovery system connected in sequence, wherein: The data collection system is used to collect log information from maintenance and testing targets related to the target application in real time during the development and delivery process of the target application, and to encapsulate the log information in a preset data format to obtain maintenance and testing information; The data storage system is used to store the maintenance and measurement information; The abnormality analysis and recovery system is used to identify abnormal point information related to the target application based on the stored maintenance and measurement information; The abnormality analysis and recovery system is further configured to, when the maintenance and measurement information is performance maintenance and measurement information, perform statistics on the performance maintenance and measurement information to obtain a first statistical result; Determine the target segment corresponding to the first statistical result according to the preset segmentation index; Searching for a target configuration file corresponding to the target segment in a configuration file library, wherein the configuration files corresponding to each segment of the segmentation indicator are stored in the configuration file library; According to the target configuration file, identify performance abnormal point information and mark the location of the performance abnormal point; wherein the performance abnormal point information includes image loss information of the target application; The abnormality analysis and recovery system is further configured to, when the maintenance and measurement information is power consumption maintenance and measurement information, perform statistics on the power consumption maintenance and measurement information according to a preset power consumption statistics method to obtain a second statistical result; According to the second statistical result, identifying the abnormal power consumption point information, and marking the abnormal power consumption point location; Saving the power consumption abnormal point information; The abnormality analysis and recovery system is further used to, when the maintenance and measurement information is memory maintenance and measurement information, perform statistics on the memory maintenance and measurement information according to a preset memory statistics method and a memory tracking method to obtain a third statistical result; According to the third statistical result, identifying memory abnormal point information and the memory abnormality type to which the memory abnormal point information belongs; Sending warning information for the memory abnormal point information, and / or saving the memory abnormal point information; wherein the memory abnormal point information includes memory leakage information of the target application; The abnormality analysis and recovery system is further used to: restore the normal function corresponding to the abnormal point information when the abnormal point information is recoverable; The abnormality analysis and recovery system is also used for: the abnormal point information is the process abnormal point information, and the process at the abnormal point is restored to the normal process by using the WatchDog mechanism; The abnormality analysis and recovery system is also used for: the abnormal point information is the abnormal point information of the target application being stuck during operation, and the WatchDog mechanism is used to recover the stuck process.

11. The electronic device according to claim 10, characterized in that: The data acquisition system, the data storage system and the abnormality analysis and recovery system are located in the kernel layer of the electronic device.

12. An electronic device, characterized in that: include: a memory and a processor, the memory being coupled to the processor; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the maintenance and testing method as described in any one of claims 1 to 9.

13. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program runs on an electronic device, the electronic device executes the maintenance method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Auxiliary analysis method for causes of exceptions, server and intelligent equipment

    CN104270275A

  • Performance test method, apparatus and device for distributed storage system

    CN109522181A

  • Application program testing method and device, equipment and storage medium

    CN111949551A

  • Log transmission method, device and system and storage medium

    CN115391161A

  • Abnormality detection method and device, electronic equipment and storage medium

    CN115576737A