Component model-based microcontroller user interface design configuration method and related device

CN122985158APending Publication Date: 2026-10-27深圳创造惊喜科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611004130.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-07
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

[0016]本发明实施例中,在用户界面初始化阶段,创建目标组件模型;组件配置参数包括当前界面标识以及各预设基础控件对应的控件配置数据;基于控件配置数据,对目标组件模型中的多个预设基础控件进行配置更新,得到与当前功能对应的目标用户界面;当检测到目标用户界面中的目标基础控件被触发时,获取目标基础控件对应的控件标识;基于当前界面标识和控件标识,确定对应的目标回调函数;基于目标回调函数,执行当前功能对应的业务配置处理。通过上述方法步骤,能够减少微控制器用户界面运行过程中的内存占用,降低内存碎片风险,并提高界面配置灵活性、逻辑维护便利性和系统运行稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985158A_ABST
    Figure CN122985158A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a microcontroller user interface design configuration method based on a component model and related equipment thereof, including: in the user interface initialization stage, creating a target component model; the component configuration parameter includes the current interface identifier and the control configuration data corresponding to each preset basic control; based on the control configuration data, configuring and updating the plurality of preset basic controls in the target component model, obtaining the target user interface corresponding to the current function; when detecting that the target basic control in the target user interface is triggered, obtaining the control identifier corresponding to the target basic control; based on the current interface identifier and the control identifier, determining the corresponding target callback function; based on the target callback function, executing the business configuration processing corresponding to the current function. Through the above method steps, the memory occupation in the microcontroller user interface running process can be reduced, the memory fragmentation risk can be reduced, and the interface configuration flexibility, the logic maintenance convenience and the system running stability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of embedded software, and more particularly to a microcontroller user interface design and configuration method, apparatus, electronic device and storage medium based on a component model. Background Technology

[0002] As consumer electronics with displays continue to develop, the user interface functions in microcontroller devices are becoming increasingly sophisticated, and some embedded devices now require interface display effects close to those of smart terminals. For example, microcontroller products with LCD screens typically need to display various interface elements such as text, images, buttons, menus, and pop-ups to meet user interaction needs such as settings, status prompts, confirmation of operations, and error alerts.

[0003] Current microcontroller user interface development methods typically rely on graphics libraries and controls, creating separate interface objects for text controls, image controls, button controls, list controls, or slider controls. When different interface functions each create controls independently, static creation increases random access memory (RAM) usage with the number of controls, making it difficult to adapt to microcontrollers with limited RAM resources. While dynamically creating and releasing controls can save on immediate memory usage to some extent, it can easily lead to memory fragmentation during long-term device operation, affecting the stability of the user interface and software reliability.

[0004] Therefore, under the condition of limited microcontroller resources, how to pre-create component models and reuse basic controls by utilizing component configuration parameters, while combining interface identifiers and control identifiers to call corresponding callback functions, in order to reduce the repeated creation of controls and achieve decoupling of interface display configuration from business logic, has become a technical problem that needs to be solved. Summary of the Invention

[0005] This invention provides a component-based microcontroller user interface design and configuration method to address the problems in existing microcontroller user interface development, such as the need to repeatedly create controls for different interface functions, resulting in high memory consumption, memory fragmentation due to dynamic memory allocation and release, and high coupling between interface display logic and business configuration processing logic.

[0006] In a first aspect, embodiments of the present invention provide a microcontroller user interface design and configuration method based on a component model, the method comprising the following steps: During the user interface initialization phase, a target component model is created, which includes multiple preset basic controls; Determine the component configuration parameters corresponding to the current function. The component configuration parameters include the current interface identifier and the control configuration data corresponding to each preset basic control. Based on the control configuration data, the configuration of multiple preset basic controls in the target component model is updated to obtain the target user interface corresponding to the current function; When a target basic control in the target user interface is detected to be triggered, the control identifier corresponding to the target basic control is obtained; Based on the current interface identifier and the control identifier, determine the corresponding target callback function; Based on the target callback function, the business configuration processing corresponding to the current function is executed.

[0007] Optionally, the step of creating the target component model during the user interface initialization phase includes: When the configuration initialization phase is detected, determine the type of common display control corresponding to the current user interface; Based on the aforementioned common display control type, create a rectangle control, an image control, a rich text control, a first button control, and a second button control; The target component model is generated based on the rectangle control, image control, rich text control, first button control, and second button control.

[0008] Optionally, determining the component configuration parameters corresponding to the current function includes: Get the UI configuration request corresponding to the current function; Based on the interface configuration request, determine the current interface identifier corresponding to the current function; Based on the current interface identifier, determine the display state of the controls corresponding to each preset basic control in the target component model; Based on the current interface identifier, determine the control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; The component configuration parameters are generated based on the current interface identifier, the control display state, the control position parameter, the control size parameter, and the control content parameter.

[0009] Optionally, the step of updating the configuration of multiple preset basic controls in the target component model based on the control configuration data to obtain the target user interface corresponding to the current function includes: Parse the control configuration data to obtain the control display state, control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; Based on the display state of the control, control the corresponding preset basic control to be in a displayed state or a hidden state; Based on the control position parameters and the control size parameters, the display area of ​​the preset basic control in the display state is updated; Based on the control content parameters, the display content of the preset basic control that is in the display state is updated; Based on the preset basic controls that complete the update of the display area and the update of the display content, a target user interface corresponding to the current function is generated.

[0010] Optionally, when a target basic control in the target user interface is detected to be triggered, obtaining the control identifier corresponding to the target basic control includes: Detect the trigger events corresponding to each preset basic control in the target user interface; When a triggering event is detected, the event source information corresponding to the triggering event is obtained; Based on the event source information, the target basic control that was triggered is determined; Read the control identifier corresponding to the target basic control. The control identifier is used to indicate that the preset basic control that is triggered is one of the following: a first button control, a second button control, an image control, or a text control. The read control identifier is determined as the control identifier corresponding to the target basic control.

[0011] Optionally, determining the corresponding target callback function based on the current interface identifier and the control identifier includes: Obtain pre-registered callback function configuration information, which includes the correspondence between interface identifiers, control identifiers, and callback functions; Based on the current interface identifier, a set of target callback functions corresponding to the current user interface is determined in the callback function configuration information; Based on the control identifier, a matching process is performed in the target callback function set to obtain the candidate callback function corresponding to the control identifier; The candidate callback function is determined as the target callback function.

