Unlock instant, AI-driven research and patent intelligence for your innovation.

Method, state machine and execution method for constructing multi-task and multi-branch process

A multi-branch and multi-task technology, applied in the direction of multi-programming devices, etc., can solve problems such as unfavorable work process and code structure adjustment or modification, high code analysis difficulty, and increase the degree of coupling of code modules, so as to improve understandability. and maintainability, reduce code complexity, and reduce the effect of code coupling programs

Active Publication Date: 2016-06-22
BYD CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] Every time a different multi-task and multi-branch work process is implemented, the if-else multi-level and multi-nested structure code must be rewritten, and the code reuse rate is low;
[0011] When there are more tasks and branches, the more if-else structures and their nesting will be, and the more complex the code structure will be, which will easily lead to an increase in the probability of code execution errors and high code complexity;
[0012] The combination of task code and work process control code is mixed and implemented and written, which increases the degree of coupling between code modules, which is not conducive to the adjustment or modification of work process and code structure. The degree of code coupling is high and the degree of modularization is low;
[0013] After completing the multi-task and multi-branch work process code writing, if you want to view and analyze the code, you need to view the if-else structure and its nested structure layer by layer. When there are many tasks and branches, there are many nested structures, and the code analysis is difficult. Conducive to code analysis and code maintenance
[0014] For the above problems, there is currently no better solution

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, state machine and execution method for constructing multi-task and multi-branch process
  • Method, state machine and execution method for constructing multi-task and multi-branch process
  • Method, state machine and execution method for constructing multi-task and multi-branch process

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0046] Specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention.

[0047] image 3 It is a flowchart of a method for constructing a multi-task and multi-branch process according to an embodiment of the present invention. Such as image 3 As shown, a method for constructing a multi-task and multi-branch process, the method includes: creating a plurality of work task nodes (S32); configuring a call interface (S34) for each work task node to implement a code for each work task node; Create a task output dictionary for each of the work task nodes, wherein the task output dictionary can be configured to store the mapping relationship between the output result of the work task node and the work task node corresponding to the output...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and state machine for establishing a multi-task multi-branch process and an execution method of the state machine. The method for establishing the multi-task multi-branch process comprises the following steps of: creating a plurality of work task nodes; configuring a work task for each work task node to realize a calling interface of codes; creating a task output dictionary for each work task node, wherein the task output dictionary is configured to store output results of the work task nodes and a mapping relation for the work task nodes which correspond to the output results; creating a task cooperative control object, wherein the task cooperative control object is configured to store the work task nodes; and controlling operations of the work task nodes according to the output results and the task output dictionary. Through the method and state machine for establishing the multi-task multi-branch process and the execution method of the state machine, the multi-task multi-branch work process can be established. Moreover, repeated flow establishing codes do not need to be written for each establishment, so that the code complexity is reduced.

Description

technical field [0001] The invention relates to the field of software development, in particular to a method for constructing a multi-task and multi-branch process, a state machine and an execution method. Background technique [0002] In order to realize the functionality and diversity of software, a multi-task and multi-branch software process is often used in software programming. The multi-branch operation process of multiple tasks in the software is mainly to realize the operation results and expected results between multiple software tasks and then call the control method of the corresponding next task, mainly to use the result of the previous task as the next choice. 1. Basis for work tasks. [0003] figure 1 It is an example of multi-task and multi-branch work process. To achieve as figure 1 The multi-task and multi-branch working process shown is mainly realized by using if-else branch selection statements (for example, taking C language as an example) multiple ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/46
Inventor 郑欣蔡成剑杜雷鸣陈珊瑚欧阳婧
Owner BYD CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More