Project component generation method and device

By downloading project workspaces and generating project components on low-code platforms, the problem of existing technology being difficult to support project component development in complex business scenarios is solved, and more efficient and flexible component development and use is achieved.

CN119415068APending Publication Date: 2025-02-11SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411280908.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

Existing low-code platforms are difficult to support the effective development and use of project components in complex business scenarios, and cannot integrate basic components into formal business projects, resulting in reduced effectiveness of project generation and use.

Method used

By downloading the project workspace on the low-code platform, determining the project information of the target project, retrieving component templates and registering the target project, and generating project components based on low-code industry pages and page resources.

Benefits of technology

It realizes the flexibility of component development needs to meet complex project businesses, expands the component development capabilities of low-code platforms, accelerates the development flexibility of project components, and improves the development effectiveness of project components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415068A_ABST
    Figure CN119415068A_ABST
Patent Text Reader

Abstract

The invention discloses a project component generation method and device, relates to the technical field of software development, and mainly aims to solve the problem of validity of existing project generation and use. Comprising the steps that after a project workspace is downloaded through a low-code platform, project information of a target project is determined, and low-code pages and page resources of different projects are stored in the project workspace; calling a component template of the project information from the low-code platform, and registering the target project by writing the component template into a component folder of the project workspace; and generating a project component of the target project in the project workspace based on the low-code page of the target project and a page resource.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a method and device for generating a project component. Background Art

[0002] With the rapid development of Internet technology, various software applications emerge in an endless stream. When developing business components, basic components are usually built based on a low-code platform to customize the basic components based on different business needs.

[0003] At present, when a project team is opening up based on a low-code platform, it is usually necessary to customize the basic components on the low-code platform in order to define the corresponding business logic on the basic components. However, for complex business scenarios, some low-code platforms only support the development of basic components with simple function logic, and do not support the integration of basic components into formal business projects for development. Each basic component can only be processed independently, which cannot meet the development requirements of complex project environments, greatly reducing the effectiveness of project generation and use. Summary of the invention

[0004] In view of this, the present invention provides a method and device for generating a project component, the main purpose of which is to solve the problem of validity checking of existing project generation and use.

[0005] According to one aspect of the present invention, a method for generating a project component is provided, comprising:

[0006] After downloading the project workspace through the low-code platform, determine the project information of the target project, wherein the project workspace stores low-code industry pages and page resources of different projects;

[0007] Retrieving a component template of the project information from the low-code platform, and registering the target project by writing the component template into a component folder of the project workspace;

[0008] Generate project components of the target project in the project workspace based on the low-code business pages and page resources of the target project.

[0009] Furthermore, after downloading the project workspace through the low-code platform and before determining the project information of the target project, the method further includes:

[0010] Create a project workspace and store low-code pages and page resources of different projects in a public folder;

[0011] Initialize the project workspace and create a component loading path;

[0012] Configure the component loading path as a global loading property, and configure the download instruction of the project workspace in the low-code platform to trigger the download of the project workspace.

[0013] Furthermore, the initializing the project workspace and creating a component loading path includes:

[0014] Loading a low-code rendering engine through the project workspace, and creating a routing component through the low-code engine;

[0015] Initialize the routing component through the entry file;

[0016] All project information is traversed, a loading path corresponding to the project information is created in the project workspace, and stored in a public folder.

[0017] Furthermore, the traversing all the project information and creating a loading path corresponding to the project information in the project workspace includes:

[0018] If there is no component matching the project information in the global loading object in the low-code platform, determining the loading path of the component from the public folder;

[0019] If there is a component matching the project information in the global loading object in the low-code platform, the loading path of the component is determined from the loading logic file.

[0020] Further, the registering the target project by writing the component template into the component folder of the project workspace includes:

[0021] Determine the storage index of the target item in the component folder;

[0022] If the storage index is not found, then create a configuration file, a package storage file, a loading logic file, an entry file, and related information files of the target project under the component folder, and store the configuration file, the package storage file, the loading logic file, the entry file, and the related information files under the component folder;

[0023] Create acquisition paths for the configuration file, the storage file, the loading logic file, the entry file, and the related information files, and configure the acquisition paths as global loading properties to complete the registration of the target project.

[0024] Furthermore, after generating the project components of the target project in the project workspace based on the low-code business page and page resources of the target project, the method further includes:

[0025] If a project execution instruction is detected in the project workspace, component publishing information is generated, and the component publishing information and the project component are sent to a publishing server;

[0026] When a drag operation of a component is detected in the low-code platform, the target component based on the drag operation obtains the target component from the publishing server, and loads the target component through the low-code rendering engine for page rendering.

[0027] Furthermore, before the generating component publishes the information, the method further includes:

[0028] Components are packaged according to the component names of the target components, and the packaged target components are stored in a package storage file, and packaging information is generated to be synchronously sent to the publishing server.

[0029] According to another aspect of the present invention, there is provided a device for generating a project component, comprising:

[0030] A determination module, used to determine the project information of a target project after downloading a project workspace through a low-code platform, wherein the project workspace stores low-code industry pages and page resources of different projects;

[0031] A registration module, used to retrieve the component template of the project information from the low-code platform, and register the target project by writing the component template into the component folder of the project workspace;

[0032] A generation module is used to generate project components of the target project in the project workspace based on the low-code business page and page resources of the target project.

[0033] Furthermore, the device also includes:

[0034] The first creation module is used to create a project workspace and store low-code pages and page resources of different projects in a public folder;

[0035] A second creation module is used to initialize the project workspace and create a component loading path;

[0036] A configuration module is used to configure the component loading path as a global loading property, and configure the download instruction of the project workspace in the low-code platform to trigger the download of the project workspace.

[0037] Furthermore, the second creation module is specifically used to load the low-code rendering engine through the project workspace, and create a routing component through the low-code engine; initialize the routing component through the entry file; traverse all project information, create a loading path corresponding to the project information in the project workspace, and store it in a public folder

[0038] Furthermore, the second creation module is specifically used to determine the loading path of the component from the public folder if there is no component matching the project information in the global loading object in the low-code platform; if there is a component matching the project information in the global loading object in the low-code platform, determine the loading path of the component from the loading logic file.

[0039] Furthermore, the registration module is specifically used to determine the storage index of the target project in the component folder; if the storage index is not found, then create a configuration file, a packaged storage file, a loading logic file, an entry file, and related information files of the target project under the component folder, and store the configuration file, the packaged storage file, the loading logic file, the entry file, and the related information files under the component folder; create an acquisition path for the configuration file, the storage file, the loading logic file, the entry file, and the related information files, and configure the acquisition path as a global loading attribute to complete the registration of the target project.

[0040] Furthermore, the device also includes:

[0041] A sending module, configured to generate component publishing information upon detecting a project execution instruction in the project workspace, and send the component publishing information and the project component to a publishing server;

[0042] The rendering module is used to obtain the target component from the publishing server based on the target component of the dragging operation when a dragging operation of a component is detected in the low-code platform, and load the target component through the low-code rendering engine for page rendering.

[0043] Furthermore, the generation module is also used to package the components according to the component names of the target components, store the packaged target components in a package storage file, and generate packaging information to be sent to the publishing server synchronously.

[0044] According to another aspect of the present invention, there is provided a storage medium storing at least one executable instruction, wherein the executable instruction enables a processor to execute operations corresponding to the method for generating a project component as described above.

[0045] According to another aspect of the present invention, there is provided a terminal, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0046] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned project component generation method.

[0047] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:

[0048] The present invention provides a method and device for generating project components. Compared with the prior art, an embodiment of the present invention determines the project information of a target project after downloading a project workspace through a low-code platform, wherein the project workspace stores low-code business pages and page resources of different projects; retrieves the component template of the project information from the low-code platform, and registers the target project by writing the component template into a component folder of the project workspace; generates the project component of the target project in the project workspace based on the low-code business page and page resources of the target project, which can meet the flexible component development requirements of complex project businesses, expand the component development requirements of the low-code platform, accelerate the development flexibility of project components, better meet the customized operation requirements of different users, and thus greatly improve the development effectiveness of project components.

[0049] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0051] Figure 1 A flow chart of a method for generating a project component provided by an embodiment of the present invention is shown;

[0052] Figure 2 A project component development architecture diagram provided by an embodiment of the present invention is shown;

[0053] Figure 3 A schematic diagram of a rendering process provided by an embodiment of the present invention is shown;

[0054] Figure 4 A block diagram of a device for generating a project component provided by an embodiment of the present invention is shown;

[0055] Figure 5 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0056] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0057] The embodiment of the present invention provides a method for generating a project component, such as Figure 1 As shown, the method includes:

[0058] 101. After downloading the project workspace through the low-code platform, determine the project information of the target project.

[0059] In the embodiment of the present invention, the current execution end that performs project component development can be a cloud server or a terminal server. The low-code platform is a digital technology tool platform for two-way drive management for business personnel and IT personnel. It provides users with component development functions such as rapid construction, data orchestration, ecological connection, and middle-office services through efficient methods such as graphical drag and drop and parameterized configuration. Among them, the current execution end downloads the pre-created project workspace on the low-code platform. At this time, the project workspace stores low-code industry pages and page resources for different projects. After downloading the project workspace, the current execution end determines the project information of the target project for which the project component needs to be created. At this time, the project includes but is not limited to game product projects, financial product projects, transaction product projects, text product projects, etc., which are not specifically limited in the embodiment of the present invention.

[0060] It should be noted that the current execution end can determine the project information based on the user input method. At this time, the project information is used to characterize the project-related content that requires the development of components, such as project name, project requirements, project parameters, etc., which is not specifically limited in the embodiment of the present invention.

[0061] 102. Retrieve the component template of the project information from the low-code platform, and register the target project by writing the component template into the component folder of the project workspace.

[0062] In the embodiment of the present invention, after the current execution end downloads the project work platform, the component template matching the project information is retrieved from the low-code platform in the project work platform. At this time, the component template is a template developed and generated for the basic component in the low-code platform, and the embodiment of the present invention does not make specific limitations. In addition, a component folder is developed in the created project workspace, and after the component template is retrieved, the component template is written into the aforementioned component folder to register the target project.

[0063] 103. Generate project components of the target project in the project workspace based on the low-code business page and page resources of the target project.

[0064] In an embodiment of the present invention, after the current execution end completes the registration of the target project, the low-code page and page resources corresponding to the target project are extracted in the project workspace to generate project components. Among them, the component information and other contents stored in the scheduling component file, such as the component loading path and other information, can be used to load the corresponding low-code rendering engine in the project workspace to automatically generate project components, which is not specifically limited in the embodiment of the present invention.

[0065] In another embodiment of the present invention, for further definition and explanation, after downloading the project workspace through the low-code platform and before determining the project information of the target project, the method further includes:

[0066] Create a project workspace and store low-code pages and page resources of different projects in a public folder;

[0067] Initialize the project workspace and create a component loading path;

[0068] Configure the component loading path as a global loading property, and configure the download instruction of the project workspace in the low-code platform to trigger the download of the project workspace.

[0069] In order to realize the development of project components based on a separate space, so as to meet the component development requirements of complex business, the current execution end first creates a project workspace. At this time, the project workspace is an independent workspace created by the VUE project, and the embodiment of the present invention does not make specific restrictions. Among them, after creating the project workspace, the current execution end stores the relevant files of the low-code project, that is, low-code pages, page resources and other contents in the public folder. At this time, the public folder is named public / app folder, which can also be divided into menu.json folder, page folder, widget folder and widgetConfig folder. The menu.json folder contains all the page menu information of the project. The menu is used to load the corresponding low-code page when the user clicks a menu item. The page folder: contains all low-code pages, such as the login page, home page and each menu page, etc. The widget folder and the widgetConfig folder are used to store custom components that have been developed by other projects used in the project. For example, the widget folder is used to store the files generated after the custom component source code is packaged, and the widgetConfig folder is used to store the configuration files of the custom component. At this time, the low-code components can all perform visual configuration, which is not specifically limited in the embodiment of the present invention.

[0070] It should be noted that after the project workspace is created, it is initialized and a component loading path is created so that it can be quickly called when using project components for development. At the same time, in order to enable the contents of each folder to be called according to the development needs in various complex scenarios during the component development process, the current execution end configures the global loading properties of the created component loading path, and configures the corresponding download instructions (such as configuring a trigger button) in the low-code platform to trigger the download of the project workspace in the low-code platform when the user has project development needs. Among them, when configuring the global loading properties, the loading path of the custom component can be constructed based on the execution of the getExternalUrl method, and the path can be mounted on the window.__WIDGETS__URl__MAP__ object as a mechanism for the low-code engine to load components. The embodiments of the present invention do not make specific limitations.

