Method and device for conversion from graphic codes to text codes, method and device for conversion from text codes to graphic codes, electronic device, and vehicle development debugging system and method

The method of converting graphic code to text code with annotation-based configuration information ensures accurate and efficient automobile development by maintaining a one-to-one correspondence, addressing the challenges of version control systems in managing graphic code differences.

JP2025134739AActive Publication Date: 2025-09-17SHANGHAI TOSUN TECH LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025093803
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-01
Filing Date
2025-06-05
Publication Date
2025-09-17
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

Existing version control systems for automobile development struggle with managing graphic code, making it difficult to compare differences between versions and infer implementation details, leading to inaccuracies and repetitive corrections between graphic and text code conversions.

Method used

A method and device for converting graphic code to text code by inserting configuration information as annotations, ensuring a one-to-one correspondence and enabling multiple round-trip conversions without loss of information, using techniques like base64 encoding and globally unique identifiers for precise positioning.

Benefits of technology

Maintains exact correspondence between graphic and text code, facilitating efficient and accurate development and debugging processes by ensuring consistent conversion results across multiple iterations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025134739000001_ABST
    Figure 2025134739000001_ABST
Patent Text Reader

Abstract

To convert graphic codes to text codes.SOLUTION: The present invention includes inserting identifiers for respective execution units in graphic codes into lines corresponding to respective execution units in target text codes, and inserting configuration information for one or more execution units in the graphic codes into annotation areas of the target text codes. At this time, persistent configuration information for one or more execution units in the graphic codes is generated as information including the identifiers of respective execution units. The persistent configuration information is serialized and encoded, and then inserted in text format into the annotation areas of the target text codes.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority from Chinese Patent Application No. 202310640840.3 filed on June 1, 2023, the entire contents of which are incorporated herein by reference. The present invention belongs to the technical field of vehicle software development, and in particular relates to a method and device for converting graphic code into text code, and a method and device for converting text code into graphic code. [Background technology]

[0002] In the automobile development process, there is a model that is initially built based on graphic code, but when the graphic code is executed on the computer side, it cannot be the carrier for logic execution. For automobile development, the logic of the automobile controller must be executed based on text code, so the graphic code is converted into text code and then it can be executed on the automobile controller. Summary of the Invention

[0003] The present invention relates to a method and system for converting text code and graphic code for automobile development, the method comprising: Converting the graphic code into a text code to generate a target text code, and inserting configuration information of each execution unit in the current graphic code into an annotation region of the target text code; and When converting the target text code back into graphic code, the graphic program extracts the configuration information of the target text code annotation area, and loads the configuration information to restore the graphic code.

[0004] The present invention further provides a text code and graphic code conversion device, which includes: a processor for executing a program for the method of converting between text code and graphic code; a storage module for storing a program for executing the method for converting between text and graphic codes; and a display module used to display the results of the conversion between text and graphic codes.

[0005] In a third aspect, the present invention further provides a computer-readable storage medium storing computer-readable instructions that, when executed by at least one processor, cause the method to be performed for converting between text and graphics code.

[0006] In a fourth aspect, the present invention further provides a method for converting text code and graphic code for application in automobile development, the method including: Converting the vehicle graphic code into a text code to generate a target text code, and inserting configuration information of each execution unit in the current vehicle graphic code into an annotation area of ​​the target text code; and When the target text code is converted back into the vehicle graphic code, the configuration information of the target text code annotation area is extracted by the vehicle graphic program, and the configuration information is loaded to restore the vehicle graphic code.

[0007] In a fifth aspect, the present invention further provides an electronic device, the electronic device including a processor, a readable storage medium, a communication bus, and a communication interface, the processor, the readable storage medium, and the communication interface communicating with each other via the communication bus. The readable storage medium stores a program for executing the above-described method for converting between text and graphic codes, and the program causes a processor to execute operations corresponding to the method for converting between text and graphic codes.

[0008] In a sixth aspect, the present invention further provides a development and debug system for a vehicle, the system including a computer device, a bus adapter, or a programming device. The computer device includes a processor, a readable storage medium, a communication bus, and a communication interface. The readable storage medium stores a program for executing the above-mentioned method for converting between text code and graphic code, the program causing the processor to execute operations corresponding to the method for converting between text code and graphic code, thereby generating text code. The processor, the readable storage medium, and the communication interface realize communication with a bus adapter via the communication bus. The processor is configured to compile at least one executable code from the text code. The bus adapter is configured to write the compiled executable code to a debug device; or The writing device is configured to write the compiled executable code to the debugging device.

[0009] The present invention further provides a development and debugging method for a vehicle, the debugging method including: generating text code by causing a computer device to perform an operation corresponding to the method for converting text code to graphic code; Write the compiled executable code to the debug device via a bus adapter, or The writing device writes the compiled executable code to the debugging device.

[0010] In a seventh aspect, the present invention further provides a development and debugging method for a vehicle, the debugging method including: generating a text code by causing a computer device to execute an operation corresponding to the method for converting between the text code and the graphic code; Write the compiled executable code to the debug device via a bus adapter, or The writing device writes the compiled executable code to the debugging device.

[0011] In an eighth aspect, the present invention further provides a computer program product, the computer program product comprising a computer readable storage medium having stored thereon computer readable program code comprising instructions for causing at least one processor or at least one computing device to perform the method for converting between textual code and graphical code as described above.

[0012] The present invention is intended to provide a brief summary of some of the subject matter described herein. Accordingly, it should be understood that the above features are merely examples and should not be construed as narrowing in any way the scope or nature of the subject matter described herein.

[0013] Other features, aspects, and advantages of the subject matter described herein will become apparent from the following specific embodiments, the accompanying drawings, and the claims. Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and obtained by the structure particularly pointed out in the description and drawings. In order to make the above objects, features and advantages of the present invention more comprehensible, the following preferred embodiments will be described in detail in conjunction with the accompanying drawings.

[0014] In order to more clearly describe the specific embodiments of the present invention or the technical solutions of the prior art, the following will briefly describe the drawings that need to be used to describe the specific embodiments or the prior art. The drawings described in the following description are some embodiments of the present invention, and it is obvious that those skilled in the art can obtain other drawings from these drawings without any creative efforts. [Brief explanation of the drawings]

