Configuration method of custom component, electronic equipment and computer program product

By obtaining and configuring the business logic of custom components, the problem that custom components in low-code platforms need to configure back-end business logic separately is solved, and the reuse efficiency of custom components is improved.

CN120179232APending Publication Date: 2025-06-20BEIJING XINGYUN DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510266817.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The existing low-code application development platform needs to configure back-end business logic separately for custom components, resulting in low reuse efficiency of custom components in the platform.

Method used

By responding to the configuration instructions of the custom component, obtaining component metadata, and configuring the business logic executed by the custom component based on this configuration, the mapping relationship between the business logic and the component is determined, thereby determining the configuration information of the custom component.

Benefits of technology

Cohesive business logic into custom components, avoid secondary configuration of business logic for custom components during design orchestration, and improve the reuse efficiency of custom components in low-code application development platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179232A_ABST
    Figure CN120179232A_ABST
Patent Text Reader

Abstract

The invention discloses a configuration method of a custom component, electronic equipment, a storage medium and a program product.The method comprises the steps that in response to a received configuration instruction of the custom component, component metadata of the custom component is obtained; based on the component metadata, configuring a service logic executed by the custom component, and determining a mapping relationship between the service logic and the custom component; and determining configuration information of the custom component based on the business logic and the mapping relationship. Therefore, the service logic is cohered into the custom component, and secondary configuration for the service logic of the custom component is not needed, so that the reuse efficiency of the custom component in a low-code application development platform is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of software development, and in particular, to a configuration method for custom components, an electronic device, and a computer program product. Background Art

[0002] Low-code application development platforms simplify the application development process through graphical interfaces and visual development tools. A large number of out-of-the-box components are built into the platform for developers to use directly. Since the business scenarios of each application are different, it is difficult for the built-in components to fully cover all business requirements. Therefore, low-code platforms need to have component extension capabilities so that users can develop custom components according to specific needs.

[0003] Currently, the component extension capabilities of low-code application development platforms are mainly reflected in providing front-end development scaffolds, supporting front-end event binding, design-time configuration, and allowing users to customize the front-end user interface (UI) and the interaction methods with the UI according to their needs, so as to meet different business requirements. However, most platforms only provide the extension capabilities for customizing the UI of components. When using custom components, additional back-end plugins related to the business still need to be supplemented, such as calling third-party services, implementing business rules, and performing form validation, resulting in low reuse efficiency of custom components in the platform. Summary of the Invention

[0004] The embodiments of the present application provide a configuration method for custom components, an electronic device, and a computer program product, so as to at least solve the problem that existing low-code application development platforms need to separately configure back-end business logics for custom components, and the reuse efficiency of custom components in the platform is relatively low.

[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows: In a first aspect, the embodiments of the present application provide a configuration method for custom components, including: in response to receiving a configuration instruction for a custom component, obtaining component metadata of the custom component; based on the component metadata, configuring business logics executed by the custom component, and determining a mapping relationship between the business logics and the custom component; based on the business logics and the mapping relationship, determining configuration information of the custom component.

[0006] In a second aspect, the embodiments of the present application provide an electronic device, including a processor, a memory, and a program or instruction stored on the memory and executable on the processor, where the program or instruction, when executed by the processor, implements the steps of the method as described in the first aspect above.

[0007] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect above are implemented.

[0008] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to execute the steps of the method described in the first aspect above.

[0009] In an embodiment of the present application, in response to receiving a configuration instruction for a custom component, component metadata of the custom component is obtained; based on the component metadata, the business logic executed by the custom component is configured, and the mapping relationship between the business logic and the custom component is determined; based on the business logic and the mapping relationship, the configuration information of the custom component is determined. In this way, the business logic (such as third-party services, business rules, form validation, etc.) is aggregated into the custom component, and the business logic is component-oriented rather than aspect-oriented, and there is no need to perform secondary configuration for the business logic of the custom component, thereby improving the reuse efficiency of the custom component in the low-code application development platform.

[0010] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0012] Figure 1 A flowchart showing the configuration method of the custom component provided by the embodiment of the present application; Figure 2 A schematic diagram showing the interaction process between the front-end view and the back-end provided by the embodiment of the present application; Figure 3 One of the example diagrams showing the mapping relationship between the front-end view and the back-end view layer provided by the embodiment of the present application; Figure 4 Another example diagram showing the mapping relationship between the front-end view and the back-end view layer provided by the embodiment of the present application; Figure 5 One of the schematic diagrams showing the structure of the custom component development scaffolding provided by the embodiment of the present application; Figure 6 Another schematic diagram showing the structure of the custom component development scaffolding provided by the embodiment of the present application; Figure 7The figure shows an example diagram of the configuration information of the custom component provided by the embodiment of the present application; Figure 8 The figure shows a schematic structural diagram of the custom component capability integration system provided by the embodiment of the present application; and Figure 9 The figure shows a schematic hardware structure diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners

[0013] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all the implementation manners consistent with the present application. On the contrary, they are merely examples of the devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0014] Currently, the component extension ability of the low-code application development platform generally provides a front-end implementation scaffolding, supports front-end event binding, design-state configuration, and can customize the implementation of the front-end UI and interaction, so as to meet the business requirements.

[0015] However, most low-code platforms are only limited to providing an extension ability to meet the user's need to write the UI of custom components. For general simple basic components and components with less business logic, there is no problem. However, in actual business development, in addition to the need to customize the UI, users also have the need for business logic including their own business, which includes third-party service calls, business rules, and back-end controls such as form verification. When users use custom components, they still need to separately configure the back-end controls related to the business, which affects the reuse of custom components.

[0016] Existing low-code platforms generally provide front-end logic extension in component business extension. Usually, it is implemented by executing js scripts front-end, but relying only on front-end extension has security problems on the one hand; on the other hand, it is limited by browser cross-domain security control.

[0017] There are also some low-code application development platforms that provide back-end logic extension, but this kind of extension is often an aspect-oriented extension for pages or applications. Therefore, developers of low-code platforms cannot well develop complete and cohesive custom components, resulting in the implementation of custom components still unable to fully meet business requirements.

[0018] In view of the problems existing in the component development process of the above-mentioned low-code application development platform, the embodiments of the present application provide a method for configuring a custom component. The method responds to receiving a configuration instruction for the custom component, and obtains the component metadata of the custom component; based on the component metadata, configures the business logic executed by the custom component, and determines the mapping relationship between the business logic and the custom component; based on the business logic and the mapping relationship, determines the configuration information of the custom component. In this way, the business logic is aggregated into the custom component, and the business logic is component-oriented rather than function-aspect-oriented, and there is no need to reconfigure the business logic for the custom component during the design-state orchestration, thereby improving the reuse efficiency of the custom component in the low-code application development platform.

[0019] Please refer to Figure 1 , Figure 1 which shows a schematic flowchart of the method for configuring a custom component provided by the embodiments of the present application. The execution subject of this method can be a terminal or a server. As shown in the figure, the method 100 for configuring a custom component may include the following steps: Step 101: Respond to receiving a configuration instruction for the custom component, and obtain the component metadata of the custom component.

[0020] In a specific implementation, the user forms an orchestration page by dragging components. Suppose a custom component for selecting a subsidiary department is developed on a low-code application development platform according to business needs. When the user selects or configures the custom component on the orchestration page, the front-end system will receive the configuration instruction for the custom component and request the component metadata of the custom component from the back-end. Among them, the component metadata may include the type, attributes, supported interaction behaviors (such as click, select, input, etc. events), display rules (such as the display or hiding rules of fields), etc. of the custom component.

[0021] Step 102: Based on the component metadata, configure the business logic executed by the custom component, and determine the mapping relationship between the business logic and the custom component.

