Industrial algorithm construction and environment configuration method and system based on interactive programming

By adopting interactive programming and gateway management methods in industrial algorithm development, the problem of difficult development efficiency and scalability in the existing technology is solved, and efficient and flexible algorithm development and environmental configuration are achieved.

CN119449596APending Publication Date: 2025-02-14ZHEJIANG LANZHUO IND INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411490633.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing technology is difficult to take into account both development efficiency and scalability in industrial algorithm development. The traditional offline development method has problems such as high debugging and update costs and low development efficiency, and resource management is inflexible.

Method used

Through the construction and environment configuration method of industrial algorithms based on interactive programming, the operating environment is registered with the designated gateway, the operating environment is managed through the gateway, and the environment is dynamically adjusted, so as to realize the one-to-many relationship between the algorithm and the environment, and adapt to the algorithm development needs. .

Benefits of technology

It improves the efficiency and flexibility of algorithm development, reduces the difficulty of development, is suitable for users' own configuration needs, and enhances the applicability and resource utilization of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449596A_ABST
    Figure CN119449596A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial algorithm construction and environment configuration method and system based on interactive programming, and the method comprises the steps: S1, creating an algorithm operation environment container, and configuring a corresponding operation environment according to a selected dependency file; s2, environment instance gateway registration is executed to the corresponding gateway based on the operation environment; s3, establishing connection between the registration gateway and the interactive programming tool, loading environment configuration corresponding to the operation environment, and initializing a dependency item; and S4, calling a business variable assignment according to an algorithm demand based on the environment configuration and the dependency item to execute industrial algorithm construction. The method has the advantages that the one-to-many relation between the algorithm and the environment is achieved, the service variable assignment is adjusted in a self-adaptive mode through the algorithm requirement, the algorithm development difficulty is lowered, meanwhile, the method is suitable for the configuration requirement of a user, and the applicability of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial Internet technology, and in particular to an industrial algorithm construction and environment configuration method and system based on interactive programming. Background Art

[0002] The construction and environment configuration of industrial algorithms are key links in the development of modern industrial applications. With the advancement of Industry 4.0, the application of technologies such as intelligent manufacturing, the Internet of Things, and big data analysis is becoming more and more extensive, and the complexity and diversity of industrial algorithms are also increasing. In order to improve the development efficiency and quality of industrial algorithms, algorithm engineers need an interactive programming tool that supports real-time writing, running, and debugging of algorithm codes. Interactive programming tools can not only significantly improve development efficiency, but also promote interaction between developers and algorithms, and quickly iterate and optimize algorithms.

[0003] In the related technologies, the traditional offline development method is adopted, which mainly relies on the offline development method of dynamic link libraries or binary files. There are problems such as high debugging and updating costs and low development efficiency. At the same time, it does not take into account the data flow and business method integration requirements in business application development, and relies on manual operations. The process is cumbersome and prone to errors, and the configuration time is long, which affects the speed and reliability of development and deployment.

[0004] The Chinese patent "A data processing platform based on Docker", publication number: CN111158745A, publication date: December 30, 2019, specifically discloses a data processing platform based on Docker, which is based on a distributed computing framework and integrates open source data science tools, including model application units, analysis and modeling units, algorithm library units, computing framework units, data connection units, and system management units. It supports interactive programming and drag-and-drop experiments, and provides users with full life cycle management functions for model training, prediction, evaluation, and deployment. In this solution, container management is performed directly through JupyterHub. Although a set of JupyterHub is deployed for each container in this solution, this method leads to resource redundancy. Each time the resources are adjusted, the container resource configuration needs to be modified through server commands, and the entire container needs to be restarted, which affects the continuity of the interactive programming function and the user experience.

[0005] The Chinese patent "Method and System for Assisting Operator Development", publication number: CN110928529A, publication date: November 6, 2019, specifically discloses providing at least one preset dependency package; obtaining a target operator development file input by a user containing business logic description information of a target operator, wherein the business logic description information of the target operator includes dependency package call information; encapsulating the target operator development file together with the dependency package involved in the dependency package call information to obtain the target operator. In this solution, for the developed operator, the declared dependency packages are scanned, the environment is automatically generated, and the operator and the environment are bound and directly called. Although the efficiency of the environment call is improved, the operator and the environment can only be bound one-to-one, and the scalability and applicability are poor. Summary of the invention

