Script control method and device, electronic equipment and storage medium

Through the cross-language multi-parameter mapping script operation platform, the language differences and environmental isolation problems in multi-language script combination execution are solved, efficient and secure parameter transfer and complex task automation are achieved, and development efficiency and system stability are improved.

CN120215898APending Publication Date: 2025-06-27CHINA TELECOM CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510142311.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing script execution system only supports a single language, lacks an efficient and flexible multilingual script combination execution solution, and there are language differences, environment isolation, inconsistent data formats, security and synchronization asynchronous problems when passing parameters between different scripts.

Method used

It provides a cross-language multi-parameter mapping script operation platform, which realizes efficient development and flexible execution of scripts through multi-language runtime management, parameter mapping and dynamic delivery mechanism, task orchestration and workflow engine, containerization and isolation mechanism.

Benefits of technology

It realizes seamless integration between different programming languages, improves development efficiency, ensures system stability and security, and supports automated execution of complex workflows and real-time log viewing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215898A_ABST
    Figure CN120215898A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a script control method and device, electronic equipment and a storage medium. When a script selection instruction is received, a first script and a second script corresponding to the script selection instruction are determined; the language format of the first script is different from that of the second script; obtaining an output result of the first script; converting the output result from the language format of the first script into the language format of the second script, and generating input data for the second script; and the second script is controlled to generate the target result based on the input data, so that developers can select the optimal programming language according to task requirements without being limited to a single language, and the development efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of script control, and in particular, to a script control method, a script control device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of computer technology, scripts written in multiple programming languages are often required to be integrated in software applications to achieve complex functions.

[0003] However, the script execution systems in related technologies often only support a single type of language, and lack an efficient and flexible solution for the combined execution of multi-language scripts. Summary of the Invention

[0004] Embodiments of the present invention provide a script control method, device, electronic device, and computer-readable storage medium to overcome or at least partially solve the above problems.

[0005] Embodiments of the present invention disclose a script control method, which is applied to a backend server. The backend server is configured with a corresponding front-end user device, and the front-end user device is used to obtain a user's script selection instruction and send the script selection instruction to the backend server. The method includes:

[0006] When receiving the script selection instruction, determining a first script and a second script corresponding to the script selection instruction; the language format of the first script is different from that of the second script;

[0007] Obtaining the output result of the first script;

[0008] Converting the output result from the language format of the first script to the language format of the second script to generate input data for the second script;

[0009] Controlling the second script to generate a target result based on the input data.

[0010] Optionally, the first script is a combined script, and the step of obtaining the output result of the first script includes:

[0011] Determining a script execution path for the combined script through the script selection instruction;

[0012] Obtaining the output result of the combined script based on the execution path.

[0013] Optionally, the method further includes:

[0014] Creating a first script container for the first script and a second script container for the second script;

[0015] The first script container is used to mount the first script, and the first script is configured to generate the output result in the first script container;

[0016] The second script container is used to mount the second script, and the second script is configured to generate the target result in the second script container.

[0017] Optionally, it further includes:

[0018] Generate script running logs for the first script and the second script;

[0019] Send the script running logs to the front-end user device.

[0020] Optionally, the back-end server is configured with a unified management and scheduling interface for the first script and the second script, and the back-end server is used to control the first script and the second script through the unified management and scheduling interface.

[0021] An embodiment of the present invention also discloses a script control method, which is applied to a front-end user device, and the back-end server is configured with a corresponding back-end server, including:

[0022] Obtain the user's script selection instruction;

[0023] Send the script selection instruction to the back-end server; the back-end server is used to determine the first script and the second script corresponding to the script selection instruction when receiving the script selection instruction; the language format of the first script is different from the language format of the second script; obtain the output result of the first script; convert the output result from the language format of the first script to the language format of the second script to generate input data for the second script; control the second script to generate a target result based on the input data.

[0024] An embodiment of the present invention also discloses a script control device, which is applied to a back-end server, and the back-end server is configured with a corresponding front-end user device, and the front-end user device is used to obtain the user's script selection instruction and send the script selection instruction to the back-end server, including:

[0025] A task request creation module, configured to determine the first script and the second script corresponding to the script selection instruction when receiving the script selection instruction; the language format of the first script is different from the language format of the second script;

[0026] An output result acquisition module, configured to obtain the output result of the first script;

[0027] A language format conversion module, configured to convert the output result from the language format of the first script into the language format of the second script, and generate input data for the second script;

[0028] A target result generation module, configured to control the second script to generate a target result based on the input data.

[0029] An embodiment of the present invention further discloses a script control device. The method is applied to a front-end user device, and a corresponding back-end server is configured. The back-end server includes:

[0030] A script selection instruction acquisition module, configured to acquire a script selection instruction of a user;

[0031] A script selection instruction sending module, configured to send the script selection instruction to the back-end server; when receiving the script selection instruction, the back-end server is configured to determine a first script and a second script corresponding to the script selection instruction; the language formats of the first script and the second script are different; acquire the output result of the first script; convert the output result from the language format of the first script into the language format of the second script, and generate input data for the second script; control the second script to generate a target result based on the input data.

[0032] An embodiment of the present invention further discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus;

[0033] The memory is configured to store a computer program;

[0034] When the processor is configured to execute the program stored in the memory, the method described in the embodiment of the present invention is implemented.

[0035] An embodiment of the present invention further discloses a computer-readable storage medium, on which instructions are stored. When executed by one or more processors, the processors are caused to execute the method described in the embodiment of the present invention.

[0036] The embodiments of the present invention have the following advantages:

[0037] In an embodiment of the present invention, when the script selection instruction is received, the first script and the second script corresponding to the script selection instruction are determined; the language formats of the first script and the second script are different; the output result of the first script is obtained; the output result is converted from the language format of the first script to the language format of the second script to generate input data for the second script; and the second script is controlled to generate a target result based on the input data, so that developers are not limited to a single language and can select the best programming language according to task requirements, thereby greatly improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flowchart of the steps of a script control method provided in an embodiment of the present invention;

[0039] Figure 2 is a schematic flowchart of a script addition method provided in an embodiment of the present invention;

[0040] Figure 3 is a schematic flowchart of a script execution method provided in an embodiment of the present invention;

[0041] Figure 4 is a block diagram of the structure of a script control device provided in an embodiment of the present invention;

[0042] Figure 5 is a block diagram of the hardware structure of an electronic device provided in an embodiment of the present invention;

