Method for realizing shell command based on code-free platform
By customizing forms and configuring Shell command operation fields on a no-code platform, the technical challenge of executing Shell commands on a no-code platform is solved, enabling non-technical personnel to quickly deploy and execute Shell scripts, improving system stability and security, and supporting diverse operational needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN HONGTU TECH CO LTD
- Filing Date
- 2025-11-24
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies require the involvement of professional developers when executing shell commands on no-code platforms, increasing the technical threshold and manpower costs. They also pose security risks and data cross-incorrection, making it difficult to respond quickly to changes in business needs. Furthermore, existing no-code platforms have limited functionality and cannot meet the needs of complex scenarios.
By customizing forms and configuring Shell command operation fields on a no-code platform, a mapping relationship between fields and Shell script parameters is established. A task lock mechanism is used to handle multi-task concurrency, and predefined script libraries and static security scanning are supported, enabling visual configuration and execution of Shell scripts.
It lowers the technical threshold, improves system stability and security, supports diverse operational needs, enhances the flexibility and applicability of script execution, avoids data cross-correlation errors, and improves user experience.
Smart Images

Figure CN121957571A_ABST
Abstract
Description
A method for implementing shell commands based on a no-code platform Technical Field
[0001] This invention relates to the field of computer software technology, and in particular to a method and system for executing Shell commands on a no-code platform, especially suitable for executing Shell script operations through visual configuration in a Linux deployment environment. Background Technology
[0002] In today's digital age, enterprise services are typically built on Linux environments. These systems frequently need to call external services or perform operations within the Linux environment, such as synchronizing external service data, system backups, and data processing. Traditionally, solving these problems requires coding, where developers write specialized code to call and execute shell commands. This approach has significant drawbacks: First, it requires specialized developers, increasing the technical barrier and manpower costs. Second, every change in requirements necessitates code modifications, leading to increased maintenance costs and low efficiency. Third, the writing and debugging process is time-consuming, hindering rapid responses to changing business needs. Furthermore, directly executing shell scripts poses security risks and is prone to data cross-referencing errors during concurrent multitasking. While existing no-code platforms offer visual configuration capabilities, their functionality in executing system-level operations is limited, especially for complex scenarios requiring shell command execution, often failing to meet the actual needs of enterprises. Therefore, there is an urgent need for a method to implement shell commands based on a no-code platform to address the aforementioned technical problems. Summary of the Invention
[0003] In view of this, the present invention aims to propose a method for implementing shell commands based on a no-code platform, enabling executable shell scripts in a Linux deployment environment. Operations such as synchronizing external service data or system backups can be performed by writing shell script commands. Specifically, this invention allows for the rapid configuration and deployment of custom shell scripts, which can then be called and executed on a no-code platform as needed to achieve the design requirements. This invention addresses design pain points and difficulties by calling and executing shell scripts, offering simple configuration, good versatility, high execution performance, and good stability.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for implementing shell commands based on a no-code platform, comprising the following steps: Step 1: Customizing a form on the no-code platform and configuring operation fields for executing shell commands in the form; Step 2: Configuring the name of the shell file to be executed in the operation fields, and establishing a mapping relationship between one or more fields of the form and parameters in the shell script in sequence through ordered multi-selection; Step 3: During the execution phase, the operation of calling the shell operation fields is executed. The system calls a .sh format file in a specified path on the Linux server to generate shell command statements, and passes the actual data values of the mapped fields as parameters to execute the shell commands; Step 4: After execution, the system returns the execution result; wherein, if multiple shell script execution requests exist simultaneously during the execution phase, the system handles them by adding a task lock to ensure that only one shell script is executed at the same time.
[0005] Preferably, the no-code platform and the execution environment of the Shell script are Linux server environments, and the Shell script is used to solve the problems of interfacing with external services or system backup; wherein the written shell script is in .sh format.
[0006] Preferably, the operation field is implemented through an execution shell file component provided by a no-code platform; the operation of configuring the shell file name and establishing parameter mapping relationship is completed when configuring the parameters of the execution shell file component.
[0007] The component parameters of the Shell file execution component include: shell file, parameter field selection, asynchronous processing, and other parameters.
[0008] Preferably, the shell file is selected by the designer or the shell file name is manually entered; the shell script file comes from a predefined, security-audited script library; the scripts in the script library are uploaded and managed by the operations and maintenance administrator, and can only be used after undergoing static security scanning.
[0009] Preferably, the Shell script content must include a constraint terminator, which the system uses to identify whether the Shell script has been executed successfully.
[0010] Preferably, when executing the Shell script during the runtime phase, the actual value of the Shell parameter is the real-time data value of the mapped form field.
[0011] A system for implementing shell commands based on a no-code platform, and a method for implementing shell commands based on a no-code platform, includes: a form design module for configuring forms and operation fields for executing shell commands; a parameter mapping module for establishing the sequential mapping relationship between form fields and shell script parameters; a script execution engine deployed on a Linux server for calling and executing .sh script files under a specified path at runtime, and passing in parameters; and a result processing module for monitoring the script execution status and returning the execution result.
[0012] A computing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements steps such as those for implementing shell commands based on a no-code platform.
[0013] Preferably, the computer program is stored on a computer-readable storage medium.
[0014] The specific implementation plan is as follows: Based on the customer's requirements, write a shell script in .sh format, and deploy the written shell script file to the specified file path in the Linux environment.
[0015] In the deployment system, select the component that executes the shell file. Within the component, select the shell script file or manually enter the shell file name. If the shell script file is selectable, it will automatically identify all shell files with the .sh format in the current path. If the shell file name is entered, the shell file name will be deployed and exists in the current path.
[0016] When configuring the parameters, select the corresponding fields according to the number of parameters in the shell script. When executing the script, the values of the corresponding fields will be passed as parameter values to the corresponding parameters of the shell script for execution.
[0017] During the script execution phase, if the shell file component is executed, a form submission event will be triggered, and the data on the form will also be submitted to the backend. The backend analyzes the shell file to be called and the corresponding shell parameters according to the configured parameters, and calls the shell command to execute the shell script, thus completing the execution of the shell script.
[0018] The technical effects and advantages of this invention are as follows: This invention enables non-technical personnel to quickly deploy and execute Shell scripts through a visual component configuration method, eliminating the need for complex code writing and significantly reducing the technical threshold and maintenance costs. This invention uses a task locking mechanism to ensure that only one Shell script is executed at a time, avoiding data cross-contamination errors that may occur during concurrent multi-task execution, thus improving system stability and data security. This invention supports various Shell script application scenarios, including integration with external services, system backup, and data synchronization, meeting the diverse operational needs of enterprises in a Linux environment and exhibiting good versatility and scalability. This invention uses a predefined script library and static security scanning mechanism to ensure that only security-approved Shell scripts can be executed, effectively preventing the execution of malicious scripts and improving the overall system security. This invention establishes a mapping relationship between form fields and Shell script parameters through ordered multi-selection, realizing dynamic parameter passing and enhancing the flexibility and applicability of script execution. This invention supports synchronous / asynchronous execution modes, allowing users to choose between synchronous or asynchronous execution methods according to actual needs. For tasks with long execution times, asynchronous execution can be used to avoid blocking the main program and improve user experience. Attached Figure Description
[0019] Figure 1 is a schematic diagram of the method for implementing shell commands based on a no-code platform according to the present invention.
[0020] Figure 2 is a schematic diagram of the system flow for implementing shell commands based on a no-code platform according to the present invention. Detailed Implementation
[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. In addition, the forms of the various structures described in the following embodiments are merely illustrative. The method for implementing shell commands based on a no-code platform involved in the present invention is not limited to the structures described in the following embodiments. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] This invention provides a method for implementing shell commands based on a no-code platform, comprising the following steps: Step 1: Customize a form on the no-code platform and configure operation fields in the form for executing shell commands; Step 2: Configure the name of the shell file to be executed in the operation fields, and establish a mapping relationship between one or more fields of the form and parameters in the shell script in sequence through ordered multi-selection; Step 3: During the execution phase, execute the operation that calls the shell operation fields. The system calls a .sh format file in a specified path on the Linux server to generate shell command statements, and passes the actual data values of the mapped fields as parameters to execute the shell commands; Step 4: After execution, the system returns the execution result; wherein, if multiple shell script execution requests exist simultaneously during the execution phase, the system handles them by adding a task lock to ensure that only one shell script is executed at the same time.
[0023] In this embodiment of the application, the operation field in the form is implemented at the system level through an "execute Shell file component" provided by a no-code platform; the configuration of the operation field by the user when designing the form is essentially setting the parameters of the underlying execute Shell file component.
[0024] Referring to Figure 1, the present invention provides a method for implementing shell commands based on a no-code platform. The no-code platform and the execution environment of the shell script are Linux server environments. The shell script is used to solve the problems of interfacing with external services or system backup. The shell script is in .sh format.
[0025] Referring to Figure 1, the present invention provides a method for implementing shell commands based on a no-code platform. The above-mentioned operation fields are implemented through an execution shell file component provided by a no-code platform. The operation of configuring the shell file name and establishing parameter mapping relationships is completed when configuring the parameters of the execution shell file component.
[0026] The component parameters of the Shell file execution component include: shell file, parameter field selection, asynchronous processing, and other parameters.
[0027] In this embodiment, the Shell file is specified by selecting a predefined Shell script file or manually entering the Shell file name. When manually entering the name, it must be ensured that the file exists in the specified file path in the Linux environment. Parameter field selection is achieved by sequentially selecting multiple fields in the form and establishing a mapping relationship between them and the parameters in the Shell script, such that fields f1, f2, f3...fn correspond to Shell script parameters $1, $2, $3...$n, respectively. Asynchronous processing is configured to determine whether the Shell script is executed asynchronously.
[0028] Referring to Figure 1, this invention provides a method for implementing shell commands based on a no-code platform. The shell file is selected by the designer or the shell file name is manually entered. The shell script file comes from a predefined, security-audited script library. The scripts in the script library are uploaded and managed by the operations and maintenance administrator and can only be used after undergoing static security scanning.
[0029] Referring to Figure 1, the present invention provides a method for implementing shell commands based on a no-code platform. The shell script content must contain a constraint terminator, and the system uses this terminator to identify whether the shell script has been executed successfully. When the shell script is executed during the runtime phase, the actual value of the shell parameter is the real-time data value of the mapped form field.
[0030] Referring to Figure 2, the present invention provides a system for implementing shell commands based on a no-code platform, and a method for implementing shell commands based on a no-code platform, comprising: a form design module for configuring forms and operation fields for executing shell commands; a parameter mapping module for establishing an order mapping relationship between form fields and shell script parameters; a script execution engine deployed on a Linux server for calling and executing .sh script files under a specified path at runtime, and passing in parameters; and a result processing module for monitoring the script execution status and returning the execution result.
[0031] In this embodiment of the application, a computing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements steps such as those for implementing shell commands based on a no-code platform.
[0032] Referring to Figure 1, this invention provides a method for implementing shell commands based on a no-code platform, including the following steps: S1, the shell script is written in .sh format. If parameters are passed in the script, they need to be represented by parameters where the actual values are passed, such as $1, $2, $3, etc. These symbols are shell-recognizable parameter symbols and are ordered. The written shell script is deployed to a specified file path in the Linux environment.
[0033] S2. Configure the shell script during the design phase, place the component that executes the shell file on the design page, and configure the component parameters. The main component parameters include: shell file, parameter field selection, asynchronous processing, etc.
[0034] The shell file is primarily used by designers to select shell script files or manually enter the shell file name. If selecting a shell script file, the options will automatically identify all shell script files in the specified path. If manually entering the shell file name, simply type the corresponding shell file name, ensuring that the entered name exists in the specified file path within the Linux environment.
[0035] Parameter field selection is associated with the configuration of parameters in the shell script. The selection references the form fields, and the selection of form fields is ordered and multiple, corresponding to the order and number of parameters in the shell script. For example, if the fields are f1, f2, f3..., they correspond to parameters $1, $2, $3... in the shell script, respectively. During the runtime, the actual parameter values passed to the shell script are the actual data values of fields f1, f2, f3...
[0036] Asynchronous processing mainly involves the configuration in the shell, specifically whether the shell script is executed asynchronously. Sometimes, the shell script may take a long time to execute and does not require feedback. In such cases, asynchronous execution can be used to ensure that the program completes smoothly.
[0037] S3. During runtime, executing shell file component operations will trigger a form submission event, and the data on the form will also be submitted to the backend. The backend parses the shell file to be called and the corresponding shell parameters according to the configured parameters, and generates shell command statements after parsing. The script is then run according to the / bin / sh execution command statements of the Linux system.
[0038] S4. When executing a shell script, the system checks for the end-of-command marker. Once the marker is found, the script is considered complete. If necessary, the execution result will also be displayed. If multiple shell scripts are executing simultaneously, the system uses a task lock mechanism, executing only one script at a time. After execution, the system continues with the next task according to the task queue until all tasks are completed. This ensures that only one shell command can be executed at a time, preventing data overlap and errors.
[0039] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0040] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0041] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0042] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0043] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0044] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for implementing shell commands based on a no-code platform, characterized in that, Includes the following steps: Step 1: Define a custom form on the no-code platform and configure operation fields within the form for executing Shell commands. Step 2: Configure the name of the Shell file to be executed in the operation fields, and establish a sequential mapping relationship between one or more fields of the form and parameters in the Shell script using ordered multiple selections. Step 3: During the runtime phase, the system executes the operations that call the Shell operation fields. The system calls a .sh format file located at a specified path on the Linux server to generate Shell command statements, and passes the actual data values of the mapped fields as parameters to execute the Shell commands. Step 4: After execution, the system returns the execution result. Note that if multiple Shell script execution requests exist simultaneously during the runtime phase, the system uses a task lock to ensure that only one Shell script is executed at a time.
2. The method according to claim 1, characterized in that: The no-code platform and the execution environment of the Shell script are Linux server environments. The Shell script is used to solve the problems of interfacing with external services or system backup; the shell script is written in .sh format.
3. The method according to claim 1, characterized in that: The operation fields are implemented through an execution shell file component provided by a no-code platform; the operations of configuring the shell file name and establishing parameter mapping relationships are completed when configuring the parameters of the execution shell file component. The component parameters of the Shell file execution component include: shell file, parameter field selection, asynchronous processing, and other parameters.
4. The method according to claim 1, characterized in that: The shell file is selected by the designer or the shell file name is manually entered; the shell script file comes from a predefined, security-approved script library; the scripts in the script library are uploaded and managed by the operations and maintenance administrator, and can only be used after undergoing static security scanning.
5. The method according to claim 1, characterized in that: The shell script content must contain a constraint terminator, which the system uses to identify whether the shell script has been executed successfully.
6. The method according to claim 1, characterized in that: When the Shell script is executed during runtime, the actual value of the Shell parameter is the real-time data value of the mapped form field.
7. A system for implementing shell commands based on a no-code platform, characterized in that, The system is capable of implementing the method described in any one of claims 1 to 6, comprising: a form design module for configuring the form and the operation fields for executing the Shell command; a parameter mapping module for establishing the sequential mapping relationship between form fields and Shell script parameters; a script execution engine deployed on a Linux server for calling and executing the .sh script file under a specified path at runtime and passing in parameters; and a result processing module for monitoring the script execution status and returning the execution result.
8. A computing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 6.
9. The computing device according to claim 8, characterized in that, The computer program is stored on a computer-readable storage medium.