[0006] In order to address the problem in the prior art that both algorithm development efficiency and scalability cannot be taken into account, the present application provides an industrial algorithm construction and environment configuration method and system based on interactive programming. The operating environment is registered with a designated gateway, and the operating environment is managed by the gateway to ensure the independence and stability of computing resources. At the same time, the environment configuration and dependencies are dynamically adjusted according to the operating requirements of the operator, so that the final operating environment can adapt to the algorithm development requirements and realize a one-to-many relationship between the algorithm and the environment. The business variable assignment is adaptively adjusted according to the algorithm requirements, which reduces the difficulty of algorithm development while meeting the user's own configuration requirements, thereby improving the applicability of the system.

[0007] To achieve the above technical objectives, the present application provides a technical solution, which is an industrial algorithm construction and environment configuration method based on interactive programming, including the following steps: S1: Create an algorithm operating environment container, and configure the corresponding operating environment according to the selected dependency file; S2: Register with the corresponding gateway execution environment instance gateway based on the operating environment; S3: Build a connection between the registered gateway and the interactive programming tool, load the environment configuration corresponding to the operating environment, and initialize the dependencies; S4: Based on the environment configuration and dependencies, call the business variable assignment according to the algorithm requirements to execute the industrial algorithm construction. In this solution, the algorithm operating environment is split independently to achieve accurate configuration of environmental resources and improve resource utilization.

[0008] Furthermore, S1 also includes: obtaining a basic image corresponding to the programming language version, updating the basic image based on the selected dependent files, and generating a corresponding operating environment.

[0009] Furthermore, before executing S1, there is: S0: building a configuration relationship between the programming language version and the basic image, and building a configuration relationship between the dependent file and the operating environment.

[0010] Furthermore, the S1 also includes: acquiring various resource configuration data in the user's requirements, and configuring corresponding operating resources for the operating environment based on the resource configuration data.

[0011] Furthermore, the S3 also includes: the registration gateway obtains the application requirements of the interactive programming tool, and builds a WebSocket connection between the operating environment corresponding to the registration gateway and the interactive programming tool according to the application requirements.

[0012] Furthermore, the S4 also includes: calling and assigning business variables based on preset business variables or built-in business packages.

[0013] Furthermore, it also includes: S5: performing verification on the constructed industrial algorithm, and if the verification passes, publishing the industrial algorithm to the corresponding operating environment.

[0014] Furthermore, the S0 also includes: judging whether there is a version to be updated according to the real-time version information, the version number of each dependent file and the real-time version information; if so, updating the dependent file according to the version to be updated, and recording the historical version information.

[0015] Furthermore, S3 also includes: obtaining the operating environment usage interval information, and adjusting the start and stop state of the operating environment according to the operating environment usage interval information and a preset interval threshold.

[0016] Another technical solution provided by the present application is an industrial algorithm construction and environment configuration system based on interactive programming, which is used to implement the method as mentioned above, including: an environment configuration tool and an interactive programming tool; wherein the interactive programming tool is communicated with the environment configuration tool, the interactive programming tool interacts with the user to obtain the user's algorithm requirements, the environment configuration tool configures the operating environment according to the user's algorithm requirements, and the interactive programming tool calls the business variable assignment according to the algorithm requirements based on the operating environment configuration and dependencies to execute the industrial algorithm construction.

[0017] Another technical solution provided by the present application is an electronic device, which includes a processor, a memory and a battery module; the memory is used to store programs; the battery module is used to power the memory; the processor is used to execute the program and implement the industrial algorithm construction and environment configuration method based on interactive programming as mentioned above when executing the program.

[0018] Another technical solution provided by the present application is a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a processing device, the industrial algorithm construction and environment configuration method based on interactive programming as described above is implemented.

