CN115237391A - Method, device, electronic equipment and medium for generating script - Google Patents

Method, device, electronic equipment and medium for generating script Download PDF

Info

Publication number
CN115237391A
CN115237391A CN202210958089.7A CN202210958089A CN115237391A CN 115237391 A CN115237391 A CN 115237391A CN 202210958089 A CN202210958089 A CN 202210958089A CN 115237391 A CN115237391 A CN 115237391A
Authority
CN
China
Prior art keywords
script
generating
file
semantic
script generation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210958089.7A
Other languages
Chinese (zh)
Inventor
欧阳梦云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202210958089.7A priority Critical patent/CN115237391A/en
Publication of CN115237391A publication Critical patent/CN115237391A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a method, an apparatus, a device, a storage medium, and a program product for generating a script, which relate to the field of computer technology and can be applied to the field of financial technology. The method comprises the following steps: in response to receiving a command for generating a script, determining target script generation information corresponding to the command, the target script generation information including a semantic tag; determining a script generation file corresponding to the semantic tag; the semantic tag and the script generation file have a mapping relation; generating a first script according to the target script generation information and the script generation file; adjusting the semantic tags and the script generation file according to the running result of the first script; and generating a file according to the adjusted semantic label and the adjusted script to generate a second script.

Description

Method, device, electronic equipment and medium for generating script
Technical Field
The present disclosure relates to the field of computer technology, and may be applied to the field of financial technology, and more particularly, to a method, apparatus, device, medium, and program product for generating a script.
Background
In the face of complex size and complex scenes, a large number of scripts are required for maintenance in the operation and maintenance process of a data center server, a storage device and network resources.
However, current methods for generating scripts are generally written manually by the operation and maintenance staff, which results in inefficient generation of scripts. Meanwhile, if the script cannot be optimized, the script quality is easy to be low and reliable; and the normative, the reusability and the inheritability of the script are not ideal.
Disclosure of Invention
In view of the above problems, the present disclosure provides a method, an apparatus, a device, a medium, and a program product for generating a script, which can determine a script generation file directly according to a semantic tag based on a mapping relationship between the semantic tag and the script generation file, thereby generating a first script; and then, the semantic label and the script generation file are adjusted according to the running result of the first script, so that a second script with higher reliability and higher quality can be obtained.
According to a first aspect of the present disclosure, there is provided a method of generating a script, comprising: in response to receiving a command for generating a script, determining target script generation information corresponding to the command, the target script generation information including a semantic tag; determining a script generation file corresponding to the semantic tag; the semantic tags and the script generation file have a mapping relation; generating a first script according to the target script generation information and the script generation file; adjusting the semantic labels and the script generation file according to the running result of the first script; and generating a file according to the adjusted semantic tag and the adjusted script to generate a second script.
According to the embodiment of the disclosure, the target script generation information includes a plurality of semantic tags, a tag stream corresponding to the plurality of semantic tags, and a predetermined rule between two semantic tags corresponding to the tag stream; generating a first script according to the target script generation information and the script generation file, wherein the generating comprises the following steps: and generating a first script according to the label flow, the preset rule and the script generation file.
According to the embodiment of the present disclosure, adjusting the semantic tag and the script generation file according to the operation result of the first script includes: generating a script evaluation report according to the running result of the first script; in response to receiving a command to send a script evaluation report, sending the script evaluation report; and in response to receiving an adjustment parameter corresponding to the script evaluation report, adjusting the semantic tags and the script generation file according to the adjustment parameter.
According to an embodiment of the present disclosure, the method for generating a script further includes: generating a configuration file according to the debugging result of the first script, wherein the configuration file comprises the target script generation information and the first script corresponding to the debugging result; respectively sending the configuration file and the first script to a first database for storing scripts and a second database for storing the configuration file; wherein the configuration file and the first script have a mapping relationship.
According to an embodiment of the present disclosure, the method for generating a script further includes: and generating a file according to the adjusted semantic label and the adjusted script, and updating the first script in the first database and the configuration file in the second database.
A second aspect of the present disclosure provides an apparatus for generating a script, including: the device comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for responding to a received command for generating a script and determining target script generation information corresponding to the command, and the target script generation information comprises a semantic tag; the second determining module is used for determining a script generation file corresponding to the semantic tag; the semantic tag and the script generation file have a mapping relation; the first generation module is used for generating a first script according to the target script generation information and the script generation file; the adjusting module is used for adjusting the semantic tags and the script generating file according to the running result of the first script; and the second generation module is used for generating a file according to the adjusted semantic tag and the adjusted script and generating a second script.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described method of generating scripts.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method of generating a script.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described method of generating a script.
The method for generating the script provided by this embodiment may determine the script generation file directly according to the semantic tag based on the mapping relationship between the semantic tag and the script generation file, so as to generate the first script; and then, the semantic tag and the script generation file are adjusted according to the running result of the first script, so that a second script with higher reliability and higher quality can be obtained.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium, and program product for generating a script according to embodiments of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a method of generating a script according to an embodiment of the present disclosure;
FIG. 3 schematically shows an execution diagram for generating a script evaluation report according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow diagram of a method of generating a script according to another embodiment of the present disclosure;
FIG. 5 is a block diagram schematically illustrating an apparatus for generating a script according to an embodiment of the present disclosure; and
FIG. 6 schematically shows a block diagram of an electronic device suitable for implementing a method of generating a script according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
In those instances where a convention analogous to "at least one of A, B, and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, and C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.).
The embodiment of the disclosure provides a method and a device for generating a script, wherein in response to receiving a command for generating the script, target script generation information corresponding to the command is determined, and the target script generation information comprises a semantic tag; determining a script generation file corresponding to the semantic tag; the semantic tags and the script generation file have a mapping relation; generating a first script according to the target script generation information and the script generation file; adjusting the semantic tags and the script generation file according to the running result of the first script; and generating a file according to the adjusted semantic label and the adjusted script to generate a second script.
Fig. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium, and program product for generating a script according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the method for generating a script provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the apparatus for generating a script provided by the embodiments of the present disclosure may be generally disposed in the server 105. The method for generating scripts provided by the embodiments of the present disclosure may also be performed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the apparatus for generating a script provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The method of generating a script of the disclosed embodiment will be described in detail below with fig. 2 based on the scenario described in fig. 1.
FIG. 2 schematically shows a flow diagram of a method of generating a script according to an embodiment of the present disclosure.
As shown in fig. 2, the embodiment includes operations S210 to S250, and the method of generating a script may be performed by a server.
In the technical scheme of the disclosure, the data acquisition, collection, storage, use, processing, transmission, provision, disclosure, application and other processing are all in accordance with the regulations of relevant laws and regulations, necessary security measures are taken, and the public order and good custom are not violated.
In operation S210, in response to receiving a command to generate a script, target script generation information corresponding to the command is determined, the target script generation information including a semantic tag.
The label is a process of extracting various characteristics such as demographics, geographic positions, interests, commodity preferences and the like from specific objects such as users, commodities and the like by using various classification and clustering algorithms such as KN, SVM and the like on the basis of statistics, giving corresponding labels, and performing operations such as weighting, classification and the like, and the final purpose of the label is to assist in fine operation. The labeling is the skilled external expression of the 'abstract' ability practice, and technicians can easily know the user attributes through the labels, so that some targeted strategies are adopted. A label library: is a collection of tags, such as a semantic tag library.
In this embodiment, the target script generation information includes semantic tags, such as keyword tags. For example, various operation and maintenance entity objects of the data center, including various computing, storage and network devices, can be combined to abstract and summarize the characteristics and features of daily operation and maintenance of the objects to form semantic tags such as ssh login, ping activation and the like. It should be noted that the tag may correspond to an independent operation and maintenance script (code) module, that is, a script generation file corresponding to the semantic tag. Preferably, the script generation file can be written according to the operation and maintenance specification of the data center and unified rules.
The command for generating the script may be a command transmitted by the user. The user can select the semantic tags in the tag library according to the requirement and then send the selected semantic tags.
In operation S220, determining a script generation file corresponding to the semantic tag; the semantic tags and the script generation file have a mapping relation.
Through the mapping relation, the script generation file can be obtained quickly.
For example, a written script generation file may be stored in the script module in advance. The semantic tag has a mapping relation with the script generation file, and the semantic tag has the same mapping relation with the script module. And pulling a script module corresponding to the label (such as a semantic label) by utilizing the mapping relation, and determining a script generation file.
In operation S230, a first script is generated according to the target script generation information and the script generation file.
It will be appreciated that the first script may be automatically generated in this step.
For example, the target script generation information may further include one or more of a predetermined rule meeting the requirement, a parameter interface engagement notice, and a predefined parameter; therefore, the first script can be generated according to the target script generation information and the script generation file.
In operation S240, the semantic tag and the script generation file are adjusted according to the execution result of the first script.
For example, the first script is delivered to the production operation and maintenance, and the actual operation result, that is, the operation result of the first script is collected. Performing tuning processing, such as tuning semantic tags and script generation files, according to the performing result; for example, if the actual operation result shows that the semantic description of semantic label a is not accurate, a more accurate semantic description, that is, semantic label B, is determined; semantic tag B replaces semantic tag a to assist the user in selecting a semantic tag. And if the actual operation result shows that the actual operation result is not ideal due to inaccurate setting of a certain parameter in the script generation file, adjusting the parameter in the script generation file to obtain a better script operation result.
In operation S250, a second script is generated according to the adjusted semantic tag and the adjusted script generation file.
The second script is generated by the adjusted semantic tags and the adjusted script generation file, so that the second script with higher reliability and higher quality can be obtained.
The method for generating the script provided by this embodiment may determine the script generation file directly according to the semantic tag based on the mapping relationship between the semantic tag and the script generation file, so as to generate the first script; and then, the semantic label and the script generation file are adjusted according to the running result of the first script, so that a second script with higher reliability and higher quality can be obtained.
The target script generation information comprises a plurality of semantic tags, a tag stream corresponding to the semantic tags and a preset rule between two semantic tags corresponding to the tag stream; generating a first script according to the target script generation information and the script generation file, wherein the first script comprises: and generating a first script according to the label stream, the preset rule and the script generation file.
It will be appreciated that in the face of more complex scenarios, the object script generation information may also include a plurality of semantic tags, a tag stream corresponding to the plurality of semantic tags, and a predetermined rule between two semantic tags corresponding to the tag stream.
For example: firstly, a user screens labels of a label library according to requirements and selects a required label value set, such as a plurality of semantic labels; step two, the user arranges according to the service logic according to the label value set selected in the step one, and supports flow logics such as branching, nesting and the like, such as label flow; and step three, perfecting the rule definition of each link according to the arranged label values, wherein the rule definition mainly comprises the carrying of the label values, the connection of parameter interfaces with cautionary matters and the like, and mainly supports the global parameter definition, the circulation conditions of each link, the input and output setting and the like, such as the preset rule. And step four, sending a command, wherein the command comprises the target script generation information.
It is understood that the first script may be automatically generated based on the tag stream, the predetermined rule, and the script generation file. Further, the first script can be marked as a debugging state, so that the first script in the debugging state can be conveniently placed in a test environment for debugging.
According to the method for generating the script, the first script is generated according to the label stream, the preset rule and the script generation file, so that the first script can more comprehensively meet the diversity requirements of the user, and the method is favorable for dealing with more complex scenes.
According to the operation result of the first script, adjusting the semantic tags and the script generation file, comprising the following steps: generating a script evaluation report according to the running result of the first script; in response to receiving a command to send a script evaluation report, sending the script evaluation report; and in response to receiving an adjustment parameter corresponding to the script evaluation report, adjusting the semantic tag and the script generation file according to the adjustment parameter.
Fig. 3 schematically shows an execution diagram of a generation script according to an embodiment of the present disclosure, see fig. 3. First, a user sends a command to generate a script, such as submitting a target script generation information list, through the client 310. The server 320, in response to receiving the command to generate a script, forwards the command to the means for generating a script 330, the command including the target script generation information. The script generating means 330 may determine target script generation information in response to receiving the command, then determine a script generation file, and generate the first script. And running the first generation script after the first generation script is obtained, collecting an actual running result, and automatically generating a script evaluation report. The script evaluation report can be a visual evaluation report and is used for showing to operation and maintenance personnel; such as means for generating a script 330, may send the script evaluation report to client 310. Therefore, operation and maintenance personnel can adjust and optimize according to the operation result of the current script, for example, corresponding adjusting parameters are sent, so that the device for generating the script adjusts the semantic tags and the script generating file according to the adjusting parameters.
Furthermore, the association between the script generation file and the semantic tag can be generated based on the script, and a directory index visualization is established by using a tag system to give a script evaluation report which is generated automatically at present so as to be displayed to operation and maintenance personnel. The quality of the script can be adjusted based on the script evaluation report, visualization and quantification are realized, and automatic optimization of subsequent scripts is facilitated.
The method for generating the script provided by the embodiment is beneficial to obtaining the second script with higher reliability and higher quality.
The method for generating the script further comprises the following steps: generating a configuration file according to the debugging result of the first script, wherein the configuration file comprises target script generation information corresponding to the debugging result and the first script; respectively sending the configuration file and the first script to a first database for storing the script and a second database for storing the configuration file; the configuration file and the first script have a mapping relation.
For example, for the first script, debugging may be performed in a test environment, and the input and output data script data involved in the debugging process is configured into a file. And establishes a relationship between the script (first script) and the configuration file. Further, the debugged first script may be marked as a qualified state.
The method for generating the script provided by the embodiment is based on the script and the configuration file respectively stored in the first database and the second database, and is favorable for uniformly managing and using the script and/or the configuration file.
The method for generating the script further comprises the following steps: and generating a file according to the adjusted semantic label and the adjusted script, and updating the first script in the first database and the configuration file in the second database.
For example, FIG. 4 schematically illustrates a flow chart of a method of generating a script according to another embodiment of the present disclosure.
As shown in fig. 4, this embodiment includes operations S401 to S404.
In operation S401, a first database and a second database are constructed, such as a configuration file and a first script are respectively transmitted to the first database for storing scripts and the second database for storing configuration files.
In operation S402, in response to receiving an adjustment parameter corresponding to the script evaluation report, the semantic tag and the script generation file are adjusted according to the adjustment parameter.
In operation S403, a second script is generated according to the adjusted semantic tag and the adjusted script generation file.
In operation S404, a file is generated according to the adjusted semantic tag and the adjusted script, and the first script in the first database and the configuration file in the second database are updated. For example, a first script in a first database may be updated, e.g., to a second script; the configuration file in the second database may be updated, for example, the updated configuration file may include the adjusted semantic tags and the second script.
The method for generating the script provided by the embodiment is beneficial to optimizing the data state in each database through the updated first database and the updated second database, so that the comprehensive coverage of optimization is ensured.
Based on the method for generating the script, the disclosure further provides a device for generating the script. The apparatus will be described in detail below with reference to fig. 5.
Fig. 5 schematically shows a block diagram of an apparatus for generating a script according to an embodiment of the present disclosure.
As shown in fig. 5, the apparatus 500 for generating a script of this embodiment includes a first determining module 510, a second determining module 520, a first generating module 530, an adjusting module 540, and a second generating module 550.
A first determining module 510, configured to determine, in response to receiving a command for generating a script, target script generation information corresponding to the command, where the target script generation information includes a semantic tag; a second determining module 520, configured to determine a script generation file corresponding to the semantic tag; the semantic tags and the script generation file have a mapping relation; a first generating module 530, configured to generate a first script according to the target script generating information and the script generating file; an adjusting module 540, configured to adjust the semantic tag and the script generation file according to an operation result of the first script; and a second generating module 550, configured to generate a file according to the adjusted semantic tag and the adjusted script, and generate a second script.
In some embodiments, the target script generation information includes a plurality of semantic tags, a tag stream corresponding to the plurality of semantic tags, and a predetermined rule between two semantic tags corresponding to the tag stream; the first generation module is used for: and generating a first script according to the label flow, the preset rule and the script generation file.
In some embodiments, the adjustment module comprises: a report generation submodule for generating a script evaluation report according to the running result of the first script; the report sending sub-module is used for responding to a received command for sending a script evaluation report and sending the script evaluation report; and the parameter receiving submodule is used for responding to the received adjustment parameter corresponding to the script evaluation report and adjusting the semantic tag and the script generation file according to the adjustment parameter.
In some embodiments, the means for generating a script further comprises: the configuration file submodule is used for generating a configuration file according to the debugging result of the first script, and the configuration file comprises the target script generation information corresponding to the debugging result and the first script; the sending module is used for respectively sending the configuration file and the first script to a first database for storing scripts and a second database for storing the configuration file; wherein the configuration file and the first script have a mapping relationship.
In some embodiments, the means for generating a script further comprises: and the updating database module is used for generating a file according to the adjusted semantic tag and the adjusted script, and updating the first script in the first database and the configuration file in the second database.
According to an embodiment of the present disclosure, any plurality of the first determining module 510, the second determining module 520, the first generating module 530, the adjusting module 540, and the second generating module 550 may be combined in one module to be implemented, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first determining module 510, the second determining module 520, the first generating module 530, the adjusting module 540, and the second generating module 550 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or by a suitable combination of any several of them. Alternatively, at least one of the first determining module 510, the second determining module 520, the first generating module 530, the adjusting module 540 and the second generating module 550 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
FIG. 6 schematically shows a block diagram of an electronic device suitable for implementing a method of generating a script according to an embodiment of the present disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. Processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 601 may also include on-board memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM602 and/or RAM 603. Note that the programs may also be stored in one or more memories other than the ROM602 and RAM 603. The processor 601 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 600 may also include input/output (I/O) interface 605, input/output (I/O) interface 605 also connected to bus 604, according to an embodiment of the disclosure. The electronic device 600 may also include one or more of the following components connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that the computer program read out therefrom is mounted in the storage section 608 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement a method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include ROM602 and/or RAM 603 and/or one or more memories other than ROM602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the method for generating the script provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 601. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, downloaded and installed through the communication section 609, and/or installed from the removable medium 611. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the system of the embodiments of the present disclosure. The above described systems, devices, apparatuses, modules, units, etc. may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A method of generating a script, comprising:
in response to receiving a command for generating a script, determining target script generation information corresponding to the command, the target script generation information including a semantic tag;
determining a script generation file corresponding to the semantic tag; the semantic tags and the script generation file have a mapping relation;
generating a first script according to the target script generation information and the script generation file;
adjusting the semantic labels and the script generation file according to the running result of the first script; and
and generating a file according to the adjusted semantic tag and the adjusted script, and generating a second script.
2. The method of claim 1, wherein the target script generation information comprises a plurality of semantic tags, a tag stream corresponding to the plurality of semantic tags, and a predetermined rule between two semantic tags corresponding to the tag stream; generating a first script according to the target script generation information and the script generation file, wherein the generating of the first script comprises the following steps:
and generating a first script according to the label stream, the preset rule and the script generation file.
3. The method of claim 1, wherein the adjusting the semantic tags and the script generation file according to the execution result of the first script comprises:
generating a script evaluation report according to the running result of the first script;
in response to receiving a command to send a script evaluation report, sending the script evaluation report; and
and responding to the received adjustment parameters corresponding to the script evaluation report, and adjusting the semantic tags and the script generation file according to the adjustment parameters.
4. The method of claim 1, further comprising:
generating a configuration file according to the debugging result of the first script, wherein the configuration file comprises the target script generation information and the first script corresponding to the debugging result; and
respectively sending the configuration file and the first script to a first database for storing scripts and a second database for storing the configuration file;
wherein the configuration file and the first script have a mapping relationship.
5. The method of claim 4, further comprising:
and generating a file according to the adjusted semantic label and the adjusted script, and updating the first script in the first database and the configuration file in the second database.
6. An apparatus for generating a script, comprising:
the device comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for responding to a received command for generating a script and determining target script generation information corresponding to the command, and the target script generation information comprises a semantic tag;
the second determining module is used for determining a script generation file corresponding to the semantic tag; the semantic tags and the script generation file have a mapping relation;
the first generation module is used for generating a first script according to the target script generation information and the script generation file;
the adjusting module is used for adjusting the semantic tags and the script generating file according to the running result of the first script; and
and the second generation module is used for generating a file according to the adjusted semantic label and the adjusted script and generating a second script.
7. The apparatus of claim 6, wherein the object script generation information comprises a plurality of semantic tags, a tag stream corresponding to the plurality of semantic tags, and a predetermined rule between two semantic tags corresponding to the tag stream; the first generation module is used for:
and generating a first script according to the label stream, the preset rule and the script generation file.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
9. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 5.
10. A computer program product comprising a computer program which, when executed by a processor, carries out the method according to any one of claims 1 to 5.
CN202210958089.7A 2022-08-10 2022-08-10 Method, device, electronic equipment and medium for generating script Pending CN115237391A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210958089.7A CN115237391A (en) 2022-08-10 2022-08-10 Method, device, electronic equipment and medium for generating script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210958089.7A CN115237391A (en) 2022-08-10 2022-08-10 Method, device, electronic equipment and medium for generating script

