Method for carrying out personalized control on resource compact type equipment based on graphical interface and byte codes

By using graphical interface and bytecode on a compact embedded device, the problem of complex writing of user personalized control logic and large resource occupancy is solved, and the execution of personalized control logic is achieved efficient and compatible.

CN119806695APending Publication Date: 2025-04-11CHENGDU JIQU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411609709.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The prior art is difficult to implement user personalized control logic on a resource-compact embedded device, and the existing methods have problems such as high programming complexity, poor compatibility, large resource usage and difficulty in debugging.

Method used

Using a method based on graphical interface and bytecode, control logic is written on a graphical program, code is generated, and compiled into bytecode through a bytecode compiler, transmitted to an electronic device, and the control logic is run by the bytecode interpreter.

Benefits of technology

It enables users to write control logic for terminal devices without programming knowledge, improves compatibility and efficiency, and reduces resource occupation and debugging difficulties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806695A_ABST
    Figure CN119806695A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of bytecodes, and discloses a method for carrying out personalized control on resource compact equipment based on a graphical interface and bytecodes, so that a user can write control logic for terminal equipment without programming knowledge or in a mode of using low codes. A control terminal device can automatically execute various tasks including but not limited to monitoring, warning, production and the like according to the expectation of a user, and the method comprises the following steps: 1) the user compiles control logic on a graphical program to generate a code; the method comprises the steps of (1) establishing a graphical program, (2) compiling codes into byte codes by the graphical program through a byte code compiler, (3) transmitting the byte codes to electronic equipment through a communication medium by the graphical program, receiving and persistently storing the byte codes by the electronic equipment, and (4) running control logic by the electronic equipment through a byte code interpreter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to automation control, computer technology, and in particular to the field of computer bytecodes. Specifically, the present invention relates to a method for carrying out personalized control of resource compact equipment based on a graphical interface and bytecodes. Background Art

[0002] To achieve personalized control of the logic of resource-compact embedded terminal devices by users, it is usually necessary for users to compile new embedded computer programs and download them to the device or to build a script interpreter into the terminal device firmware so that users can write scripts to achieve logic control.

[0003] If users are allowed to compile new embedded computer programs and download them to the device, they need to obtain complete compilation tools and source code from the manufacturer and modify the source code to implement their own personalized control logic. This requires the manufacturer to open the source code, which is not appropriate from the perspective of device security and intellectual property protection. In addition, the source code depends on running on a specific platform and has poor compatibility.

[0004] If a script interpreter is built into the terminal device firmware so that users can write scripts to implement logic control, for resource-compact embedded devices, the script interpreter will take up a lot of RAM and storage space, consume a lot of computing resources, and may affect the operation of other programs on the device. Most script languages ​​are interpreted and executed. If the user writes an incorrect script code, the error can only be discovered after the user downloads the script to the terminal device and runs it, which is not conducive to debugging. Summary of the invention

[0005] The purpose of the present invention is to provide a method for personalized control of resource-compact devices based on a graphical interface and bytecode, so that users can write control logic for terminal devices without programming knowledge or using a low-code approach, so that the controlled terminal devices can automatically perform various tasks including but not limited to monitoring, alarm, production, etc. according to user expectations.

[0006] The present invention is implemented by the following technical solution: A method for personalized control of a resource compact device based on a graphical interface and bytecode, comprising the following steps: 1) The user writes control logic and generates code in a graphical program; 2) The graphical program is compiled into bytecode by a bytecode compiler; 3) The graphical program transmits the bytecode to an electronic device via a communication medium, and the electronic device receives and permanently stores the bytecode; 4) The electronic device runs the control logic through a bytecode interpreter.

[0007] In order to further better realize the method of personalized control of resource compact devices based on a graphical interface and bytecode described in the present invention, the following setting is particularly adopted: the graphical program described in step 1) contains pre-designed controls, so that users can edit control logic through a graphical interface; the graphical program described in step 1) can convert the control logic in the graphical interface into a readable code; the graphical program described in step 1) runs on a personal computer with a display or an interactive terminal. The user uses a graphical program to write logic using a visual interface and generates a readable intermediate language code. The graphical program is hereinafter referred to as a user logic editor. For users, the user logic editor can be used to control any hardware platform compatible with a bytecode interpreter without having to master professional computer knowledge and hardware platform characteristics. The user logic editor can convert the user-edited logic into a binary format and merge and package it with the bytecode, so that the user logic editor can restore the user logic from the bytecode.

