A method and system for constructing and executing instructions for implementing complex industrial mechanism business

Through the segmentation of industrial work scenarios and the generation of independent algorithm libraries, online editing and hot updates are supported, which solves the redundancy and maintenance difficulties caused by the independent development of existing system functions, and achieves high flexibility and maintainability of complex Industrial mechanism business instruction construction and execution system.

CN118377471BActive Publication Date: 2024-08-27MOREWIS (XIAMEN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410824946.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-08-27
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

When existing systems implement complex industrial mechanism services, independent development of functions results in redundancy, high coupling, difficulty in maintenance, low flexibility, and inability to effectively decouple and expand.

Method used

By segmenting the industrial field work scenarios, an independent algorithm library is generated, which supports online editing and real-time effect. The instructions are composed of multiple actions and algorithms, using a modular approach to build building blocks to build functions, and combine the database and Java class loader to achieve hot update and Hot loading.

Benefits of technology

It improves the maintainability and flexibility of the system, reduces the difficulty of maintenance, realizes a low-redundant and low-coupling functional structure, and supports functional changes and hot updates and hot loading without manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118377471B
    Figure CN118377471B
Patent Text Reader

Abstract

The present invention relates to an instruction construction and execution method and system for realizing complex industrial mechanism business. Function construction and development are carried out in a modular way. Each function is composed of an instruction, and each instruction is composed of multiple actions and algorithms. Users can freely maintain the actions and algorithms of specific business attributes, and build specific functional instructions in the way of building blocks. If the process of the function changes, the actions and algorithms in the instructions can also be partially modified or added or removed to realize functional changes. As for the common parts, all functions that use the actions or algorithms can be completely changed by changing the shared actions or algorithms. In this way, the maintainability of the system functions is greatly improved, the maintenance difficulty is reduced, a low-redundancy, low-coupling functional structure is realized, and the flexibility of the system is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software development, and in particular to an instruction construction and execution method and system for realizing complex industrial mechanism business. Background Art

[0002] At present, the systems on the market often develop functions independently for the realization of field operation functions. This will result in more field operation situations, more functions need to be independently developed, and some common parts between functions cannot or are not easy to decouple. The final system will be a highly redundant, highly repetitive, difficult to maintain, and even a huge behemoth involving changes to a common thing. Even if the functions are initially decoupled, the low flexibility leads to a narrow application range and cannot be expanded. Summary of the invention

[0003] In order to solve the above problems, the purpose of the present invention is to provide an instruction construction and execution method and system for realizing complex industrial mechanism business, which improves the maintainability of system functions, reduces the maintenance difficulty, realizes a low-redundancy and low-coupling functional structure, and greatly improves the flexibility of the system.

[0004] To achieve the above object, the present invention adopts the following technical solutions:

[0005] A method for constructing and executing instructions for implementing complex industrial mechanism services comprises the following steps:

[0006] By segmenting the work scenarios in the industrial field, an independent algorithm library of segmented actions is generated, including algorithm models, actions, instructions and instruction sets;

[0007] Algorithm models and actions are maintained independently, supporting online editing of algorithms and actions and taking effect in real time;

[0008] An instruction is the smallest unit that completes a functional logic. Multiple instructions build a huge functional system, which is regarded as an instruction set.

[0009] Each instruction consists of multiple actions and algorithms. One or more actions are selected in order in the instruction, and one or more algorithms are selected in order in each action. When the instruction is executed, the actions and algorithms will be executed in order. If no exit instruction is received, after the instruction is executed, it will continue to execute in order from the first action, and repeat in this cycle.

[0010] When applied, the algorithm builder platform integrates independent algorithm libraries into complete business functions in a building block manner according to user needs.

[0011] Furthermore, each action in the instruction includes different process control attributes, as follows:

[0012] Action Type: used to configure the category of the current action, including the last action and exit command. When the action is the last action, the current action will automatically clean up the execution cache in the command and wait for the execution of subsequent actions. When the action is an exit command, after the current action is completed, it will not wait for the execution of subsequent actions and exit and end the current command.

[0013] Parameter saving mode: used to control the saving mode of parameters generated during the execution of the current action, including instruction set, instruction, loop to last action, and last action, which represent three parameter cache areas; when the parameter saving mode is instruction set, the action parameters will be stored in the instruction set parameter area; when the parameter saving mode is instruction, the action parameters will be stored in the instruction parameter area; when the parameter saving mode is last action or loop to last action, the action parameters will be stored in the last action parameter area;

[0014] Branch action: used to control the action jump after the action in the instruction is executed abnormally. The branch action can select any action in the current instruction; when the current action fails or an exception occurs, it will automatically jump to the set branch action to continue execution;

[0015] Action operation flow code: The action corresponding to the action flow code comes from the action in the current instruction; set multiple action flow codes and execute the specified action according to the flow code returned after the action is completed.

[0016] Furthermore, when the application is applied, according to user needs, it is integrated into a complete business function in a building block manner based on an independent algorithm library, as follows: an operation request is initiated to the algorithm builder platform through a smart terminal or manual PDA device, and the platform is told to execute a certain instruction logic by transmitting an instruction code. The platform will then retrieve instruction-related information through the instruction code and execute it in sequence according to the execution actions of the instruction.

[0017] Furthermore, after receiving the notification of the execution instruction, the first action of the specified instruction will be automatically executed. After the action is executed, it is determined whether there is an exception in the execution of this action. If no exception occurs, it is determined whether the return result contains a process code, and the action jumps according to the process code; if an exception occurs, it is determined whether the current action has a branch action set, and jumps to the branch action to execute the action content; if multiple actions are configured in the instruction, the configured actions will be executed in sequence, and each action will be checked for execution success / failure, process code and branch action to achieve customized action process control; and after each action is executed, the instruction parameters will be processed according to the type of action and the parameter storage method.

[0018] Furthermore, based on database functions and Java class loaders, hot update and hot loading are implemented after online editing of the algorithm, as follows:

[0019] By using the database programming language to write the execution logic, the algorithm builder platform provides a logic editor for stored procedures. In the editor, the execution logic is written in the database programming language. After saving, the algorithm builder platform communicates with the database and automatically writes it into the database execution logic, which takes effect in real time.

[0020] The algorithm builder platform also has an online editor for Java language. Java language is used to write logic in the programmer. After saving, the platform will automatically generate class source code files and automatically call the Java language class loader to load the source code files and generate the latest executable class in the running memory to replace the original old class.

[0021] An instruction building and execution system for implementing complex industrial mechanism business, including an algorithm builder platform and an independent algorithm library;

[0022] By segmenting the work scenarios in the industrial field, an independent algorithm library of segmented actions is generated, including algorithm models, actions, instructions and instruction sets;

[0023] Algorithm models and actions are maintained independently, supporting online editing of algorithms and actions and taking effect in real time;

[0024] An instruction is the smallest unit that completes a functional logic. Multiple instructions build a huge functional system, which is regarded as an instruction set.

[0025] Each instruction consists of multiple actions and algorithms. One or more actions are selected in order in the instruction, and one or more algorithms are selected in order in each action. When the instruction is executed, the actions and algorithms will be executed in order. If no exit instruction is received, after the instruction is executed, it will continue to execute in order from the first action, and repeat in this cycle.

[0026] When applied, the algorithm builder platform integrates independent algorithm libraries into complete business functions in a building block manner according to user needs.

[0027] The present invention has the following beneficial effects:

[0028] 1. The present invention develops functions in a modular way. Each function consists of an instruction, and each instruction consists of multiple actions and algorithms. Users can freely maintain actions and algorithms of specific business attributes, and build specific functional instructions in a building block manner. If the process of the function changes, the actions and algorithms in the instructions can also be partially modified or added or removed to achieve functional changes. When it comes to common parts, all functions that use the action or algorithm can be completely changed by simply changing the shared action or algorithm. In this way, the maintainability of the system function is greatly improved, the difficulty of maintenance is reduced, a low-redundancy, low-coupling functional structure is achieved, and the flexibility of the system is greatly improved;

[0029] 2. The present invention implements hot update and hot loading after online editing of the algorithm based on database functions and Java class loaders, and can realize hot update and hot loading without manual intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of a hot loading and hot execution process in an embodiment of the present invention;

[0031] Figure 2-4 FIG. 1 is a schematic diagram of the algorithm instruction execution logic in one embodiment of the present invention, wherein Figure 2 For the logical starting diagram, if it is a business instruction, connect Figure 4 If it is not a business instruction, connect Figure 3 . DETAILED DESCRIPTION

[0032] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0033] refer to Figure 1 The present invention provides a method for constructing and executing instructions for implementing complex industrial mechanism services, comprising the following steps:

[0034] By segmenting the work scenarios in the industrial field, an independent algorithm library of segmented actions is generated, including algorithm models, actions, instructions and instruction sets;

[0035] Algorithm models and actions are maintained independently, supporting online editing of algorithms and actions and taking effect in real time;

[0036] An instruction is the smallest unit that completes a functional logic. Multiple instructions build a huge functional system, which is regarded as an instruction set.

[0037] Each instruction consists of multiple actions and algorithms. One or more actions are selected in order in the instruction, and one or more algorithms are selected in order in each action. When the instruction is executed, the actions and algorithms will be executed in order. If no exit instruction is received, after the instruction is executed, it will continue to execute in order from the first action, and repeat in this cycle.

[0038] When applied, the algorithm builder platform integrates independent algorithm libraries into complete business functions in a building block manner according to user needs.

[0039] In this embodiment, each action in the instruction includes different process control attributes, as follows:

[0040] Action Type: used to configure the category of the current action, including the last action and exit command. When the action is the last action, the current action will automatically clean up the execution cache in the command and wait for the execution of subsequent actions. When the action is an exit command, after the current action is completed, it will not wait for the execution of subsequent actions and exit and end the current command.

[0041] Parameter saving mode: used to control the saving mode of the parameters generated during the execution of the current action (the parameters act on the entire instruction range), including four types: instruction set, instruction, loop to last action, and last action, indicating three parameter cache areas (loop to last action and last action share the same area); when the parameter saving mode is instruction set, the action parameters will be stored in the instruction set parameter area (the parameter can be used within the entire instruction set); when the parameter saving mode is instruction, the action parameters will be stored in the instruction parameter area (the parameter can be used within the entire instruction range); when the parameter saving mode is last action or loop to last action, the action parameters will be stored in the last action parameter area (the parameter set of the last action will be used in the specified logic);