[0012] Optionally, the step of executing the business configuration processing corresponding to the current function based on the target callback function includes: Invoke the target callback function to determine the business configuration processing type corresponding to the current interface identifier and the control identifier; When the business configuration processing type includes interface closing processing, a hidden configuration parameter is generated. The hidden configuration parameter is used to control multiple preset basic controls in the target component model to be configured as invisible. The hidden configuration parameters are sent to the target component model, so that the target component model closes the target user interface based on the hidden configuration parameters; When the business configuration processing type includes function execution processing, a corresponding function execution instruction is generated based on the target callback function; Based on the function execution instruction, execute the business action corresponding to the function execution instruction.

[0013] Secondly, embodiments of the present invention also provide a component-model-based microcontroller user interface design and configuration device, the component-model-based microcontroller user interface design and configuration device comprising: A creation module is used to create a target component model during the user interface initialization phase. The target component model includes multiple preset basic controls. The first determining module is used to determine the component configuration parameters corresponding to the current function. The component configuration parameters include the current interface identifier and the control configuration data corresponding to each preset basic control. The update module is used to update the configuration of multiple preset basic controls in the target component model based on the control configuration data, so as to obtain a target user interface corresponding to the current function; The acquisition module is used to acquire the control identifier corresponding to the target basic control when the target basic control in the target user interface is detected to be triggered; The second determining module is used to determine the corresponding target callback function based on the current interface identifier and the control identifier; The execution module is used to perform the business configuration processing corresponding to the current function based on the target callback function.

[0014] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the component model-based microcontroller user interface design and configuration method provided in embodiments of the present invention.

[0015] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the component-model-based microcontroller user interface design and configuration method provided in the embodiments of the present invention.

[0016] In this embodiment of the invention, during the user interface initialization phase, a target component model is created. Component configuration parameters include the current interface identifier and control configuration data corresponding to each preset basic control. Based on the control configuration data, the configuration of multiple preset basic controls in the target component model is updated to obtain the target user interface corresponding to the current function. When a target basic control in the target user interface is detected to be triggered, the control identifier corresponding to the target basic control is obtained. Based on the current interface identifier and the control identifier, the corresponding target callback function is determined. Based on the target callback function, the business configuration processing corresponding to the current function is executed. Through the above method steps, the memory usage during the operation of the microcontroller user interface can be reduced, the risk of memory fragmentation can be lowered, and the flexibility of interface configuration, the convenience of logic maintenance, and the stability of system operation can be improved. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a microcontroller user interface design and configuration method based on a component model provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of another microcontroller user interface design and configuration device based on a component model provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] like Figure 1 As shown, Figure 1 This is a flowchart of a component-model-based microcontroller user interface design and configuration method provided by an embodiment of the present invention. The component-model-based microcontroller user interface design and configuration method includes the following steps: 101. During the user interface initialization phase, create the target component model.

[0021] In this embodiment of the invention, the above-described component model-based microcontroller user interface design and configuration method can be applied to a component model-based microcontroller user interface design and configuration platform. The component model-based microcontroller user interface design and configuration platform has functions such as component model-based microcontroller user interface design and configuration data processing, component model-based microcontroller user interface design and configuration data transmission and reception, and component model-based microcontroller user interface design and configuration data memory storage. It can be built based on a server or server cluster, and the server or server cluster can be an electronic device with component model-based microcontroller user interface design and configuration data processing capabilities.

[0022] The aforementioned initialization phase refers to the phase in which common resources required for the operation of the interface are prepared before the micro-user interface formally responds to specific function display requests. It can occur before the device is powered on, the interface program starts, the graphics library is initialized, or the main interface display process is entered. It is used to prepare reusable control resources for subsequent interface configuration.

[0023] In this embodiment, the microcontroller user interface design and configuration platform based on the component model described above can create corresponding control objects in memory according to preset control types and configure the initial attributes of the control objects. It is understood that this does not involve creating a separate set of controls for each pop-up window, but rather providing a foundation for multiple interface functions to share the same set of control resources.

[0024] The aforementioned target component model can refer to a reusable interface model formed by combining multiple preset basic controls. It is generally not limited to a single fixed pop-up window, but can be configured into different user interfaces based on subsequently input component configuration parameters. For example, the target component model can consist of a rectangle control, an image control, a rich text control, a first button control, and a second button control.

[0025] The aforementioned preset basic controls can refer to basic interface elements that are pre-created and can be repeatedly called by the target component model. These can include rectangular controls for forming the main area of ​​the pop-up window, image controls for displaying icons or prompt images, rich text controls for displaying prompt text, and button controls for receiving confirmation, cancellation, and other operations.

[0026] In one possible embodiment, after the graphics library is initialized, the aforementioned component-model-based microcontroller user interface design and configuration platform creates rectangular controls, image controls, rich text controls, a first button control, and a second button control, and associates these multiple preset basic controls with the same target component model. Once the target component model is created, these multiple preset basic controls can maintain their created state, and when different current functions are subsequently invoked, their display status, position, size, and content can be updated by receiving different component configuration parameters.

[0027] By using the above methods and steps, multiple user interface functions can share the same set of basic controls, reducing memory usage caused by repeatedly creating controls and mitigating the risk of memory fragmentation caused by dynamically allocating and releasing control resources. The target component model includes multiple preset basic controls.

[0028] 102. Determine the component configuration parameters corresponding to the current function.

[0029] In this embodiment of the invention, the above-mentioned component configuration parameters may include, but are not limited to, the current interface identifier and the control configuration data corresponding to each preset basic control, which are sent to the target component model and used to configure each preset basic control. The data set may include the current interface identifier, the display status, position coordinates, size, image number, text content, font size, font color, and button text of each preset basic control.

[0030] The aforementioned current function can refer to the display or interactive function that needs to be executed by the microcontroller's user interface. For example, the current function could be a pop-up feeding plan setting prompt, a pop-up deletion confirmation screen, or a pop-up door closing prompt. Different current functions correspond to different interface content, control display states, and button interaction logic.

[0031] In this embodiment, the component-model-based microcontroller user interface design and configuration platform generates or retrieves corresponding configuration content based on the currently triggered interface function. This process can be completed through current function requests, pop-up call commands, or interface switching commands, enabling the component-model-based microcontroller user interface design and configuration platform to clearly define the interface type and corresponding control parameters to be displayed.