[0071] In another embodiment of the present invention, for further definition and explanation, the step of initializing the project workspace and creating a component loading path includes:

[0072] Loading a low-code rendering engine through the project workspace, and creating a routing component through the low-code engine;

[0073] Initialize the routing component through the entry file;

[0074] All project information is traversed, a loading path corresponding to the project information is created in the project workspace, and stored in a public folder.

[0075] In order to enable the project workspace to support the loading and retrieval requirements of different projects during the development process, thereby improving the flexibility and speed of project component development, the current execution end is initializing the project workspace. Specifically, first load the low-code rendering engine in the project workspace, such as Figure 2 As shown in the architecture diagram, execute the setPageViewer method to load the low-code rendering engine. In addition, when reading each file in the project workspace, you can execute the getMenuList method to read the app / menu.json file to obtain the menu information corresponding to the project. Among them, in the menu.json file, menuCode can represent the unique identifier of each page, and the page files under the app / page folder can be named by menuCode, which is not specifically limited in the embodiment of the present invention. Furthermore, a routing component is created through the low-code engine. At this time, the setMenuRouter method can be executed according to the obtained menu information to build a menu route. When building a menu route, the low-code rendering engine PageViewer.llsLowcodePage is used as a routing component, so that the page of the menu route becomes a page that can render the low-code component. At the same time, the designPageApi method is passed into the component as a parameter. When the routing page is initialized, the getPageConfig method under the designPageApi method is executed to obtain the corresponding low-code page from the public / app / page folder. This is not specifically limited in the embodiment of the present invention.

[0076] It should be noted that since the project to be developed may be a custom component developed by other projects, the current execution end can load the custom components developed by these other projects into the project workspace to avoid errors when the project starts. For example, the custom components developed by these other projects are stored in the public / app / widget (containing component code) and public / app / widgetConfig (containing component configuration files) folders. Then, execute the initLowcodeMainfest method to uniformly write the component information into the lowcodeMainfest.json file. At this time, you only need to read the content of the public / app / widget folder, and the embodiment of the present invention does not make specific limitations. Furthermore, the current execution end can traverse all project information (including customized and custom component project information developed by other projects), create a loading path corresponding to the project information in the project workspace, and store it in a public folder (such as the public / app folder).

[0077] In another embodiment of the present invention, for further definition and explanation, the step of traversing all project information and creating a load path corresponding to the project information in the project workspace includes:

[0078] If there is no component matching the project information in the global loading object in the low-code platform, determining the loading path of the component from the public folder;

[0079] If there is a component matching the project information in the global loading object in the low-code platform, the loading path of the component is determined from the loading logic file.

[0080] In order to build an effective loading path for custom components, so as to achieve the purpose of flexible development of components for different projects, specifically, since the loading path is built by executing the getExternalUrl method, and the loading path is mounted on the window.__WIDGETS__URl__MAP__ object, it is configured as a global loading object. Therefore, in a specific embodiment, when building a custom component loading path, if there is no component matching the project information in the global loading object in the low-code platform, the loading path of the component is determined from the public folder, that is, if there is no custom component of the current project on the window.__WIDGETS__DEV__MAP__ object, it means that the component at this time is a custom component developed by other projects, and it is loaded from the public / app / widget folder. If there is a custom component of the current project on the window.__WIDGETS__DEV__MAP__ object, it means that this component is a custom component, and the corresponding component is loaded from src / components / a certain component folder / umd / index.js.

[0081] In another specific implementation scenario, in an embodiment of the present invention, custom components can also be added, that is, by executing the command on the workbench: npm run add-component <component name>, the user can add a custom component by entering or selecting component information. At this time, the project workspace pulls the component template of the corresponding type from the low-code custom component template repository after receiving the component information selected or entered by the user, and writes it to the src / components folder. At this time, one component corresponds to one folder, and the folder is named after the component name, which is not specifically limited in the embodiment of the present invention.

[0082] In another embodiment of the present invention, for further definition and explanation, the step of registering the target project by writing the component template into the component folder of the project workspace includes:

[0083] Determine the storage index of the target item in the component folder;