Publications (1)

Publication Number Publication Date
CN115237391A true CN115237391A (en) 2022-10-25

Family

ID=83680223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210958089.7A Pending CN115237391A (en) 2022-08-10 2022-08-10 Method, device, electronic equipment and medium for generating script

Country Status (1)

Country Link
CN (1) CN115237391A (en)

Similar Documents

Publication Publication Date Title
CN113987074A (en) Distributed service full-link monitoring method and device, electronic equipment and storage medium
CN110888696A (en) Page display method and system, computer system and computer readable medium
CN113986258A (en) Service publishing method, device, equipment and storage medium
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
CN113378346A (en) Method and device for model simulation
CN115080434A (en) Case execution method, device, equipment and medium
CN115550141A (en) Event processing method and device, electronic equipment and readable storage medium
CN113900905A (en) Log monitoring method and device, electronic equipment and storage medium
CN115033634A (en) Data acquisition method, data acquisition device, electronic equipment and medium
CN115237391A (en) Method, device, electronic equipment and medium for generating script
CN114780361A (en) Log generation method, device, computer system and readable storage medium
CN110888583B (en) Page display method, system and device and electronic equipment
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN114363172B (en) Decoupling management method, device, equipment and medium for container group
CN114285743B (en) Method, device, electronic equipment and storage medium for updating configuration information
CN114218330A (en) ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product
CN117130812A (en) System fault detection method, apparatus, device, medium and program product
CN115098391A (en) Page detection method, device, equipment and medium
CN113989052A (en) Information monitoring method and device, electronic equipment and storage medium
CN118246976A (en) Activity execution method, apparatus, electronic device, medium, and computer program product
CN115499292A (en) Alarm method, device, equipment and storage medium
CN116107851A (en) Simulation test method, device, equipment and storage medium
CN115629983A (en) Test case set generation method, device, equipment and medium
CN116775307A (en) Service processing method, device, equipment and storage medium
CN114817314A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination