WO2018188342A1 - 脚本文件生成方法、装置、设备和计算机可读存储介质 - Google Patents
脚本文件生成方法、装置、设备和计算机可读存储介质 Download PDFInfo
- Publication number
- WO2018188342A1 WO2018188342A1 PCT/CN2017/111881 CN2017111881W WO2018188342A1 WO 2018188342 A1 WO2018188342 A1 WO 2018188342A1 CN 2017111881 W CN2017111881 W CN 2017111881W WO 2018188342 A1 WO2018188342 A1 WO 2018188342A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- script file
- script
- configuration information
- file
- generating
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
Definitions
- the present application relates to the field of computer application technologies, and in particular, to a script file generation method, apparatus, device, and computer readable storage medium.
- the database design is basically designed by the developer, manually written, and then submitted to the appropriate test personnel for inspection.
- the main purpose of the present application is to provide a script file generation method, apparatus, device, and computer readable storage medium, which aim to solve the technical problem of the existing script file generation method, low efficiency, and poor intelligence.
- the present application provides a script file generating method, where the script file generating method includes:
- the preset script generation tool When receiving the generation instruction of the script file, the preset script generation tool creates a form on the preset interface;
- a script file is generated according to the configuration information defined in the table and the script template corresponding to the table.
- the present application further provides a script file generating apparatus, where the script file generating apparatus includes:
- Establishing a module configured to create a table in a preset interface by using a preset script generation tool when receiving a script file generation instruction;
- a definition module for defining configuration information in the created table
- a generating module configured to generate a script file according to the configuration information defined in the table, and the script program template corresponding to the table.
- the present application further provides a script file generating device, the script file generating device including a processor, and a memory storing a program generated by the script file; the processor is configured to execute the script file generation Program to implement the steps of the script file generation method as described above.
- the present application further provides a computer readable storage medium storing a script file generating program, the script file generating program being executed by a processor to implement as described above The steps of the script file generation method.
- the script file generating method proposed by the present application firstly establishes a form in a preset interface by using a preset script generating tool when receiving a script file generating instruction, and then defines configuration information in the created table, and then according to the definition in the table.
- the configuration information, and the script template corresponding to the table generate a script file.
- the script file is generated by the configuration information in the table and the script template corresponding to the table, and the generated script file conforms to the specification. Even if the script file is to be modified later, the configuration information in the table can be modified, and the code in the script template is Fragments do not need to be written again, improving the efficiency and intelligence of script file generation.
- FIG. 1 is a schematic flowchart of a first embodiment of a method for generating a script file according to the present application
- FIG. 2 is a schematic diagram of a refinement process of step S20 in FIG. 1;
- step S30 in FIG. 1 is a schematic diagram of a refinement process of step S30 in FIG. 1;
- FIG. 4 is a schematic flowchart of a second embodiment of a method for generating a script file according to the present application
- FIG. 5 is a schematic diagram of functional modules of a first embodiment of a script file generating apparatus of the present application
- FIG. 6 is a schematic diagram of a refinement function module of the module 20 defined in FIG. 5;
- FIG. 7 is a schematic diagram of a refinement function module of the generation module 30 in FIG. 5;
- FIG. 8 is a schematic diagram of functional modules of a second embodiment of a script file generating apparatus of the present application.
- FIG. 9 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present application.
- the solution of the embodiment of the present application is mainly: when receiving the generation instruction of the script file, first establishing a table in the preset interface by using a preset script generation tool, and then defining configuration information in the established table, and then defining according to the table
- the configuration information, and the script template corresponding to the table generate a script file.
- the generation of the script file is implemented by the configuration information in the table and the script template corresponding to the table, and the generated script file conforms to the specification. Even if the script file is to be modified later, the configuration information in the table can be modified, and the script template is The code snippet does not need to be written again, and solves the problem of the existing script file generation method, low efficiency, and poor intelligence.
- the application provides a script file generation method.
- FIG. 1 is a schematic flowchart of a preferred embodiment of a script file generating method according to the present application.
- the script file generating method includes:
- the preset script generation tool When receiving the generation instruction of the script file, the preset script generation tool creates a table in the preset interface; defines the configuration information in the established table; according to the configuration information defined in the table, and the script template corresponding to the table , generate a script file.
- the script file generating method is preferably implemented by the terminal by using a preset script generating tool, and the script generating tool may be a DB (Database) tool, and the script file generating tool of the present application is completed by the script generating tool. process.
- the script generating tool may be a DB (Database) tool, and the script file generating tool of the present application is completed by the script generating tool. process.
- Step S10 when receiving the generation instruction of the script file, creating a form on the preset interface by using a preset script generation tool;
- the preset application when receiving the generation instruction of the script file, the preset application is invoked by the preset script generation tool to create a table in the preset interface of the preset application.
- the preset The interface is preferably an interface of an Excel application, and correspondingly, the created form is an Excel spreadsheet.
- Step S20 defining configuration information in the established table
- the configuration information is defined in the established table.
- the configuration information may be configuration information defined by the terminal system, or may be input by the terminal system and the user in the table.
- the configuration information is defined together, and the specific configuration information needs to be defined, depending on the actual situation.
- the configuration information defined by the terminal system is defined by the system by default, and the configuration information input by the user is input according to the actual needs of the user.
- the configuration information input by the user is received, the configuration information input by the user and the configuration information of the terminal system can be defined into the table. If the configuration information input by the user is not received, The configuration information defined by the terminal system is directly adopted.
- the information defined by the terminal system includes: a database associated with the table, and a standard authorization file associated with the table; wherein the database is used to determine the specific type of the script template corresponding to the form, and the standard authorization file is used to determine the generation rules of the script file, and the script file
- the generation rules mainly include: the length of the field in the script file and the access permission of the script file.
- the script file can only be viewed, cannot be added or deleted, or can only be viewed and added, and cannot be deleted.
- the configuration information input by the user includes: user information, synonym user information, triggers, and the like; wherein the user information and the synonym user information are used to distinguish different users, to grant different access rights to different users, and the trigger is used to record the script. Traces of modifications to the file.
- the database and standard authorization file associated with the above mentioned table can also be modified by the user according to actual needs.
- the step S20 includes:
- Step S21 associating a database in the established table
- Step S22 establishing user information and synonym user information for the associated database in the table, so that different users have different access rights;
- step S23 a trigger is created in the table to record the modification trace of the script file based on the created trigger.
- the table is associated with the preset database.
- the system may be associated with the default database at the beginning, and may be added according to actual needs to be associated with other databases.
- the addition mode can be implemented by the user adding a database identification information in the preset area of the table to associate the table to the new database.
- the database initially associated with the table is LBS and ELIS, and the display form is:
- the table in this embodiment is a normalized table, which can be mapped to a script template by using the script generation tool mentioned above, but since the script template to which the table is mapped is the same, The generated script files are different. Therefore, the script template corresponding to the table can be further determined by the database associated with the table, that is, the table is associated with different databases, and the attribute information generated in each database is different, and finally generated. The script template will also be different. In this embodiment, a table can be associated with multiple databases, and finally multiple script templates can be obtained.
- user information and synonym user information are established in the associated database in the table, and different users are authorized to have different access rights for different users.
- the user information set under a certain database is “Zhang Sheng”, and then a synonym user information is set to “Zhang San”, and the “Zhang Sheng” permission is Viewing the specific data in this form, adding, deleting, and modifying, and "Zhang San” is information that tells other users to visit, such as the user information that informs the tester to view, "Zhang San” has the right to view information, and cannot add or delete the table. data.
- Zhang Sheng and “Zhang San” are the same object, setting user information and synonym information for the same object, and setting unused rights for user information and synonym information, so that developers and other personnel such as testers There are two different access rights for this object, which realizes the protection of the data in the table, prevents other people from changing the data in the table, and causes the script file generated subsequently to be incorrect, thus ensuring the security of the information.
- a trigger can be created in the created table to subsequently record the modified trace of the script file based on the created trigger.
- a trigger is created in the created table, so that the modification trace of the script file is recorded based on the created trigger, and the trace of each modification, as well as the specific modified content and the modification time, can be triggered. Record, easy to know the modification of the data in the table, better analysis.
- the script template corresponding to the table may be determined according to the associated database in the table, and the configuration of the related information of the subsequently generated script file is completed.
- Step S30 generating a script file according to the configuration information defined in the table and the script program template corresponding to the table.
- the script template has been obtained, and combined with the configuration information defined by the terminal system in the table and the configuration information input by the user, the configuration information is specifically added to the script template to generate a script file.
- the step S30 includes:
- Step S31 extracting a script file generation rule from a standard authorization file stored in a preset directory
- Step S32 generating a script file according to the extracted script file generation rule, the configuration information defined in the table, and the script program template corresponding to the table.
- the generation rule of the script file may be further extracted from the standard authorization file stored in the preset directory, for example, the script file is only viewed.
- the certain fields are inherently invariant, cannot be modified, and the like, and then generate a script file according to the generated rules of the generated script file, the configuration information defined in the table, and the corresponding script template of the skin label.
- script file generating method further includes:
- the script file generating method in the embodiment when receiving the script file generating instruction, first establishes a table in a preset interface by using a preset script generating tool, and then defines configuration information in the created table, and then defines according to the table.
- the configuration information, and the script template corresponding to the table generate a script file.
- the script file is generated by the configuration information in the table and the script template corresponding to the table, and the generated script file conforms to the specification. Even if the script file is to be modified later, the configuration information in the table can be modified, and the code in the script template is Fragments do not need to be written again, improving the efficiency and intelligence of script file generation.
- the method further includes:
- Step S40 when receiving the running instruction of the script file, calling the database associated with the table to run the script file to implement testing of the script file;
- step S50 when it is detected that the script file is incorrect, the prompt information is output, wherein the manner of outputting the prompt information includes outputting in a position with an error in the table, or popping up the prompt window to output an error information.
- the script file when receiving the running instruction of the script file, first calling the database associated with the table to run the script file, that is, by calling the database, traversing the database to run the script file, and detecting If no error is reported during the running of the script file, the generated script file is considered to be accurate. If the script file is detected to be incorrect, the prompt information is output to prompt the script file to be incorrect, and the manner of outputting the prompt information may be The position of the table is incorrectly output, and the prompt window may output a message with an error.
- the method includes:
- the generated script file is handed over to the preset storage path for subsequent execution of the script file;
- the script file is first handed over to the preset storage path, so that the script file is tested in the storage path, and the test is not performed on the interface for generating the script file, thereby affecting the test of the script file, thereby improving the script.
- the accuracy of the document test is first handed over to the preset storage path, so that the script file is tested in the storage path, and the test is not performed on the interface for generating the script file, thereby affecting the test of the script file, thereby improving the script.
- the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
- the application further provides a script file generating apparatus.
- FIG. 5 is a schematic diagram of functional modules of a preferred embodiment of the script file generating apparatus 100 of the present application.
- the functional block diagram shown in FIG. 5 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art surround the functional modules of the script file generating apparatus 100 shown in FIG. 5.
- the function modules of the present invention can be easily supplemented by the new function modules.
- the names of the function modules are used to assist in understanding the various program function blocks of the script file generating apparatus 100, and are not used to limit the technical solutions of the present application.
- At the heart of the solution is the functionality to be achieved by the functional modules that each define the name.
- the script file generating apparatus 100 includes:
- Establishing a module configured to: when the script generation instruction is received, create a table in the preset interface by using a preset script generation tool; define a module, configured to define configuration information in the established table; and generate a module, according to the table
- the script file generating apparatus is preferably implemented by the terminal by using a preset script generating tool, and the script generating tool may be a DB (Database) tool, and the script file generating tool of the present application is completed by the script generating tool. process.
- the script generating tool may be a DB (Database) tool, and the script file generating tool of the present application is completed by the script generating tool. process.
- the establishing module 10 is configured to: when receiving the generating instruction of the script file, create a table in the preset interface by using a preset script generating tool;
- the establishing module 10 calls the preset application by using the preset script generating tool to create a table in the preset interface of the preset application.
- the The preset interface is preferably an interface of an Excel application, and correspondingly, the created form is an Excel spreadsheet.
- the definition module 20 is configured to define configuration information in the established table
- the definition module 20 defines the configuration information in the established table.
- the configuration information may be configuration information defined by the terminal system, or may be the terminal system and the user.
- the configuration information entered in the table is defined together, and the specific configuration information needs to be defined, depending on the actual situation.
- the configuration information defined by the terminal system is defined by the system by default, and the configuration information input by the user is input according to the actual needs of the user.
- the configuration information input by the user is received, the configuration information input by the user and the configuration information of the terminal system can be defined into the table. If the configuration information input by the user is not received, The configuration information defined by the terminal system is directly adopted.
- the information defined by the terminal system includes: a database associated with the table, and a standard authorization file associated with the table; wherein the database is used to determine the specific type of the script template corresponding to the form, and the standard authorization file is used to determine the generation rules of the script file, and the script file
- the generation rules mainly include: the length of the field in the script file and the access permission of the script file.
- the script file can only be viewed, cannot be added or deleted, or can only be viewed and added, and cannot be deleted.
- the configuration information input by the user includes: user information, synonym user information, triggers, and the like; wherein the user information and the synonym user information are used to distinguish different users, to grant different access rights to different users, and the trigger is used to record the script. Traces of modifications to the file.
- the database and standard authorization file associated with the above mentioned table can also be modified by the user according to actual needs.
- the definition module 20 includes:
- An association unit 21 configured to associate a database in the established table
- the establishing unit 22 is configured to establish user information and synonym user information in the table for the associated database, so that different users have different access rights;
- a creating unit 23 is configured to create a trigger in the table to record a modification trace of the script file based on the created trigger.
- the association unit 21 associates the table to the preset database.
- the system may be associated with the default database at the beginning, and may be added according to actual needs to be associated with other databases.
- the specific addition method can be implemented by the user adding a database identification information in the preset area of the table, so that the table is associated with the new database.
- the database initially associated with the table is LBS and ELIS, and the display form is:
- the table in this embodiment is a normalized table, which can be mapped to a script template by using the script generation tool mentioned above, but since the script template to which the table is mapped is the same, The generated script files are different. Therefore, the script template corresponding to the table can be further determined by the database associated with the table, that is, the table is associated with different databases, and the attribute information generated in each database is different, and finally generated. The script template will also be different. In this embodiment, a table can be associated with multiple databases, and finally multiple script templates can be obtained.
- the establishing unit 22 establishes user information and synonym user information for the associated database in the table, and authorizes different users so that different users have different access rights. For example, when a developer develops a script file through a form, the user information set under a certain database is “Zhang Sheng”, and then a synonym user information is set to “Zhang San”, and the “Zhang Sheng” permission is Viewing the specific data in this form, adding, deleting, and modifying, and "Zhang San” is information that tells other users to visit, such as the user information that informs the tester to view, "Zhang San" has the right to view information, and cannot add or delete the table. data.
- Zhang Sheng and “Zhang San” are the same object, setting user information and synonym information for the same object, and setting unused rights for user information and synonym information, so that developers and other personnel such as testers There are two different access rights for this object, which realizes the protection of the data in the table, prevents other people from changing the data in the table, and causes the script file generated subsequently to be incorrect, thus ensuring the security of the information.
- the creation unit 23 can also create a trigger in the created table to subsequently record the modification trace of the script file based on the created trigger.
- a trigger is created in the created table, so that the modification trace of the script file is recorded based on the created trigger, and the trace of each modification, as well as the specific modified content and the modification time, can be triggered. Record, easy to know the modification of the data in the table, better analysis.
- the script template corresponding to the table may be determined according to the associated database in the table, and the configuration of the related information of the subsequently generated script file is completed.
- the generating module 30 is configured to generate a script file according to the configuration information defined in the table and the script program template corresponding to the table.
- the script template is obtained according to the database associated with the table.
- the generating module 30 further adds the configuration information to the script template in combination with the configuration information defined by the terminal system in the table and the configuration information input by the user to generate a script. file.
- the generating module 30 includes:
- the extracting unit 31 is configured to extract a script file generating rule from a standard authorization file stored in a preset directory;
- the generating unit 32 is configured to generate a script file according to the extracted script file generation rule, the configuration information defined in the table, and the script program template corresponding to the table.
- the extracting unit 31 may further extract the script file generation rule, such as a script file, from the standard authorization file stored in the preset directory. Is only view, some fields are inherently unchanged, can not be modified, and so on, and then the generating unit 32 according to the generated rules of the generated script file, and the configuration information defined in the table and the corresponding script template of the skin label , generate a script file.
- the script file generation rule such as a script file
- script file generating apparatus further includes:
- a determining module configured to determine, in the preset directory, a location where the standard authorization file is to be modified when the modification instruction of the standard authorization file is detected;
- a processing module that replaces the determined location with a placeholder and adds a new script file generation rule to the determined location.
- the script file generating apparatus 100 of the present embodiment firstly establishes a form in a preset interface by using a preset script generating tool when receiving a script file generating instruction, and then defines configuration information in the created form, and then according to the table.
- the defined configuration information, and the script template corresponding to the table generates a script file.
- the script file is generated by the configuration information in the table and the script template corresponding to the table, and the generated script file conforms to the specification. Even if the script file is to be modified later, the configuration information in the table can be modified, and the code in the script template is Fragments do not need to be written again, improving the efficiency and intelligence of script file generation.
- the script file generating apparatus 100 further includes:
- the calling module 40 is configured to, when receiving the running instruction of the script file, invoke the database associated with the table to run the script file to implement testing of the script file;
- the output module 50 is configured to output prompt information when detecting that the script file is incorrect, wherein the manner of outputting the prompt information includes outputting in a position with an error in the table, or popping up the prompt window to output incorrect information.
- the calling module 40 upon receiving the running instruction of the script file, the calling module 40 first invokes the database associated with the table to run the script file, that is, by calling the database, traversing the database to run the script file, If no error is reported during the running of the script file, the generated script file is considered to be accurate. If the script file is detected to be incorrect, the output module 50 outputs the prompt information to prompt the script file to be incorrect, and output the prompt information. The way can be output in the wrong position in the table, and the prompt window can be displayed to output incorrect information.
- the device in order to ensure the accuracy of the data test, the device includes:
- a handover module configured to: when the handover instruction of the script file is received, hand over the generated script file to a preset storage path, so as to subsequently run the script file;
- the handover module first transfers the script file to the preset storage path, so as to test the script file in the storage path, avoiding testing on the interface for generating the script file, thereby affecting the test of the script file, thereby improving The accuracy of the script file test.
- the above establishing module 10, defining module 20, generating module 30, and the like may be embedded in or independent of the script file generating device in hardware form, or may be stored in the script file generating device in software form.
- the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
- FIG. 9 is a schematic structural diagram of a device in a hardware operating environment according to an embodiment of the present application.
- the script file generating device in the embodiment of the present application may be a PC, or may be a terminal device having a display function, such as a smart phone, a tablet computer, or a portable computer.
- the script file generating device may include a processor 1001, such as a CPU, a network interface 1002, a user interface 1003, and a memory 1004. Connection communication between these components can be achieved via a communication bus.
- the network interface 1002 may optionally include a standard wired interface (for connecting to a wired network), a wireless interface (such as a WI-FI interface, a Bluetooth interface, an infrared interface, etc. for connecting to a wireless network).
- the user interface 1003 may include a display, an input unit such as a keyboard, and the optional user interface 1003 may also include a standard wired interface (eg, for connecting a wired keyboard, a wired mouse, etc.), a wireless interface (eg, for Connect a wireless keyboard, wireless mouse).
- the memory 1004 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
- the memory 1004 can also optionally be a storage device independent of the aforementioned processor 1001.
- the script file generating device may further include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
- RF Radio
- RF Radio
- script file generating device structure shown in FIG. 9 does not constitute a limitation of the script file generating device, and may include more or less components than those illustrated, or combine some components, or different. Parts layout.
- an operating system a network communication module, a user interface module, and a script file generation program may be included in the memory 1004 as a computer storage medium.
- the operating system is a program for managing and controlling the script file generation device hardware and software resources, and supports the operation of the network communication module, the user interface module, the script file generation program, and other programs or software; the network communication module is used to manage and control the network interface. 1002; a user interface module is used to manage and control the user interface 1003.
- the processor 1001 can be used to execute a script file generating program stored in the memory 1004 to implement the steps of the script file generating method as described above.
- the present application provides a computer readable storage medium storing a script file generating program, the script file generating program being executed by a processor to implement the steps of the script file generating method as described above .
- the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
- Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
- the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本申请公开了一种脚本文件生成方法,所述方法包括:接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;在建立的表格中定义配置信息;根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。本申请还公开了一种脚本文件生成装置、设备和计算机可读存储介质。本申请生成的脚本文件合乎规范,即使后续要修改脚本文件,只要修改表格中的配置信息即可,提高了脚本文件生成的效率和智能性。
Description
本申请要求于2017年04月13日提交中国专利局、申请号为201710243035.1、发明名称为“脚本文件生成方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机应用技术领域,尤其涉及一种脚本文件生成方法、装置、设备和计算机可读存储介质。
背景技术
目前,数据库设计基本都是开发人员设计后,手工编写,然后提交给相应的测试人员进行检查。
但是,经常有如下问题:因为数据库设计不合规范,脚本完成后在执行过程中若是出现一些比较低级的错误,导致测试有问题时,需要回头调整设计,重新修改脚本代码,并重新执行。由于这种过程很多内容需要手动重复编写,耗费大量时间,导致脚本文件的生成效率较低,且生成方式智能性也较差。
发明内容
本申请的主要目的在于提供一种脚本文件生成方法、装置、设备和计算机可读存储介质,旨在解决现有的脚本文件生成方式,效率低,且智能性差的技术问题。
为实现上述目的,本申请提供一种脚本文件生成方法,所述脚本文件生成方法包括:
接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;
在建立的表格中定义配置信息;
根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
此外,为实现上述目的,本申请还提供一种脚本文件生成装置,所述脚本文件生成装置包括:
建立模块,用于接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;
定义模块,用于在建立的表格中定义配置信息;
生成模块,用于根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
此外,为实现上述目的,本申请还提供一种脚本文件生成设备,所述脚本文件生成设备包括处理器、以及存储有脚本文件生成的程序的存储器;所述处理器用于执行所述脚本文件生成的程序,以实现如上文所述的脚本文件生成方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有脚本文件生成程序,所述脚本文件生成程序被处理器执行,以实现如上文所述的脚本文件生成方法的步骤。
本申请提出的脚本文件生成方法,接收到脚本文件的生成指令时,先通过预设脚本生成工具在预设界面建立表格,然后在建立的表格中定义配置信息,再根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。使得脚本文件是由表格中的配置信息以及表格对应的脚本程序模板生成的,生成的脚本文件合乎规范,即使后续要修改脚本文件,只要修改表格中的配置信息即可,脚本程序模板中的代码片段无须再次编写,提高了脚本文件生成的效率和智能性。
附图说明
图1为本申请脚本文件生成方法第一实施例的流程示意图;
图2为图1中步骤S20的细化流程示意图;
图3为图1中步骤S30的细化流程示意图;
图4为本申请脚本文件生成方法第二实施例的流程示意图;
图5为本申请脚本文件生成装置第一实施例的功能模块示意图;
图6为图5中定义模块20的细化功能模块示意图;
图7为图5中生成模块30的细化功能模块示意图;
图8为本申请脚本文件生成装置第二实施例的功能模块示意图;
图9是本申请实施例方案涉及的硬件运行环境的设备结构示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例的解决方案主要是:接收到脚本文件的生成指令时,先通过预设脚本生成工具在预设界面建立表格,然后在建立的表格中定义配置信息,再根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。使得脚本文件的生成是由表格中的配置信息以及表格对应的脚本程序模板实现的,生成的脚本文件合乎规范,即使后续要修改脚本文件,只要修改表格中的配置信息即可,脚本程序模板中的代码片段无须再次编写,解决了现有的脚本文件生成方式,效率低,且智能性差的问题。
本申请提供一种脚本文件生成方法。
参照图1,图1为本申请脚本文件生成方法较佳实施例的流程示意图。
在本实施例中,所述脚本文件生成方法包括:
接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;在建立的表格中定义配置信息;根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
在本实施例中,所述脚本文件生成方法优选是终端通过预设的脚本生成工具实现的,所述脚本生成工具可以为DB(Database)工具,通过该脚本生成工具完成本申请的脚本文件生成过程。
以下是本实施例中实现脚本文件生成的具体步骤:
步骤S10,接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;
本实施例中,在接收到脚本文件的生成指令时,通过预设脚本生成工具调用预设应用,以在所述预设应用的预设界面中建立表格,本实施例中,所述预设界面优选为Excel应用的界面,对应的,建立的表格就为Excel表格。
步骤S20,在建立的表格中定义配置信息;
在预设界面中建立表格之后,在建立的所述表格中定义配置信息,本实施例中,所述配置信息可以是终端系统自行定义的配置信息,也可以是终端系统和用户在表格中输入的配置信息共同定义的,具体需要定义哪些配置信息,根据实际情况而定。终端系统定义的配置信息是系统默认会定义好的,用户输入的配置信息是根据用户实际需要才输入的。优选地,在表格建立完成之后,若接收到用户输入的配置信息,即可将用户输入的配置信息以及终端系统的配置信息都定义到所述表格中,若未接收到用户输入的配置信息,则直接采用终端系统定义的配置信息。
终端系统定义的信息包括:表格关联的数据库,表格中关联的标准授权文件;其中,数据库用来确定表格最终对应的脚本程序模板具体类型,标准授权文件用来确定脚本文件的生成规则,脚本文件生成规则主要包括:脚本文件中的字段长度、脚本文件的访问权限,如脚本文件是只能查看,不能增删,还是只能查看和增加内容不能删减等等。用户输入的配置信息包括:用户信息、同义词用户信息,触发器等等;其中,用户信息、同义词用户信息用来区分不同的用户,以对不同的用户授予不同的访问权限,触发器用来记录脚本文件的修改痕迹。当然,上述所提到的表格关联的数据库和标准授权文件,也可由用户根据实际需要进行修改。
具体地,参照图2,所述步骤S20包括:
步骤S21,在建立的表格中关联数据库;
步骤S22,在所述表格中对关联的数据库建立用户信息以及同义词用户信息,以使不同的用户对应有不同的访问权限;及
步骤S23,在所述表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹。
即,在建立表格之后,将所述表格关联到预设数据库,本实施例中,系统一开始可以关联到默认的数据库,后续,还可根据实际需要进行增加,以关联到其它数据库,具体的增加方式可由用户在表格的预设区域中增加一个数据库的标识信息实现,以使表格关联到新的数据库,如:表格初始关联的数据库为LBS和ELIS,显示形式为:
数据库: LBS ELIS
后续根据实际需要再增加多一个数据库d0lucd0,那么就需要在预设区域中对事先关联的数据库加多一个,即关联事先数据的操作为:
执行脚本数据库: LBS
ELIS
在预设区域中增加一个数据库时,操作就是:
执行脚本数据库: LBS
ELIS
d0lucd0
那么,最终得到的数据表格的显示形式就为:
数据库: LBS ELIS d0lucd0
应当理解的是,本实施例中的表格是规范化的表格,可以通过上文所提及的脚本生成工具映射为脚本程序模板,但是由于表格映射到的脚本程序模板是相同的,而要使后续生成的脚本文件各不相同,因此,通过所述表格关联的数据库,可以进一步确定所述表格对应的脚本程序模板,即表格关联不同的数据库,由于每个数据库中的属性信息不同,最终生成的脚本程序模板也会有所不同。本实施例中,一个表格可关联有多个数据库,最终可以得到多个脚本程序模板。
将所述表格关联到预设数据库之后,在所述表格中对关联的数据库建立用户信息以及同义词用户信息,对不同的用户进行授权,以使不同的用户对应有不同的访问权限。例如,开发者在通过表格开发脚本文件时,在某个数据库下设置的用户信息是“张生”,那么此时还设置一个同义词用户信息为“张三”,“张生”的权限是可以对这个表格中的具体数据进行查看增删修改,而“张三”是告诉其他用户进行访问的信息,如通知测试人员查看的用户信息,“张三”只有查看信息的权限,无法增删表格中的数据。应当理解,“张生”和“张三”是同一个对象,对同一个对象设置用户信息和同义词信息,并对用户信息和同义词信息设置不用的权项,使得开发人员和其它人员如测试人员对这个对象有两种不同的访问权项,实现对表格中数据的保护,防止其他人员改动表格中的数据,导致后续生成的脚本文件有误,保证了信息的安全性。
此外,还可在建立的表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹。本实施例中,对建立的表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹,每次修改的痕迹,以及具体修改的内容和修改时间,都可以被触发器记录,便于得知表格中数据的修改情况,更好作出分析。
在建立的表格中定义配置信息之后,即可根据所述表格中关联的数据库,确定所述表格对应的脚本程序模板,并且完成对后续生成的脚本文件的相关信息的配置。
步骤S30,根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
上文根据表格关联的数据库,已经得到脚本程序模板了,再结合终端系统在表格中定义的配置信息以及用户输入的配置信息,将配置信息具体添加到脚本程序模板中,以生成脚本文件。
具体地,参照图3,所述步骤S30包括:
步骤S31,在预设目录下存储的标准授权文件中提取脚本文件生成规则;
步骤S32,根据提取的脚本文件生成规则、所述表格中定义的配置信息以及所述表格对应的脚本程序模板,生成脚本文件。
在本实施例中,在确定表格中定义的配置信息,表格对应的脚本程序模板之后,还可进一步在预设目录下存储的标准授权文件中提取脚本文件的生成规则,如脚本文件是只是查看的,某些字段是固有不变,无法修改的等等,然后根据提取的脚本文件的生成规则,以及表格中定义的配置信息以及所述皮标个对应的脚本程序模板,生成脚本文件。
进一步地,所述脚本文件生成方法还包括:
在检测到标准授权文件的修改指令时,在所述预设目录中确定标准授权文件待修改的位置;
用占位符替换确定的位置,并在确定的位置中添加新的脚本文件生成规则。
本实施例提出的脚本文件生成方法,接收到脚本文件的生成指令时,先通过预设脚本生成工具在预设界面建立表格,然后在建立的表格中定义配置信息,再根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。使得脚本文件是由表格中的配置信息以及表格对应的脚本程序模板生成的,生成的脚本文件合乎规范,即使后续要修改脚本文件,只要修改表格中的配置信息即可,脚本程序模板中的代码片段无须再次编写,提高了脚本文件生成的效率和智能性。
进一步地,基于第一实施例提出本申请脚本文件生成方法的第二实施例,在本实施例中,参照图4,所述步骤S30之后,所述方法还包括:
步骤S40,在接收到脚本文件的运行指令时,调用所述表格关联的数据库以运行所述脚本文件,实现对所述脚本文件的测试;
步骤S50,在检测到所述脚本文件有误时,输出提示信息,其中,输出提示信息的方式包括在表格中有误的位置输出,或者弹出提示窗口输出有误的信息。
在本实施例中,在接收到脚本文件的运行指令时,先调用所述表格关联的数据库以运行所述脚本文件,即通过调用数据库,对数据库进行遍历以运行所述脚本文件,在检测到脚本文件的运行过程中没有报错,则认为生成的脚本文件准确,若检测到所述脚本文件有误,则输出提示信息,以提示所述脚本文件有误,输出提示信息的方式,可以是在表格中有误的位置输出,还可以弹出提示窗口输出有误的信息。
本实施例中,为了保证对数据测试的准确性,所述步骤S40之前,所述方法包括:
在接收到脚本文件的移交指令时,将生成的所述脚本文件移交到预设存储路径中,以便后续运行所述脚本文件;
即,先将脚本文件移交至预设存储路径中,以便在所述存储路径中对脚本文件进行测试,避免在生成脚本文件的界面进行测试,从而对脚本文件的测试造成影响,从而提高了脚本文件测试的准确性。
需要说明的是,本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
本申请进一步提供一种脚本文件生成装置。
参照图5,图5为本申请脚本文件生成装置100较佳实施例的功能模块示意图。
需要强调的是,对本领域的技术人员来说,图5所示功能模块图仅仅是一个较佳实施例的示例图,本领域的技术人员围绕图5所示的脚本文件生成装置100的功能模块,可轻易进行新的功能模块的补充;各功能模块的名称是自定义名称,仅用于辅助理解该脚本文件生成装置100的各个程序功能块,不用于限定本申请的技术方案,本申请技术方案的核心是,各自定义名称的功能模块所要达成的功能。
本实施例中,所述脚本文件生成装置100包括:
建立模块,用于接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;定义模块,用于在建立的表格中定义配置信息;生成模块,用于根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
在本实施例中,所述脚本文件生成装置优选是终端通过预设的脚本生成工具实现的,所述脚本生成工具可以为DB(Database)工具,通过该脚本生成工具完成本申请的脚本文件生成过程。
以下是本实施例中实现脚本文件生成的各个模块的具体功能:
其中,建立模块10,用于接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;
本实施例中,在接收到脚本文件的生成指令时,建立模块10通过预设脚本生成工具调用预设应用,以在所述预设应用的预设界面中建立表格,本实施例中,所述预设界面优选为Excel应用的界面,对应的,建立的表格就为Excel表格。
其中,定义模块20,用于在建立的表格中定义配置信息;
在预设界面中建立表格之后,定义模块20在建立的所述表格中定义配置信息,本实施例中,所述配置信息可以是终端系统自行定义的配置信息,也可以是终端系统和用户在表格中输入的配置信息共同定义的,具体需要定义哪些配置信息,根据实际情况而定。终端系统定义的配置信息是系统默认会定义好的,用户输入的配置信息是根据用户实际需要才输入的。优选地,在表格建立完成之后,若接收到用户输入的配置信息,即可将用户输入的配置信息以及终端系统的配置信息都定义到所述表格中,若未接收到用户输入的配置信息,则直接采用终端系统定义的配置信息。
终端系统定义的信息包括:表格关联的数据库,表格中关联的标准授权文件;其中,数据库用来确定表格最终对应的脚本程序模板具体类型,标准授权文件用来确定脚本文件的生成规则,脚本文件生成规则主要包括:脚本文件中的字段长度、脚本文件的访问权限,如脚本文件是只能查看,不能增删,还是只能查看和增加内容不能删减等等。用户输入的配置信息包括:用户信息、同义词用户信息,触发器等等;其中,用户信息、同义词用户信息用来区分不同的用户,以对不同的用户授予不同的访问权限,触发器用来记录脚本文件的修改痕迹。当然,上述所提到的表格关联的数据库和标准授权文件,也可由用户根据实际需要进行修改。
具体地,参照图6,所述定义模块20包括:
关联单元21,用于在建立的表格中关联数据库;
建立单元22,用于在所述表格中对关联的数据库建立用户信息以及同义词用户信息,以使不同的用户对应有不同的访问权限;及
创建单元23,用于在所述表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹。
即,在建立表格之后,关联单元21将所述表格关联到预设数据库,本实施例中,系统一开始可以关联到默认的数据库,后续,还可根据实际需要进行增加,以关联到其它数据库,具体的增加方式可由用户在表格的预设区域中增加一个数据库的标识信息实现,以使表格关联到新的数据库,如:表格初始关联的数据库为LBS和ELIS,显示形式为:
数据库: LBS ELIS
后续根据实际需要再增加多一个数据库d0lucd0,那么就需要在预设区域中对事先关联的数据库加多一个,即关联事先数据的操作为:
执行脚本数据库: LBS
ELIS
在预设区域中增加一个数据库时,操作就是:
执行脚本数据库: LBS
ELIS
d0lucd0
那么,最终得到的数据表格的显示形式就为:
数据库: LBS ELIS d0lucd0
应当理解的是,本实施例中的表格是规范化的表格,可以通过上文所提及的脚本生成工具映射为脚本程序模板,但是由于表格映射到的脚本程序模板是相同的,而要使后续生成的脚本文件各不相同,因此,通过所述表格关联的数据库,可以进一步确定所述表格对应的脚本程序模板,即表格关联不同的数据库,由于每个数据库中的属性信息不同,最终生成的脚本程序模板也会有所不同。本实施例中,一个表格可关联有多个数据库,最终可以得到多个脚本程序模板。
将所述表格关联到预设数据库之后,建立单元22在所述表格中对关联的数据库建立用户信息以及同义词用户信息,对不同的用户进行授权,以使不同的用户对应有不同的访问权限。例如,开发者在通过表格开发脚本文件时,在某个数据库下设置的用户信息是“张生”,那么此时还设置一个同义词用户信息为“张三”,“张生”的权限是可以对这个表格中的具体数据进行查看增删修改,而“张三”是告诉其他用户进行访问的信息,如通知测试人员查看的用户信息,“张三”只有查看信息的权限,无法增删表格中的数据。应当理解,“张生”和“张三”是同一个对象,对同一个对象设置用户信息和同义词信息,并对用户信息和同义词信息设置不用的权项,使得开发人员和其它人员如测试人员对这个对象有两种不同的访问权项,实现对表格中数据的保护,防止其他人员改动表格中的数据,导致后续生成的脚本文件有误,保证了信息的安全性。
此外,创建单元23还可在建立的表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹。本实施例中,对建立的表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹,每次修改的痕迹,以及具体修改的内容和修改时间,都可以被触发器记录,便于得知表格中数据的修改情况,更好作出分析。
在建立的表格中定义配置信息之后,即可根据所述表格中关联的数据库,确定所述表格对应的脚本程序模板,并且完成对后续生成的脚本文件的相关信息的配置。
其中,生成模块30,用于根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
上文根据表格关联的数据库,已经得到脚本程序模板了,生成模块30再结合终端系统在表格中定义的配置信息以及用户输入的配置信息,将配置信息具体添加到脚本程序模板中,以生成脚本文件。
具体地,参照图7,所述生成模块30包括:
提取单元31,用于在预设目录下存储的标准授权文件中提取脚本文件生成规则;
生成单元32,用于根据提取的脚本文件生成规则、所述表格中定义的配置信息以及所述表格对应的脚本程序模板,生成脚本文件。
在本实施例中,在确定表格中定义的配置信息,表格对应的脚本程序模板之后,提取单元31还可进一步在预设目录下存储的标准授权文件中提取脚本文件的生成规则,如脚本文件是只是查看的,某些字段是固有不变,无法修改的等等,然后生成单元32根据提取的脚本文件的生成规则,以及表格中定义的配置信息以及所述皮标个对应的脚本程序模板,生成脚本文件。
进一步地,所述脚本文件生成装置还包括:
确定模块,用于在检测到标准授权文件的修改指令时,在所述预设目录中确定标准授权文件待修改的位置;
处理模块,用于用占位符替换确定的位置,并在确定的位置中添加新的脚本文件生成规则。
本实施例提出的脚本文件生成装置100,接收到脚本文件的生成指令时,先通过预设脚本生成工具在预设界面建立表格,然后在建立的表格中定义配置信息,再根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。使得脚本文件是由表格中的配置信息以及表格对应的脚本程序模板生成的,生成的脚本文件合乎规范,即使后续要修改脚本文件,只要修改表格中的配置信息即可,脚本程序模板中的代码片段无须再次编写,提高了脚本文件生成的效率和智能性。
进一步地,基于第一实施例提出本申请脚本文件生成装置100的第二实施例,在本实施例中,参照图8,所述脚本文件生成装置100还包括:
调用模块40,用于在接收到脚本文件的运行指令时,调用所述表格关联的数据库以运行所述脚本文件,实现对所述脚本文件的测试;
输出模块50,用于在检测到所述脚本文件有误时,输出提示信息,其中,输出提示信息的方式包括在表格中有误的位置输出,或者弹出提示窗口输出有误的信息。
在本实施例中,在接收到脚本文件的运行指令时,调用模块40先调用所述表格关联的数据库以运行所述脚本文件,即通过调用数据库,对数据库进行遍历以运行所述脚本文件,在检测到脚本文件的运行过程中没有报错,则认为生成的脚本文件准确,若检测到所述脚本文件有误,则输出模块50输出提示信息,以提示所述脚本文件有误,输出提示信息的方式,可以是在表格中有误的位置输出,还可以弹出提示窗口输出有误的信息。
本实施例中,为了保证对数据测试的准确性,所述装置包括:
移交模块,用于在接收到脚本文件的移交指令时,将生成的所述脚本文件移交到预设存储路径中,以便后续运行所述脚本文件;
即,移交模块先将脚本文件移交至预设存储路径中,以便在所述存储路径中对脚本文件进行测试,避免在生成脚本文件的界面进行测试,从而对脚本文件的测试造成影响,从而提高了脚本文件测试的准确性。
需要说明的是,在硬件实现上,以上建立模块10、定义模块20及生成模块30等可以以硬件形式内嵌于或独立于脚本文件生成装置中,也可以以软件形式存储于脚本文件生成装置的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。
参照图9,图9是本申请实施例方案涉及的硬件运行环境的设备结构示意图。
本申请实施例脚本文件生成设备可以是PC,也可以是智能手机、平板电脑、便携计算机等具有显示功能的终端设备。
如图9所示,该脚本文件生成设备可以包括:处理器1001,例如CPU,网络接口1002,用户接口1003,存储器1004。这些组件之间的连接通信可以通过通信总线实现。网络接口1002可选的可以包括标准的有线接口(用于连接有线网络)、无线接口(如WI-FI接口、蓝牙接口、红外线接口等,用于连接无线网络)。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口(例如用于连接有线键盘、有线鼠标等)、无线接口(例如用于连接无线键盘、无线鼠标)。存储器1004可以是高速RAM存储器,也可以是稳定的存储器(non-volatile
memory),例如磁盘存储器。存储器1004可选的还可以是独立于前述处理器1001的存储装置。
可选地,该脚本文件生成设备还可以包括摄像头、RF(Radio
Frequency,射频)电路,传感器、音频电路、WiFi模块等等。
本领域技术人员可以理解,图9中示出的脚本文件生成设备结构并不构成对脚本文件生成设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图9所示,作为一种计算机存储介质的存储器1004中可以包括操作系统、网络通信模块、用户接口模块以及脚本文件生成程序。其中,操作系统是管理和控制脚本文件生成设备硬件与软件资源的程序,支持网络通信模块、用户接口模块、脚本文件生成程序以及其他程序或软件的运行;网络通信模块用于管理和控制网络接口1002;用户接口模块用于管理和控制用户接口1003。
在图9所示的脚本文件生成设备中,处理器1001可以用于执行存储器1004中存储的脚本文件生成程序,以实现如上文所述的脚本文件生成方法的步骤。
本申请提供了一种计算机可读存储介质,所述计算机可读存储介质存储有脚本文件生成程序,所述脚本文件生成程序被处理器执行,以实现如上文所述的脚本文件生成方法的步骤。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其它变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其它相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种脚本文件生成方法,其特征在于,所述脚本文件生成方法包括:接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;在建立的表格中定义配置信息;根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
- 如权利要求1所述的脚本文件生成方法,其特征在于,所述在建立的表格中定义配置信息的步骤包括:在建立的表格中关联数据库;在所述表格中对关联的数据库建立用户信息以及同义词用户信息,以使不同的用户对应有不同的访问权限;及在所述表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹。
- 如权利要求2所述的脚本文件生成方法,其特征在于,所述根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件的步骤包括:在预设目录下存储的标准授权文件中提取脚本文件生成规则;根据提取的脚本文件生成规则、所述表格中定义的配置信息以及所述表格对应的脚本程序模板,生成脚本文件。
- 如权利要求3所述的脚本文件生成方法,其特征在于,所述方法还包括:在检测到标准授权文件的修改指令时,在所述预设目录中确定标准授权文件待修改的位置;用占位符替换确定的位置,并在确定的位置中添加新的脚本文件生成规则。
- 如权利要求2所述的脚本文件生成方法,其特征在于,所述根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件的步骤之后,所述脚本文件生成方法还包括:在接收到脚本文件的运行指令时,调用所述表格关联的数据库以运行所述脚本文件,实现对所述脚本文件的测试;在检测到所述脚本文件有误时,输出提示信息,其中,输出提示信息的方式包括在表格中有误的位置输出,或者弹出提示窗口输出有误的信息。
- 一种脚本文件生成装置,其特征在于,所述脚本文件生成装置包括:建立模块,用于接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;定义模块,用于在建立的表格中定义配置信息;生成模块,用于根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
- 如权利要求6所述的脚本文件生成装置,其特征在于,所述定义模块包括:关联单元,用于在建立的表格中关联数据库;建立单元,用于在所述表格中对关联的数据库建立用户信息以及同义词用户信息,以使不同的用户对应有不同的访问权限;及创建单元,用于在所述表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹。
- 如权利要求7所述的脚本文件生成装置,其特征在于,所述生成模块包括:提取单元,用于在预设目录下存储的标准授权文件中提取脚本文件生成规则;生成单元,用于根据提取的脚本文件生成规则、所述表格中定义的配置信息以及所述表格对应的脚本程序模板,生成脚本文件。
- 如权利要求8所述的脚本文件生成装置,其特征在于,所述装置还包括:确定模块,用于在检测到标准授权文件的修改指令时,在所述预设目录中确定标准授权文件待修改的位置;处理模块,用于用占位符替换确定的位置,并在确定的位置中添加新的脚本文件生成规则。
- 如权利要求7所述的脚本文件生成装置,其特征在于,所述脚本文件生成装置还包括:调用模块,用于在接收到脚本文件的运行指令时,调用所述表格关联的数据库以运行所述脚本文件,实现对所述脚本文件的测试;输出模块,用于在检测到所述脚本文件有误时,输出提示信息,其中,输出提示信息的方式包括在表格中有误的位置输出,或者弹出提示窗口输出有误的信息。
- 一种脚本文件生成设备,其特征在于,所述脚本文件生成设备包括处理器、以及存储有脚本文件生成的程序的存储器;所述处理器用于执行所述脚本文件生成的程序,以实现以下步骤:接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;在建立的表格中定义配置信息;根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
- 如权利要求11所述的脚本文件生成设备,其特征在于,所述处理器还用于执行所述脚本文件生成程序,以实现在建立的表格中定义配置信息的步骤:在建立的表格中关联数据库;在所述表格中对关联的数据库建立用户信息以及同义词用户信息,以使不同的用户对应有不同的访问权限;及在所述表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹。
- 如权利要求12所述的脚本文件生成设备,其特征在于,所述处理器还用于执行所述脚本文件生成程序,以实现根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件的步骤:在预设目录下存储的标准授权文件中提取脚本文件生成规则;根据提取的脚本文件生成规则、所述表格中定义的配置信息以及所述表格对应的脚本程序模板,生成脚本文件。
- 如权利要求13所述的脚本文件生成设备,其特征在于,所述处理器还用于执行所述脚本文件生成程序,以实现以下步骤:在检测到标准授权文件的修改指令时,在所述预设目录中确定标准授权文件待修改的位置;用占位符替换确定的位置,并在确定的位置中添加新的脚本文件生成规则。
- 如权利要求12所述的脚本文件生成设备,其特征在于,所述根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件的步骤之后,所述处理器还用于执行所述脚本文件生成程序,以实现以下步骤:在接收到脚本文件的运行指令时,调用所述表格关联的数据库以运行所述脚本文件,实现对所述脚本文件的测试;在检测到所述脚本文件有误时,输出提示信息,其中,输出提示信息的方式包括在表格中有误的位置输出,或者弹出提示窗口输出有误的信息。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有脚本文件生成程序,所述脚本文件生成程序被处理器执行,以实现以下步骤:接收到脚本文件的生成指令时,通过预设脚本生成工具在预设界面建立表格;在建立的表格中定义配置信息;根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件。
- 如权利要求16所述的计算机可读存储介质,其特征在于,所述脚本文件生成程序被处理器执行,还实现在建立的表格中定义配置信息的步骤:在建立的表格中关联数据库;在所述表格中对关联的数据库建立用户信息以及同义词用户信息,以使不同的用户对应有不同的访问权限;及在所述表格中创建触发器,以便后续基于创建的所述触发器记录脚本文件的修改痕迹。
- 如权利要求17所述的计算机可读存储介质,其特征在于,所述脚本文件生成程序被处理器执行,还实现根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件的步骤:在预设目录下存储的标准授权文件中提取脚本文件生成规则;根据提取的脚本文件生成规则、所述表格中定义的配置信息以及所述表格对应的脚本程序模板,生成脚本文件。
- 如权利要求18所述的计算机可读存储介质,其特征在于,所述脚本文件生成程序被处理器执行,还实现以下步骤:在检测到标准授权文件的修改指令时,在所述预设目录中确定标准授权文件待修改的位置;用占位符替换确定的位置,并在确定的位置中添加新的脚本文件生成规则。
- 如权利要求17所述的计算机可读存储介质,其特征在于,所述根据所述表格中定义的配置信息,以及所述表格对应的脚本程序模板,生成脚本文件的步骤之后,所述脚本文件生成程序被处理器执行,还实现以下步骤:在接收到脚本文件的运行指令时,调用所述表格关联的数据库以运行所述脚本文件,实现对所述脚本文件的测试;在检测到所述脚本文件有误时,输出提示信息,其中,输出提示信息的方式包括在表格中有误的位置输出,或者弹出提示窗口输出有误的信息。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710243035.1 | 2017-04-13 | ||
| CN201710243035.1A CN107688593A (zh) | 2017-04-13 | 2017-04-13 | 脚本文件生成方法和装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018188342A1 true WO2018188342A1 (zh) | 2018-10-18 |
Family
ID=61152434
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/111881 Ceased WO2018188342A1 (zh) | 2017-04-13 | 2017-11-20 | 脚本文件生成方法、装置、设备和计算机可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107688593A (zh) |
| WO (1) | WO2018188342A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112351104A (zh) * | 2020-11-11 | 2021-02-09 | 光大兴陇信托有限责任公司 | 一种基于脚本引擎的代理服务器功能扩展方法和系统 |
| CN112433705A (zh) * | 2020-11-25 | 2021-03-02 | 平安普惠企业管理有限公司 | 脚本生成方法、装置、电子设备及存储介质 |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109032582A (zh) * | 2018-07-19 | 2018-12-18 | 郑州云海信息技术有限公司 | 一种生成服务器运维脚本的方法及装置 |
| CN110347985B (zh) * | 2019-05-30 | 2023-07-28 | 平安科技(深圳)有限公司 | 表格生成的方法、装置、计算机设备和存储介质 |
| CN110505088B (zh) * | 2019-08-20 | 2021-07-27 | 北京市燃气集团有限责任公司 | 存储授权变更方法和装置 |
| CN111008346A (zh) * | 2019-11-13 | 2020-04-14 | 苏宁云计算有限公司 | 一种数据采集方法及装置 |
| CN114035788A (zh) * | 2021-11-10 | 2022-02-11 | 中国建设银行股份有限公司 | 脚本文件生成方法、装置、设备及存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040254914A1 (en) * | 2003-06-10 | 2004-12-16 | Polizzi Nicholas P. | Script generator for automating system administration operations |
| CN102135990A (zh) * | 2011-03-11 | 2011-07-27 | 北京神舟航天软件技术有限公司 | 基于jsp模板的可自由定义的智能表单系统及生成方法 |
| CN102541730A (zh) * | 2011-12-08 | 2012-07-04 | 北京空间飞行器总体设计部 | 一种航天器测试脚本语义识别与自动生成方法 |
| CN105740368A (zh) * | 2016-01-27 | 2016-07-06 | 浪潮通信信息系统有限公司 | 一种生成报表的方法及装置 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100361127C (zh) * | 2004-11-01 | 2008-01-09 | 华为技术有限公司 | 一种脚本文件自动生成系统及自动生成方法 |
| CN102446090B (zh) * | 2010-10-09 | 2014-01-29 | 金蝶软件(中国)有限公司 | 一种测试脚本的自动生成方法和装置 |
| US10417314B2 (en) * | 2012-06-14 | 2019-09-17 | Open Text Sa Ulc | Systems and methods of a script generation engine |
| CN105279090B (zh) * | 2015-11-17 | 2018-07-03 | 中国建设银行股份有限公司 | 应用于金融领域的测试脚本生成方法和装置 |
| CN106126215B (zh) * | 2016-06-17 | 2019-06-21 | 深圳市麦斯杰网络有限公司 | 业务规则脚本生成方法及装置 |
-
2017
- 2017-04-13 CN CN201710243035.1A patent/CN107688593A/zh active Pending
- 2017-11-20 WO PCT/CN2017/111881 patent/WO2018188342A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040254914A1 (en) * | 2003-06-10 | 2004-12-16 | Polizzi Nicholas P. | Script generator for automating system administration operations |
| CN102135990A (zh) * | 2011-03-11 | 2011-07-27 | 北京神舟航天软件技术有限公司 | 基于jsp模板的可自由定义的智能表单系统及生成方法 |
| CN102541730A (zh) * | 2011-12-08 | 2012-07-04 | 北京空间飞行器总体设计部 | 一种航天器测试脚本语义识别与自动生成方法 |
| CN105740368A (zh) * | 2016-01-27 | 2016-07-06 | 浪潮通信信息系统有限公司 | 一种生成报表的方法及装置 |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112351104A (zh) * | 2020-11-11 | 2021-02-09 | 光大兴陇信托有限责任公司 | 一种基于脚本引擎的代理服务器功能扩展方法和系统 |
| CN112351104B (zh) * | 2020-11-11 | 2021-09-10 | 光大兴陇信托有限责任公司 | 一种基于脚本引擎的代理服务器功能扩展方法和系统 |
| CN112433705A (zh) * | 2020-11-25 | 2021-03-02 | 平安普惠企业管理有限公司 | 脚本生成方法、装置、电子设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107688593A (zh) | 2018-02-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018188342A1 (zh) | 脚本文件生成方法、装置、设备和计算机可读存储介质 | |
| WO2018107610A1 (zh) | 业务数据处理方法、系统、设备及计算机可读存储介质 | |
| WO2018120429A1 (zh) | 一种资源更新的方法、终端、计算机可读存储介质及资源更新设备 | |
| WO2017143692A1 (zh) | 智能电视及其语音控制方法 | |
| WO2018120457A1 (zh) | 数据处理方法、装置、设备及计算机可读存储介质 | |
| WO2014011000A1 (en) | Method and apparatus for controlling application by handwriting image recognition | |
| WO2019024219A1 (zh) | 文档自动生成方法、装置、文档自动生成器及介质 | |
| WO2019104876A1 (zh) | 保险产品的推送方法、系统、终端、客户终端及存储介质 | |
| WO2017148112A1 (zh) | 一种指纹录入方法及终端 | |
| WO2019000800A1 (zh) | 制证方法、装置、设备及计算机可读存储介质 | |
| WO2018082482A1 (zh) | 一种网络共享方法、接入网络方法及系统 | |
| WO2019196213A1 (zh) | 接口测试方法、装置、设备及计算机可读存储介质 | |
| WO2018205545A1 (zh) | 数据生成方法、装置、终端及计算机可读存储介质 | |
| WO2019037396A1 (zh) | 账户清结算方法、装置、设备及存储介质 | |
| WO2018188196A1 (zh) | 一种数据版本控制方法、数据版本控制器、设备及计算机可读存储介质 | |
| WO2017054592A1 (zh) | 一种界面显示的方法及终端 | |
| WO2018149190A1 (zh) | 组件调试方法、装置、设备和计算机可读存储介质 | |
| WO2019169814A1 (zh) | 自动生成中文注释的方法、装置、设备及存储介质 | |
| WO2013127233A1 (zh) | 一种基于手机的按键解锁方法及手机 | |
| WO2017054481A1 (zh) | 一种信息验证和处理方法、装置、以及信息处理系统 | |
| WO2019100531A1 (zh) | 数字签名生成、验证方法及其设备和存储介质 | |
| WO2019114262A1 (zh) | 加载用户界面的方法、智能电视及计算机可读存储介质 | |
| WO2019001087A1 (zh) | 案件理赔方法、装置、服务器及计算机可读存储介质 | |
| WO2019041851A1 (zh) | 家电售后咨询方法、电子设备和计算机可读存储介质 | |
| WO2019000801A1 (zh) | 数据同步方法、装置、设备及计算机可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17905055 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15/01/2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17905055 Country of ref document: EP Kind code of ref document: A1 |