A component control method and system for the Android platform
By defining a component template library and generating configuration files using flowcharts on the Android platform, and automatically executing code blocks using the component manager, the problem of long Android software development cycles is solved, achieving efficient component control and memory optimization.
Patent Information
- Application Number
- CN202510341497.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-03-21
AI Technical Summary
The current Android software development process is characterized by long development and maintenance cycles, high R&D costs, and the need for manual modification and release of new software, resulting in low efficiency.
By defining a component template library on the Android platform, using flowcharts to generate configuration files, storing page deployment data, component data, and process data, and utilizing the component manager to automatically execute code blocks, orderly control of components and dynamic generation of pages can be achieved.
It enables automated development of components on the Android platform, improving software development efficiency, reducing manual intervention, and saving memory resources.
Smart Images

Figure CN120144122B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software development technology, and more specifically, to a component control method and system for the Android platform. Background Technology
[0002] In the current Android software development process, most business process systems are developed on PCs and then run on Android mobile terminals. When the software needs to be updated or upgraded, it must be modified by the developers and the new software must be redeployed to run on the Android platform. Developers need to spend a lot of time reading and writing code, resulting in long system development and maintenance cycles and high R&D costs. Summary of the Invention
[0003] One of the technical problems to be solved by this invention is to provide a component control method and system for the Android platform, which realizes the specific implementation of components on the Android platform, automatically completes the software development process, and greatly improves software development efficiency.
[0004] One of the technical problems to be solved by the present invention is achieved as follows: a component control method for an Android platform, wherein the Android platform is provided with a component template library, the component template library defines the execution code blocks of various types of components, each page is predefined by a flowchart to form a configuration file, the configuration file includes page deployment data, component data and process data, the page deployment data is parsed on the Android platform and stored in a database, and the component declarations in the component data have a corresponding relationship with the execution code blocks of the components in the component template library;
[0005] The method includes the following steps:
[0006] Step 1: When a page needs to be loaded, a memory area is pre-allocated for the page to store the page's component data and process data;
[0007] Step 2: Obtain the page deployment data from the database and the UI components from the corresponding component data in the memory area, initialize the UI components, and generate the UI page;
[0008] Step 3: While loading the page, generate a component manager. The component manager includes a dictionary table and a process table. The dictionary table stores the component data of the page and the corresponding component execution code block in the component template library. The process table stores the process edge information of the page.
[0009] Step 4: Read the processes in the process table sequentially and execute them. Call the execution code block corresponding to the component in the dictionary table according to the process edge information and execute it.
[0010] Step 5: When the page is closed, release memory and destroy the component manager.
[0011] Furthermore, the process edge information of the page specifically includes the ID of the previous component connected to the process edge, the data transmitted by the previous component, the triggering event of the previous component, the ID of the next component, and the execution method ID of the next component.
[0012] Furthermore, the dictionary table specifically includes the following fields: component ID, component declaration ID, component execution method ID, and the execution code block corresponding to the component execution method ID, wherein the execution code block is obtained from the component template library.
[0013] Furthermore, step 4 specifically involves: sequentially reading and executing the processes in the process table, finding the component to be executed based on the process edge information, and then sequentially finding the corresponding specific component execution code block from the dictionary table through component ID, component declaration ID, and component execution method ID, and running its logic.
[0014] Furthermore, the component manager also stores various state attributes of each component of the page, including initialization state, uninitialization state, running state, and idle state.
[0015] The second technical problem to be solved by this invention is to provide a component control system for the Android platform, which realizes the specific implementation of components on the Android platform, automatically completes the software development process, and greatly improves the efficiency of software development.
[0016] The second technical problem to be solved by this invention is achieved as follows: a component control system for the Android platform, used to execute any of the methods described above, comprising:
[0017] The memory module is used to pre-allocate a memory area for a page when it needs to be loaded, for storing the component data and process data of the page;
[0018] The page deployment module is used to obtain page deployment data from the database and UI components from the corresponding component data in the memory area, initialize the UI components, and generate UI pages;
[0019] The component manager production module is used to generate a component manager while loading a page. The component manager includes a dictionary table and a process table. The dictionary table stores the component data of the page and the component execution code block corresponding to the component data in the component template library. The process table stores the process edge information of the page.
[0020] The execution module is used to sequentially read the processes in the process table and execute them, and to call the execution code block corresponding to the component in the dictionary table according to the process edge information to execute it.
[0021] The destroy module is used to release memory and destroy the component manager when the page is closed.
[0022] Furthermore, the process edge information of the page specifically includes the ID of the previous component connected to the process edge, the data transmitted by the previous component, the triggering event of the previous component, the ID of the next component, and the execution method ID of the next component.
[0023] Furthermore, the dictionary table specifically includes the following fields: component ID, component declaration ID, component execution method ID, and the execution code block corresponding to the component execution method ID, wherein the execution code block is obtained from the component template library.
[0024] Furthermore, the execution module is specifically configured to: sequentially read the processes in the process table for execution, find the component to be executed based on the process edge information, and then sequentially find the corresponding specific component execution code block from the dictionary table through component ID, component declaration ID, and component execution method ID, and run its logic.
[0025] Furthermore, the component manager also stores various state attributes of each component of the page, including initialization state, uninitialization state, running state, and idle state.
[0026] The present invention has the following advantages: by using a predefined component template library on the Android platform, the component data in the page configuration file is associated with the specific component execution code block in the component template library during page initialization. Then, the execution methods of the specific components are called and executed sequentially according to the flow data in the page configuration file, thereby realizing the orderly control of components by the Android platform, improving the efficiency of Android software development, and storing the data in memory. When the page is closed, the memory is released, saving memory. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating the execution of a component control method for the Android platform according to the present invention.
[0028] Figure 2This is a logic block diagram of a component control system for an Android platform according to the present invention. Detailed Implementation
[0029] Example 1:
[0030] This application proposes a no-code development method that predefines page configuration files using flowcharts and then controls the specific implementation of components on the Android platform through a component control method, thereby completing the software development and upgrade process.
[0031] like Figure 1 As shown, a component control method for the Android platform is provided. The Android platform has a component template library, which defines the execution code blocks of various types of components. Each page is predefined using a flowchart to form a configuration file. The configuration file includes page deployment data, component data, and flow data. The page deployment data is parsed on the Android platform and stored in a database. The component declarations in the component data correspond to the execution code blocks of the components in the component template library. In other words, the execution code blocks of various types of components are pre-written into the component template library, so that the components in each configuration file can find their corresponding execution code blocks in the component template library, so as to complete the development operation on the Android platform.
[0032] The method includes the following steps:
[0033] Step 1: When a page needs to be loaded, a memory area is pre-allocated for the page to store the page's component data and process data;
[0034] Step 2: Obtain the page deployment data from the database and the UI components from the corresponding component data in the memory area, initialize the UI components, and generate the UI page;
[0035] Step 3: While loading the page, generate a component manager. The component manager includes a dictionary table and a process table. The dictionary table stores the component data of the page and the corresponding component execution code blocks in the component template library. The process table stores the process edge information of the page. The process edge information of the page specifically includes the ID of the previous component connected to the process edge, the data passed by the previous component, the event triggered by the previous component, the ID of the next component, and the execution method ID of the next component. The dictionary table specifically includes the following fields: component ID, component declaration ID, component execution method ID, and the execution code block corresponding to the component execution method ID. The execution code block is obtained from the component template library.
[0036] Step 4: Read the processes in the process table sequentially and execute them. Call the execution code block corresponding to the component in the dictionary table according to the process edge information and execute it.
[0037] Step 5: When the page is closed, release memory and destroy the component manager.
[0038] Example 2:
[0039] Based on Embodiment 1, Embodiment 2 of this application provides a more specific component control method for the Android platform, including:
[0040] Step 1: When a page needs to be loaded, a memory area is pre-allocated for the page to store the page's component data and process data.
[0041] Step 2: Obtain the page deployment data from the database and the UI components from the corresponding component data in the memory area, initialize the UI components, and generate the UI page.
[0042] Step 3: While loading the page, generate a component manager. The component manager includes a dictionary table and a process table. The dictionary table stores the component data of the page and the corresponding component execution code blocks in the component template library. The process table stores the process edge information of the page.
[0043] Step 4: Read the processes in the process table sequentially and execute them. Call the execution code block corresponding to the component in the dictionary table according to the process edge information and execute it.
[0044] Step 4 specifically involves: sequentially reading and executing the processes in the process table, finding the component to be executed based on the process edge information, and then sequentially finding the corresponding specific component execution code block from the dictionary table through component ID, component declaration ID, and component execution method ID, and running its logic.
[0045] Step 5: When the page is closed, release memory and destroy the component manager.
[0046] The component manager also stores various state attributes of each component on the page, including initialized state, uninitialized state, running state, and idle state. These state attributes can be freely changed by triggering events. For example, after a UI component is initialized, its state attribute is initialized. If its triggering event is a click event, and the UI component's state attribute is set to uninitialized after being clicked, then the UI component becomes invisible after being clicked.
[0047] It should be noted that the parts in this embodiment that are the same as or similar to those in Embodiment 1 can be referred to each other, and will not be repeated in this application. Example 3:
[0048] like Figure 2 As shown, based on Embodiment 2, Embodiment 3 of this application provides a component control system for an Android platform. The Android platform is provided with a component template library, which defines the execution code blocks of various types of components. Each page is predefined using a flowchart to form a configuration file. The configuration file includes page deployment data, component data, and process data. The page deployment data is parsed on the Android platform and stored in a database. The component declarations in the component data correspond to the execution code blocks of the components in the component template library.
[0049] The system includes:
[0050] The memory module is used to pre-allocate a memory area for a page when it needs to be loaded, for storing the component data and process data of the page;
[0051] The page deployment module is used to obtain page deployment data from the database and UI components from the corresponding component data in the memory area, initialize the UI components, and generate UI pages;
[0052] The component manager production module is used to generate a component manager while loading a page. The component manager includes a dictionary table and a process table. The dictionary table stores the component data of the page and the corresponding component execution code blocks in the component template library. The process table stores the process edge information of the page. The process edge information of the page specifically includes the ID of the previous component connected to the process edge, the data passed by the previous component, the trigger event of the previous component, the ID of the next component, and the execution method ID of the next component. The dictionary table specifically includes the following fields: component ID, component declaration ID, component execution method ID, and the execution code block corresponding to the component execution method ID. The execution code block is obtained from the component template library.
[0053] The execution module is used to sequentially read the processes in the process table and execute them, and to call the execution code block corresponding to the component in the dictionary table according to the process edge information to execute it.
[0054] It should be noted that the system provided in this embodiment is the system corresponding to the method provided in embodiment 2. Therefore, the parts in this embodiment that are the same as or similar to those in embodiment 2 can be referred to each other, and will not be described again in this application.
[0055] Example 4:
[0056] Based on Embodiment 3, Embodiment 4 of this application provides a more specific component control system for the Android platform, including:
[0057] The memory module is used to pre-allocate a memory area for a page when it needs to be loaded, for storing the component data and process data of the page;
[0058] The page deployment module is used to obtain page deployment data from the database and UI components from the corresponding component data in the memory area, initialize the UI components, and generate UI pages;
[0059] The component manager production module is used to generate a component manager while loading a page. The component manager includes a dictionary table and a process table. The dictionary table stores the component data of the page and the component execution code block corresponding to the component data in the component template library. The process table stores the process edge information of the page.
[0060] The execution module is used to sequentially read and execute the processes in the process table, and call the corresponding execution code block of the component in the dictionary table according to the process edge information to execute it. Specifically, the execution module reads and executes the processes in the process table, finds the component to be executed according to the process edge information of the process, and then finds the corresponding specific component execution code block in the dictionary table in sequence through component ID, component declaration ID, and component execution method ID to run its logic.
[0061] The destroy module is used to release memory and destroy the component manager when the page is closed.
[0062] The component manager also stores the status attributes of each component of the page, including initialization status, uninitialization status, running status, and idle status.
[0063] It should be noted that the parts in this embodiment that are the same as or similar to those in Embodiment 3 can be referred to each other, and will not be repeated in this application.
[0064] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A component control method for the Android platform, characterized in that: The Android platform has a component template library, which defines the execution code blocks of various types of components. Each page is predefined using a flowchart to form a configuration file. The configuration file includes page deployment data, component data, and process data. The page deployment data is parsed on the Android platform and stored in the database. The component declarations in the component data correspond to the execution code blocks of the components in the component template library. The method includes the following steps: Step 1: When a page needs to be loaded, a memory area is pre-allocated for the page to store the page's component data and process data; Step 2: Obtain the page deployment data from the database and the UI components from the corresponding component data in the memory area, initialize the UI components, and generate the UI page; Step 3: While loading the page, generate a component manager. The component manager includes a dictionary table and a process table. The dictionary table stores the component data of the page and the corresponding component execution code block in the component template library. The process table stores the process edge information of the page. Step 4: Read the processes in the process table sequentially and execute them. Call the execution code block corresponding to the component in the dictionary table according to the process edge information and execute it. Specifically, Step 4 is: Read the processes in the process table sequentially and execute them. Find the component to be executed according to the process edge information of the process. Then find the corresponding specific component execution code block in the dictionary table in sequence through component ID, component declaration ID, and component execution method ID and run its logic. Step 5: When the page is closed, release memory and destroy the component manager.
2. The component control method for an Android platform according to claim 1, characterized in that: The process edge information of the page specifically includes the ID of the previous component connected to the process edge, the data transmitted by the previous component, the triggering event of the previous component, the ID of the next component, and the execution method ID of the next component.
3. The component control method for an Android platform according to claim 1, characterized in that: The dictionary table specifically includes the following fields: component ID, component declaration ID, component execution method ID, and the execution code block corresponding to the component execution method ID, wherein the execution code block is obtained from the component template library.
4. The component control method for an Android platform according to claim 1, characterized in that: The component manager also stores various state attributes of each component of the page, including initialization state, uninitialized state, running state, and idle state.
5. A component control system for the Android platform, characterized in that: The system is used to perform the method according to any one of claims 1 to 4, including: The memory module is used to pre-allocate a memory area for a page when it needs to be loaded, for storing the component data and process data of the page; The page deployment module is used to obtain page deployment data from the database and UI components from the corresponding component data in the memory area, initialize the UI components, and generate UI pages; The component manager production module is used to generate a component manager while loading a page. The component manager includes a dictionary table and a process table. The dictionary table stores the component data of the page and the component execution code block corresponding to the component data in the component template library. The process table stores the process edge information of the page. The execution module is used to sequentially read the processes in the process table and execute them, and to call the execution code block corresponding to the component in the dictionary table according to the process edge information to execute it. The destroy module is used to release memory and destroy the component manager when the page is closed.
6. A component control system for an Android platform according to claim 5, characterized in that: The process edge information of the page specifically includes the ID of the previous component connected to the process edge, the data transmitted by the previous component, the triggering event of the previous component, the ID of the next component, and the execution method ID of the next component.
7. A component control system for an Android platform according to claim 5, characterized in that: The dictionary table specifically includes the following fields: component ID, component declaration ID, component execution method ID, and the execution code block corresponding to the component execution method ID, wherein the execution code block is obtained from the component template library.
8. A component control system for an Android platform according to claim 5, characterized in that: The execution module is specifically used to sequentially read the processes in the process table and execute them, find the components to be executed based on the process edge information of the process, and then find the corresponding specific component execution code block from the dictionary table in sequence through component ID, component declaration ID, and component execution method ID, and run its logic.
9. A component control system for an Android platform according to claim 5, characterized in that: The component manager also stores various state attributes of each component of the page, including initialization state, uninitialized state, running state, and idle state.
Citation Information
Patent Citations
Cross-Web frame page logic assembly architecture and method
CN108519879A