[0022] Among them, the business logic may be business execution logics such as form value update updateValue, component status update updateStatus, component property update updateProps, event handling onEvent, and value echo handling displayValue, or service call logics such as third-party services, business rules, and form validations serviceCall.

[0023] In a specific implementation, based on the obtained component metadata, configure the business logic executed by the custom component. Among them, each component has its own backend view control class. Assuming that an object-oriented backend language is provided to the user, the front-end system will provide the backend view control class according to the language characteristics. The user can extend based on the provided backend view control class of the system to configure the business logic executed by the custom component. Among them, the extension methods include but are not limited to derivation, inheritance, or implementation. At the same time, to ensure the correct execution of the business logic, determine the mapping relationship between the business logic and the custom component.

[0024] Continuing with the above embodiment, assume that the company department selects a custom component and has the following requirements: 1) Be able to query the list of departments under different subsidiaries according to the identity of the operator. 2) The UI of this component is a dropdown tree selection. After clicking on a specified location, it will call a specified interface, query the list of subsidiaries' departments that the operator has permission to view according to the operator's identity, return it to the front-end UI, and present it as a tree-shaped selection interface for the operator to select. 3) Security requirements: When the value of the department selected by the operator is updated to the backend, it will be verified. If the value of the department does not conform to the operator's permissions, a prompt will be given and the backend model cannot be synchronized.

[0025] From the above requirements, it can be seen that the development content involved in this component includes: 1) The implementation of the front-end UI interaction requires the implementation of a dropdown tree. 2) For the data part, it depends on the query interface for subsidiaries' departments and is a dependency on a third-party service. 3) For the business part, there is a security verification. When the value is updated, the operator needs to be verified.

[0026] In the above embodiment, a tree-shaped dropdown selector can be implemented on the front end. In addition to the front-end implementation, several of its backend business logics include: clicking on the query box, opening the dropdown selection, initiating a query event searchEvent, and finally entering the corresponding backend onEvent method. The user initiates a serviceCall here to query the corresponding third-party service according to the operator's identity and obtain the list of departments that can be viewed. After the user selects a department, a value update event is generated and sent to the updateValue method of the backend view class to complete the verification logic.

[0027] Among them, the backend view class of the custom component bears the business logic of the component, completes the interaction with the front-end events, and can update the front-end view according to the written business logic; finally, it also depends on third-party services, such as the interface for the list of subsidiaries' departments.

[0028] Step 103: Determine the configuration information of the custom component based on the service logic and the mapping relationship.

[0029] In a specific implementation, based on the service logic completed according to the above configuration and the mapping relationship between the service logic and the custom component, determine the configuration information of the custom component. In this way, the service logic is aggregated into the custom component, and the service logic is component-oriented rather than aspect-oriented, so that there is no need to reconfigure the service logic for the custom component during design-time orchestration, improving the reuse efficiency of the custom component in the low-code application development platform.

[0030] In some embodiments, in the above step 101, in response to receiving a configuration instruction for a custom component, obtain the component metadata of the custom component, including: In response to receiving a configuration instruction for a custom component in the orchestration page, determine the identification information of the custom component; based on the identification information, obtain the component metadata of the custom component.

[0031] In a specific implementation, in response to a configuration instruction for a custom component in the orchestration page, determine the identification information of the custom component, which may be the unique encoding of the custom component. For example, SubDeptSelect. In the low-code application development platform, each component has a unique encoding. For example, the encoding of a single-line text component may be TextField. Furthermore, based on the identification information of the custom component, the corresponding component metadata can be obtained.

[0032] In some embodiments, in the above step 102, configure the service logic executed by the custom component based on the component metadata, including: Select a target view class base corresponding to the custom component from at least one view class base; configure the service logic executed by the custom component according to the component metadata and the target view class base.

