Method, system, device and medium for positioning vehicle computer application layer display errors

By obtaining layer data from the buffer queue in the vehicle system and generating layer files, the problem that the vehicle system is difficult to debug when there is a display error, and the layer displays the wrong positioning in the lack of traditional debugging environments. Improve the stability of the system and user experience.

CN118626302BActive Publication Date: 2025-01-28SMART MOTOR (ZHEJIANG) SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411096213.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2025-01-28
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

When a vehicle computer system displays an error or a system failure, it is difficult to directly access the system through the standard interface for debugging, which limits the capture and analysis of wrong data.

Method used

By displaying errors when the application layer is displayed, the layer data of the target buffer area is obtained from the buffer queue, the storage space size is calculated, the intermediate buffer area is locked, and the data is locked and saved to the user partition to generate layer files. Repeated Save until the number of presets is reached, and the output layer file is compared with the current display interface to locate the display error.

Benefits of technology

In the absence of the traditional debugging environment, the capture and wrong positioning of the display status of the layer provides a data basis to analyze the follow -up problem and improve the stability and user experience of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626302B_ABST
    Figure CN118626302B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, device and medium for locating a display error of a vehicle-mounted computer application layer. The locating method includes: obtaining a target buffer of an application from a buffer queue; calculating the storage space size of the target buffer; locking an intermediate buffer in the memory, and writing the layer data in the target buffer into the intermediate buffer; saving the layer data in the intermediate buffer to a user partition, generating a corresponding layer file; repeatedly locking the intermediate buffer to save the layer data of the application until the number of saves reaches a preset number, generating multiple corresponding layer files; exporting multiple layer files and the current display interface of the application; comparing the multiple layer files with the display interface respectively, and locating the display error of the application. The present invention can capture the layer display status and locate the approximate location of the cause of the display error in the absence of a traditional debugging environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle computer systems, and in particular to a method, system, device and medium for locating a vehicle computer application layer display error. Background Art

[0002] As the level of automobile intelligence continues to rise, the car computer system is becoming increasingly complex, and its interface design is becoming more and more colorful. Not only is the window switching smooth, but the interface functions are also becoming more diversified, which greatly improves the user experience. However, this highly integrated and diversified feature also increases the potential risk of system errors.

[0003] Most car systems are built on the Android platform, and their communication interfaces are usually encapsulated in the vehicle's internal architecture. This closed design limits the ability to directly access the system for debugging through standard interfaces, making it difficult to directly enter the debugging environment through the car communication interface to capture and analyze error data when display errors or system failures occur. Therefore, there is room for improvement. Summary of the invention

[0004] In view of the above shortcomings of the prior art, the present invention provides a method, system, device and medium for locating display errors of vehicle application layers to solve the above technical problems.

[0005] The present invention provides a method for locating a vehicle computer application layer display error, comprising:

[0006] When a layer display error occurs in a certain application, a target buffer associated with the application is obtained from the buffer queue, wherein the target buffer stores layer data of the application;

[0007] Calculating the storage space size of the target buffer;

[0008] Locking an intermediate buffer in the memory, and writing the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer;

[0009] Unlocking the intermediate buffer, and saving the layer data in the intermediate buffer to the user partition to generate a corresponding layer file, wherein the layer file is a partial display interface of the application;

[0010] Repeatingly locking the intermediate buffer in the memory to save the layer data of the application program until the number of saves reaches a preset number of times, so as to generate a plurality of corresponding layer files;

[0011] Exporting multiple layer files in the user partition and the current display interface of the application;

[0012] The plurality of layer files are respectively compared with the display interface to locate display errors of the application.

[0013] In one embodiment of the present invention, the step of calculating the storage space size of the target buffer includes:

[0014] Obtaining width information, height information, stride information and pixel format information of the target buffer;

[0015] The storage space size of the target buffer is calculated according to the width information, the height information, the stride information and the pixel format information.

[0016] In one embodiment of the present invention, the storage space size buffer_size of the target buffer satisfies the following formula:

[0017] buffer_size=stride×height×bytesPerPixel(format)

[0018] Among them, stride represents the product of the width information and the stride information, height represents the height information, and bytesPerPixel(format) represents the pixel format information.

[0019] In one embodiment of the present invention, the step of locking an intermediate buffer in the memory and writing the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer, comprises:

[0020] Applying for a free area in the memory and obtaining the first address of the free area, wherein the free area is represented as an intermediate buffer, wherein the free area has the same storage space size as the target buffer;