[0043] Figure 6 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0045] With the rapid development of computer technology, software applications often need to integrate scripts written in multiple programming languages to achieve complex functions. However, existing script execution systems often only support a single or a few languages, and there is a lack of efficient and flexible solutions for the combined execution of multi-language scripts. In addition, how to accurately transfer parameters and process execution results between different scripts is also a problem faced by current technologies. The problems existing in accurately transferring parameters between different scripts are analyzed as follows:

[0046] 1. Independence between scripts:

[0047] Script language differences: Different scripts may use different programming languages (such as Python, Shell, PHP, etc.). These languages have differences in syntax, data types, function libraries, etc., which may require additional conversion or processing when passing parameters.

[0048] Runtime environment isolation: Scripts may run in different operating systems, virtual machines, or containers. The isolation between these environments may limit file access, network communication, etc., thus affecting parameter passing.

[0049] 2. Data format and serialization:

[0050] Inconsistent data formats: Different scripts may expect to receive data in different formats (such as text, JSON, XML, etc.). If the data format passed does not match the format expected by the receiving party, it may lead to parsing errors or data loss.

[0051] Serialization and deserialization: When passing complex data structures (such as objects, arrays, etc.) as parameters, serialization operations are required to convert them into a transmissible format. After receiving the data, the receiving party needs to perform deserialization operations to restore the original data structure. If problems occur during serialization or deserialization, it may lead to data corruption or incorrect parsing.

[0052] 3. Security issues:

[0053] Data leakage: When passing parameters through networks or other insecure channels, there may be a risk of data being intercepted or tampered with. Therefore, appropriate security measures need to be taken to protect the security and integrity of the data.

[0054] Injection attacks: If the parameters passed are directly used to execute code (such as SQL queries, system commands, etc.) without proper processing, injection attacks may occur. Such attacks can allow attackers to execute malicious code or access sensitive data.

[0055] 4. Synchronization and asynchronization issues:

[0056] Synchronous passing: In some cases, it is necessary to ensure that parameters are synchronized during passing, that is, after the sender sends the parameters, the receiver must immediately receive and process these parameters. However, due to factors such as network latency and system load, synchronous passing may be difficult to achieve.

[0057] Asynchronous passing: Asynchronous passing can solve some problems in synchronous passing, but it may also introduce new complexities. For example, the receiver needs to process asynchronous parameters from multiple senders and ensure the correctness and order of these parameters.

[0058] An embodiment of the present invention provides a cross - language multi - parameter mapping script running platform. Through multi - language runtime management, parameter mapping and dynamic transfer mechanisms, task orchestration and workflow engines, containerization and isolation mechanisms, and unified logging and monitoring systems, the platform realizes the efficient development, flexible execution, and timely log viewing of scripts.

[0059] Specifically, the technical architecture and core principles include:

[0060] 1. Multi - language runtime management: The cross - language platform manages different programming language environments through language adapters and virtual machine technologies. Each programming language has an independent runtime container, which is responsible for managing the execution environment of the language interpreter or compiler. Through the language adapter, the platform converts standardized task requests into execution tasks in a specific language.

[0061] 2. Parameter mapping and dynamic transfer mechanism: One of the cores of the cross - language platform is the parameter mapping mechanism. The platform internally maintains a global data exchange and mapping module, which can:

[0062] Capture the output results of the script and map them to the input parameters required by other scripts.

[0063] Provide flexible mapping rules, allowing users to customize the mapping relationship.

[0064] Use a data verification mechanism to ensure the efficiency and accuracy of parameter transfer.

[0065] 3. Task orchestration and workflow engine: The platform usually integrates a task orchestration system for defining the execution order and conditions of scripts. The workflow engine can dynamically schedule the execution of scripts according to different business requirements, ensuring that parameters can be passed to the next task according to the mapping rules defined by users. Through parallel processing of tasks, the workflow engine can accelerate the task execution speed.

[0066] 4. Containerization and isolation mechanism: The running environment of each language script is isolated through containerization technology to ensure that different scripts are executed in independent environments and avoid mutual influence. Container technologies such as Docker can provide exclusive dependency environments for scripts in each language, while ensuring the security and stability of script execution.

[0067] To enable those skilled in the art to better understand the embodiments of the present invention, the following explains some terms related to the embodiments of the present invention.

[0068] The framework of the front - end user device:

[0069] Vue.js, React: They are currently very popular JavaScript frameworks for building user interfaces. Vue.js is known for its simplicity and flexibility in learning, while React is famous for its powerful performance and ecosystem.

[0070] In the backend server, the types of language formats of scripts:

[0071] Python: An interpreted, object-oriented high-level programming language, widely popular for its concise syntax and rich libraries.

[0072] Node.js: A JavaScript runtime environment based on the Chrome V8 engine, used to build high-performance network applications.

[0073] Web frameworks:

[0074] Flask, Express, Django: These are frameworks for quickly developing web applications. Flask and Express are relatively lightweight, while Django is more feature-complete.

[0075] Databases:

[0076] PostgreSQL, MySQL: Relational database management systems for storing and managing structured data. PostgreSQL is known for its powerful features and stability, while MySQL is famous for its ease of use and wide application.

[0077] Container engines:

[0078] Docker: An open-source containerization platform that can package an application and its dependencies into a portable container.

[0079] Task scheduling:

[0080] Celery, Airflow: These tools are used for the scheduling and management of asynchronous tasks, which can place time-consuming tasks in the background to improve system response speed.

[0081] Configuration management:

[0082] Ansible, SaltStack: These tools are used for automated configuration management and can deploy and manage servers in batches.

[0083] Docker Compose

[0084] Definition: Docker Compose is a tool for defining and running multi-container Docker applications.

[0085] Function: It uses a YAML file to configure the services of an application, and then all services can be started, stopped, or rebuilt with a single command.

[0086] In short: Docker Compose allows you to manage multiple Docker containers as a whole, facilitating the deployment and running of complex applications.

[0087] ELK Stack:

[0088] Definition: ELK Stack is a combination of three open-source software: Elasticsearch, Logstash, and Kibana.

[0089] Function:

[0090] Elasticsearch: A distributed and scalable search and analysis engine. Used for storing and searching log data.

[0091] Logstash: A server-side data pipeline for collecting, parsing, and transforming data.

[0092] Kibana: A browser-based user interface for searching, viewing, and visualizing data stored in Elasticsearch.