[0019] Beneficial effects of this application: 1. After each runtime environment is started, it will register with the specified gateway, so that only the registered gateway can be used by the interactive programming tool, ensuring the independence and stability of computing resources, and being able to adjust and change the configuration of dependent packages according to specific algorithm requirements, thereby improving the efficiency of algorithm development while improving the flexibility and scalability of algorithm development.

[0020] 2. Through automated configuration, it is convenient to use automated scripts to generate the operating environment, reduce user operations, improve user convenience, and ensure that the image environment generated for each corresponding dependent file is consistent and reliable.

[0021] 3. When the user inputs the algorithm development requirements, the resource allocation weights are automatically matched according to the algorithm, reducing the complexity of user operations, facilitating the use of novice users, improving the utilization of operating resources, and ensuring the stability of algorithm development.

[0022] 4. Determine whether to call preset business variables based on whether the data package is called, so that users can directly use unified variables, which are pre-assigned with required data, or can introduce business data by themselves through built-in third-party packages, thereby improving user selectivity and further improving the adaptability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a flow chart of the industrial algorithm construction and environment configuration method based on interactive programming in this application.

[0024] Figure 2 This is an interactive programming-gateway-operation environment connection framework diagram of the industrial algorithm construction and environment configuration method based on interactive programming in this application.

[0025] Figure 3 This is a schematic diagram of the verification of the industrial algorithm construction and environment configuration method based on interactive programming in this application. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of the present application more clear, the present application is further described in detail below in conjunction with the drawings and examples. It should be understood that the specific implementation method described here is only an optimal embodiment of the present application, which is only used to explain the present application and does not limit the scope of protection of the present application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0027] like Figure 1 As shown, as the first embodiment of the present application, the industrial algorithm construction and environment configuration method based on interactive programming includes the following steps: S1: Create an algorithm runtime environment container and configure the corresponding runtime environment according to the selected dependency files; S2: Register with the corresponding gateway execution environment instance gateway based on the operating environment; S3: Build a connection between the registration gateway and the interactive programming tool, load the environment configuration corresponding to the running environment, and initialize dependencies; S4: Based on the environment configuration and dependencies, business variables are assigned according to algorithm requirements to execute industrial algorithm construction.

[0028] In this embodiment, each operating environment will register with the designated gateway after startup, so that only the registered gateway can be used by the interactive programming tool, ensuring the independence and stability of computing resources, and being able to adjust and change the configuration of dependent packages according to specific algorithm requirements, thereby improving the flexibility and scalability of algorithm development while improving the efficiency of algorithm development.

[0029] In step S1, it also includes: Get the base image corresponding to the programming language version, update the base image based on the selected dependency files, and generate the corresponding operating environment.

[0030] Multiple mainstream versions of Python programming language (such as 2.7, 3.5, 3.7, etc.) are built into the system. Users can select the corresponding Python version according to their needs. At this time, the programming language version is obtained. According to the configuration relationship between the programming language version and the basic image, the basic image corresponding to the programming language version is obtained. For example, each Python version corresponds to a pre-configured Docker basic image. When a specific Python version is selected, the system will automatically load the corresponding Docker basic image, which ensures the unity and consistency of the development and operation environment, thereby ensuring the stability and reliability of the application.

[0031] Among them, before executing S1, there are: S0: Build the configuration relationship between the programming language version and the basic image, and build the configuration relationship between the dependent files and the operating environment.

[0032] After obtaining the base image corresponding to the programming language version, update the base image according to the selected dependency files and the configuration relationship between the dependency files and the operating environment. Select and install the required third-party Packages in the pre-configured system dependency library. The system dependency library contains mainstream data science and machine learning libraries, such as numpy, pandas, scipy, scikit-learn, tensorflow, keras, pytorch, etc. On top of each Docker base image, install the specified third-party Packages and generate a new Docker image to automatically generate the Python operating environment and the corresponding version number. Through automated configuration, it is convenient to use automated scripts to execute the generation of the operating environment, reduce user operations, improve user convenience, and ensure that the image environment generated for each corresponding dependency file is consistent and reliable.

[0033] As shown in Table 1, it is the configuration relationship between the dependent files and the operating environment in some embodiments, showing some operating environments and their versions and Packages lists. The successfully created environment will be available for selection in subsequent algorithm development.