[0033] Among them, the view class base is a base class used for inheritance by other view classes, which defines the basic functions and structures of view objects.

[0034] In a specific implementation, the low-code application development platform internally provides several types of view class bases according to the component type, such as form view class, container view class, table view class; these view classes can carry the service logic of the front-end component, store the state of the front-end component, and control the front-end view through a pre-agreed protocol. Select a target view class base corresponding to the custom component from the above view class bases. For example, for the above-mentioned custom component for selecting the department of a subsidiary company, the form view class can be used as the view class base, and this view class base can perform value update operations. Furthermore, configure the service logic executed by the custom component according to the component metadata and the selected target view class base.

[0035] In some embodiments, in step 102 above, the business logic includes at least one of executing business logic and service call logic; the executing business logic includes at least one of the following: form value update, component state update, component property update, event handling, and value echo handling.

[0036] In the above embodiment, when creating a backend view class, lifecycle hook methods can be implemented in the corresponding interfaces, such as beforeInit for performing operations before initialization and afterInit for performing related processing after initialization. The interaction process between the front-end view and the backend is as Figure 2 shown. The orchestration page includes a page form, and the page form includes components 1, 2,..., n. Each component corresponds to an instance of the backend view class. The interaction process includes the following steps: Step 201: Component n can send processing event, value, and status requests to the backend, and component n can also send processing third-party service call requests to the backend; Step 202: The instance of the backend view class of component n can execute business logic according to the events sent by the front end, such as verification, event handling, etc., and can also forward third-party service calls; among them, the instance of the backend view class contains the entry points for front-end events, value updates, and status updates. For example, it is abstracted into interfaces such as onEvent, updateValue, and updateProps; Step 203: The instance of the backend view class of component n can update the front-end view. For example, it can update the data of front-end controls, verification prompts, or update the state and properties of front-end components, such as controlling the hiding, showing, disabling, and read-only states of front-end elements.

[0037] In an actually running page, the page is often composed of multiple components; in the front-end view layer, they generally form a tree structure, which is the same as the dom structure of html; at the same time, the components also exist in form, table, and container types; for some complex container-type components, there will also be interactions and linkages with their internal sub-components. For the corresponding instances of the backend view class, they also need to be dynamically organized according to the structure of the front-end view. In this way, not only can each front-end component correspond to an instance of the backend view class, but also the organization and hierarchical relationship of the instances of the backend view class should correspond to the front-end view, so as to keep the front and back logics consistent in the interaction between components.

[0038] Therefore, not only does each component need to have a corresponding back-end view class instance, but also a method for dynamically generating the back-end view layer based on the structure arranged in the front-end page is required to configure the corresponding back-end view class instances of the front-end according to the organizational structure of the corresponding page. In some embodiments, in step 102 above, configuring the business logic executed by the custom component based on the component metadata includes: Determine the instance configuration area of at least one component in the arranged page and the relative position relationship between the instance configuration areas of the at least one component according to the page metadata of the arranged page; the at least one component includes a custom component; generate a view layer according to the instance configuration area of the at least one component and the relative position relationship between the instance configuration areas; determine the target instance configuration area of the custom component in the view layer according to the arrangement position information of the custom component in the arranged page; configure the business logic executed by the custom component in the target instance configuration area based on the component metadata.

[0039] Among them, for the structure arranged in the front-end page, its structure is usually a tree. If some multi-window concepts are involved, it is a forest; the nodes of the tree or forest are instances of a back-end control class corresponding to each component. This design seamlessly copies the structure of the front-end view to the back-end, and the interaction between components formally maintains the consistency between the front-end and the back-end.

[0040] In some embodiments, the arranged page includes an arrangement tree, and the arrangement tree is used to represent the position structure of at least one component in a single window; the determining the instance configuration area of at least one component in the arranged page and the relative position relationship between the instance configuration areas of the at least one component according to the page metadata of the arranged page includes: Determine the hierarchical relationship of the at least one component in the arrangement tree according to the page metadata of the arranged page; arrange the at least one component in the arranged page according to the hierarchical relationship of the at least one component in the arrangement tree to obtain the instance configuration area of the at least one component and the relative position relationship between the instance configuration areas of the at least one component.