[0015] [Figure 1] FIG. 1 is a flow chart illustrating a method for converting text and graphics codes according to some embodiments. [Figure 2] FIG. 2 illustrates the case of graphics code according to some embodiments. [Figure 3] FIG. 3 illustrates another graphics code case according to some embodiments. [Figure 4] FIG. 4 illustrates a third type of graphic code case according to some embodiments. [Figure 5] FIG. 5 illustrates sub-graphics code of execution unit B in the case of a third type of graphics code according to some embodiments. [Figure 6] FIG. 6 illustrates a fourth type of graphic code case according to some embodiments. [Figure 7] FIG. 7 illustrates a fifth type of graphic code case according to some embodiments. [Figure 8] FIG. 8 illustrates a sixth type of graphic code case according to some embodiments. [Figure 9] FIG. 9 is a principle block diagram of a device for converting text code and graphic code according to some embodiments. [Figure 10] FIG. 10 illustrates a seventh type of graphic code case according to some embodiments. [Figure 11] FIG. 11 is a schematic diagram after highlighting AV_On in the case of the seventh type of graphic code according to some embodiments. [Figure 12] FIG. 12 is a principle block diagram of an electronic device according to some embodiments. [Figure 13] FIG. 13 is a connection schematic diagram of a vehicle development and debug system (bus adapter) according to some embodiments. [Figure 14] FIG. 14 is a schematic diagram of connections for a vehicle development and debugging system (programming device) according to some embodiments. [Figure 15] FIG. 15 is a flowchart of a vehicle development debug method according to some embodiments. DETAILED DESCRIPTION OF THE INVENTION

[0016] In order to clarify the objectives, technical aspects and advantages of the embodiments of the present invention, the technical aspects of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. However, it is clear that the described embodiments are only some of the embodiments of the present invention and do not represent all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without performing creative work fall within the scope of protection of the invention.

[0017] During the automobile development process, the inventors have had to rely on version control software such as Git (an open-source distributed version control system) to manage text-based C code. However, such software makes it difficult to manage graphic code and compare differences between versions. Therefore, the files used to compare differences in version control systems are typically text code, making it difficult for users to view differences between different versions of text code or to infer the implementation details of the graphic code from specific difference codes. Furthermore, if a problem occurs in the logic of the text code, it is necessary to compare the differences from the text code corresponding to the problematic program version and then infer the graphic code to correct it. After correcting the graphic code, the text code is regenerated. This text code is generated from the graphic code and executed on the automobile controller, then converted from the text code to graphic code and corrected, and then the text code is generated from the graphic code and executed again. This process is repeated until the program is accurate.

[0018] Furthermore, since the same or similar software programs in the automobile development process can only be generated in one direction between graphic code and C code, there is no strict one-to-one correspondence between each execution operation in the graphic code and the C code. That is, when C code is generated from graphic code and then generated again from C code, there will be differences between the original graphic code and the generated graphic code.

[0019] Below are some examples to explain why there may be differences between the original and regenerated graphic code: Generally, when you want to repeatedly execute one action in a graphic code, you just need to set the number of repetitions of that action. For example, if action k=k+1 needs to be repeated three times, you set the number of repetitions of action k=k+1 to 3. However, the C code generated based on that graphic code can produce various results depending on the usage scenario. (1) For general circular logic, i.e., generic scenes, the generated C code is as follows: for (i=0; i<3; i++){ k = k + 1; } (2) In the case of high performance demand scenario, the generated C code is as follows: k = k + 1; k = k + 1; k = k + 1; The different C code generated in the above two scenarios produces completely different results when converted back to graphics code: the converted graphics code can have three actions, not just one; or the graphics code uses diamond branching to implement the for syntax, rather than simply using the repeat attribute.

[0020] Therefore, at least one embodiment provides a method for converting text code and graphic code for automobile development, which includes: converting graphic code into text code to generate target text code, and inserting configuration information of each execution unit in the current graphic code into an annotation area of ​​the target text code; and when converting the target text code back into graphic code, extracting the configuration information of the annotation area of ​​the target text code by a graphic program, loading the configuration information to obtain the configuration information of each execution unit in the graphic code, and restoring the graphic code based on the configuration information.

[0021] In some embodiments, the configuration information is the graphics code itself. That is, the information after the graphics code is persisted is called the configuration information. The graphics code is expressed in the form of a block diagram and includes programs with sequential execution, branch jump execution, loop execution, etc.

[0022] Each time the graphic code is converted to text code, the configuration information of the graphic code is inserted as an annotation into the annotation area of ​​the target text code, so that when the text code is converted back to graphic code, the resulting graphic code is guaranteed to be exactly the same as the original graphic code, that is, the one-to-one correspondence between the graphic code and the text code is maintained and multiple round-trip conversions are realized.

[0023] Various non-limiting embodiments of examples of the present disclosure are described in detail below with reference to the accompanying drawings.

[0024] As shown in FIG. 1, some embodiments provide a method for converting between text code and graphic code, including: In step S101, the graphic code is converted into a text code to generate a target text code, and the configuration information of each execution unit in the current graphic code is inserted into the annotation area of ​​the target text code. In step S102, when converting the target text code back into graphic code, the graphic program extracts the configuration information of the annotation area of ​​the target text code, loads the configuration information to obtain the configuration information of each execution unit in the graphic code, and restores the graphic code based on the configuration information.

[0025] In some embodiments, the configuration information is serialized and encoded and then inserted in text format into the annotation area of ​​the target text code, and when the target text code is converted back into graphic code, the graphic program extracts the text of the configuration information in the annotation area, deserializes and decodes it, and loads the configuration information to restore the graphic code.

[0026] Specifically, a graphics program according to some embodiments refers to a program that runs on a PC (Personal Computer) and presents structures such as sequential execution, branch jump execution, and loop execution using computer graphics.

[0027] In some embodiments, the serialized encoding method is, for example, but not limited to, base64 encoding, and if base64 encoding is used, the corresponding deserialization decoding method is base64 decoding.

[0028] For illustrative purposes, the following case will be described using base64 encoding and base64 decoding as an example.

[0029] In some embodiments, the text code may be, for example, but not limited to, C code, Java code, Python code, Pascal code, C++ code, Visual Basic code, C# code, and the like.

[0030] In the following cases, the conversion between graphic code and C code is described as an example, but the parentheses in each function call statement in the C code may or may not be empty, and may not be empty if there are parameters. For convenience of description, some examples use function call statements without parameters.

[0031] In some embodiments, the type of each execution unit in the graphics code can be preset, for example, the execution units in the graphics code are preset as sequential execution units, branch jump units, nested execution units, and loop units. The type of each execution unit can be recognized by the graphics code by reading the type attribute of each execution unit. The methods for converting different types of execution units into C code are as follows: It directly translates sequence execution units in the graphics code into C code with corresponding unit actions. Convert branch jump units in graphic code into C code with "if" or "else if" or "else" constructs. Convert nested execution units in the graphics code into functions and function-calling C code that execute the nested C code, and The cyclic units in the graphic code are converted into C code that is operated by one tag, one goto statement, and the loop unit.