[0032] The aforementioned current interface identifier can refer to identification information used to distinguish the current target user interface type. This current interface identifier can be represented by an interface sequence number, pop-up number, or function number. For example, pop-up one, pop-up two, and pop-up three each correspond to different current interface identifiers.

[0033] The aforementioned control configuration data can refer to the specific configuration content required by each preset basic control under the current function. For example, for rectangle control, image control, rich text control, first button control and second button control, the control configuration data can include the position and size of rectangle control, whether the image control is displayed and the image number, the text content and font parameters of rich text control, and the display status and button text of first button control and second button control.

[0034] In one possible embodiment, the microcontroller user interface design and configuration platform based on the component model described above can determine the control configuration data corresponding to the rectangular control, image control, rich text control, first button control and second button control in the target component model according to the interface configuration rules, and combine the current interface identifier and control configuration data to generate component configuration parameters.

[0035] For example, when the current function is to set a prompt for the feeding plan, the component configuration parameters can instruct all controls to be displayed and configure the corresponding images, prompt text, and text for the two buttons; when the current function is to confirm deletion, the component configuration parameters can instruct the image control to be hidden and configure the confirmation text for deletion and the corresponding button text.

[0036] This approach enables different current functions to share the same target component model and completes interface differentiation configuration through different component configuration parameters, reducing the situation of repetitive configuration of control resources for different interface functions.

[0037] 103. Based on the control configuration data, update the configuration of multiple preset basic controls in the target component model to obtain the target user interface corresponding to the current function.

[0038] In this embodiment of the invention, the microcontroller user interface design and configuration platform based on the component model modifies the parameters of multiple preset basic controls already created in the target component model according to the control configuration data. It is understood that the update process does not require recreating the controls, but rather updates the control's display state, position coordinates, size, image resources, text content, font size, font color, and button text.

[0039] The aforementioned target user interface refers to the current display interface formed after the target component model has completed its configuration update. This target user interface corresponds to the current function and can be a feeding plan setting prompt interface, a deletion confirmation interface, or a door closing prompt interface, etc. Different target user interfaces can share the same target component model, only differing in the display state, layout position, and display content of each preset basic control.

[0040] In one possible embodiment, the microcontroller user interface design and configuration platform based on the component model described above can update the configuration of multiple preset basic controls in the target component model based on control configuration data to obtain the target user interface corresponding to the current function.

[0041] Specifically, after parsing the control configuration data, the component-based microcontroller user interface design and configuration platform can determine the display area of ​​the rectangular control, whether the image control is displayed and its image number, the display position, text content, font size, and font color of the rich text control, and the display status and button text of the first and second button controls. When the current function is a feeding plan setting prompt, the component-based microcontroller user interface design and configuration platform can control the rectangular control, image control, rich text control, first button control, and second button control to be in a display state, and configure the corresponding prompt text and button text; when the current function is a delete confirmation, it can control the image control to be in an invisible state and update the display content of the rich text control and button control.

[0042] This allows for the generation of different target user interfaces using the same target component model, reducing memory usage caused by repeatedly creating controls and improving the convenience of interface switching configurations.

[0043] 104. When the target basic control in the target user interface is detected to be triggered, obtain the control identifier corresponding to the target basic control.

[0044] In this embodiment of the invention, the aforementioned target basic control can refer to a preset basic control in the target user interface that is triggered by user operation. It can be a first button control or a second button control, such as a "Cancel" button or a "Confirm" button pressed by the user in a pop-up window. Since multiple preset basic controls in the target component model can be reused, the aforementioned target basic control can be used to distinguish the control that actually triggered the action from multiple preset basic controls.

[0045] The component-model-based microcontroller user interface design and configuration platform described above can listen for and identify control-triggered events in the target user interface. Specifically, these can be button press events, click events, or input confirmation events. For example, when a user presses the first or second button control in a pop-up window, the platform can detect the corresponding control trigger event.

[0046] The aforementioned component-based microcontroller user interface design and configuration platform can also read event source information from a control trigger event after it is detected, and determine the processing procedure for the corresponding identifier of the triggered control based on the event source information. It should be noted that the above acquisition process does not involve re-evaluating the interface content, but rather extracting data that characterizes the trigger source from the control event.

[0047] The aforementioned control identifiers can refer to identification information used to distinguish different preset basic controls in the target component model. These control identifiers can be represented by control number, control name, or control type identifier; for example, the first button control corresponds to the first button identifier, and the second button control corresponds to the second button identifier.

[0048] In one possible embodiment, the component-model-based microcontroller user interface design and configuration platform described above can perform event listening on the first and second button controls in the target component model after the target user interface is displayed. When the user presses a button in the target user interface, the component-model-based microcontroller user interface design and configuration platform detects the button trigger event and reads the event source information corresponding to the button trigger event. If the event source information indicates that the triggered control is the first button control, the control identifier corresponding to the first button control is obtained; if the event source information indicates that the triggered control is the second button control, the control identifier corresponding to the second button control is obtained.

[0049] Therefore, when the same target component model is configured as different pop-up interfaces, it is possible to accurately distinguish the triggered control, providing a basis for subsequently calling the corresponding callback function based on the current interface identifier.

[0050] 105. Based on the current interface identifier and control identifier, determine the corresponding target callback function.

[0051] In this embodiment of the invention, the aforementioned target callback function can refer to a business configuration processing function that matches the current interface identifier and control identifier. It is generally used to perform corresponding interface closing, function confirmation, or function cancellation processing after the target basic control is triggered. Since the same target component model can be configured for different target user interfaces, the same control identifier can correspond to different target callback functions under different current interface identifiers.

[0052] For example, the same second button control can have a corresponding callback function set in the feeding plan setting prompt interface, a corresponding callback function set in the delete confirmation interface to delete device parameters, and a corresponding callback function set in the door closing prompt interface to close the pop-up window.

[0053] In one possible embodiment, the component-model-based microcontroller user interface design and configuration platform described above can pre-establish the correspondence between the current interface identifier, control identifier, and callback function. When the target basic control is detected to be triggered and the control identifier is obtained, the component-model-based microcontroller user interface design and configuration platform can determine the set of callback functions corresponding to the current target user interface based on the current interface identifier, and then match the corresponding target callback function in the set of callback functions based on the control identifier.

[0054] For example, when the current interface identifier corresponds to the feeding plan setting prompt interface and the control identifier corresponds to the second button control, the microcontroller user interface design and configuration platform based on the component model can determine that the target callback function is the feeding plan confirmation callback function; when the current interface identifier corresponds to the deletion confirmation interface and the control identifier corresponds to the second button control, the target callback function can be determined to be the deletion confirmation callback function.

[0055] This enables the same basic control to execute different business logic under different target user interfaces, realizing the reuse of interface controls and the differentiated processing of business logic.

[0056] 106. Based on the target callback function, execute the business configuration processing corresponding to the current function.

[0057] In this embodiment of the invention, when the aforementioned target basic control is triggered, the microcontroller user interface design and configuration platform based on the component model can perform interface processing or functional processing. Specifically, this may include operations such as closing the current pop-up window, entering the settings process, and confirming the deletion of device parameters. For example, after the second button control in pop-up window one is triggered, the pop-up window can be closed and the feeding plan settings process can be entered; after the second button control in pop-up window two is triggered, the pop-up window can be closed and the device parameter deletion process can be performed; after the second button control in pop-up window three is triggered, the pop-up window can be closed.

[0058] In one possible embodiment, the component-model-based microcontroller user interface design and configuration platform can call the target callback function after determining it, and determine the business configuration processing type based on the current interface identifier and control identifier. When the business configuration processing type includes interface closing processing, the component-model-based microcontroller user interface design and configuration platform can generate hidden configuration parameters and send them to the target component model, making the rectangular control, image control, rich text control, first button control, and second button control in the target component model invisible, thereby closing the target user interface. When the business configuration processing type also includes function execution processing, the component-model-based microcontroller user interface design and configuration platform can continue to generate corresponding function execution instructions, such as generating feeding plan setting instructions or device parameter deletion instructions, and execute the corresponding business actions.

[0059] By using the above methods and steps, it is possible to reuse the same target component model and enable different interfaces and controls to execute corresponding business logic after triggering, thereby reducing the coupling between interface display configuration and business configuration processing logic.

[0060] In this embodiment of the invention, during the user interface initialization phase, a target component model is created. Component configuration parameters include the current interface identifier and control configuration data corresponding to each preset basic control. Based on the control configuration data, the configuration of multiple preset basic controls in the target component model is updated to obtain the target user interface corresponding to the current function. When a target basic control in the target user interface is detected to be triggered, the control identifier corresponding to the target basic control is obtained. Based on the current interface identifier and the control identifier, the corresponding target callback function is determined. Based on the target callback function, the business configuration processing corresponding to the current function is executed. Through the above method steps, the memory usage during the operation of the microcontroller user interface can be reduced, the risk of memory fragmentation can be lowered, and the flexibility of interface configuration, the convenience of logic maintenance, and the stability of system operation can be improved.

[0061] Optionally, during the user interface initialization phase, in the step of creating the target component model, the common display control type corresponding to the current user interface can be determined when the configuration initialization phase is detected; based on the common display control type, a rectangle control, an image control, a rich text control, a first button control, and a second button control can be created; and based on the rectangle control, image control, rich text control, first button control, and second button control, the target component model can be generated.

[0062] In this embodiment of the invention, the aforementioned common display control type can refer to a reusable basic display control category across multiple user interface functions. Taking a pop-up window interface as an example, different pop-ups typically require a pop-up body, image prompts, text prompts, and confirm or cancel buttons. Therefore, the common display control type can include rectangular control type, image control type, rich text control type, and button control type.

[0063] The aforementioned rectangular control can refer to the basic control used to form the main area of ​​the interface or the background area of ​​the pop-up window. The aforementioned image control can be used to display prompt icons or function images, the aforementioned rich text control can be used to display prompt text, explanatory text, or warning text, and the aforementioned first button control and the aforementioned second button control can be used to receive user operations such as cancel, confirm, and set later, respectively.

[0064] In one possible embodiment, the component-model-based microcontroller user interface design and configuration platform described above can determine the common display control type corresponding to the current user interface when the configuration initialization phase is detected. Based on the pop-up functionality required by the current user interface, the platform can determine the common display control type, including rectangular control type, image control type, rich text control type, first button control type, and second button control type, and create rectangular controls, image controls, rich text controls, first button controls, and second button controls accordingly. The platform can then bind the created rectangular controls, image controls, rich text controls, first button controls, and second button controls to the same target component model, enabling this target component model to subsequently form different pop-up interfaces through different component configuration parameters.

[0065] For example, pop-up one can display all controls, pop-up two can hide the image control, and pop-up three can hide the first button control. This allows for the creation of a reusable set of controls during the initialization phase, avoiding the need to repeatedly create controls for different pop-up functions, thereby reducing random access memory usage and mitigating the risk of memory fragmentation caused by dynamically creating and releasing controls.

[0066] Optionally, the step of determining the component configuration parameters corresponding to the current function further includes obtaining the interface configuration request corresponding to the current function; determining the current interface identifier corresponding to the current function based on the interface configuration request; determining the control display state corresponding to each preset basic control in the target component model based on the current interface identifier; determining the control position parameters, control size parameters, and control content parameters corresponding to each preset basic control based on the current interface identifier; and generating component configuration parameters based on the current interface identifier, control display state, control position parameters, control size parameters, and control content parameters.

[0067] In this embodiment of the invention, the aforementioned interface configuration request may refer to request information used to trigger the interface configuration process corresponding to the current function. This interface configuration request can be generated by the application when a prompt interface, confirmation interface, or alarm interface needs to be displayed. For example, a first interface configuration request is generated when a feeding plan setting prompt needs to be displayed, a second interface configuration request is generated when a deletion confirmation prompt needs to be displayed, and a third interface configuration request is generated when a door closing prompt needs to be displayed.

[0068] The aforementioned control display status refers to the status information of whether each preset basic control participates in the display under the current function. This control display status can include a displayed state and an invisible state. For example, in the feeding plan setting prompt interface, the rectangle control, image control, rich text control, first button control, and second button control can all be in a displayed state; in the deletion confirmation interface, the image control can be in an invisible state; and in the door closing prompt interface, the first button control can be in an invisible state.

[0069] The aforementioned control position parameters refer to the display position data of each preset basic control within the target user interface. These control position parameters can be represented by coordinate information, such as the coordinates of the control's top-left corner, center point, or offset coordinates relative to the main area of ​​the pop-up window, used to determine the specific display position of rectangular controls, image controls, rich text controls, and button controls within the interface.

[0070] The control size parameters mentioned above refer to the display size data of each preset basic control in the target user interface. These control size parameters may include width, height, or display area range, used to determine the size of the pop-up main area, image display area, text display area, and button display area.