[0034] Table 1 Relationship between dependency files and operating environment configuration

[0035] In some other embodiments, step S1 further includes: Configure corresponding operating resources for the operating environment according to user needs.

[0036] In this embodiment, operating resources are adaptively configured according to different operating environments, thereby meeting actual algorithm development requirements and improving the effective utilization of operating resources.

[0037] At this time, the corresponding operating resources configured for the operating environment according to user needs include: Use Kubernetes to deploy each operating environment.

[0038] Each operating environment created in step S1 is deployed through Kubernetes (K8s) to ensure environmental isolation. K8s runs each environment instance in the form of Pods, and each Pod is isolated from each other, ensuring that different algorithm operating environments do not affect each other, thereby improving system reliability.

[0039] In some cases, configuring the operating environment corresponding to the operating resources according to user needs also includes: Obtain resource allocation weights according to user needs, and configure corresponding operating resources for the operating environment based on the resource allocation weights.

[0040] In this case, user needs may be user algorithm development needs. For example, resource allocation weights may be adaptively configured based on historical algorithm development resource usage. Thus, when users input algorithm development needs, resource allocation weights are automatically matched according to the algorithm, thereby reducing user operation complexity, facilitating use by novice users, improving utilization of operating resources, and ensuring the stability of algorithm development.

[0041] In other cases, the operating resources corresponding to the operating environment configuration according to user needs also include: Obtain the resource configuration data in the user's requirements, and configure the corresponding operating resources for the operating environment based on the resource configuration data.

[0042] In this case, the allocation of operating resources is performed based on the resource configurations entered by the user. For example, users can adjust the allocation of operating resources at any time through the visual configuration interface. The configuration interface supports dynamic adjustment of resources such as CPU, GPU, and memory, and users can flexibly configure resources according to the needs of the algorithm. For example, users can allocate more GPU resources for deep learning algorithms and more memory for data processing tasks.

[0043] In some cases, the operating resources corresponding to the operating environment configuration according to user needs also include: Determine whether it is necessary to perform self-allocation of operating resources; If so, a visual configuration interface is provided to the user, and the corresponding operating resources are configured for the operating environment based on the resource configuration data; if not, the corresponding operating resources are configured for the operating environment according to the resource allocation weight.

[0044] This can adapt to the various needs of users. At the same time, the user can be prompted in the visual configuration interface to allocate resources according to the weights for reference, further improving the convenience of user algorithm construction.

[0045] In step S2, it also includes: When the operating environment is started, it registers with the corresponding gateway execution environment instance gateway according to the registration information of the operating environment.

[0046] The registration information at least includes the environment instance ID, running status, and resource configuration information. In other cases, the registration information may also include other required information. Only registered gateways can be used by interactive programming tools, thereby achieving environmental isolation without the need for user operation, improving user convenience, reducing user knowledge requirements, and improving system usability.

[0047] like Figure 2 As shown, in step S3, it also includes: The registration gateway obtains the application requirements of the interactive programming tool, and builds a WebSocket connection between the operating environment corresponding to the registration gateway and the interactive programming tool according to the application requirements.

[0048] WebSocket is a TCP-based protocol that provides a persistent connection through a single TCP connection, allowing the server to actively push data to the client without the client frequently initiating requests. Users initiate application requirements to the registration gateway through interactive programming tools, such as handshaking in the form of HTTP / WSS. When the operating environment and the interactive programming tool establish a WebSocket connection, two-way communication between the operating environment and the interactive programming tool can be achieved. At the same time, WebSocket uses a long connection. Once the connection is established, it can be maintained. Unlike the HTTP protocol, it does not need to frequently establish and close the connection, which improves the stability of communication.

[0049] In this embodiment, through the three links of interactive programming-gateway-operating environment, the operating environment is managed by the gateway to ensure the independence and stability of computing resources.

[0050] In step S4, it also includes: Call business variables and assign values ​​based on preset business variables or built-in business packages.