[0032] As an example of converting graphics code into C code, a graphics code including an in-order execution unit as shown in FIG. 2 is taken as an example. Specifically, when converting the graphic code into C code, the execution units are converted sequentially according to the execution order, and the corresponding C code is as follows: A(); B(); C();

[0033] Another embodiment of converting graphics code into C code takes as an example graphics code including a branch jump execution unit as shown in FIG. When converting this graphic code into C code, two branches need to be set for the return value of A. If A returns logical true, the first branch is executed, i.e., B, and after B is executed, the logic continues to execute. Otherwise, the second branch is executed, i.e., C, and after C is executed, the logic jumps to the next instruction of B and continues to execute. The corresponding C code is as follows: if (A()){ B(); } else { C(); }

[0034] As a third implementation method for converting graphics code into C code, take the graphics code including nested execution units as shown in FIG. 4 as an example. As shown in FIG. 5, execution unit B on the graphics code is a nested execution unit, and its inside is sub-graphics code. When converting the graphic code into C code, the content of execution unit B needs to be converted into a C code function first, and the nested inner layer C code is as follows: int B(void){ D(); E(); F(); } The code generation for execution unit B will call function B, and the nested outer C code is as follows: A(); B(); C();

[0035] As a fourth embodiment of the method for converting graphics code into C code, the graphics code including the loop execution unit shown in FIG. 6 is taken as an example. After execution unit A is completed, execution unit B starts execution. It is a judgment. If the return result is logically true, it continues to execute execution unit C downward; otherwise, it jumps rightward. The jump label is "Loop", which means the program jumps upward to execution unit A and continues to execute downward. Execution unit A and execution unit B form a loop. When converting the graphic code to C code, a label Loop needs to be set above execution unit A, and when execution unit B returns a logical false, a goto statement in C code language will jump to the label. The generated C code is as follows: Loop: A(); if (B()){ goto Loop; } C();

[0036] In some embodiments, inserting the configuration information into the annotation area of ​​the target code includes generating persistent configuration information of the graphics code (hereinafter sometimes referred to as "persisted configuration information"), and serializing and encoding the persistent configuration information and then inserting it into the annotation area of ​​the target code in text form.

[0037] Specifically, the one-to-one correspondence between graphic codes and text codes can be achieved by encoding and decoding in the form of a string or file. For example, the generated persistence configuration information for the graphics code is as follows: conf=5704664608865866268;1;-1;4143886487092279683;-1;0;0;0;0;yOu / 2rXj;;-1;0 This persistence configuration information, when encoded using base64, gives the following string: Y29uZj01NzA0NjY0NjA4ODY1ODY2MjY4OzE7LTE7NDE0Mzg4NjQ4NzA5MjI3OTY4MzstMTswOzA7MDswO3lPdS8yclhqOzstMTsw.

[0038] By simply inserting the string s in text format into the annotation area of ​​the target C code, all the information of the graphics code can be stored in the C code. When it is necessary to convert back from the C code to the graphics code, the string s can be extracted from the C code and the persistence configuration information of the graphics code can be obtained by performing a base64 decoding operation on the string s, and the complete graphics code can be obtained by loading the persistence configuration information.

[0039] In some embodiments, when converting graphics code to C code, in addition to displaying configuration information of each execution unit in the current graphics code in the target C code, positioning information of each execution unit in the current graphics code is displayed in the target C code.

[0040] Specifically, the positioning information includes a globally unique identifier (GUID) that corresponds one-to-one with each execution unit in the graphics code, and each globally unique identifier is generated by calling the system API function coCreateGuid. The globally unique identifier can be used to directly position to the execution unit, thereby realizing the conversion from graphics code to text code. The globally unique identifier can also be used to directly position to each text code line corresponding to the graphics code, which also realizes the conversion from text code to graphics code. The globally unique identifier can also be used to directly position to the execution unit corresponding to the text code line.

[0041] As an optional method for displaying positioning information in the target C code, the graphics code is converted into C code, and while the target C code is being generated, the positioning information of each execution unit of the current graphics code is inserted into the corresponding line of the target C code.

[0042] The positioning information can be used to locate the position of an execution unit in the graphics code that corresponds to a certain code line in the C code, which can greatly improve the convenience and efficiency of investigation in applications that require C code logic investigation.Furthermore, the position of the corresponding code line in the C code that corresponds to a certain execution unit in the graphics code can be located, which can greatly improve testing efficiency in applications that require further testing of functions in the C code. Next, we will explain in detail, with examples, how to insert positioning information into the corresponding target C code lines. Take the graphic code shown in Figure 7 as an example. In step S201, when converting from graphic code to C code, a corresponding globally unique identifier is generated for each execution unit A, B, and C, and the correspondence table between execution units and ids is as follows: [Table 1] In step S202, C code is generated line by line from the graphic code in accordance with the conversion rules, and the correspondence between the line number, C code, and id is recorded as shown in the following table. [Table 2] In step S203, the id is added as positioning information to the corresponding target code line, preferably to the right side, as an annotation, and the generated target C code has the following content: A = 1; / / 796586134100579186 B = A + 2; / / 4477997354382728721 C = add(A, B); / / 623479023297457637

[0043] Another method for displaying positioning information in the target code is to create a temporary file to temporarily store the positioning information of each execution unit in the current graphic code when converting the graphic code to text code, and then serialize and encode the positioning information and insert it into the annotation area of ​​the target code in text form, where the positioning information is an association file between each execution unit and the corresponding target code line.

[0044] The following provides a detailed explanation, with examples, of how to present positioning information as a temporary file in the annotation area of ​​the target C code. Take the graphic code shown in Figure 7 as an example. In step S301, when converting from graphic code to C code, a corresponding globally unique identifier is generated for each execution unit A, B, and C, and the correspondence table between execution units and ids is as follows: [Table 3] In step S302, C code is generated line by line from the graphic code in accordance with the conversion rules, and the correspondence between the line number, the C code, and the id is recorded as shown in the following table. [Table 4] When the C code is generated, three lines of related documentation are also generated, each corresponding to the line number and id of the code line, as follows: [Table 5] In step S303, the graphic code encodes the association file of the line number of the code line and the ID as positioning information in base64 to obtain a character string s1 with the following content: Nzk2NTg2MTM0MTAwNTc5MTg2DQo0NDc3OTk3MzU0MzgyNzI4NzIxDQo2MjM0NzkwMjMyOTc0NTc2Mzc In step S304, when the encoded string s1 is inserted as text into the annotation region of the target C code, the content of the target C code becomes as follows: A = 1; B = A + 2; C = add(A, B); / / Nzk2NTg2MTM0MTAwNTc5MTg2DQo0NDc3OTk3MzU0MzgyNzI4NzIxDQo2MjM0NzkwMjMyOTc0NTc2Mzc