[0071] The aforementioned control content parameters refer to the content data that each preset basic control needs to display under the current function. These control content parameters can include image number, text content, font size, font color, and button text, etc. For example, a rich text control can display prompts such as "Set Feeding Schedule" or "Are you sure to delete it?" based on the control content parameters, while the first and second button controls can display button text such as "Cancel" and "Confirm" based on the control content parameters.

[0072] In one possible embodiment, the aforementioned component-model-based microcontroller user interface design and configuration platform can combine the current interface identifier, control display state, control position parameters, control size parameters, and control content parameters to form a process that sends component configuration parameters to the target component model. These component configuration parameters enable the target component model to complete the corresponding interface configuration according to the current function.

[0073] In another possible embodiment, the component-based microcontroller user interface design and configuration platform described above can obtain the interface configuration request corresponding to the current function, and determine the current interface identifier corresponding to the current function based on the interface configuration request. The component-based microcontroller user interface design and configuration platform can, based on the current interface identifier, read the control display state, control position parameters, control size parameters, and control content parameters corresponding to the rectangular control, image control, rich text control, first button control, and second button control respectively from a preset interface configuration table, and combine these parameters with the current interface identifier to generate component configuration parameters.

[0074] By using the above methods and steps, different component configuration parameters can be generated for different current functions, so that the same target component model can be configured into different user interfaces, reducing the resource consumption caused by creating controls for different interface functions separately.

[0075] Optionally, the step of updating the configuration of multiple preset basic controls in the target component model based on control configuration data to obtain the target user interface corresponding to the current function further includes parsing the control configuration data to obtain the control display state, control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; controlling the corresponding preset basic control to be in a displayed or hidden state based on the control display state; updating the display area of ​​the preset basic controls in the displayed state based on the control position parameters and control size parameters; updating the display content of the preset basic controls in the displayed state based on the control content parameters; and generating the target user interface corresponding to the current function based on the preset basic controls that have completed the display area update and display content update.

[0076] In this embodiment of the invention, the above-mentioned parsing control configuration data may refer to the process by which the microcontroller user interface design and configuration platform based on the component model reads and splits the configuration fields corresponding to each preset basic control in the component configuration parameters.

[0077] The aforementioned display or hidden states refer to whether a predefined basic control is displayed in the current target user interface. A displayed state indicates that the corresponding control needs to be drawn in the current interface, while a hidden state indicates that the corresponding control has been created but is not displayed in the current interface.

[0078] The aforementioned display area update can refer to adjusting the display position and display range of a preset basic control on the screen based on the control position parameters and control size parameters.

[0079] The aforementioned content update refers to updating the specific content displayed by a preset base control in the display state based on the control content parameters. This content may include the image number called by the image control, the text content, font size, and font color displayed by the rich text control, as well as the button text of the first and second button controls, etc.

[0080] In one possible embodiment, the component-model-based microcontroller user interface design and configuration platform described above can parse control configuration data to obtain the control display state, control position parameters, control size parameters, and control content parameters corresponding to each preset basic control. The platform can control the rectangular control, image control, rich text control, first button control, and second button control to be in a displayed or hidden state based on the control display state. For preset basic controls in a displayed state, the platform can update their display area on the screen based on the control position parameters and control size parameters, and update their display content based on the control content parameters.

[0081] For example, in the feeding plan settings prompt interface, all preset basic controls can be displayed, and the corresponding images, prompt text, and two button texts can be updated; in the deletion confirmation interface, the image control can be hidden, and the rectangle control, rich text control, first button control, and second button control complete the update of the display area and display content to form the deletion confirmation interface.

[0082] By using the above methods and steps, we can generate a target user interface corresponding to the current function by updating the parameters of the pre-created basic controls, thereby reducing the memory usage caused by repeatedly creating controls and making it easier for the same target component model to adapt to different interface functions.

[0083] Optionally, the step of obtaining the control identifier corresponding to the target basic control when the target basic control in the target user interface is triggered further includes detecting the trigger events corresponding to each preset basic control in the target user interface; when a trigger event is detected, obtaining the event source information corresponding to the trigger event; determining the triggered target basic control based on the event source information; reading the control identifier corresponding to the target basic control, where the control identifier is used to indicate that the triggered preset basic control is one of a first button control, a second button control, an image control, or a text control; and determining the read control identifier as the control identifier corresponding to the target basic control.

[0084] In this embodiment of the invention, the aforementioned triggering event can refer to event information generated after a user operates a preset basic control in the target user interface, which may include button press events, click events, touch confirmation events, etc. For example, in a pop-up interface, when the user clicks the first button control or the second button control, the aforementioned component-model-based microcontroller user interface design and configuration platform can detect the corresponding triggering event.

[0085] The aforementioned event source information refers to information indicating which preset base control generated the triggering event. This event source information may include the control object address, control number, control name, or control type, etc. For example, if a user clicks the second button control, the event source information could indicate that the triggering event originated from the second button control.

[0086] The aforementioned triggered target base control can refer to the control in the target user interface that actually generates the triggering event.

[0087] The aforementioned component-based microcontroller user interface design and configuration platform can obtain control identifiers from the control properties or control registration information of preset basic controls based on event source information. This reading process is used to convert user operation events into control identifiers that can be used for subsequent callback matching.

[0088] In one possible embodiment, the microcontroller user interface design and configuration platform based on the component model described above can detect the trigger events corresponding to each preset basic control in the target user interface after the target user interface is displayed.

[0089] When the aforementioned component-based microcontroller user interface design and configuration platform detects a trigger event, it can obtain the event source information corresponding to the trigger event and determine the target basic control that was triggered based on the event source information. The platform can read the control identifier corresponding to the target basic control. This control identifier indicates that the triggered preset basic control is one of the following: a first button control, a second button control, an image control, or a text control. The platform then determines the read control identifier as the control identifier corresponding to the target basic control. For example, when clicking the second button control in pop-up window one, the read control identifier can be the second button control identifier; when clicking the first button control in pop-up window two, the read control identifier can be the first button control identifier.

[0090] By following the steps above, we can accurately determine the currently triggered control when the same target component model is reused in different interfaces, providing a basis for matching the target callback function with the current interface identifier.

