Method, apparatus, device and readable storage medium for updating nested components
By adding independent attributes to the sub-components of nested components and generating a multi-level structure, the individual editing and updating of sub-components are realized, solving the infection problem during component updates in existing technologies and improving the construction efficiency and design experience of building models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GLODON CO LTD
- Filing Date
- 2023-06-01
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, the sub-components of nested components cannot be edited individually, resulting in low efficiency in building model construction, and the sub-components are prone to affecting the properties of other components when they are updated.
By adding independent attribute information to sub-components and generating multi-level structures in nested components, each level can be edited independently. The target sub-component level can be determined for editing and updating using component update items, avoiding non-independent attribute sub-components from depending on the upper-level components for updates.
It improves the efficiency of nested component creation, ensures that updates to child components do not affect other components, and enhances the ability to quickly build architectural models and the design experience.
Smart Images

Figure CN116661827B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided design technology, and more specifically to a method, apparatus, device, and readable storage medium for updating nested components. Background Technology
[0002] In typical architectural models, components are the basic units that make up the model. They are representations of reusable data structures and file storage structures composed of parametrically driven geometric and information descriptions; that is, each component has its corresponding attributes and geometry, belonging to a single-layer unit structure. However, for complex models, using only a single-layer unit structure (such as...) Figure 1 This hinders the accumulation of existing modeling results and reduces modeling efficiency. Therefore, a common way to improve efficiency is to combine, modularize, or nested components to solidify local modeling results into a resource library for use in later projects. Nested components contain data structures and file storage structures representing various single-layer unit structures. Nested components can have multiple levels, meaning that nested components can contain nested components within themselves.
[0003] In existing applications of nested components, the sub-components are stored according to their attribute information, such as... Figure 2 As shown, existing technology categorizes nested components into sub-components based on whether they are shareable. Ultimately, for components of the same category, those with shared attributes are grouped together, while those with non-shared attributes are grouped together. This approach has the following drawbacks in practice: 1. During the design process, the operability of embedded sub-components in the project is tightly coupled with file attributes, hindering the ability to quickly modify nested components; 2. Geometric parameters and non-geometric family parameters in sub-components cannot be directly modified through sub-component instances; 3. Sub-components can only expose their internal geometric parameters to the project environment through hierarchical binding to higher levels, resulting in low component creation efficiency; 4. The file attributes of sub-components mean that regardless of their layer depth, they will be replaced and updated by newly loaded components with the same name, which is undesirable in some scenarios.
[0004] There is currently no effective solution to the technical problem that the inability to edit sub-components individually hinders the rapid construction of building models. Summary of the Invention
[0005] The purpose of this invention is to provide a method, apparatus, device, and readable storage medium for updating nested components, which can solve the technical problem that the inability to edit sub-components individually is detrimental to the rapid construction of building models.
[0006] One aspect of the present invention provides a method for updating nested components, the method comprising: obtaining a first sub-component and a second sub-component, wherein the first sub-component has independent attribute information; deploying the first sub-component and the second sub-component hierarchically to generate a nested component, wherein each level of the nested component can be edited separately; receiving an update instruction for the nested component, wherein the update instruction includes component update items; determining a target sub-component in the nested component according to the component update items, and selecting the level corresponding to the target sub-component for editing, thereby updating the nested component.
[0007] Optionally, selecting the level corresponding to the target sub-component for editing includes: determining whether the target sub-component has independent attribute information, and selecting the level corresponding to the target sub-component for editing based on the determination result; if the target sub-component has independent attribute information, selecting the level of the nested component where the target sub-component is located for editing; if the target sub-component does not have independent attribute information, determining the first level of the target sub-component in the nested component, and selecting the sub-component with independent attributes at the previous level / same level of the first level for editing.
[0008] Optionally, if the target sub-component has independent attribute information, the target sub-component is selected for editing at the level of the nested component, including: starting from the highest level of the nested component, clicking down level by level until the level of the target sub-component is reached, and then replacing the component information corresponding to the target sub-component through the component update item.
[0009] Optionally, the first sub-component and the second sub-component are deployed hierarchically, including: creating a main component hierarchy, wherein the main component hierarchy is the highest level of nested components; embedding the second sub-component within the main component and associating the corresponding information between the second sub-component and the main component; and deploying the first sub-component as a child of the main component, starting from the main component hierarchy and proceeding downwards according to the hierarchical relationship of the first sub-component.
[0010] Optionally, after determining the target sub-component in the nested component based on the component update item, the method further includes: determining whether the target sub-component has independent attribute information to achieve targeted loading of the target sub-component; if the target sub-component does not have non-independent attributes, loading the nested component in the project environment and directly driving the instance parameters of the target sub-component and the nested component based on the loading operation; if the target sub-component has independent attributes, extracting the type parameters of the target sub-component and driving the target sub-component in reverse through the type parameters.
[0011] Optionally, after deploying the first and second sub-components hierarchically to generate nested components, the method further includes: classifying and storing the nested components according to the instance parameters of the sub-components.
[0012] Another aspect of the present invention provides an apparatus for updating nested components. The apparatus includes: an acquisition module for acquiring a first sub-component and a second sub-component, wherein the first sub-component has independent attribute information; a deployment module for hierarchically deploying the first sub-component and the second sub-component to generate nested components, wherein each level of the nested components can be edited individually; a receiving module for receiving an update instruction for the nested components, wherein the update instruction includes component update items; and an update module for determining a target sub-component in the nested components according to the component update items, and selecting the level corresponding to the target sub-component for editing, thereby updating the nested components.
[0013] Optionally, the deployment module is specifically used to: create a main component hierarchy, wherein the main component hierarchy is the highest level of nested components; embed the second sub-component within the main component and associate the corresponding information between the second sub-component and the main component; and deploy the first sub-component as a child of the main component, starting from the main component hierarchy and following the hierarchical relationship of the first sub-component downwards.
[0014] Another aspect of the present invention provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement a method for updating nested components of any of the above embodiments.
[0015] Another aspect of the present invention provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for updating nested components of any of the above embodiments. Further, the computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, etc.; and the data storage area may store data created based on the use of blockchain nodes, etc.
[0016] This invention improves the efficiency of creating complex nested components by adding independent attributes to child components as needed during the creation of nested components. Instance parameters can control the picking, editing, and replacement of child elements within the nested component unit within the project environment, and its geometry can be directly driven by the geometric parameters of the child components. Furthermore, it differentiates between child components with independent attributes and those with non-independent attributes during updates, preventing cross-contamination between different component types. Attached Figure Description
[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0018] Figure 1 A schematic diagram of an optional single-layer unit structure provided by the present invention is shown.
[0019] Figure 2 A schematic diagram of an optional structure for nested component storage in the prior art, as provided in the present invention, is shown.
[0020] Figure 3 A flowchart of an optional method for updating nested components provided in Embodiment 1 of the present invention is shown;
[0021] Figure 4 This diagram illustrates an optional application of nested component loading provided in Embodiment 1 of the present invention.
[0022] Figure 5 This diagram illustrates an optional application of nested component storage provided in Embodiment 1 of the present invention.
[0023] Figure 6 A structural block diagram of the nested component updating device provided in Embodiment 2 of the present invention is shown; and
[0024] Figure 7 A block diagram of a computer device suitable for implementing a nested component update method, as provided in Embodiment 3 of the present invention, is shown. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.
[0026] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0027] Example 1
[0028] This embodiment provides a method for updating nested components. Figure 3A flowchart illustrating the update method for this nested component is shown, as follows: Figure 3 As shown, the method for updating the nested component may include steps S301 to S304, wherein:
[0029] Step S301: Obtain the first sub-component and the second sub-component, wherein the first sub-component has independent attribute information;
[0030] Specifically, the first sub-component can be a single-layer unit structure or a nested component, i.e., a complex multi-layer unit structure, while the second sub-component is the basic geometry. The first sub-component contains instance project information and basic geometry information, which can be obtained by drawing it in design software or by filtering from existing components in a database. The number and structure of the first and second sub-components are determined by the actual scenario requirements and are not limited here.
[0031] Specifically, an independent attribute means that the corresponding component can be loaded, edited, and picked up independently within the project environment. Furthermore, when loading, editing, or picking other components, sub-components with independent attributes will not be affected. Conversely, sub-components without independent attributes cannot be processed independently and must be edited or loaded by attaching to their parent components. In actual Building Information Modeling (BIM), independent attributes can be marked using text, emphasis symbols / colors, etc., without further restrictions here.
[0032] Step S302: Deploy the first sub-component and the second sub-component hierarchically to generate nested components, wherein each level of the nested components can be edited separately;
[0033] Since single-layer unit structures are not conducive to the accumulation of existing modeling results, they need to be combined into higher-level structures to more accurately represent actual buildings. The hierarchical deployment of the first and second sub-components is determined by the actual scene requirements; it can be a parallel structure or a parent-child structure. The structure formed by combining the first and second sub-components serves as the main structure. Instance information of the main structure is arranged according to scene requirements, ultimately resulting in nested components. Specifically, nested components are multi-layer unit structures.
[0034] Preferably, step S302 may include steps S3021 to S3023, wherein:
[0035] Step S3021: Create the main component level, where the main component level is the highest level of the nested components;
[0036] Among them, the main component level represents the level in which the nested components are located.
[0037] Step S3022: Embed the second sub-component into the main component and associate the corresponding information between the second sub-component and the main component;
[0038] Since the second sub-component has no independent attributes and cannot be processed independently during updates, it is bound to the main component to establish a relationship between the two, so that when updating the second sub-component, it can be achieved by updating the main component.
[0039] Step S3023: The first sub-component is used as a child of the main component. Starting from the main component level, the components are deployed downwards level by level according to the hierarchical relationship of the first sub-component.
[0040] The first sub-component can be a single-layer unit structure or a multi-layer unit structure, i.e., a nested component.
[0041] When the first sub-component is a single-layer unit structure, the first sub-component is deployed one level down from the main component level as the starting node.
[0042] When the first sub-component is a multi-layer unit structure, the main component level is taken as the starting node, and the corresponding level nodes are established according to the number of levels of the first sub-component. The component information corresponding to each level of the first sub-component is then associated with the corresponding level nodes in sequence.
[0043] By setting nested components as a multi-level structure and assigning independent properties to the first child component, each level of child component can be processed independently. This eliminates the need to bind the information of the parent component of each child component to update the information when updating a child component at a single level, thus improving the efficiency of model construction.
[0044] Step S303: Receive update instructions for nested components, wherein the update instructions include component update items;
[0045] The component update item is the project information that needs to be updated for the currently nested component. It can be type parameters or geometric attribute information, and there are no restrictions here.
[0046] Step S304: Determine the target sub-component in the nested component according to the component update item, and select the level corresponding to the target sub-component for editing, so as to update the nested component.
[0047] The target sub-component can be the first sub-component or the second sub-component, or it can be the structure formed by combining the first sub-component and the second sub-component, i.e., the main structure.
[0048] In this embodiment, when obtaining component update items, the update items do not directly replace the corresponding information in nested components. Instead, the target sub-component is first identified within the nested components using the update items. Then, the attribute information of the target sub-component is evaluated, and the corresponding level is selected for editing. This ensures that only the target sub-component at the selected level is processed individually, without affecting / infecting the structural information of other components outside the target sub-component. This improves the user's design experience and facilitates the rapid construction of architectural models.
[0049] Preferably, step S304 may include steps S3041 to S3043, wherein:
[0050] Step S3041: Determine whether the target sub-component has independent attribute information, and select the corresponding level of the target sub-component for editing based on the determination result;
[0051] Different target sub-components have different attribute information, and their corresponding update methods are also different. By determining whether the target sub-component has independent attribute information, the corresponding level can be selected for editing in the nested components, so as to realize targeted updates of different types of sub-components and improve the efficiency of model construction.
[0052] Step S3042: If the target sub-component has independent attribute information, select the target sub-component and edit it at the level where the nested component is located;
[0053] Preferably, starting from the highest level of the nested components, the selection proceeds downwards level by level until the level of the target sub-component is reached. Once the selection ends, the component information corresponding to the target sub-component is replaced through the component update item.
[0054] Specifically, the nested hierarchical structure is inherited within the project environment. Using a combination of keyboard shortcuts and mouse operations, starting from the highest level of the nested components (i.e., the level of the main component), selection proceeds downwards level by level. The selection ends when the target sub-component's level is reached. Within the target sub-component's level, all component information is traversed, parameters matching the component's update item type are retrieved, and the retrieved parameters are replaced using the component update item.
[0055] Step S3043: If the target sub-component does not have independent attribute information, determine the first level of the target sub-component in the nested components, and select the sub-component with independent attributes in the upper level / same level of the first level for editing.
[0056] Since the target sub-component lacks independent attribute information, it cannot be processed independently and needs to be updated in conjunction with other components. In this embodiment, the update object of this type of target sub-component is set to its parent component or an independent sub-component at the same level (i.e., a sub-component with independent attributes). Furthermore, the target sub-component is embedded within nested components, and its parent component can be the main component.
[0057] It should be noted that for sub-components with independent attributes, if the category of the component update item is a type parameter, the component information of the target sub-component's level is used to match the component update item to update the target sub-component.
[0058] If the category of the component update item is an instance parameter, there are two update methods:
[0059] One approach is to match the component instance parameters of the target sub-component's hierarchy with the component update items. When a match is found, the corresponding instance parameters are replaced through the component update items to update the target sub-component.
[0060] Another approach is to match the type parameters of the parent component of the target sub-component with the component update item. When a match is successful, the corresponding type parameters are replaced through the component update item to update the target sub-component.
[0061] Both of the above update methods can be processed separately in the corresponding sub-component hierarchy, which is beneficial for the real-time editing needs of nested components, thereby improving the efficiency of model construction.
[0062] When using component update items for overwrite updates, select the nested main component and the selected child components that need to be updated or replaced. Once the information or geometry of that child component is updated through the main component, the main component and all child component instances will be refreshed, along with the corresponding update type information. Direct replacement of child components or sub-nested components is prevented within the project environment. Instead, a method of replacing within the nested main component and then synchronously updating to the project environment is used to distinguish scenarios where unified updates of child components should not be affected.
[0063] Preferably, the method further includes steps A1 to A3, wherein:
[0064] Step A1: Determine whether the target sub-component has independent attribute information in order to achieve targeted loading of the target sub-component;
[0065] After determining the target sub-component within the nested components based on the component update items, the update process for the target sub-component needs to be executed. The first step in component updating is loading the component. Components with different attribute information are loaded in different ways. By determining whether the target sub-component has independent attribute information, a loading process adapted to the corresponding application scenario is executed.
[0066] Step A2: If the target sub-component has no non-independent properties, load the nested component in the project environment and directly drive the instance parameters of the target sub-component and the nested component based on the loading operation.
[0067] Non-independent sub-components are embedded within the main component, and their loading operations are bound to the main component. In the project environment, the nested component is loaded first, the main component type of the nested component is extracted, and the instances and target sub-components of the nested component are directly driven by the main component type. This type of sub-component cannot be driven by its type parameters extracted independently.
[0068] Step A3: If the target sub-component has independent attributes, extract the type parameters of the target sub-component and use the type parameters to drive the target sub-component in reverse.
[0069] Independent sub-components can be loaded separately. Specifically, in the project environment, the target sub-component at the corresponding location can be selected directly through UI (User Interface) interaction, the type parameter of the target sub-component can be extracted, and the target sub-component can be driven in reverse by the type parameter.
[0070] The purpose of setting different loading operations is to avoid information contamination between different sub-components, while also improving the construction efficiency of building models.
[0071] Figure 4 A schematic diagram illustrating the loading process of nested components is shown, such as... Figure 4 As shown, the loading process is divided into two stages: the component creation stage and the component loading stage. Specifically, in the component creation stage, sub-components are created and saved according to user requirements. These sub-components support component upgrades without destroying the component's own data. Then, the main component is created based on the sub-components, and project-independent properties are set in the sub-component instances. In the component loading stage, nested components are loaded in the project environment. Different loading methods are executed depending on whether the sub-components are independent. For non-independent sub-components, the main component type of the nested component is extracted, and the main component instance and non-independent sub-components are obtained. For independent sub-components, the type and type parameters are first abstracted from the independent sub-component to form the independent sub-component type, and the independent sub-components are driven in reverse based on this independent sub-component type.
[0072] Preferably, the method further includes step B1, wherein:
[0073] Step B1: Categorize and store nested components according to the instance parameters of the sub-components.
[0074] After generating nested components, the nested components are categorized and stored according to the instance parameters of the sub-components. Figure 5 A schematic diagram of an application of nested component storage is shown, such as... Figure 3As shown, nested components are divided into sub-components A and B. Both sub-components A and B include independent and non-independent attributes (embedded within the main component). Sub-components A and B belong to different instances, therefore they are stored separately. This method, by separately marking sub-components with independent attributes, ensures that even if the two types of parameters (such as sub-component instance A1-1 and sub-component instance A1-2) are stored in the same folder, their updates will not affect each other, thus accelerating the efficiency of model construction.
[0075] Furthermore, in the project environment, for update operations on independent sub-components, the sub-component type in nested components can be switched, the connection relationship between nested components can be accurately expressed, the relationship between nested components and sub-components and other components can be switched, and the view visibility of the main component and sub-components can be controlled separately.
[0076] By following the steps above, we can improve the creation of nested components and their application logic in the project environment. This will enhance the efficiency of creating complex nested components and make them more flexible in the project environment. It will also inherit the nesting hierarchy structure set by the nested components and retain the connection and deduction relationships between nested components and child components, and between child components.
[0077] This embodiment improves the efficiency of creating complex nested components by adding independent attributes to child components as needed during the nested component creation process. Instance parameters can control the characteristics of this nested component unit, such as whether its child elements can be picked, edited, and replaced in the project environment. Its geometry can also be directly driven by the geometric parameters of the child components, thus improving the efficiency of creating complex nested components. Furthermore, it differentiates between child components with independent attributes and those with non-independent attributes during updates, avoiding the possibility of infection between different types of components during updates.
[0078] Example 2
[0079] Embodiment 2 of the present invention also provides a nested component updating device, which corresponds to the nested component updating method provided in Embodiment 1 above. The corresponding technical features and effects are not detailed in this embodiment; relevant aspects can be referred to in Embodiment 1 above. Specifically, Figure 6 A structural block diagram of the updating device for the nested component is shown. Figure 6 As shown, the nested component update device 600 includes an acquisition module 601, a deployment module 602, a receiving module 603, and an update module 604, wherein:
[0080] The acquisition module 601 is used to acquire the first sub-component and the second sub-component, wherein the first sub-component has independent attribute information;
[0081] The deployment module 602, connected to the acquisition module 601, is used to deploy the first sub-component and the second sub-component hierarchically to generate nested components, wherein each level of the nested components can be edited separately;
[0082] The receiving module 603, connected to the deployment module 602, is used to receive update instructions for nested components, wherein the update instructions include component update items;
[0083] The update module 604, connected to the receiving module 603, is used to determine the target sub-component in the nested component according to the component update item, and select the level corresponding to the target sub-component for editing, so as to realize the update of the nested component.
[0084] Optionally, the update module includes: a judgment submodule, used to determine whether the target sub-component has independent attribute information, and select the corresponding level of the target sub-component for editing based on the judgment result; a first update submodule, used to select the level of the nested component where the target sub-component is located for editing if the target sub-component has independent attribute information; and a second update submodule, used to determine the first level of the target sub-component in the nested component if the target sub-component does not have independent attribute information, and select the sub-component with independent attributes at the upper level / same level of the first level for editing.
[0085] Optionally, the first update submodule is specifically used to: start from the highest level of the nested components, select down level by level until the level where the target sub-component is located is reached, and then replace the component information corresponding to the target sub-component through the component update item.
[0086] Optionally, the deployment module is specifically used to: create a main component hierarchy, wherein the main component hierarchy is the highest level of nested components; embed the second sub-component within the main component and associate the corresponding information between the second sub-component and the main component; and deploy the first sub-component as a child of the main component, starting from the main component hierarchy and following the hierarchical relationship of the first sub-component downwards.
[0087] Optionally, the device further includes a loading module, used to: determine whether the target sub-component has independent attribute information in order to achieve targeted loading of the target sub-component; if the target sub-component does not have non-independent attributes, load the nested component in the project environment and directly drive the instance parameters of the target sub-component and the nested component according to the loading operation; if the target sub-component has independent attributes, extract the type parameters of the target sub-component and drive the target sub-component in reverse through the type parameters.
[0088] Optionally, the device also includes a storage module, specifically used for: classifying and storing nested components according to the instance parameters of the sub-components.
[0089] Example 3
[0090] Figure 7 A block diagram of a computer device suitable for implementing a nested component update method, as provided in Embodiment 3 of the present invention, is shown. In this embodiment, the computer device 700 may be a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including standalone servers or server clusters composed of multiple servers), etc., that executes a program. Figure 7 As shown, the computer device 700 in this embodiment includes, but is not limited to, a memory 701, a processor 702, and a network interface 703 that are communicatively connected to each other via a system bus. It should be noted that... Figure 7 Only a computer device 700 with components 701-703 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0091] In this embodiment, the memory 703 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 701 may be an internal storage unit of the computer device 700, such as the hard disk or memory of the computer device 700. In other embodiments, the memory 701 may also be an external storage device of the computer device 700, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 700. Of course, the memory 701 may also include both the internal storage unit and the external storage device of the computer device 700. In this embodiment, the memory 701 is typically used to store the operating system and various application software installed on the computer device 700, such as program code for updating nested components.
[0092] In some embodiments, processor 702 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. Processor 702 is typically used to control the overall operation of computer device 700. For example, it performs control and processing related to data interaction or communication with computer device 700. In this embodiment, processor 702 is used to run program code for steps of an update method for nested components stored in memory 701.
[0093] In this embodiment, the method for updating nested components stored in memory 701 can also be divided into one or more program modules and executed by one or more processors (processor 702 in this embodiment) to complete the present invention.
[0094] Network interface 703 may include a wireless network interface or a wired network interface, which is typically used to establish a communication link between computer device 700 and other computer devices. For example, network interface 703 is used to connect computer device 700 to an external terminal via a network, establishing a data transmission channel and communication link between computer device 700 and the external terminal. The network may be an intranet, the Internet, Global System for Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.
[0095] Example 4
[0096] This embodiment also provides a computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., which stores a computer program, and when the computer program is executed by a processor, it implements the steps of a method for updating nested components.
[0097] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.
[0098] It should be noted that the sequence numbers of the embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0100] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for updating nested components, characterized in that, The method includes: Obtain the first sub-component and the second sub-component, wherein the first sub-component has independent attribute information; The first sub-component and the second sub-component are deployed hierarchically to generate nested components, wherein each level of the nested components can be edited individually; Receive an update instruction for the nested component, wherein the update instruction includes a component update item; The target sub-component is determined in the nested component according to the component update item, and the level corresponding to the target sub-component is selected for editing to update the nested component; The step of selecting the level corresponding to the target sub-component for editing includes: Determine whether the target sub-component has independent attribute information, and select the corresponding level of the target sub-component for editing based on the determination result; If the target sub-component has independent attribute information, select the target sub-component to edit at the level of the nested component; If the target sub-component does not have independent attribute information, determine the first level of the target sub-component in the nested components, and select the sub-component with independent attributes in the upper level / same level of the first level for editing; After determining the target sub-component in the nested component based on the component update item, the method further includes: Determine whether the target sub-component has independent attribute information in order to achieve targeted loading of the target sub-component; If the target sub-component has no non-independent attributes, the nested component is loaded in the project environment, and the instance parameters of the target sub-component and the nested component are directly driven according to the loading operation; If the target sub-component has independent attributes, extract the type parameters of the target sub-component and use the type parameters to drive the target sub-component in reverse.
2. The method according to claim 1, characterized in that, If the target sub-component has independent attribute information, selecting the target sub-component for editing at the level of the nested component includes: Starting from the highest level of the nested components, click down level by level until the level of the target sub-component is reached. Once the click ends, the component information corresponding to the target sub-component is replaced through the component update item.
3. The method according to claim 1, characterized in that, The hierarchical deployment of the first sub-component and the second sub-component includes: Create a master component hierarchy, wherein the master component hierarchy is the highest level of the nested components; The second sub-component is embedded in the main component, and the corresponding information between the second sub-component and the main component is associated. The first sub-component is used as a child of the main component, and the main component level is used as the starting node to deploy the components downwards level by level according to the hierarchical relationship of the first sub-component.
4. The method according to any one of claims 1-3, characterized in that, After hierarchically deploying the first sub-component and the second sub-component to generate nested components, the method further includes: The nested components are categorized and stored according to the instance parameters of the sub-components.
5. A device for updating nested components, characterized in that, The device includes: The acquisition module is used to acquire a first sub-component and a second sub-component, wherein the first sub-component has independent attribute information; The deployment module is used to deploy the first sub-component and the second sub-component hierarchically to generate nested components, wherein each level of the nested components can be edited separately; A receiving module is configured to receive an update instruction from the nested component, wherein the update instruction includes a component update item; An update module is used to determine a target sub-component in the nested component according to the component update item, and select the level corresponding to the target sub-component for editing, so as to update the nested component; The update module is further configured to determine whether the target sub-component has independent attribute information, and select the corresponding level of the target sub-component for editing based on the determination result; if the target sub-component has independent attribute information, select the level of the target sub-component in the nested component for editing; if the target sub-component does not have independent attribute information, determine the first level of the target sub-component in the nested component, and select the sub-component with independent attributes in the upper level / same level of the first level for editing; The update module is further configured to determine whether the target sub-component has independent attribute information in order to achieve targeted loading of the target sub-component; if the target sub-component does not have non-independent attributes, the nested component is loaded in the project environment, and the instance parameters of the target sub-component and the nested component are directly driven according to the loading operation; if the target sub-component has independent attributes, the type parameters of the target sub-component are extracted, and the target sub-component is driven in reverse through the type parameters.
6. The apparatus according to claim 5, characterized in that, The deployment module is specifically used for: Create a master component hierarchy, wherein the master component hierarchy is the highest level of the nested components; The second sub-component is embedded in the main component, and the corresponding information between the second sub-component and the main component is associated. The first sub-component is used as a child of the main component, and the main component level is used as the starting node to deploy the components downwards level by level according to the hierarchical relationship of the first sub-component.
7. A computer device, the computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the method according to any one of claims 1 to 4.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 4.