[0051] The preset business variables can be unified variables preset in the system, and the built-in business packages can be built-in third-party packages that introduce business data by themselves. In some cases, whether to call the preset business variables is determined based on whether the data package is called, so that users can directly use unified variables that are pre-assigned with required data, or can introduce business data by themselves through built-in third-party packages, thereby improving user selectivity and further improving the adaptability of the system.

[0052] In this embodiment, by providing unified variables and packages, the present invention realizes seamless integration of data flow and business methods, improves algorithm integration efficiency, and ensures code consistency and standardization. This solves the problem that a large amount of manual operation and configuration are required in data flow and business method integration, and it is difficult to achieve efficient automatic integration.

[0053] The published algorithm will be executed in the operating environment, and the system will monitor the running status of the algorithm in real time, including resource usage, execution time, output results, etc. Users can view the running status of the algorithm through the monitoring interface and discover and solve potential problems in a timely manner.

[0054] As a second embodiment of the present application, the industrial algorithm construction and environment configuration method based on interactive programming also includes: S5: performing verification on the constructed industrial algorithm, and if the verification passes, publishing the industrial algorithm to the corresponding operating environment.

[0055] In this embodiment, the corresponding industrial algorithm is released to the operating environment only when the industrial algorithm verification passes, thereby ensuring the reliability, security and effectiveness of the algorithm in practical applications.

[0056] Verification of the constructed industrial algorithm includes: Perform format checking, type checking, and data range checking on built industrial algorithms.

[0057] In step S5, it also includes: When the constructed industrial algorithm fails to be verified, a failure prompt is executed according to the reason for the verification failure.

[0058] If the format of the constructed industrial algorithm is incorrect and causes verification failure, the user will be prompted with a format error and the corresponding error area will be highlighted to facilitate the user to make modifications.

[0059] In other cases, validation of the constructed industrial algorithms also includes: Perform real-time verification of industrial algorithms during their construction process.

[0060] like Figure 3 As shown, real-time verification of industrial algorithms during the construction of industrial algorithms includes: Obtain real-time algorithm input information, and perform real-time verification based on the real-time algorithm input information; When the real-time verification fails, the recommended information is output according to the reason for the real-time verification failure.

[0061] Through interactive programming, breakpoint debugging and other functions, algorithm development is carried out with business variables, and the algorithm is verified in real time. For example, during the algorithm development process, it is possible to identify that a part of the code is missing, output the correct code information according to the context code and algorithm requirements, and output the correct code information as recommended information to recommend user-available solutions, thereby improving the efficiency and accuracy of user algorithm development. It is possible to determine whether the code is missing through historical algorithm construction information. In other cases, the interactive programming interface can also be used to implement functions such as syntax error highlighting and version control.

[0062] Real-time verification of industrial algorithms during their construction also includes: Perform real-time debugging on the completed industrial algorithm part and output real-time code execution results.

[0063] Online debugging of the completed industrial algorithm allows users to obtain the execution results of the code in real time, making it easier for users to quickly discover problems with the current code, improve the efficiency of solving algorithm errors, and shorten the development cycle.

[0064] At this point, real-time verification of the industrial algorithm during the industrial algorithm construction process also includes: Obtain the expected code execution results corresponding to the algorithm requirements, compare the real-time code execution results with the expected code execution results, and output recommended information based on the comparison results.

[0065] In this embodiment, the code execution result determined to be completed during the historical algorithm development can be used as the expected code execution result, so as to judge whether the real-time code execution result meets the algorithm requirements, and the comparison result is output according to the difference between the real-time code execution result and the expected code execution result. The comparison result at least includes the difference execution result and the code corresponding to the difference execution result, so as to output the recommended code according to the difference execution result and the code corresponding to the difference execution result and highlight the code corresponding to the difference execution result. The recommended code can be output according to the code corresponding to the expected code execution result, so as to improve the efficiency of algorithm development while ensuring the accuracy of algorithm development.

[0066] As the third embodiment of the present application, step S0 further includes: According to the real-time version information, it is determined whether there is a version to be updated according to the version number of each dependent file and the real-time version information. If so, the dependent file is updated according to the version to be updated, and the historical version information is recorded.