[0084] If the storage index is not found, then create a configuration file, a package storage file, a loading logic file, an entry file, and related information files of the target project under the component folder, and store the configuration file, the package storage file, the loading logic file, the entry file, and the related information files under the component folder;

[0085] Create acquisition paths for the configuration file, the storage file, the loading logic file, the entry file, and the related information files, and configure the acquisition paths as global loading properties to complete the registration of the target project.

[0086] In order to achieve flexible component development for the project to meet the development requirements of different complex scenarios, the current execution end writes the component template into the component folder to register the target project and obtain a custom component. Specifically, first determine the storage index of the target project in the component folder. If the storage index is not found, it means that the corresponding project content cannot be directly written into the corresponding file. Therefore, create a configuration file, package storage file, loading logic file, entry file, and related information file of the target project in the component folder, and store the configuration file, package storage file, loading logic file, entry file, and related information file in the component folder. At this time, the configuration file is named config, the package storage file is named lib, the loading logic file is named index.vue, the entry file is named index.vue, and the related information file is named package.json. Specifically, the config folder is used to store the file content of the component supporting visual configuration, the lib folder is used to store the location of the component packaging product, the umd folder is used to store the logic of the component being loaded by the project, the index.vue folder is used to store the component entry file, and the package.json folder is used to store the file content of the component related information. The embodiment of the present invention does not make specific limitations. Furthermore, after creating the corresponding folder, create the acquisition path of the configuration file, storage file, loading logic file, entry file, and related information file, and configure the acquisition path as the global loading attribute to complete the registration of the target project. At this time, the component registration logic is triggered, that is, the registration logic will also be executed once in main.js to prevent the existence of developed custom components in the project workspace. When configuring the global loading attribute, you can execute the setCustomComponents method to mount the component on window.__WIDGETS__DEV__MAP__, and execute the setCustomWidgetUrl method to mount the component acquisition path on window.__WIDGETS__URl__MAP__, which is not specifically limited in the embodiment of the present invention.

[0087] In another embodiment of the present invention, for further definition and explanation, after the step generates the project components of the target project in the project workspace based on the low-code business page and page resources of the target project, the method further includes:

[0088] If a project execution instruction is detected in the project workspace, component publishing information is generated, and the component publishing information and the project component are sent to a publishing server;

[0089] When a drag operation of a component is detected in the low-code platform, the target component based on the drag operation obtains the target component from the publishing server, and loads the target component through the low-code rendering engine for page rendering.

[0090] In order to enable custom-developed project components to be used for different usage scenarios, after the current execution end generates the custom project component, the current execution end pre-configures the project execution instruction in the project workspace for user triggering. When a user-triggered project execution instruction (such as npm run publish-component <component name>) is detected in the project workspace, component publishing information is generated, and the component publishing information and the target component are sent to the publishing server. For example, the publishing information is published to the company's npm private server, and at the same time, the materialGenerate.json file is generated. In addition, the command: npm run sync-component is executed on the workbench to synchronize the newly released component information to the low-code platform, that is, synchronize the materialGenerate.json file to the low-code platform, which is not specifically limited in the embodiments of the present invention.

[0091] It should be noted that after completing the project development on the project workspace, users can use the components based on the low-code platform, that is, they can drag and drop to select in the low-code platform. When the drag operation of the component is detected, the target component based on the drag operation obtains the target component from the publishing server, so as to load the target component through the low-code rendering engine for page rendering. When in use, the low-code rendering engine will determine whether a component is a custom business component, pull the component from the npm private server, and then mount it to window.__WIDGETS__URl__MAP__ to complete the component loading and render the page normally. Figure 3 In addition, in a low-code plug-in of VSCode, you can open the page of the newly added component you want to use, drag the component into the page designer, and then use it normally. This embodiment of the present invention does not make any specific limitations.

[0092] In another embodiment of the present invention, for further definition and explanation, before the step of generating component publishing information, the method further includes:

[0093] Components are packaged according to the component names of the target components, and the packaged target components are stored in a package storage file, and packaging information is generated to be synchronously sent to the publishing server.