[0045] In the following, the method for converting C code and graphic code in the embodiment of the present disclosure will be described in detail by combining the complete steps of converting graphic code to C code and then converting C code to graphic code with a complete case.

[0046] Case 1 (inserting positioning information to the right of the corresponding target C code line) In this example, we assume the graphic code shown in Figure 7. According to the described method of some embodiments, the steps for performing the conversion between graphic code and C code are as follows: In step S401, a corresponding globally unique identifier is generated for each of the execution units A, B, and C, and the correspondence table between the execution units and ids is as follows: [Table 6] In step S402, C code is generated line by line from the graphic code according to the rules, and the correspondence between the line number, C code, and id is recorded as shown in the following table. [Table 7] After code generation is completed, we get a target C code file, which consists of three lines in total, and the contents are as shown in the table below. [Table 8] After the code generation is completed, a file containing the correspondence between the line number and ID of each code line will be obtained. There are three lines in total, and the contents are shown in the table below. [Table 9] In step S403, the id is used as positioning information and is added to the right of the corresponding target code line in the form of annotation. The generated target C code has the following content: A = 1; / / 796586134100579186 B = A + 2; / / 4477997354382728721 C = add(A, B); / / 623479023297457637 In step S404, the graphic code encodes the persistence configuration information of each execution unit using base64. Let's assume that the persistence configuration information is as follows: [ao] conf=5864543089582057106;1;-1;796586134100579186;-1;0;0;0;0;yOu / 2rXj;;-1;0 [a0] conf=623479023297457637;0;4477997354382728721;-1;-1;0;1;0;0;QyA9IEI_;;0;0 [a1] conf=4477997354382728721;0;796586134100579186;623479023297457637;-1;0;3;0;0;QiA9IEEgKyAy;;0;0 [a2] conf=796586134100579186;0;5864543089582057106;4477997354382728721;-1;0;1;0;0;QSA9IDE_;;0;0 The string s2 is obtained by base64 encoding, whose contents are as follows: W2FvXQ0KY29uZj01ODY0NTQzMDg5NTgyMDU3MTA2OzE7LTE7Nzk2NTg2MTM0MTAwNTc5MTg2Oy0xOzA7MDswOzA7eU91LzJyWGo7Oy0xOzANClthMF0NCmNv bmY9NjIzNDc5MDIzMjk3NDU3NjM3OzA7NDQ3Nzk5NzM1NDM4MjcyODcyMTstMTstMTswOzE7MDswO1F5QTlJRUlfOzswOzANClthMV0NCmNvbmY9NDQ3Nzk5 NzM1NDM4MjcyODcyMTswOzc5NjU4NjEzNDEwMDU3OTE4Njs2MjM0NzkwMjMyOTc0NTc2Mzc7LTE7MDszOzA7MDtRaUE5SUVFZ0t5QXk7OzA7MA0KW2EyXQ0K Y29uZj03OTY1ODYxMzQxMDA1NzkxODY7MDs1ODY0NTQzMDg5NTgyMDU3MTA2OzQ0Nzc5OTczNTQzODI3Mjg3MjE7LTE7MDsxOzA7MDtRU0E5SURFXzs7MDsw. In step S405, the graphic code inserts the encoded string s2 into the target C code annotation area in the form of text as an annotation. The complete target C code after conversion is shown below: A = 1; / / 796586134100579186 B = A + 2; / / 4477997354382728721 C = add(A, B); / / 623479023297457637 / / W2FvXQ0KY29uZj01ODY0NTQzMDg5NTgyMDU3MTA2OzE7LTE7Nzk2NTg2MTM0MTAwNTc5MTg2Oy0xOzA7MDswOzA7eU91LzJyWGo7Oy0xOzANClthMF0NCm NvbmY9NjIzNDc5MDIzMjk3NDU3NjM3OzA7NDQ3Nzk5NzM1NDM4MjcyODcyMTstMTstMTswOzE7MDswO1F5QTlJRUlfOzswOzANClthMV0NCmNvbmY9NDQ3Nzk 5NzM1NDM4MjcyODcyMTswOzc5NjU4NjEzNDEwMDU3OTE4Njs2MjM0NzkwMjMyOTc0NTc2Mzc7LTE7MDszOzA7MDtRaUE5SUVFZ0t5QXk7OzA7MA0KW2EyXQ0 KY29uZj03OTY1ODYxMzQxMDA1NzkxODY7MDs1ODY0NTQzMDg5NTgyMDU3MTA2OzQ0Nzc5OTczNTQzODI3Mjg3MjE7LTE7MDsxOzA7MDtRU0E5SURFXzs7MDsw In step S406, the conversion from the graphic code to the C code is completed. In step S407, if it is necessary to convert the C code back to the graphic code, the positioning information and persistence configuration information of the graphic code can be obtained by simply reading the ID information on the right side of each code line in the C code file and the annotation information in the annotation area. After the graphic code loads the persistence configuration information, the graphic code that corresponds one-to-one with the C code can be restored.