[0067] In this embodiment, each environment allows the update of the Packages contained in the environment by upgrading the version number, and records the changes of each version. Users can choose to roll back to the previous version, or continue to upgrade to obtain the latest functions and performance optimizations. This provides users with more dependent file versions, making it easier for users to choose dependent file versions according to actual needs, improving the adaptability of dependent files, and further expanding the scope of development application.

[0068] Step S3 also includes: Get the start / stop signal, and adjust the start / stop state of the operating environment according to the start / stop signal.

[0069] According to the start and stop signals output by the user, the corresponding environment instance can be dynamically started or stopped according to user needs, and the operating status of the environment can be adjusted while adapting to the actual needs of the user, saving computing resources and improving resource utilization.

[0070] In some other cases, step S3 further includes: Obtain the operating environment usage interval information, and adjust the start and stop status of the operating environment according to the operating environment usage interval information and a preset interval threshold.

[0071] In this case, the preset interval threshold is the preset operating environment usage interval threshold. When the operating environment usage interval exceeds the operating environment usage interval threshold, it is considered that the current operating environment has not been used for a long time, and the start and stop state of the operating environment is adjusted. Among them, adjusting the start and stop state of the operating environment according to the operating environment usage interval information and the preset interval threshold includes: When the usage interval in the operating environment usage interval information is greater than or equal to a preset interval threshold, the adjustment of the operating environment is in a stopped state.

[0072] Close environment instances that have not been used for a long time to release resources, ensure efficient use of resources, and avoid unnecessary operating environments occupying resources.

[0073] In this embodiment, the published algorithm can be dynamically adjusted as needed, including modifying code, updating dependencies, adjusting resource configuration, etc. It supports hot updates and can be adjusted without interrupting the operation of the algorithm, thereby improving the flexibility and stability of the system.

[0074] Among them, in the construction of the environment instance, a Python environment corresponding to the requirements.txt file that meets the needs of different projects is generated. This construction strategy avoids the long-term occupation of the environment instance image file, and instead chooses to rebuild the Python environment based on the standard Python image and the specific requirements.txt file each time a requirement arises. This method not only ensures that the operating environment used each time is the latest and customized on demand, but also that the environment instance image file will be cleared in time after use, using the dynamic management mechanism to achieve efficiency improvement and resource savings.

[0075] As a fourth embodiment of the present application, an industrial algorithm construction and environment configuration system based on interactive programming includes: Environment configuration tools and interactive programming tools; Among them, the interactive programming tool is communicated with the environment configuration tool, the interactive programming tool interacts with the user to obtain the user's algorithm requirements, the environment configuration tool configures the operating environment according to the user's algorithm requirements, and the interactive programming tool calls the business variable assignment according to the algorithm requirements based on the operating environment configuration and dependencies to execute the industrial algorithm construction.

[0076] In this embodiment, an intuitive and easy-to-use programming interface is provided by integrating interactive programming tools, thereby improving the efficiency and accuracy of algorithm development. At the same time, through the built-in environment configuration tool, the environment can be quickly deployed and configured, reducing manual operation errors, reducing time costs, and achieving fast and reliable environment configuration.

[0077] In this application, users input algorithm development requirements through interactive programming tools, and the environment configuration tool configures the environment according to the algorithm development requirements. The interactive programming tool calls business variable assignments based on preset business variables or built-in business packages, and achieves seamless integration of data flow and business methods through unified variables and packages, improves algorithm integration efficiency, ensures code consistency and standardization, and makes it easier for algorithm developers to write and debug code in real time, significantly improving development efficiency and code accuracy, and eliminating the need for a large amount of manual operations and configurations in data flow and business method integration, thereby achieving efficient automated integration.

[0078] As the fifth embodiment of the present application, the electronic device includes a processor, a memory and a battery module; the memory is used to store programs; the battery module is used to power the memory; the processor is used to execute the program and implement the industrial algorithm construction and environment configuration method based on interactive programming as described above when executing the program.

[0079] As the sixth embodiment of the present application, a computer-readable storage medium is used to store a computer program or instruction. When the computer program or instruction is executed by a processing device, the above-mentioned industrial algorithm construction and environment configuration method based on interactive programming is implemented. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state hard disk), etc.

[0080] The specific implementation method described above is a preferred implementation method of the industrial algorithm construction and environment configuration method and system based on interactive programming of the present application, and is not intended to limit the specific implementation scope of the present application. The scope of the present application includes but is not limited to the specific implementation method. All equivalent changes made in accordance with the shape and structure of the present application are within the protection scope of the present application.

Claims

1. An industrial algorithm construction and environment configuration method based on interactive programming, characterized by: The steps include: S1: Create an algorithm runtime environment container and configure the corresponding runtime environment according to the selected dependency files; S2: Register with the corresponding gateway execution environment instance gateway based on the operating environment; S3: Build a connection between the registration gateway and the interactive programming tool, load the environment configuration corresponding to the running environment, and initialize dependencies; S4: Based on the environment configuration and dependencies, business variables are assigned according to algorithm requirements to execute industrial algorithm construction.

2. The method for constructing an industrial algorithm and configuring an environment based on interactive programming according to claim 1, characterized in that: The S1 further comprises: Get the base image corresponding to the programming language version, update the base image based on the selected dependency files, and generate the corresponding operating environment.

3. The method for constructing an industrial algorithm and configuring an environment based on interactive programming according to claim 1, characterized in that: Before executing S1, there exists: S0: Build the configuration relationship between the programming language version and the basic image, and build the configuration relationship between the dependent files and the operating environment.

4. The method for constructing an industrial algorithm and configuring an environment based on interactive programming according to claim 1, characterized in that: The S1 further comprises: Obtain the resource configuration data in the user's requirements, and configure the corresponding operating resources for the operating environment based on the resource configuration data.

5. The method for constructing an industrial algorithm and configuring an environment based on interactive programming according to claim 1, characterized in that: The S3 further includes: The registration gateway obtains the application requirements of the interactive programming tool, and builds a WebSocket connection between the operating environment corresponding to the registration gateway and the interactive programming tool according to the application requirements.

6. The method for constructing an industrial algorithm and configuring an environment based on interactive programming according to claim 1, characterized in that: The S4 further comprises: Call business variables and assign values ​​based on preset business variables or built-in business packages.

7. The method for constructing an industrial algorithm and configuring an environment based on interactive programming according to claim 1, characterized in that: Also includes: S5: Perform verification on the constructed industrial algorithm. If the verification passes, the industrial algorithm is released to the corresponding operating environment.

8. The method for constructing an industrial algorithm and configuring an environment based on interactive programming as claimed in claim 3, characterized in that: The S0 further includes: According to the real-time version information, it is determined whether there is a version to be updated according to the version number of each dependent file and the real-time version information. If so, the dependent file is updated according to the version to be updated, and the historical version information is recorded.

9. The method for constructing an industrial algorithm and configuring an environment based on interactive programming according to claim 5, characterized in that: The S3 further includes: Obtain the operating environment usage interval information, and adjust the start and stop status of the operating environment according to the operating environment usage interval information and a preset interval threshold.

10. An industrial algorithm construction and environment configuration system based on interactive programming, used to implement the method according to any one of claims 1 to 9, characterized in that: include: Environment configuration tools and interactive programming tools; Among them, the interactive programming tool is communicated with the environment configuration tool, the interactive programming tool interacts with the user to obtain the user's algorithm requirements, the environment configuration tool configures the operating environment according to the user's algorithm requirements, and the interactive programming tool calls the business variable assignment according to the algorithm requirements based on the operating environment configuration and dependencies to execute the industrial algorithm construction.

11. An electronic device, characterized in that: The electronic device includes a processor, a memory and a battery module; The memory is used to store programs; The battery module is used to supply power to the memory; The processor is used to execute the program and implement the industrial algorithm construction and environment configuration method based on interactive programming as described in any one of claims 1 to 9 when executing the program.

12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program or instruction. When the computer program or instruction is executed by a processing device, the industrial algorithm construction and environment configuration method based on interactive programming as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method and system for assisting operator development

    CN110928529A

  • Data processing platform based on Docker

    CN111158745A