Embedded software development method and system

By pre-programming the logic interpreter into the embedded chip and cooperating with the server, online writing and importing of embedded software can be achieved, solving the flexibility problem of compiled execution languages ​​and improving the development efficiency and stability of embedded systems.

CN119127213BActive Publication Date: 2025-10-28CHONGQING ZHUGELIANG TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

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

Smart Images

  • Figure CN119127213B_ABST
    Figure CN119127213B_ABST
Patent Text Reader

Abstract

This invention relates to the field of software development technology, specifically disclosing an embedded software development method and system. The system includes a board, a server, and a user terminal. The board is connected to the server and carries an embedded chip. A logic interpreter is pre-programmed into the embedded chip. The user terminal is used to obtain the target embedded chip information that needs updating and upload it to the server. It provides a logic tree writing environment to obtain the completed logic tree and uploads it to the server. The server imports the completed logic tree into the target embedded chip. The technical solution of this invention only requires writing or updating the logic tree and importing it into the chip; the logic tree does not need to be programmed into the chip, thus reducing development costs and improving development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software development technology, and in particular to an embedded software development method and system. Background Technology

[0002] Currently, all compiled execution languages ​​require the source program to be compiled to generate an object file, which the computer then executes. This has the advantages 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 of the following information: parent and child node information, node type, parameter type, and application value type; wherein, the node type includes other extensions; a parsing step: writing a logic interpretation and execution program, passing the logic tree as a parameter, and parsing and executing the logic tree.

[0004] This method enables computer languages ​​that require compilation to have interpretable execution capabilities, and it has a wide range of applications. However, an embedded software development methodology and system are needed to ensure that the program interpretation and execution method can be implemented and applied in actual software development to realize its value. Summary of the Invention

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

[0006] To solve the above-mentioned technical problems, this application provides the following technical solution:

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

[0008] The board is connected to the server and has an embedded chip on it; the embedded chip has a logic interpreter program pre-programmed into it.