[0041] In an exemplary embodiment, when the arranged page is an arrangement tree, its form is as Figure 3 shown. The position of the custom component for selecting the subsidiary department in the front-end view layer is the same as that in the back-end view layer.

[0042] In some other embodiments, the layout page includes a layout forest for characterizing the positional structure of at least one component in multiple forms; determining the instance configuration area of at least one component in the layout page and the relative positional relationship between the instance configuration areas of the at least one component according to the page metadata of the layout page includes: Determine the parent-child relationship between the multiple forms according to the page metadata of the layout page; determine the form instance area of each form according to the parent-child relationship between the multiple forms; arrange the components in the form according to the hierarchical relationship of the components in each form to obtain the instance configuration area of the components in the form instance area and the relative positional relationship between the instance configuration areas of the at least one component.

[0043] In an exemplary embodiment, when the layout page is a layout forest, the multi-form view may include a modal layer (e.g., a dialog box), the construction of an embedded form (e.g., an iframe), which is generally used as an independent view and forms a parent-child relationship with the main view, in the form of Figure 4 as shown. The creation of the entire view layer is consistent with the structure of the front-end page metadata. Among them, after the user finishes laying out the page, a piece of page metadata will be generated. Starting from the root node of the front-end page metadata, each hierarchical component's own view class instance and the view class instances of the sub-components it contains are recursively initialized from top to bottom, and finally the creation of the entire view layer is completed.

[0044] Among them, after generating the view layer according to the instance configuration area of the at least one component and the relative positional relationship between the instance configuration areas of the at least one component, it further includes: Determine the instance trigger conditions of each instance configuration area in the view layer and the form trigger conditions of the forms where each instance configuration area is located; determine the trigger paths of each instance configuration area based on the instance trigger conditions and the form trigger conditions.

[0045] In a specific implementation, the above instance trigger condition is that the interaction behavior (e.g., click, input, selection, etc.) of a certain front-end component (e.g., a button, an input box, etc.) triggers the operation logic of a specific back-end view instance; the form trigger condition is the condition that determines view update or data transfer between windows when certain events or actions occur in a specific form. After dynamically constructing the back-end view layer based on the front-end view structure, there is also a view management class, which defines corresponding interfaces for the above instance trigger conditions and form trigger conditions, including: 1) Determine the corresponding back-end component instance according to the front-end component id, and then call the interface of the corresponding instance; 2) The communication interface between multiple forms; 3) The form instance acquisition interface, etc.

[0046] A communication protocol between the front end and the back end can be established through the view management class. When the user operates on the front end, a series of value changes, events, and action information are generated by the front-end components. According to the protocol, through the view management class, they are passed to the corresponding view instance on the back end. These protocols include the ID of the triggered component, the event type, and the request parameters. Finally, they are passed to the corresponding view class instance, and the corresponding logic is processed, and the corresponding view update information is returned to synchronize the front end, and finally the front-end view is updated.

[0047] In this way, the implementation of the business logic of the front and back ends of the custom component can be uniformly aggregated together for the component. The writing of the business logic of the component can be aggregated with the component development process. The business logic that needs to be executed by the back end can be carried by the back-end view class of the component, without the need for additional configuration when arranging the page, thereby improving the reuse efficiency of the custom component in the low-code application development platform.

[0048] Moreover, through the construction and mapping of the above-mentioned back-end dynamic view layer, the view content can be dynamically generated according to user needs, thereby avoiding the exposure of unnecessary or sensitive information on the front end, improving the security of the system, and facilitating the extension and understanding of the back-end business logic.