[0093] In short: ELK Stack can help you collect, store, analyze, and visualize large amounts of log data to better understand the system's operating status.

[0094] Prometheus:

[0095] Definition: Prometheus is an open-source monitoring system and time series database.

[0096] Function: It pulls metrics from the monitored targets via the HTTP protocol and stores these metrics. These metrics can be used to create charts, alerts, and dashboards.

[0097] In short: Prometheus can help you monitor various metrics of the system, such as CPU usage, memory usage, network traffic, etc., to detect problems in a timely manner.

[0098] Grafana:

[0099] Definition: Grafana is an open-source analytics platform and visualization tool.

[0100] Function: It can be connected to various data sources (including Prometheus) and create custom dashboards. These dashboards can display real-time data, charts, statistical information, etc.

[0101] In short: Grafana can help you present the collected monitoring data in a graphical way to better understand the system operation status.

[0102] Refer to Figure 1 , which shows the step flowchart of a script control method provided in an embodiment of the present invention, and specifically may include the following steps:

[0103] Step 101, when receiving the script selection instruction, determine the first script and the second script corresponding to the script selection instruction; the language format of the first script is different from the language format of the second script;

[0104] Step 102, obtain the output result of the first script;

[0105] Step 103, convert the output result from the language format of the first script to the language format of the second script to generate input data for the second script;

[0106] Step 104, control the second script to generate a target result based on the input data.

[0107] In specific implementation, the embodiment of the present invention can be applied to a backend server.

[0108] Front-end user device:

[0109] Definition: It refers to the part that the user directly contacts, that is, the user interface.

[0110] Function: Responsible for presenting data, receiving user input, and interacting with the backend.

[0111] Technology stack: HTML, CSS, JavaScript, and various front-end frameworks (such as React, Vue, Angular) and libraries.

[0112] Examples: The page layout, buttons, forms, pictures, etc. of a website.

[0113] Backend server:

[0114] Definition: It refers to the part that the user cannot see and is responsible for processing business logic.

[0115] Function: Process data, store data, and provide API interfaces for the front-end to call.

[0116] Technology Stack: Programming Languages (Python, Java, Node.js, etc.), Databases (MySQL, PostgreSQL, etc.), Servers (Nginx, Apache, etc.), Frameworks (Django, Express, etc.).

[0117] Examples: Implementation of functions such as user registration, login, and payment.

[0118] Relationship between Front-end and Back-end:

[0119] Division of Labor and Cooperation: The front-end is responsible for the user experience, and the back-end is responsible for the business logic.

[0120] Data Interaction: The front-end sends requests to the back-end via HTTP requests, and the back-end processes the requests and returns data.

[0121] API Interface: The back-end provides an Application Programming Interface (API) for the front-end to call to achieve data interaction.

[0122] In a specific implementation, embodiments of the present invention can set a user interaction interface on the front-end user device. The user can input a script selection instruction through the user interaction interface. The script selection instruction can be a task request initiated by the front-end user device to the back-end server, and can include, but is not limited to, an instruction for selecting a script, an instruction for defining the execution order of the script, and an instruction for configuring the parameter mapping relationship, etc.; the front-end user device can be used to obtain the user's script selection instruction and send the script selection instruction to the back-end server.

[0123] The back-end server can build a cross-language multi-parameter mapping script running platform, hereinafter referred to as the "platform". The platform can include:

[0124] A script execution module for executing various scripts in environments of different programming languages;

[0125] A parameter mapping module for passing parameters between scripts in different languages, where the parameter mapping module automatically identifies the output of the first script and maps it as the input parameter of the second script;

[0126] A workflow orchestration module for defining the execution order and conditional judgment between multiple scripts;

[0127] A container management module for creating isolated running environments for scripts in different languages to ensure the independent execution and resource isolation of scripts in different languages;

[0128] Among them, the platform manages the execution of scripts in different languages and parameter passing through a unified interface, and supports the execution of multi-step tasks through an automated workflow.

[0129] The platform has the following core functions:

[0130] Multi-language support: Supports multiple programming languages, including Python, MySQL, Bash, etc., to meet diverse script execution requirements.

[0131] Parameter mapping: Automatically identifies and maps input and output parameters between scripts, simplifying the interaction between scripts.

[0132] Workflow orchestration: Supports graphical definition of complex workflows to achieve automated execution of multi-step tasks.

[0133] Containerized isolation: Based on container technologies such as Docker, provides an independent running environment for each script, improving system stability.

[0134] Log management: Real-time records script execution logs for convenient problem troubleshooting.

[0135] Error recovery: Has the function of automatically detecting and recovering failed scripts.

[0136] In a specific implementation, the embodiment of the present invention can, when receiving a script selection instruction, determine a first script and a second script corresponding to the script selection instruction, where the language format of the first script may be different from that of the second script; then obtain the output result of the first script, and then convert the output result from the language format of the first script to the language format of the second script to generate input data for the second script; control the second script to generate a target result based on the input data.

[0137] Exemplarily, the system architecture is designed as follows:

[0138] Front-end user device: Provides a user-friendly interface for creating, editing, managing script tasks, and real-time displaying task execution status and logs.

[0139] Back-end server: Responsible for receiving user instructions, scheduling task execution, managing script resources, and interacting with the database.

[0140] Database: Stores data such as script information, task configurations, and execution logs.

[0141] Containerized environment: Uses containerization technologies such as Docker to provide an isolated running environment for each script.

[0142] 2. Technology selection:

[0143] Front-end frameworks: Vue.js, React, etc.

[0144] Back-end languages: Python, Node.js, etc.

[0145] Web frameworks: Flask, Express, Django, etc.

[0146] Databases: PostgreSQL, MySQL, etc.

[0147] Container Engine: Docker

[0148] Task Scheduling: Celery, Airflow, etc.

[0149] Configuration Management: Ansible, SaltStack, etc.

[0150] 3. Core Function Implementation:

[0151] Script Upload and Storage: Users can upload script files through the front-end interface, and the system stores them in the specified directory.

[0152] Script Editor: Provide an online editor to facilitate users to write and modify scripts directly on the platform.

[0153] Task Creation: Users select scripts, configure parameters, set execution time, etc. to create tasks.

[0154] Task Scheduling: The platform adds tasks to the task queue according to the task configuration and executes tasks according to the scheduling policy.

[0155] Container Creation and Management: Create an independent container for each task of an independent script, configure the container environment, and start the container to execute the script.

