Industrial Internet WEB application development method, system and device
By introducing service terminals of registration centers, product centers and site centers in the industrial Internet WEB application development, combined with development tools, the application registration, synchronization and cluster construction are achieved, and the problems of high application complexity, low reuse rate and difficulty in privatization deployment are solved, and performance and efficiency are improved.
Patent Information
- Application Number
- CN202211619595.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-12-15
AI Technical Summary
In the development of existing industrial Internet WEB applications, the application functions are complex, the code is huge, and the reuse rate is low, the cluster application performance is low, and it is difficult to deploy privatized.
The service terminals of the registration center, product center and site center are adopted, combined with development tools, and the application registration, synchronization, code reuse and cluster construction are realized. The code is imported using asynchronous loading method, supporting the synchronization of type data between applications, and the overall package and release of cluster applications.
It reduces application complexity, improves code reuse rate and development efficiency, improves cluster application performance, simplifies privatized deployment, and solves the problems of URL coupling and access latency.
Smart Images

Figure CN115794083B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial Internet, and in particular to an industrial Internet WEB application development method, system and device. Background Art
[0002] Due to the complexity of the industrial field, the industrial Internet applications currently developed using WEB technology and JavaScript language have complex functions, large codes, low reuse rates, and difficult application maintenance.
[0003] The industry currently reduces complexity by splitting applications into sub-applications, using applications to nest sub-applications to build cluster applications and achieve code reuse, and achieving communication within cluster applications through access between different URLs, such as Alibaba Group's open source micro-frontend framework Qiankun.
[0004] The above solution relies on application-level decomposition, resulting in high granularity and limited functional breakdown, which in turn leaves individual applications relatively complex. Code reuse requires importing the entire application, leading to significant code redundancy and limited practical reuse. Applications within a cluster run on different URLs, resulting in high access latency between them. Cluster application performance is lower than that of monolithic applications, and cluster application deployment is coupled to the URL, making private deployment, common in the industrial internet, difficult.
[0005] Another solution in the industry is to use asynchronous loading methods such as Webpack module federation to achieve code-level sharing and reuse. In this solution, code reuse is achieved by entering a long list of application URLs in the configuration file. If there are multiple applications or application deployment environments, reuse will be very inconvenient, and there is no registration, query, and other application lifecycle management and cluster application management, resulting in low maintenance efficiency. The code imported by this solution is the execution code itself, without code type data. Technical personnel in this field cannot quickly import code parameters, return results, and other information during development. They can only obtain them by consulting documents, source code, or asking relevant personnel, resulting in low development efficiency. At the same time, like the solution of the micro-frontend framework Qianku N, applications within the cluster also run on different URLs, and still face the same performance and private deployment issues. Summary of the Invention
[0006] In response to the above problems, the purpose of the present invention is to provide an industrial Internet WEB application development method, system and device to improve the defects of existing technologies, reduce application complexity, improve reuse rate and development efficiency, improve cluster application performance, and simplify private deployment.
[0007] The above-mentioned object of the present invention is achieved through the following technical solutions:
[0008] An industrial Internet WEB application development method includes the following steps:
[0009] S101: Install and deploy services including a registration center, a product center, and a site center on a service terminal, install a development tool on a development terminal, and use an initialization command of the development tool to enter the addresses of the registration center, the product center, and the site center on the service terminal to complete initialization;
[0010] S102: Registering an application and creating an application project using a creation command of the development tool on the development terminal, and generating an application configuration file at the same time;
[0011] S103: Open the application project and start the application for development;
[0012] S104: monitoring the application project and synchronizing application data;
[0013] S105: Determine whether the application project reuses the code of other applications. If so, proceed to step S6. If not, proceed to step S111.
[0014] S106: Using the query command of the development tool to query the application information and module information of all registered applications, and finding the application names of one or more other applications where the codes of the other applications to be reused are located;
[0015] S107: Enter the application name of the other application into the application configuration file of the application project;
[0016] S108: After the import code of the other application is written in the application project, the development tool automatically links to the other application and imports the code of the other application, while synchronizing the code type of the other application into the application project, and continuing to write code development according to the code type;
[0017] S109: After the development is completed, determine whether the application project reuses the code of the other application. If so, proceed to step S110; otherwise, proceed to step S111;
[0018] S110: Build a cluster application using the cluster building command of the development tool, and publish the cluster application;
[0019] S111: When the application project does not reuse the code of the other application, the development tool packages the code of the application project.
[0020] Furthermore, in step S102, the application is registered and the application project is created using the creation command of the development tool on the development terminal, and the application configuration file is generated at the same time, specifically:
[0021] Entering the creation command of the development tool on the development terminal, and entering the application template and application information including application name, type, description, and version according to the prompts of the creation command;
[0022] The development tool automatically creates and stores the application ID, and sends it together with the application information to the registration center for application registration;
[0023] The registration center stores the application information to complete the registration and returns a registration success message;
[0024] After obtaining the registration success information, the development tool creates the application project on the development terminal according to the input application template and generates the application configuration file;
[0025] The application configuration files include formats such as .json, .js, .ym l, and .xml, and the application templates include internal or external templates of frameworks such as react, vue, and angu l ar.
[0026] Furthermore, in step S103, the application project is opened and the application is started for development, specifically:
[0027] Use the IDE to open the application project, and use the startup command of the development tool to start the application;
[0028] The development tool automatically collects module information in the application project and synchronizes the module information to the module information where the application ID is located in the registration center;
[0029] The development tool automatically allocates a port and opens a preview window in the browser for the technician to use for debugging. The technician modifies the application code within the application project for development and views the result of the modified application code in the preview window.
[0030] Furthermore, in step S104, the application project is monitored and the application data is synchronized, specifically:
[0031] The development tool starts the application synchronization service after the start command is executed;
[0032] When the application synchronization service monitors the code changes in the application project, it automatically generates code type data and synchronizes the type files in the application project;
[0033] When the application synchronization service monitors changes to the application configuration file in the application project, it automatically generates the application information and synchronizes it to the application information corresponding to the application ID in the registration center;
[0034] When the application synchronization service monitors changes in the module information of the application project, it automatically generates the module information and synchronizes it to the module information where the application ID is located in the registration center.
[0035] Furthermore, in step S107, the method further includes:
[0036] When the application synchronization service monitors changes in the application configuration file, it automatically obtains the corresponding type of file data from the other application to the application project through methods including Http request, socket, and TCP, and outputs a prompt to inform the technician.
[0037] Furthermore, in step S108, the method further includes:
[0038] The import code adopts the format of application name + code file path;
[0039] The development tool automatically links to the other application and imports the code of the other application using an asynchronous code loading method including Webpack module federation and Vite module federation.
[0040] Furthermore, in step S110, the cluster application is constructed using the cluster construction command of the development tool, and the cluster application is released, specifically:
[0041] The development tool automatically obtains the application information of the application project and the other associated applications from the registration center according to the application ID as cluster application information;
[0042] After obtaining the cluster application information, the development tool downloads the cluster application product from the product center to the cluster construction directory of the application project;
[0043] The development tool automatically publishes the cluster construction directory to the site center after the cluster construction command is executed;
[0044] The technicians and users access the published cluster application through the site center.
[0045] Furthermore, in step S111, the development tool packages the code of the application project, specifically:
[0046] Using the build command of the development tool to package the code of the application project into the build directory of the application project;
[0047] The development tool automatically publishes the build directory to the product center and the site center after the build command is executed;
[0048] The technicians and the users access the published application project through the site center.
[0049] An industrial internet web application development system for executing the above-mentioned industrial internet web application development method, comprising: a registration center, a product center, a site center, and development tools;
[0050] The registration center provides at least one database for storing application information including application ID, application name, type, description, and version, and provides a set of interfaces for adding, deleting, modifying, and querying the application information. The registration center is unique and is installed and deployed on a service terminal.
[0051] The product center provides at least one database for storing application product information including ID, name, version, group, and application, and provides a set of interfaces for adding, deleting, modifying, and querying the application product information. The product center is unique and is installed and deployed on one of the service terminals.
[0052] The site center provides at least one physical storage space for storing site files, and provides at least one network site service to read and parse the site files and expose the website address for user access. The site center is not unique and can be installed and deployed on one or more of the service terminals, making it convenient for technicians to publish and test applications in different environments;
[0053] The development tool provides a set of commands for creating, starting, querying, building, and clustering applications, and provides an application synchronization service for automatic synchronization of application information, module information, and type file data. The development tool is installed on one or more development terminals for use by the technicians.
[0054] An industrial Internet WEB application development device for executing the above-mentioned industrial Internet WEB application development method includes: a service terminal and a development terminal;
[0055] The service terminal is used to install and deploy one or more services including the registration center, product center, and site center;
[0056] The development terminal is used to install the development tools for use by technical personnel, and the technical personnel develop, test, build and publish applications on the development terminal.
[0057] A computer device includes a memory and one or more processors, wherein the memory stores computer code, and when the computer code is executed by the one or more processors, the one or more processors execute the above method.
[0058] A computer-readable storage medium stores computer code. When the computer code is executed, the above method is performed.
[0059] Compared with the prior art, the present invention has at least one of the following beneficial effects:
[0060] (1) A method for developing industrial Internet WEB applications is provided, comprising the following steps: S101: installing and deploying services including a registration center, a product center, and a site center on a service terminal, installing a development tool on a development terminal, and using the initialization command of the development tool to enter the addresses of the registration center, the product center, and the site center on the service terminal to complete initialization; S102: using the creation command of the development tool on the development terminal to register an application and create an application project, and generating an application configuration file at the same time; S103: opening the application project and starting the application for development; S104: monitoring the application project and synchronizing application data; S105: determining whether the application project reuses the code of other applications, if so, proceeding to step S6, otherwise proceeding to step S111; S106: using the query command of the development tool to query the application information and module information of all registered applications, and finding the application to be developed. The application names of one or more other applications where the codes of the reused other applications are located; S107: the application names of the other applications are entered in the application configuration file of the application project; S108: after writing the import code of the other applications inside the application project, the development tool automatically links to the other applications and imports the codes of the other applications, and at the same time synchronizes the code types of the other applications to the inside of the application project, and continues to write code development according to the code types; S109: after the development is completed, it is determined whether the application project reuses the codes of the other applications. If the codes of the other applications are reused, go to step S10, otherwise go to step S11; S110: use the cluster building command of the development tool to build a cluster application and publish the cluster application; S111: when the application project does not reuse the codes of the other applications, the development tool packages the codes of the application project. The above technical solution improves the defects of the existing technology, reduces the complexity of the application, improves the reuse rate and development efficiency, improves the performance of cluster applications, and simplifies private deployment.
[0061] (2) By automatically linking to the other application and importing the code of the other application through the development tool, asynchronous code loading methods such as Webpack module federation and Vi te module federation are adopted. The above technical solution realizes code-level reuse between applications, with small granularity and unrestricted functional decomposition, reducing application complexity and improving code reuse rate.
[0062] (3) By adopting a registration center, the entire application lifecycle management, including registration and query, and cluster application management are achieved. This makes it more efficient for personnel in this field to manage applications and reuse application codes, thus improving maintenance and code reuse efficiency.
[0063] (4) During the construction and release process, the present invention packages all applications within the cluster application into a single directory, ensuring that each application in the cluster has the same access URL, avoiding access delay issues caused by different URLs, and improving the performance of cluster applications to the level of single applications while reducing complexity. At the same time, the construction and deployment of cluster applications are decoupled from the URL, making private deployment more convenient.
[0064] (5) The present invention realizes the synchronization of code type data between applications based on Http service. When reusing other application codes, technicians in this field can quickly obtain code parameters, return results and other information without consulting documents or source codes, thereby improving development efficiency and code reuse efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A flowchart of an industrial Internet WEB application development method according to the present invention;
[0066] Figure 2 This is a structural diagram of an industrial Internet WEB application development system of the present invention;
[0067] Figure 3 This is a structural diagram of an industrial Internet WEB application development device of the present invention. DETAILED DESCRIPTION
[0068] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0069] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0070] The present invention is applicable to the field of industrial Internet technology, and provides an industrial Internet WEB application development method, system and device, including: providing industrial Internet WEB application development tools and services such as a registration center, a product center and a site center; the development tool is used for application creation, startup and construction, synchronization of code type data during application development, importing of other application codes, and creation of cluster applications during private deployment; the registration center is used for application registration during application creation, query and synchronization of application information during application development, and output of cluster application information during private deployment; the product center is used for storage of products during application construction and downloading of cluster products during private deployment; the site center is used for access to applications after the release of single applications and cluster applications. The present invention adopts the above scheme, which can reduce application complexity, improve reuse rate and development efficiency, improve cluster application performance, and simplify cluster application private deployment.
[0071] Explanation of terms involved in the present invention:
[0072] ECMAScript: A scripting programming language standardized by the European Computer Manufacturers Association (ECMA International) in ECMA-262. This language is widely used on the Internet and is often referred to as JavaScript or JScript, so it can be understood as a JavaScript standard, but the latter two are actually implementations and extensions of the ECMA-262 standard.
[0073] ESModules: ECMAScript standard for processing modules.
[0074] Webpack: A module bundler whose main goal is to bundle JavaScript files together for use in browsers, but it can also transform and bundle any development resources.
[0075] Vite: A lighter and faster module bundler for modern browsers based on ESModule. It solves the problems of Webpack's long startup time and slow hot update response during the development phase.
[0076] Node.js: A development platform that allows scripts written in JavaScript to run on the server.
[0077] IDE: Integrated development environment, generally refers to a code editor used by technical personnel in this field to write code.
[0078] Monolithic application: An application in which all code and functionality are contained within a single application.
[0079] Cluster application: An application whose code and functionality are provided by a group of independent applications connected through a network.
[0080] First embodiment
[0081] like Figure 1 As shown, this embodiment provides an industrial Internet WEB application development method, including the following steps:
[0082] S101: Install and deploy services including a registration center, a product center, and a site center on a service terminal, install development tools on a development terminal, and use the initialization command of the development tool to enter the addresses of the registration center, the product center, and the site center on the service terminal to complete initialization.
[0083] Before executing the industrial internet web application development method of the present invention, it is necessary to determine whether the necessary services and development tools have been installed. If so, proceed directly to step S102, otherwise it is necessary to install the services and development tools according to the steps of step S101.
[0084] If the service and development tools are not installed, you need to install and deploy services such as the registration center, product center, and site center on the service terminal where Node.js is installed. Install the development tools on the development terminal where Node.js is installed. After installation, use the development tools' initialization commands to enter the addresses of the registration center, product center, and site center on the service terminal to complete the initialization.
[0085] S102: Register an application and create an application project using a creation command of the development tool on the development terminal, and generate an application configuration file.
[0086] Specifically, the creation command of the development tool is input on the development terminal, and the application template and application information including application name, type, description, and version are input according to the prompt of the creation command; the development tool automatically creates and stores the application ID, and sends it together with the application information to the registration center for application registration; the registration center stores the application information to complete the registration and returns a registration success message; after obtaining the registration success message, the development tool creates the application project according to the input application template on the development terminal, and generates the application configuration file at the same time; wherein, the application configuration file includes formats such as .json, .js, .yml, and .xml, and the application template includes internal or external templates of frameworks such as react, vue, and angul ar.
[0087] S103: Open the application project and start the application for development.
[0088] Specifically, the application project is opened using IDE, and the application is started using the start command of the development tool; the development tool automatically collects module information within the application project and synchronizes the module information to the module information where the application ID is located in the registration center; the development tool automatically allocates a port and opens a preview window in the browser for technicians to use for debugging. The technicians modify the application code within the application project for development, and view the results of the modified application code in the preview window.
[0089] S104: Monitor the application project and synchronize application data.
[0090] Specifically, the development tool starts the application synchronization service after the startup command is executed; when the application synchronization service monitors code changes in the application project, it automatically generates code type data and synchronizes the type file in the application project; when the application synchronization service monitors changes in the application configuration file in the application project, it automatically generates the application information and synchronizes it to the application information corresponding to the application ID in the registration center; when the application synchronization service monitors changes in the module information of the application project, it automatically generates the module information and synchronizes it to the module information where the application ID is located in the registration center.
[0091] S105: Determine whether the application project reuses codes of other applications. If so, proceed to step S6; if not, proceed to step S111.
[0092] S106: Use the query command of the development tool to query the application information and module information of all registered applications, and find out the application names of one or more other applications where the codes of the other applications to be reused are located.
[0093] S107: Input the application name of the other application into the application configuration file of the application project.
[0094] Specifically, the application names of one or more other applications are entered into the application configuration file within the application project. Upon detecting changes to the application configuration file, the application synchronization service automatically retrieves the corresponding file data from the other applications into the application project through methods including HTTP requests, sockets, and TCP, and outputs a prompt to inform the technician.
[0095] S108: After writing the import code of the other application within the application project, the development tool automatically links to the other application and imports the code of the other application, while synchronizing the code type of the other application to the application project, and continues to write code development according to the code type.
[0096] Specifically, after completing step S107, the technician adds import code for the other application code within the application project. The import format is similar to the format used for importing ESModule modules in the field. The import code uses the format of application name + code file path. The development tool automatically links to the other application and imports the code of the other application using asynchronous code loading methods such as Webpack module federation and Vite module federation. At the same time, the code type data is synchronized to the application project, and the technician continues to write code development based on the type.
[0097] S109: After the development is completed, it is determined whether the application project reuses the code of the other application. If so, the process proceeds to step S110; otherwise, the process proceeds to step S111.
[0098] S110: Use the cluster building command of the development tool to build a cluster application, and publish the cluster application.
[0099] Specifically, personnel use the cluster building command of the development tool to build a cluster application. The development tool automatically obtains the application information of the application project and the other associated applications from the registration center according to the application ID as cluster application information; after obtaining the cluster application information, the development tool downloads the cluster application product from the product center to the cluster building directory of the application project; after the cluster building command is executed, the development tool automatically publishes the cluster building directory to the site center; the technicians and users access the published cluster application through the site center.
[0100] The technicians may also manually or automatically package the cluster construction directory and publish it to other internal or external site services for users to access the published cluster application.
[0101] S111: When the application project does not reuse the code of the other application, the development tool packages the code of the application project.
[0102] Specifically, when an application project does not reuse the code of other applications, the build command of the development tool is used to package the code of the application project into the build directory of the application project; the development tool automatically publishes the build directory to the product center and the site center after the build command is executed; the technicians and the users access the published application project through the site center.
[0103] Technicians can also manually or automatically package and publish the build directory to other internal or external site services for users to access the published application.
[0104] Second embodiment
[0105] like Figure 2 As shown, this embodiment provides an industrial Internet WEB application development system for executing the industrial Internet WEB application development method as in the first embodiment, including: a registration center 201, a product center 202, a site center 203 and a development tool 204;
[0106] The registration center 201 is used for application life cycle management and cluster application management, provides at least one database for storing application information including application ID, application name, type, description, and version, and provides a set of interfaces for adding, deleting, modifying, and querying the application information. The registration center is unique and is installed and deployed on a service terminal.
[0107] Preferably, in one implementable manner of the present invention, the registration center can be implemented using, but not limited to, a framework such as ZooKeeper, Eureka, or Nacos.
[0108] The product center 202 stores application products and downloads cluster application products when the cluster is built. It provides at least one database for storing application product information including ID, name, version, group, and application, and provides a set of interfaces for adding, deleting, modifying and querying the application product information. The product center is unique and is installed and deployed on one of the service terminals.
[0109] Preferably, in one achievable method of the present invention, the product center can be implemented using, but not limited to, frameworks such as Nexus and Verdaccio.
[0110] The site center 203 is used to parse the site files after the application is built and provide online access services for single applications and cluster applications. It provides at least one physical storage space for storing site files and provides at least one network site service to read and parse the site files and expose the website address for user access. The site center is not unique and can be installed and deployed on one or more service terminals to facilitate the technical staff to publish and test applications in different environments.
[0111] Preferably, in one implementable manner of the present invention, the site center can be implemented using frameworks including but not limited to Koa, Eggjs, etc.
[0112] The development tool 204 is used for creating, starting, searching, building, synchronizing code type data, and clustering the application. It provides a set of commands for creating, starting, searching, building, and clustering application building, and provides an application synchronization service for automatic synchronization of application information, module information, and type file data. The development tool is installed on one or more development terminals for use by the technicians.
[0113] Preferably, in one implementable manner of the present invention, the registration center, the product center, the site center, and the development tools can be implemented in languages including but not limited to JavaScript, Java, Go, Python, and the like.
[0114] Third embodiment
[0115] like Figure 3 As shown, this embodiment provides an industrial Internet WEB application development device for executing the industrial Internet WEB application development method as in the first embodiment, characterized by comprising: a service terminal 301, a development terminal 302;
[0116] The service terminal is installed with an operating system of the Node.js language environment, and is used to install and deploy one or more services including a registration center, a product center, and a site center;
[0117] The development terminal is installed with an operating system of the Node.js language environment, and is used to install the development tools for use by technical personnel, who develop, test, build and publish applications on the development terminal.
[0118] Preferably, in one implementable manner of the present invention, the language environment of the service terminal and the development terminal may be, but is not limited to, Node.js, go, python, and java.
[0119] Preferably, in one implementable manner of the present invention, the operating systems of the service terminal and the development terminal may be, but are not limited to, Windows, Linux, or macOS.
[0120] A computer-readable storage medium stores computer code. When the computer code is executed, the above-described method is performed. A person skilled in the art will appreciate that all or part of the steps in the various methods of the above-described embodiments can be performed by a program instructing related hardware. The program can be stored in a computer-readable storage medium. The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0121] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.
[0122] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0123] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for developing industrial Internet WEB applications, characterized in that: The following steps are involved: S101: Install and deploy services including a registration center, a product center, and a site center on a service terminal, install a development tool on a development terminal, and use an initialization command of the development tool to enter the addresses of the registration center, the product center, and the site center on the service terminal to complete initialization; S102: Registering an application and creating an application project using a creation command of the development tool on the development terminal, and generating an application configuration file at the same time; S103: Open the application project and start the application for development; S104: monitoring the application project and synchronizing application data; S105: Determine whether the application project reuses the code of other applications, if so, proceeds to step S6, if not, proceeds to step S111; S106: Using the query command of the development tool to query the application information and module information of all registered applications, and finding the application names of one or more other applications where the codes of the other applications to be reused are located; S107: Enter the application name of the other application into the application configuration file of the application project; S108: After the import code of the other application is written in the application project, the development tool automatically links to the other application and imports the code of the other application, while synchronizing the code type of the other application into the application project, and continuing to write code development according to the code type; S109: After the development is completed, determine whether the application project reuses the code of the other application. If so, proceed to step S110; otherwise, proceed to step S111; S110: Build a cluster application using the cluster building command of the development tool, and publish the cluster application; S111: When the application project does not reuse the code of the other application, the development tool packages the code of the application project.
2. The industrial Internet WEB application development method according to claim 1, characterized in that: In step S102, the application is registered and the application project is created using the creation command of the development tool on the development terminal, and the application configuration file is generated at the same time, specifically: Entering the creation command of the development tool on the development terminal, and entering the application template and application information including application name, type, description, and version according to the prompts of the creation command; The development tool automatically creates and stores the application ID, and sends it together with the application information to the registration center for application registration; The registration center stores the application information to complete the registration and returns a registration success message; After obtaining the registration success information, the development tool creates the application project on the development terminal according to the input application template and generates the application configuration file; The application configuration file includes formats such as .json, .js, .yml, and .xml, and the application template includes internal or external templates of frameworks such as react, vue, and angular.
3. The industrial Internet WEB application development method according to claim 2, characterized in that: In step S103, the application project is opened and the application is started for development, specifically: Use the IDE to open the application project, and use the startup command of the development tool to start the application; The development tool automatically collects module information in the application project and synchronizes the module information to the module information where the application ID is located in the registration center; The development tool automatically allocates a port and opens a preview window in the browser for the technician to use for debugging. The technician modifies the application code within the application project for development and views the result of the modified application code in the preview window.
4. The industrial Internet WEB application development method according to claim 3, characterized in that: In step S104, the application project is monitored and the application data is synchronized, specifically: The development tool starts the application synchronization service after the start command is executed; When the application synchronization service monitors the code changes in the application project, it automatically generates code type data and synchronizes the type files in the application project; When the application synchronization service monitors changes to the application configuration file in the application project, it automatically generates the application information and synchronizes it to the application information corresponding to the application ID in the registration center; When the application synchronization service monitors changes in the module information of the application project, it automatically generates the module information and synchronizes it to the module information where the application ID is located in the registration center.
5. The industrial Internet WEB application development method according to claim 4, characterized in that: In step S107, the method further includes: When the application synchronization service monitors changes in the application configuration file, it automatically obtains the corresponding type of file data from the other application to the application project through methods including Http request, socket, and TCP, and outputs a prompt to inform the technician.
6. The industrial Internet WEB application development method according to claim 5, characterized in that: In step S108, the following steps are also included: The import code adopts the format of application name + code file path; The development tool automatically links to the other application and imports the code of the other application using an asynchronous code loading method including Webpack module federation and Vite module federation.
7. The industrial Internet WEB application development method according to claim 6, characterized in that: In step S110, the cluster application is constructed using the cluster construction command of the development tool, and the cluster application is released, specifically: The development tool automatically obtains the application information of the application project and the other associated applications from the registration center according to the application ID as cluster application information; After obtaining the cluster application information, the development tool downloads the cluster application product from the product center to the cluster construction directory of the application project; The development tool automatically publishes the cluster construction directory to the site center after the cluster construction command is executed; The technicians and users access the published cluster application through the site center.
8. The industrial Internet WEB application development method according to claim 7, characterized in that: In step S111, the development tool packages the code of the application project, specifically: Using the build command of the development tool to package the code of the application project into the build directory of the application project; The development tool automatically publishes the build directory to the product center and the site center after the build command is executed; The technicians and the users access the published application project through the site center.
9. An industrial Internet WEB application development system for executing the industrial Internet WEB application development method according to any one of claims 1 to 8, characterized in that: include: Registration center, product center, site center and development tools; The registration center provides at least one database for storing application information including application ID, application name, type, description, and version, and provides a set of interfaces for adding, deleting, modifying, and querying the application information. The registration center is unique and is installed and deployed on a service terminal. The product center provides at least one database for storing application product information including ID, name, version, group, and the application, and provides a set of interfaces for adding, deleting, modifying, and querying the application product information. The product center is unique and is installed and deployed on one of the service terminals. The site center provides at least one physical storage space for storing site files, and provides at least one network site service to read and parse the site files and expose the website address for user access. The site center is not unique and can be installed and deployed on one or more of the service terminals, making it convenient for technicians to publish and test applications in different environments; The development tool provides a set of commands for creating, starting, querying, building, and clustering applications, and provides an application synchronization service for automatic synchronization of application information, module information, and type file data. The development tool is installed on one or more development terminals for use by the technicians.
10. An industrial Internet WEB application development device for executing the industrial Internet WEB application development method according to any one of claims 1 to 8, characterized in that: include: Service terminal, development terminal; The service terminal is used to install and deploy one or more services including the registration center, product center, and site center; The development terminal is used to install the development tools for use by technical personnel, and the technical personnel develop, test, build and publish applications on the development terminal.
Citation Information
Patent Citations
Industrial Internet of Things low-code rapid development system and method based on micro-service
CN113495724A
Application development method and device based on industrial internet platform and terminal equipment
CN113885849A