[0047] Case 2 (inserting positioning information in the form of text into the annotation area of ​​the target C code) Assume that the graphic code in this example is as shown in FIG. This graphic code has five execution units: A, B, C, D, and E. When the program is executed, A is executed first, then B is executed, and the next step is performed depending on the result of B. If the return value of B is logically true, C is executed, otherwise D is executed. Once C has completed execution, E is executed next. Once D has completed execution, E is executed next, and NOP is not executed. Once E has completed execution, the program ends and there is no need to execute NOP. According to the described method of some embodiments, the steps for performing the conversion between graphic code and C code are as follows: In step S501, a globally unique identifier is generated for each execution unit A, B, C, D, and E. The id is a 64-bit integer, and the id corresponding to each execution unit is different. The correspondence table between execution units and ids is as follows: [Table 10] In step S502, C code is generated line by line from the graphic code according to the rules. During the generation process, for the execution unit related to the C code generated for each line, the graphic code records the line number and the correspondence between the C code and the ID. Among them, the fourth and sixth lines do not have execution unit information and have blank IDs. In this example, the correspondence between the line number, the C code, and the ID is as shown in the table below. [Table 11] After the C code generation is completed, you will get a target C code file with 7 lines and the contents as shown in the following table. [Table 12] After the C code generation is complete, you will get a seven-line file with the line numbers and ids of the code lines associated with it, as shown in the following table. [Table 13] In step S503, the graphic code encodes the association file between the line number of the code line and the ID in base64 to obtain a character string s3 with the following content: NDE0Mzg4NjQ4NzA5MjI3OTY4Mw0KMTQwNDY3MjY5MzIxNjI3Mjg1DQo2NDgyMzc5OTY5NjE 5NjQzNTQ5DQoNCjMzMDM2ODMwNTc2NTI0ODQyNjMNCg0KMzU5ODM4Nzk3MTA2MDA4NjgzNw In step S504, the graphic code encodes the persistence configuration information of each execution unit in base64. The persistence configuration information is assumed as follows: [ao] conf=5704664608865866268;1;-1;4143886487092279683;-1;0;0;0;0;yOu / 2rXj;;-1;0 [a0] conf=140467269321627285;0;4143886487092279683;6482379969619643549;3303683057652484263;0;0;0;0;Qg__;;0;0 [a1] conf=6482379969619643549;0;140467269321627285;3598387971060086837;-1;0;1;0;0;Qw__;;0;0 [a2] conf=3303683057652484263;0;140467269321627285;8309716131964563539;-1;0;1;0;0;RA__;;0;0 [a3] conf=4182729410035600018;0;8309716131964563539;-1;-1;0;0;0;0;Tk9Q;;-1;0 [a4] conf=3598387971060086837;0;6482379969619643549;3450332134183460644;-1;0;1;0;0;RQ__;;0;0 [a5] conf=8309716131964563539;0;3303683057652484263;4182729410035600018;-1;0;0;0;0;Tk9Q;;-1;0 [a6] conf=3450332134183460644;0;3598387971060086837;-1;-1;0;0;0;0;Tk9Q;;-1;0 [a7] conf=4143886487092279683;0;5704664608865866268;140467269321627285;-1;0;1;0;0;QQ__;;0;0; The string s4 is obtained by encoding it with base64, and its contents are as follows: In step S505, the graphic code annotates string s3 and string s4 in the form of text " / / s1, s2" and adds them to the annotation area of ​​the target C code. The generated complete target C code is as follows: A(); if (B()){ C(); } else { D(); } E(); In step S506, the conversion from the graphic code to the C code is completed. In step S507, if it is necessary to convert this C code back to graphic code, first extract the annotation information of this target C code annotation area to obtain two comma-separated strings s5 and s6, where string s5 is the positioning information after base64 encoding and string s6 is the persistence configuration information of the graphic code after base64 encoding, and the graphic code loads this persistence configuration information to obtain graphic code that corresponds one-to-one to the C code.

[0048] As described above, in some embodiments of the code-to-graphics code conversion method, while converting graphics code to C code each time, the configuration information of the graphics code is inserted as an annotation into the annotation field of the target code. This ensures that when the C code is converted back to graphics code, the graphics code is identical to the original graphics code. That is, a one-to-one correspondence between the graphics code and the C code is maintained, enabling multiple round-trip conversions. Furthermore, in some embodiments, the positioning information can be used to locate the position of an execution unit in the graphics code corresponding to a line of code in the C code, greatly improving the convenience and efficiency of investigation in applications requiring C code logic investigation. Furthermore, the positioning information can be used to locate the position of a corresponding line of code in the C code corresponding to a line of code in the graphics code, greatly improving testing efficiency in applications requiring further testing of functions in the C code. Furthermore, the graphics code in some embodiments can be executed directly, and the generated C code program can also be executed directly, with the execution processes and results of both being fully consistent.

[0049] As shown in FIG. 9 , some embodiments further provide a text code-graphic code conversion device, which includes: a processor for executing a program of the above-mentioned text code-graphic code conversion method; a storage module for storing a program for executing the above-mentioned text code-graphic code conversion method; and a display module used for displaying the conversion result between the text code and the graphic code.

[0050] In some embodiments, the device for converting between text and graphic code may be an electronic device or a computer, and the following description will focus on an electronic device.

[0051] At least one embodiment further provides a method for converting text and graphics codes for application in automobile development, including: The vehicle graphic code is converted into a text code to generate a target text code, and the configuration information of each execution unit in the current vehicle graphic code is inserted into the annotation area of ​​the target text code. When the target text code is converted back into the vehicle graphic code, the configuration information of the annotation area of ​​the target text code is extracted by the vehicle graphic program, and the configuration information is loaded to restore the vehicle graphic code.

[0052] In the case of automobile development, the specific conversion steps for text code and vehicle graphic code are the same as the above-mentioned method for converting text code and graphic code, and therefore the description will be omitted here.

[0053] The following will combine the cases to explain in detail the method of converting text code and graphic code applied to the automobile development scene. In the process of developing an ABS algorithm for an automobile chassis electrical control, the logic for controlling the opening of a relief valve is taken as an example. See the graphics code segment shown in FIG.

[0054] The logic determines whether the slip rate of the current wheel is less than 0.2, and if the return result is logically false, it means that the slip rate of the current wheel is greater than 0.2 and the wheel is prone to locking, so the relief valve needs to be opened to reduce the pressure on this wheel. The flow of generating this graphic code into C code is as follows: Step S601: Generate a globally unique identifier corresponding to each execution unit in the graphic code. The correspondence table between execution units and IDs is as follows: [Table 14] In step S602, a C code is generated line by line from the graphic code according to the rules, which is four lines in total, and the contents are as shown in the table below. [Table 15] After the code generation is completed, the associated file f1 whose line number corresponds to the code line id is also obtained. There are four lines in total, and the contents are shown in the table below. [Table 16] In step S603, the graphic code encodes the persistence configuration information of each execution unit using base64. Assume that the persistence configuration file f2 of the graphic code is as follows: [a1] conf=3302264560674696091;0;3659305742699578;8432990436527128597;3428365350600537763;0;0;0;0;c2xpcCA8IDAuMiA / ;;0;0 [a2] conf=3428365350600537763;0;3302264560674696091;2570429621957346572;-1;0;1;0;0;RVZfT24_;;0;0 The contents of the related file f1 and the persistent configuration file f2 are encoded using base64 and then inserted into the annotation area of ​​the target C code generated in the form of annotations. The final content of the generated target C code is as follows: if (slip < 0.2){ } else { AV_On(); } / / MzMwMjI2NDU2MDY3NDY5NjA5MQ0KDQozNDI4MzY1MzUwNjAwNTM3NzYzDQoNCg__,W2ExXQ0KY29uZj0zMzAyMjY 0NTYwNjc0Njk2MDkxOzA7MzY1OTMwNTc0MjY5OTU3ODs4NDMyOTkwNDM2NTI3MTI4NTk3OzM0MjgzNjUzNTA2MDA1Mz c3NjM7MDswOzA7MDtjMnhwY0NBOElEQXVNaUEvOzswOzANClthMl0NCmNvbmY9MzQyODM2NTM1MDYwMDUzNzc2Mzsw OzMzMDIyNjQ1NjA2NzQ2OTYwOTE7MjU3MDQyOTYyMTk1NzM0NjU3MjstMTswOzE7MDswO1JWWmZUMjRfOzswOzANCg. In step S604, the user compiles the generated target C code, and then inserts it into the automobile controller to run, thus completing the conversion of the automobile development graphic code into C code.