[0008] In order to further better implement the method of personalized control of resource-compact devices based on a graphical interface and bytecode described in the present invention, the following setting method is particularly adopted: the bytecode compiled by the bytecode compiler described in step 2) should include metadata; the metadata is the binary serialization form of the control logic edited by the user in step 1), so that the graphical program can restore the control logic from the bytecode; the bytecode compiled by the bytecode compiler described in step 2) should include operating parameters; the operating parameters include the triggering conditions and input parameters of the bytecode logic operation.

[0009] The bytecode compiler is a computer program that converts the user logic editor code into bytecode that can be recognized by the bytecode interpreter. The bytecode compiler (computer program) uses recursive descent to analyze the intermediate language code to generate a syntax tree, and converts it into binary instructions, and finally generates a series of binary instruction sequences with a logical order, namely bytecode.

[0010] In order to further better implement the method of personalized control of resource-compact devices based on a graphical interface and bytecode described in the present invention, the following setting method is particularly adopted: the bytecode interpreter described in step 4) can convert the bytecode generated by the bytecode compiler described in step 2) into machine code, so that the bytecode can run on the electronic device.

[0011] To further better implement the method of the present invention for personalized control of resource compact devices based on a graphical interface and bytecode, the following setting is particularly adopted: the user logic editor sends the bytecode and metadata to the electronic device via a USB or serial port.

[0012] In order to better implement the method of personalized control of resource compact devices based on a graphical interface and bytecode described in the present invention, the following setting is particularly adopted: the bytecode interpreter is a computer program that simulates the operating logic of computer hardware.

[0013] The bytecode compiler described in step 2) can simultaneously generate multiple bytecode subroutines bound to different trigger conditions.

[0014] The bytecode interpreter described in step 4) has the following operation steps: 4.1) Initialization: During initialization, the bytecode interpreter will separate the different bytecode subroutines and their running parameters in the bytecode and strip the metadata; 4.2) Link Binding and Saving Trigger Conditions: In the link binding stage, the bytecode interpreter binds the bytecode subprogram to the event interface provided by the controlled electronic device platform according to the running parameters of each bytecode subprogram; 4.3) Interpretation and execution: When a subroutine meets the triggering condition, the bytecode interpreter will enter the interpretation and execution stage. The bytecode interpreter will take out the bytecode subroutine command and translate it into machine code, which will be provided to the electronic device hardware for execution; 4.4) Garbage Collection: Finally, the bytecode interpreter enters the garbage collection phase to recycle the memory occupied by the data generated when the bytecode is running; after the garbage collection is completed, the bytecode interpreter will start waiting for the next trigger.

[0015] In order to better implement the method of the present invention for personalized control of resource compact devices based on a graphical interface and bytecode, the following setting is particularly adopted: the bytecode interpreter described in step 4) translates the bytecode for execution only when the trigger condition is met.

[0016] In order to better implement the method of the present invention for personalized control of resource compact devices based on a graphical interface and bytecode, the following setting is particularly adopted: a bytecode interpreter described in step 4) can execute different subroutines according to trigger conditions.

[0017] In order to better implement the method of the present invention for personalized control of resource-compact devices based on a graphical interface and bytecode, the following setting is particularly adopted: the electronic device in step 3) has a memory that can persist data.

[0018] To further better implement the method of the present invention for personalized control of resource compact devices based on a graphical interface and bytecode, the following setting is particularly adopted: the electronic device in step 3) has a communication medium with the outside world. The communication medium is a USB and a serial port.

[0019] Compared with the prior art, the present invention has the following advantages and beneficial effects: (1) If users want to configure their own logic for electronic devices, the advantages of using bytecode over directly generating machine code are: 1. Better compatibility. Bytecode is based on software and does not depend on specific hardware, making it easy to port. Machine code can only run on specific hardware platforms.

[0020] 2. Easy to use. Traditional compilation tools are usually extremely cumbersome to use and require a lot of knowledge about programming languages ​​and hardware platforms, while the user logic editor uses a graphical interface to generate intermediate language code without the need for professional computer knowledge.

[0021] 3. Simplify the development process. Users only need to write new control logic in the logic editor and send it to the controlled device, and devices on different hardware platforms can use the same bytecode.

[0022] (2) If users want to configure their own logic for electronic devices, the advantages of using bytecode over directly generating machine code are: 1. Higher efficiency. In terms of time efficiency, the script language interpreter directly saves the original script code, compiles the code to generate machine code for execution at runtime, and must recompile the code for each execution. The bytecode has been preliminarily compiled, and the bytecode interpreter does not need to analyze the syntax and logic to execute the bytecode, but only needs to translate the bytecode instructions into machine code instructions. In terms of space efficiency, bytecode uses binary storage, while script languages ​​use string storage. Compared with the intermediate language code before compilation, bytecode can save 40% - 60% of storage space without metadata.