[0094] In order to optimize the publishing efficiency of the target component, the current execution end packages the components according to the component name of the target component, stores the packaged target component in the package storage file, and generates packaging information. That is, after packaging the component, the packaged product is placed in the lib folder under the component folder, and then the packaged product is published to the company's npm private server, and the materialGenerate.json file is generated at the same time.

[0095] An embodiment of the present invention provides a method for generating project components. Compared with the prior art, the embodiment of the present invention determines the project information of a target project after downloading a project workspace through a low-code platform, wherein the project workspace stores low-code business pages and page resources of different projects; retrieves the component template of the project information from the low-code platform, and registers the target project by writing the component template into a component folder of the project workspace; generates the project component of the target project in the project workspace based on the low-code business page and page resources of the target project, which can meet the flexible component development requirements of complex project businesses, expand the component development requirements of the low-code platform, accelerate the development flexibility of project components, better meet the customized operation requirements of different users, and thus greatly improve the development effectiveness of project components.

[0096] Furthermore, as a response to the above Figure 1 In order to realize the method shown in the figure, the embodiment of the present invention provides a device for generating a project component, such as Figure 4 As shown, the device comprises:

[0097] A determination module 21 is used to determine the project information of the target project after downloading the project workspace through the low-code platform, wherein the project workspace stores low-code industry pages and page resources of different projects;

[0098] A registration module 22, used to retrieve the component template of the project information from the low-code platform, and register the target project by writing the component template into the component folder of the project workspace;

[0099] A generation module 23 is used to generate project components of the target project in the project workspace based on the low-code business page and page resources of the target project.

[0100] Furthermore, the device also includes:

[0101] The first creation module is used to create a project workspace and store low-code pages and page resources of different projects in a public folder;

[0102] A second creation module is used to initialize the project workspace and create a component loading path;

[0103] A configuration module is used to configure the component loading path as a global loading property, and configure the download instruction of the project workspace in the low-code platform to trigger the download of the project workspace.

[0104] Furthermore, the second creation module is specifically used to load the low-code rendering engine through the project workspace, and create a routing component through the low-code engine; initialize the routing component through the entry file; traverse all project information, create a loading path corresponding to the project information in the project workspace, and store it in a public folder

[0105] Furthermore, the second creation module is specifically used to determine the loading path of the component from the public folder if there is no component matching the project information in the global loading object in the low-code platform; if there is a component matching the project information in the global loading object in the low-code platform, determine the loading path of the component from the loading logic file.

[0106] Furthermore, the registration module is specifically used to determine the storage index of the target project in the component folder; if the storage index is not found, then create a configuration file, a packaged storage file, a loading logic file, an entry file, and related information files of the target project under the component folder, and store the configuration file, the packaged storage file, the loading logic file, the entry file, and the related information files under the component folder; create an acquisition path for the configuration file, the storage file, the loading logic file, the entry file, and the related information files, and configure the acquisition path as a global loading attribute to complete the registration of the target project.

[0107] Furthermore, the device also includes:

[0108] A sending module, configured to generate component publishing information upon detecting a project execution instruction in the project workspace, and send the component publishing information and the project component to a publishing server;

[0109] The rendering module is used to obtain the target component from the publishing server based on the target component of the dragging operation when a dragging operation of a component is detected in the low-code platform, and load the target component through the low-code rendering engine for page rendering.

[0110] Furthermore, the generation module is also used to package the components according to the component names of the target components, store the packaged target components in a package storage file, and generate packaging information to be sent to the publishing server synchronously.

[0111] An embodiment of the present invention provides a device for generating project components. Compared with the prior art, the embodiment of the present invention determines the project information of a target project after downloading a project workspace through a low-code platform, wherein the project workspace stores low-code business pages and page resources of different projects; retrieves the component template of the project information from the low-code platform, and registers the target project by writing the component template into a component folder of the project workspace; generates the project component of the target project in the project workspace based on the low-code business page and page resources of the target project, which can meet the flexible component development requirements of complex project businesses, expand the component development requirements of the low-code platform, accelerate the development flexibility of project components, better meet the customized operation requirements of different users, and thus greatly improve the development effectiveness of project components.

[0112] According to an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for generating a project component in any of the above method embodiments.

[0113] Figure 5 A schematic diagram of the structure of a terminal provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the terminal.

[0114] like Figure 5 As shown, the terminal may include: a processor (processor) 302 , a communication interface (Communications Interface) 304 , a memory (memory) 306 , and a communication bus 308 .