[0042] Branch action: used to control the action jump after the action in the instruction is executed abnormally. The branch action can select any action in the current instruction (except the current action); when the current action fails or is abnormal, it will automatically jump to the set branch action to continue execution;

[0043] Action operation flow code: (Each action may return a completion flow code after execution) The action corresponding to the action flow code comes from the action in the current instruction (except the current action), but the action flow code is used after the action is successfully executed; set multiple action flow codes (such as: 001 corresponds to action A, 002 corresponds to action B), and execute the specified action according to the flow code returned after the action is completed (such as: return 002, then it will automatically jump to action B to continue execution).

[0044] refer to Figure 2-4 In this embodiment, when applied, according to user needs, it is integrated into a complete business function in a building block manner based on an independent algorithm library, as follows: an operation request is initiated to the algorithm builder platform through an intelligent terminal or manual PDA device, and the platform is told to execute a certain instruction logic by transmitting an instruction code. The platform will then retrieve the instruction-related information through the instruction code and execute it in sequence according to the execution actions of the instruction.

[0045] In this embodiment, after receiving the notification of the execution instruction, the first action of the specified instruction will be automatically executed. After the action is executed, it is determined whether there is an exception in the execution of this action. If no exception occurs, it is determined whether the return result contains a process code, and the action jump is performed according to the process code; if an exception occurs, it is determined whether the current action has a branch action set, and jumps to the branch action to execute the action content; if multiple actions are configured in the instruction, the configured actions will be executed in sequence, and each action will be checked for execution success / failure, process code and branch action to achieve customized action process control; and after each action is executed, the instruction parameters will be processed according to the action type and parameter storage method.

[0046] In this embodiment, hot update and hot loading after online editing of the algorithm are realized based on database functions and Java class loader, as follows:

[0047] By using the database programming language to write the execution logic, the algorithm builder platform provides a logic editor for stored procedures. In the editor, the execution logic is written in the database programming language. After saving, the algorithm builder platform communicates with the database and automatically writes it into the database execution logic, which takes effect in real time.

[0048] The algorithm builder platform also has an online editor for Java language. When you use Java language to write logic in the programmer, after saving, the platform will automatically generate a class source code file and automatically call the Java language class loader to load the source code file and generate the latest executable class in the running memory to replace the original old class. This allows hot updates and hot loading without manual intervention.

[0049] An instruction building and execution system for implementing complex industrial mechanism business, including an algorithm builder platform and an independent algorithm library;

[0050] By segmenting the work scenarios in the industrial field, an independent algorithm library of segmented actions is generated, including algorithm models, actions, instructions and instruction sets;

[0051] Algorithm models and actions are maintained independently, supporting online editing of algorithms and actions and taking effect in real time;

[0052] An instruction is the smallest unit that completes a functional logic. Multiple instructions build a huge functional system, which is regarded as an instruction set.

[0053] Each instruction consists of multiple actions and algorithms. One or more actions are selected in order in the instruction, and one or more algorithms are selected in order in each action. When the instruction is executed, the actions and algorithms will be executed in order. If no exit instruction is received, after the instruction is executed, it will continue to execute in order from the first action, and repeat in this cycle.

[0054] When applied, the algorithm builder platform integrates independent algorithm libraries into complete business functions in a building block manner according to user needs.

[0055] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0056] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0057] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0059] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

Claims

1. A method for constructing and executing instructions for implementing complex industrial mechanism services, characterized in that: The following steps are involved: By segmenting the work scenarios in the industrial field, an independent algorithm library of segmented actions is generated, including algorithm models, actions, instructions and instruction sets; Algorithm models and actions are maintained independently, supporting online editing of algorithms and actions and taking effect in real time; An instruction is the smallest unit that completes a functional logic. Multiple instructions build a huge functional system, which is regarded as an instruction set. Each instruction consists of multiple actions and algorithms. One or more actions are selected in order in the instruction, and one or more algorithms are selected in order in each action. When the instruction is executed, the actions and algorithms will be executed in order. If no exit instruction is received, after the instruction is executed, it will continue to execute in order from the first action, and repeat in this cycle. When applied, the algorithm builder platform integrates independent algorithm libraries into complete business functions in a building block manner according to user needs; Each action in the instruction includes different flow control attributes, as follows: Action Type: used to configure the category of the current action, including the last action and exit command. When the action is the last action, the current action will automatically clean up the execution cache in the command and wait for the execution of subsequent actions. When the action is an exit command, after the current action is completed, it will not wait for the execution of subsequent actions and will exit and end the current command. Parameter saving mode: used to control the saving mode of parameters generated during the execution of the current action, including four types: instruction set, instruction, loop to last action, and last action. There are three parameter cache areas. When the parameter saving mode is instruction set, the action parameters will be stored in the instruction set parameter area; when the parameter saving mode is instruction, the action parameters will be stored in the instruction parameter area; when the parameter saving mode is last action or loop to last action, the action parameters will be stored in the last action parameter area. Branch action: used to control the action jump after the action in the instruction is executed abnormally. The branch action selects any action in the current instruction. When the current action fails or is abnormal, it will automatically jump to the set branch action to continue execution. Action operation flow code: The action corresponding to the action operation flow code comes from the action in the current instruction; set multiple action operation flow codes, and execute the specified action according to the action operation flow code returned after the action is completed; When the application is described, the algorithm builder platform integrates into a complete business function in a building block manner based on the independent algorithm library according to user needs, specifically as follows: an operation request is initiated to the algorithm builder platform through an intelligent terminal or a handheld PDA device, and the algorithm builder platform is told to execute a certain instruction logic currently by transmitting an instruction code, and then the algorithm builder platform will retrieve the instruction-related information through the instruction code and execute it in sequence according to the execution action of the instruction; After receiving the notification of executing the instruction, the first action of the specified instruction will be automatically executed. After the action is executed, it is determined whether there is an exception in the execution of this action. If there is no exception, it is determined whether the returned result contains the action operation process code, and the action jump is performed according to the action operation process code; If an exception occurs, determine whether the current action has a branch action set, and jump to the branch action to execute the action content; if multiple actions are configured in the instruction, the configured actions will be executed in sequence, and each action will be checked for success / failure, action operation flow code and branch action to achieve customized action flow control; and after each action is executed, the instruction parameters will be processed according to the type of action and the parameter storage method.