[0021] The layer data in the target buffer is written into the intermediate buffer according to the first address.

[0022] In one embodiment of the present invention, the step of unlocking the intermediate buffer and saving the layer data in the intermediate buffer to the user partition to generate a corresponding layer file, wherein the layer file is a partial display interface of the application, comprises:

[0023] Unlocking the intermediate buffer;

[0024] Constructing a file saving path in the user partition;

[0025] The layer data in the intermediate buffer is saved in the file saving path to generate a corresponding layer file, wherein the layer file is named according to the width information and height information of the target buffer and the number of times the layer data is captured.

[0026] In one embodiment of the present invention, the step of repeatedly locking the intermediate buffer in the memory to save the layer data of the application until the number of saves reaches a preset number of times to generate a plurality of corresponding layer files includes:

[0027] Determine whether the number of times the layer data of the application is saved reaches the preset number;

[0028] When the number of saving times does not reach the preset number of times, continue to lock the intermediate buffer in the memory, and save the layer data of the application to generate a plurality of corresponding layer files;

[0029] When the saving times reaches the preset times, the layer data of the application is stopped from being saved.

[0030] In one embodiment of the present invention, the step of comparing the plurality of layer files with the display interface respectively to locate the display error of the application comprises:

[0031] Comparing the plurality of layer files with the display interface respectively to determine whether the plurality of layer files are consistent with the display interface;

[0032] When all the layer files are consistent with the display interface, it is determined that the layer display error is located in the image synthesis layer or the display driver layer;

[0033] When a certain layer file is inconsistent with the display interface, it is determined that the layer display error is located in the application layer.

[0034] The present invention also provides a positioning system for display errors of vehicle-mounted computer application layers, comprising:

[0035] A buffer acquisition module, used for acquiring a target buffer associated with a certain application from a buffer queue when a layer display error occurs in the application, wherein the target buffer stores the layer data of the application;

[0036] A storage space calculation module, used to calculate the storage space size of the target buffer;

[0037] A data saving module is used to lock an intermediate buffer in the memory and write the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer;

[0038] A file saving module, used for unlocking the intermediate buffer and saving the layer data in the intermediate buffer to the user partition to generate a corresponding layer file, wherein the layer file is a partial display interface of the application;

[0039] A loop execution module, used for repeatedly locking the intermediate buffer in the memory to save the layer data of the application program until the number of saves reaches a preset number of times, so as to generate a plurality of corresponding layer files;

[0040] A data export module, used for exporting a plurality of layer files in the user partition and the current display interface of the application;

[0041] The comparison and positioning module is used to compare the plurality of layer files with the display interface respectively to locate the display error of the application.

[0042] The present invention also provides an electronic device, comprising a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement a method for locating a vehicle-mounted computer application layer display error as described in any one of the above items.

[0043] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to enable a computer to execute the method for locating a vehicle-machine application layer display error as described in any one of the above items.

[0044] In summary, the method, system, device and medium for locating a vehicle-machine application layer display error of the present invention have the following beneficial effects: the present invention can capture the layer display status in the absence of a traditional debugging environment, and locate the approximate location of the cause of the display error through image comparison, providing a data basis for subsequent problem analysis.

[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification are used to explain the principles of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, further understanding of the present invention can be obtained based on these drawings without paying creative work.

[0047] Figure 1 Shown is a flow chart of a method for locating a vehicle machine application layer display error provided by an embodiment of the present invention.

[0048] Figure 2 Display as Figure 1 A flowchart of a specific implementation of step S200 is shown in FIG.

[0049] Figure 3 Display as Figure 1 A flowchart of a specific implementation of step S300 is shown in FIG.

[0050] Figure 4 Display as Figure 1 A flowchart of a specific implementation of step S400 is shown in FIG.

[0051] Figure 5 Display as Figure 1 A flowchart of a specific implementation of step S500 is shown in FIG.

[0052] Figure 6 Display as Figure 1 A flowchart of a specific implementation of step S700 is shown in FIG.

[0053] Figure 7 Shown is a structural schematic diagram of a positioning system for a vehicle-mounted computer application layer display error provided by an embodiment of the present invention.

[0054] Figure 8 A schematic diagram of a computer device provided by an embodiment of the present invention is shown.

[0055] Fig. 9 A schematic diagram showing another computer device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents described in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0057] The illustrations provided in the following embodiments are only used to schematically illustrate the basic concept of the present invention. Therefore, the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout type may also be more complicated.

