CN115826991A - Software script generation method, system, computer and readable storage medium - Google Patents
Software script generation method, system, computer and readable storage medium Download PDFInfo
- Publication number
- CN115826991A CN115826991A CN202310108631.4A CN202310108631A CN115826991A CN 115826991 A CN115826991 A CN 115826991A CN 202310108631 A CN202310108631 A CN 202310108631A CN 115826991 A CN115826991 A CN 115826991A
- Authority
- CN
- China
- Prior art keywords
- script
- target
- keywords
- several
- chinese
- 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.)
- Granted
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Document Processing Apparatus (AREA)
Abstract
本发明提供了一种软件脚本生成方法、系统、计算机及可读存储介质,该方法包括:获取各个脚本中使用频率最高的若干关键词,并查找出与每一关键词分别对应的目标中文词;建立每一关键词与每一目标中文词分别对应的映射关系,以生成对应的键值对映射池,并基于键值对映射池构建出对应的逻辑转换器;当接收到用户输入的实际中文词时,通过逻辑转换器将实际中文词转换成对应的目标关键词,并根据目标关键词生成对应的目标脚本。通过上述方式能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本。
The invention provides a software script generation method, system, computer and readable storage medium. The method includes: obtaining several keywords with the highest frequency of use in each script, and finding out the target Chinese words corresponding to each keyword ; Establish the corresponding mapping relationship between each keyword and each target Chinese word to generate a corresponding key-value pair mapping pool, and construct a corresponding logic converter based on the key-value pair mapping pool; when receiving the actual input from the user For Chinese words, the actual Chinese words are converted into corresponding target keywords through a logic converter, and corresponding target scripts are generated according to the target keywords. Through the above method, the corresponding script can be automatically generated only by the user inputting the actual Chinese words required without the need for professional staff to arrive at the application site, thereby greatly shortening the cycle of script configuration and reducing the consumption of manpower , which reduces the cost of script configuration.
Description
技术领域technical field
本发明涉及数据处理技术领域,特别涉及一种软件脚本生成方法、系统、计算机及可读存储介质。The invention relates to the technical field of data processing, in particular to a software script generation method, system, computer and readable storage medium.
背景技术Background technique
随着科技的进步以及生产力的快速发展,计算机已经在人们的日常生活中得到普及,并且极大地方便了人们的工作以及生活,对应加快了社会的发展。With the advancement of science and technology and the rapid development of productivity, computers have been popularized in people's daily life, and have greatly facilitated people's work and life, and correspondingly accelerated the development of society.
其中,在现有的计算机领域,脚本(Script)是使用一种特定的描述性语言,并依据一定的格式编写的可执行文件,通过使用脚本能够大幅提升计算机软件的开发效率以及工作效率。Among them, in the existing computer field, a script (Script) is an executable file written in a certain format using a specific descriptive language. By using scripts, the development efficiency and work efficiency of computer software can be greatly improved.
然而,现有技术大部分的软件系统当需要配置额外的脚本时,都需要工作人员抵达软件系统的应用现场进行对应的配置,导致脚本配置的周期较长,同时增加了人力消耗,对应增加了脚本配置的成本。However, when most software systems in the prior art need to configure additional scripts, staff members are required to arrive at the application site of the software system to perform corresponding configurations, resulting in a longer script configuration cycle, increasing manpower consumption, and correspondingly increasing The cost of script configuration.
发明内容Contents of the invention
基于此,本发明的目的是提供一种软件脚本生成方法、系统、计算机及可读存储介质,以解决现有技术大部分的软件系统当需要配置额外的脚本时,都需要工作人员抵达软件系统的应用现场进行对应的配置,导致脚本配置的周期较长,同时增加了人力消耗,对应增加了脚本配置成本的问题。Based on this, the purpose of the present invention is to provide a software script generation method, system, computer and readable storage medium, to solve the problem that most of the software systems in the prior art require staff to arrive at the software system when additional scripts need to be configured. The corresponding configuration is performed on the application site, resulting in a longer cycle of script configuration, and at the same time increasing manpower consumption, corresponding to the problem of increasing the cost of script configuration.
本发明实施例第一方面提出了一种软件脚本生成方法,所述方法包括:The first aspect of the embodiment of the present invention proposes a method for generating a software script, the method comprising:
获取各个脚本中使用频率最高的若干关键词,并查找出与每一所述关键词分别对应的目标中文词,所述关键词为英文词;Obtain several keywords with the highest frequency of use in each script, and find out the target Chinese words corresponding to each of the keywords, and the keywords are English words;
建立每一所述关键词与每一所述目标中文词分别对应的映射关系,以生成对应的键值对映射池,并基于所述键值对映射池构建出对应的逻辑转换器,所述映射关系具有唯一性;Establishing a mapping relationship corresponding to each of the keywords and each of the target Chinese words to generate a corresponding key-value pair mapping pool, and construct a corresponding logic converter based on the key-value pair mapping pool, the The mapping relationship is unique;
当接收到用户输入的实际中文词时,通过所述逻辑转换器将所述实际中文词转换成对应的目标关键词,并根据所述目标关键词生成对应的目标脚本。When the actual Chinese word input by the user is received, the logic converter converts the actual Chinese word into a corresponding target keyword, and generates a corresponding target script according to the target keyword.
本发明的有益效果是:通过获取各个脚本中使用频率最高的若干关键词,并查找出与每一关键词分别对应的目标中文词,其中,关键词为英文词;进一步的,建立每一关键词与每一目标中文词分别对应的映射关系,以生成对应的键值对映射池,并基于键值对映射池构建出对应的逻辑转换器,所述映射关系具有唯一性;在此基础之上,当接收到用户输入的实际中文词时,通过逻辑转换器将实际中文词转换成对应的目标关键词,并根据目标关键词生成对应的目标脚本。通过上述方式能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。The beneficial effects of the present invention are: by obtaining several keywords with the highest frequency of use in each script, and finding out the target Chinese words corresponding to each keyword, wherein the keywords are English words; further, establishing each keyword Words and each target Chinese word corresponding mapping relationship to generate the corresponding key-value pair mapping pool, and based on the key-value pair mapping pool to build a corresponding logical converter, the mapping relationship is unique; on this basis Above, when the actual Chinese word input by the user is received, the actual Chinese word is converted into the corresponding target keyword through the logic converter, and the corresponding target script is generated according to the target keyword. Through the above method, the corresponding script can be automatically generated only by the user inputting the actual Chinese words required without the need for professional staff to arrive at the application site, thereby greatly shortening the cycle of script configuration and reducing the consumption of manpower , which reduces the cost of script configuration and is suitable for wide-scale promotion and use.
优选的,所述获取各个脚本中使用频率最高的若干关键词的步骤包括:Preferably, the step of obtaining the most frequently used keywords in each script includes:
获取各个领域的若干脚本,并逐一检测出若干所述脚本中分别使用的脚本规则,所述脚本规则包括变量规则、条件规则以及循环规则;Obtaining several scripts in various fields, and detecting script rules respectively used in several said scripts one by one, said script rules including variable rules, conditional rules and loop rules;
在所述变量规则、所述条件规则以及所述循环规则中检测出使用频率最高的若干单词,并将使用频率最高的若干所述单词定义为若干所述关键词。Several words with the highest frequency of use are detected from the variable rule, the conditional rule and the loop rule, and the words with the highest frequency of use are defined as the keywords.
优选的,所述建立每一所述关键词与每一所述目标中文词分别对应的映射关系,以生成对应的键值对映射池的步骤包括:Preferably, the step of establishing a corresponding mapping relationship between each of the keywords and each of the target Chinese words to generate a corresponding key-value pair mapping pool includes:
逐一检测出每一所述关键词分别对应的中文含义,并根据所述中文含义在预设中文数据库中分别查找出对应的目标中文词,所述目标中文词具有唯一性;Detecting the Chinese meanings corresponding to each of the keywords one by one, and searching out the corresponding target Chinese words in the preset Chinese database according to the Chinese meanings, and the target Chinese words are unique;
基于预设映射算法建立每一所述关键词与每一所述目标中文词之间的映射关系,并对若干所述关键词进行分类处理,以生成若干类对应的映射表;Establish a mapping relationship between each of the keywords and each of the target Chinese words based on a preset mapping algorithm, and classify several of the keywords to generate a mapping table corresponding to several categories;
整合若干类所述映射表,以生成所述键值对映射池。The mapping tables of several types are integrated to generate the key-value pair mapping pool.
优选的,所述通过所述逻辑转换器将所述实际中文词转换成对应的目标关键词的步骤包括:Preferably, the step of converting the actual Chinese words into corresponding target keywords through the logic converter includes:
当接收到用户输入的所述实际中文词时,检测出所述实际中文词中包含的字符串,并对所述字符串进行分割处理,以将所述字符串拆分成若干对应的字符;When the actual Chinese word input by the user is received, the character string contained in the actual Chinese word is detected, and the character string is segmented to split the character string into several corresponding characters;
通过所述逻辑转换器根据所述键值对映射池将每一所述字符均转换成对应的目标关键词。Each character is converted into a corresponding target keyword by the logic converter according to the key-value pair mapping pool.
优选的,所述通过所述逻辑转换器根据所述键值对映射池将每一所述字符均转换成对应的目标关键词的步骤之后,所述方法还包括:Preferably, after the step of converting each character into a corresponding target keyword through the logic converter according to the key-value pair mapping pool, the method further includes:
当获取到若干所述目标关键词时,对若干所述目标关键词分别进行编码处理,以生成若干对应的代码,并按照预设脚本逻辑对若干所述代码进行分行处理,以生成所述目标脚本。When several target keywords are obtained, encode the target keywords respectively to generate several corresponding codes, and process the codes in rows according to the preset script logic to generate the target script.
优选的,所述按照预设脚本逻辑对若干所述代码进行分行处理,以生成所述目标脚本的步骤包括:Preferably, the step of performing branch processing on several codes according to the preset script logic to generate the target script includes:
根据用户的实际需求构建出对应的脚本逻辑流程图,并根据所述脚本逻辑流程图对若干所述代码进行分行处理;Construct a corresponding script logic flow chart according to the actual needs of the user, and perform branch processing on several of the codes according to the script logic flow chart;
调用与所述逻辑转换器对应的语法装饰器,并基于脚本语法规则通过所述语法装饰器对每行所述代码进行收尾处理,以生成所述目标脚本。Invoking the grammar decorator corresponding to the logic converter, and finishing each line of code through the grammar decorator based on script grammar rules, so as to generate the target script.
优选的,所述方法还包括:Preferably, the method also includes:
建立与用户应用终端的无线通讯连接,并对所述目标脚本进行打包处理,以将打包处理后的目标脚本传输至所述用户应用终端;Establish a wireless communication connection with the user application terminal, and package the target script, so as to transmit the packaged target script to the user application terminal;
基于错误推算法在所述用户应用终端中对所述目标脚本进行耐久性测试,以生成对应的测试结果,并通过等价类测试法判断所述测试结果是否满足预设要求;performing a durability test on the target script in the user application terminal based on an error inference algorithm to generate corresponding test results, and judging whether the test results meet preset requirements through an equivalence class test method;
若判断到所述测试结果满足所述预设要求,则判定所述目标脚本满足预设要求,并将所述目标脚本按照预设格式存储至所述用户应用终端中。If it is determined that the test result meets the preset requirement, then it is determined that the target script meets the preset requirement, and the target script is stored in the user application terminal according to a preset format.
本发明实施例第二方面提出了一种软件脚本生成系统,所述系统包括:The second aspect of the embodiment of the present invention proposes a software script generation system, the system comprising:
获取模块,用于获取各个脚本中使用频率最高的若干关键词,并查找出与每一所述关键词分别对应的目标中文词,所述关键词为英文词;An acquisition module, configured to acquire several keywords with the highest frequency of use in each script, and find out the target Chinese words corresponding to each of the keywords, and the keywords are English words;
映射模块,用于建立每一所述关键词与每一所述目标中文词分别对应的映射关系,以生成对应的键值对映射池,并基于所述键值对映射池构建出对应的逻辑转换器,所述映射关系具有唯一性;The mapping module is used to establish the corresponding mapping relationship between each of the keywords and each of the target Chinese words, so as to generate a corresponding key-value pair mapping pool, and construct corresponding logic based on the key-value pair mapping pool a converter, the mapping relationship is unique;
转换模块,用于当接收到用户输入的实际中文词时,通过所述逻辑转换器将所述实际中文词转换成对应的目标关键词,并根据所述目标关键词生成对应的目标脚本。The conversion module is used for converting the actual Chinese words into corresponding target keywords through the logic converter when receiving the actual Chinese words input by the user, and generating corresponding target scripts according to the target keywords.
其中,上述软件脚本生成系统中,所述获取模块具体用于:Wherein, in the above-mentioned software script generation system, the acquisition module is specifically used for:
获取各个领域的若干脚本,并逐一检测出若干所述脚本中分别使用的脚本规则,所述脚本规则包括变量规则、条件规则以及循环规则;Obtaining several scripts in various fields, and detecting script rules respectively used in several said scripts one by one, said script rules including variable rules, conditional rules and loop rules;
在所述变量规则、所述条件规则以及所述循环规则中检测出使用频率最高的若干单词,并将使用频率最高的若干所述单词定义为若干所述关键词。Several words with the highest frequency of use are detected from the variable rule, the conditional rule and the loop rule, and the words with the highest frequency of use are defined as the keywords.
其中,上述软件脚本生成系统中,所述映射模块具体用于:Wherein, in the above-mentioned software script generating system, the mapping module is specifically used for:
逐一检测出每一所述关键词分别对应的中文含义,并根据所述中文含义在预设中文数据库中分别查找出对应的目标中文词,所述目标中文词具有唯一性;Detecting the Chinese meanings corresponding to each of the keywords one by one, and searching out the corresponding target Chinese words in the preset Chinese database according to the Chinese meanings, and the target Chinese words are unique;
基于预设映射算法建立每一所述关键词与每一所述目标中文词之间的映射关系,并对若干所述关键词进行分类处理,以生成若干类对应的映射表;Establish a mapping relationship between each of the keywords and each of the target Chinese words based on a preset mapping algorithm, and classify several of the keywords to generate a mapping table corresponding to several categories;
整合若干类所述映射表,以生成所述键值对映射池。The mapping tables of several types are integrated to generate the key-value pair mapping pool.
其中,上述软件脚本生成系统中,所述转换模块具体用于:Wherein, in the above-mentioned software script generating system, the conversion module is specifically used for:
当接收到用户输入的所述实际中文词时,检测出所述实际中文词中包含的字符串,并对所述字符串进行分割处理,以将所述字符串拆分成若干对应的字符;When the actual Chinese word input by the user is received, the character string contained in the actual Chinese word is detected, and the character string is segmented to split the character string into several corresponding characters;
通过所述逻辑转换器根据所述键值对映射池将每一所述字符均转换成对应的目标关键词。Each character is converted into a corresponding target keyword by the logic converter according to the key-value pair mapping pool.
其中,上述软件脚本生成系统中,所述软件脚本生成系统还包括编码模块,所述编码模块具体用于:Wherein, in the above-mentioned software script generation system, the software script generation system also includes an encoding module, and the encoding module is specifically used for:
当获取到若干所述目标关键词时,对若干所述目标关键词分别进行编码处理,以生成若干对应的代码,并按照预设脚本逻辑对若干所述代码进行分行处理,以生成所述目标脚本。When several target keywords are obtained, encode the target keywords respectively to generate several corresponding codes, and process the codes in rows according to the preset script logic to generate the target script.
其中,上述软件脚本生成系统中,所述编码模块还具体用于:Wherein, in the above-mentioned software script generating system, the encoding module is also specifically used for:
根据用户的实际需求构建出对应的脚本逻辑流程图,并根据所述脚本逻辑流程图对若干所述代码进行分行处理;Construct a corresponding script logic flow chart according to the actual needs of the user, and perform branch processing on several of the codes according to the script logic flow chart;
调用与所述逻辑转换器对应的语法装饰器,并基于脚本语法规则通过所述语法装饰器对每行所述代码进行收尾处理,以生成所述目标脚本。Invoking the grammar decorator corresponding to the logic converter, and finishing each line of code through the grammar decorator based on script grammar rules, so as to generate the target script.
其中,上述软件脚本生成系统中,所述软件脚本生成系统还包括传输模块,所述传输模块具体用于:Wherein, in the above-mentioned software script generation system, the software script generation system also includes a transmission module, and the transmission module is specifically used for:
建立与用户应用终端的无线通讯连接,并对所述目标脚本进行打包处理,以将打包处理后的目标脚本传输至所述用户应用终端;Establish a wireless communication connection with the user application terminal, and package the target script, so as to transmit the packaged target script to the user application terminal;
基于错误推算法在所述用户应用终端中对所述目标脚本进行耐久性测试,以生成对应的测试结果,并通过等价类测试法判断所述测试结果是否满足预设要求;performing a durability test on the target script in the user application terminal based on an error inference algorithm to generate corresponding test results, and judging whether the test results meet preset requirements through an equivalence class test method;
若判断到所述测试结果满足所述预设要求,则判定所述目标脚本满足预设要求,并将所述目标脚本按照预设格式存储至所述用户应用终端中。If it is determined that the test result meets the preset requirement, then it is determined that the target script meets the preset requirement, and the target script is stored in the user application terminal according to a preset format.
本发明实施例第三方面提出了一种计算机,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上面所述的软件脚本生成方法。The third aspect of the embodiments of the present invention proposes a computer, including a memory, a processor, and a computer program stored in the memory and operable on the processor. When the processor executes the computer program, the following is implemented: The software script generation method described above.
本发明实施例第四方面提出了一种存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上面所述的软件脚本生成方法。The fourth aspect of the embodiment of the present invention provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the method for generating a software script as described above is implemented.
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
附图说明Description of drawings
图1为本发明第一实施例提供的软件脚本生成方法的流程图;Fig. 1 is the flowchart of the software script generation method that the first embodiment of the present invention provides;
图2为本发明第六实施例提供的软件脚本生成系统的结构框图。Fig. 2 is a structural block diagram of a software script generation system provided by a sixth embodiment of the present invention.
如下具体实施方式将结合上述附图进一步说明本发明。The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings.
具体实施方式Detailed ways
为了便于理解本发明,下面将参照相关附图对本发明进行更全面的描述。附图中给出了本发明的若干实施例。但是,本发明可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本发明的公开内容更加透彻全面。In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the associated drawings. Several embodiments of the invention are shown in the drawings. However, the present invention can be embodied in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the present invention will be thorough and complete.
需要说明的是,当元件被称为“固设于”另一个元件,它可以直接在另一个元件上或者也可以存在居中的元件。当一个元件被认为是“连接”另一个元件,它可以是直接连接到另一个元件或者可能同时存在居中元件。本文所使用的术语“垂直的”、“水平的”、“左”、“右”以及类似的表述只是为了说明的目的。It should be noted that when an element is referred to as being “fixed on” another element, it may be directly on the other element or there may be an intervening element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and similar expressions are used herein for purposes of illustration only.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field of the invention. The terms used herein in the description of the present invention are for the purpose of describing specific embodiments only, and are not intended to limit the present invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
现有技术大部分的软件系统当需要配置额外的脚本时,都需要工作人员抵达软件系统的应用现场进行对应的配置,导致脚本配置的周期较长,同时增加了人力消耗,对应增加了脚本配置的成本。When most software systems in the prior art need to configure additional scripts, staff need to arrive at the application site of the software system to perform corresponding configurations, resulting in a longer script configuration cycle and increased manpower consumption, correspondingly increased script configuration the cost of.
请参阅图1,所示为本发明第一实施例提供的软件脚本生成方法,本实施例提供的软件脚本生成方法能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。Please refer to Fig. 1, which shows the software script generation method provided by the first embodiment of the present invention. The software script generation method provided by this embodiment can only need the user to input the required The actual Chinese words can automatically generate the corresponding script, which greatly shortens the cycle of script configuration, reduces the consumption of manpower, and correspondingly reduces the cost of script configuration, which is suitable for large-scale promotion and use.
具体的,本实施例提供的软件脚本生成方法具体包括以下步骤:Specifically, the method for generating a software script provided in this embodiment specifically includes the following steps:
步骤S10,获取各个脚本中使用频率最高的若干关键词,并查找出与每一所述关键词分别对应的目标中文词,所述关键词为英文词;Step S10, obtaining several keywords with the highest frequency of use in each script, and finding out the target Chinese words corresponding to each of the keywords, and the keywords are English words;
具体的,在本实施例中,首先需要说明的是,本实施例提供的软件脚本生成方法具体应用在计算机软件或者应用系统中,并且能够简单、快速的完成上述计算机软件或者应用系统所需要的脚本,以对应提升对计算机软件以及应用系统配置脚本的效率。Specifically, in this embodiment, it should first be explained that the method for generating software scripts provided by this embodiment is specifically applied in computer software or application systems, and can simply and quickly complete the above-mentioned computer software or application systems. Scripts to improve the efficiency of computer software and application system configuration scripts.
因此,在本步骤中,需要说明的是,为了能够同时满足不同的计算机软件以及应用系统的脚本需求,本步骤需要首先获取到各个领域的脚本中所使用的频率最高的若干关键词,在此基础之上,进一步查找出与每个关键词分别对应的目标中文词,其中,需要指出的是,本实施例提供的关键词为英文词,例如本步骤获取到其中一个关键词为“if”,则查找出的与其对应的目标中文词为“如果”。Therefore, in this step, it needs to be explained that in order to meet the script requirements of different computer software and application systems at the same time, this step needs to first obtain several keywords with the highest frequency used in scripts in various fields, here Based on this, the target Chinese words corresponding to each keyword are further searched out, wherein, it should be pointed out that the keywords provided in this embodiment are English words, for example, one of the keywords obtained in this step is "if" , then the corresponding target Chinese word found out is "if".
步骤S20,建立每一所述关键词与每一所述目标中文词分别对应的映射关系,以生成对应的键值对映射池,并基于所述键值对映射池构建出对应的逻辑转换器,所述映射关系具有唯一性;Step S20, establishing a mapping relationship between each of the keywords and each of the target Chinese words to generate a corresponding key-value pair mapping pool, and construct a corresponding logic converter based on the key-value pair mapping pool , the mapping relationship is unique;
进一步的,在本步骤中,需要说明的是,在通过上述步骤获取到若干关键词以及若干对应的目标中文词之后,本步骤会进一步建立当前若干关键词与当前若干目标中文词之间的映射关系,即一一对应的映射关系。例如,“如果”对应“if”,“整数”对应“int”等。Further, in this step, it should be noted that, after obtaining several keywords and several corresponding target Chinese words through the above steps, this step will further establish the mapping between the current several keywords and the current several target Chinese words Relationship, that is, a one-to-one mapping relationship. For example, "if" corresponds to "if", "integer" corresponds to "int", etc.
更进一步的,本步骤会实时根据构建出的映射关系生成对应的键值对映射池,并进一步根据该键值对映射池构建出对应的逻辑转换器,以通过该逻辑转换器完成关键词与中文词之间的转换。Furthermore, this step will generate a corresponding key-value pair mapping pool in real time according to the constructed mapping relationship, and further construct a corresponding logical converter based on the key-value pair mapping pool, so as to complete keyword and Conversion between Chinese words.
步骤S30,当接收到用户输入的实际中文词时,通过所述逻辑转换器将所述实际中文词转换成对应的目标关键词,并根据所述目标关键词生成对应的目标脚本。Step S30, when receiving an actual Chinese word input by the user, convert the actual Chinese word into a corresponding target keyword through the logic converter, and generate a corresponding target script according to the target keyword.
最后,在本步骤中,需要说明的是,当本步骤实时接收到用户输入的实际中文词时,本步骤能够立即通过上述逻辑转换器将实时接收到的实际中文词转换成对应的目标关键词,并进一步根据该目标关键词生成对应的目标脚本。Finally, in this step, it should be noted that when the actual Chinese words input by the user are received in this step in real time, this step can immediately convert the actual Chinese words received in real time into corresponding target keywords through the above logic converter , and further generate a corresponding target script according to the target keyword.
使用时,通过获取各个脚本中使用频率最高的若干关键词,并查找出与每一关键词分别对应的目标中文词,其中,关键词为英文词;进一步的,建立每一关键词与每一目标中文词分别对应的映射关系,以生成对应的键值对映射池,并基于键值对映射池构建出对应的逻辑转换器,所述映射关系具有唯一性;在此基础之上,当接收到用户输入的实际中文词时,通过逻辑转换器将实际中文词转换成对应的目标关键词,并根据目标关键词生成对应的目标脚本。通过上述方式能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。During use, by obtaining several keywords with the highest frequency of use in each script, and find out the target Chinese words corresponding to each keyword, wherein, the keywords are English words; further, establish each keyword and each The mapping relationship corresponding to the target Chinese words to generate a corresponding key-value pair mapping pool, and build a corresponding logical converter based on the key-value pair mapping pool, the mapping relationship is unique; on this basis, when receiving When the actual Chinese words input by the user are received, the actual Chinese words are converted into corresponding target keywords through a logic converter, and corresponding target scripts are generated according to the target keywords. Through the above method, the corresponding script can be automatically generated only by the user inputting the actual Chinese words required without the need for professional staff to arrive at the application site, thereby greatly shortening the cycle of script configuration and reducing the consumption of manpower , which reduces the cost of script configuration and is suitable for wide-scale promotion and use.
需要说明的是,上述的实施过程只是为了说明本申请的可实施性,但这并不代表本申请的软件脚本生成方法只有上述唯一一种实施流程,相反的,只要能够将本申请的软件脚本生成方法实施起来,都可以被纳入本申请的可行实施方案。It should be noted that the above-mentioned implementation process is only to illustrate the implementability of the application, but this does not mean that the software script generation method of the application has only the above-mentioned unique implementation process. On the contrary, as long as the software of the application can The script generation method can be incorporated into the feasible implementation scheme of the present application after implementation.
综上,本发明上述实施例提供的软件脚本生成方法能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。To sum up, the software script generation method provided by the above-mentioned embodiments of the present invention can automatically generate the corresponding script only by the user inputting the actual Chinese words required without the need for professional staff to arrive at the application site, thereby greatly shortening the The cycle of script configuration, while reducing the consumption of manpower, correspondingly reduces the cost of script configuration, and is suitable for large-scale promotion and use.
本发明第二实施例也提供了一种软件脚本生成方法,本实施例提供的软件脚本生成方法与上述第一实施例提供的软件脚本生成方法不同之处在于:The second embodiment of the present invention also provides a method for generating a software script. The method for generating a software script provided in this embodiment is different from the method for generating a software script provided in the first embodiment above in that:
具体的,在本实施例中,需要说明的是,上述获取各个脚本中使用频率最高的若干关键词的步骤包括:Specifically, in this embodiment, it should be noted that the above-mentioned steps of acquiring the most frequently used keywords in each script include:
获取各个领域的若干脚本,并逐一检测出若干所述脚本中分别使用的脚本规则,所述脚本规则包括变量规则、条件规则以及循环规则;Obtaining several scripts in various fields, and detecting script rules respectively used in several said scripts one by one, said script rules including variable rules, conditional rules and loop rules;
在所述变量规则、所述条件规则以及所述循环规则中检测出使用频率最高的若干单词,并将使用频率最高的若干所述单词定义为若干所述关键词。Several words with the highest frequency of use are detected from the variable rule, the conditional rule and the loop rule, and the words with the highest frequency of use are defined as the keywords.
具体的,在本实施例中,需要说明的是,为了能够同时满足不同用户的使用需求,本实施例会实时获取到各个领域的若干脚本,例如获取教育软件中的脚本、游戏软件中的脚本以及视频软件中的脚本等,都在本实施例的保护范围之内。Specifically, in this embodiment, it should be noted that in order to meet the needs of different users at the same time, this embodiment will obtain several scripts in various fields in real time, such as acquiring scripts in educational software, scripts in game software, and Scripts in video software, etc., are all within the scope of protection of this embodiment.
其中,需要指出的是,在各个不同领域脚本中所使用的脚本规则是通用的,即使用通用的脚本规则来构建出不同领域的脚本,因此,在本实施例中,会实时检测获取到的各个领域的脚本中分别使用的脚本规则,具体的,本实施例提供的脚本规则包括变量规则、条件规则以及循环规则。其中,需要指出的是,变量规则:整数(int),小数(float),字符(char),字符串(string),布尔型(boolean),列表(list);条件规则:如果(if),否则(else);循环规则:循环(for)。Among them, it should be pointed out that the script rules used in scripts in different fields are common, that is, scripts in different fields are constructed using common script rules. Therefore, in this embodiment, the acquired Script rules used in scripts in various fields. Specifically, the script rules provided in this embodiment include variable rules, conditional rules, and loop rules. Among them, it should be pointed out that variable rules: integer (int), decimal (float), character (char), character string (string), Boolean (boolean), list (list); conditional rules: if (if), Otherwise (else); loop rules: loop (for).
进一步的,在本实施例中,本实施例会实时在上述获取到的变量规则、条件规则以及循环规则中检测出使用频率最高的若干单词,并最终将使用频率最高的若干单词定义为需要的若干关键词。例如本实施例将“if”以及“else”定义为需要的关键词。Further, in this embodiment, this embodiment will detect the most frequently used words in the variable rules, conditional rules and loop rules obtained above in real time, and finally define the most frequently used words as the required Key words. For example, this embodiment defines "if" and "else" as required keywords.
需要指出的是,本发明第二实施例所提供的方法,其实现原理及产生的一些技术效果和第一实施例相同,为简要描述,本实施例未提及之处,可参考第一实施例提供的相应内容。It should be pointed out that the implementation principle and some technical effects of the method provided by the second embodiment of the present invention are the same as those of the first embodiment. The corresponding content provided by the example.
综上,本发明上述实施例提供的软件脚本生成方法能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。To sum up, the software script generation method provided by the above-mentioned embodiments of the present invention can automatically generate the corresponding script only by the user inputting the actual Chinese words required without the need for professional staff to arrive at the application site, thereby greatly shortening the The cycle of script configuration, while reducing the consumption of manpower, correspondingly reduces the cost of script configuration, and is suitable for large-scale promotion and use.
本发明第三实施例也提供了一种软件脚本生成方法,本实施例提供的软件脚本生成方法与上述第一实施例提供的软件脚本生成方法不同之处在于:The third embodiment of the present invention also provides a method for generating a software script. The method for generating a software script provided in this embodiment is different from the method for generating a software script provided in the first embodiment above in that:
具体的,在本实施例中,需要指出的是,上述建立每一所述关键词与每一所述目标中文词分别对应的映射关系,以生成对应的键值对映射池的步骤包括:Specifically, in this embodiment, it should be pointed out that the above-mentioned steps of establishing a corresponding mapping relationship between each of the keywords and each of the target Chinese words to generate a corresponding key-value pair mapping pool include:
逐一检测出每一所述关键词分别对应的中文含义,并根据所述中文含义在预设中文数据库中分别查找出对应的目标中文词,所述目标中文词具有唯一性;Detecting the Chinese meanings corresponding to each of the keywords one by one, and searching out the corresponding target Chinese words in the preset Chinese database according to the Chinese meanings, and the target Chinese words are unique;
基于预设映射算法建立每一所述关键词与每一所述目标中文词之间的映射关系,并对若干所述关键词进行分类处理,以生成若干类对应的映射表;Establish a mapping relationship between each of the keywords and each of the target Chinese words based on a preset mapping algorithm, and classify several of the keywords to generate a mapping table corresponding to several categories;
整合若干类所述映射表,以生成所述键值对映射池。The mapping tables of several types are integrated to generate the key-value pair mapping pool.
具体的,在本实施例中,需要说明的是,本实施例在实时获取到若干关键词之后,会进一步逐一检测出每个关键词分别对应的中文含义,并立即根据获取到的中文含义在预先设置好的中文数据库中分别查找出对应的目标中文词,具体的,每个目标中文词均具有唯一性。优选的,在本实施例中,例如获取到的关键词为“if”,则检测出当前关键词对应的中文含义可以为“如果”以及“或者”等含义,则本实施例能够在预先设置好的中华词库中查找出与当前含义对应的目标中文词,以进一步建立当前关键词与当前目标中文词之间的映射关系。Specifically, in this embodiment, it should be noted that, after obtaining several keywords in real time, this embodiment will further detect the Chinese meaning corresponding to each keyword one by one, and immediately use the obtained Chinese meaning in the The corresponding target Chinese words are searched out in the pre-set Chinese database, specifically, each target Chinese word is unique. Preferably, in this embodiment, for example, if the acquired keyword is "if", then it is detected that the Chinese meaning corresponding to the current keyword can be "if" and "or", etc., then this embodiment can be set in advance Find the target Chinese word corresponding to the current meaning in a good Chinese thesaurus, so as to further establish the mapping relationship between the current keyword and the current target Chinese word.
进一步的,在本实施例中,本实施例会进一步基于预先设置好的映射算法建立出每个关键词与每个目标中文词之间的映射关系,在此基础之上,对构建好映射关系的关键词进一步进行分类处理,优选的,在本实施例中,将属于变量规则的关键词分为一类,将属于条件规则的关键词分为一类,将属于循环规则的关键词分为一类,并根据每类关键词分别生成对应的映射表,最后只需整合当前若干类映射表就能够生成上述键值对映射池。Further, in this embodiment, this embodiment will further establish a mapping relationship between each keyword and each target Chinese word based on a preset mapping algorithm, and on this basis, construct a good mapping relationship Keywords are further classified. Preferably, in this embodiment, keywords belonging to variable rules are classified into one category, keywords belonging to conditional rules are classified into one category, and keywords belonging to loop rules are divided into one category. Classes, and generate corresponding mapping tables according to each type of keywords, and finally only need to integrate several current class mapping tables to generate the above key-value pair mapping pool.
需要指出的是,本发明第三实施例所提供的方法,其实现原理及产生的一些技术效果和第一实施例相同,为简要描述,本实施例未提及之处,可参考第一实施例提供的相应内容。It should be pointed out that the implementation principle and some technical effects of the method provided by the third embodiment of the present invention are the same as those of the first embodiment. The corresponding content provided by the example.
综上,本发明上述实施例提供的软件脚本生成方法能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。To sum up, the software script generation method provided by the above-mentioned embodiments of the present invention can automatically generate the corresponding script only by the user inputting the actual Chinese words required without the need for professional staff to arrive at the application site, thereby greatly shortening the The cycle of script configuration, while reducing the consumption of manpower, correspondingly reduces the cost of script configuration, and is suitable for large-scale promotion and use.
本发明第四实施例也提供了一种软件脚本生成方法,本实施例提供的软件脚本生成方法与上述第一实施例提供的软件脚本生成方法不同之处在于:The fourth embodiment of the present invention also provides a method for generating a software script. The method for generating a software script provided in this embodiment is different from the method for generating a software script provided in the first embodiment above in that:
具体的,在本实施例中,需要说明的是,上述通过所述逻辑转换器将所述实际中文词转换成对应的目标关键词的步骤包括:Specifically, in this embodiment, it should be noted that the above steps of converting the actual Chinese words into corresponding target keywords through the logic converter include:
当接收到用户输入的所述实际中文词时,检测出所述实际中文词中包含的字符串,并对所述字符串进行分割处理,以将所述字符串拆分成若干对应的字符;When the actual Chinese word input by the user is received, the character string contained in the actual Chinese word is detected, and the character string is segmented to split the character string into several corresponding characters;
通过所述逻辑转换器根据所述键值对映射池将每一所述字符均转换成对应的目标关键词。Each character is converted into a corresponding target keyword by the logic converter according to the key-value pair mapping pool.
具体的,在本实施例中,需要说明的是,当实时接收到用户输入的实际中文词时,本实施例会实时检测当前实际中文词中包含的字符串,并立即对当前字符串进行分割处理,以将当前字符串拆分成若干对应的字符,优选的,本实施例通过空格符对当前字符串进行分割处理。在此基础之上,本实施例会进一步通过上述逻辑转换器根据上述键值对映射池将当前每个字符均转换成对应的目标关键词。Specifically, in this embodiment, it should be noted that when the actual Chinese word input by the user is received in real time, this embodiment will detect the character string contained in the current actual Chinese word in real time, and immediately perform segmentation processing on the current character string , so as to split the current character string into several corresponding characters. Preferably, in this embodiment, the current character string is split by a space character. On this basis, this embodiment further converts each current character into a corresponding target keyword through the above-mentioned logic converter according to the above-mentioned key-value pair mapping pool.
优选的,在本实施例中,例如用户输入的实际中文词为:“整数a=10”,则本实施例会立即将当前实际中文词分割为:“整数 a =10”,以使上述逻辑转换器能够识别出每个字符,并分别对每个字符进行转换处理。Preferably, in this embodiment, for example, the actual Chinese word input by the user is: "integer a=10", then this embodiment will immediately divide the current actual Chinese word into: "integer a=10", so that the above-mentioned logical conversion The processor can recognize each character and convert each character separately.
其中,在本实施例中,需要指出的是,上述通过所述逻辑转换器根据所述键值对映射池将每一所述字符均转换成对应的目标关键词的步骤之后,所述方法还包括:Wherein, in this embodiment, it should be pointed out that, after the above-mentioned step of converting each of the characters into corresponding target keywords through the logic converter according to the key-value pair mapping pool, the method also include:
当获取到若干所述目标关键词时,对若干所述目标关键词分别进行编码处理,以生成若干对应的代码,并按照预设脚本逻辑对若干所述代码进行分行处理,以生成所述目标脚本。When several target keywords are obtained, encode the target keywords respectively to generate several corresponding codes, and process the codes in rows according to the preset script logic to generate the target script.
具体的,本步骤在获取到若干需要的目标关键词之后,会进一步对当前若干目标关键词进行编码处理,即将当前若干目标关键词编码成对应的计算机代码,以使计算机能够识别,在此基础之上,进一步按照预先设置好的脚本逻辑对当前若干实时编码出的代码进行分行处理,以最终生成需要的目标脚本。Specifically, after obtaining several required target keywords in this step, the current several target keywords will be further encoded, that is, the current several target keywords will be encoded into corresponding computer codes so that the computer can recognize them. On top of that, according to the pre-set script logic, the current real-time encoded codes are processed in branches to finally generate the required target script.
进一步的,在本实施例中,还需要指出的是,上述按照预设脚本逻辑对若干所述代码进行分行处理,以生成所述目标脚本的步骤包括:Further, in this embodiment, it should also be pointed out that the above-mentioned step of performing branch processing on several of the codes according to the preset script logic to generate the target script includes:
根据用户的实际需求构建出对应的脚本逻辑流程图,并根据所述脚本逻辑流程图对若干所述代码进行分行处理;Construct a corresponding script logic flow chart according to the actual needs of the user, and perform branch processing on several of the codes according to the script logic flow chart;
调用与所述逻辑转换器对应的语法装饰器,并基于脚本语法规则通过所述语法装饰器对每行所述代码进行收尾处理,以生成所述目标脚本。Invoking the grammar decorator corresponding to the logic converter, and finishing each line of code through the grammar decorator based on script grammar rules, so as to generate the target script.
具体的,本步骤还会实时接收用户输入的脚本需求,并立即根据用户实时输入的实际需求构建出对应的脚本逻辑流程图,以进一步根据该脚本逻辑流程图对当前若干代码进行分行处理,从而能够形成一个初步的脚本。Specifically, this step will also receive the script requirements input by the user in real time, and immediately construct a corresponding script logic flow chart according to the actual demand input by the user in real time, so as to further process several current codes in branches according to the script logic flow chart, thereby Able to form a preliminary script.
在此基础之上,本步骤还会调用与上述逻辑转换器对应的语法装饰器,并进一步基于通用的脚本语法规则通过上述语法装饰器对上述每行代码进行收尾处理,即在每行代码的结尾处均添加一个分号,从而能够最终生成完整的目标脚本。On this basis, this step will also call the grammar decorator corresponding to the above logic converter, and further use the above grammar decorator to finish each line of code based on the common script grammar rules, that is, in each line of code A semicolon is added at the end, so that the complete target script can finally be generated.
优选的,在本实施例中,例如用户实时输入的实际中文词为“整数a=10”,通过上述逻辑转换器输出的结果为:“int a =10”,进一步的,通过上述语法装饰器输出的结果为:“int a =10;”,即生成了一个简单的目标脚本。Preferably, in this embodiment, for example, the actual Chinese word input by the user in real time is "integer a=10", and the result output by the above-mentioned logic converter is: "int a=10", further, through the above-mentioned grammatical decorator The output result is: "int a = 10;", that is, a simple target script is generated.
需要指出的是,本发明第四实施例所提供的方法,其实现原理及产生的一些技术效果和第一实施例相同,为简要描述,本实施例未提及之处,可参考第一实施例提供的相应内容。It should be pointed out that the realization principle and some technical effects of the method provided by the fourth embodiment of the present invention are the same as those of the first embodiment. The corresponding content provided by the example.
综上,本发明上述实施例提供的软件脚本生成方法能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。To sum up, the software script generation method provided by the above-mentioned embodiments of the present invention can automatically generate the corresponding script only by the user inputting the actual Chinese words required without the need for professional staff to arrive at the application site, thereby greatly shortening the The cycle of script configuration, while reducing the consumption of manpower, correspondingly reduces the cost of script configuration, and is suitable for large-scale promotion and use.
本发明第五实施例也提供了一种软件脚本生成方法,本实施例提供的软件脚本生成方法与上述第一实施例提供的软件脚本生成方法不同之处在于:The fifth embodiment of the present invention also provides a method for generating a software script. The method for generating a software script provided in this embodiment is different from the method for generating a software script provided in the first embodiment above in that:
具体的,在本实施例中,需要说明的是,上述方法还包括:Specifically, in this embodiment, it should be noted that the above method also includes:
建立与用户应用终端的无线通讯连接,并对所述目标脚本进行打包处理,以将打包处理后的目标脚本传输至所述用户应用终端;Establish a wireless communication connection with the user application terminal, and package the target script, so as to transmit the packaged target script to the user application terminal;
基于错误推算法在所述用户应用终端中对所述目标脚本进行耐久性测试,以生成对应的测试结果,并通过等价类测试法判断所述测试结果是否满足预设要求;performing a durability test on the target script in the user application terminal based on an error inference algorithm to generate corresponding test results, and judging whether the test results meet preset requirements through an equivalence class test method;
若判断到所述测试结果满足所述预设要求,则判定所述目标脚本满足预设要求,并将所述目标脚本按照预设格式存储至所述用户应用终端中。If it is determined that the test result meets the preset requirement, then it is determined that the target script meets the preset requirement, and the target script is stored in the user application terminal according to a preset format.
具体的,在本实施例中,通过上述方式能够远程将实时生成的目标脚本传输至用户所在的用户应用终端,从而能够省去工作人员前往用户应用现场的过程,对应大幅提升了配置脚本的效率,适用于大范围的推广与使用。Specifically, in this embodiment, the target script generated in real time can be remotely transmitted to the user application terminal where the user is located through the above method, so that the process of staff going to the user application site can be saved, and the efficiency of configuring the script can be greatly improved. , suitable for a wide range of promotion and use.
基于错误推算法在所述用户应用终端中对所述目标脚本进行耐久性测试,以生成对应的测试结果,并通过等价类测试法判断所述测试结果是否满足预设要求;performing a durability test on the target script in the user application terminal based on an error inference algorithm to generate corresponding test results, and judging whether the test results meet preset requirements through an equivalence class test method;
若判断到所述测试结果满足所述预设要求,则判定所述目标脚本满足预设要求,并将所述目标脚本按照预设格式存储至所述用户应用终端中。If it is determined that the test result meets the preset requirement, then it is determined that the target script meets the preset requirement, and the target script is stored in the user application terminal according to a preset format.
需要指出的是,本发明第五实施例所提供的方法,其实现原理及产生的一些技术效果和第一实施例相同,为简要描述,本实施例未提及之处,可参考第一实施例提供的相应内容。It should be pointed out that the realization principle and some technical effects of the method provided by the fifth embodiment of the present invention are the same as those of the first embodiment. The corresponding content provided by the example.
综上,本发明上述实施例提供的软件脚本生成方法能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。To sum up, the software script generation method provided by the above-mentioned embodiments of the present invention can automatically generate the corresponding script only by the user inputting the actual Chinese words required without the need for professional staff to arrive at the application site, thereby greatly shortening the The cycle of script configuration, while reducing the consumption of manpower, correspondingly reduces the cost of script configuration, and is suitable for large-scale promotion and use.
请参阅图2,所示为本发明第六实施例提供的软件脚本生成系统,所述系统包括:Please refer to Fig. 2, which shows the software script generation system provided by the sixth embodiment of the present invention, the system includes:
获取模块12,用于获取各个脚本中使用频率最高的若干关键词,并查找出与每一所述关键词分别对应的目标中文词,所述关键词为英文词;Obtaining
映射模块22,用于建立每一所述关键词与每一所述目标中文词分别对应的映射关系,以生成对应的键值对映射池,并基于所述键值对映射池构建出对应的逻辑转换器,所述映射关系具有唯一性;The
转换模块32,用于当接收到用户输入的实际中文词时,通过所述逻辑转换器将所述实际中文词转换成对应的目标关键词,并根据所述目标关键词生成对应的目标脚本。The
其中,上述软件脚本生成系统中,所述获取模块12具体用于:Wherein, in the above-mentioned software script generation system, the
获取各个领域的若干脚本,并逐一检测出若干所述脚本中分别使用的脚本规则,所述脚本规则包括变量规则、条件规则以及循环规则;Obtaining several scripts in various fields, and detecting script rules respectively used in several said scripts one by one, said script rules including variable rules, conditional rules and loop rules;
在所述变量规则、所述条件规则以及所述循环规则中检测出使用频率最高的若干单词,并将使用频率最高的若干所述单词定义为若干所述关键词。Several words with the highest frequency of use are detected from the variable rule, the conditional rule and the loop rule, and the words with the highest frequency of use are defined as the keywords.
其中,上述软件脚本生成系统中,所述映射模块22具体用于:Wherein, in the above-mentioned software script generating system, the
逐一检测出每一所述关键词分别对应的中文含义,并根据所述中文含义在预设中文数据库中分别查找出对应的目标中文词,所述目标中文词具有唯一性;Detecting the Chinese meanings corresponding to each of the keywords one by one, and searching out the corresponding target Chinese words in the preset Chinese database according to the Chinese meanings, and the target Chinese words are unique;
基于预设映射算法建立每一所述关键词与每一所述目标中文词之间的映射关系,并对若干所述关键词进行分类处理,以生成若干类对应的映射表;Establish a mapping relationship between each of the keywords and each of the target Chinese words based on a preset mapping algorithm, and classify several of the keywords to generate a mapping table corresponding to several categories;
整合若干类所述映射表,以生成所述键值对映射池。The mapping tables of several types are integrated to generate the key-value pair mapping pool.
其中,上述软件脚本生成系统中,所述转换模块32具体用于:Wherein, in the above-mentioned software script generating system, the
当接收到用户输入的所述实际中文词时,检测出所述实际中文词中包含的字符串,并对所述字符串进行分割处理,以将所述字符串拆分成若干对应的字符;When the actual Chinese word input by the user is received, the character string contained in the actual Chinese word is detected, and the character string is segmented to split the character string into several corresponding characters;
通过所述逻辑转换器根据所述键值对映射池将每一所述字符均转换成对应的目标关键词。Each character is converted into a corresponding target keyword by the logic converter according to the key-value pair mapping pool.
其中,上述软件脚本生成系统中,所述软件脚本生成系统还包括编码模块42,所述编码模块42具体用于:Wherein, in the above-mentioned software script generation system, the software script generation system also includes an
当获取到若干所述目标关键词时,对若干所述目标关键词分别进行编码处理,以生成若干对应的代码,并按照预设脚本逻辑对若干所述代码进行分行处理,以生成所述目标脚本。When several target keywords are obtained, encode the target keywords respectively to generate several corresponding codes, and process the codes in rows according to the preset script logic to generate the target script.
其中,上述软件脚本生成系统中,所述编码模块42还具体用于:Wherein, in the above-mentioned software script generating system, the
根据用户的实际需求构建出对应的脚本逻辑流程图,并根据所述脚本逻辑流程图对若干所述代码进行分行处理;Construct a corresponding script logic flow chart according to the actual needs of the user, and perform branch processing on several of the codes according to the script logic flow chart;
调用与所述逻辑转换器对应的语法装饰器,并基于脚本语法规则通过所述语法装饰器对每行所述代码进行收尾处理,以生成所述目标脚本。Invoking the grammar decorator corresponding to the logic converter, and finishing each line of code through the grammar decorator based on script grammar rules, so as to generate the target script.
其中,上述软件脚本生成系统中,所述软件脚本生成系统还包括传输模块52,所述传输模块52具体用于:Wherein, in the above-mentioned software script generation system, the software script generation system also includes a
建立与用户应用终端的无线通讯连接,并对所述目标脚本进行打包处理,以将打包处理后的目标脚本传输至所述用户应用终端;Establish a wireless communication connection with the user application terminal, and package the target script, so as to transmit the packaged target script to the user application terminal;
基于错误推算法在所述用户应用终端中对所述目标脚本进行耐久性测试,以生成对应的测试结果,并通过等价类测试法判断所述测试结果是否满足预设要求;performing a durability test on the target script in the user application terminal based on an error inference algorithm to generate corresponding test results, and judging whether the test results meet preset requirements through an equivalence class test method;
若判断到所述测试结果满足所述预设要求,则判定所述目标脚本满足预设要求,并将所述目标脚本按照预设格式存储至所述用户应用终端中。If it is determined that the test result meets the preset requirement, then it is determined that the target script meets the preset requirement, and the target script is stored in the user application terminal according to a preset format.
本发明第七实施例提供了一种计算机,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述实施例提供的软件脚本生成方法。The seventh embodiment of the present invention provides a computer, including a memory, a processor, and a computer program stored in the memory and operable on the processor. When the processor executes the computer program, the above-mentioned The software script generation method provided by the embodiment.
本发明第八实施例提供了一种存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述实施例提供的软件脚本生成方法。The eighth embodiment of the present invention provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the method for generating a software script as provided in the above embodiment is implemented.
综上所述,本发明上述实施例提供的软件脚本生成方法、系统、计算机及可读存储介质能够在不需要专业的工作人员抵达应用现场的前提下,只需用户输入需要的实际中文词就能够自动生成对应的脚本,从而大幅缩短了脚本配置的周期,同时减少了人力的消耗,对应降低了脚本配置的成本,适用于大范围的推广与使用。In summary, the software script generation method, system, computer, and readable storage medium provided by the above-mentioned embodiments of the present invention can be generated without the need for professional staff to arrive at the application site, and only need the user to input the actual Chinese words required. The corresponding scripts can be automatically generated, thereby greatly shortening the cycle of script configuration, reducing manpower consumption, and correspondingly reducing the cost of script configuration, which is suitable for wide-scale promotion and use.
需要说明的是,上述各个模块可以是功能模块也可以是程序模块,既可以通过软件来实现,也可以通过硬件来实现。对于通过硬件来实现的模块而言,上述各个模块可以位于同一处理器中;或者上述各个模块还可以按照任意组合的形式分别位于不同的处理器中。It should be noted that each of the above-mentioned modules may be a function module or a program module, and may be realized by software or by hardware. For the modules implemented by hardware, the above modules may be located in the same processor; or the above modules may be located in different processors in any combination.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium, For use with an instruction execution system, device, or device (such as a computer-based system, a system including a processor, or other systems that can fetch instructions from an instruction execution system, device, or device and execute instructions), or in conjunction with such an instruction execution system, device or equipment for use. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device.
计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, since the program can be read, for example, by optically scanning the paper or other medium, followed by editing, interpretation or other suitable processing if necessary. The program is processed electronically and stored in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention can be realized by hardware, software, firmware or their combination. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, Programmable Gate Arrays (PGAs), Field Programmable Gate Arrays (FPGAs), etc.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310108631.4A CN115826991B (en) | 2023-02-14 | 2023-02-14 | Software script generation method, system, computer and readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310108631.4A CN115826991B (en) | 2023-02-14 | 2023-02-14 | Software script generation method, system, computer and readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115826991A true CN115826991A (en) | 2023-03-21 |
| CN115826991B CN115826991B (en) | 2023-05-09 |
Family
ID=85521169
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310108631.4A Active CN115826991B (en) | 2023-02-14 | 2023-02-14 | Software script generation method, system, computer and readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115826991B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117217185A (en) * | 2023-11-07 | 2023-12-12 | 江西五十铃汽车有限公司 | Document generation method and system |
Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20050144428A1 (en) * | 2003-12-24 | 2005-06-30 | Rothman Michael A. | System and method to seamlessly enable enhanced management and scripting of a computer system and its add-in devices |
| US7039899B1 (en) * | 2002-03-27 | 2006-05-02 | Oracle International Corporation | System and method for automatically generating a script for testing software |
| CN106959876A (en) * | 2017-03-23 | 2017-07-18 | 广东工业大学 | A kind of ship control device software layout method and system |
| WO2017166626A1 (en) * | 2016-03-30 | 2017-10-05 | 乐视控股(北京)有限公司 | Normalization method, device and electronic equipment |
| CN108182221A (en) * | 2017-12-26 | 2018-06-19 | 珠海市君天电子科技有限公司 | The method and relevant device of data processing |
| CN110737432A (en) * | 2019-09-20 | 2020-01-31 | 黄沙沙 | script aided design method and device based on root list |
| CN110837365A (en) * | 2019-11-08 | 2020-02-25 | 深圳市彬讯科技有限公司 | Script aided design method and device based on root table |
| CN111949255A (en) * | 2020-09-03 | 2020-11-17 | 平安银行股份有限公司 | Script compiling method, device, equipment and storage medium based on voice |
| CN113742559A (en) * | 2021-09-07 | 2021-12-03 | 平安科技(深圳)有限公司 | Keyword detection method and device, electronic equipment, storage medium |
| WO2022033229A1 (en) * | 2020-08-12 | 2022-02-17 | 武汉天喻信息产业股份有限公司 | Software code compiling method and system |
| WO2022111241A1 (en) * | 2020-11-26 | 2022-06-02 | 北京有竹居网络技术有限公司 | Data generation method and apparatus, readable medium and electronic device |
| CN115687136A (en) * | 2022-11-09 | 2023-02-03 | 平安付科技服务有限公司 | Script program processing method, system, computer equipment and medium |
-
2023
- 2023-02-14 CN CN202310108631.4A patent/CN115826991B/en active Active
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7039899B1 (en) * | 2002-03-27 | 2006-05-02 | Oracle International Corporation | System and method for automatically generating a script for testing software |
| US20050144428A1 (en) * | 2003-12-24 | 2005-06-30 | Rothman Michael A. | System and method to seamlessly enable enhanced management and scripting of a computer system and its add-in devices |
| WO2017166626A1 (en) * | 2016-03-30 | 2017-10-05 | 乐视控股(北京)有限公司 | Normalization method, device and electronic equipment |
| CN106959876A (en) * | 2017-03-23 | 2017-07-18 | 广东工业大学 | A kind of ship control device software layout method and system |
| CN108182221A (en) * | 2017-12-26 | 2018-06-19 | 珠海市君天电子科技有限公司 | The method and relevant device of data processing |
| CN110737432A (en) * | 2019-09-20 | 2020-01-31 | 黄沙沙 | script aided design method and device based on root list |
| CN110837365A (en) * | 2019-11-08 | 2020-02-25 | 深圳市彬讯科技有限公司 | Script aided design method and device based on root table |
| WO2022033229A1 (en) * | 2020-08-12 | 2022-02-17 | 武汉天喻信息产业股份有限公司 | Software code compiling method and system |
| CN111949255A (en) * | 2020-09-03 | 2020-11-17 | 平安银行股份有限公司 | Script compiling method, device, equipment and storage medium based on voice |
| WO2022111241A1 (en) * | 2020-11-26 | 2022-06-02 | 北京有竹居网络技术有限公司 | Data generation method and apparatus, readable medium and electronic device |
| CN113742559A (en) * | 2021-09-07 | 2021-12-03 | 平安科技(深圳)有限公司 | Keyword detection method and device, electronic equipment, storage medium |
| CN115687136A (en) * | 2022-11-09 | 2023-02-03 | 平安付科技服务有限公司 | Script program processing method, system, computer equipment and medium |
Non-Patent Citations (1)
| Title |
|---|
| 符永铨等: ""网络行为仿真综述"" * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117217185A (en) * | 2023-11-07 | 2023-12-12 | 江西五十铃汽车有限公司 | Document generation method and system |
| CN117217185B (en) * | 2023-11-07 | 2024-03-01 | 江西五十铃汽车有限公司 | Document generation method and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115826991B (en) | 2023-05-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113553414B (en) | Intelligent dialogue method, device, electronic equipment and storage medium | |
| CN111563385B (en) | Semantic processing method, semantic processing device, electronic equipment and medium | |
| US11169912B2 (en) | Entity and relationship joint extraction method oriented to software bug knowledge | |
| CN111666372B (en) | Method, device, electronic equipment and readable storage medium for analyzing query word query | |
| CN114996294B (en) | Reply generation method, electronic device and computer storage medium | |
| CN114281968A (en) | A model training and corpus generation method, device, equipment and storage medium | |
| CN114579605A (en) | Form question and answer data processing method, electronic device and computer storage medium | |
| US11625630B2 (en) | Identifying intent in dialog data through variant assessment | |
| WO2025246833A1 (en) | Metric acquisition method and apparatus, electronic device and computer readable storage medium | |
| CN115826991B (en) | Software script generation method, system, computer and readable storage medium | |
| CN111475635A (en) | Semantic completion method and device and electronic equipment | |
| CN109002500A (en) | Talk with generation method, device, equipment and computer-readable medium | |
| CN112149266A (en) | Method, device, equipment and storage medium for determining network model quantization strategy | |
| CN113761905B (en) | A method and device for constructing a domain modeling vocabulary | |
| CN117455416B (en) | Data analysis method and system applied to building project management | |
| CN112925889A (en) | Natural language processing method, device, electronic equipment and storage medium | |
| CN118626626A (en) | Information processing method, device, equipment, storage medium and computer program product | |
| CN118467982A (en) | Model processing method, device, computer readable storage medium and electronic equipment | |
| CN114281669B (en) | Application reinforcement detection method, device, readable medium and electronic device | |
| CN115048913A (en) | Command processing method and device and electronic equipment | |
| CN115757777A (en) | Artificial intelligence-based multi-task model training method, device, equipment and medium | |
| US20220036880A1 (en) | Method for training a linguistic model and electronic device | |
| CN115358227A (en) | Open domain relation joint extraction method and system based on phrase enhancement | |
| CN115563121A (en) | Processing method, device and storage medium for converting text to SQL statement | |
| CN119760636B (en) | Large model-based text-to-text graph method, device, 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CB03 | Change of inventor or designer information | ||
| CB03 | Change of inventor or designer information |
Inventor after: Chen Rui Inventor after: He Changhai Inventor after: Zeng Zhongan Inventor after: Fan Haidong Inventor after: Ye Kai Inventor after: Ding Chuan Inventor after: Lu Bingqing Inventor before: Chen Rui Inventor before: Ji Zhengrong Inventor before: He Changhai Inventor before: Zeng Zhongan Inventor before: Fan Haidong Inventor before: Ye Kai Inventor before: Ding Chuan Inventor before: Lu Bingqing |
|
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20251119 Address after: 330000 Jiangxi Province Nanchang City Honggutan District Dizihu Avenue 555 Shiao Building B Block 519 Room Patentee after: Jiangxi Zhongxu Juchuang Enterprise Consulting Co.,Ltd. Country or region after: China Address before: 330000 Jiangxi Province Nanchang City Qingyunpu District Changnan Industrial Park Changnan Garden Fifth Road No. 5 Building 5430 Room (within the Jiangxi Qingyunpu New Economy Industry Agglomeration Area) Patentee before: Jiangxi Mandala Software Co.,Ltd. Country or region before: China |