[0156] Parameter Passing: Pass the parameters in the task configuration to each script.

[0157] Result Collection and Storage: Collect the output results and logs of each script and store them in the database.

[0158] Error Handling and Alarming: When a script execution fails, record the error log and send an alarm notification according to the configuration.

[0159] Log Query: Provide the function of querying and filtering logs to facilitate users to view the task execution status.

[0160] 4. Specific Implementation Steps:

[0161] 4.1 Script Management:

[0162] Upload: Support users to upload various types of script files (Python, Shell, SQL, etc.).

[0163] Edit: Provide an online editor to facilitate users to modify the script content.

[0164] Version Control: Record the modification history of the script for easy backtracking.

[0165] 4.2 Task Creation and Configuration:

[0166] Task Creation: The user selects a script, configures input and output parameters, sets the execution environment, and specifies the execution time.

[0167] Dependency Management: Automatically detect script dependencies and install the required libraries or environments.

[0168] Parameter Mapping: Support custom parameter mapping rules to achieve data transfer between different scripts.

[0169] 4.3 Task Scheduling:

[0170] Task Queue: Put the tasks to be executed into the task queue.

[0171] Scheduler: Take tasks from the queue and execute them according to task priorities and execution times.

[0172] Parallel Execution: Support parallel execution of multiple tasks to improve system efficiency.

[0173] 4.4 Containerized Execution:

[0174] Container Creation: Create an independent container for each task to isolate the task execution environment.

[0175] Environment Configuration: Install the required software and configure environment variables in the container according to the task configuration.

[0176] Script Execution: Execute the script inside the container and capture the output.

[0177] 4.5 Result Processing:

[0178] Logging: Record the execution logs of the script, including standard output, standard error output, execution time, etc.

[0179] Result Storage: Store the output results of the script in a database or file system.

[0180] Status Update: Update the status of the task, such as success, failure, running.

[0181] 4.6 Monitoring and Alerting:

[0182] Real-time Monitoring: Monitor the execution status of tasks and detect anomalies in a timely manner.

[0183] Alert Notification: Send alert notifications when a task fails or an anomaly occurs.

[0184] 4.7 User Interface:

[0185] Task List: Display a list of all tasks, including information such as status and execution time.

[0186] Log viewing: Provide log query and filtering functions.

[0187] Workflow visualization: Support visual creation and editing of complex workflows.

[0188] For example, the requirements of front-end users:

[0189] Diverse data sources: Hope to obtain data from multiple sources such as weather APIs, stock APIs, news APIs, etc.

[0190] Data processing: Want to clean, transform, and merge the obtained data to meet your display needs.

[0191] Scheduled updates: Hope that the data on the website can be updated regularly.

[0192] Visual display: You hope to display the processed data in the form of charts, maps, etc. on the web page.

[0193] How the platform (backend) meets user requirements:

[0194] Determine multiple scripts according to the script selection instruction:

[0195] Script 1: Obtain weather data from the weather API and convert it into JSON format.

[0196] Script 2: Obtain stock data from the stock API and convert it into CSV format.

[0197] Script 3: Merge the weather data and stock data and calculate relevant metrics.

[0198] Script 4: Generate a chart from the calculation results and save it as an image.

[0199] Define a workflow:

[0200] Users define a workflow on the platform, specifying the execution order of Scripts 1, 2, 3, and 4, as well as the parameter passing relationship between them. For example, Script 1 is the first script, and the output result of Script 1 (weather data) is one of the inputs of the second script (Script 3). Another example is that Scripts 1 and 2 are the first scripts, and the output result of Script 1 (weather data) and the output result of Script 2 (stock data) are inputs of the second script (Script 3).

[0201] Platform automatic execution:

[0202] The platform will execute each script in sequence according to the workflow you defined.

[0203] After Script 1 is executed, convert the output result into JSON format, and use the converted output result as the input data of the second script, and automatically pass it as a parameter to Script 3.

[0204] After Script 3 finishes processing the data, it will generate a chart as the target result and save it to the specified location.

[0205] Front-end display:

[0206] The page of the front-end user device will regularly send requests to the platform's API to obtain the latest chart data.

[0207] The front-end renders the obtained data onto the page and displays it to the user.

[0208] 5. The specific implementation method can be as follows:

[0209] The core functions of the platform include:

[0210] Multi-language support: The platform supports multiple languages such as Python (for data processing), Bash (for system commands), JavaScript (for the front-end), etc., and you can flexibly choose the appropriate language to write scripts.

[0211] Parameter mapping: The platform will automatically identify the output formats of different scripts and convert them into the input formats required by the next script. For example, convert data in JSON format to CSV format.

[0212] Containerization: Use Docker Compose to orchestrate multiple containers to achieve more complex application scenarios.

[0213] Log management: Use tools such as ELK Stack to collect, analyze, and visualize logs.

[0214] Monitoring and alerting: Use tools such as Prometheus and Grafana to monitor the system running status and set alert rules.

[0215] Permission control: Implement user permission management, and different users can manage different scripts and tasks.

[0216] The platform includes the following module unified interfaces:

[0217] RESTful API (Representational State Transfer Application Programming Interface) is a software architecture style used to create web services. It defines a set of rules and best practices, enabling different software applications to communicate via the HTTP protocol.

[0218] RESTful API: Provide a unified RESTful API interface for the front-end or other systems to call, to achieve the creation, editing, execution, and management of scripts.

[0219] API functions:

[0220] Create script: Upload script file, configure parameters, and set execution environment.

[0221] Edit script: Modify script content and parameter configuration.

[0222] Execute script: Trigger script execution and return execution results.

[0223] Query task status: Obtain information such as task execution status and logs.

[0224] Parameter mapping module:

[0225] Data format recognition: Automatically recognize the format of output data using regular expressions, JSON Schema, etc.

[0226] Data conversion: Convert output data according to the input parameter type of the target script.

[0227] Mapping rule configuration: Support custom mapping rules and flexibly configure parameter relationships between different scripts.

[0228] Workflow engine:

[0229] DAG (Directed Acyclic Graph): Use DAG to represent the workflow and clearly define the dependencies between tasks.

[0230] Task scheduling: Execute tasks according to the topological sorting of DAG.

[0231] Status management: Record the execution status of each task, including pending execution, running, successful, failed, etc.

[0232] Container management module:

[0233] Container creation: Create corresponding Docker containers according to script dependencies and environment configurations.