[0091] Optionally, the step of determining the corresponding target callback function based on the current interface identifier and control identifier further includes obtaining pre-registered callback function configuration information, which includes the correspondence between interface identifiers, control identifiers, and callback functions; determining the set of target callback functions corresponding to the current user interface based on the current interface identifier in the callback function configuration information; matching the target callback function set based on the control identifier to obtain candidate callback functions corresponding to the control identifier; and determining the candidate callback functions as target callback functions.

[0092] In this embodiment of the invention, the aforementioned callback function configuration information may refer to pre-established interface interaction processing relationship data, used to record the correspondence between interface identifiers, control identifiers, and callback functions. For example, the second button control in pop-up window one may correspond to the feeding plan confirmation callback function, the second button control in pop-up window two may correspond to the delete confirmation callback function, and the second button control in pop-up window three may correspond to the pop-up close callback function.

[0093] In this embodiment, the microcontroller user interface design and configuration platform based on the component model described above can search for and select the corresponding result from preset data according to the current interface identifier or control identifier. This process is used to determine which type of callback logic the current interface needs to call when multiple interfaces and multiple controls share the same target component model.

[0094] The aforementioned target callback function set can refer to a group of callback functions corresponding to the current user interface. Since the same target user interface may include multiple triggerable controls such as a first button control, a second button control, an image control, or a text control, multiple callback functions can correspond to the same current interface identifier. The aforementioned target callback function set is used to limit the range of callback functions that can be matched within the current interface.

[0095] The aforementioned component-based microcontroller user interface design and configuration platform can also compare the currently acquired control identifier with the control identifiers in the target callback function set and find the corresponding callback function. This matching process avoids calling fixed functions solely based on control type, enabling the same button control to execute different business logic on different interfaces.

[0096] The aforementioned candidate callback function can refer to the callback function corresponding to the control identifier in the target callback function set. After being qualified by both the current interface identifier and the control identifier, this candidate callback function can be used as the target callback function corresponding to the current control-triggered event.

[0097] In one possible embodiment, the component-model-based microcontroller user interface design and configuration platform described above can obtain pre-registered callback function configuration information. Specifically, the platform can determine the target callback function set corresponding to the current user interface from the callback function configuration information based on the current interface identifier, then match it in the target callback function set based on the control identifier to obtain candidate callback functions corresponding to the control identifier, and finally determine the candidate callback functions as the target callback functions.

[0098] For example, when the current interface identifier corresponds to the deletion confirmation interface and the control identifier corresponds to the second button control, the microcontroller user interface design and configuration platform based on the component model can determine the deletion confirmation callback function as the target callback function.

[0099] By using the above methods and steps, it is possible to reuse multiple basic controls in the same target component model and call corresponding callback functions according to different interfaces and different control triggering conditions, thereby reducing the coupling between interface display configuration and business configuration processing logic.

[0100] Optionally, in the step of executing the business configuration processing corresponding to the current function based on the target callback function, the method further includes calling the target callback function to determine the business configuration processing type corresponding to the current interface identifier and control identifier; when the business configuration processing type includes interface closing processing, generating hidden configuration parameters, which are used to control multiple preset basic controls in the target component model to be configured as invisible; sending the hidden configuration parameters to the target component model so that the target component model closes the target user interface based on the hidden configuration parameters; when the business configuration processing type includes function execution processing, generating the corresponding function execution instruction based on the target callback function; and executing the business action corresponding to the function execution instruction based on the function execution instruction.

[0101] In this embodiment of the invention, the aforementioned business configuration processing type refers to the processing category that needs to be executed after the target basic control is triggered. This business configuration processing type may include at least one of interface closing processing and function execution processing. For example, when the first button control is clicked in pop-up window one, the business configuration processing type may only include interface closing processing; when the second button control is clicked in pop-up window one, the business configuration processing type may simultaneously include interface closing processing and function execution processing.

[0102] The aforementioned interface closing process refers to the method used to close the current target user interface. It should be noted that this process does not require destroying the preset basic controls in the target component model. Instead, it generates hidden configuration parameters to configure the rectangle control, image control, rich text control, first button control, and second button control to be invisible, thus making the current target user interface disappear from the display screen.

[0103] The aforementioned hidden configuration parameters can refer to configuration data used to control the concealment of multiple preset basic controls in the target component model. These hidden configuration parameters can include invisible state flags corresponding to each preset basic control, causing the target component model to configure the created preset basic controls as invisible after receiving the hidden configuration parameters.

[0104] The aforementioned function execution processing refers to the processing method where, after closing the interface, the corresponding business action of the current function still needs to be executed. For example, after the second button control in pop-up window one is triggered, the business action of setting the feeding plan can continue to be executed; after the second button control in pop-up window two is triggered, the business action of deleting device parameters can continue to be executed.

[0105] The aforementioned function execution instruction can refer to instruction data generated by the target callback function to trigger specific business actions. This function execution instruction may include content such as function type, execution object, or execution parameters, enabling the aforementioned component-based microcontroller user interface design and configuration platform to execute the corresponding business actions according to the function execution instruction.

[0106] In one possible embodiment, the microcontroller user interface design and configuration platform based on the component model described above can call the target callback function and determine the corresponding business configuration processing type based on the current interface identifier and control identifier.

[0107] When the business configuration processing type includes interface closing processing, the aforementioned component-model-based microcontroller user interface design and configuration platform can generate hidden configuration parameters and send them to the target component model. This causes the target component model to configure the rectangle control, image control, rich text control, first button control, and second button control to be invisible, thereby closing the target user interface. When the business configuration processing type includes function execution processing, the aforementioned component-model-based microcontroller user interface design and configuration platform can generate corresponding function execution instructions based on the target callback function and execute the corresponding business actions according to the function execution instructions.

[0108] For example, in the feeding plan setting prompt interface, after the second button control is triggered, the target user interface can be closed and the feeding plan setting action can be performed; in the deletion confirmation interface, after the second button control is triggered, the target user interface can be closed and the device parameter deletion action can be performed.

[0109] Therefore, the interface can be closed without destroying the target component model, and different business actions can be distinguished through different target callback functions, reducing the coupling between interface display configuration and business configuration processing logic.

[0110] like Figure 2As shown, this embodiment of the invention also provides a component-based microcontroller user interface design and configuration device 200, which includes: A creation module 201 is used to create a target component model during the user interface initialization phase. The target component model includes multiple preset basic controls. The first determining module 202 is used to determine the component configuration parameters corresponding to the current function. The component configuration parameters include the current interface identifier and the control configuration data corresponding to each preset basic control. The update module 203 is used to update the configuration of multiple preset basic controls in the target component model based on the control configuration data, so as to obtain a target user interface corresponding to the current function; The acquisition module 204 is used to acquire the control identifier corresponding to the target basic control when the target basic control in the target user interface is detected to be triggered; The second determining module 205 is used to determine the corresponding target callback function based on the current interface identifier and the control identifier; The execution module 206 is used to execute the business configuration processing corresponding to the current function based on the target callback function.

[0111] Optionally, the above-mentioned creation module 201 is used for: When the configuration initialization phase is detected, determine the type of common display control corresponding to the current user interface; Based on the aforementioned common display control type, create a rectangle control, an image control, a rich text control, a first button control, and a second button control; The target component model is generated based on the rectangle control, image control, rich text control, first button control, and second button control.

[0112] Optionally, the first determining module 202 described above is used for: Get the UI configuration request corresponding to the current function; Based on the interface configuration request, determine the current interface identifier corresponding to the current function; Based on the current interface identifier, determine the display state of the controls corresponding to each preset basic control in the target component model; Based on the current interface identifier, determine the control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; The component configuration parameters are generated based on the current interface identifier, the control display state, the control position parameter, the control size parameter, and the control content parameter.

[0113] Optionally, the above-mentioned update module 203 is used for: Parse the control configuration data to obtain the control display state, control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; Based on the display state of the control, control the corresponding preset basic control to be in a displayed state or a hidden state; Based on the control position parameters and the control size parameters, the display area of ​​the preset basic control in the display state is updated; Based on the control content parameters, the display content of the preset basic control that is in the display state is updated; Based on the preset basic controls that complete the update of the display area and the update of the display content, a target user interface corresponding to the current function is generated.

[0114] Optionally, the aforementioned acquisition module 204 is used for: Detect the trigger events corresponding to each preset basic control in the target user interface; When a triggering event is detected, the event source information corresponding to the triggering event is obtained; Based on the event source information, the target basic control that was triggered is determined; Read the control identifier corresponding to the target basic control. The control identifier is used to indicate that the preset basic control that is triggered is one of the following: a first button control, a second button control, an image control, or a text control. The read control identifier is determined as the control identifier corresponding to the target basic control.

[0115] Optionally, the second determining module 205 described above is used for: Obtain pre-registered callback function configuration information, which includes the correspondence between interface identifiers, control identifiers, and callback functions; Based on the current interface identifier, a set of target callback functions corresponding to the current user interface is determined in the callback function configuration information; Based on the control identifier, a matching process is performed in the target callback function set to obtain the candidate callback function corresponding to the control identifier; The candidate callback function is determined as the target callback function.

[0116] Optionally, the execution module 206 described above is used for: Invoke the target callback function to determine the business configuration processing type corresponding to the current interface identifier and the control identifier; When the business configuration processing type includes interface closing processing, a hidden configuration parameter is generated. The hidden configuration parameter is used to control multiple preset basic controls in the target component model to be configured as invisible. The hidden configuration parameters are sent to the target component model, so that the target component model closes the target user interface based on the hidden configuration parameters; When the business configuration processing type includes function execution processing, a corresponding function execution instruction is generated based on the target callback function; Based on the function execution instruction, execute the business action corresponding to the function execution instruction.

[0117] like Figure 3 As shown, this embodiment of the invention also provides an electronic device 300, including a processor, which can execute any of the above-described component-based microcontroller user interface design and configuration methods.

[0118] Specifically, it includes a processor 301 and a memory 302, as well as a computer program stored in the memory 302 and capable of running on the processor 301, which executes a component-model-based microcontroller user interface design and configuration method, wherein: The processor 301 executes the calculator program, which is based on the component model microcontroller user interface design configuration method stored in the runtime memory 302, and performs the following steps: During the user interface initialization phase, a target component model is created, which includes multiple preset basic controls; Determine the component configuration parameters corresponding to the current function. The component configuration parameters include the current interface identifier and the control configuration data corresponding to each preset basic control. Based on the control configuration data, the configuration of multiple preset basic controls in the target component model is updated to obtain the target user interface corresponding to the current function; When a target basic control in the target user interface is detected to be triggered, the control identifier corresponding to the target basic control is obtained; Based on the current interface identifier and the control identifier, determine the corresponding target callback function; Based on the target callback function, the business configuration processing corresponding to the current function is executed.

[0119] Optionally, processor 301 performs the following during the user interface initialization phase: creating the target component model, including: When the configuration initialization phase is detected, determine the type of common display control corresponding to the current user interface; Based on the aforementioned common display control type, create a rectangle control, an image control, a rich text control, a first button control, and a second button control; The target component model is generated based on the rectangle control, image control, rich text control, first button control, and second button control.

[0120] Optionally, the processor 301 executes the step of determining the component configuration parameters corresponding to the current function, including: Get the UI configuration request corresponding to the current function; Based on the interface configuration request, determine the current interface identifier corresponding to the current function; Based on the current interface identifier, determine the display state of the controls corresponding to each preset basic control in the target component model; Based on the current interface identifier, determine the control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; The component configuration parameters are generated based on the current interface identifier, the control display state, the control position parameter, the control size parameter, and the control content parameter.

[0121] Optionally, the processor 301 executes the configuration update of multiple preset basic controls in the target component model based on the control configuration data to obtain a target user interface corresponding to the current function, including: Parse the control configuration data to obtain the control display state, control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; Based on the display state of the control, control the corresponding preset basic control to be in a displayed state or a hidden state; Based on the control position parameters and the control size parameters, the display area of ​​the preset basic control in the display state is updated; Based on the control content parameters, the display content of the preset basic control that is in the display state is updated; Based on the preset basic controls that complete the update of the display area and the update of the display content, a target user interface corresponding to the current function is generated.

[0122] Optionally, the processor 301 executes the step of obtaining the control identifier corresponding to the target basic control when the target basic control in the target user interface is detected to be triggered, including: Detect the trigger events corresponding to each preset basic control in the target user interface; When a triggering event is detected, the event source information corresponding to the triggering event is obtained; Based on the event source information, the target basic control that was triggered is determined; Read the control identifier corresponding to the target basic control. The control identifier is used to indicate that the preset basic control that is triggered is one of the following: a first button control, a second button control, an image control, or a text control. The read control identifier is determined as the control identifier corresponding to the target basic control.

