Embedded software development method and system

By burning the embedded software development system in which logical interpretation programs and server user-side work together in an embedded chip, the flexibility and stability of program interpretation and execution are achieved, and the problem of insufficient flexibility in compilation and execution language in the prior art is solved. , reduces development costs and complexity, and is suitable for the frequent update requirements of embedded systems.

CN119127213AActive Publication Date: 2024-12-13CHONGQING ZHUGELIANG TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411241754.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-13
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

The existing compilation execution language needs to be recompiled after the program is modified, which lacks flexibility and makes it difficult to effectively interpret execution methods for applications in embedded environments.

Method used

Design an embedded software development system, which can realize online writing and import of logic trees by pre-burning logic interpretation programs in embedded chips, combining the collaborative work of the server and the user side, and provide rollback functions to ensure development flexibility and stability. sex.

Benefits of technology

There is no need to perform compilation and writing operations after each modification of the program, which significantly reduces development costs and complexity, improves development efficiency, and enhances the system's fault tolerance and stability. It is suitable for embedded systems that frequently update or adjust logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127213A_ABST
    Figure CN119127213A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software development, and particularly discloses an embedded software development method and system, and the system comprises a board card, a server and a user side. The board card is connected to the server, and an embedded chip is carried on the board card; a logic interpretation program is burnt in the embedded chip in advance; the user terminal is used for acquiring target embedded chip information needing to be updated and uploading the target embedded chip information to the server; the logic tree compiling module is used for providing a logic tree compiling environment and obtaining a compiled logic tree; uploading the compiled logic tree to a server; and the server is used for importing the compiled logic tree into the target embedded chip. According to the technical scheme, only the logic tree needs to be written or updated, the chip is imported, the logic tree does not need to be programmed, the development cost can be reduced, and the development efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to an embedded software development method and system. Background Art

[0002] Nowadays, compiled execution languages ​​need to compile the source program to generate the target file, and then the computer executes the target program. It has the characteristics of fast execution speed, but when the program is modified, it needs to be recompiled, which lacks flexibility.

[0003] To this end, the applicant proposed a program interpretation and execution method, including: a generation step: generating a logic tree; the logic tree includes one or more information of upper and lower parent-child node information, node type, parameter type, and application value transfer type; wherein the node type includes other extensions; a parsing step: writing a logic interpretation and execution program, passing in the logic tree as a parameter, and parsing and executing the logic tree.

[0004] This method can enable computer languages ​​that need to be compiled to be interpreted and executed, and has a wide range of applications. However, an embedded software development method and system are needed to implement the program interpretation and execution method, apply it to actual software development, and give full play to its value. Summary of the invention

[0005] One of the purposes of the present invention is to provide an embedded software development system that can reduce development costs and improve development efficiency.

[0006] In order to solve the above technical problems, this application provides the following technical solutions:

[0007] An embedded software development system includes a board, a server and a client;

[0008] The board is connected to the server and is equipped with an embedded chip; the embedded chip is pre-burned with a logic interpretation program;

[0009] The user terminal is used to obtain the target embedded chip information that needs to be updated and upload it to the server; it is used to provide a logic tree writing environment, obtain the written logic tree; and upload the written logic tree to the server;

[0010] The server is used to import the written logic tree into the target embedded chip.

[0011] Furthermore, the server is used to obtain input data from the target embedded chip, and is also used to parse and execute the written logic tree through a pre-stored logic interpretation program, and input the input data to determine whether a running error occurs. If a running error occurs, the import is terminated, an error prompt is generated and sent to the user terminal; if no running error occurs, the execution result is obtained and the execution result is sent to the user terminal;

[0012] The server is also used to determine whether a termination instruction is received from the user terminal. If the termination instruction is not received, the written logic tree is imported online into the target embedded chip.

[0013] Furthermore, the server is also used to obtain the existing logic tree from the target embedded chip and save it;

[0014] The user terminal is also used to receive a rollback instruction and send the rollback instruction to the server. The server is also used to replace the newly imported logic tree in the target embedded chip with the saved logic tree after receiving the rollback instruction.

[0015] A second object of the present invention is to provide an embedded software development method, comprising the following steps:

[0016] S1. Burn the pre-written logic interpretation program into the embedded chip;

[0017] S2, connecting the embedded chip to the network;