[0049] The above mechanism can support the component cohesion-based development method, but in engineering, it can further support and simplify the development of custom components by users. There is currently a component development mode, generally called a development scaffold, which provides template project code for component development, supports the implementation of custom business components to be written out of the box, and is not limited to a specific front-end framework.

[0050] In some embodiments, after determining the configuration information of the custom component based on the business logic and the mapping relationship in step 103 above, it further includes: Obtain a custom component development scaffold; the custom component development scaffold includes component front-end code, component back-end code, and service registration resources. The component front-end code includes component metadata of the custom component. The component back-end code includes the configuration information of the custom component. The service registration resources include service registration information of a third-party service corresponding to the configuration information; Render the page of the custom component based on the component front-end code, load the business logic of the custom component based on the component back-end code, and configure, parse, and register the third-party service based on the service registration resources.

[0051] In an exemplary embodiment, taking the use of the Java language as the implementation language of the backend view class as an example, the custom component development scaffolding includes the component front-end code src / frontend, the component back-end code backend, and the service registration resource register-service.

[0052] Among them, the component front-end implementation and component metadata are stored in src / frontend, and the custom component back-end view class code is stored in backend. Optionally, the entire scaffolding can include multiple component implementations at once and be uploaded in the form of a component library. This custom component development scaffolding supports writing its own view control class according to a specific interface to implement its own business logic and complete the custom business component back-end view control class. In register-service / metadata.json, configure the third-party services required by the business component. This service registration resource can support multiple forms, including but not limited to network calls, db connections, file storage services, etc. The low-code application development platform is uniformly responsible for configuring, parsing, and registering the corresponding third-party services. After configuring the unique identifier, the front-end and back-end code can initiate calls through the service registration identifier. The configuration of the third-party service includes but not limited to the unique identifier code of the third-party service call, the name name of the third-party service, the type type of the service call, the access address url of the third-party service, the request method method, the request timeout time timeout, the request parameters requestParameters, and the response parameters responseParameters.

[0053] The above-mentioned custom component development scaffolding supports local integration with the low-code application development platform for development and debugging; during the development stage, users can configure the scaffolding address information, connect to the platform, and then perform development and debugging locally. As Figure 5 shown, the above-mentioned custom component development scaffolding can package the front-end implementation, back-end control class implementation, and service registration configuration together. The front-end implementation design-state configuration, back-end control class implementation, and service registration and other information are uniformly associated and configured by the custom component metadata description. Optionally, the above-mentioned custom component development scaffolding can also take several components as a component library unit to describe the third-party service resources required by several components.

[0054] In some embodiments, the custom component development scaffolding can be divided and output according to the component library as a unit. A component library includes several components, which can be packaged and output together, and a component library completes the installation of multiple custom components. As Figure 6As shown, taking the subsidiary department selection component in this embodiment as an example, if there are related components, such as the subsidiary reimbursement component and the subsidiary salary component, which all rely on the same interface and the same UI resources, then these three components can be regarded as a component library, packaged together, and installed on the low-code application development platform. In this way, the resources relied on by each custom component can be reused. Among them, as Figure 7 shown, the configuration information of each custom component includes the front-end and back-end implementation, the back-end view class, and the service registration resources it depends on.

[0055] After the custom component development scaffolding outputs the component product, it is the responsibility of the system component installation unit to install it. The installation unit obtains the component metadata, identifies the component encoding, the front-end implementation, the back-end implementation, and the third-party service configuration; for the front-end resources, they can be placed in the static server, and finally, on the user terminal, they are rendered by the execution unit; for the back-end implementation, the back-end component view class can be dynamically loaded through a dedicated classLoader (taking the Java language as an example); for the third-party service configuration, it is registered to the service forwarding module of the system; the installation unit maintains the mapping relationship between the component identifier and the back-end view class, so as to complete the creation of the back-end view layer.

