Upgrade fault locating method and apparatus, and device
By generating running and return value color blocks in the coded image, the problem of the inability to effectively locate program upgrade faults in the existing technology is solved, realizing fast and safe upgrade fault location, and improving user experience and data security.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHANGHAI PATEO ELECTRONIC EQUIPMENT MANUFACTURING CO LTD
- Filing Date
- 2025-11-25
- Publication Date
- 2026-07-02
AI Technical Summary
In existing technologies, during program upgrades, the progress bar can only display the program burning progress and cannot display the running status of the upgrade code, making it impossible to effectively locate upgrade faults.
By generating encoded images that include running color blocks and return value color blocks, the running color block indicates the line number of code at a preset mark, and the return value color block indicates the running result of the code segment. By combining multiple encoding methods to generate burning color blocks, version color blocks, and upgrade indicator color blocks, detailed monitoring of the upgrade process and fault location can be achieved.
It can quickly locate the fault location during the execution of upgrade code, improve the efficiency of upgrade fault location, reduce the difficulty of user operation, avoid log loss problems, and improve data security and interface aesthetics.
Smart Images

Figure CN2025137443_02072026_PF_FP_ABST
Abstract
Description
Upgrade fault location methods, devices and equipment
[0001] Cross-reference of related applications
[0002] This application claims priority and benefit to Chinese patent application No. 202411957323.X, filed with the China National Intellectual Property Administration (CNIPA) on December 27, 2024, which is incorporated herein by reference in its entirety. Technical Field
[0003] This disclosure relates to the field of computer technology, and in particular to an upgraded fault location method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0004] Program upgrades mainly include program burning and program execution. Currently, during the program upgrade process, a progress bar typically indicates the percentage of upgrade completion. However, this progress bar only shows the progress of program burning and cannot display the execution status of the upgrade code, thus making it impossible to locate upgrade faults. Summary of the Invention
[0005] This disclosure provides an upgrade fault location method, apparatus, electronic device, computer-readable storage medium, and computer program product that can perform upgrade fault location.
[0006] In a first aspect, embodiments of this disclosure propose an upgrade fault location method. This upgrade fault location method includes the following steps: monitoring the upgrade progress of a target program to obtain upgrade progress information; in response to determining that the upgrade progress information includes reaching a preset marker in the target program, generating an encoded image including a running color block and a return value color block. The running color block is used to identify the line number of the code at the preset marker in the target program. The return value color block is used to identify the execution result of the code segment corresponding to the running color block.
[0007] In one possible implementation, the method provided by the first aspect further includes the following steps: in response to determining that an error has occurred while running the target program, generating an error indication color block for indicating that an error has occurred while upgrading the target program based on a prompt encoding method.
[0008] In one possible implementation, the method provided by the first aspect further includes the step of: generating an upgrade indicator color block based on an upgrade coding scheme in response to determining that a target program is being upgraded. The upgrade indicator color block is used to indicate that the target program is being upgraded.
[0009] In one possible implementation, the method provided by the first aspect further includes the following steps: in response to determining that upgrade progress information includes the target program being burned, generating a burning color block based on the burning progress of the target program and the burning encoding method. The burning color block is used to identify the burning progress of the target program.
[0010] In one possible implementation, the method provided by the first aspect further includes the steps of: detecting the version of the target program; and generating a version color block to identify the version of the target program based on the version of the target program and the version encoding method. The encoded image also includes the version color block.
[0011] In one possible implementation, the method provided by the first aspect further includes the following steps: in response to obtaining a decoding operation, obtaining decoding information of the target program based on the version color block; decoding the running color block and the return value color block based on the decoding information, and determining the running result of the code corresponding to the line number identified by the running color block.
[0012] In one possible implementation, the encoded image further includes at least one of an error indicator color block, an upgrade indicator color block, a burning color block, and a version color block. Each color block includes multiple sub-color blocks, which include sub-color blocks for identifying the function of the color block and sub-color blocks for identifying the functional content of the color block.
[0013] In one possible implementation, the color of the sub-block used to identify the functional content of the running block is determined based on the progress of the running target program and the running coding method.
[0014] Secondly, this disclosure provides an upgrade fault location device. The upgrade fault location device includes a monitoring module and a first generation module. The monitoring module is configured to monitor the upgrade progress of the target program and obtain upgrade progress information. The first generation module is configured to, in response to determining that the upgrade progress information includes reaching a preset marker in the target program, generate an encoded image including a running color block and a return value color block. The running color block is used to identify the line number of the code at the preset marker in the target program. The return value color block is used to identify the execution result of the code segment corresponding to the running color block.
[0015] In one possible implementation, the upgrade fault location device provided in the second aspect further includes: a second generation module configured to generate an error indication color block for indicating that an error has occurred in the target program being upgraded, based on a prompting encoding method, in response to determining that an error has occurred in the target program being upgraded.
[0016] In one possible implementation, the upgrade fault location device provided in the second aspect further includes: a third generation module configured to generate an upgrade indicator color block based on an upgrade coding scheme in response to determining that a target program is being upgraded. The upgrade indicator color block is used to indicate that a target program is being upgraded.
[0017] In one possible implementation, the upgrade fault location device provided in the second aspect further includes: a fourth generation module, configured to generate a burning color block based on the burning progress of the target program and the burning encoding method in response to determining that upgrade progress information includes the target program being burned. The burning color block is used to identify the burning progress of the target program.
[0018] In one possible implementation, the upgrade fault location device provided in the second aspect further includes a detection module and a fifth generation module. The detection module is configured to detect the version of the target program. The fifth generation module is configured to generate a version color block to identify the version of the target program based on the version of the target program and the version encoding method. The encoded image also includes the version color block.
[0019] In one possible implementation, the upgrade fault location device provided in the second aspect further includes an acquisition module and a determination module. The acquisition module is configured to: acquire decoding information of the target program based on the version color block in response to an acquisition decoding operation. The determination module is configured to: decode the running color block and the return value color block based on the decoding information, and determine the execution result of the code corresponding to the line number identified by the running color block.
[0020] In one possible implementation, the encoded image further includes at least one of an error indicator color block, an upgrade indicator color block, a burning color block, and a version color block. Each color block includes multiple sub-color blocks, which include sub-color blocks for identifying the function of the color block and sub-color blocks for identifying the functional content of the color block.
[0021] In one possible implementation, the color of the sub-block used to identify the functional content of the running block is determined based on the progress of the running target program and the running coding method.
[0022] Thirdly, embodiments of this disclosure provide an electronic device. The electronic device includes a memory and at least one processor. The memory is communicatively connected to the at least one processor and stores instructions executable by the at least one processor. These instructions are executed by the at least one processor to enable the at least one processor to implement the upgrade fault location method described in any implementation of the first aspect.
[0023] Fourthly, embodiments of this disclosure provide a non-transitory computer-readable storage medium storing computer instructions. These computer instructions, when executed by a computer, enable the implementation of the upgrade fault location method as described in any implementation of the first aspect.
[0024] Fifthly, embodiments of this disclosure provide a computer program product including a computer program. When executed by a processor, this computer program is capable of implementing the upgrade fault location method as described in any implementation of the first aspect.
[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description.
[0026] According to the technical solution of this disclosure, the executing entity detects the upgrade progress of the target program. In response to determining that the program has reached a preset marker, it generates an encoded image including a running color block and a return value color block. The running color block indicates the line number of the code at the preset marker in the target program, and the return value color block indicates the execution result of the code segment corresponding to the running color block. This allows for rapid acquisition of the upgrade status of the target program. If a fault occurs, the running color block can quickly locate the location of the fault during the execution of the upgrade code, and the return value color block can quickly locate the cause of the fault. The color block approach improves the efficiency of upgrade fault location. Attached Figure Description
[0027] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0028] Figure 1 is an exemplary system architecture to which this disclosure can be applied;
[0029] Figure 2 is a flowchart of an upgraded fault location method provided in an embodiment of this disclosure;
[0030] Figure 3 is an interface diagram of an upgraded fault location method provided in an embodiment of this disclosure;
[0031] Figure 4 is a flowchart of another upgraded fault location method provided in an embodiment of this disclosure;
[0032] Figure 5 is a flowchart of another upgraded fault location method provided in an embodiment of this disclosure;
[0033] Figure 6 is a flowchart of another upgraded fault location method provided in an embodiment of this disclosure;
[0034] Figure 7 is a flowchart of another upgraded fault location method provided in an embodiment of this disclosure;
[0035] Figure 8 is a flowchart of another upgraded fault location method provided in an embodiment of this disclosure;
[0036] Figure 9 is a structural block diagram of an upgraded fault location device provided in an embodiment of this disclosure;
[0037] Figure 10 is a schematic diagram of the structure of an electronic device suitable for performing an upgrade fault location method according to an embodiment of the present disclosure. Detailed Implementation
[0038] To better understand this application, various aspects of this application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are merely illustrative of exemplary embodiments of this application and are not intended to limit the scope of this application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0039] It should be understood that expressions such as "comprising," "including," "having," "containing," and / or "comprising" are open-ended rather than closed-ended expressions in this specification, indicating the presence of the stated features, elements, and / or components, but not excluding the presence of one or more other features, elements, components, and / or combinations thereof. Furthermore, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features, not just individual elements in the list. Additionally, when describing embodiments of this application, the word "may" is used to mean "one or more embodiments of this application." And the term "exemplary" is intended to refer to examples or illustrations.
[0040] Unless otherwise specified, all terms used herein (including engineering and technical terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that, unless expressly stated herein, terms defined in common dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or overly formalized meaning.
[0041] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. Furthermore, unless explicitly limited or contradicted by the context, the specific steps included in the methods described in this application are not limited to the order in which they are described, but can be performed in any order or in parallel. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0042] Figure 1 illustrates an exemplary system architecture 100 to which embodiments of the upgraded fault location methods, apparatuses, electronic devices, computer-readable storage media, and computer program products of this disclosure can be applied.
[0043] As shown in Figure 1, the system architecture 100 may include a first device 101 and a second device 102. The first device 101 and the second device 102 can be connected via a network. The network is used as a medium to provide a communication link between the first device 101 and the second device 102. The network may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0044] The first device 101 and the second device 102 can be either hardware or software. When the first device 101 and the second device 102 are hardware, the first device 101 can be various electronic devices that need to be upgraded, including but not limited to in-vehicle devices, vehicle-mounted devices, smart terminals, vehicles, components on vehicles, components on in-vehicle devices, components on vehicle-mounted devices, components on smart terminals, etc. The second device 102 can be a cloud server, a server, etc., where the server can also be a distributed system server or a server combined with blockchain. A cloud server, also known as a cloud computing server or cloud host, is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability. When the first device 101 and the second device 102 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules, or as a single software program or software module, without specific limitations. Optionally, the second device 102 can install color block parsing software, and the first device 101 can also install color block parsing software.
[0045] It should be understood that the number of the first and second devices in Figure 1 is merely illustrative. Depending on the implementation requirements, there can be any number of first and second devices.
[0046] The term "vehicle" or other similar terms used in this application include motor vehicles in a broad sense: for example, passenger vehicles including SUVs, buses, trucks, and various commercial vehicles; water vehicles including various boats and ships, and aircraft; and including hybrid vehicles, electric vehicles, hybrid electric vehicles, hydrogen-powered vehicles, and other alternative fuel vehicles (e.g., fuels derived from resources other than petroleum).
[0047] The method provided in this disclosure can be applied to program upgrade scenarios, such as Over-The-Air (OTA) upgrade scenarios.
[0048] In some implementations, during OTA upgrades, especially upgrades to the microcontroller unit (MCU), the vehicle's infotainment system needs to be simplified to its most basic operating state (e.g., switching to a minimal system). In this minimal operating state, log storage and time synchronization are limited. The serial port is also difficult to restrict after installation. The Android Debug Bridge (ADB) will not start in the minimal system. This makes it difficult to pinpoint OTA upgrade failures.
[0049] For example, during the upgrade process, even if the logs are saved successfully, there is still a possibility that the partition may be overwritten, causing the logs to be lost, making it difficult to locate the problem of OTA upgrade failure.
[0050] In addition, in cross-border business scenarios, logs contain too much sensitive information, and the transmission of log data may be restricted by cross-border data transmission regulations, making it more complicated to locate OTA upgrade failures based on logs.
[0051] Please refer to Figure 2, which is a flowchart of an upgrade fault location method provided in an embodiment of this disclosure. The executing entity is a first device 101, and the upgrade fault location method 200 includes the following steps:
[0052] Step 201: Monitor the upgrade progress of the target program and obtain upgrade progress information.
[0053] For example, upgrading a target program mainly includes burning the target program and running the target program. Burning refers to the process of writing new firmware or software code into the device. Running refers to the process of executing the burned firmware or software code on the device.
[0054] Step 202: In response to determining the upgrade progress information, including the target program's preset marker, generate an encoded image including the running color block and the return value color block.
[0055] For example, upgrade progress information includes the target program's progress at a preset marker. These preset markers may include key process nodes.
[0056] For example, the run block is used to identify the line number of the code at the preset mark in the target program. The return value block is used to identify the execution result of the code segment corresponding to the run block.
[0057] In this embodiment, the color block can be a colored box. For example, the color of the running color block can indicate the line number of the code at a preset mark in the target program, and the color of the return value color block can indicate the execution result of the code segment corresponding to the running color block. For example, the execution result may include the return value of the code segment. When the execution reaches the preset mark, the executing entity displays the corresponding running color block as part of the progress bar refresh on the interface, and may also display the return value color block corresponding to the running color block as part of the progress bar refresh on the interface. Optionally, the progress bar may include an encoded image.
[0058] Assuming the first preset marker is line a and the second preset marker is line b, the execution entity monitors the upgrade progress of the target program, obtains upgrade progress information including the execution up to line a of the target program, and generates an encoded image including a running color block a and a return value color block a. Here, running color block a indicates that the target program is currently executing line a of code during the upgrade process. The code segment corresponding to running color block a is lines 1 to a. Return value color block a indicates the execution result of lines 1 to a. Next, execution reaches line b of the target program, and the execution entity generates an encoded image including running color block b and return value color block b. This encoded image can include the previously generated running color block a and return value color block a, or it can generate a new running color block and then delete running color block a and return value color block a. Here, running color block b indicates that the target program is currently executing line b of code during the upgrade process. The code segment corresponding to running color block b is lines a+1 to b. Return value color block b indicates the execution result of lines a+1 to b.
[0059] Optionally, the execution result of the code segment may include: specific values returned by one or more lines of code, indications of successful execution, or indications of failure.
[0060] Optionally, there can be an association between the running color block and the return value color block, so that it is easy to obtain the number of lines of code that have been run and the execution result of the corresponding code segments.
[0061] For example, the relationship between the running color block and the return value color block can be reflected by their positions in the encoded image, such as the return value color block being in the column after the running color block.
[0062] The method provided in this disclosure detects the upgrade progress of a target program. In response to determining that the program has reached a preset marker, it generates an encoded image including a running color block and a return value color block. The running color block indicates the line number of the code at the preset marker in the target program, and the return value color block indicates the execution result of the code segment corresponding to the running color block. This allows for rapid acquisition of the upgrade status of the target program. If a fault occurs, the location of the fault during the execution of the upgrade code can be quickly located based on the running color block, and the execution result can be quickly obtained based on the return value color block, thus improving the efficiency of upgrade fault location.
[0063] Furthermore, upgrade failures typically occur during the upgrade code execution process. The coded images displayed on the upgrade interface allow for quick location of problems encountered during OTA upgrades. This simplifies user operation, improves problem-solving efficiency, and increases customer satisfaction. Switching to the minimal system during the upgrade process does not affect the generation of runtime and return value color blocks, thus not impacting color-block-based upgrade failure localization. Logs can be omitted during the upgrade process, avoiding the problem of lost logs due to partition overwriting during the upgrade, which could lead to untraceable faults, and also avoiding the inconvenience of users exporting logs. The color-block encoding method offers high confidentiality and data security, and is more intuitive for decoding. Replacing the original progress bar with color blocks makes the upgraded interface more aesthetically pleasing.
[0064] In some embodiments, a color block may include multiple sub-color blocks, which include sub-color blocks for identifying the function of the color block and sub-color blocks for identifying the functional content of the color block. A color block may include at least one of the following: a running color block, a return value color block, an error indication color block, an upgrade indication color block, a burning color block, and a version color block.
[0065] Referring to Figure 3, a color block may include a column of sub-color blocks. This column of sub-color blocks includes sub-color blocks used to identify the function of the color block and sub-color blocks used to identify the content of the function. For example, the first two sub-color blocks in a column of sub-color blocks are used to identify the function of the color block, and the remaining sub-color blocks in the column of sub-color blocks are used to identify the content of the function. This is just one example. A color block may also include a row of sub-color blocks or multiple columns of sub-color blocks. The number of sub-color blocks used to identify the function of the color block can be one or more. The number of sub-color blocks used to identify the content of the function of the color block can also be one or more.
[0066] Optionally, a color block may also include only one sub-color block. The position of the sub-color block in the encoded image indicates the function of the color block, and the color of the sub-color block in the encoded image indicates the functional content of the color block.
[0067] It should be noted that the position of the color block, the number of sub-color blocks it includes, and the color of the sub-color blocks can all be varied, as long as they can identify the function and content of the color block.
[0068] Optionally, the running color block includes multiple running sub-color blocks, which include running sub-color blocks used to identify the function of the color block and running sub-color blocks used to identify the running progress. The color of the running sub-color block used to identify the running progress is determined based on the running progress of the target program and the running coding method. The color of the running sub-color block used to identify the function of the color block can be preset.
[0069] Referring to Figure 3, the first two sub-blocks of the color block are both white, indicating that the function of this color block is to indicate the running line number. The first two sub-blocks of the color block are white and red, indicating that the function of this color block is to indicate the return value of the code segment. This is just an example; sub-blocks of any position and any color within the color block can be used to indicate the function of the color block.
[0070] In some embodiments, the color of the sub-block used to identify the functional content of the running block is determined based on the progress of the running target program and the running coding method.
[0071] Optionally, the version encoding method may include, but is not limited to, binary or color encoding.
[0072] For example, in binary mode: white represents 0 and red represents 1. The running sub-blocks used to indicate the running progress are filled with white and red, thus representing the running progress in binary.
[0073] For example, using color: the initial state of the sub-color blocks used to indicate the running progress is all white. The running progress is divided into A stages. After running to a certain stage, the running sub-color block corresponding to that stage changes from white to green. When all the running sub-color blocks used to indicate the running progress are green, it means that the running is complete, which can provide a more intuitive understanding of the running progress.
[0074] Referring to Figure 3, assuming the running color block occupies a column of sub-color blocks, the first two sub-color blocks in this column are used to identify the color block function, and the remaining six sub-color blocks are used to identify the running progress, thus dividing the running progress into six stages. In response to determining the target program to start running, six white sub-color blocks are generated. Each time the running progress advances to a new stage, the color of one sub-color block changes to green. After the running is complete, all six sub-color blocks are green.
[0075] The encoding method can include various approaches, such as using different colors to represent different stages of the process. Referring to Figure 3, six sub-color blocks are used to indicate the running progress, dividing the process into seven stages, represented by red, orange, yellow, green, cyan, blue, and purple. After completing the first stage, all six sub-color blocks are set to red; after completing the second stage, they are set to orange, and so on. Finally, after the process is complete, all six sub-color blocks are set to purple.
[0076] Thus, generating running color blocks through diverse encoding methods can further enhance the confidentiality of the encoding and improve data security. Meanwhile, the decoding side can perform decoding more intuitively, improving decoding efficiency.
[0077] In some embodiments, the color of the sub-block used to identify the functional content of the return value block is determined based on the return value of the running target program and the return value encoding method.
[0078] Optionally, the return value encoding method may include, but is not limited to, binary or color encoding.
[0079] For example, in binary mode: white represents 0 and red represents 1. The return value sub-block, which identifies the execution result of the code segment corresponding to the running block, is filled with white and red, thus representing the execution result (e.g., return value) of the code segment in binary. Different binary values correspond to different return values. The decoding party can obtain the return value in the return value block based on the correspondence between binary values and return values.
[0080] For example, in terms of color scheme: a pre-defined association between the color of each sub-color block and the return value is established. Based on this association and the actual execution result, the return value sub-color block, which is used to identify the execution result of the code segment corresponding to the execution color block, is filled with the color associated with the actual execution result.
[0081] In this way, rich debugging information can be obtained based on the return value color blocks. Furthermore, generating return value color blocks through diverse return value encoding methods can further improve the confidentiality of the encoding, thus enhancing data security. Meanwhile, the decoding party can perform decoding more intuitively, improving decoding efficiency.
[0082] In some embodiments, FIG4 is a flowchart of another upgrade fault location method provided by the present disclosure. As shown in FIG4, the upgrade fault location method 200 further includes step 203-1 based on FIG2: in response to determining that the upgrade progress information includes the target program being burned, a burning color block is generated based on the burning progress of the target program and the burning encoding method.
[0083] For example, the burning color blocks are used to indicate the burning progress of the target program.
[0084] For example, the encoded image may also include burning color blocks. For instance, the burning progress of the target program can be indicated by the color of the burning color blocks. When a preset point is reached, the corresponding burning color block is displayed on the interface as part of the progress bar refresh.
[0085] This embodiment does not limit the execution order of generating programming color blocks, running color blocks, and return value color blocks; the corresponding color blocks can be generated according to the actual upgrade order.
[0086] For example, the programming encoding method can be preset, including rules for generating programming color blocks. The aforementioned execution entity generates programming color blocks based on the progress of programming the target program and the programming encoding method.
[0087] Optionally, the programming color block includes multiple programming sub-color blocks. These sub-color blocks include those for identifying the color block's function and those for indicating the programming progress. The color of the programming sub-color block used to indicate the programming progress is determined based on the progress and version encoding method of the target program being programmed.
[0088] For example, the sub-color block used to identify the color block function can be the first two sub-color blocks of the color block. If the first two sub-color blocks of the color block are both black, the function used to identify the color block is to indicate the burning progress. This is just an example, and any sub-color block can be used to identify the color block function.
[0089] Optionally, the encoding method for burning may include, but is not limited to, binary or color encoding.
[0090] For example, in binary mode: white represents 0 and red represents 1. The sub-blocks used to indicate the burning progress are filled with white and red, thus representing the burning progress in binary.
[0091] For example, the color method: the initial state of the sub-color blocks used to indicate the burning progress is all white. The burning progress is divided into A stages. After burning to a certain stage, the burning sub-color block corresponding to that stage changes from white to yellow. When all the burning sub-color blocks used to indicate the burning progress are yellow, it means that the burning is complete, which can provide a more intuitive understanding of the burning progress.
[0092] Referring to Figure 3, assume the programming color blocks occupy a column of sub-color blocks. The first two sub-color blocks in this column are used to identify the color block function, and the remaining six sub-color blocks are used to identify the programming progress, thus dividing the programming progress into six stages. In response to determining the target program to start programming, six white sub-color blocks are generated. Each time the programming progress advances to a new stage, the color of one sub-color block changes to yellow. After programming is complete, all six sub-color blocks are yellow.
[0093] The encoding method can include various approaches, such as using different colors to represent different stages of the encoding process. Referring to Figure 3, six sub-color blocks are used to indicate the encoding progress, dividing the encoding process into seven stages, represented by red, orange, yellow, green, cyan, blue, and purple. After completing the first stage of encoding, all six sub-color blocks are set to red; after completing the second stage, they are set to orange, and so on. After encoding is complete, all six sub-color blocks are set to purple.
[0094] Thus, generating programming blocks through diverse programming encoding methods can further enhance the confidentiality of the encoding and improve data security. Meanwhile, the decoding side can perform decoding more intuitively, improving decoding efficiency.
[0095] In some embodiments, FIG5 is a flowchart of another upgrade fault location method provided by the present disclosure. As shown in FIG5, the upgrade fault location method 200 further includes step 203-2: detecting the version of the target program; generating a version color block for identifying the version of the target program based on the version of the target program and the version encoding method.
[0096] Optionally, the encoded image may also include version color blocks. For example, the version of the target program can be identified by the color of the version color block. In response to the generation of the version color block, the corresponding version color block is displayed on the interface as part of the progress bar refresh.
[0097] Optionally, the embodiments of this disclosure do not limit the execution real-time machine for detecting the version of the target program. For example, the version of the target program can be detected immediately after an upgrade command is detected, or it can be detected after the upgrade is completed or after an upgrade failure occurs, or it can be detected during the upgrade process.
[0098] For example, the version encoding method can be pre-set, including rules for generating version color blocks. The aforementioned execution entity generates version color blocks based on the target program's version and version encoding method.
[0099] Optionally, the version color block includes multiple version sub-color blocks. These sub-color blocks include those for identifying the color block's function and those for identifying the version. The color of the version sub-color block used to identify the version is determined based on the target program's version and version encoding method.
[0100] For example, a sub-color block used to identify the version of a color block's function can be the first two sub-color blocks of the color block. If the first two sub-color blocks of the color block are both blue, the function used to identify the color block is to identify the version. This is just an example; a sub-color block at any position in the color block can be used to identify the function of the color block.
[0101] Optionally, the version encoding method may include, but is not limited to, binary or color encoding.
[0102] For example, in binary mode: white represents 0 and red represents 1. The version sub-blocks used to identify the version are filled with white and red, thus representing the version of the target program in binary. Referring to Figure 3, assuming that 6 sub-blocks are used to identify the version of the target program, if the version of the target program is version 1, these 6 sub-blocks can be white, white, white, white, white, and red.
[0103] For example, color coding: different colors represent different versions. Referring to Figure 3, assume that 6 sub-color blocks are used to identify the version of the target program, with red, orange, yellow, green, cyan, blue, and purple representing versions 1 to 7 respectively. If the target program is version 1, all 6 sub-color blocks can be set to red.
[0104] Optionally, in the embodiments of this disclosure, some of the sub-color blocks included in the color block may be empty sub-color blocks, which do not represent any meaning. For example, taking the version color block as an example, referring to Figure 3, assuming that one column is one version color block, the first two sub-color blocks of this column are used to identify the color block function, and the last sub-color block of this column is used to identify the version of the target program. For example, if the last sub-color block is set to orange, it indicates that the version of the target program is version 2, and the middle 5 sub-color blocks are empty and do not represent any meaning.
[0105] Thus, generating version color blocks through diverse version encoding methods can further enhance the confidentiality of the encoding and improve data security. Meanwhile, the decoding party can perform decoding more intuitively, improving decoding efficiency.
[0106] Optionally, different versions of the target program can correspond to different encoding methods, such as different running encoding methods, burning encoding methods, prompt encoding methods, and / or upgrade encoding methods. This can prevent fixed encoding methods from being cracked and further improve information security.
[0107] In some embodiments, FIG6 is a flowchart of another upgrade fault location method provided by the present disclosure. As shown in FIG6, the upgrade fault location method 200 further includes step 203-3: in response to determining that the target program is being upgraded, an upgrade indicator color block is generated based on the upgrade coding method.
[0108] For example, an upgrade indicator color block is used to indicate that a target program is being upgraded. For instance, an upgrade indicator color block can be generated during the burning or running of the target program to indicate that the target program is being upgraded. Another example is when the user manually stops the upgrade, an upgrade indicator color block is generated to indicate that the upgrade of the target program has stopped. Yet another example is when an upgrade fails, an upgrade indicator color block is generated to indicate that the upgrade of the target program has stopped. It can also indicate that an error has occurred in the target program; in this case, an error indicator color block may or may not be generated, and there is no limitation on this.
[0109] For example, the encoded image may also include an upgrade indicator color block. For instance, the color of the upgrade indicator color block can indicate that the target program is being upgraded.
[0110] For example, the upgrade coding method can be pre-configured, including rules for generating upgrade indicator color blocks. The aforementioned execution entity generates upgrade indicator color blocks based on whether the target program is being upgraded and the upgrade coding method.
[0111] Optionally, the upgrade indicator color block includes multiple upgrade sub-color blocks. These sub-color blocks include those for identifying the color block's function and those for indicating whether an upgrade is in progress. The color of the upgrade sub-color block indicating whether an upgrade is in progress is determined based on whether the target program is being upgraded and the upgrade coding method.
[0112] For example, the sub-color block used to identify the function of a color block can be the first two sub-color blocks of the color block. If the first two sub-color blocks of the color block are both blue, the function of the color block is to indicate whether it is being upgraded. This is just an example, and any sub-color block can be used to identify the function of the color block.
[0113] Optionally, the encoding method can be upgraded to include, but is not limited to, binary or color encoding.
[0114] For example, in binary mode: white represents 0 and red represents 1. Upgrade sub-blocks used to indicate whether an upgrade is in progress are filled with either white or red. For example, white indicates an upgrade is in progress, and red indicates the upgrade has stopped, thus representing the upgrade status using binary representation.
[0115] For example, in terms of color scheme: when upgrading, the sub-color blocks used to indicate whether an upgrade is in progress are displayed as a flowing light effect; when upgrading stops, all sub-color blocks used to indicate whether an upgrade is in progress are set to red, indicating that the upgrade has stopped, making it easier to intuitively determine whether an upgrade is in progress.
[0116] Optionally, when an upgrade is stopped, different colored sub-blocks can be used to represent different situations. For example, when an upgrade is stopped, all sub-blocks in the upgrade sub-block indicating whether an upgrade is in progress are filled with red, indicating that the upgrade has stopped after an upgrade failure; some sub-blocks in the upgrade sub-block indicating whether an upgrade is in progress are filled with red, and the other sub-blocks are filled with green, indicating that the upgrade has stopped after a stop operation has been received.
[0117] Optionally, in the embodiments of this disclosure, some of the sub-color blocks included in the upgrade indicator color block may be empty sub-color blocks, which do not represent any meaning. For example, referring to Figure 3, assuming that a column of color blocks in the figure represents a version color block, the first two sub-color blocks in this column are used to identify the color block function, and the last sub-color block in this column is used to indicate whether an upgrade is in progress. For example, if the last sub-color block is set to green, it indicates that the target program is upgrading; if the last sub-color block is set to red, it indicates that the upgrade has stopped, and the five sub-color blocks in the middle are empty and do not represent any meaning.
[0118] Thus, generating upgrade indicator color blocks through diverse upgrade encoding methods can further enhance the confidentiality of the encoding and improve data security. Meanwhile, the decoding party can perform decoding more intuitively, improving decoding efficiency.
[0119] In some embodiments, FIG7 is a flowchart of another upgrade fault location method provided by the present disclosure. As shown in FIG7, the upgrade fault location method further includes step 203-4: in response to determining that an error has occurred in the running target program, generating an error indication color block for indicating that an error has occurred in the upgrade target program based on a prompt encoding method.
[0120] Optionally, in response to determining that an error has occurred while running or burning the target program, an error indicator color block is generated based on a prompt encoding method to indicate that an error has occurred in the upgrade target program. In other words, an error indicator color block can be generated if an error occurs at any stage of the upgrade process.
[0121] For example, error indicator color blocks are used to indicate that an error or malfunction has occurred in the target program being upgraded.
[0122] For example, the encoded image may also include error indicator blocks, which may indicate that the target program upgrade has failed, an error has occurred during the upgrade, or a malfunction has occurred.
[0123] For example, the prompt encoding method can be pre-set, including rules for generating error indicator color blocks. The aforementioned execution entity generates upgrade indicator color blocks based on whether an error has occurred in the target program being upgraded and the prompt encoding method.
[0124] Optionally, the error indicator color block includes multiple error sub-color blocks. These sub-color blocks include those for identifying the function of the color block and those for identifying errors that occurred during the upgrade. The error sub-color block for identifying upgrade errors is determined based on the error occurrence and prompt encoding method of the target program during the upgrade.
[0125] For example, the error sub-block used to identify the function of a color block can be the first two sub-blocks of the color block. If the first two sub-blocks of the color block are both green, the function of the color block is to indicate that an error has occurred in the upgrade target program. This is just an example, and any sub-block can be used to identify the function of the color block.
[0126] Optionally, the coding method for prompts may include, but is not limited to, color coding.
[0127] For example, using color: the error sub-block used to indicate that an upgrade error has occurred is displayed with a purple flashing effect, which can more intuitively indicate that an upgrade error has occurred.
[0128] Optionally, the error indicator blocks can include only sub-blocks indicating that an upgrade error has occurred. The entire column of error indicator blocks flashes, allowing users to more intuitively see if an upgrade error has occurred. The executing entity can also generate analysis prompt messages to prompt users to take a picture of the progress bar and upload it to the user service center for analysis of the cause of the upgrade failure.
[0129] Optionally, this application does not limit the position of each color block in the encoded image (or progress bar).
[0130] For example, the version color block can occupy the leftmost column of color blocks in the progress bar. Referring to Figure 3, the version color block can occupy the first column of color blocks from the left.
[0131] For example, the running block and the return value block can be positioned adjacent to each other. For instance, the running block occupies column a, and the return value block occupies column a+1. This allows for quick identification of the problem in the running code in case of a failure.
[0132] For example, the burning color block, running color block, and return value color block are generated based on the upgrade process and are displayed on the interface as part of the progress bar refresh, without limiting their specific positions in the progress bar.
[0133] For example, when an upgrade is in progress, or when an upgrade has stopped and no failure has occurred, the upgrade indicator color block can occupy the rightmost column of the progress bar, which can provide a more intuitive view of the overall status of the target program's upgrade.
[0134] For example, in the event that the upgrade is stopped and the upgrade fails, the upgrade indicator block can occupy the second column of blocks from the right of the progress bar, and the generated error indicator block can occupy the rightmost column of blocks of the progress bar.
[0135] Optionally, the above is just an example; each color block can occupy one column or multiple columns.
[0136] For example, if the color blocks in the progress bar are insufficient to represent the actual upgrade progress, one or more color blocks can be added to multiple columns to make the progress displayed on the progress bar match the actual upgrade progress. Referring to Figure 3, after the actual upgrade progress reaches 70%, the generated color blocks only occupy about 50% of the progress bar, which does not visually match the actual upgrade progress. Version color blocks can be copied to fill the progress bar, that is, the progress bar includes multiple version color blocks to achieve the visual effect that the upgrade progress has reached 70%.
[0137] Please refer to Figure 8, which is a flowchart of another upgrade fault location method provided in an embodiment of this disclosure, wherein process 400 includes the following steps:
[0138] Step 401: In response to the decoding operation, obtain the decoding information of the target program based on the version color block.
[0139] For example, the execution subject of the method shown in Figure 8 can be the first device 101, or other devices (such as the second device 102, devices of the user service center, etc.), or the technicians of the user service center can interpret the color blocks in the encoded image based on the decoding information.
[0140] For example, during the upgrade process, if a user finds that the progress bar has stopped moving and the rightmost side is flashing continuously (the error indicator block is flashing), it indicates a failure has occurred during the upgrade. The user can take a picture of the progress bar and upload it to the user service center. The user service center can use color block analysis software to locate the cause of the failure. Alternatively, the user service center can send the photo of the failure to technical personnel. Technical personnel can interpret the color blocks in the progress bar to determine which line of code the upgrade process is stuck on and what the returned error value is, allowing them to quickly locate the cause of the problem.
[0141] For example, the execution subject of the method shown in Figure 8 can be a first device 101. The first device 101 generates an encoded image including at least one of the above-mentioned color blocks, and based on the user's operation to locate the upgrade fault, obtains the decoding information of the target program based on the version color blocks through color block parsing software.
[0142] Optionally, the aforementioned execution entity can parse the version color block based on the version encoding method to obtain the version of the target program, and obtain the decoding information corresponding to the version of the target program from the association between the program version and the decoding information.
[0143] Optionally, the decoding information may include one or more of the following: execution encoding method, return value encoding method, burning encoding method, prompt encoding method, upgrade encoding method, and version encoding method. The decoding information can be used to interpret color blocks in the encoded image.
[0144] Step 402: Decode the running color block and return value color block based on the decoding information to determine the execution result of the code corresponding to the line number identified by the running color block.
[0145] For example, the aforementioned execution entity decodes the running color block and the return value color block based on the running encoding method and the return value encoding method in the decoding information, and determines the running result of the code corresponding to the line number identified by the running color block.
[0146] For example, the aforementioned execution entity can also decode the burning color block based on the burning encoding method in the decoding information, decode the error indicator color block based on the prompt encoding method, and decode the upgrade indicator color block based on the upgrade encoding method.
[0147] In this way, the encoded image can be parsed manually or by equipment, the decoding information of the target program can be obtained through the version color block, and the running color block and return value color block can be decoded based on the decoding information to determine the execution result of the code corresponding to the line number identified by the running color block. The upgrade status of the target program can be obtained quickly. If the upgrade fails, the location of the failure during the execution of the upgrade code can be quickly located based on the running color block, and the cause of the problem can be quickly located based on the return value color block, which can improve the speed of upgrade fault location.
[0148] For ease of understanding, an application scenario in which the methods of the embodiments of this disclosure can be implemented is provided below.
[0149] Upon receiving an instruction to upgrade the target program, the device detects the target program's version and generates a version color block to identify the target program's version, for example, in the leftmost column of the progress bar. The device monitors the target program's upgrade progress and, upon determining that the target program is being burned, generates a burning color block based on the burning progress and burning encoding method. Upon determining that the target program is being upgraded, the device generates an upgrade indicator color block based on the upgrade encoding method. Upon determining that the program has reached a preset marker in the target program, the device generates a running color block and a return value color block. The running color block indicates the line number of the code at the preset marker in the target program. The return value color block indicates the execution result of the code segment corresponding to the running color block. If the device determines that an error has occurred while running the target program, it generates an error indicator color block to indicate the error, for example, by flashing in the rightmost column of the progress bar.
[0150] Users find that the progress bar is no longer running and the far right side of the progress bar is constantly flashing. They take a picture of the progress bar and upload it to the user service center. The user service center parses the version blocks in the progress bar based on the version encoding method to obtain the version of the target program. From the association between the program version and the decoding information, they obtain the decoding information corresponding to the version of the target program. Based on the decoding information, they decode each block in the progress bar to find out which line of code the upgrade process is stuck on and what the returned error value is. This allows for quick location of the cause of the problem and improves the speed of upgrade fault location.
[0151] Referring further to Figure 9, as an implementation of the methods shown in the above figures, this disclosure provides an embodiment of an upgraded fault location device, which corresponds to the above method embodiments, and the device can be specifically applied to various electronic devices.
[0152] As shown in Figure 9, the upgrade fault location device 500 of this embodiment may include a monitoring module 501 and a first generation module 502. The monitoring module 501 is configured to monitor the upgrade progress of the target program and obtain upgrade progress information. The first generation module 502 is configured to, in response to determining that the upgrade progress information includes reaching a preset marker in the target program, generate an encoded image including a running color block and a return value color block. The running color block is used to identify the line number of the code at the preset marker in the target program. The return value color block is used to identify the execution result of the code segment corresponding to the running color block.
[0153] In this embodiment, the specific processing of the monitoring module 501 and the first generation module 502 in the upgraded fault location device 500 and the resulting technical effects can be referred to the relevant descriptions of the above method embodiments, and will not be repeated here.
[0154] In one possible implementation, the upgrade fault location device 500 further includes: a second generation module configured to generate an error indication color block for indicating that an error has occurred in the target program being upgraded, based on a prompting encoding method, in response to determining that an error has occurred in the target program being upgraded.
[0155] In one possible implementation, the upgrade fault location device 500 further includes a third generation module configured to generate an upgrade indicator color block based on an upgrade coding scheme in response to determining that a target program is being upgraded. The upgrade indicator color block is used to indicate that a target program is being upgraded.
[0156] In one possible implementation, the upgrade fault location device 500 further includes a fourth generation module configured to generate a burning color block based on the burning progress of the target program and the burning encoding method in response to determining that upgrade progress information includes the target program being burned. The burning color block is used to identify the burning progress of the target program.
[0157] In one possible implementation, the upgrade fault location device 500 further includes a detection module and a fifth generation module. The detection module is configured to detect the version of the target program. The fifth generation module is configured to generate a version color block to identify the version of the target program based on the version of the target program and the version encoding method. The encoded image also includes the version color block.
[0158] In one possible implementation, the upgrade fault location device 500 further includes an acquisition module and a determination module. The acquisition module is configured to: acquire decoding information of the target program based on the version color block in response to an acquisition decoding operation. The determination module is configured to: decode the running color block and the return value color block based on the decoding information, and determine the execution result of the code corresponding to the line number identified by the running color block.
[0159] In one possible implementation, the encoded image further includes at least one of an error indicator color block, an upgrade indicator color block, a burning color block, and a version color block. Each color block includes multiple sub-color blocks, which include sub-color blocks for identifying the function of the color block and sub-color blocks for identifying the functional content of the color block.
[0160] In one possible implementation, the color of the sub-block used to identify the functional content of the running block is determined based on the progress of the running target program and the running coding method.
[0161] This embodiment exists as a device embodiment corresponding to the above method embodiment. The technical effects brought about by the upgraded fault location device provided in this embodiment can be referred to the relevant descriptions in the above method embodiment, which will not be repeated here.
[0162] According to embodiments of this disclosure, this disclosure also provides an electronic device, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to implement the upgrade fault location method described in any of the above embodiments when executed.
[0163] According to embodiments of this disclosure, this disclosure also provides a readable storage medium storing computer instructions that, when executed by a computer, enable the upgrade fault location method described in any of the above embodiments.
[0164] According to embodiments of this disclosure, this disclosure also provides a computer program product that, when executed by a processor, can implement the upgrade fault location method described in any of the above embodiments.
[0165] Figure 10 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent an in-vehicle device, a vehicle-mounted device, a smart terminal, a vehicle, a component on a vehicle, a component on an in-vehicle device, a component on a vehicle-mounted device, a component on a smart terminal, and so on. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0166] As shown in Figure 10, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0167] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606; output unit 607; storage unit 608; and communication unit 609. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0168] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the upgrade fault location method. For example, in some embodiments, the upgrade fault location method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the upgrade fault location method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the upgrade fault location method by any other suitable means (e.g., by means of firmware).
[0169] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0170] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0171] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0172] To provide interaction with the user, the systems and technologies described herein can be implemented in an in-vehicle infotainment system, which includes: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and an input device (e.g., a touch device, a voice input device, a gesture detection device) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback); and input from the user can be received in any form (including voice input, speech input, haptic input, or gesture input).
[0173] The systems and technologies described herein can be implemented in vehicle infotainment systems that include backend components (e.g., as a data server), middleware components (e.g., an application server), frontend components (e.g., a vehicle infotainment system with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., a communication network) of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0174] According to the technical solution of this disclosure embodiment, the upgrade progress of the target program is detected. In response to determining that the target program has reached a preset mark, an encoded image including a running color block and a return value color block is generated. The running color block indicates the line number of the code at the preset mark in the target program, and the return value color block indicates the execution result of the code segment corresponding to the running color block. In this way, the upgrade status of the target program can be quickly obtained. If a fault occurs, the location of the fault during the execution of the upgrade code can be quickly located based on the running color block, and the cause of the fault can be quickly located based on the return value color block. The efficiency of upgrading fault location can be improved by using the color block method.
[0175] Furthermore, upgrade failures typically occur during the upgrade code's execution. The coded images displayed on the upgrade interface allow for quick location of problems encountered during the upgrade process. This simplifies user operation, improves problem-solving efficiency, and increases customer satisfaction. Switching to the minimal system during the upgrade process does not affect the generation of runtime and return value color blocks, thus not impacting color-block-based upgrade failure localization. Logs can be omitted during the upgrade process, avoiding the problem of lost logs due to partition overwriting and the inconvenience of users exporting logs. The color-block encoding method offers high confidentiality and data security, and is more intuitive for decoding. Replacing ordinary progress bars with various colored blocks makes the upgraded interface more aesthetically pleasing.
[0176] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0177] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. An upgraded fault location method, comprising: Monitor the upgrade progress of the target program and obtain upgrade progress information; In response to determining that the upgrade progress information includes running to a preset marker in the target program, an encoded image including a running color block and a return value color block is generated, wherein the running color block is used to identify the line number of the code at the preset marker in the target program, and the return value color block is used to identify the running result of the code segment corresponding to the running color block.
2. The method of claim 1, wherein, The method further includes: In response to determining that an error has occurred while running the target program, an error indicator color block is generated based on the prompt encoding method to prompt that an error has occurred while upgrading the target program.
3. The method of claim 1 or 2, wherein, The method further includes: In response to determining that the target program is being upgraded, an upgrade indicator color block is generated based on the upgrade coding method, wherein the upgrade indicator color block is used to indicate that the target program is being upgraded.
4. The method of claim 1 or 2, wherein, The method further includes: In response to determining that the upgrade progress information includes burning the target program, a burning color block is generated based on the burning progress of the target program and the burning encoding method, wherein the burning color block is used to identify the burning progress of the target program.
5. The method of claim 1 or 2, wherein, The method further includes: Detect the version of the target program; Based on the version and version encoding method of the target program, a version color block is generated to identify the version of the target program, wherein the encoded image also includes the version color block.
6. The method of claim 5, wherein, The method further includes: In response to obtaining a decoding operation, the decoding information of the target program is obtained based on the version color block; Based on the decoding information, the running color block and the return value color block are decoded to determine the execution result of the code corresponding to the line number identified by the running color block.
7. The method of claim 1, wherein, The encoded image further includes at least one color block selected from error indicator color blocks, upgrade indicator color blocks, burning color blocks, and version color blocks; each color block includes multiple sub-color blocks, which include sub-color blocks for identifying the function of the color block and sub-color blocks for identifying the functional content of the color block.
8. The method of claim 7, wherein, The color of the sub-block used to identify the functional content of the running block is determined based on the progress of running the target program and the running coding method.
9. An upgraded fault location device, comprising: The monitoring module is configured to monitor the upgrade progress of the target program and obtain upgrade progress information; The generation module is configured to generate an encoded image including a running color block and a return value color block in response to determining that the upgrade progress information includes running to a preset mark in the target program. The running color block is used to identify the line number of the code at the preset mark in the target program, and the return value color block is used to identify the running result of the code segment corresponding to the running color block.
10. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
11. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-8.
12. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1-8.