[0115] The processor 302 , the communication interface 304 , and the memory 306 communicate with each other via the communication bus 308 .

[0116] The communication interface 304 is used to communicate with other devices such as clients or other servers.

[0117] The processor 302 is used to execute the program 310, and specifically can execute the relevant steps in the above-mentioned project component generation method embodiment.

[0118] Specifically, the program 310 may include program codes, which include computer operation instructions.

[0119] The processor 302 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the terminal may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0120] The memory 306 is used to store the program 310. The memory 306 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0121] The program 310 may be specifically configured to enable the processor 302 to perform the following operations:

[0122] After downloading the project workspace through the low-code platform, determine the project information of the target project, wherein the project workspace stores low-code industry pages and page resources of different projects;

[0123] Retrieving a component template of the project information from the low-code platform, and registering the target project by writing the component template into a component folder of the project workspace;

[0124] Generate project components of the target project in the project workspace based on the low-code business pages and page resources of the target project.

[0125] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0126] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for generating a project component, characterized in that: include: After downloading the project workspace through the low-code platform, determine the project information of the target project, wherein the project workspace stores low-code industry pages and page resources of different projects; Retrieving a component template of the project information from the low-code platform, and registering the target project by writing the component template into a component folder of the project workspace; Generate project components of the target project in the project workspace based on the low-code business page and page resources of the target project.

2. The method according to claim 1, characterized in that After downloading the project workspace through the low-code platform and before determining the project information of the target project, the method further includes: Create a project workspace and store low-code pages and page resources of different projects in a public folder; Initialize the project workspace and create a component loading path; Configure the component loading path as a global loading property, and configure the download instruction of the project workspace in the low-code platform to trigger the download of the project workspace.

3. The method according to claim 2, characterized in that Initializing the project workspace and creating a component loading path includes: Loading a low-code rendering engine through the project workspace, and creating a routing component through the low-code engine; Initialize the routing component through the entry file; All project information is traversed, a loading path corresponding to the project information is created in the project workspace, and stored in a public folder.

4. The method according to claim 3, characterized in that The traversing of all project information and creating a loading path corresponding to the project information in the project workspace includes: If there is no component matching the project information in the global loading object in the low-code platform, determining the loading path of the component from the public folder; If there is a component matching the project information in the global loading object in the low-code platform, the loading path of the component is determined from the loading logic file.

5. The method according to claim 1, characterized in that: The registering the target project by writing the component template into the component folder of the project workspace includes: Determine the storage index of the target item in the component folder; If the storage index is not found, then create a configuration file, a package storage file, a loading logic file, an entry file, and related information files of the target project under the component folder, and store the configuration file, the package storage file, the loading logic file, the entry file, and the related information files under the component folder; Create acquisition paths for the configuration file, the storage file, the loading logic file, the entry file, and the related information files, and configure the acquisition paths as global loading properties to complete the registration of the target project.

6. The method according to any one of claims 1 to 5, characterized in that: After generating the project components of the target project in the project workspace based on the low-code business page and page resources of the target project, the method further includes: If a project execution instruction is detected in the project workspace, component publishing information is generated, and the component publishing information and the project component are sent to a publishing server; When a drag operation of a component is detected in the low-code platform, the target component based on the drag operation obtains the target component from the publishing server, and loads the target component through the low-code rendering engine for page rendering.

7. The method according to claim 6, characterized in that Before the generating component publishes information, the method further includes: Components are packaged according to the component names of the target components, and the packaged target components are stored in a package storage file, and packaging information is generated to be synchronously sent to the publishing server.

8. A device for generating a project component, characterized in that: include: A determination module, used to determine the project information of a target project after downloading a project workspace through a low-code platform, wherein the project workspace stores low-code industry pages and page resources of different projects; A registration module, used to retrieve the component template of the project information from the low-code platform, and register the target project by writing the component template into the component folder of the project workspace; A generation module is used to generate project components of the target project in the project workspace based on the low-code business page and page resources of the target project.

9. A storage medium storing at least one executable instruction, wherein the executable instruction enables a processor to execute operations corresponding to the method for generating a project component as described in any one of claims 1 to 7.

10. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the method for generating a project component as described in any one of claims 1-7.