[0058] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present invention. It is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0059] The present invention provides a method, system, device and medium for locating a layer display error in a vehicle-mounted computer application, which relates to the technical field of vehicle-mounted computer systems and can be specifically applied to locating layer display problems in vehicle-mounted computer systems. The present invention can capture the layer display situation without a debugging environment, and transmit the captured data to the cloud, and then confirm through image comparison which layer of the vehicle-mounted computer system the cause of the layer display problem specifically appears. The following is a detailed description through specific embodiments.

[0060] See also Figure 1 The present invention provides a method for locating a vehicle computer application layer display error, which may include the following steps:

[0061] Step S100, when a layer display error occurs in a certain application, a target buffer associated with the application is obtained from a buffer queue, wherein the target buffer stores layer data of the application;

[0062] Step S200, calculating the storage space size of the target buffer;

[0063] Step S300, locking an intermediate buffer in the memory, and writing the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer;

[0064] Step S400, unlocking the intermediate buffer, and saving the layer data in the intermediate buffer to the user partition to generate a corresponding layer file, wherein the layer file is a partial display interface of the application;

[0065] Step S500, repeatedly locking the intermediate buffer in the memory to save the layer data of the application program until the number of saves reaches a preset number of times, so as to generate a plurality of corresponding layer files;

[0066] Step S600, exporting multiple layer files in the user partition and the current display interface of the application;

[0067] Step S700: compare the multiple layer files with the display interface respectively to locate the display errors of the application.

[0068] First of all, it should be noted that in the Android system, BufferQueue (i.e., buffer queue) is an important component, which is used to coordinate the communication between different components in the graphics rendering pipeline, especially between the GPU (Graphics Processing Unit) and the SurfaceFlinger service responsible for synthesizing windows. When the CPU or GPU completes the rendering of a frame, they will submit the data of this frame (i.e., buffer) to the BufferQueue. When the new buffer is submitted to the BufferQueue, BufferQueue will call the onFrameAvailable method of the registered listener. This listener is usually registered by SurfaceFlinger in order to let SurfaceFlinger know that there is a new buffer that can be further processed. The present invention can capture the layer data of the target buffer before SurfaceFlinger processes the buffer.

[0069] In one embodiment of the present invention, when step S100 is executed, that is, when a layer display error of a certain application occurs, a target buffer associated with the application is obtained from the buffer queue, wherein the target buffer stores the layer data of the application. Specifically, when a layer display error of a certain application occurs in the vehicle system, the vehicle system can respond to an externally input function start instruction to start the layer data capture function, that is, the macro function debug.sf.save. In this embodiment, the function start instruction can be input by an operator through a preset combination key of the vehicle system. The buffer queue (BufferQueue) is a data structure that stores multiple image buffers (buffers), which may be used for various purposes, such as image processing, video rendering, etc. Each image buffer in the buffer queue is matched with a specified application to find the target buffer associated with the application. The target buffer stores the layer data of the above application.

[0070] See also Figure 2 In one embodiment of the present invention, when executing step S200, the storage space size of the target buffer is calculated. Specifically, the following steps may be included:

[0071] Step S210, obtaining width information, height information, stride information and pixel format information of the target buffer;

[0072] Step S220: Calculate the storage space size of the target buffer according to the width information, the height information, the stride information and the pixel format information.

[0073] In one embodiment of the present invention, when executing steps S210 to S220, specifically, first obtain relevant information of the target buffer. In this embodiment, the relevant information may include width information, height information, stride information and pixel format information. Among them, the width information is the width of the image corresponding to the layer data in the target buffer, in pixels. The height information is the height of the corresponding image, also in pixels. The stride information refers to the number of bytes occupied by a row of layer data in the memory, which may be greater than or equal to the width of the image multiplied by the number of bytes required by the pixel format. The stride information is to meet memory alignment or other hardware requirements. Pixel format information is the storage format of each pixel in the image data, such as RGB, RGBA, YUV, etc. The pixel format information determines the number of bytes required for each pixel, which in turn affects the size of the entire layer data. The storage space size of the target buffer can be calculated based on the above-mentioned relevant information of the target buffer. In this embodiment, the storage space size buffer_size of the target buffer satisfies the following formula:

[0074] buffer_size=stride×height×bytesPerPixel(format)