[0056] Figure 8 shows a schematic structural diagram of the custom component capability integration system provided by the embodiment of the present application. This custom component capability integration system can be applied to the low-code application development platform and can implement all or part of the content in the embodiment as Figure 1 shown. This custom component capability integration system includes a back-end dynamic view layer construction unit, a service registration unit, and a component installation unit; The back-end dynamic view layer construction unit is used to construct the view layer based on the metadata of page layout, supporting multi-forms, nested forms, and modal layer (for example, pop-up window) forms; the service registration unit is used to configure, parse, and register the corresponding third-party services; the component installation unit is used to install custom components based on the pre-configured custom component library, supporting the mapping and registration of the component unique identifier and the back-end view class, and supporting the installation or update of the service registration information; among them, the custom component library is configured using the configuration method of the custom component as described above.

[0057] Figure 9The figure shows a schematic diagram of the hardware structure of the electronic device provided in the embodiments of the present application. Referring to this figure, at the hardware level, the electronic device 900 includes a processor 910. Optionally, it includes an internal bus 920, a network interface 930, and a memory 940. Among them, the memory 940 may include a memory 941, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory 942 (non-volatile memory), such as at least one disk memory, etc. Of course, the electronic device 900 may also include other hardware required for other services.

[0058] The processor 910, the network interface 930, and the memory can be interconnected through the internal bus 920. The internal bus 920 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only a bidirectional arrow is used in this figure, but it does not mean that there is only one bus or one type of bus.

[0059] The memory 940 stores programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory 940 may include a memory 941 and a non-volatile memory 942, and provide instructions and data to the processor 910.

[0060] The processor 910 reads the corresponding computer program from the non-volatile memory 942 into the memory and then runs it, forming a device for locating the target user at the logical level. The processor 910 executes the program stored in the memory and specifically executes: Figure 1 The method disclosed in the shown embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be elaborated here.

[0061] The above is as described in the present application Figure 1The method disclosed in the illustrated embodiment can be applied to or implemented by the processor 910. The processor 910 may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method can be completed by the integrated logic circuit in hardware or instructions in software form in the processor 910. The above-mentioned processor 910 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.

[0062] This computer device can also execute the various methods described in the foregoing method embodiments and achieve the functions and beneficial effects of the various methods described in the foregoing method embodiments, which will not be elaborated here.

[0063] Of course, in addition to the software implementation, the electronic device 900 of the present application does not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.

[0064] The embodiments of the present application also propose a computer-readable storage medium. The computer-readable medium stores one or more programs. When the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device is caused to execute Figure 1 the method disclosed in the illustrated embodiment and achieve the functions and beneficial effects of the various methods described in the foregoing method embodiments, which will not be elaborated here.

[0065] Among them, the computer-readable storage medium includes a read-only memory (ROM for short), a random access memory (RAM for short), a magnetic disk, an optical disc, etc.

[0066] Furthermore, the embodiment of the present application also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the following process is implemented: Figure 1 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be elaborated herein.

[0067] The embodiment of the present application can be applied to various scenarios of electronic device cooperation or interconnection, including: cooperation and interconnection between a mobile phone and a laptop / tablet computer; cooperation and interconnection between a mobile terminal and a smart TV / display; cooperation and interconnection between a mobile phone or a tablet computer and an in-vehicle entertainment system; cooperation and interconnection between a mobile terminal and a smart conference system, etc. Thus, it can meet the diverse scenario requirements of users in smart home, smart office, smart travel, etc.

[0068] In summary, the above are only the preferred embodiments of the present application, and do not limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0069] The systems, devices, modules or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0070] A computer-readable medium includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transitory medium that can store information accessible by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media such as modulated data signals and carrier waves.

[0071] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0072] Each embodiment in this specification is described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Claims

1. A method for configuring a custom component, characterized in that: include: In response to receiving a configuration instruction of a custom component, obtaining component metadata of the custom component; Based on the component metadata, configure the business logic executed by the custom component, and determine the mapping relationship between the business logic and the custom component; Based on the business logic and the mapping relationship, configuration information of the custom component is determined.