[0018] S3, select the target embedded chip that needs to be updated;

[0019] S4, obtain the written logic tree;

[0020] S5. Import the written logic tree into the target embedded chip online.

[0021] Furthermore, in step S5, the existing logic tree is first obtained from the target embedded chip and saved, and then the compiled logic tree is imported online into the target embedded chip.

[0022] Further, the method further includes: S6, determining whether a rollback instruction is received, and if a rollback instruction is received, replacing the newly imported logic tree in the target embedded chip with the saved logic tree.

[0023] Furthermore, in step S4, input data is also obtained from the target embedded chip, and the pre-stored logic interpretation program is used to parse and execute the written logic tree, and the input data is input to determine whether an operation error occurs. If no operation error occurs, the execution result is obtained and the process jumps to S5; if an operation error occurs, an error prompt is generated.

[0024] Furthermore, in step S5, it is determined whether a stop instruction is received. If the stop instruction is not received, the existing logic tree is obtained from the target embedded chip.

[0025] This solution pre-burns the logic interpretation program in the embedded chip, so that the ability of program interpretation and execution can be realized in the embedded environment. Through the cooperation of the server and the user terminal, the user can easily select and manage the target embedded chip, and can complete the writing and importing of the logic tree online, which greatly improves the flexibility of embedded system development. There is no need to perform compilation and burning operations after each program modification, which saves development time and reduces development complexity and cost. By providing a rollback function, the saved logic tree can be quickly and accurately replaced with the new logic tree in the target embedded chip, which is suitable for embedded systems that need to frequently update or adjust the logic.

[0026] In summary, this solution effectively improves the efficiency of embedded software development, reduces development costs, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 The present invention is a flow chart of an embodiment 1 of an embedded software development method. DETAILED DESCRIPTION

[0028] The following is further described in detail through specific implementation methods:

[0029] Embodiment 1

[0030] An embedded software development system, comprising: a board, a server and a user end;

[0031] The board is connected to the server and is equipped with an embedded chip; the embedded chip is pre-burned with a pre-written logic interpretation program.

[0032] The user terminal is used to obtain the target embedded chip information that needs to be updated and upload it to the server; the target embedded chip can be displayed in a list or other form for the user to directly select, and the selected one is the target embedded chip that needs to be updated. The user can also input the unique number of the embedded chip to determine it, or scan the barcode or QR code pre-printed on the board to determine it;

[0033] The user terminal is also used to provide a logic tree writing environment, obtain the written logic tree, and upload the written logic tree to the server;

[0034] The server is used to obtain input data from the target embedded chip, and obtain the existing logic tree from the target embedded chip and save it;

[0035] The server is also used to parse and execute the written logic tree through a pre-stored logic interpretation program, and input input data to determine whether a runtime error occurs. If a runtime error occurs, the import is terminated, an error prompt is generated and sent to the user terminal; if no runtime error occurs, the execution result is obtained and sent to the user terminal; the runtime error is such as a logic error, calculation overflow, etc. In this embodiment, the interpretation execution program disclosed in a program interpretation execution method (CN117389569A) previously applied is used, and the method includes a generation step: generating a logic tree; the logic tree includes one or more information of upper and lower parent-child node information, node type, parameter type, and application value type; wherein the node type includes other extensions; the parsing step: writing a logic interpretation execution program, passing the logic tree as a parameter, parsing and executing the logic tree.

[0036] The server is also used to determine whether a termination instruction is received from the user terminal. If the termination instruction is not received, the written logic tree is imported online into the target embedded chip through network communication and other means.

[0037] The user terminal is also used to receive a rollback instruction and send the rollback instruction to the server. The server is also used to replace the newly imported logic tree in the target embedded chip with the saved logic tree after receiving the rollback instruction.

[0038] like Figure 1 As shown, an embedded software development method of this embodiment includes the following steps:

[0039] S1. Burn the pre-written logic interpretation program into the embedded chip;

[0040] S2, connecting the embedded chip to the network;

[0041] S3, select the target embedded chip that needs to be updated;

[0042] S4, obtain input data from the target embedded chip; obtain the written logic tree, parse and execute the written logic tree through the pre-stored logic interpretation program, and input the input data to determine whether there is a running error. If there is no running error, obtain the execution result and jump to S5; if there is a running error, generate an error prompt. After the writing is completed, simulate the run first, you can find possible syntax errors and logic loopholes in advance, so as to repair them and ensure that the program imported into the target embedded chip is stable and reliable.