[0234] Container orchestration: Use Docker Compose or Kubernetes to orchestrate multiple containers to achieve complex workflows.

[0235] Container network: Configure network communication between containers to achieve data transfer.

[0236] Log management module:

[0237] Log collection: Collect standard output, standard error output, and container logs of the script.

[0238] Log storage: Store logs in a database or a logging system.

[0239] Log query: Provide log search and filtering functions.

[0240] In an embodiment of the present invention, when receiving the script selection instruction, the first script and the second script corresponding to the script selection instruction are determined; the language format of the first script is different from that of the second script; the output result of the first script is obtained; the output result is converted from the language format of the first script to the language format of the second script to generate input data for the second script; and the second script is controlled to generate a target result based on the input data, so that developers are not limited to a single language and can select the best programming language according to task requirements, thereby greatly improving development efficiency.

[0241] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. Here, it should be noted that for the sake of brevity of description, only the differences from the above embodiment are described in the variant embodiment.

[0242] In an optional embodiment of the present invention, the first script is a combined script, and the step of obtaining the output result of the first script includes:

[0243] Determining the script execution path for the combined script through the script selection instruction;

[0244] Obtaining the output result of the combined script based on the execution path.

[0245] In practical applications, when passing complex data structures (such as objects, arrays, etc.) as parameters, serialization operations need to be performed to convert them into a transmissible format. After the receiving party receives the data, deserialization operations need to be performed to restore the original data structure. If problems occur during the serialization or deserialization process, data corruption or incorrect parsing may occur.

[0246] In a specific implementation, the script selection instruction of the embodiment of the present invention may include the execution order for the combined script. By determining the script execution path for the combined script and obtaining the output result of the combined script based on the execution path, the following beneficial effects can be achieved.

[0247] 1. Flexibility and customizability:

[0248] Dynamic adjustment: According to different conditions and requirements, the execution order of the entire script combination can be flexibly adjusted by modifying the content of the selection instruction script.

[0249] Custom logic: Complex logic can be written into the selection instruction script to implement more complex execution processes.

[0250] 2. Reusability:

[0251] Modularity: Different scripts can be modularized. By selecting instruction scripts, different workflows can be combined, improving the reusability of the code.

[0252] Maintainability: When changing the execution flow, only the selection instruction script needs to be modified, without modifying the internal logic of each script.

[0253] 3. Readability:

[0254] Centralized control: The control logic of the execution flow is centralized in one script, improving the readability of the code.

[0255] 4. Scalability:

[0256] Adding new scripts: New scripts can be easily added to the system, and the execution flow can be adjusted by modifying the selection instruction script.

[0257] In an optional embodiment of the present invention, it further includes:

[0258] Creating a first script container for the first script and a second script container for the second script;

[0259] The first script container is used to mount the first script, and the first script is configured to generate the output result in the first script container;

[0260] The second script container is used to mount the second script, and the second script is configured to generate the target result in the second script container.

[0261] In practical applications, the following security issues may occur when executing scripts:

[0262] Data leakage: When passing parameters through the network or other insecure channels, there may be a risk of data being intercepted or tampered with. Therefore, appropriate security measures need to be taken to protect the security and integrity of the data.

[0263] Injection attack: If the passed parameters are directly used to execute code (such as SQL queries, system commands, etc.) without proper processing, an injection attack may be suffered. This kind of attack can allow an attacker to execute malicious code or access sensitive data.

[0264] The platform according to the embodiment of the present invention may be configured with a container management module for creating isolated running environments for different language scripts, ensuring the independent execution and resource isolation of different language scripts. The first script container and the second script container may be isolated environments created by the container management module based on containerization technology (such as Docker) for script running, ensuring the independence of dependencies of each script and enabling multiple scripts to be executed in parallel. It should be noted that if the first script is a combined script, each independent script in the first script may also be configured with an independent script container.

[0265] The first script container may refer to encapsulating an application and all its dependencies in an independent and lightweight container, ensuring that the application can run consistently in different environments and improving deployment efficiency and resource utilization.

[0266] By using containerization technology, the platform has achieved the following goals:

[0267] Improve the stability of the system: Each script runs in an independent container, reducing mutual interference and improving the stability of the system.

[0268] Improve the flexibility of the system: Scripts can be quickly deployed and updated, facilitating expansion and maintenance.

[0269] Improve the efficiency of the system: The rapid startup of containers and efficient resource utilization improve the execution efficiency of the system.

[0270] Improve the security of the system: The isolation of containers effectively prevents security issues between different scripts.

[0271] In an optional embodiment of the present invention, it further includes:

[0272] Generate script running logs for the first script and the second script;

[0273] Send the script running logs to the front-end user device.

[0274] In a specific implementation, the platform according to the embodiment of the present invention may be integrated with a real-time log management system for recording the script running logs of each script execution. Users can view the running status, input and output situations, and exception error information of each script in real time through this log system.

[0275] Key functions of the log management system:

[0276] Real-time recording: It can record the execution process of scripts in real time, including start time, end time, execution results, error information, etc.

[0277] Detailed recording: Record detailed information such as input parameters, output results, and exception stacks of scripts, facilitating problem troubleshooting.

[0278] Search and filtering: Support searching and filtering logs based on conditions such as keywords and time range.

[0279] Visualization: Provide a user-friendly interface to display log information in the form of charts, curves, etc., facilitating user analysis.

[0280] Alarm: Support customizing alarm rules to notify relevant personnel in a timely manner when an exception occurs.

[0281] In the embodiment of the present invention, by generating script operation logs for the first script and the second script; and sending the script operation logs to the front-end user device, the following beneficial effects are achieved:

[0282] Improve system transparency: Users can view the execution process of the script at any time, understand information such as the running status of the script, input and output data, etc., so as to have a clearer understanding of the overall system operation.

[0283] Facilitate problem troubleshooting: When a problem occurs during script execution, users can quickly locate the problem by viewing the logs, shortening the problem-solving time.

[0284] Enhance system maintainability: Detailed log records help analyze system performance, discover potential problems, and perform optimizations.

[0285] Support auditing: Log records can be used as the basis for auditing, for tracking system operations, troubleshooting responsibilities, etc.

[0286] Support alarm: Alarms can be set based on log information to notify relevant personnel in a timely manner when the system has an anomaly.

[0287] In an optional embodiment of the present invention, the backend server is configured with a unified management and scheduling interface for the first script and the second script, and the backend server is used to control the first script and the second script through the unified management and scheduling interface.