[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 also 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 completed logic tree into the target embedded chip.

[0011] Furthermore, the server is used to obtain input data from the target embedded chip, and also to parse and execute the completed logic tree through a pre-stored logic interpreter, input the input data, determine whether a runtime error occurs, and if a runtime error occurs, stop the import, generate an error message and send it to the user terminal; if no runtime error occurs, obtain the execution result and send the execution result to the user terminal.

[0012] The server is also used to determine whether a stop instruction has been received from the user terminal. If no stop instruction has been received, the completed logic tree will be imported online into the target embedded chip.

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

[0014] The user terminal is also used to receive rollback instructions and send them 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 instructions.

[0015] The second objective of this invention is to provide an embedded software development method, comprising the following steps:

[0016] S1. Burn a pre-written logic interpreter into the embedded chip;

[0017] S2. Connect the embedded chip to the network;

[0018] S3. Select the target embedded chip that needs to be updated;

[0019] S4. Obtain the completed logic tree;

[0020] S5. Import the completed 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 completed logic tree is imported into the target embedded chip online.

[0022] Furthermore, it also includes: S6, determining whether a rollback instruction has been received; if a rollback instruction has been 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 obtained from the target embedded chip, the pre-stored logic interpreter parses and executes the written logic tree, and inputs the input data to determine whether a running error occurs. If no running error occurs, the execution result is obtained and the process jumps to S5; if a running error occurs, an error message is generated.

[0024] Furthermore, in step S5, it is determined whether an abort instruction has been received. If no abort instruction has been received, the existing logic tree is obtained from the target embedded chip.

[0025] This solution pre-programs a logic interpreter into the embedded chip, enabling program interpretation and execution within the embedded environment. Through collaboration between the server and the user terminal, users can easily select and manage target embedded chips and complete logic tree writing and import operations online, significantly improving the flexibility of embedded system development. It eliminates the need for compilation and programming after each program modification, saving development time and reducing complexity and cost. By providing a rollback function, it allows for the quick and accurate replacement of the new logic tree in the target embedded chip with a saved logic tree, making it suitable for embedded systems requiring frequent logic updates or adjustments.

[0026] In summary, this solution effectively improves the efficiency of embedded software development, reduces development costs, and has broad application prospects. Attached Figure Description

[0027] Figure 1 This is a flowchart of an embodiment of an embedded software development method. Detailed Implementation

[0028] The following detailed description illustrates the specific implementation method:

[0029] Example 1

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

[0031] The board is connected to the server and has an embedded chip on it; the embedded chip has a pre-written logic interpreter program pre-programmed into it.

[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 the form of a list, etc., for the user to select directly. The selected chip is the target embedded chip that needs to be updated. Alternatively, the user can enter the unique number of the embedded chip or scan the barcode or QR code pre-printed on the board.

[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, as well as to obtain and save the existing logic tree from the target embedded chip;

[0035] The server is also used to parse and execute the written logic tree using a pre-stored logic interpreter, input input data, and determine whether runtime errors occur. If a runtime error occurs, the import is stopped, an error message is generated and sent to the user terminal; if no runtime error occurs, the execution result is obtained and sent to the user terminal. Runtime errors include logical errors, computational overflows, etc. In this embodiment, the interpreter disclosed in a prior application for a program interpretation and execution method (CN117389569A) is used. This method includes a generation step: generating a logic tree; the logic tree includes one or more of the following information: parent and child node information, node type, parameter type, and application value type; wherein, the node type includes other extensions; a parsing step: writing a logic interpreter and execution program, passing the logic tree as a parameter, and parsing and executing the logic tree.

[0036] The server is also used to determine whether a stop instruction has been received from the user terminal. If no stop instruction has been received, the completed logic tree will be imported online into the target embedded chip via network communication or other means.

[0037] The user terminal is also used to receive rollback instructions and send them 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 instructions.

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

[0039] S1. Burn a pre-written logic interpreter into the embedded chip;

[0040] S2. Connect 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; retrieve the completed logic tree, parse and execute the completed logic tree using a pre-stored logic interpreter, input the input data, and determine if any runtime errors occur. If no runtime errors occur, obtain the execution result and jump to S5; if runtime errors occur, generate an error message. After completion, simulate the run first to detect possible syntax errors and logical vulnerabilities in advance, thereby fixing them and ensuring the stability and reliability of the program imported into the target embedded chip.

[0043] S5. Determine whether an abort command has been received. If no abort command has been received, first obtain the existing logic tree from the target embedded chip and save it, then import the completed logic tree into the target embedded chip online.

[0044] S6. Determine if a rollback command has been received. If so, replace the newly imported logic tree in the target embedded chip with the saved logic tree. This can trigger a rollback operation when an anomaly is detected, preventing system failures due to program errors.

[0045] This solution pre-programs the logic interpreter into the embedded chip, enabling program interpretation and execution in the embedded environment, greatly improving the flexibility of the embedded system. It eliminates the need for compilation and reprogramming after each program modification, saving development time and reducing development complexity.

[0046] Through the collaborative work of the server and user terminal, users can easily select and manage target embedded chips, and complete the writing and import of logic trees online. The system also provides a complete error detection mechanism to ensure that if a runtime error occurs during logic tree execution, the operation can be stopped in time and error information can be reported, thereby avoiding unnecessary system crashes or erroneous execution.

[0047] Furthermore, this solution provides a logic tree rollback function, ensuring that when a previous state needs to be restored, the saved logic tree can be quickly and accurately replaced with the new logic tree in the target embedded chip. This greatly enhances the system's fault tolerance and stability, making it suitable for embedded systems that require frequent logic updates or adjustments.

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

[0049] Example 2

[0050] The difference between this embodiment and Embodiment 1 is that in this embodiment, the server is also used to obtain the application device type information of the board, including robots, sensors, industrial controllers, etc.; determine whether the application device of the board is similar to a preset type. In this embodiment, the preset type is robots. If it is not a preset type, the operation ends. If it is a preset type, the server is also used to determine whether the current state is to modify the logic tree (i.e., 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 ends.

[0051] If the logic tree is modified, the server also obtains the robot's motion dimension information and the interval since the last logic tree import. Based on the motion dimension information and the interval, it determines whether there is a risk of modification. In this embodiment, the robot's motion dimensions include one-dimensional, two-dimensional, and three-dimensional. One-dimensional means one degree of freedom; for example, the robot can only move or adjust its position in one direction. Two-dimensional means two degrees of freedom; the robot can move along two different directions (e.g., the X-axis and Y-axis), but cannot change its height or move up and down. Three-dimensional means three or more degrees of freedom; the robot can move not only along the X and Y axes but also along the Z-axis (up and down). In this embodiment, different motion dimensions and interval time thresholds are preset. The more dimensions, the longer the interval time threshold. If the interval time is lower than the corresponding interval time threshold, it is judged as having a risk. For example, the interval time thresholds for one-dimensional, two-dimensional, and three-dimensional 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 risk of modification, the operation ends; if there is a risk of modification, the server also obtains the writing time of the previous logic tree and the writing time of the current logic tree, and determines whether the writing time of the current logic tree is greater than the writing time of the previous logic tree. If it is greater, the comparison mode is started.

[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 period in comparison mode. In this embodiment, the initial digital twin model is created in advance. The current logic tree is written into the initial digital twin model to obtain the updated digital twin model;

[0054] Input data is fed into the initial digital twin model and the updated digital twin model to generate an animation of the working process of the two digital twin models;

[0055] The server is also used to play a workflow animation when the completed logic tree is imported online into the target embedded chip. The server estimates the online import time and determines the playback time of the workflow animation based on this time, thus determining the playback rate of the workflow animation. In this embodiment, the playback time of the workflow animation is three times the estimated online import time. When the remaining playback time of the workflow animation matches the estimated online import time, the import operation is performed. In other words, the background does not perform the import operation at the beginning of the workflow animation playback.

[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. Obtain the application device type information of the board corresponding to the target embedded chip. The application device type includes robots, sensors, industrial controllers, etc.; determine whether the application device of the board is similar to a preset type. In this embodiment, the preset type is robots. If it is not a preset type, jump to S507. If it is a preset type, jump to S503.

[0059] S503. The server is also used to determine whether the current state is to modify the logic tree (i.e., the existing logic tree of the target embedded chip has been 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 motion dimension information and the interval since the last import of the logic tree. Determine whether there is a risk of modification based on the motion dimension information and the interval. In this embodiment, the robot's motion dimensions include one-dimensional, two-dimensional, and three-dimensional. One-dimensional means one degree of freedom, for example, the robot can only move or adjust its position in one direction. Two-dimensional means two degrees of freedom, the robot can move along two different directions (e.g., the X-axis and Y-axis), but cannot change its height or move up and down. Three-dimensional means three or more degrees of freedom, the robot can move not only in the X-axis and Y-axis directions, but also in the Z-axis direction (up and down movement). In this embodiment, different motion dimensions and interval time thresholds are preset, 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-dimensional, two-dimensional, and three-dimensional 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 risk after modification. If there is no risk of modification, jump to S507; if there is a risk of modification, jump to S505.

[0061] S505. Obtain the writing time of the previous logic tree and the writing time of the current logic tree. Determine whether the writing time of the current logic tree is greater than the writing time of the previous logic tree. If it is less than or equal to, jump to S507. If it is greater, jump to step S506.

[0062] S506. Enter comparison mode. In comparison mode, the server obtains the initial digital twin model of the corresponding robot, as well as the input data of the corresponding robot within a preset time period. In this embodiment, the initial digital twin model is pre-created. The current logic tree 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 then jumps to S508. The preset time is set according to the actual working conditions of different robots, such as 24 hours.

[0063] S507. Import the completed logic tree into the target embedded chip online, and the process ends.

[0064] S508. When the completed logic tree is imported online into the target embedded chip, a workflow animation is played. The server estimates the online import time and determines the playback time of the workflow animation based on this time, thus determining the playback rate of the workflow animation. In this embodiment, the playback time of the workflow animation is three times the estimated online import time. When the remaining playback time of the workflow animation matches the estimated online import time, the import operation is performed. In other words, the background does not perform the import operation at the beginning of the workflow animation playback.

[0065] In the first embodiment, input data is fed into the target embedded chip before importing, resulting in an execution result. This result is merely a string of data output and cannot intuitively demonstrate the actual operation of the device mounted on the board, especially the actual actions of a robot. This solution simplifies the development process and reduces costs, making adjustments to the logic tree easier. Consequently, it also reduces the testing workload for developers: no flashing is required, and if errors occur, developers can simply modify the logic tree and re-import it. For devices like robots, if the newly imported logic tree contains bugs, there may be certain risks, such as damage to the device itself or harm to the surrounding environment or personnel.

[0066] In this embodiment, the testing process before importing the logic tree is improved for robot devices equipped with circuit boards. When developers modify the logic tree, short intervals between modifications indicate a high probability of problems in the previous logic tree. Furthermore, short robot operation times may conceal other unexposed issues. Modifying the logic tree not only leaves unresolved problems but also risks introducing new ones, thus posing a modification risk. By comparing the current logic tree writing time with the previous logic tree writing time, the complexity of the modification can be determined; longer times indicate greater complexity and a higher likelihood of new problems. If the current logic tree writing time is longer than the previous one, a comparison mode is entered. Moreover, fully utilizing server computing power is a significant resource overhead; allocating computing resources to developers who spend more time writing logic trees improves computing power utilization.

[0067] In the comparison mode, this embodiment leverages the powerful computing capabilities of a server (far exceeding those of boards executing simple logic tree commands) to input data into both the initial and updated digital twin models. Within a very short time, it simulates the workflow of both models over a preset period, generating an animation of the workflow. This animation is then played as a transition during logic tree import, allowing developers to visually compare the updated logic tree and more easily identify any issues. Because the import operation only occurs when the remaining playback time of the workflow animation matches the estimated online import time, developers can easily abort the import if they discover problems beforehand, as the import operation is not yet fully executed.

[0068] In summary, this solution can effectively simulate the robot's operation before and after the logic tree update, helping developers identify problems and improve development security.

[0069] The above are merely embodiments of the present invention. The invention is not limited to the fields covered by these embodiments. Commonly known structures and characteristics in the solutions are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are able to access all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. An embedded software development system, characterized in that, Includes boards, servers, and client devices; The board is connected to the server and has an embedded chip on it; the embedded chip has a logic interpreter program pre-programmed into it. 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 completed logic tree into the target embedded chip; 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 interpreter, input input data, determine whether there is a running error, and if there is a running error, stop the import, generate an error message and send it to the user terminal. If no runtime errors occur, obtain the execution results and send them to the user terminal; The server is also used to determine whether a stop instruction has been received from the user terminal. If no stop instruction has been received, the completed logic tree will be imported online into the target embedded chip. The server is also used to obtain information about the application device type of the board, including robots, sensors, and industrial controllers. The server determines whether the application device type of the board is a robot. If it is, the server also determines whether the current state is modifying the logic tree. If it is not modifying the logic tree, the operation ends. If the logic tree is modified, the server also obtains the robot's motion dimension information and the time interval since the last import of the logic tree, and judges whether there is a risk of modification based on the motion dimension information and the time interval. If there is no risk of modification, the operation ends; if there is a risk of modification, the server also obtains the writing time of the previous logic tree and the writing time of the current logic tree, and determines whether the writing time of the current logic tree is greater than the writing time of the previous logic tree. If it is greater, the comparison mode is started. The server is also used in comparison mode to obtain the initial digital twin model of the corresponding robot, as well as the input data of the corresponding robot within a preset time; input the input data into the initial digital twin model and the updated digital twin model to generate an animation of the working process of the two digital twin models; The server is also used to play a workflow animation when the completed logic tree is imported online into the target embedded chip; the server estimates the online import time, determines the playback time of the workflow animation based on the online import time, and thus determines the playback rate of the workflow animation. The playback time of the workflow animation is three times the estimated online import time. When the remaining playback time of the workflow animation is the same as the estimated online import time, the import operation is performed. The server is also used to obtain and save the existing logic tree from the target embedded chip; The user terminal is also used to receive rollback instructions and send them 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 instructions.

2. An embedded software development method, using the embedded software development system of claim 1, characterized in that, Includes the following steps: S1. Burn a pre-written logic interpreter into the embedded chip; S2. Connect the embedded chip to the network; S3. Select the target embedded chip that needs to be updated; S4. Obtain the completed logic tree; S5. Import the completed logic tree into the target embedded chip online, specifically including: S501. First, obtain the existing logic tree from the target embedded chip and save it; S502. Obtain the application device type information of the board corresponding to the target embedded chip. The application device type includes robot, sensor, and industrial controller. Determine whether the application device of the board is similar to a robot. If not, jump to S507. If yes, jump to S503. S503. The server determines whether the current state is modifying the logic tree. If it is not modifying the logic tree, it jumps to S507; if it is modifying the logic tree, it jumps to S504. S504. Obtain the robot's motion dimension information and the time interval since the last import of the logic tree. Determine whether there is a risk of modification based on the motion dimension information and the time interval. If there is no risk of modification, proceed to S507. If there is a risk of modification, proceed to S505. S505. Obtain the writing time of the previous logic tree and the writing time of the current logic tree. Determine whether the writing time of the current logic tree is greater than the writing time of the previous logic tree. If it is less than or equal to, jump to S507. If it is greater, jump to step S506. S506. Enter comparison mode. In comparison mode, the server obtains the initial digital twin model of the corresponding robot and the input data of the corresponding robot within a preset time. 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 jumps to S508. S507. Import the completed logic tree into the target embedded chip online, and the process ends. S508. When importing the completed logic tree into the target embedded chip online, play the working process animation; wherein, the server estimates the online import time, determines the playback time of the working process animation based on the online import time, and thus determines the playback rate of the working process animation.

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

4. The embedded software development method according to claim 3, characterized in that: In step S4, input data is also obtained from the target embedded chip, the pre-stored logic interpreter parses and executes the completed logic tree, and 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 an error occurs during execution, an error message will be generated.

5. The embedded software development method according to claim 4, characterized in that: In step S5, it is determined whether an abort instruction has been received. If no abort instruction has been received, the existing logic tree is obtained from the target embedded chip.

Citation Information

Patent Citations

  • Program interpretation execution method

    CN117389569A

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

    CN106502714A

  • Program development method and system

    CN111913688A

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

    CN117075950A