[0023] 2. More stable. The script language is compiled at runtime, so compilation errors cannot be found before the script language is run. However, compilation errors can be found when the bytecode is compiled in the intermediate language code. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 The figure is a flow chart of the method for performing personalized control on a resource compact device based on a graphical interface and bytecode according to the present invention.

[0025] Figure 2 The bytecode interpreter of the present invention runs the flow chart. DETAILED DESCRIPTION

[0026] The present invention is further described in detail below in conjunction with examples, but the embodiments of the present invention are not limited thereto.

[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention.

[0028] It should be noted that similar numbers and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. At the same time, in the description of this application, relational terms such as "first", "second", etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.

[0029] In the description of the present invention, it is necessary to understand that the orientation or positional relationship indicated by terms, etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0030] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, and the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0031] In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can also be an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0032] The electronic device may be a device including a circuit or device of a semiconductor device, such as a mobile phone, a computer, a television, a communication device, a communication device, etc. The electronic device provided in the embodiment of the present application has the same implementation principle and technical effects as the following high data flow transmission interface structure circuit embodiment. For the sake of brief description, for any part not mentioned in the electronic device embodiment, reference may be made to the corresponding content in the high data flow transmission interface structure circuit embodiment.

[0033] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0034] Alternatively, the present invention may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the present invention may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part.

[0035] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, principle, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, principle, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, principle, article or device including the elements.

[0036] Ordinary computer programs need to be compiled to convert the code into machine code before they can be recognized by the computer. The code usually follows a certain syntax and is written in a language that can be read by humans, while the machine code consists of binary instructions that can be recognized by special computer hardware and is usually difficult to read. The machine codes of different computer hardware cannot communicate with each other. If you need to run the same program on different computer hardware, you need to use a dedicated compilation tool to recompile it and generate machine code dedicated to a specific platform.

[0037] Bytecode consists of a series of binary instruction sequences, operating parameters, and additional metadata. Unlike machine code, bytecode is not targeted at any set of hardware, but runs in a bytecode interpreter. The user generates code generated in a custom language (hereinafter referred to as intermediate language code) through the user logic editor. The user logic editor will then convert the intermediate language code into bytecode through the bytecode compiler and transmit it to the controlled device. The bytecode interpreter on the controlled device will run the bytecode to implement the logic required by the user.

[0038] Embodiment 1: The present invention designs a method for personalized control of resource compact devices based on a graphical interface and bytecode, comprising the following steps: 1) The user writes control logic and generates code in a graphical program; 2) The graphical program is compiled into bytecode by a bytecode compiler; 3) The graphical program transmits the bytecode to an electronic device via a communication medium (generally a serial port or USB), and the electronic device receives and permanently stores the bytecode; 4) The electronic device runs the control logic through a bytecode interpreter.

[0039] Embodiment 2: This embodiment is further optimized on the basis of the above embodiment, and the similarities with the above technical solutions are not repeated here. In order to better realize the method of personalized control of resource compact devices based on graphical interface and bytecode described in the present invention, the following setting mode is particularly adopted: the graphical program described in step 1) contains pre-designed controls, so that users can edit control logic through the graphical interface; the graphical program described in step 1) can convert the control logic in the graphical interface into a code that can be read; the graphical program described in step 1) runs on a personal computer with a display or an interactive terminal. The user uses a graphical program to write logic using a visual interface and generates a readable intermediate language code. The graphical program is hereinafter referred to as the user logic editor. For users, the user logic editor can be used to control any hardware platform compatible with the bytecode interpreter without mastering professional computer knowledge and hardware platform characteristics. The user logic editor can convert the user-edited logic into a binary format and merge and package it with the bytecode, so that the user logic editor can recover the user logic from the bytecode.

[0040] Embodiment 3: This embodiment is further optimized on the basis of any of the above embodiments, and the similarities with the above technical solutions are not repeated here. In order to better realize the method of personalized control of resource-compact devices based on a graphical interface and bytecode described in the present invention, the following setting method is particularly adopted: the bytecode compiled by a bytecode compiler described in step 2) should include metadata; the metadata is the binary serialization form of the control logic edited by the user in step 1), so that the graphical program can restore the control logic from the bytecode; the bytecode compiled by a bytecode compiler described in step 2) should include operating parameters; the operating parameters include the trigger conditions and input parameters for the bytecode logic operation.