[0055] In the following, the application of positioning information in the automobile development scene will be explained in detail using the logic for controlling the opening of a relief valve as an example in relation to the development process of the ABS algorithm for the electrical control of an automobile chassis.

[0056] As shown in Figure 11, if a user determines that the AV valve opening function is not working and that the corresponding logic needs to be investigated, they first load the C code file into the graphics code, read the annotation information in the C code file, decode it using base64 to obtain the configuration information and positioning information of the graphics code, and then restore the graphics code using the decoded configuration information. Next, the user clicks on the line code "AV_On();" in the C code file window where the graphics code was loaded. Based on the line number information in the positioning information, the graphics code is located at the execution unit ID "3428365350600537763" corresponding to that line number. The window jumps to the graphics code, and the execution unit is highlighted in the graphics code display window, making it easy for the user to modify the execution unit and greatly improving the convenience and efficiency of the investigation.

[0057] In the following, in relation to the development process of the ABS algorithm for the electrical control of the chassis of an automobile, the application of positioning information in the automobile test scenario will be explained in detail using the logic for controlling the opening of a relief valve as an example.

[0058] In actual automotive testing applications, it is necessary to perform software in-loop testing using the C code logic generated by the graphic code. The logic controlling the opening of the relief valve is still the object of testing. After the graphic code segment is generated into C code as shown in Figure 10, the function "AV_On" in the C code needs to be further tested, and information such as execution time and resource occupation needs to be obtained, which needs to be located in the corresponding code line of the C code by the graphic code.

[0059] The location method is as follows: First, the user clicks on the execution unit "AV_On" in the graphics code and attempts to jump to the corresponding C code line. The graphics code obtains the execution unit ID "3428365350600537763", reads the annotation information in the C code file, and obtains the location information of the graphics code after base64 decoding, that is, obtains the correspondence file between code lines and IDs. Then, the graphics code collects the code lines where this ID appears in the file and presents them to the user in the form of a list. The user selects the corresponding option in the list, and the corresponding C code line is located and displayed, thereby greatly improving testing efficiency.

[0060] The following describes electronic devices in some embodiments from the perspective of hardware processing, but does not limit the specific implementation of the electronic devices.

[0061] As shown in Fig. 12, the electronic device includes a processor, a readable storage medium, a communication bus, and a communication interface. The processor, the readable storage medium, and the communication interface communicate with each other via the communication bus. The readable storage medium is used to store a program for executing the method for converting between text code and graphic code. The program causes the processor to perform operations corresponding to the method for converting between text code and graphic code.

[0062] In other embodiments, computer equipment, industrial computers, etc. may also be types of electronic devices. It should be noted that the configuration shown in FIG. 12 is not intended to limit the electronic device, which may include fewer or more components than those shown, may combine some components, or may have different component arrangements.

[0063] In some embodiments, the communication interface may be a communication interface connectable to an external bus adapter, such as RS232, RS485, a USB port, a TYPE port, etc. A wired or wireless network interface may also be included, and the network interface may optionally include a wired and / or wireless interface typically used to establish a communication connection between the computing device and other electronic devices (e.g., a WI-FI interface, a Bluetooth interface, etc.).

[0064] The storage module, readable storage medium, or computer-readable storage medium includes at least one type of memory. Memory includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, it may be an internal storage unit of a computer device, such as a hard disk of the computer device. In other embodiments, the memory may be an external storage device of a computer device, such as a plug-in hard disk installed in the computer device, a SmartMedia Card (SMC), a Secure Digital Card (SD), a flash card, etc. Furthermore, the memory may include both an internal storage unit of a computer device and an external storage device. The memory is used to store various data, such as application software and computer program code installed in the computer device, as well as to temporarily store output data or data to be output.

[0065] In some embodiments, the processor may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip that executes program code stored in memory or processes data, for example, to execute a computer program.

[0066] In some embodiments, the communication bus may be an input / output bus, which may be a Peripheral Component Interconnect (PCI) bus or an Enhanced Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0067] Optionally, the computer device may further include a user interface. The user interface may include input units such as a display and a keyboard, and optionally, the user interface may also include a standard wired interface or a wireless interface. Optionally, in some embodiments, the display or display module may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. In this case, the display or display module is also called a display screen or a display unit, since it displays information processed in the computer device and a visualized user interface.

[0068] When the processor executes the program, it realizes the steps in the embodiment of the method for converting text code and graphic code shown in Figure 1, for example, steps S101 to S102 shown in Figure 1. Alternatively, when the processor executes the computer program, it realizes the functions of each module or unit in each of the embodiments of the device.

[0069] In some embodiments, the processor is specifically used to implement the following steps: Converting the graphic code into a text code to generate a target text code, and inserting configuration information of each execution unit in the current graphic code into an annotation area of ​​the target text code; and When the target text code is converted back to graphic code, the configuration information of the target text code annotation region is extracted and the configuration information is loaded to restore the graphic code.

[0070] Optionally, as a possible embodiment, the processor may be further used to implement the following steps: The configuration information is serialized and encoded, and then inserted in the annotation area of ​​the target text code in text format; and When converting the target text code back into graphics code, the text of the configuration information of the annotation area is extracted and deserialized and decoded to obtain the configuration information of each execution unit in the graphics code, and the configuration information is loaded to restore the graphics code.

[0071] Optionally, as a possible embodiment, the processor may be further used to implement the following steps: Convert sequential execution units in the graphic code into text code of the corresponding unit operations. Convert branch jump units in the graphic code into text code of "if" or "else if" or "else" constructs. Converting nested execution units in the graphics code into functions that execute nested text code and text code that calls those functions; and A loop unit in the graphic code is converted into a text code operated by one tag, one goto statement, and the corresponding loop unit.

[0072] Optionally, as a possible embodiment, the processor may be further used to implement the following steps: generating persistence configuration information for the graphics code; and The persistence configuration information is serialized and encoded, and then inserted in the form of text into the annotation region of the target code.

[0073] Optionally, as a possible embodiment, the processor may be further used to implement the following steps: Along with the generation of the target text code, the positioning information of each execution unit in the current graphic code is inserted into the corresponding line of the target text code.

[0074] Optionally, as a possible embodiment, the processor may be further used to implement the following steps: When converting the graphic code into the text code, a temporary file is established, which is used to temporarily store the positioning information of each execution unit in the current graphic code. The positioning information is an association file between each execution unit and the corresponding target text code line; and The related file is serialized and encoded, and then inserted in the form of text into the annotation area of ​​the target text code.