2. According to claim 1, a method for constructing and executing instructions for implementing complex industrial mechanism services is characterized in that: Based on database functions and Java class loader implementation algorithm, hot update and hot loading after online editing are as follows: By using the database programming language to write the execution logic, the algorithm builder platform provides a logic editor for stored procedures. In the logic editor, the execution logic is written using the database programming language. After saving, the algorithm builder platform communicates with the database and is automatically written into the database execution logic, which takes effect in real time. The algorithm builder platform also has an online editor for Java language. Java language is used in the online editor for logic writing. After saving, the algorithm builder platform will automatically generate class source code files and automatically call the Java language class loader to load the source code files and generate the latest executable class in the running memory to replace the original old class.

3. A command construction and execution system for implementing complex industrial mechanism business, characterized in that: Includes an algorithm builder platform and a standalone algorithm library; By segmenting the work scenarios in the industrial field, an independent algorithm library of segmented actions is generated, including algorithm models, actions, instructions and instruction sets; Algorithm models and actions are maintained independently, supporting online editing of algorithms and actions and taking effect in real time; An instruction is the smallest unit that completes a functional logic. Multiple instructions build a huge functional system, which is regarded as an instruction set. Each instruction consists of multiple actions and algorithms. One or more actions are selected in order in the instruction, and one or more algorithms are selected in order in each action. When the instruction is executed, the actions and algorithms will be executed in order. If no exit instruction is received, after the instruction is executed, it will continue to execute in order from the first action, and repeat in this cycle. When applied, the algorithm builder platform integrates independent algorithm libraries into complete business functions in a building block manner according to user needs; Each action in the instruction includes different flow control attributes, as follows: Action Type: used to configure the category of the current action, including the last action and exit command. When the action is the last action, the current action will automatically clean up the execution cache in the command and wait for the execution of subsequent actions. When the action is an exit command, after the current action is completed, it will not wait for the execution of subsequent actions and will exit and end the current command. Parameter saving mode: used to control the saving mode of parameters generated during the execution of the current action, including four types: instruction set, instruction, loop to last action, and last action. There are three parameter cache areas. When the parameter saving mode is instruction set, the action parameters will be stored in the instruction set parameter area; when the parameter saving mode is instruction, the action parameters will be stored in the instruction parameter area; when the parameter saving mode is last action or loop to last action, the action parameters will be stored in the last action parameter area. Branch action: used to control the action jump after the action in the instruction is executed abnormally. The branch action selects any action in the current instruction. When the current action fails or is abnormal, it will automatically jump to the set branch action to continue execution. Action operation flow code: The action corresponding to the action operation flow code comes from the action in the current instruction; set multiple action operation flow codes, and execute the specified action according to the action operation flow code returned after the action is completed; When the application is described, the algorithm builder platform integrates into a complete business function in a building block manner based on the independent algorithm library according to user needs, specifically as follows: an operation request is initiated to the algorithm builder platform through an intelligent terminal or a handheld PDA device, and the algorithm builder platform is told to execute a certain instruction logic currently by transmitting an instruction code, and then the algorithm builder platform will retrieve the instruction-related information through the instruction code and execute it in sequence according to the execution action of the instruction; After receiving the notification of executing the instruction, the first action of the specified instruction will be automatically executed. After the action is executed, it is determined whether there is an exception in the execution of this action. If there is no exception, it is determined whether the returned result contains the action operation process code, and the action jump is performed according to the action operation process code; If an exception occurs, determine whether the current action has a branch action set, and jump to the branch action to execute the action content; if multiple actions are configured in the instruction, the configured actions will be executed in sequence, and each action will be checked for success / failure, action operation flow code and branch action to achieve customized action flow control; and after each action is executed, the instruction parameters will be processed according to the type of action and the parameter storage method.