Code-free online plug-in development and release method and system, computer equipment and computer readable storage medium
By integrating the open platform with Node.js and Java services, online development and deployment of plugins are achieved, solving the problem of low development efficiency in local environments, improving the efficiency and stability of plugin development, and promoting collaborative development among enterprises.
Patent Information
- Application Number
- CN202511872420.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2045-12-12
AI Technical Summary
The secondary development of existing plugins relies on the local environment, which leads to cumbersome configuration, scattered version management, and lengthy testing and deployment links, reducing development efficiency and collaboration flexibility, and making it difficult to guarantee development quality.
By connecting Node.js and Java services through an open platform, an integrated online development environment is built, enabling online packaging, integration, debugging, deployment, and release of plugins. The WebSocket protocol is used to achieve real-time interaction and hot updates, lowering the development threshold and supporting visual editing and independent closed-loop development processes.
It significantly improves plugin development efficiency, ensures system stability, reduces reliance on manual verification, lowers risks, promotes deep collaboration between enterprise technical teams and business departments, and builds an open and win-win plugin ecosystem.
Smart Images

Figure CN121300752A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of plug-in development, and particularly relates to a code-free online plug-in development and publishing method and system, a computer device and a computer readable storage medium. BACKGROUND
[0002] With the acceleration of the process of enterprise digital transformation, the plug-in ecological system based on the secondary development of existing business systems has formed a thriving technology ecology. The current secondary development of plug-ins mainly relies on local development environment, but the local development environment has problems such as complicated configuration, scattered code version management, and long test deployment link. After writing the source code through the local editor, manual packaging operation is performed, and then the plug-in product is uploaded to the corresponding server to complete the deployment, and the link is very long. If the local online debugging is started, the local debugging package needs to be uploaded, which will cause other users to be unable to normally use this function, there is a function unavailable time, and the development efficiency and collaboration flexibility are significantly reduced. In addition, the complicated local development process and frequent manual operation of switching packages increase the development complexity, cannot guarantee that the development quality and the quality of the packaging script remain at the same level, reduce the collaboration development flexibility, and are contrary to the core purpose of the code-free configuration platform to reduce the development threshold. SUMMARY
[0003] The present application aims to provide a code-free online plug-in development and publishing method and system, a computer device and a computer readable storage medium, which reduce the development threshold, guarantee the development quality, and improve the development efficiency and flexibility.
[0004] To achieve the above-mentioned purpose, the technical scheme of the present application is as follows: A code-free online plug-in development and publishing method, comprising, packaging and uploading the plug-in to an open platform, and carrying a plug-in source code compression package during packaging; continuously outputting execution logs after initializing the plug-in source code, and generating a source code directory tree; carrying out joint debugging and testing on the open platform environment to ensure joint debugging and real-time state feedback, obtaining the plug-in source code according to the source code directory tree, modifying an entry path field in a plug-in information table to a current configuration service address, and completing plug-in online development startup; carrying out real-time online development and debugging of the plug-in on the open platform, generating a new directory tree and a hot update real-time product according to the modified source code and file path, and realizing online development; restoring the entry path field of the plug-in to an online address, and completing plug-in online development shutdown; packaging the plug-in on the open platform, calling a plug-in uploading interface to process plug-in deployment logic and source code update of a plug-in production environment, and completing plug-in packaging and publishing; Wherein, the entry path field maintained in the plug-in information table is modified to the current configuration service address, and the plug-in online development start is completed, including: The open platform sends information of starting plug-in online development to the node service through the websocket protocol, the node service starts a sub-thread, executes a command of installing a dependency under a directory of the target plug-in source code, after the dependency installation is completed, a plug-in development service is started for developing and debugging the packaged plug-in; The node service acquires the plug-in development service address, calls a java service interface, and modifies the value of the entry path field maintained in the information table of the packaged plug-in on the node service to the acquired plug-in development service port address by using the java service; the node service runs in a sandbox environment; After the value of the entry path field is successfully modified, the java service returns information of successful modification to the node service, and the node service completes the plug-in online development start; After the node service completes the plug-in online development start, the node service returns information of completing the plug-in online development start to the open platform through the websocket protocol, and the open platform enters business requirement development after being refreshed.
[0005] Optionally, after the plug-in source code is initialized, execution logs are continuously output, and a source code directory tree is generated, specifically including steps S21-S26. Step S21: visual editing of the packaged plug-in is performed based on an online editing interface of the open platform, a websocket protocol is used to establish a connection between the open platform and the node service, and initialization parameters of the packaged plug-in are sent to the node service; wherein, the initialization parameters include a plug-in id, a source code compression package address, and a packaging timestamp. Step S22: after the websocket protocol connection is successful, execution logs of the node service are continuously and dynamically displayed based on a control interface of the open platform. Step S23: the node service receives the initialization parameters of the packaged plug-in, judges whether the packaged plug-in exists in a source code folder of the node service according to the initialization parameters of the packaged plug-in, if not, step S24 is entered, and if yes, step S25 is entered. Step S24: the node service calls a plug-in source code compression package from a distributed source code storage end of the node service, generates a corresponding source code folder in the node service according to the initialization parameters of the packaged plug-in, and enters step S25. Step S25: a source code directory tree is generated according to the source code folder. Step S26: the node service feeds back plug-in initialization completion to the open platform through the websocket protocol, and loads the source code directory tree in the open platform.
[0006] Optionally, the node service calls the plug-in source code compression package from the distributed source code storage end, and generates a corresponding source code folder in the node service according to the initialization parameters of the packaged plug-in, including: The node service calls the plug-in source code compression package from the distributed source code storage end of the node service according to the source code compression package address, and decompresses the source code compression package to the source code folder of the node service; According to the plug-in id, a corresponding source code folder is generated under the source code folder of the node service.
[0007] Optionally, the plug-in source code is obtained according to the source code directory tree, including: Selecting a target directory tree file in the source code directory tree of the open platform; The open platform requests the corresponding target static resource file from the node static resource server according to the selected target directory tree file path; wherein the node static resource server specifies the mapping as the source code folder of the node service, and the target static resource file is the target plug-in source code; The node service returns the target static resource file to the open platform.
[0008] Optionally, the plug-in is developed and debugged in real time online on the open platform, and a new directory tree and a hot update real-time product are generated according to the modified source code and file path to realize online development, including: The open platform modifies the plug-in source code and the source code directory tree online, and sends the content of the modified plug-in source code and the file path of the plug-in source code to the node service through the websocket protocol; The node service modifies the target file in the source code folder of the node service according to the content of the modified plug-in source code and the file path of the plug-in source code in the independent sandbox environment, and automatically generates a new source code directory tree based on the modified source code folder of the node service; The node service returns the new source code directory tree to the open platform through the websocket protocol, and the open platform refreshes the source code directory tree of the online editing interface according to the new source code directory tree; The plug-in development service detects the source code folder update of the node service, triggers the hot update service, and returns the hot update real-time product to the open platform in the form of a log; The open platform receives the hot update real-time product to refresh the online editing interface, realizes online development, and obtains the developed plug-in.
[0009] Optionally, the entry path field of the plug-in is restored to an online address, and the online development of the plug-in is completed, including: Enter the online development closing process, the open platform sends the information of closing online development to the node service through the websocket protocol, and the node service releases the port address occupied by the plug-in development service; The node service calls the java service interface, and restores the entry path field value in the information table of the packaged plug-in on the node service to the previous value. After the entry path field value is restored, the node service returns the modification success information to the node service, and the node service sends the plug-in online development closing success information to the open platform through the websocket protocol.
[0010] Optionally, the open platform packages the plug-in, calls the plug-in upload interface to handle the plug-in deployment logic and the source code update of the plug-in production environment, completes the plug-in packaging and publishing, including: Enter the plug-in publishing process, the open platform sends the information of the packaged developed plug-in to the node service through the websocket protocol, and the node service executes the packaging command in the independent sandbox environment to obtain the developed plug-in package; The node service calls the plug-in upload interface of the java service, uploads the developed plug-in package to the application server, and performs the production environment update operation to replace the production environment plug-in product of the target plug-in with the developed plug-in package, and completes the deployment of the developed plug-in package. After the java service completes the deployment of the developed plug-in package, the node service returns the upload success information to the node service, and the node service sends the developed plug-in package upload success information to the open platform through the websocket protocol.
[0011] A codeless online plug-in development and publishing system for executing the codeless online plug-in development and publishing method as described above, comprising: an open platform, a node server and a java server, which are connected in sequence. The open platform comprises: A receiving module for packaging and uploading the plug-in to the open platform; An initialization module for continuously outputting execution logs after initializing the plug-in source code, and generating a source code directory tree; A debugging and testing module for debugging and testing the open platform environment to ensure debugging and real-time state feedback, obtaining the plug-in source code according to the source code directory tree, modifying the entry path field in the plug-in information table to the current configuration service address, and completing the plug-in online development start; An online development module for real-time online development and debugging of the plug-in on the open platform, generating a new directory tree and a hot update real-time product according to the modified source code and file path, and realizing online development; A reduction module is configured to reduce the entry path field of the plug-in into an online address, and complete the online development of the plug-in. A packaging and publishing module is configured to package the plug-in on the open platform, call the plug-in uploading interface to process the plug-in deployment logic and the source code update of the plug-in production environment, and complete the packaging and publishing of the plug-in.
[0012] A computer device can include a memory and a processor, the memory stores a computer program, and the processor implements the steps of the code-free online plug-in development and publishing method as described above when executing the computer program.
[0013] A computer readable storage medium stores a computer program, and the computer program implements the steps of the code-free online plug-in development and publishing method as described above when executed by a processor.
[0014] The code-free online plug-in development and publishing method and system, computer device, and computer readable storage medium provided by the present application respond to the urgent needs of developers for agile engineering practices. By connecting node services and java services through an open platform, an integrated online development environment is constructed, a standardized development framework is preset, a continuous integration tool chain is integrated, and a sandbox testing and production environment channel is opened. The full life cycle process from plug-in development, joint debugging, publishing to deployment is realized, the efficiency of plug-in development is significantly improved, users can focus on business logic innovation rather than environment maintenance, and the efficiency of plug-in development is significantly improved. At the same time, the complete verification system and the safety isolation mechanism of the sandbox environment ensure the stability of the core development system, reduce the dependence on manual verification, and reduce the risk. In addition, the visual online editing interface of the open platform supports the configuration and development of plug-ins, forms an independent closed-loop plug-in business logic development process, eliminates configuration differences through environment standardization, reduces the development threshold, conforms to the current low-code development technology trend, and effectively promotes the deep cooperation between the technical team and the business department of the enterprise, expands the plug-in development system, and accelerates the construction of an open and win-win plug-in ecological system.
[0015] To make the above features and advantages of the application more obvious and easy to understand, the following embodiments are described in detail below, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 A flowchart of the code-free online plug-in development and publishing method provided by the present application.
[0017] Figure 2 A module diagram of the code-free online plug-in development and publishing system provided by the present application. DETAILED DESCRIPTION
[0018] In order to make the purpose and technical solutions of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be described clearly and completely below in combination with the drawings of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the described embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort belong to the scope of protection of the present application.
[0019] Please refer to Figure 1 , Figure 1 The flowchart of the codeless online plug-in development and publishing method proposed in the present application includes steps S1-S6. Step S1: package and upload the plug-in to the open platform; Step S2: continuously output execution logs after initializing the plug-in source code, and generate a source code directory tree; Step S3: perform joint debugging and testing on the open platform environment to ensure joint debugging and real-time state feedback, obtain the plug-in source code according to the source code directory tree, modify the entry path field in the plug-in information table maintained by the current configuration service address, and complete the plug-in online development start; Step S4: perform real-time online development and debugging of the plug-in on the open platform, generate a new directory tree and a hot update real-time product according to the modified source code and file path, and realize online development; Step S5: restore the entry path field of the plug-in to the online address, and complete the plug-in online development close; Step S6: package the plug-in on the open platform, call the plug-in upload interface to handle the plug-in deployment logic and the source code update of the plug-in production environment, and complete the plug-in packaging and publishing.
[0020] The codeless online plug-in development and release method proposed in the application responds to the urgent needs of developers for agile engineering practices. By connecting node services and java services through an open platform, an integrated online development environment is built, with a standardized development framework pre-installed, continuous integration tool chains integrated, sandbox testing and production environment channels connected, and the full life cycle process from plug-in development, joint debugging, release to deployment online realized, significantly improving the efficiency of plug-in development, allowing users to focus on business logic innovation rather than environment maintenance. At the same time, the complete verification system and the security isolation mechanism of the sandbox environment ensure the stability of the core development system, reducing the risk of problems and the dependence on manual verification. In addition, the open platform supports the configuration and development of plug-ins through a visual online editing interface, forming an independent closed-loop plug-in business logic development process, eliminating configuration differences through environment standardization, reducing the development threshold, and conforming to the current low-code development technology trend, effectively promoting the deep cooperation between enterprise technology teams and business departments, expanding the plug-in development system, and accelerating the construction of an open win-win plug-in ecosystem.
[0021] In step S1, please refer to Figure 1 the S1 step in the
[0022] As an example, the open platform represents a plug-in management page for adding, updating, downloading or managing plug-in start state, for example, smadaten platform.
[0023] As an example, the open platform includes an online editing interface, a control interface, a preview interface and a task scheduling interface, which are used to realize the full life cycle process from plug-in development, joint debugging, release to deployment online. In the interaction process of the open platform and node services and java services, it includes online development activity visual editing, previewing plug-in page content and task scheduling of the open platform. Among them, the online development activity visual editing includes file operation, saving, taking effect and rolling back.
[0024] The plug-in is packaged and uploaded to the open platform, specifically including steps S11-S12.
[0025] Step S11: Modify the packaging logic of the plug-in template, and carry the plug-in source code compression package when packaging; Step S12: Generate plug-in products through the construction process, package the plug-in products and plug-in source code compression package to obtain the packaged plug-in, and upload it to the open platform.
[0026] As an example, in step S11, in the prior art, the packaging logic of the plug-in template is usually only used to generate a plug-in product adapted to an online running environment, such as a plug-in package meeting a server deployment specification; in the present application, the packaging logic of the plug-in template is modified so that, while generating the plug-in product, the complete source code file of the plug-in is compressed into a plug-in source code compressed package, the plug-in source code compressed package is integrally packaged with the plug-in product to obtain a packaged plug-in, thereby providing a basis for subsequent development and debugging of the open platform based on the source code.
[0027] As an example, in step S12, the plug-in product includes: a plug-in entity that can be directly loaded and run by an online application server; wherein the online application server includes: a tomcat server.
[0028] In an embodiment of the present application, the build process is implemented through a build script of pnpm, and the plug-in product is generated.
[0029] Further, the packaged plug-in is uploaded to the open platform. Since the open platform has different plug-in types, and the plug-in type is determined during packaging, when uploading, only the corresponding type needs to be selected and the packaged compressed package is uploaded, without the need for interface operation of other additional parameter configurations.
[0030] In step S2, please refer to the S2 step in Figure 1 , which continuously outputs execution logs after initializing the plug-in source code to generate a source code directory tree.
[0031] As an example, after initializing the plug-in source code, the execution logs are continuously outputted to generate a source code directory tree, which specifically includes steps S21-S26.
[0032] Step S21: visual editing of the packaged plug-in is performed based on an online editing interface of the open platform, a connection between the open platform and a node service is established through a websocket protocol, and initialization parameters of the packaged plug-in are sent to the node service; Step S22: after the websocket protocol connection is successful, execution logs of the node service are continuously and dynamically displayed based on a control interface of the open platform; Step S23: the node service receives the initialization parameters of the packaged plug-in, judges whether the packaged plug-in exists in a source code folder of the node service according to the initialization parameters of the packaged plug-in, if not, step S24 is entered; if yes, step S25 is entered; Step S24: the node service calls the plug-in source code compressed package from a distributed source code storage end (git) of the node service, generates a corresponding source code folder in the node service according to the initialization parameters of the packaged plug-in, and enters step S25; Step S25: generating a source code directory tree according to the source code folder; Step S26: the node service feeds back to the open platform that the plug-in initialization is completed through the websocket protocol, and the open platform completes the source code directory tree loading.
[0033] As an example, in step S21, the service deployed and running in the node running environment directly connects the open platform through the websocket protocol, establishes a connection between the open platform and the application programming interface (API) of the node service through the websocket protocol, and sends the initialization parameters of the packaged plug-in to the node service. The initialization parameters include: plug-in id, source code compression package address and packaging timestamp. The source code compression package address includes: storage link and version number of the distributed source code storage end.
[0034] As an example, the node service runs in a sandbox environment, and the sandbox environment realizes a security isolation mechanism through environment isolation to ensure the running stability of the core system. The environment isolation is an independent node packaging interaction service.
[0035] In an embodiment of the present application, after the user enters the online editing interface, the loading process prompt is triggered, indicating that the node service is initializing the packaged plug-in in the independent sandbox environment after establishing a connection with the open platform.
[0036] As an example, in step S22, the control interface based on the open platform continuously and dynamically displays the execution log of the node service, including: the node service continuously and dynamically displays the execution log of the node service to the control interface of the open platform through the websocket protocol. The bidirectional real-time interaction between the open platform and the node service is realized.
[0037] As an example, in step S23, it is judged whether the packaged plug-in exists in the source code folder of the node service according to the initialization parameters of the packaged plug-in, including: judging whether the packaged plug-in exists in the source code folder of the node service according to the plug-in id and the packaging timestamp. Through the double verification of the plug-in id and the packaging timestamp, the uniqueness and version traceability of the plug-in source code are ensured, and repeated storage or version conflict is avoided. Wherein, according to the plug-in id and the packaging timestamp, it is judged whether the packaged plug-in exists in the source code folder of the node service, which is realized through the cache version to avoid wasting time by repeatedly pulling the source code.
[0038] In an embodiment of the present application, the source code folder of the node service is the sourceCode folder of the node service.
[0039] As an example, in step S24, the node service calls the plugin source code compression package from the distributed source code storage end, and generates a corresponding source code folder in the node service according to the initialization parameters of the packaged plugin, including steps S241-S242.
[0040] Step S241: The node service calls the plugin source code compression package from the distributed source code storage end of the node service according to the source code compression package address, and decompresses the source code compression package to the source code folder of the node service. Step S242: Generate a corresponding source code folder under the source code folder of the node service according to the plugin id.
[0041] Specifically, the distributed source code storage end of the node service stores each modified version of the plugin source code.
[0042] As an example, in step S25, the source code directory tree is generated by automatically calling and decompressing the source code compression package through the node service, and the plugin is automatically initialized.
[0043] As an example, in step S26, the source code directory tree is loaded in the open platform, including: loading the source code directory tree in the online editing interface of the open platform.
[0044] In an embodiment of the present application, the node service feeds back to the open platform through the websocket protocol that the plugin initialization is completed, cancels the process prompt in the online editing interface, loads the source code directory tree, and completes the initialization of the packaged plugin.
[0045] In step S3, please refer to Figure 1 S3 step in the open platform environment for debugging and testing to ensure debugging and real-time state feedback, obtain the plugin source code according to the source code directory tree, modify the entry path field in the plugin information table maintained by the current configuration service address, and complete the online development of the plugin.
[0046] As an example, the open platform environment is debugged and tested to ensure debugging and real-time state feedback, including: in the test environment, input interactive commands in the debugging control interface of the open platform, and the open platform transmits a string containing the interactive commands to the node service in real time through the websocket protocol; the node service receives and analyzes and executes the interactive commands in a separate sandbox environment. Wherein, the interactive command is a shell command; the debugging control interface can be a terminal command line (cmd) interface in the online editing interface. If the interactive command cannot be parsed and executed, that is, the debugging and testing are not good, the plugin source code is modified, and the modification result is automatically updated in the node service.
[0047] As an example, the plug-in source code is obtained according to the source code directory tree, including: steps S31-S33.
[0048] Step S31: selecting a target directory tree file in the source code directory tree of the open platform; Step S32: the open platform requests the corresponding target static resource file from the node static resource server according to the selected target directory tree file path; Step S33: the node service returns the target static resource file to the open platform.
[0049] As an example, in step S32, the node static resource server specifies the source code folder mapped to the node service. The target static resource file is the target plug-in source code.
[0050] As an example, in step S33, after the node service returns the target static resource file to the open platform, it further includes: displaying the plug-in source code in the online editing interface of the open platform.
[0051] As an example, after obtaining the plug-in source code according to the source code directory tree, the plug-in online development is started. Specifically, the entry path field maintained in the plug-in information table is modified to the current configuration service address, and the plug-in online development start is completed, including: steps S34-S37.
[0052] Step S34: the open platform sends information about starting plug-in online development to the node service through the websocket protocol, the node service starts a sub-thread, executes an installation dependency command under the directory of the target plug-in source code, and after the dependency installation is completed, starts a plug-in development service for developing and debugging the packaged plug-in; Step S35: the node service obtains the plug-in development service address, calls the java service interface, and uses the java service to modify the entry path field value in the information table of the packaged plug-in on the node service to the obtained plug-in development service port address; Step S36: after the entry path field value is modified successfully, the java service returns the modification success information to the node service, and the node service completes the plug-in online development start; Step S37: after the node service completes the plug-in online development start, it returns the information about completing the plug-in online development start to the open platform through the websocket protocol, and the open platform enters the business requirement development after refreshing.
[0053] As an example, in step S34, the plug-in development service can be a devServer service. After the plug-in development service is started, the plug-in development service continuously listens to the node service through the plug-in development service port address, provides a hot update (Hot Module Replacement) development server instance, and processes a request for development and commissioning of the packaged plug-in; when the plug-in source code is changed, the plug-in development service immediately detects the file change through the built-in file listening mechanism, and then automatically triggers the hot update service to feed back the state information of the packaged plug-in to the open platform in real time through the websocket protocol, without manual refreshing.
[0054] As an example, in step S35, the information table of the packaged plug-in is a structured data table for centrally storing plug-in full life cycle metadata, configuration information, and state in the plug-in product, and can include the following fields: plug-in id, plug-in name, entry path field, distributed source code storage link, version number, packaging timestamp, and plug-in state; wherein the entry path field code is represented as main_path, which is the entry path of the plug-in runtime.
[0055] Further, the entry path field value pointing to the online address is modified to the obtained plug-in development service port address, for example: the tomcat deployment address of the plug-in is modified to the plug-in development service port address http: / / localhost:3000; the modification of the entry path field value only takes effect in the development process and does not affect the online formal use, realizing the isolation of the node service sandbox environment and the production environment.
[0056] In step S4, please refer to Figure 1 S4 step in the open platform, the plug-in is developed and debugged in real time online, and a new directory tree and a hot update real-time product are generated according to the modified source code and file path, realizing online development.
[0057] As an example, in the open platform, the plug-in is developed and debugged in real time online, and a new directory tree and a hot update real-time product are generated according to the modified source code and file path, realizing online development, including steps S41-S45.
[0058] Step S41: modifying the plug-in source code and the source code directory tree online in the open platform, and sending the content of the modified plug-in source code and the file path of the plug-in source code to the node service through the websocket protocol; Step S42: modifying the target file in the source code folder of the node service according to the content of the modified plug-in source code and the file path of the plug-in source code in the independent sandbox environment, and automatically generating a new source code directory tree based on the modified source code folder of the node service; Step S43: The node service returns the new source code directory tree to the open platform through the websocket protocol, and the open platform refreshes the source code directory tree of the online editing interface according to the new source code directory tree. Step S44: The plug-in development service monitors the source code folder update of the node service, triggers the hot update service, and returns the hot update real-time product to the open platform in the form of a log. Step S45: The open platform receives the hot update real-time product to refresh the online editing interface, realizes online development, and obtains the developed plug-in.
[0059] As an example, in step S41, modifying the plug-in source code and the source code directory tree includes file operations such as file addition, content editing, and file deletion. After modifying the plug-in source code and the source code directory tree, the content of the modified plug-in source code and the file path of the plug-in source code are generated.
[0060] As an example, in step S42, the node service modifies the target file in the source code folder of the node service according to the content of the modified plug-in source code and the file path of the plug-in source code in a separate sandbox environment, including steps S421-S422.
[0061] Step S421: The node service locates the target file in the source code folder of the node service according to the file path of the modified plug-in source code. Step S422: The node service dynamically modifies the target file according to the content of the modified plug-in source code.
[0062] As an example, in step S44, while the node service modifies the target file in the source code folder of the node service according to the content of the modified plug-in source code and the file path of the plug-in source code in a separate sandbox environment, the plug-in development service monitors the source code folder update of the node service, triggers the hot update service, and returns the hot update real-time product to the open platform in the form of a log. The hot update service includes monitoring code changes, generating hot update real-time products, and real-time previewing the effects of plug-in modifications.
[0063] As an example, in step S45, after the open platform receives the hot update real-time product to refresh the online editing interface, the modifications to the plug-in source code and the source code directory tree take effect, realizing online development.
[0064] In step S5, please refer to Figure 1 S5 step in, restore the entry path field of the plug-in to the online address, complete the online development of the plug-in.
[0065] As an example, restoring the entry path field of the plug-in to the online address to complete the online development of the plug-in, including steps S51-S53.
[0066] Step S51: Enter the online development closing process, and the open platform sends information for closing online development to the node service through the websocket protocol. The node service releases the port address occupied by the plug-in development service. Step S52: The node service calls the java service interface, restores the entry path field value maintained in the information table of the packaged plug-in on the node service to the previous value. Step S53: After the entry path field value is restored, the node service returns information for successful modification to the node service, and the node service sends information for successful closing of plug-in online development to the open platform through the websocket protocol.
[0067] As an example, in step S52, the entry path field value maintained in the information table of the packaged plug-in on the node service is restored to the previous value, for example, the entry path field value pointing to the plug-in development service port address http: / / localhost:3000 is restored to the tomcat deployment address of the plug-in.
[0068] In an embodiment of the present application, after the open platform receives the information for successful closing of plug-in online development, the control interface of the open platform updates the log and pops up a notification for successful closing of online development to the user.
[0069] In step S6, please refer to step S6 in Figure 1 The open platform packages the plug-in, calls the plug-in upload interface to process the plug-in deployment logic and the source code update of the plug-in production environment, and completes the plug-in packaging and publishing.
[0070] As an example, the open platform packages the plug-in, calls the plug-in upload interface to process the plug-in deployment logic and the source code update of the plug-in production environment, and completes the plug-in packaging and publishing, including steps S61-S63.
[0071] Step S61: Enter the plug-in publishing process, and the open platform sends information for the packaged developed plug-in to the node service through the websocket protocol. The node service executes the packaging command in a separate sandbox environment to obtain the developed plug-in package. Step S62: The node service calls the plug-in upload interface of the java service, uploads the developed plug-in package to the application server, performs the production environment update operation, replaces the production environment plug-in product of the target plug-in with the developed plug-in package, and completes the deployment of the developed plug-in package. Step S63: After the java service completes the deployment of the developed plug-in package, the java service returns information of successful uploading to the node service, and the node service sends information of successful uploading of the developed plug-in package to the open platform through the websocket protocol.
[0072] As an example, in step S61, the executed packaging command includes: a predefined standardized plug-in packaging command, such as npm run build, or a customized packaging logic, etc. The developed plug-in package includes: a plug-in product generated through a build process and plug-in package parameters. The developed plug-in package can be a ZIP format compressed package. The plug-in package parameters include: a plug-in id, a source code compressed package address, and a packaging timestamp.
[0073] As an example, in step S62, the node service calls a plug-in uploading interface of the java service to upload the developed plug-in package to the application server, including: according to an entry path field in the developed plug-in package, the node service realizes data connection through the plug-in uploading interface of the java service to upload the developed plug-in package to the application server.
[0074] In an embodiment of the present application, after the open platform receives the information of successful uploading of the developed plug-in package, a control interface of the open platform updates a log and pops up a notification of successful uploading of the developed plug-in package to a user.
[0075] As another example, after the open platform packs the plug-in, calls the plug-in uploading interface to process plug-in deployment logic and source code update of a plug-in production environment, completes plug-in packaging and publishing, and completes online development and plug-in packaging and publishing of the plug-in, the method further includes: Step S7: The open platform closes the online editing interface and disconnects the websocket protocol connection with the node service.
[0076] The present application also provides a code-free online plug-in development and publishing system for executing the code-free online plug-in development and publishing method. Figure 2 , Figure 2 A module diagram of the code-free online plug-in development and publishing system provided by the present application includes: an open platform 21, a node server 22, and a java server 23. The open platform 21, the node server 22, and the java server 23 are connected in sequence.
[0077] As an example, the open platform 21 is configured to implement a whole life cycle process from plug-in development, joint debugging, publishing to deployment online. The node server 22 is configured to deploy a node service, receive and process a request of the open platform 21. The java server 23 is configured to deploy a java service, and cooperates with the open platform 21 through the node service to process publishing and deployment of the plug-in.
[0078] As an example, the open platform 21 includes: a receiving module 211 for packaging the plug-in uploaded to the open platform 21; an initialization module 212 for continuously outputting execution logs after initializing the plug-in source code, generating a source code directory tree; a joint debugging and testing module 213 for joint debugging and testing of the open platform 21 environment to ensure joint debugging and real-time state feedback, obtaining the plug-in source code according to the source code directory tree, modifying the entry path field in the plug-in information table maintained by the plug-in information table to the current configuration service address, and completing the plug-in online development start; an online development module 214 for real-time online development and debugging of the plug-in on the open platform 21, generating a new directory tree and a hot update real-time product according to the modified source code and file path, and realizing online development; a restoration module 215 for restoring the entry path field of the plug-in to an online address, and completing the plug-in online development close; a packaging and publishing module 216 for packaging the plug-in on the open platform 21, calling the plug-in upload interface to process plug-in deployment logic and source code updates of the plug-in production environment, and completing plug-in packaging and publishing.
[0079] As another example, the open platform 21 further includes a closing module for closing the online editing interface of the open platform 21 and disconnecting the websocket protocol connection with the node service. Figure 2 (not shown in the figure) The present application responds to the urgent needs of developers for agile engineering practices, and through the open platform connecting node services and java services, an integrated online development environment is built, with a standardized development framework, integrated continuous integration tool chain, and a channel between sandbox testing and production environment, realizing the whole life cycle process from plug-in development, joint debugging, publishing to deployment online, significantly improving the efficiency of plug-in development, allowing users to focus on business logic innovation rather than environment maintenance. At the same time, the complete verification system and the safety isolation mechanism of the sandbox environment ensure the stability of the core development system, reduce the dependence on manual verification, and reduce the risk. In addition, the visual online editing interface of the open platform supports the configuration and development of plug-ins, forming an independent closed-loop plug-in business logic development process, eliminating configuration differences through environmental standardization, reducing the development threshold, conforming to the current low-code development technology trend, and effectively promoting the deep cooperation between enterprise technology teams and business departments, expanding the plug-in development system, and accelerating the construction of an open win-win plug-in ecosystem.
[0080] The application further provides a computer device, which can include a memory and a processor, the memory stores a computer program, and the processor implements the steps of the codeless online plug-in development and publishing method when executing the computer program.
[0081] As an example, the computer device can be a server, which includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is configured 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 operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store data such as region parameters and deployment strategies. The network interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement the codeless online plug-in development and publishing method in the above embodiments.
[0082] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the codeless online plug-in development and publishing method in the above embodiments.
[0083] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium in the embodiments of the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).
[0084] Although the present application has been disclosed with reference to the embodiments above, it is not intended to limit the present application, and any person skilled in the art can make some changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application is defined by the appended claims.
Claims
1. A codeless online plug-in development and publishing method, characterized in that, Comprising, The plug-in is packaged and uploaded to the open platform, and the plug-in source code compression package is carried during packaging; After initializing the plug-in source code, continuously output the execution log to generate a source code directory tree; The open platform environment is debugged and tested to ensure the debugging and real-time state feedback, the plug-in source code is obtained according to the source code directory tree, the entry path field maintained in the plug-in information table is modified to the current configuration service address, and the plug-in online development is started; The plug-in is developed and debugged in real time on the open platform, and a new directory tree and a hot update real-time product are generated according to the modified source code and file path, so that online development is realized; The entry path field of the plug-in is restored to the online address, and the plug-in online development is closed; The plug-in is packaged on the open platform, the plug-in upload interface is called to process the plug-in deployment logic and the source code update of the plug-in production environment, and the plug-in packaging and release are completed; Wherein, modifying the entry path field maintained in the plug-in information table to the current configuration service address, completing the plug-in online development start, comprising: The open platform sends information of starting plug-in online development to the node service through the websocket protocol, the node service starts a sub-thread, executes a command of installing dependencies under the directory of the target plug-in source code, and after the dependencies are installed, starts a plug-in development service for developing and debugging the packaged plug-in; The node service obtains the plug-in development service address, calls the java service interface, and uses the java service to modify the value of the entry path field maintained in the information table of the packaged plug-in on the node service to the obtained plug-in development service port address; the node service runs in a sandbox environment; After successfully modifying the value of the entry path field, the java service returns information of successful modification to the node service, and the node service completes the plug-in online development start; After the node service completes the plug-in online development start, it returns information of completing the plug-in online development start to the open platform through the websocket protocol, and the open platform enters the business requirement development after refreshing.
2. The codeless online plug-in development and publishing method of claim 1, wherein, After initializing the plug-in source code, continuously output the execution log to generate a source code directory tree, comprising: steps S21-S26; Step S21: visual editing of the packaged plug-in is performed based on the online editing interface of the open platform, the open platform and the node service are connected through the websocket protocol, and the initialization parameters of the packaged plug-in are sent to the node service; wherein, the initialization parameters include: plug-in id, source code compression package address and packaging timestamp; Step S22: after the websocket protocol connection is successful, the execution log of the node service is continuously and dynamically displayed based on the control interface of the open platform; Step S23: the node service receives the initialization parameters of the packaged plug-in, judges whether the packaged plug-in exists in the source code folder of the node service according to the initialization parameters of the packaged plug-in, if not, enters step S24; if yes, enters step S25; Step S24: the node service downloads the source code of the packaged plug-in from the source code compression package address according to the initialization parameters of the packaged plug-in, and enters step S25; Step S24: The node service calls the plugin source code compression package from the distributed source code storage of the node service, generates a corresponding source code folder in the node service according to the initialization parameters of the packaged plugin, and enters step S25; Step S25: Generate a source code directory tree according to the source code folder; Step S26: The node service feeds back to the open platform that the plugin initialization is completed through the websocket protocol, and the open platform completes the source code directory tree loading.
3. The codeless online plug-in development and publishing method of claim 2, wherein, The node service calls the plugin source code compression package from the distributed source code storage of the node service, generates a corresponding source code folder in the node service according to the initialization parameters of the packaged plugin, including: The node service calls the plugin source code compression package from the distributed source code storage of the node service according to the source code compression package address, decompresses the source code compression package to the source code folder of the node service, and generates a corresponding source code folder under the source code folder of the node service according to the plugin id. According to the source code directory tree, the plugin source code is obtained, including:
4. The codeless online plug-in development and publishing method of claim 2, wherein, Selecting a target directory tree file in the source code directory tree of the open platform; The open platform requests the corresponding target static resource file from the node static resource server according to the selected target directory tree file path; wherein the node static resource server is specified to be mapped to the source code folder of the node service, and the target static resource file is the target plugin source code; The node service returns the target static resource file to the open platform. The open platform performs real-time online development and debugging on the plugin, generates a new directory tree and a hot update real-time product according to the modified source code and file path, and realizes online development, including:
5. The codeless online plug-in development and publishing method of claim 4, wherein, The open platform modifies the plugin source code and the source code directory tree online, and sends the content of the modified plugin source code and the file path of the plugin source code to the node service through the websocket protocol; The node service modifies the target file in the source code folder of the node service according to the content of the modified plugin source code and the file path of the plugin source code in a separate sandbox environment, automatically generates a new source code directory tree based on the modified source code folder of the node service; The node service returns the new source code directory tree to the open platform through the websocket protocol, and the open platform refreshes the source code directory tree of the online editing interface according to the new source code directory tree; The plugin development service monitors the source code folder update of the node service, triggers the hot update service, and returns the hot update real-time product to the open platform in the form of a log; The open platform receives the hot update real-time product to refresh the online editing interface, realizes online development, and obtains the developed plugin. Restoring the entry path field of the plugin to an online address to complete the online development of the plugin, including:
6. The codeless online plug-in development and publishing method of claim 5, wherein, Enter the online development closing process, the open platform sends information to the node service through the websocket protocol to close the online development, and the node service releases the port address occupied by the plugin development service; The node service calls the java service interface, restores the entry path field value in the information table of the packaged plugin on the node service to the previous value. After the entry path field value is restored, the node service returns information indicating that the modification is successful to the open platform, and the node service sends information indicating that the plug-in online development is closed successfully to the open platform through the websocket protocol.
7. The codeless online plug-in development and publishing method of claim 6, wherein, The open platform packs the plug-in, calls the plug-in upload interface to handle the plug-in deployment logic and the source code update of the plug-in production environment, completes the plug-in packaging and publishing, and includes the following steps: The open platform sends information about the developed plug-in to the node service through the websocket protocol, and the node service executes the packaging command in a separate sandbox environment to obtain the developed plug-in package. The node service calls the plug-in upload interface of the java service, uploads the developed plug-in package to the application server, and performs the production environment update operation to replace the production environment plug-in product of the target plug-in with the developed plug-in package, thereby completing the deployment of the developed plug-in package. After the java service completes the deployment of the developed plug-in package, the node service returns information indicating that the upload is successful to the node service, and the node service sends information indicating that the developed plug-in package is uploaded successfully to the open platform through the websocket protocol.
8. A codeless online plug-in development and distribution system for performing the codeless online plug-in development and distribution method according to any one of claims 1 to 7, characterized by The open platform, the node server, and the java server are sequentially connected. The open platform includes the following modules: The receiving module is configured to package and upload the plug-in to the open platform. The initialization module is configured to initialize the plug-in source code and continuously output execution logs to generate a source code directory tree. The debugging and testing module is configured to debug and test the open platform environment to ensure the debugging and real-time state feedback, obtain the plug-in source code according to the source code directory tree, modify the entry path field in the plug-in information table to the current configuration service address, and complete the start of the plug-in online development. The online development module is configured to perform real-time online development and debugging of the plug-in on the open platform, generate a new directory tree and a hot update real-time product according to the modified source code and file path, and realize online development. The restoration module is configured to restore the entry path field of the plug-in to an online address and complete the closing of the plug-in online development. The packaging and publishing module is configured to pack the plug-in on the open platform, call the plug-in upload interface to handle the plug-in deployment logic and the source code update of the plug-in production environment, and complete the packaging and publishing of the plug-in. The computer device can include a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the steps of the code-free online plug-in development and publishing method in any one of claims 1-7.
9. A computer device, comprising: The computer program is executed by the processor to realize the steps of the code-free online plug-in development and publishing method in any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that,
Citation Information
Patent Citations
The method for implementing open source code on web side and MC-Studio plug-in
CN109359438A
Plug-in type government affair software development and deployment method and system based on spring
CN119415167A
Mobile terminal productization configuration method and system
CN120892016A