[0043] S5. Determine whether a termination instruction is received. If a termination instruction is not received, first obtain the existing logic tree from the target embedded chip and save it, and then import the written logic tree into the target embedded chip online.

[0044] S6. Determine whether a rollback instruction is received. If a rollback instruction is received, replace the newly imported logic tree in the target embedded chip with the saved logic tree. The rollback operation can be triggered when an abnormality is found to prevent system failures caused by program errors.

[0045] This solution pre-burns the logic interpretation program in the embedded chip, so that the ability of program interpretation and execution can be realized in the embedded environment, greatly improving the flexibility of the embedded system. There is no need to perform compilation and burning operations every time the program is modified, saving development time and reducing development complexity.

[0046] Through the cooperation between the server and the user terminal, users can easily select and manage the target embedded chip, and can complete the writing and importing of the logic tree online. The system also provides a complete error detection mechanism to ensure that if an operation error occurs during the execution of the logic tree, the operation can be terminated in time and the error information can be fed back, thus avoiding unnecessary system crashes or erroneous executions.

[0047] Thirdly, this solution provides a rollback function for the logic tree, ensuring that when the previous state needs to be restored, the saved logic tree can be used to quickly and accurately replace the new logic tree in the target embedded chip. This greatly enhances the fault tolerance and stability of the system and is suitable for embedded systems that need to frequently update or adjust logic.

[0048] In summary, the method and system provided by this embodiment effectively improve the efficiency and reliability of embedded software development and have broad application prospects.

[0049] Embodiment 2

[0050] The difference between this embodiment and embodiment one is that in the system of this embodiment, the server is also used to obtain the application device type information of the board, and the application device types include robots, sensors, industrial controllers, etc.; it is judged whether the application device of the board is similar to a preset type. In this embodiment, the preset type is a robot. If it does not belong to the preset type, the operation is terminated. If it belongs to the preset type, the server is also used to judge whether the current state is to modify the logic tree (that is, the target embedded chip already has a logic tree, and the logic tree in the target embedded chip needs to be replaced). If it is not to modify the logic tree, the operation is terminated.

[0051] If the logic tree is modified, the server is also used to obtain the action dimension information of the robot and the interval time from the last time the logic tree was imported to the present, and judge whether there is a modification risk according to the action dimension information and the interval time. In this embodiment, the action dimensions of the robot include one dimension, two dimensions and three dimensions. One dimension means one degree of freedom, for example, the robot can only move or adjust its position in one direction. Two dimensions means two degrees of freedom, and the robot can move in two different directions (for example, the X-axis and the Y-axis), but cannot change the height or move up and down. Three dimensions means three or more degrees of freedom, and the robot can not only move in the X-axis and Y-axis directions, but also in the Z-axis direction (up and down). In this embodiment, different action dimensions and interval time thresholds are pre-set, wherein the more dimensions, the longer the interval time threshold; if the interval time is lower than the corresponding interval time threshold, it is judged that there is a risk. For example, the interval time thresholds for one dimension, two dimensions and three dimensions are 7 days, 15 days and 30 days respectively. The shorter the interval time, the lower the possibility of exposing all problems, and the greater the possibility of risks after modification.

[0052] If there is no modification risk, the operation ends; if there is a modification risk, the server is further used to obtain the last logic tree writing time and the current logic tree writing time, and determine whether the current logic tree writing time is greater than the last logic tree writing time. If so, start the comparison mode;

[0053] The server is also used to obtain the initial digital twin model of the corresponding robot and the input data of the corresponding robot within a preset time in the comparison mode. In this embodiment, the initial digital twin model is created in advance. The logic tree of this time is written into the initial digital twin model to obtain an updated digital twin model;

[0054] Inputting the input data into the initial digital twin model and the updated digital twin model to generate working process animations of the two digital twin models;

[0055] The server is also used to play the work process animation when the written logic tree is imported online into the target embedded chip. The server estimates the online import time, determines the play time of the work process animation according to the online import time, and thus determines the play rate of the work process animation. In this embodiment, the play time of the work process animation is three times the estimated online import time. When the remaining play time of the work process animation is consistent with the estimated online import time, the import operation is performed. In other words, when the work process animation is just started to play, the background does not perform the import operation.

[0056] In the method of this embodiment, step S5 specifically includes:

[0057] S501, first obtain the existing logic tree from the target embedded chip and save it;

[0058] S502, obtaining the application device type information of the board corresponding to the target embedded chip, the application device types include robots, sensors, industrial controllers, etc.; judging whether the application device of the board is similar to a preset type, the preset type in this embodiment is a robot, if it does not belong to the preset type, jump to S507, if it belongs to the preset type, jump to S503;

[0059] S503, the server is also used to determine whether the current state is to modify the logic tree (that is, the existing logic tree of the target embedded chip is obtained, and the logic tree in the target embedded chip needs to be replaced). If it is not to modify the logic tree, jump to S507; if it is to modify the logic tree, jump to S504;

[0060] S504, obtain the robot's action dimension information and the interval time from the last time the logic tree was imported to the present, and determine whether there is a modification risk based on the action dimension information and the interval time. In this embodiment, the robot's action dimensions include one dimension, two dimensions, and three dimensions. One dimension means one degree of freedom, for example, the robot can only move or adjust its position in one direction. Two dimensions means two degrees of freedom, and the robot can move in two different directions (for example, the X-axis and the Y-axis), but cannot change its height or move up and down. Three dimensions means three or more degrees of freedom, and the robot can not only move in the X-axis and Y-axis directions, but also in the Z-axis direction (up and down). In this embodiment, different action dimensions and interval time thresholds are pre-set, where the more dimensions, the longer the interval time threshold; if the interval time is lower than the corresponding interval time threshold, it is determined that there is a risk. For example, the interval time thresholds for one dimension, two dimensions, and three dimensions are 7 days, 15 days, and 30 days, respectively. The shorter the interval time, the lower the possibility of exposing all problems, and the greater the possibility of risks after modification. If there is no modification risk, jump to S507; if there is a modification risk, jump to S505;

[0061] S505, obtain the last logic tree writing time and the current logic tree writing time, and determine whether the current logic tree writing time is greater than the last logic tree writing time. If it is less than or equal to, jump to S507; if it is greater, jump to step S506;

[0062] S506, enter the comparison mode. In the comparison mode, the server obtains the initial digital twin model of the corresponding robot and the input data of the corresponding robot within the preset time. In this embodiment, the initial digital twin model is created in advance. The logic tree of this time is written into the initial digital twin model to obtain the updated digital twin model; the input data is input into the initial digital twin model and the updated digital twin model to generate the working process animation of the two digital twin models, and jump to S508. The preset time is set according to the actual working conditions of different robots, for example, 24 hours.

[0063] S507, importing the compiled logic tree into the target embedded chip online, and ending;

[0064] S508. When the written logic tree is imported online into the target embedded chip, the working process animation is played. The server estimates the online import time, determines the play time of the working process animation according to the online import time, and thus determines the play rate of the working process animation. In this embodiment, the play time of the working process animation is three times the estimated online import time. When the remaining play time of the working process animation is consistent with the estimated online import time, the import operation is performed. In other words, when the working process animation is just started to be played, the background does not perform the import operation.

[0065] In the scheme of embodiment 1, the input data will be input into the target embedded chip before importing to obtain the execution result. The execution result is only a string of data output, which cannot intuitively display the actual operation of the device equipped with the board, especially the actual action of the robot. This solution simplifies the development process and cost, and makes it easier to adjust the logic tree. Because of this, to a certain extent, the developer's testing intensity is also reduced: there is no need to burn, if an error occurs, the developer can modify the logic tree and re-import it. For equipment such as robots, if there are bugs in the newly imported logic tree, there may be certain risks, such as damage to the device itself, or harm to the surrounding environment or staff.

[0066] In the scheme of this embodiment, for robot devices equipped with boards, the test process before the logic tree is imported is improved. When the developer modifies the logic tree, if the interval between modifications is short, it indicates that there is a high possibility that there are problems with the last logic tree. At the same time, the robot runs for a short time, and there may be other problems that have not been exposed. After modifying the logic tree, not only are there problems that are not completely fixed, but it is also easy to cause new problems. Therefore, there is a risk of modification. At this time, by comparing the writing time of this logic tree with the writing time of the last logic tree, the complexity of the modification of the logic tree can be judged. The longer the time, the more complex it is, and the more likely it is to cause new problems. If the writing time of this logic tree is greater than the writing time of the last logic tree, enter the comparison mode. Moreover, fully calling the computing power of the server is a huge resource overhead. Allocating computing power resources to developers who spend more time writing logic trees can also improve the utilization of computing power.