[0041] The bytecode compiler is a computer program that converts the user logic editor code into bytecode that can be recognized by the bytecode interpreter. The bytecode compiler (computer program) uses recursive descent to analyze the intermediate language code to generate a syntax tree, and converts it into binary instructions, and finally generates a series of binary instruction sequences with a logical order, namely bytecode.

[0042] Embodiment 4: This embodiment is further optimized on the basis of any of the above embodiments, and the similarities with the above technical solutions are not repeated here. In order to better realize the method of personalized control of resource-compact devices based on a graphical interface and bytecode described in the present invention, the following setting method is particularly adopted: a bytecode interpreter described in step 4) can convert the bytecode generated by a bytecode compiler described in step 2) into machine code, so that the bytecode can run on an electronic device.

[0043] Embodiment 5: This embodiment is further optimized on the basis of any of the above embodiments, and the similarities with the above technical solutions are not repeated here. In order to better realize the method of personalized control of resource compact devices based on a graphical interface and bytecode described in the present invention, the following setting method is particularly adopted: the bytecode compiler executes the bytecode only when the trigger condition set by the user is met to save hardware resources. The bytecode compiler can include multiple subroutines with different trigger conditions in a single bytecode program, and the bytecode interpreter can execute different subroutines according to the trigger condition.

[0044] Embodiment 6: This embodiment is further optimized on the basis of any of the above embodiments, and the similarities with the above technical solutions are not repeated here. In order to better realize the method of personalized control of resource compact devices based on a graphical interface and bytecode described in the present invention, the following setting method is particularly adopted: the user logic editor will send the bytecode and metadata to the electronic device via USB or serial port.

[0045] Embodiment 7: This embodiment is further optimized on the basis of any of the above embodiments, and the similarities with the above technical solutions are not repeated here. In order to better realize the method of personalized control of resource-compact devices based on a graphical interface and bytecode described in the present invention, the following setting method is particularly adopted: the bytecode interpreter is a special computer program that simulates the operating logic of computer hardware and runs on the hardware of the electronic device; it is usually integrated in the firmware (hardware) of the electronic device, but does not depend on any specific hardware, so that any electronic device that has been transplanted with the bytecode interpreter can run the same set of bytecodes without recompilation.

[0046] The bytecode compiler described in step 2) can simultaneously generate multiple bytecode subroutines bound to different trigger conditions.

[0047] And the bytecode interpreter described in step 4) has the following running steps: 4.1) Initialization: During initialization, the bytecode interpreter will separate the different bytecode subroutines and their running parameters in the bytecode and strip the metadata; 4.2) Link Binding and Saving Trigger Conditions: In the link binding stage, the bytecode interpreter binds the bytecode subprogram to the event interface provided by the controlled electronic device platform according to the running parameters of each bytecode subprogram; 4.3) Interpretation and execution: When a subroutine meets the triggering condition, the bytecode interpreter will enter the interpretation and execution stage. The bytecode interpreter will take out the bytecode subroutine command and translate it into machine code, which will be provided to the electronic device hardware for execution; 4.4) Garbage Collection: Finally, the bytecode interpreter enters the garbage collection phase to recycle the memory occupied by the data generated when the bytecode is running; after the garbage collection is completed, the bytecode interpreter will start waiting for the next trigger.

[0048] Embodiment 8: This embodiment is further optimized on the basis of any of the above embodiments, and the similarities with the above technical solutions are not repeated here. In order to better realize the method of personalized control of resource-compact devices based on a graphical interface and bytecode described in the present invention, the following setting method is particularly adopted: the bytecode interpreter described in step 4) only translates the bytecode for execution when the trigger condition is met.

[0049] The bytecode compiler described in step 2) can simultaneously generate multiple bytecode subroutines bound to different trigger conditions.

[0050] A bytecode interpreter described in step 4) can execute different bytecode subroutines according to trigger conditions.

[0051] The electronic device described in step 3) has a memory capable of storing data persistently.

[0052] The electronic device described in step 3) has a communication medium with the outside world.

[0053] The communication media are USB and serial port.

[0054] Embodiment 9: Combination Figure 1 As shown, a method for personalized control of a resource compact device based on a graphical interface and bytecode includes the following steps: 1. Generate intermediate language code through the user logic editor: Users edit the control logic through the graphical interface on the user logic editor.

[0055] 2. Compile the intermediate language code into bytecode: The user logic editor generates the intermediate language code according to the user logic, and calls the bytecode compiler to compile the intermediate language code into bytecode. At the same time, the user logic editor serializes the user logic and trigger conditions and packages them into metadata and running parameters.