[0075] Among them, stride represents the product of width information and stride information, height represents height information, and bytesPerPixel(format) represents pixel format information.

[0076] See also Figure 3 In one embodiment of the present invention, when executing step S300, an intermediate buffer is locked in the memory, and the layer data in the target buffer is written into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer. Specifically, the following steps may be included:

[0077] Step S310, applying for a free area in the memory and obtaining the first address of the free area, the free area is represented as an intermediate buffer, wherein the free area has the same storage space size as the target buffer;

[0078] Step S320: write the layer data in the target buffer into the intermediate buffer according to the first address.

[0079] In one embodiment of the present invention, when executing step S310 to step S320, specifically, first, a free area equal to the size of the target buffer can be applied in the memory by calling, for example, the lock function. The first address of the obtained free area will be used as the starting address of the intermediate buffer. Then, the layer data in the target buffer is copied to the intermediate buffer. The purpose of locking the intermediate buffer is to prevent other threads or processes from making unexpected access or modification to the buffer during data processing, thereby ensuring the consistency and integrity of the data.

[0080] See also Figure 4 In one embodiment of the present invention, when step S400 is executed, the intermediate buffer is unlocked, and the layer data in the intermediate buffer is saved in the user partition to generate a corresponding layer file, wherein the layer file is a part of the display interface of the application. Specifically, the following steps may be included:

[0081] Step S410, unlocking the intermediate buffer;

[0082] Step S420: construct a file saving path in the user partition;

[0083] Step S430: Save the layer data in the intermediate buffer to the file saving path to generate a corresponding layer file. The layer file is named according to the width information and height information of the target buffer and the number of times the layer data is captured.

[0084] In one embodiment of the present invention, when executing steps S410 to S430, specifically, first, after the data in the target buffer is saved to the intermediate buffer area, the intermediate buffer area can be unlocked by calling, for example, the unlock function to save the data therein. Then, a file is constructed under the preset path of the user partition (i.e., / data / test / ). The file can be named according to the width information, height information, and capture times of the layer data of the target buffer. For example, it can be named fb_%dx%dX, where %dx%d represents the width information and height information, and X represents the capture times. Then, the file is opened by the open() function to obtain its handle. Then, according to the obtained handle, the write() function is used to write the memory area of ​​the data block starting from the first address into the file, thereby generating a layer file. In this embodiment, the layer file is a partial display interface of the application, and the layer file can be specifically saved in a certain image format, such as PNG, JPEG or other suitable formats.

[0085] See also Figure 5 In one embodiment of the present invention, when executing step S500, the intermediate buffer is repeatedly locked in the memory to save the layer data of the application until the number of saves reaches a preset number of times, so as to generate a plurality of corresponding layer files. Specifically, the following steps may be included:

[0086] Step S510, determining whether the number of times the layer data of the application is saved reaches a preset number;

[0087] Step S520: When the number of save times does not reach the preset number, continue to lock the intermediate buffer in the memory, and save the layer data of the application program to generate a plurality of corresponding layer files;

[0088] Step S530: When the number of save times reaches a preset number, stop saving the layer data of the application.

[0089] In one embodiment of the present invention, when executing steps S510 to S530, specifically, firstly, a counter (i.e., recording the number of save times) is set to track how many times the layer data has been saved, and a preset number is set as the termination condition. Before each layer data is saved, it is checked whether the current number of save times has reached the preset number. If not, the data saving process continues to be executed. If it has been reached, the loop is exited. In this embodiment, before saving the layer data, the intermediate buffer is first locked in the memory to ensure that the data will not be modified by other operations during the saving process. Then, the save times counter is increased, indicating that the layer data has been successfully saved once. Finally, it is checked again whether the number of save times has reached the preset number. If not, return to the step of locking the intermediate buffer; if it has reached, that is, when the number of save times is equal to the preset number, stop saving the layer data, and the loop ends. In practical applications, the preset number of times can be set between 30 and 100 times. For example, in order to create an animation with 50 frames per second, the preset number of save times can be set to 50 times, so as to ensure that valid data is captured.

[0090] In one embodiment of the present invention, when step S600 is executed, multiple layer files in the user partition and the current display interface of the application are exported. Specifically, exporting multiple layer files in the user partition and the current display interface of the application facilitates subsequent comparison and analysis. First, after completing the capture of layer data for a preset number of saves, the layer files can be arranged in a specific order, for example, based on their stacking order on the user interface or the time order in which they are saved, so as to facilitate reconstruction of the interface. Then, a snapshot of the current display interface can be captured, for example, including but not limited to the location, size, state (such as whether a button is pressed), color, transparency and other attributes of the UI element. Finally, the exported file is saved to the user's specified location, such as a local disk, cloud storage, etc.

