Method and device for multiplexing code components in low-code platform and computer equipment
By obtaining and dynamically loading components in component libraries in low-code platforms, the problem of inefficient component reuse in existing platforms is solved, and efficient reuse of components and improvement of development efficiency is achieved.
Patent Information
- Application Number
- CN202411125471.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-20
AI Technical Summary
The existing low-code platform is inefficient in component reuse, and users need to perform tedious operations to integrate existing or third-party components of the user, affecting development efficiency.
Provide a method of reusing code components in low-code platforms. By obtaining pre-established component library, searching and dynamically loading based on the description information in component call requests, target development program code is generated, and component registration, verification and configuration is supported. , realize unified management and interface integration of component libraries.
It improves component reusability and development efficiency, facilitates users to reuse existing components in low-code platforms, avoids repeated development, and simplifies the integration and use of components.
Smart Images

Figure CN119166135A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of low-code development platforms, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for reusing code components in a low-code platform. Background Art
[0002] As enterprises' demand for rapid application development grows, low-code platforms, as a tool that can significantly improve development efficiency, are gradually gaining favor in the market. Low-code platforms reduce the complexity of programming by providing pre-built components and a visual development environment, allowing non-professional developers to participate in application development.
[0003] However, there are still some problems with component reuse in existing low-code platforms. Although traditional low-code platforms provide some basic components for users to use directly, the support for users' existing components or third-party components is not ideal. Users often need to go through cumbersome operations to integrate these components into the low-code platform, which seriously affects the program development efficiency in the low-code platform. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for reusing code components in a low-code platform that can improve the program development efficiency in the low-code platform in response to the above-mentioned technical problems.
[0005] In a first aspect, an embodiment of the present application provides a method for reusing code components in a low-code platform. The method includes:
[0006] In response to a component call request initiated by a function demander, a pre-established component library is obtained; at least two target components are set in the component library, and the target components include internal components predefined in the low-code platform and pre-uploaded external components;
[0007] According to the component description information carried in the component call request, searching the component library, and taking the target component corresponding to the component description information as the retrieved component;
[0008] In a state where the main program is running in the low-code platform, dynamically loading the retrieved component according to the running conditions of the main program to obtain the loaded component;
[0009] A target development program code is generated based on the loaded components, and the target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
[0010] In one embodiment, the method further comprises:
[0011] In response to a triggering operation of component parsing, scanning the external component to be uploaded, and extracting the component description information of the external component; the external component includes a custom component and a third-party component;
[0012] According to the component description information, the external component to be uploaded is registered in the component library.
[0013] In one embodiment, the method further comprises:
[0014] Verifying the component description information of each target component in the component library to obtain a verification result;
[0015] When the verification result is inconsistent, the component description information is corrected according to the verification result to update the component library.
[0016] In one embodiment, the method further comprises:
[0017] In response to a selection operation input by the target account for each of the target components, a check interface corresponding to each of the target components is displayed, or, in response to a configuration request input by the target account for each of the target components, a configuration interface corresponding to each of the target components is displayed;
[0018] The target account is an account used to establish and maintain each target component in the component library.
[0019] In one embodiment, dynamically loading the retrieved component according to the running condition of the main program to obtain the loaded component includes:
[0020] Obtaining independently developed and packaged program codes corresponding to the retrieved components;
[0021] Acquiring the running condition of the main program in the running state, and identifying each of the program codes according to the running condition;
[0022] When it is identified that the program code is loadable, the target component is loaded based on a preset loading mechanism to obtain the loaded component.
[0023] In one embodiment, the method further comprises:
[0024] Acquire pre-built component interface specification data, and integrate components from different sources into the component library according to the component interface specification data;
[0025] Based on the application programming interface and callback function in the component interface specification data, calling or extending each of the target components in the component library;
[0026] In the case where it is detected that the main program involves interactions between different components, the communication protocols and data types between the different components are determined based on the interface adapter corresponding to the component interface specification data.
[0027] In a second aspect, the present application also provides a device for reusing code components in a low-code platform. The device includes:
[0028] A component library acquisition module, used to respond to a component call request initiated by a function demander and acquire a pre-established component library; at least two target components are set in the component library, and the target components include internal components predefined in the low-code platform and pre-uploaded external components;
[0029] A retrieval module, used to search the component library according to the component description information carried in the component call request, and use the target component corresponding to the component description information as the retrieved component;
[0030] A dynamic loading module, used to dynamically load the retrieved component according to the running conditions of the main program in the low-code platform to obtain the loaded component;
[0031] A program code generation module is used to generate a target development program code based on the loaded components, and the target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
[0032] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0033] In response to a component call request initiated by a function demander, a pre-established component library is obtained; at least two target components are set in the component library, and the target components include internal components predefined in the low-code platform and pre-uploaded external components;
[0034] According to the component description information carried in the component call request, searching the component library, and taking the target component corresponding to the component description information as the retrieved component;
[0035] In a state where the main program is running in the low-code platform, dynamically loading the retrieved component according to the running conditions of the main program to obtain the loaded component;
[0036] A target development program code is generated based on the loaded components, and the target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0038] In response to a component call request initiated by a function demander, a pre-established component library is obtained; at least two target components are set in the component library, and the target components include internal components predefined in the low-code platform and pre-uploaded external components;
[0039] According to the component description information carried in the component call request, searching the component library, and taking the target component corresponding to the component description information as the retrieved component;
[0040] In a state where the main program is running in the low-code platform, dynamically loading the retrieved component according to the running conditions of the main program to obtain the loaded component;
[0041] A target development program code is generated based on the loaded components, and the target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
[0042] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0043] In response to a component call request initiated by a function demander, a pre-established component library is obtained; at least two target components are set in the component library, and the target components include internal components predefined in the low-code platform and pre-uploaded external components;
[0044] According to the component description information carried in the component call request, searching the component library, and taking the target component corresponding to the component description information as the retrieved component;
[0045] In a state where the main program is running in the low-code platform, dynamically loading the retrieved component according to the running conditions of the main program to obtain the loaded component;
[0046] A target development program code is generated based on the loaded components, and the target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
[0047] The method, apparatus, computer equipment, storage medium and computer program product for reusing code components in the above-mentioned low-code platform first respond to the component call request initiated by the function demander, obtain the pre-established component library, and then search in the component library according to the component description information carried in the component call request, and use the target component corresponding to the component description information as the retrieved component, and then in the state of the main program running in the low-code platform, dynamically load the retrieved component according to the running conditions of the main program to obtain the loaded component, and finally generate the target development program code according to the loaded component for the function demander to implement the corresponding function in the low-code platform; the components are uniformly stored and managed through the component library, which is convenient for users to retrieve and use the components, improves the reusability of the components, and enables users to easily reuse existing components in the low-code platform, avoiding repeated development and improving the program development efficiency in the low-code platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] FIG1 is an application environment diagram of a method for reusing code components in a low-code platform in one embodiment;
[0050] Figure 2 A flowchart of a method for reusing code components in a low-code platform in one embodiment;
[0051] Figure 3 A flowchart of a method for reusing code components in a low-code platform in another embodiment;
[0052] Figure 4 It is a structural block diagram of a device for reusing code components in a low-code platform in one embodiment;
[0053] FIG5 is a diagram showing the internal structure of a computer device in one embodiment;
[0054] FIG. 6 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0057] It should be noted that the method, apparatus, computer equipment, storage medium and computer program product for reusing code components in the low-code platform disclosed in this application can be applied to the field of financial technology, and can also be used in any field outside the field of financial technology.
[0058] It should be noted that the generative artificial intelligence services provided by the generative artificial intelligence model involved in this application comply with the requirements of laws and regulations and respect social morality and public order and good customs. The information and data used by the generative artificial intelligence model involved in this application are all authorized by the user or fully authorized by all parties.
[0059] The method for reusing code components in a low-code platform provided in an embodiment of the present application can be applied to an application environment as shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through a network.
[0060] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0061] In one embodiment, Figure 2 As shown, a method for reusing code components in a low-code platform is provided, and the method is applied to the terminal 102 in FIG. 1 as an example for explanation, including the following steps:
[0062] S201, in response to a component call request initiated by a function demander, obtaining a pre-established component library.
[0063] The function demander is a demander who has the ability to realize the corresponding function, for example, a staff member who has the need to monitor power and other data in real time in the digital platform field of the power system. The component call request is a request instruction for calling a component, and correspondingly, the component can be a component that can realize the collection of power and other data.
[0064] Among them, at least two target components are set in the component library, and the target components include predefined internal components in the low-code platform and pre-uploaded external components; specifically, the predefined internal components are also called predefined components within the platform, such as the basic components of the platform, and the pre-uploaded external components include custom components and third-party components. Custom components refer to components that have been developed by users in previous development processes.
[0065] S202, searching in the component library according to the component description information carried in the component call request, and taking the target component corresponding to the component description information as the retrieved component.
[0066] The component description information includes keywords, class names, or function descriptions.
[0067] Exemplarily, an efficient component retrieval algorithm is designed to allow users to quickly locate required components based on keywords, class names, or functional descriptions.
[0068] S203, when the main program is running in the low-code platform, the retrieved components are dynamically loaded according to the running conditions of the main program to obtain the loaded components.
[0069] Among them, the main program can refer to any program running in the low-code platform. Generally, the running conditions of the main program will affect the loading process of other components.
[0070] Exemplarily, a dynamic loading mechanism is implemented to load specified components as needed at runtime without prior integration or compilation.
[0071] S204, generating a target development program code based on the loaded components, and the target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
[0072] The target development program code is the program code obtained after program development using components. Generally, executing the program code can realize the corresponding function of the functional demander.
[0073] In the above-mentioned method for reusing code components in the low-code platform, first respond to the component call request initiated by the function demander, obtain the pre-established component library, and then search in the component library according to the component description information carried in the component call request, and use the target component corresponding to the component description information as the retrieved component, and then in the state of the main program running in the low-code platform, dynamically load the retrieved component according to the running conditions of the main program to obtain the loaded component, and finally generate the target development program code according to the loaded component for the function demander to implement the corresponding function in the low-code platform; the components are uniformly stored and managed through the component library, which is convenient for users to retrieve and use the components, improves the reusability of the components, and enables users to easily reuse existing components in the low-code platform, avoiding repeated development and improving the program development efficiency in the low-code platform.
[0074] In one embodiment, the method further includes: in response to a trigger operation of component parsing, scanning the external component to be uploaded and extracting component description information of the external component; and registering the external component to be uploaded into the component library according to the component description information.
[0075] The triggering operation of component analysis may be an analysis instruction input by the user, or an operation of automatic scanning and analysis according to an analysis cycle set by the user.
[0076] Among them, external components include custom components and third-party components. Custom components refer to components that have been developed by users in previous development processes. Component description information includes keywords, class names, or function descriptions.
[0077] For example, an intelligent parsing engine is introduced to automatically scan and analyze uploaded Java components and extract key information such as class name, method name, parameter list, etc. After parsing, the component information is automatically registered in the component library to facilitate subsequent retrieval and reuse.
[0078] In this embodiment, first, in response to the trigger operation of component parsing, the external component to be uploaded is scanned, and the component description information of the external component is extracted. Then, based on the component description information, the external component to be uploaded is registered in the component library, thereby realizing the registration of the external component and improving the richness of the component library.
[0079] In one embodiment, the method further includes: verifying the component description information of each target component in the component library to obtain a verification result; if the verification result is inconsistent, correcting the component description information according to the verification result to update the component library.
[0080] Exemplarily, verification and correction of analysis results are supported to ensure the accuracy and completeness of the analysis.
[0081] In this embodiment, the component description information of each target component in the component library is first verified to obtain a verification result. Then, when the verification result is inconsistent, the component description information is corrected according to the verification result to update the component library, thereby improving the accuracy and completeness of the parsing process, thereby improving the integrity of the component library and facilitating component reuse using the component library.
[0082] In one embodiment, the method further includes: in response to a selection operation input by the target account for each target component, displaying a check interface corresponding to each target component, or, in response to a configuration request input by the target account for each target component, displaying a configuration interface corresponding to each target component;
[0083] The target account is an account used to create and maintain each target component in the component library.
[0084] Exemplarily, a visual component drag and configuration interface is provided, allowing users to intuitively select and configure reused components.
[0085] In this embodiment, in response to the selection operation input by the target account for each target component, the check interface corresponding to each target component can be displayed, and in response to the configuration request input by the target account for each target component, the configuration interface corresponding to each target component can be displayed. The selection and configuration of components are realized through the visual interface, which improves the flexibility of component library construction.
[0086] In one embodiment, the retrieved component is dynamically loaded according to the running conditions of the main program to obtain the loaded component, including: obtaining the independently developed and packaged program code corresponding to the retrieved component; obtaining the running conditions of the main program in the running state, and identifying each program code according to the running conditions; when it is identified that the program code is loadable, loading the target component based on a preset loading mechanism to obtain the loaded component.
[0087] The running condition in the running state may be the arrival of a user request or changes in environmental parameters and permissions, and the preset loading mechanism may be a reflection mechanism.
[0088] For example, first, the developer defines a standardized interface or contract for each component. These interfaces specify the functions and interaction methods that the component should provide. During the development phase, each component is developed independently and packaged as a dynamically loadable unit. When the application starts or runs, the system checks the available components and plug-ins to identify which ones are loadable. It is possible to selectively load functions as needed without modifying the code. Once the required component is identified, the system loads the target component through reflection or a corresponding loading mechanism.
[0089] In this embodiment, the independently developed and packaged program code corresponding to the retrieved component is first obtained, and then the operating conditions of the main program in the running state are obtained, and each program code is identified according to the operating conditions. Finally, when it is identified that the program code is loadable, the target component is loaded based on the preset loading mechanism to obtain the loaded component. The dynamic loading mechanism can flexibly respond to changes in runtime requirements, while avoiding the limitations of pre-integration in traditional methods, thereby improving the scalability and maintainability of the system.
[0090] In one embodiment, the method also includes: obtaining pre-built component interface specification data, integrating components from different sources into a component library according to the component interface specification data; calling or extending each target component in the component library based on the application programming interface and callback function in the component interface specification data; and determining the communication protocol and data type between different components based on the interface adapter corresponding to the component interface specification data when it is detected that the main program involves interactions between different components.
[0091] For example, formulate a set of standardized component interface specifications to ensure that Java components from different sources can be seamlessly integrated into the low-code platform. Develop an interface adapter that can automatically handle interface differences and data type conversion issues between different components. Provide rich APIs and callback functions so that users can flexibly call and expand the functions of reused Java components in a low-code environment.
[0092] In this embodiment, pre-built component interface specification data is first obtained, and components from different sources are integrated into the component library according to the component interface specification data. Then, based on the application programming interface and callback function in the component interface specification data, each target component in the component library is called or extended. Finally, when it is detected that the main program involves interaction with different components, the communication protocol and data type between different components are determined based on the interface adapter corresponding to the component interface specification data. Through unified calling and adaptation of the interface, component integration, calling and data interaction between components are achieved, thereby improving the effectiveness of component reuse.
[0093] In another embodiment, Figure 3 As shown, a method for reusing code components in a low-code platform is provided, including the following steps:
[0094] S301, in response to a triggering operation of component parsing, scanning the external component to be uploaded, and extracting component description information of the external component.
[0095] S302: register the external component to be uploaded into the component library according to the component description information.
[0096] S303, verifying the component description information of each target component in the component library to obtain a verification result.
[0097] S304: When the verification result is inconsistent, the component description information is modified according to the verification result to update the component library.
[0098] S305, in response to the component call request initiated by the function demander, a pre-established component library is obtained, and a search is performed in the component library to obtain the retrieved component.
[0099] S306, obtaining independently developed and packaged program codes corresponding to the retrieved components.
[0100] S307, obtaining the running conditions of the main program in the running state, and identifying each program code according to the running conditions.
[0101] S308, when it is identified that the program code is loadable, the target component is loaded based on a preset loading mechanism to obtain the loaded component, and the target development program code is generated according to the loaded component.
[0102] It should be noted that the specific limitations of the above steps can be found in the above-mentioned specific limitations on a method for reusing code components in a low-code platform, which will not be repeated here.
[0103] With the rapid development of software development, low-code platforms have attracted widespread attention for their efficient and fast application building capabilities. However, with the popularity of low-code platforms, how to better reuse existing Java components has become an urgent problem to be solved.
[0104] Currently, most low-code platforms provide a certain degree of component reuse capabilities, but these capabilities are usually limited to predefined components within the platform. These platforms do not provide ideal support for existing Java components or third-party Java components. If users want to reuse these components in low-code platforms, they often need to perform a lot of custom development work, which not only increases development costs but also reduces development efficiency.
[0105] It can be seen that although the low-code platforms on the current market provide certain component reuse mechanisms, these mechanisms are mainly focused on the platform's own pre-built components. For the widespread user-defined components or third-party components, the existing platforms lack efficient and flexible reuse support. If users want to use these components in a low-code environment, they usually need to go through tedious coding and configuration work.
[0106] Based on this, the embodiment of the present application provides a method for reusing code components in a low-code platform. The method for reusing code components in a low-code platform is described in detail with a specific embodiment below. It is worth understanding that the following description is only an exemplary description and not a specific limitation on the application.
[0107] The method for reusing code components in a low-code platform provided in the present application is also referred to as a mechanism method for realizing component reuse in a low-code platform. The key contents of the method for reusing code components in a low-code platform provided in the present application include: General component library management: a general component library management module is provided, which can store and manage various Java components uploaded by users, breaking the limitations of component reuse on traditional low-code platforms. Intelligent component parsing: through the component parsing module, the present invention can automatically parse the Java components uploaded by users, extract key information and store it, providing convenience for subsequent component reuse. Seamless component reuse: the component reuse module allows users to quickly retrieve and load Java components from the component library according to their needs, realizing seamless component reuse. Unified interface call: through the component interface call module, the present invention provides users with a unified and concise way to call the reused Java component interface, further simplifying the development process. The above four parts specifically include:
[0108] 1. The component library management module establishment process specifically includes:
[0109] (1) Establish a comprehensive and extensible component library that can dynamically receive, store, and manage various components uploaded by users.
[0110] Among them, a component is a module of a software system that can be independently developed, tested, and deployed, and it encapsulates specific functions, data, and behaviors. A component can be regarded as a functional unit, usually interacting with other components through a clear interface. The design purpose of components is to improve the reusability, maintainability, and scalability of software.
[0111] For example, in the field of digital platforms for power systems, many different components need to work together to achieve efficient data exchange and management. These components may be program components of data acquisition terminals, which are responsible for real-time monitoring and collection of current, voltage, power and other data, usually connected to sensors, or program components of energy management systems, which are used to receive numerical current and voltage data.
[0112] (2) The component library not only supports standard library files, but can also handle complex components that contain dependencies and configuration files.
[0113] Dependencies refer to other components or libraries that a component needs in order for its functions to run properly. For example, in Java development, dependencies are usually managed through build tools such as Maven or Gradle. Example: Suppose there is a Java component called UserService, whose implementation process involves user management functions. This component may depend on the following components: Spring Framework: for dependency injection and managing the life cycle of the application. Hibernate: for data access and database connection.
[0114] The configuration file is used to define the behavior and characteristics of the component. It can contain settings such as environment configuration, database connection information, service port, API key, etc., usually in XML, YAML or properties format. Taking the UserService component as an example, it may involve a database connection configuration file. The configuration file can contain the database connection string, username, password, and JPA configuration options.
[0115] (3) Provide component version management and update mechanism to ensure component compatibility and up-to-dateness.
[0116] Component compatibility refers to the ability of a software component to maintain functional consistency and stability when interacting with other components or systems without causing system failure or performance degradation. It generally includes backward compatibility (ensuring that the new version can coexist with the old version so that existing users are not affected) and forward compatibility (ensuring that the old version can understand or adapt to the data and functions of the new version). Good compatibility design helps simplify the software update process, reduce maintenance costs, and improve user experience.
[0117] 2. The smart component parsing and registration process specifically includes:
[0118] (1) Introducing an intelligent parsing engine that can automatically scan and analyze uploaded Java components and extract their key information, such as class name, method name, parameter list, etc.
[0119] (2) After parsing is completed, the component information is automatically registered in the component library to facilitate subsequent retrieval and reuse.
[0120] (3) Support the verification and correction of analysis results to ensure the accuracy and completeness of the analysis.
[0121] 3. The seamless component reuse mechanism specifically includes:
[0122] (1) Design an efficient component retrieval algorithm that allows users to quickly locate the required components based on keywords, class names, or functional descriptions.
[0123] (2) Implement a dynamic loading mechanism that can load specified components as needed at runtime without the need for prior integration or compilation.
[0124] The steps of dynamically loading components may include: Defining interfaces: First, developers define standardized interfaces or contracts for each component. These interfaces specify the functions and interaction methods that the components should provide. Modular development: During the development phase, each component is independently developed and packaged as a dynamically loadable unit, such as a DLL, JAR, or a plug-in in a specific format. This separation reduces the coupling between components and improves flexibility. Runtime detection: When the application starts or runs, the system checks the available components and plug-ins to identify which ones are loadable. It is possible to selectively load functions as needed without modifying the code. Dynamic loading: Once the required components are identified, the system loads the target components through reflection or corresponding loading mechanisms. Unlike traditional methods, the dynamic loading mechanism merges all the code together at compile time, resulting in the inability to adjust according to runtime conditions. Among them, runtime conditions can be the arrival of user requests or changes in environmental parameters and permissions.
[0125] (3) Provide a visual component drag and configuration interface that allows users to intuitively select and configure reusable components.
[0126] 4. The unified interface call and adaptation process specifically includes:
[0127] (1) Develop a set of standardized component interface specifications to ensure that Java components from different sources can be seamlessly integrated into the low-code platform.
[0128] (2) Develop an interface adapter that can automatically handle interface differences and data type conversion issues between different components.
[0129] Interface differences refer to inconsistencies in communication protocols or data formats between different components. For example, one component may return an object, while another component expects a dictionary in a specific format. We can use the adapter pattern to solve this problem.
[0130] Data type conversion refers to the data type of fields between different components in a program. For example, one component may return age as a string type, while another component expects an integer type. This can also be handled by adapters.
[0131] (3) Provide rich APIs and callback functions so that users can flexibly call and expand the functions of reusable Java components in a low-code environment.
[0132] The method for reusing code components in a low-code platform provided in this application improves the reusability of Java components, allowing users to easily reuse existing Java components in a low-code platform, avoiding duplicate development and improving development efficiency; Java components are uniformly stored and managed through a component library management module, making it convenient for users to retrieve and use components; and unified calling of Java component interfaces is achieved through a component interface calling module, simplifying the application development process.
[0133] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0134] Based on the same inventive concept, the embodiment of the present application also provides a device for reusing code components in a low-code platform for implementing the method for reusing code components in a low-code platform involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the device for reusing code components in one or more low-code platforms provided below can be found in the above limitations on the method for reusing code components in a low-code platform, and will not be repeated here.
[0135] In one embodiment, Figure 4 As shown, a device for reusing code components in a low-code platform is provided, including: a component library acquisition module 401, a retrieval module 402, a dynamic loading module 403, and a program code generation module 404, wherein:
[0136] The component library acquisition module 401 is used to respond to the component call request initiated by the function demander and acquire a pre-established component library; at least two target components are set in the component library, and the target components include internal components predefined in the low-code platform and pre-uploaded external components;
[0137] A retrieval module 402 is used to search the component library according to the component description information carried in the component call request, and use the target component corresponding to the component description information as the retrieved component;
[0138] The dynamic loading module 403 is used to dynamically load the retrieved component according to the running conditions of the main program in the low-code platform to obtain the loaded component;
[0139] The program code generation module 404 is used to generate a target development program code based on the loaded components. The target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
[0140] In one embodiment, the device is used to: in response to a trigger operation of component parsing, scan the external components to be uploaded, and extract component description information of the external components; the external components include custom components and third-party components; according to the component description information, register the external components to be uploaded into the component library.
[0141] In one embodiment, the device is used to: verify the component description information of each target component in the component library to obtain a verification result; if the verification result is inconsistent, correct the component description information according to the verification result to update the component library.
[0142] In one embodiment, the device is used to: in response to a selection operation input by the target account for each target component, display a check interface corresponding to each target component, or, in response to a configuration request input by the target account for each target component, display a configuration interface corresponding to each target component; wherein the target account is an account used to establish and maintain each target component in the component library.
[0143] In one embodiment, the device is used to: obtain the independently developed and packaged program code corresponding to the retrieved component; obtain the operating conditions of the main program in the running state, and identify each program code according to the operating conditions; when it is identified that the program code is loadable, load the target component based on a preset loading mechanism to obtain the loaded component.
[0144] In one embodiment, the device is used to: obtain pre-built component interface specification data, integrate components from different sources into a component library according to the component interface specification data; call or expand each target component in the component library based on the application programming interface and callback function in the component interface specification data; and when it is detected that the main program involves interactions between different components, determine the communication protocols and data types between different components based on the interface adapters corresponding to the component interface specification data.
[0145] Each module in the code component reuse device in the above-mentioned low-code platform can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0146] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for reusing code components in a low-code platform is implemented.
[0147] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG6. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for reusing code components in a low-code platform is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0148] Those skilled in the art will understand that the structures shown in FIGS. 5 and 6 are merely block diagrams of partial structures related to the scheme of the present application, and do not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.
[0149] In one embodiment, a computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps in the above method embodiments are implemented.
[0150] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0151] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0152] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0153] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0154] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for reusing code components in a low-code platform, characterized in that: The method comprises: In response to a component call request initiated by a function demander, a pre-established component library is obtained; at least two target components are set in the component library, and the target components include internal components predefined in the low-code platform and pre-uploaded external components; According to the component description information carried in the component call request, searching the component library, and taking the target component corresponding to the component description information as the retrieved component; In a state where the main program is running in the low-code platform, dynamically loading the retrieved component according to the running conditions of the main program to obtain the loaded component; A target development program code is generated based on the loaded components, and the target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
2. The method according to claim 1, characterized in that The method further comprises: In response to the triggering operation of component parsing, the external component to be uploaded is scanned to extract the component description information of the external component; the external component includes a custom component and a third-party component; According to the component description information, the external component to be uploaded is registered in the component library.
3. The method according to claim 2, characterized in that The method further comprises: Verifying the component description information of each target component in the component library to obtain a verification result; When the verification result is inconsistent, the component description information is corrected according to the verification result to update the component library.
4. The method according to claim 2, characterized in that: The method further comprises: In response to a selection operation input by the target account for each of the target components, a check interface corresponding to each of the target components is displayed, or, in response to a configuration request input by the target account for each of the target components, a configuration interface corresponding to each of the target components is displayed; The target account is an account used to establish and maintain each target component in the component library.
5. The method according to claim 1, characterized in that The dynamically loading the retrieved component according to the running condition of the main program to obtain the loaded component includes: Obtaining independently developed and packaged program codes corresponding to the retrieved components; Obtaining the operating conditions of the main program in the running state, and identifying each of the program codes according to the operating conditions; When it is identified that the program code is loadable, the target component is loaded based on a preset loading mechanism to obtain the loaded component.
6. The method according to claim 1, characterized in that The method further comprises: Acquire pre-built component interface specification data, and integrate components from different sources into the component library according to the component interface specification data; Based on the application programming interface and callback function in the component interface specification data, calling or extending each of the target components in the component library; In the case where it is detected that the main program involves interactions between different components, the communication protocols and data types between the different components are determined based on the interface adapter corresponding to the component interface specification data.
7. A device for reusing code components in a low-code platform, characterized in that: The device comprises: A component library acquisition module, used to respond to a component call request initiated by a function demander and acquire a pre-established component library; the component library is provided with at least two target components, the target components including an internal component predefined in the low-code platform and a pre-uploaded external component; A retrieval module, used to search the component library according to the component description information carried in the component call request, and use the target component corresponding to the component description information as the retrieved component; A dynamic loading module, used to dynamically load the retrieved component according to the running conditions of the main program in the low-code platform to obtain the loaded component; A program code generation module is used to generate a target development program code based on the loaded components, and the target development program code is used for the function requirement party to implement the corresponding function in the low-code platform.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Standard component description structure and method for industrial software component library
CN119440616A