[0288] In specific implementation, the embodiment of the present invention achieves the following beneficial effects by providing a unified management and scheduling interface for platform control.

[0289] 1. Improve development efficiency:

[0290] Unified interface: Provide a unified interface to manage scripts in different languages. Developers do not need to deeply understand the operating environment of each language and can call different scripts only through this interface.

[0291] Automated workflow: Multiple scripts can be combined into a workflow in a certain order to achieve complex task automation, reducing manual intervention.

[0292] 2. Enhance system flexibility:

[0293] Multi-language support: Supports multiple programming languages, and the most suitable language can be selected according to the needs of the task to write scripts.

[0294] Parameter passing: Through the parameter passing mechanism, different scripts can share data to achieve more complex business logics.

[0295] Workflow customization: Workflows can be flexibly defined according to different business requirements to meet various scenarios.

[0296] 3. Improve system stability:

[0297] Automated processes: Through automated workflows, human operation errors are reduced, and the system stability is improved.

[0298] Error handling: An error handling mechanism can be set up to automatically retry or notify the administrator when a task execution fails.

[0299] 4. Reduce maintenance costs:

[0300] Centralized management: All scripts and tasks can be managed on one platform, facilitating maintenance and updates.

[0301] Reusability: Commonly used scripts can be modularized for easy reuse in different workflows.

[0302] 5. Enhance system scalability:

[0303] Modular design: The platform adopts a modular design, facilitating the addition of new functional modules.

[0304] Open interfaces: Open API interfaces are provided for easy integration with other systems.

[0305] To enable those skilled in the art to better understand the embodiments of the present invention, the following uses an example to illustrate the embodiments of the present invention.

[0306] With the rapid development of computer technology, the integration demand for multi-language scripts in software applications is becoming increasingly urgent. However, when dealing with the combination of multi-language scripts, existing script execution systems still face many challenges:

[0307] Language differences and environment isolation: Differences in grammar, data types, running environments, etc. of different script languages make parameter passing complex. Cross-language parameter passing needs to consider issues such as data type conversion and environment adaptation.

[0308] Data format and serialization issues: Different scripts have different expectations for data formats, and the processes of serialization and deserialization may also introduce errors. Passing complex data structures is particularly prone to problems.

[0309] Security issues: There are risks of data leakage and injection attacks during parameter passing. Protecting data security and preventing malicious code injection are issues that require key attention.

[0310] Synchronization and asynchronization issues: The synchronous and asynchronous characteristics of parameter passing affect the responsiveness and reliability of the system. Synchronous passing may lead to performance bottlenecks, while asynchronous passing increases system complexity.

[0311] Specifically, the following problems exist in accurately passing parameters between multi-language scripts:

[0312] Script independence: Differences in script languages and isolation of operating environments lead to complexity in parameter passing.

[0313] Inconsistent data formats: Different scripts have inconsistent expectations for data formats, increasing the difficulty of data conversion.

[0314] Serialization and deserialization issues: The processes of serializing and deserializing complex data structures are prone to errors.

[0315] Security issues: Data leakage and injection attacks are the main security threats in parameter passing.

[0316] Synchronization and asynchronization issues: The synchronous and asynchronous characteristics of parameter passing pose challenges to system design.

[0317] To solve the above problems, a cross-language multi-parameter mapping script running platform is provided, including:

[0318] A script execution module for executing multiple scripts in environments of different programming languages;

[0319] A parameter mapping module for passing parameters between scripts in different languages, where the parameter mapping module automatically identifies the output of the first script and maps it to the input parameters of the second script;

[0320] A workflow orchestration module for defining the execution order and conditional judgment between multiple scripts;

[0321] A container management module for creating isolated operating environments for scripts in different languages, ensuring independent execution and resource isolation of scripts in different languages;

[0322] Among them, the platform manages the execution of scripts in different languages and parameter passing through a unified interface, and supports the execution of multi-step tasks through an automated workflow;

[0323] Optionally, the parameter mapping module supports user-defined parameter mapping rules, and users can manually define the association relationship between script outputs and inputs.

[0324] Optionally, the container management module creates an isolated environment for script execution based on containerization technology (such as Docker), ensuring that the dependencies of each script are independent and multiple scripts can be executed in parallel.

[0325] Optionally, the workflow orchestration module allows users to define the execution logic of the workflow through a graphical interface, including functions such as sequential execution, conditional branching, parallel execution, and parameter passing.

[0326] Optionally, the platform integrates a real-time log management system for recording detailed logs of script execution. Users can view the running status, input and output situations, and exception error information of each script in real time through this log system.

[0327] Optionally, the script languages supported by the platform include but are not limited to: Python, Mysql, Bash switches, and routers.

[0328] A platform implementation method for cross-language multi-parameter mapping script execution includes the following steps:

[0329] Provide a script execution environment for executing scripts in different languages;

[0330] Obtain the output data of the first script;

[0331] Map the output data to the input of another script through the parameter mapping module;

[0332] Execute multiple scripts sequentially or in parallel based on the script execution order defined by the workflow orchestration module;

[0333] Isolate the debugging environment of the script through containerization management technology to ensure the security and independence of each script's running environment.

[0334] Optionally, the parameter mapping process includes automatically detecting the output data format and performing parameter conversion and passing based on the data format.

[0335] Optionally, the execution order of the scripts is defined by the user in the workflow orchestration module, including sequential execution, conditional branching, and parallel execution, and the execution order of the scripts is determined based on the execution conditions.

[0336] Exemplarily, script execution can be achieved in the following manner.

[0337] Create a core script: Suppose we create a core script for a printing function, which has a form parameter with character input and a character output.

[0338] Debug the core script in a sandbox: The script can be debugged in an isolated sandbox environment, and the results can be printed.

[0339] Create a combined script: After creating the required core scripts for combination, create and fill in the combined script information, drag it into the script component and select the script, then drag in the condition component and fill in the parameter mapping and condition routing.

[0340] Execute the combined script: After creating the combined script, you can select a machine to execute the combined script.

[0341] View the unified log monitoring: After the combined script is executed, you can view the execution log, which can directly show the execution nodes and information during execution, and the script can be interrupted during execution.

[0342] Reference Figure 2 , Figure 2 is a schematic flow diagram of a script addition method provided in an embodiment of the present invention;

[0343] 1. Start: The starting point of the process, marking the start of the operation of adding a new script.