[0091] See also Figure 6 In one embodiment of the present invention, when executing step S700, multiple layer files are compared with the display interface respectively to locate the display error of the application. Specifically, the following steps may be included:

[0092] Step S710: compare the multiple layer files with the display interface respectively to determine whether the multiple layer files are consistent with the display interface;

[0093] Step S720: when all layer files are consistent with the display interface, it is determined that the layer display error is located in the image synthesis layer or the display driver layer;

[0094] Step S730: When a layer file is inconsistent with the display interface, it is determined that the layer display error is located in the application layer.

[0095] In one embodiment of the present invention, when executing steps S710 to S730, specifically, an image comparison algorithm can be used to compare each layer file with the display interface of the application one by one to check whether there is a visual difference between the two. If all layer files are consistent with the real-time display interface, this means that there is no problem in the application generating the layer, but the display result is still wrong. In this case, the problem may occur in the image synthesis layer or the display driver layer. Among them, the image synthesis layer is responsible for merging multiple layers into a part of the final display interface. The display driver layer is a hardware driver or display system, which may fail to present correctly after receiving the data of the image synthesis layer. If a layer file is inconsistent with the real-time display interface, the problem may be in the application layer, that is, the application itself has an error when generating or updating the layer, such as a rendering logic error, a resource loading failure, etc. It can be seen that by comparing multiple layer files with the display interface respectively, the approximate location of the cause of the display error can be located by judging the consistency.

[0096] Furthermore, more specific steps can be taken to analyze the problem. For example, check the code of the application layer, especially the rendering logic and resource management parts, to find possible causes of layer generation errors. Check the log files of the application and system to find possible error reports or abnormal behaviors. If it is a problem with the display driver or synthesis layer, it is necessary to check the hardware compatibility and driver version, try to update the driver or replace the display device to eliminate hardware failures. The present invention adopts a step-by-step troubleshooting method to help developers effectively locate and fix display errors, thereby improving the stability of the application and user experience.

[0097] See also Figure 7 The present invention also provides a positioning system for vehicle-mounted computer application layer display errors, which corresponds to the positioning method in the above embodiment. The positioning system may include a buffer acquisition module 101, a storage space calculation module 102, a data storage module 103, a file storage module 104, a loop execution module 105, a data export module 106, and a comparison positioning module 107. The functional modules are described in detail as follows:

[0098] The buffer acquisition module 101 can be used to obtain the target buffer associated with a certain application from the buffer queue when a layer display error occurs in a certain application, wherein the target buffer stores the layer data of the application. Further, the buffer acquisition module 101 can be specifically used in the vehicle system when a layer display error occurs in a certain application, and the vehicle system can respond to an external input function start instruction to start the layer data capture function, that is, the macro function debug.sf.save. In this embodiment, the function start instruction can be input by the operator through the preset combination key of the vehicle system. The buffer queue (BufferQueue) is a data structure that stores multiple image buffers, which may be used for various purposes, such as image processing, video rendering, etc. Each image buffer in the buffer queue is matched with a specified application to find the target buffer associated with the application. The target buffer stores the layer data of the above application.

[0099] The storage space calculation module 102 may be used to calculate the storage space size of the target buffer. Further, the storage space calculation module 102 may be specifically used to obtain width information, height information, stride information, and pixel format information of the target buffer; and calculate the storage space size of the target buffer according to the width information, height information, stride information, and pixel format information.

[0100] The data saving module 103 can be used to lock an intermediate buffer in the memory and write the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer. Further, the data saving module 103 can be specifically used to apply for a free area in the memory and obtain the first address of the free area, wherein the free area is represented as the intermediate buffer, wherein the storage space size of the free area is the same as that of the target buffer; according to the first address, the layer data in the target buffer is written into the intermediate buffer.

[0101] The file saving module 104 can be used to unlock the intermediate buffer and save the layer data in the intermediate buffer to the user partition to generate a corresponding layer file, wherein the layer file is a part of the display interface of the application. Further, the file saving module 104 can be specifically used to unlock the intermediate buffer; construct a file saving path in the user partition; save the layer data in the intermediate buffer to the file saving path to generate a corresponding layer file, and the layer file is named with the width information and height information of the target buffer and the number of times the layer data is captured.