[0075] At least one embodiment also provides a computer-readable storage medium, which stores a program for a method for converting between text and graphics codes. When the program is executed by a processor, the method can realize the conversion between text and graphics codes. For specific steps of the method, please refer to the specific descriptions of the method for converting between text and graphics codes in some embodiments, and the description will be omitted here.

[0076] As shown in Figures 13 and 14, some embodiments further provide a vehicle development and debugging system, which includes a computer device, a bus adapter, or a programming device. The computer device includes a processor, a readable storage medium, a communication bus, and a communication interface; The readable storage medium stores a program for executing the above-described method for converting between text code and graphic code, the program causing the processor to execute operations corresponding to the method for converting between text code and graphic code, thereby generating text code. The processor, the readable storage medium, and the communication interface realize communication with a bus adapter via the communication bus. The processor is configured to compile at least one executable code from the text code. The bus adapter is configured to write the compiled executable code to a debug device; or The writing device is configured to write the compiled executable code to the debugging device.

[0077] Some embodiments further provide a development debugging method for a vehicle, which includes: generating text code by executing, by a computer device, an operation corresponding to a method for converting between text code and graphic code; writing, by a bus adapter, the compiled executable code into a debugging device; or writing, by a writing device, the compiled executable code into the debugging device.

[0078] In some embodiments, the computing device corresponds to the electronic device described above, and is not described here.

[0079] The processor is configured to compile the text code to at least one executable code. In some embodiments, compiling the text code can be achieved by executing a cross-compiler.

[0080] In some embodiments, the configuration information is serialized and encoded, and then inserted in text format into the annotation area of ​​the target text code. When the target text code is converted back into graphics code, the graphics program extracts the text of the configuration information in the annotation area and deserializes and decodes it to obtain the configuration information of each execution unit in the graphics code, and loads the configuration information to restore the graphics code.

[0081] In some embodiments, converting the graphics code to text code includes: converting sequential execution units in the graphics code into text code of corresponding unit operations; converting branch and jump units in the graphics code into text code of "if" or "else if" or "else" constructs; converting nested execution units in the graphics code into functions that execute the nested text codes and text code that calls the functions; and converting loop units in the graphics code into text code that is operated by one tag, one goto statement, and the corresponding loop unit.

[0082] In some embodiments, a method for inserting configuration information into an annotation area of ​​a target text code includes: generating persisted configuration information of the graphic code; and serializing and encoding the persisted configuration information and then inserting it into the annotation area of ​​the target text code in a text format.

[0083] In some embodiments, along with the generation of the target text code, positioning information for each execution unit in the current graphics code is inserted into the corresponding line of the target text code.

[0084] In some embodiments, when converting graphics code to text code, a temporary file is established to temporarily store positioning information of each execution unit in the current graphics code, where the positioning information is an association file between each execution unit and the corresponding line of target text code, and the association file is serialized, encoded, and then inserted into the annotation area of ​​the target text code in text format.

[0085] In some embodiments, the bus adapter may be a CAN bus adapter, a CAN FD bus adapter, a FastLIN bus adapter, a LIN bus adapter, an Ethernet bus adapter, or a FlexRay bus adapter. It may be one-to-one or one-to-multiple, and some embodiments do not limit the specific implementation of the bus adapter. In some embodiments, the compiled executable code may be written by communicating with the debugging device via UDS, XCP, or CCP protocols.

[0086] In some embodiments, a writing device may be referred to as a programmer.

[0087] In some embodiments, the automotive debugging device may specifically refer to an on-board ECU and its associated systems, such as, but not limited to, an electric power steering system (EPS), an anti-lock braking system (ABS), an electronic stability control system (ESC), an automobile engine management system (EMS), and a battery management system (BMS). These devices may be connected to a computer device via a bus to receive and execute compiled executable code.

[0088] Some embodiments further provide a computer program product, including a computer-readable storage medium having computer-readable program code stored thereon, the computer-readable program code including instructions that cause at least one processor or at least one computing device to perform any of the possible methods for converting textual code to graphical code described above.

[0089] Some embodiments provide a computer-readable storage medium that stores computer-readable instructions that, when executed by at least one processor, cause the method of converting textual code to graphical code of the above-described embodiments to be performed.

[0090] In some embodiments of the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely exemplary. For example, the flowcharts and block diagrams in the drawings illustrate possible architectures, functions, and operations of apparatuses, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, a program segment, or a portion of code. The module, program segment, or portion of code includes executable instructions for implementing one or more predetermined logical functions. Note that in some alternative implementations, the functions depicted in the blocks may occur in a different order than depicted in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented in a dedicated hardware-based system that performs the predetermined functions or operations, or may be implemented in a combination of dedicated hardware and computer instructions.

[0091] Furthermore, each functional module in each embodiment of the present invention may be integrated together to form a single independent part, each module may exist independently, or two or more modules may be integrated to form a single independent part.

[0092] The above functions can be realized in the form of software functional modules and stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention essentially or a part that contributes to the prior art or a part of the technical solution can be expressed in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.

[0093] The above-described preferred embodiments of the present invention have been enlightened, and those skilled in the art can make various changes and modifications based on the above description without departing from the technical spirit of the present invention. The technical scope of the present invention is not limited to the content of the specification, but should be determined based on the claims.

Claims

1. A method for converting graphic code into text code, comprising the steps of: converting the graphic code into a text code to generate a target text code, and inserting an identifier of each execution unit in the graphic code into a line of the target text code corresponding to each execution unit, and inserting configuration information related to one or more execution units in the graphic code into an annotation region of the target text code; When inserting configuration information for one or more execution units into an annotation region of the target text code, generating persistent configuration information for one or more execution units in the graphics code, the information including an identifier for each execution unit; A method for converting graphic code into text code, characterized in that persistent configuration information is serialized and encoded before being inserted in the form of text into an annotation area of ​​the target text code.

2. When converting graphic code to text code, converting sequential execution units in the graphic code into text code of corresponding unit operations; Converting branch jump units in the graphic code into text code with "if" or "else if" or "else" constructs; converting nested execution units in the graphics code into functions that execute nested text code and text code that calls the functions; and 2. The conversion method according to claim 1, wherein a loop unit in a graphic code is converted into a text code operated by one tag, one goto statement, and the corresponding loop unit.