[0067] In the comparison mode, the solution of this embodiment can utilize the powerful computing power of the server (the computing power of the server is much higher than that of the board that executes simple logic tree commands) to input the input data into the initial digital twin model and the updated digital twin model, and simulate the working process of the initial digital twin model and the updated digital twin model in the preset time in a very short time to obtain the working process animation. The working process animation is then played as a transition animation when the logic tree is imported. Developers can intuitively compare the updated situation of the logic tree, and if there are any problems, they can be discovered more easily. Because the import operation is only executed when the remaining playback time of the working process animation is consistent with the estimated online import time, if the developer discovers the problem in advance, the import can be terminated in advance. At this time, the import operation is not actually executed, and it is easier to interrupt.

[0068] In summary, this solution can effectively simulate the working conditions of the robot before and after the logic tree is updated, help developers find problems, and improve the safety of development.

[0069] The above are only embodiments of the present invention. The invention is not limited to the fields involved in this implementation case. The common sense such as the known specific structures and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field to which the invention belongs before the application date or the priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to explain the content of the claims.

Claims

1. An embedded software development system, characterized in that: Including boards, servers and clients; The board is connected to the server and is equipped with an embedded chip; the embedded chip is pre-burned with a logic interpretation program; The user terminal is used to obtain the target embedded chip information that needs to be updated and upload it to the server; Used to provide a logic tree writing environment and obtain the written logic tree; Upload the completed logic tree to the server; The server is used to import the written logic tree into the target embedded chip.

2. The embedded software development system according to claim 1, characterized in that: The server is used to obtain input data from the target embedded chip, and is also used to parse and execute the written logic tree through a pre-stored logic interpretation program, and input the input data to determine whether a running error occurs. If a running error occurs, the import is terminated, an error prompt is generated and sent to the user terminal; If no running error occurs, the execution result is obtained and sent to the user terminal; The server is also used to determine whether a termination instruction is received from the user terminal. If the termination instruction is not received, the written logic tree is imported online into the target embedded chip.

3. The embedded software development system according to claim 2, characterized in that: The server is also used to obtain the existing logic tree from the target embedded chip and save it; The user terminal is also used to receive a rollback instruction and send the rollback instruction to the server. The server is also used to replace the newly imported logic tree in the target embedded chip with the saved logic tree after receiving the rollback instruction.

4. An embedded software development method, characterized in that: The steps include: S1. Burn the pre-written logic interpretation program into the embedded chip; S2, connecting the embedded chip to the network; S3, select the target embedded chip that needs to be updated; S4, obtain the written logic tree; S5. Import the written logic tree into the target embedded chip online.

5. The embedded software development method according to claim 4, characterized in that: In step S5, the existing logic tree is first obtained from the target embedded chip and saved, and then the compiled logic tree is imported online into the target embedded chip.

6. The embedded software development method according to claim 5, characterized in that: Also includes: S6. Determine whether a rollback instruction is received. If a rollback instruction is received, replace the newly imported logic tree in the target embedded chip with the saved logic tree.

7. The embedded software development method according to claim 6, characterized in that: In the step S4, input data is also obtained from the target embedded chip, and the pre-stored logic interpretation program is used to parse and execute the written logic tree, and the input data is input to determine whether a running error occurs. If no running error occurs, the execution result is obtained and the process jumps to S5; If there is an error during execution, an error message will be generated.

8. The embedded software development method according to claim 7, characterized in that: In step S5, it is determined whether a stop instruction is received. If the stop instruction is not received, the existing logic tree is obtained from the target embedded chip.

Citation Information

Patent Citations

  • Application program management method, mobile terminal, server and system

    CN106502714A

  • Program development method and system

    CN111913688A

  • Robot state processing method and device, computing equipment and storage medium

    CN112233208A

  • Upgrading processing method of software installation package, server and client

    CN114879993A

  • System upgrading and rollback method and system of embedded equipment based on main control chip

    CN117075950A