[0102] The loop execution module 105 can be used to repeatedly lock the intermediate buffer in the memory to save the layer data of the application program until the number of saves reaches a preset number of times to generate a plurality of corresponding layer files. Further, the loop execution module 105 can be specifically used to determine whether the number of saves of the layer data of the application program has reached a preset number of times; when the number of saves does not reach the preset number of times, continue to lock the intermediate buffer in the memory and save the layer data of the application program to generate a plurality of corresponding layer files; when the number of saves reaches the preset number of times, stop saving the layer data of the application program.

[0103] The data export module 106 can be used to export multiple layer files in the user partition and the current display interface of the application. Furthermore, the data export module 106 can be specifically used to export multiple layer files in the user partition and the current display interface of the application to facilitate subsequent comparison and analysis. First, after completing the capture of the layer data for a preset number of saves, the layer files can be arranged in a specific order, for example, based on their stacking order on the user interface or the time order in which they are saved, so as to facilitate reconstruction of the interface. Then, a snapshot of the current display interface can be captured, for example, including but not limited to the location, size, state (such as whether a button is pressed), color and transparency of UI elements. Finally, the exported file is saved to the user's specified location, such as a local disk, cloud storage, etc.

[0104] The comparison and positioning module 107 can be used to compare multiple layer files with the display interface respectively to locate the display error of the application. Further, the comparison and positioning module 107 can be specifically used to compare multiple layer files with the display interface respectively to determine whether the multiple layer files are consistent with the display interface; when all layer files are consistent with the display interface, it is determined that the layer display error is located in the image synthesis layer or the display driver layer; when a layer file is inconsistent with the display interface, it is determined that the layer display error is located in the application layer.

[0105] For the specific definition of the positioning system, please refer to the definition of the positioning method above, which will not be repeated here. Each module in the above positioning system can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0106] See also Figure 8The present invention also provides a computer device, which can be a server. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it implements the functions or steps of a method for locating a vehicle application layer display error.

[0107] See also Fig. 9 As shown, the present invention also provides another computer device, which can be a client. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it implements the functions or steps of a method for locating a vehicle application layer display error.

[0108] In one embodiment of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0109] When a layer display error occurs in a certain application, a target buffer associated with the application is obtained from the buffer queue, wherein the target buffer stores layer data of the application;

[0110] Calculate the storage space size of the target buffer;

[0111] Lock an intermediate buffer in the memory and write the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer;

[0112] Unlock the intermediate buffer and save the layer data in the intermediate buffer to the user partition to generate a corresponding layer file, wherein the layer file is a partial display interface of the application;

[0113] Repeatedly locking the intermediate buffer in the memory to save the layer data of the application program until the number of saves reaches a preset number of times to generate a plurality of corresponding layer files;

[0114] Export multiple layer files in the user partition and the current display interface of the application;

[0115] Compare multiple layer files with the display interface to locate display errors in the application.

[0116] In one embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0117] When a layer display error occurs in a certain application, a target buffer associated with the application is obtained from the buffer queue, wherein the target buffer stores layer data of the application;

[0118] Calculate the storage space size of the target buffer;

[0119] Lock an intermediate buffer in the memory and write the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer;

[0120] Unlock the intermediate buffer and save the layer data in the intermediate buffer to the user partition to generate a corresponding layer file, wherein the layer file is a partial display interface of the application;

[0121] Repeatedly locking the intermediate buffer in the memory to save the layer data of the application program until the number of saves reaches a preset number of times to generate a plurality of corresponding layer files;

[0122] Export multiple layer files in the user partition and the current display interface of the application;

[0123] Compare multiple layer files with the display interface to locate display errors in the application.

[0124] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the aforementioned method embodiments. To avoid repetition, they will not be described one by one here.

[0125] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0126] In summary, the present invention provides a method, system, device and medium for locating a vehicle computer application layer display error, which can be applied to the field of vehicle computer system technology. The present invention can capture the layer display status in the absence of a traditional debugging environment. The captured layer data can be transmitted to the cloud for storage, providing a data basis for subsequent processing. The present invention uses image comparison to confirm which layer of the vehicle computer system the layer display problem occurs in, thereby locating the approximate location of the cause of the display error.