3. A method for converting graphic code into text code, comprising the steps of: converting the graphic code into a text code to generate a target text code, and inserting positioning information of each execution unit in the graphic code and configuration information related to one or more execution units in the graphic code into an annotation area of ​​the target text code; When inserting the positioning information of each execution unit in the graphic code into the annotation area of ​​the target text code, establishing a temporary file for temporarily storing an identifier for each execution unit in the graphics code; generating an association file from the temporary file, the association file including positioning information associating a line number corresponding to each execution unit of the target text code with an identifier of each execution unit; Serializing and encoding the associated file and then inserting it in the form of text into the annotation region of the target text code; When inserting configuration information for one or more execution units into an annotation region of the target text code, generating persistent configuration information for one or more execution units in the graphics code, the information including an identifier for each execution unit; A method for converting graphic code into text code, characterized in that persistent configuration information is serialized and encoded before being inserted in the form of text into an annotation area of ​​the target text code.

4. When converting graphic code to text code, converting sequential execution units in the graphic code into text code of corresponding unit operations; Converting branch jump units in the graphic code into text code with "if" or "else if" or "else" constructs; converting nested execution units in the graphics code into functions that execute nested text code and text code that calls the functions; and 4. The conversion method according to claim 3, wherein a loop unit in a graphic code is converted into a text code operated by one tag, one goto statement, and the corresponding loop unit.

5. A graphic code to text code conversion device, comprising: A processor that executes a program for the method for converting graphic code into text code according to any one of claims 1 to 4. a storage module for storing a program for executing the method for converting graphic code into text code; and A graphic code to text code conversion device, comprising a display module used to display the result of conversion from graphic code to text code.

6. A computer-readable storage medium, comprising: storing computer-readable instructions; A computer readable storage medium, the instructions, when executed by at least one processor, causing the computer to perform the method for converting graphic code to text code according to any one of claims 1 to 4.

7. It is applied to automobile development, 5. The method for converting a graphic code into a text code according to claim 1, wherein the graphic code is for a vehicle.

8. An electronic device, a processor, a computer-readable storage medium, a communication bus, and a communication interface; the processor, the computer-readable storage medium, and the communication interface communicate with each other via the communication bus; The computer-readable storage medium stores a program for executing the method for converting graphic code into text code according to any one of claims 1 to 4, The electronic device is characterized in that the program causes the processor to execute an operation corresponding to the method of converting from graphic code to text code.

9. A development and debugging system for a vehicle, comprising: a computer device, a bus adapter, or a writing device; the computing device includes a processor, a computer-readable storage medium, a communication bus, and a communication interface; The computer-readable storage medium stores a program for executing the method for converting graphic code into text code according to any one of claims 1 to 4, the program causes the processor to execute an operation corresponding to the method for converting graphic code into text code, thereby generating text code; the processor and the readable storage medium communicate with a bus adapter via the communication interface and the communication bus; the processor is configured to compile at least one executable code from the text code; the bus adapter is configured to write compiled executable code to a debug device; or the writing device is configured to write the compiled executable code to the debugging device; A development and debugging system for a vehicle.

10. 10. The vehicle development and debugging system according to claim 9, wherein the bus adapter is a CAN bus adapter, a CAN FD bus adapter, a FastLIN bus adapter, a LIN bus adapter, an Ethernet bus adapter, or a FlexRay bus adapter.

11. the bus adapter communicates with a debug device via UDS or XCP or CCP protocol to write compiled executable code; 10. The vehicle development and debugging system of claim 9, wherein the debugging device includes an electric power steering system, an anti-lock braking system, an electronic stability control system, an automobile engine management system, and a battery management system.

12. A development and debugging method for a vehicle, comprising: generating a text code by causing a computer device to execute an operation corresponding to the method for converting graphic code into text code according to any one of claims 1 to 4; Write the compiled executable code to the debug device via a bus adapter, or A development and debugging method for vehicles, comprising the steps of: writing compiled execution code into a debugging device by a writing device.

13. A computer program product causing at least one processor or at least one computer device to execute the method for converting graphic code into text code according to any one of claims 1 to 4.

14. A method for converting text code into graphic code, comprising the steps of: An identifier of each execution unit in the graphic code is inserted into a line of the text code corresponding to the execution unit, and configuration information related to one or more execution units in the graphic code is inserted into an annotation area of ​​the text code; A method for converting text code to graphic code, comprising: extracting identifiers and annotation area configuration information inserted into the text code by a graphic program, and loading the identifiers and configuration information to restore the graphic code when converting the text code to graphic code.

15. The conversion method of claim 14, wherein when converting text code into graphics code, the text of the configuration information of the annotation area is extracted by a graphics program, deserialized and decoded to obtain configuration information related to one or more execution units in the graphics code, and the configuration information is loaded to thereby restore and obtain the graphics code.

16. A method for converting text code into graphic code, comprising the steps of: Positioning information of each execution unit in the graphic code and configuration information of one or more execution units in the graphic code are inserted into an annotation region of the text code; A method for converting text code to graphic code, comprising: extracting positioning information and configuration information inserted into an annotation area of ​​the text code by a graphic program when converting the text code to graphic code; and loading the positioning information and configuration information to restore the graphic code.

17. The conversion method of claim 16, wherein when converting text code into graphics code, the text of the configuration information of the annotation area is extracted and deserialized by a graphics program to obtain configuration information related to one or more execution units in the graphics code, and the configuration information is loaded to thereby restore and obtain the graphics code.

18. A text code to graphic code conversion device, comprising: A processor that executes a program for the method of converting text code into graphic code according to any one of claims 14 to 17. a storage module for storing a program for executing the method for converting text code into graphic code; and 1. A text to graphic code conversion device, comprising: a display module used to display the result of the text to graphic code conversion.

19. A computer-readable storage medium, comprising: storing computer readable instructions; A computer readable storage medium, the instructions, when executed by at least one processor, causing the method for converting textual code into graphical code according to any one of claims 14 to 17 to be performed.

20. It is applied to automobile development, 18. The method for converting text code into graphic code according to claim 14, wherein the graphic code is for a vehicle.

21. An electronic device, a processor, a computer-readable storage medium, a communication bus, and a communication interface; the processor, the computer-readable storage medium, and the communication interface communicate with each other via the communication bus; The computer-readable storage medium stores a program for executing the method for converting text code into graphic code according to any one of claims 14 to 17, The electronic device is characterized in that the program causes the processor to execute an operation corresponding to the method of converting text code into graphic code.

22. A computer program product causing at least one processor or at least one computer device to carry out the method for converting textual code into graphic code according to any one of claims 14 to 17.

Citation Information

Patent Citations

  • Methods, Systems, and Computer Programs for Efficiently Serializing Navigational State in Portals

    JP2009519519A

  • Method and apparatus for providing extended object representation data

    JP2017511920A

  • Static memory allocation in a graphical programming system

    US20060036798A1

  • Automatic Conversion of Text-Based Code Having Function Overloading and Dynamic Types into a Graphical Program for Compiled Execution

    US20080022264A1

  • Systems and methods for bi-directional visual scripting for programming languages

    US20170060541A1