2. The method according to claim 1, characterized in that The step of obtaining component metadata of the custom component in response to receiving a configuration instruction of the custom component includes: In response to receiving a configuration instruction for a custom component in the arrangement page, determining identification information of the custom component; Based on the identification information, component metadata of the custom component is obtained.

3. The method according to claim 1, characterized in that The configuring the business logic executed by the custom component based on the component metadata includes: Selecting a target view class base class corresponding to the custom component from at least one view class base class; The business logic executed by the custom component is configured according to the component metadata and the target view class base class.

4. The method according to claim 1, characterized in that: The business logic includes at least one of execution business logic and service call logic; the execution business logic includes at least one of the following: form value update, component state update, component property update, event processing and value echo processing.

5. The method according to claim 1, characterized in that The configuring the business logic executed by the custom component based on the component metadata includes: Determining, according to page metadata of the arrangement page, an instance configuration area of ​​at least one component in the arrangement page, and a relative positional relationship between the instance configuration areas of the at least one component; the at least one component includes a custom component; Generate a view layer according to the instance configuration area of ​​the at least one component and the relative position relationship between the instance configuration areas; Determining a target instance configuration area of ​​the custom component in the view layer according to the arrangement position information of the custom component in the arrangement page; Based on the component metadata, the business logic executed by the custom component is configured in the target instance configuration area.

6. The method according to claim 5, characterized in that The arrangement page includes an arrangement tree, and the arrangement tree is used to represent the position structure of at least one component in a single window; determining the instance configuration area of ​​at least one component in the arrangement page and the relative position relationship between the instance configuration areas of the at least one component according to the page metadata of the arrangement page includes: Determining, according to the page metadata of the arrangement page, a hierarchical relationship of the at least one component in the arrangement tree; According to the hierarchical relationship of the at least one component in the orchestration tree, at least one component in the orchestration page is arranged to obtain instance configuration areas of the at least one component and relative positional relationships between instance configuration areas of the at least one component.

7. The method according to claim 5, characterized in that The arrangement page includes an arrangement forest, and the arrangement forest is used to represent the position structure of at least one component in multiple windows; determining the instance configuration area of ​​at least one component in the arrangement page and the relative position relationship between the instance configuration areas of the at least one component according to the page metadata of the arrangement page includes: Determining the parent-child relationship between the plurality of windows according to the page metadata of the arrangement page; Determine the window instance area of ​​each window according to the parent-child relationship between the multiple windows; The components in the window are arranged according to the hierarchical relationship of the components in each of the windows to obtain the instance configuration area of ​​the components in the window instance area and the relative position relationship between the instance configuration areas of at least one component.

8. The method according to claim 5, characterized in that After generating the view layer according to the instance configuration area of ​​the at least one component and the relative position relationship between the instance configuration areas of the at least one component, the method further includes: Determine the instance triggering condition of each instance configuration area in the view layer, and the window triggering condition of the window where each instance configuration area is located; Based on the instance triggering condition and the window triggering condition, a triggering path of each instance configuration area is determined.

9. The method according to any one of claims 1 to 8, characterized in that: After determining the configuration information of the custom component based on the business logic and the mapping relationship, the method further includes: Obtain a custom component development scaffold; the custom component development scaffold includes a component front-end code, a component back-end code, and a service registration resource, the component front-end code includes component metadata of the custom component, the component back-end code includes configuration information of the custom component, and the service registration resource includes service registration information of a third-party service corresponding to the configuration information; The page rendering of the custom component is performed based on the component front-end code, the business logic of the custom component is loaded based on the component back-end code, and the third-party service is registered based on the service registration resource configuration.

10. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 9 are implemented.

11. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to perform the steps of the method according to any one of claims 1 to 9.