[0056] 3. Transmitting the bytecode to the controlled device: that is, the user transmits the bytecode to the controlled electronic device through the communication medium, and the controlled electronic device receives the bytecode and saves it persistently in the memory.

[0057] 4. The controlled device interprets and executes the bytecode: The controlled electronic device reads the bytecode from the memory and loads it into the bytecode interpreter. Figure 2 As shown in the figure, the bytecode runs in the bytecode interpreter in the following stages: (1) Start: The bytecode interpreter starts.

[0058] (2) Initialization: The bytecode interpreter analyzes the bytecode and separates the different bytecode subroutines in the bytecode and their running parameters and metadata.

[0059] (3) Link binding: The bytecode interpreter will bind the subprograms to the event interface provided by the controlled electronic device platform according to the running parameters of each subprogram.

[0060] (3) Check whether an event is triggered: When an event is triggered, execute step (4); if no event occurs, block and wait or execute other tasks.

[0061] (4) Check whether there is a bytecode program bound to the event that needs to be executed: When the event is triggered, the bytecode interpreter will check whether there is a bytecode program that needs to be executed on the triggering event interface. If there is still a bytecode program that needs to be executed on the event interface, execute (5); otherwise, return to task (3).

[0062] (5) Interpretation and execution: The bytecode interpreter takes the bytecode program from the bytecode configured by the user and interprets and executes it to implement the user's desired logical control.

[0063] (6) Garbage collection: When the current bytecode program is executed, the bytecode interpreter enters the garbage collection phase to recycle the memory occupied by the data generated during the bytecode execution; after completing the execution of the current bytecode program, return to step (4).

[0064] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for personalized control of resource compact devices based on a graphical interface and bytecode, characterized in that: The steps include: 1) Users write control logic and generate code through a graphical program; 2) The graphical program is compiled into bytecode by a bytecode compiler; 3) The graphical program transmits the bytecode to an electronic device via a communication medium, and the electronic device receives and permanently stores the bytecode; 4) The electronic device runs the control logic through a bytecode interpreter.

2. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: The graphical program described in step 1) includes pre-designed controls, allowing the user to edit the control logic through a graphical interface.

3. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 2, characterized in that: A graphical program described in step 1) converts the control logic in the graphical interface into readable code.

4. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: A graphical program described in step 1) runs on a personal computer having a display or an interactive terminal.

5. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: The bytecode compiled by the bytecode compiler described in step 2) should contain metadata; the metadata is a binary serialized form of the control logic edited by the user in step 1), so that the graphical program can restore the control logic from the bytecode.

6. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: The bytecode compiled by the bytecode compiler in step 2) should include operating parameters; the operating parameters include triggering conditions and input parameters for the logical operation of the bytecode.

7. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: The bytecode interpreter described in step 4) converts the bytecode generated by the bytecode compiler described in step 2) into machine code, so that the bytecode runs on the electronic device.

8. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: The bytecode compiler described in step 2) can simultaneously generate multiple bytecode subroutines bound to different trigger conditions.

9. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 8, characterized in that: The bytecode interpreter described in step 4) has the following operation steps: 4.1) Initialization: During initialization, the bytecode interpreter will separate the different bytecode subroutines and their running parameters in the bytecode and strip the metadata; 4.2) Link Binding and Saving Trigger Conditions: In the link binding stage, the bytecode interpreter binds the bytecode subprogram to the event interface provided by the controlled electronic device platform according to the running parameters of each bytecode subprogram; 4.3) Interpretation and execution: When a bytecode subroutine meets the triggering condition, the bytecode interpreter will enter the interpretation and execution stage. The bytecode interpreter will take out the bytecode subroutine command and translate it into machine code, which will be provided to the electronic device hardware for execution; 4.4) Garbage Collection: Finally, the bytecode interpreter enters the garbage collection phase to recycle the memory occupied by the data generated when the bytecode is running; after the garbage collection is completed, the bytecode interpreter will start waiting for the next trigger.

10. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: The bytecode interpreter described in step 4) translates the bytecode for execution only when the trigger condition is met.

11. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: A bytecode interpreter described in step 4) executes different subroutines according to the triggering conditions.

12. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: The electronic device in step 3) has a memory for persistently storing data.

13. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 1, characterized in that: The electronic device described in step 3) has a communication medium with the outside world.

14. The method for personalized control of resource compact devices based on a graphical interface and bytecode according to claim 13, characterized in that: The communication media are USB and serial port.