[0123] Optionally, the processor 301 executes the step of determining the corresponding target callback function based on the current interface identifier and the control identifier, including: Obtain pre-registered callback function configuration information, which includes the correspondence between interface identifiers, control identifiers, and callback functions; Based on the current interface identifier, a set of target callback functions corresponding to the current user interface is determined in the callback function configuration information; Based on the control identifier, a matching process is performed in the target callback function set to obtain the candidate callback function corresponding to the control identifier; The candidate callback function is determined as the target callback function.

[0124] Optionally, the processor 301 executes the business configuration processing corresponding to the current function based on the target callback function, including: Invoke the target callback function to determine the business configuration processing type corresponding to the current interface identifier and the control identifier; When the business configuration processing type includes interface closing processing, a hidden configuration parameter is generated. The hidden configuration parameter is used to control multiple preset basic controls in the target component model to be configured as invisible. The hidden configuration parameters are sent to the target component model, so that the target component model closes the target user interface based on the hidden configuration parameters; When the business configuration processing type includes function execution processing, a corresponding function execution instruction is generated based on the target callback function; Based on the function execution instruction, execute the business action corresponding to the function execution instruction.

[0125] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the component-model-based microcontroller user interface design and configuration method or the application-side component-model-based microcontroller user interface design and configuration method provided in this invention, and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0126] Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be done by a computer program instructing related hardware, and can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0127] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A microcontroller user interface design and configuration method based on a component model, characterized in that, include: During the user interface initialization phase, a target component model is created, which includes multiple preset basic controls; Determine the component configuration parameters corresponding to the current function. The component configuration parameters include the current interface identifier and the control configuration data corresponding to each preset basic control. Based on the control configuration data, the configuration of multiple preset basic controls in the target component model is updated to obtain the target user interface corresponding to the current function; When a target basic control in the target user interface is detected to be triggered, the control identifier corresponding to the target basic control is obtained; Based on the current interface identifier and the control identifier, determine the corresponding target callback function; Based on the target callback function, the business configuration processing corresponding to the current function is executed.

2. The microcontroller user interface design and configuration method based on a component model as described in claim 1, characterized in that, The step of creating the target component model during the user interface initialization phase includes: When the configuration initialization phase is detected, determine the type of common display control corresponding to the current user interface; Based on the aforementioned common display control type, create a rectangle control, an image control, a rich text control, a first button control, and a second button control; The target component model is generated based on the rectangle control, image control, rich text control, first button control, and second button control.

3. The microcontroller user interface design and configuration method based on a component model as described in claim 1, characterized in that, Determining the component configuration parameters corresponding to the current function includes: Get the UI configuration request corresponding to the current function; Based on the interface configuration request, determine the current interface identifier corresponding to the current function; Based on the current interface identifier, determine the display state of the controls corresponding to each preset basic control in the target component model; Based on the current interface identifier, determine the control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; The component configuration parameters are generated based on the current interface identifier, the control display state, the control position parameter, the control size parameter, and the control content parameter.

4. The microcontroller user interface design and configuration method based on a component model as described in claim 1, characterized in that, The step of updating the configuration of multiple preset basic controls in the target component model based on the control configuration data to obtain the target user interface corresponding to the current function includes: Parse the control configuration data to obtain the control display state, control position parameters, control size parameters, and control content parameters corresponding to each preset basic control; Based on the display state of the control, control the corresponding preset basic control to be in a displayed state or a hidden state; Based on the control position parameters and the control size parameters, the display area of ​​the preset basic control in the display state is updated; Based on the control content parameters, the display content of the preset basic control that is in the display state is updated; Based on the preset basic controls that complete the update of the display area and the update of the display content, a target user interface corresponding to the current function is generated.

5. The microcontroller user interface design and configuration method based on a component model as described in claim 1, characterized in that, When a target basic control in the target user interface is detected to be triggered, the step of obtaining the control identifier corresponding to the target basic control includes: Detect the trigger events corresponding to each preset basic control in the target user interface; When a triggering event is detected, the event source information corresponding to the triggering event is obtained; Based on the event source information, the target basic control that was triggered is determined; Read the control identifier corresponding to the target basic control. The control identifier is used to indicate that the preset basic control that is triggered is one of the following: a first button control, a second button control, an image control, or a text control. The read control identifier is determined as the control identifier corresponding to the target basic control.

6. The microcontroller user interface design and configuration method based on a component model as described in claim 1, characterized in that, The step of determining the corresponding target callback function based on the current interface identifier and the control identifier includes: Obtain pre-registered callback function configuration information, which includes the correspondence between interface identifiers, control identifiers, and callback functions; Based on the current interface identifier, a set of target callback functions corresponding to the current user interface is determined in the callback function configuration information; Based on the control identifier, a matching process is performed in the target callback function set to obtain the candidate callback function corresponding to the control identifier; The candidate callback function is determined as the target callback function.

7. The microcontroller user interface design and configuration method based on a component model as described in claim 1, characterized in that, The step of executing the business configuration processing corresponding to the current function based on the target callback function includes: Invoke the target callback function to determine the business configuration processing type corresponding to the current interface identifier and the control identifier; When the business configuration processing type includes interface closing processing, a hidden configuration parameter is generated. The hidden configuration parameter is used to control multiple preset basic controls in the target component model to be configured as invisible. The hidden configuration parameters are sent to the target component model, so that the target component model closes the target user interface based on the hidden configuration parameters; When the business configuration processing type includes function execution processing, a corresponding function execution instruction is generated based on the target callback function; Based on the function execution instruction, execute the business action corresponding to the function execution instruction.

8. A microcontroller user interface design and configuration device based on a component model, characterized in that, include: A creation module is used to create a target component model during the user interface initialization phase. The target component model includes multiple preset basic controls. The first determining module is used to determine the component configuration parameters corresponding to the current function. The component configuration parameters include the current interface identifier and the control configuration data corresponding to each preset basic control. The update module is used to update the configuration of multiple preset basic controls in the target component model based on the control configuration data, so as to obtain a target user interface corresponding to the current function; The acquisition module is used to acquire the control identifier corresponding to the target basic control when the target basic control in the target user interface is detected to be triggered; The second determining module is used to determine the corresponding target callback function based on the current interface identifier and the control identifier; The execution module is used to perform the business configuration processing corresponding to the current function based on the target callback function.

9. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the component-based microcontroller user interface design and configuration method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the component-based microcontroller user interface design and configuration method as described in any one of claims 1 to 7.