[0344] 2. Select the type of script to be added:

[0345] According to different requirements, different types of scripts can be selected for addition. For example, it can be a Python script, a Shell script, an SQL script, etc.

[0346] The selection of the script type will affect the subsequent execution environment and parameter configuration.

[0347] 3. Select the script running mode:

[0348] Local execution: The script is executed locally on the server.

[0349] Remote execution: The script is executed on a remote server or container.

[0350] Different running modes will involve different configurations and management.

[0351] 4. Fill in the script content:

[0352] Paste the written script code into the text box.

[0353] Ensure that the syntax of the code is correct and conforms to the syntax specifications of the selected script type.

[0354] 5. Select input parameters:

[0355] Select the parameters to be input according to the requirements of the script.

[0356] The parameters can be fixed values or variables.

[0357] 6. Set output parameters:

[0358] Define the output results generated after the script execution.

[0359] The output parameters can be file paths, database table names, etc.

[0360] 7. Set up a scheduled task (optional):

[0361] If the script needs to be executed regularly, set the trigger conditions and execution frequencies of the scheduled task.

[0362] 8. Check the script syntax and parameter configuration:

[0363] The system will check the input script code and parameter configuration to ensure there are no syntax errors and configuration issues.

[0364] 9. Generate an execution command:

[0365] The system generates the corresponding execution command based on information such as the script type, running mode, input parameters, etc.

[0366] Add the execution command to the task list:

[0367] Add the generated execution command to the task list and wait for execution.

[0368] 10. Start executing the task:

[0369] The system executes the tasks in sequence according to the task list.

[0370] 11. View the execution log:

[0371] Users can view the execution log of each task to understand the execution situation and results of the task.

[0372] Process characteristics

[0373] Flexible: Supports multiple script types and running modes to meet different requirements.

[0374] Automated: Achieve automated execution of the script by setting up a scheduled task.

[0375] Visual: The flow chart is clear and intuitive, facilitating users to understand.

[0376] Scalable: More script types and execution methods can be added according to needs.

[0377] Possible optimization directions

[0378] Parameterized configuration: Commonly used parameter configurations can be made into templates for convenient reuse.

[0379] Error handling: An error handling mechanism can be added to automatically retry or notify the administrator when the script execution fails.

[0380] Version control: Version control can be applied to scripts for convenient rollback and comparison.

[0381] Permission control: Different permissions can be set for different users to restrict access to and operations on scripts.

[0382] This new script flowchart provides a clear set of steps to help users understand how to add a script to the system and execute it. Through this process, automated management and execution of scripts can be achieved, improving work efficiency.

[0383] Reference Figure 3 , Figure 3 is a schematic flowchart of a script execution method provided in an embodiment of the present invention;

[0384] 1. Start: The starting point of the entire script execution.

[0385] 2. Initialize the script environment:

[0386] Load the environment variables, configuration information, etc. required by the script.

[0387] Prepare the necessary resources, such as opening files, connecting to databases, etc.

[0388] 3. Determine if there is a next subtask:

[0389] If there is a subtask, enter the subtask execution phase.

[0390] If there is no subtask, it means the current script execution is complete.

[0391] 4. Execute the subtask:

[0392] Perform corresponding operations according to the type and configuration of the subtask.

[0393] The subtask can be simple calculations, data processing, file operations, etc.

[0394] 5. Check the execution result:

[0395] Determine if the subtask execution was successful.

[0396] If successful, continue to execute the next subtask.

[0397] If failed, handle it according to the preset strategy, such as recording error logs, sending notifications, etc.

[0398] 6. Determine whether the loop condition is met:

[0399] If a loop condition is set, determine whether the loop condition is satisfied.

[0400] If it is satisfied, go back to step 4 and continue to execute the next subtask.

[0401] 7. End:

[0402] When all subtasks are executed or the loop end condition is reached, the script execution ends.

[0403] "Condition Configuration Judgment" represents a decision point in the script execution flow chart, which determines the subsequent execution path of the script. Specifically, when the script execution reaches this node, the system will judge the current state or data according to the preset conditions, and then select different execution branches according to the judgment results.

[0404] Possible condition judgment types:

[0405] Data conditions:

[0406] Judge whether the value of a certain variable meets specific conditions (for example, greater than a certain threshold, whether it is empty, etc.).

[0407] Judge whether a data file exists or its format is correct.

[0408] Time conditions:

[0409] Judge whether the current time is within a certain time range.

[0410] Judge whether the time interval since the last execution reaches the set value.

[0411] Status conditions:

[0412] Judge the current state of the system, for example, whether it is in the running state, whether an error occurs, etc.

[0413] External events:

[0414] Judge whether an external event is received, for example, receiving a certain signal, triggering a certain event, etc.

[0415] The platform can achieve the following advantages through the above methods:

[0416] Support multiple languages and enhance flexibility.

[0417] Language Compatibility: This platform supports multiple mainstream programming languages, such as Python, Bash, Mysql, etc. Developers are not limited to a single language and can choose the best programming language according to the task requirements, thus greatly improving development efficiency.

[0418] Flexibility and Freedom: Developers can combine the advantages of different languages, seamlessly integrate scripts in different languages through the platform, and achieve cross-language task processing, making the entire development process more flexible and efficient.

[0419] Parameter Mapping and Script Composition to Improve Workflow Efficiency.

[0420] Automatic Parameter Mapping: The platform can implement parameter mapping and transfer between multiple scripts according to expressions, enabling smooth cross-script data transmission. This reduces the burden of manual data transfer and conversion, and avoids code duplication and errors.

[0421] Script Composition: By integrating multiple scripts into a combined script, developers can automatically process complex script chains, save manual intervention time, and improve the overall efficiency of the project.

[0422] Support for Containerization and Environment Isolation to Enhance Security and Stability.

[0423] Security and Isolation: Through containerization technologies (such as Docker), the platform can provide an isolated running environment for each script during testing, ensuring that different scripts do not interfere with each other and enhancing the security and stability of the system.

[0424] Environmental Consistency: The containerized running environment ensures the consistency between development, testing, and production environments, reducing running problems caused by environmental differences.

[0425] Through the above methods, the cross-language multi-parameter mapping script running platform achieves high scalability and future development potential:

[0426] Support for Complex Workflow Construction: The platform can not only handle simple single-script execution but also support complex workflow configuration and conditional judgment between multiple scripts, suitable for complex business scenarios of large enterprises.