[0127] In the description of this specification, the description with reference to the terms "this embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0128] The embodiments of the present invention disclosed above are only used to help illustrate the present invention. The embodiments do not describe all the details in detail, nor do they limit the invention to specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for locating a vehicle computer application layer display error, characterized in that: include: When a layer display error occurs in a certain application, a target buffer associated with the application is obtained from the buffer queue, wherein the target buffer stores layer data of the application; Calculating the storage space size of the target buffer; Locking an intermediate buffer in the memory, and writing the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer; Unlocking the intermediate buffer and constructing a file saving path in the user partition; The layer data in the intermediate buffer is saved in the file saving path to generate a corresponding layer file, wherein the layer file is named according to the width information and height information of the target buffer and the number of times the layer data is captured; the intermediate buffer is repeatedly locked in the memory to save the layer data of the application until the number of saves reaches a preset number to generate a plurality of corresponding layer files; Exporting multiple layer files in the user partition and the current display interface of the application; Comparing the plurality of layer files with the display interface respectively to determine whether the plurality of layer files are consistent with the display interface; When all the layer files are consistent with the display interface, it is determined that the layer display error is located in the image synthesis layer or the display driver layer; When a certain layer file is inconsistent with the display interface, it is determined that the layer display error is located in the application layer.

2. The method for locating a vehicle computer application layer display error according to claim 1, characterized in that: The step of calculating the storage space size of the target buffer comprises: Obtaining width information, height information, stride information and pixel format information of the target buffer; The storage space size of the target buffer is calculated according to the width information, the height information, the stride information and the pixel format information.

3. The method for locating a vehicle computer application layer display error according to claim 2, characterized in that: The storage space size buffer_size of the target buffer satisfies the following formula: buffer_size=stride×height×bytesPerPixel(format) Among them, stride represents the product of the width information and the stride information, height represents the height information, and bytesPerPixel(format) represents the pixel format information.

4. The method for locating a vehicle computer application layer display error according to claim 1, characterized in that: The step of locking an intermediate buffer in the memory and writing the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer, comprises: Applying for a free area in the memory and obtaining the first address of the free area, wherein the free area is represented as an intermediate buffer, wherein the free area has the same storage space size as the target buffer; The layer data in the target buffer is written into the intermediate buffer according to the first address.

5. The method for locating a vehicle computer application layer display error according to claim 1, characterized in that: The step of repeatedly locking the intermediate buffer in the memory to save the layer data of the application until the number of saves reaches a preset number of times to generate a plurality of corresponding layer files includes: Determine whether the number of times the layer data of the application is saved reaches the preset number; When the number of saving times does not reach the preset number of times, continue to lock the intermediate buffer in the memory, and save the layer data of the application to generate a plurality of corresponding layer files; When the saving times reaches the preset times, the layer data of the application is stopped from being saved.

6. A positioning system for displaying an error in a vehicle computer application layer, characterized in that: include: A buffer acquisition module, used for acquiring a target buffer associated with a certain application from a buffer queue when a layer display error occurs in the application, wherein the target buffer stores the layer data of the application; A storage space calculation module, used to calculate the storage space size of the target buffer; A data saving module is used to lock an intermediate buffer in the memory and write the layer data in the target buffer into the intermediate buffer, wherein the storage space size of the intermediate buffer is the same as the storage space size of the target buffer; A file saving module is used to unlock the intermediate buffer; construct a file saving path in the user partition; save the layer data in the intermediate buffer to the file saving path to generate a corresponding layer file, wherein the layer file is named according to the width information and height information of the target buffer and the number of times the layer data is captured; A loop execution module, used for repeatedly locking the intermediate buffer in the memory to save the layer data of the application program until the number of saves reaches a preset number of times, so as to generate a plurality of corresponding layer files; A data export module, used for exporting a plurality of layer files in the user partition and the current display interface of the application; A comparison and positioning module is used to compare the multiple layer files with the display interface respectively to determine whether the multiple layer files are consistent with the display interface; when all the layer files are consistent with the display interface, it is determined that the layer display error is located in the image synthesis layer or the display driver layer; when a certain layer file is inconsistent with the display interface, it is determined that the layer display error is located in the application layer.

7. An electronic device, characterized in that: It includes a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute the computer program stored in the memory to implement the method for locating the vehicle application layer display error as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to enable a computer to execute the method for locating an error in display of a vehicle-mounted computer application layer as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Interface display method and device, terminal and storage medium

    CN109992347A

  • Intelligent animation and layer multimedia processing device

    CN112150591A