[0427] Strong Future Scalability: As the platform develops, more technologies and tools can be integrated, such as applications in the fields of artificial intelligence and machine learning, further expanding the application scenarios of the platform to meet future business and technological needs.

[0428] An embodiment of the present invention also discloses a script control method, which is applied to a front-end user device, and a corresponding back-end server is configured with the back-end server, including:

[0429] Obtain the user's script selection instruction;

[0430] Send the script selection instruction to the backend server; the backend server is configured to determine a first script and a second script corresponding to the script selection instruction when receiving the script selection instruction; the language format of the first script is different from that of the second script; obtain the output result of the first script; convert the output result from the language format of the first script to the language format of the second script to generate input data for the second script; control the second script to generate a target result based on the input data.

[0431] It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.

[0432] Referring to Figure 4 , a structural block diagram of a script control device provided in an embodiment of the present invention is shown, which may specifically include the following modules:

[0433] A task request creation module 401, configured to determine a first script and a second script corresponding to the script selection instruction when receiving the script selection instruction; the language format of the first script is different from that of the second script;

[0434] An output result acquisition module 402, configured to acquire the output result of the first script;

[0435] A language format conversion module 403, configured to convert the output result from the language format of the first script to the language format of the second script to generate input data for the second script;

[0436] A target result generation module 404, configured to control the second script to generate a target result based on the input data.

[0437] An embodiment of the present invention also discloses a script control device. The method is applied to a front-end user device, and the backend server is configured with a corresponding backend server, including:

[0438] A script selection instruction acquisition module, configured to acquire a script selection instruction of a user;

[0439] A script selection instruction sending module is configured to send the script selection instruction to the backend server; the backend server is configured to determine a first script and a second script corresponding to the script selection instruction when receiving the script selection instruction; the language format of the first script is different from that of the second script; obtain the output result of the first script; convert the output result from the language format of the first script to the language format of the second script to generate input data for the second script; and control the second script to generate a target result based on the input data.

[0440] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, please refer to the partial description of the method embodiment.

[0441] In addition, an embodiment of the present invention further provides an electronic device, as Figure 5 shown, including a processor 501, a communication interface 502, a memory 503, and a communication bus 504. Among them, the processor 501, the communication interface 502, and the memory 503 complete communication with each other through the communication bus 504.

[0442] The memory 503 is used to store a computer program.

[0443] The processor 501 is configured to implement the script control method described in any one of the above embodiments when executing the program stored in the memory 503.

[0444] The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0445] The communication interface is used for communication between the above terminal and other devices.

[0446] The memory may include a Random Access Memory (RAM), or may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0447] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU for short), a Network Processor (NP for short), etc.; it may also be a Digital Signal Processor (DSP for short), an Application Specific Integrated Circuit (ASIC for short), a Field-Programmable Gate Array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0448] As Figure 6 shown, in another embodiment provided by the present invention, a computer-readable storage medium 601 is further provided. Instructions are stored in the computer-readable storage medium. When it runs on a computer, it enables the computer to execute the script control method described in the above embodiment.

[0449] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit and scope protected by the present invention and the claims. All of them fall within the protection scope of the present invention.

[0450] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the embodiments of the present invention can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0451] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0452] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0453] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0454] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0455] If the above functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.

[0456] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A script control method, characterized in that: The method is applied to a backend server, the backend server is configured with a corresponding frontend user device, the frontend user device is used to obtain a script selection instruction of a user, and send the script selection instruction to the backend server, comprising: When the script selection instruction is received, determining a first script and a second script corresponding to the script selection instruction; the language format of the first script is different from the language format of the second script; Obtaining the output result of the first script; Converting the output result from the language format of the first script into the language format of the second script to generate input data for the second script; The second script is controlled to generate a target result based on the input data.

2. The method according to claim 1, characterized in that The first script is a combined script, and the step of obtaining the output result of the first script includes: Determining a script execution path for the combined script through the script selection instruction; An output result of the combined script is obtained based on the execution path.

3. The method according to claim 1, characterized in that: Also includes: Creating a first script container for the first script and a second script container for the second script; The first script container is used to mount the first script, and the first script is configured to generate the output result in the first script container; The second script container is used to mount the second script, and the second script is configured to generate the target result in the second script container.

4. The method according to claim 1, characterized in that Also includes: Generate a script running log for the first script and the second script; The script execution log is sent to the front-end user device.

5. The method according to claim 1, characterized in that: The backend server is configured with a unified management and scheduling interface for the first script and the second script, and the backend server is used to control the first script and the second script through the unified management and scheduling interface.

6. A script control method, characterized in that: The method is applied to a front-end user device, and the back-end server is configured with a corresponding back-end server, including: Get the user's script selection instruction; The script selection instruction is sent to the back-end server; the back-end server is used to determine the first script and the second script corresponding to the script selection instruction when receiving the script selection instruction; the language format of the first script is different from the language format of the second script; obtain the output result of the first script; convert the output result from the language format of the first script to the language format of the second script, and generate input data for the second script; control the second script to generate a target result based on the input data.

7. A script control device, characterized in that: The method is applied to a backend server, the backend server is configured with a corresponding frontend user device, the frontend user device is used to obtain a script selection instruction of a user, and send the script selection instruction to the backend server, comprising: A task request creation module, configured to, when receiving the script selection instruction, determine a first script and a second script corresponding to the script selection instruction; the language format of the first script is different from the language format of the second script; An output result acquisition module, used to acquire the output result of the first script; A language format conversion module, used to convert the output result from the language format of the first script into the language format of the second script, and generate input data for the second script; A target result generating module is used to control the second script to generate a target result based on the input data.

8. A script control device, characterized in that: The method is applied to a front-end user device, and the back-end server is configured with a corresponding back-end server, including: A script selection instruction acquisition module is used to obtain the user's script selection instruction; A script selection instruction sending module is used to send the script selection instruction to the back-end server; the back-end server is used to determine a first script and a second script corresponding to the script selection instruction when receiving the script selection instruction; the language format of the first script is different from the language format of the second script; obtain the output result of the first script; convert the output result from the language format of the first script to the language format of the second script, and generate input data for the second script; control the second script to generate a target result based on the input data.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1-5 or 6 when executing the program stored in the memory.

10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 5 or 6.

Citation Information

Cited By

  • Website statistical analysis method, device and equipment and storage medium

    CN121580444A