CN115826991A - Software script generation method, system, computer and readable storage medium - Google Patents

Software script generation method, system, computer and readable storage medium Download PDF

Info

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
mapping
keyword
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
Application number
CN202310108631.4A
Other languages
Chinese (zh)
Other versions
CN115826991B (en
Inventor
陈锐
纪峥嵘
何长海
曾忠安
樊海东
叶凯
丁川
鲁冰青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Mandala Software Co ltd
Original Assignee
Jiangxi Mandala Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi Mandala Software Co ltd filed Critical Jiangxi Mandala Software Co ltd
Priority to CN202310108631.4A priority Critical patent/CN115826991B/en
Publication of CN115826991A publication Critical patent/CN115826991A/en
Application granted granted Critical
Publication of CN115826991B publication Critical patent/CN115826991B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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, a system, a computer and a readable storage medium, wherein the method comprises the following steps: acquiring a plurality of keywords with the highest use frequency in each script, and searching out target Chinese words corresponding to each keyword; establishing mapping relations respectively corresponding to each keyword and each target Chinese word to generate corresponding key value pair mapping pools, and constructing corresponding logic converters based on the key value pair mapping pools; when receiving the actual Chinese words input by the user, converting the actual Chinese words into corresponding target keywords through the logic converter, and generating corresponding target scripts according to the target keywords. By means of the method, on the premise that no professional staff arrives at the application site, the corresponding script can be automatically generated only by inputting the required actual Chinese words by the user, so that the script configuration period is greatly shortened, meanwhile, the labor consumption is reduced, and the script configuration cost is correspondingly reduced.

Description

Software script generation method, system, computer and readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a software script generation method, system, computer, and readable storage medium.
Background
With the progress of science and technology and the rapid development of productivity, computers have been popularized in people's daily life, and great convenience is brought to people's work and life, and social development is accelerated correspondingly.
In the existing computer field, a Script (Script) is an executable file written according to a certain format and using the Script can greatly improve the development efficiency and the working efficiency of computer software.
However, in most software systems in the prior art, when additional scripts need to be configured, a worker needs to arrive at an application site of the software system to perform corresponding configuration, which results in a longer script configuration period, increased manpower consumption, and correspondingly increased script configuration cost.
Disclosure of Invention
Based on this, the present invention provides a software script generating method, a system, a computer and a readable storage medium, so as to solve the problems that in most software systems in the prior art, when additional scripts need to be configured, a worker needs to arrive at an application site of the software system to perform corresponding configuration, which results in a long script configuration period, and at the same time, human consumption is increased, and the script configuration cost is correspondingly increased.
The first aspect of the embodiments of the present invention provides a method for generating a software script, where the method includes:
acquiring a plurality of keywords with the highest use frequency in each script, and finding out target Chinese words corresponding to each keyword respectively, wherein the keywords are English words;
establishing mapping relations respectively corresponding to each keyword and each target Chinese word to generate corresponding key value pair mapping pools, and constructing corresponding logic converters based on the key value pair mapping pools, wherein the mapping relations have uniqueness;
when receiving an actual Chinese word input by a user, converting the actual Chinese word into a corresponding target keyword through the logic converter, and generating a corresponding target script according to the target keyword.
The invention has the beneficial effects that: the method comprises the steps of obtaining a plurality of keywords with the highest use frequency in each script, and finding out target Chinese words corresponding to each keyword respectively, wherein the keywords are English words; further, establishing mapping relations respectively corresponding to each keyword and each target Chinese word to generate corresponding key value pair mapping pools, and establishing corresponding logic converters based on the key value pair mapping pools, wherein the mapping relations have uniqueness; on the basis, when the actual Chinese words input by the user are received, the actual Chinese words are converted into corresponding target keywords through the logic converter, and corresponding target scripts are generated according to the target keywords. By means of the method, on the premise that no professional staff arrives at the application site, the corresponding script can be automatically generated only by inputting the required actual Chinese words by the user, so that the script configuration period is greatly shortened, manpower consumption is reduced, the script configuration cost is correspondingly reduced, and the method is suitable for large-scale popularization and use.
Preferably, the step of obtaining the keywords with the highest frequency of use in each script includes:
acquiring a plurality of scripts of each field, and detecting script rules used in the scripts one by one, wherein the script rules comprise variable rules, condition rules and cycle rules;
detecting a plurality of words with highest usage frequency in the variable rule, the condition rule and the circulation rule, and defining the plurality of words with highest usage frequency as a plurality of keywords.
Preferably, the step of establishing a mapping relationship between each keyword and each target Chinese word to generate a corresponding key-value pair mapping pool includes:
detecting the Chinese meaning corresponding to each keyword one by one, and respectively finding out the corresponding target Chinese words in a preset Chinese database according to the Chinese meaning, wherein the target Chinese words have uniqueness;
establishing a mapping relation between each keyword and each target Chinese word based on a preset mapping algorithm, and classifying a plurality of keywords to generate a plurality of classes of corresponding mapping tables;
and integrating a plurality of classes of the mapping tables to generate the key-value pair mapping pool.
Preferably, the step of converting the actual chinese word into the corresponding target keyword by the logic converter includes:
when the actual Chinese words input by a user are received, detecting character strings contained in the actual Chinese words, and segmenting the character strings to split the character strings into a plurality of corresponding characters;
and converting each character into a corresponding target keyword through the logic converter according to the key-value pair mapping pool.
Preferably, after the step of converting, by the logic converter, each of the characters into the corresponding target keyword according to the key-value pair mapping pool, the method further includes:
when a plurality of target keywords are obtained, the target keywords are respectively subjected to coding processing to generate a plurality of corresponding codes, and the codes are subjected to line division processing according to preset script logic to generate the target script.
Preferably, the step of performing line splitting processing on the plurality of codes according to a preset script logic to generate the target script includes:
constructing a corresponding script logic flow chart according to the actual requirements of a user, and performing branch processing on a plurality of codes according to the script logic flow chart;
and calling a grammar decorator corresponding to the logic converter, and performing ending processing on each line of the codes through the grammar decorator based on script grammar rules to generate the target script.
Preferably, the method further comprises:
establishing wireless communication connection with a user application terminal, and packaging the target script to transmit the packaged target script to the user application terminal;
performing durability test on the target script in the user application terminal based on an error deduction algorithm to generate a corresponding test result, and judging whether the test result meets a preset requirement or not through an equivalence class test method;
and if the test result meets the preset requirement, judging that the target script meets the preset requirement, and storing the target script into the user application terminal according to a preset format.
A second aspect of the embodiments of the present invention provides a software script generation system, where the system includes:
the acquisition module is used for acquiring a plurality of keywords with the highest use frequency in each script and finding out target Chinese words corresponding to each keyword, wherein the keywords are English words;
the mapping module is used for establishing a mapping relation between each keyword and each target Chinese word to generate a corresponding key value pair mapping pool, and establishing a corresponding logic converter based on the key value pair mapping pool, wherein the mapping relation has uniqueness;
and the conversion module is used for converting the actual Chinese words into corresponding target keywords through the logic converter when the actual Chinese words input by a user are received, and generating corresponding target scripts according to the target keywords.
In the software script generation system, the obtaining module is specifically configured to:
acquiring a plurality of scripts of each field, and detecting script rules used in the scripts one by one, wherein the script rules comprise variable rules, condition rules and cycle rules;
detecting words with highest use frequency in the variable rule, the condition rule and the cycle rule, and defining the words with highest use frequency as the keywords.
In the software script generation system, the mapping module is specifically configured to:
detecting Chinese meanings corresponding to the key words one by one, and finding out corresponding target Chinese words in a preset Chinese database according to the Chinese meanings, wherein the target Chinese words have uniqueness;
establishing a mapping relation between each keyword and each target Chinese word based on a preset mapping algorithm, and classifying a plurality of keywords to generate a plurality of classes of corresponding mapping tables;
and integrating a plurality of classes of the mapping tables to generate the key-value pair mapping pool.
In the software script generation system, the conversion module is specifically configured to:
when the actual Chinese words input by a user are received, detecting character strings contained in the actual Chinese words, and segmenting the character strings to split the character strings into a plurality of corresponding characters;
and converting each character into a corresponding target keyword through the logic converter according to the key-value pair mapping pool.
In the software script generation system, the software script generation system further includes a coding module, where the coding module is specifically configured to:
when a plurality of target keywords are obtained, the target keywords are respectively subjected to coding processing to generate a plurality of corresponding codes, and the codes are subjected to line division processing according to preset script logic to generate the target script.
In the software script generation system, the encoding module is further specifically configured to:
constructing a corresponding script logic flow chart according to the actual requirements of a user, and performing branch processing on a plurality of codes according to the script logic flow chart;
and calling a grammar decorator corresponding to the logic converter, and performing ending processing on each line of the codes through the grammar decorator based on script grammar rules to generate the target script.
In the software script generation system, the software script generation system further includes a transmission module, and the transmission module is specifically configured to:
establishing wireless communication connection with a user application terminal, and packaging the target script to transmit the packaged target script to the user application terminal;
performing durability test on the target script in the user application terminal based on an error deduction algorithm to generate a corresponding test result, and judging whether the test result meets a preset requirement or not by an equivalence class test method;
and if the test result meets the preset requirement, judging that the target script meets the preset requirement, and storing the target script into the user application terminal according to a preset format.
A third aspect of the embodiments of the present invention provides a computer, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the software script generation method as described above when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a storage medium on which a computer program is stored, the program, when executed by a processor, implementing the software script generation method as described above.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flowchart of a software script generation method according to a first embodiment of the present invention;
fig. 2 is a block diagram of a software script generation system according to a sixth embodiment of the present invention.
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. 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 the like as used herein are for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In the prior art, when additional scripts need to be configured in most software systems, workers need to arrive at an application site of the software systems to perform corresponding configuration, so that the script configuration period is long, the labor consumption is increased, and the script configuration cost is correspondingly increased.
Referring to fig. 1, a software script generation method according to a first embodiment of the present invention is shown, and the software script generation method according to this embodiment can automatically generate a corresponding script only by inputting a required actual Chinese word by a user on the premise that a professional worker does not arrive at an application site, so that a script configuration period is greatly shortened, manpower consumption is reduced, a script configuration cost is correspondingly reduced, and the method is suitable for wide popularization and use.
Specifically, the software script generation method provided in this embodiment specifically includes the following steps:
step S10, obtaining a plurality of keywords with the highest use frequency in each script, and finding out target Chinese words corresponding to each keyword respectively, wherein the keywords are English words;
specifically, in this embodiment, it should be noted that, the software script generating method provided in this embodiment is specifically applied to computer software or an application system, and can simply and quickly complete a script required by the computer software or the application system, so as to correspondingly improve efficiency of configuring the script for the computer software and the application system.
Therefore, in this step, it should be noted that, in order to simultaneously meet the script requirements of different computer software and application systems, in this step, it is necessary to first obtain a plurality of keywords with the highest frequency used in scripts in various fields, and further find out the target chinese word corresponding to each keyword on the basis of the keywords, where it is noted that the keywords provided in this embodiment are english words, for example, if one of the keywords obtained in this step is "if", then the target chinese word corresponding to the found keyword is "if".
Step S20, establishing mapping relations respectively corresponding to each keyword and each target Chinese word to generate corresponding key value pair mapping pools, and establishing corresponding logic converters based on the key value pair mapping pools, wherein the mapping relations have uniqueness;
further, in this step, it should be noted that, after the plurality of keywords and the plurality of corresponding target chinese words are obtained in the above steps, a mapping relationship between the plurality of current keywords and the plurality of current target chinese words, that is, a one-to-one mapping relationship, is further established in this step. For example, "if" corresponds to "if", "integer" corresponds to "int", etc.
Furthermore, in this step, a corresponding key-value pair mapping pool is generated in real time according to the constructed mapping relationship, and a corresponding logic converter is further constructed according to the key-value pair mapping pool, so that the conversion between the keyword and the Chinese word is completed through the logic converter.
And step S30, when receiving the actual Chinese words input by the user, converting the actual Chinese words into corresponding target keywords through the logic converter, and generating corresponding target scripts according to the target keywords.
Finally, in this step, it should be noted that, when the actual chinese word input by the user is received in real time in this step, this step can immediately convert the actual chinese word received in real time into the corresponding target keyword through the logic converter, and further generate the corresponding target script according to the target keyword.
When the script is used, a plurality of keywords with the highest use frequency in each script are obtained, and target Chinese words corresponding to each keyword are found out, wherein the keywords are English words; further, establishing a mapping relation corresponding to each keyword and each target Chinese word respectively to generate a corresponding key value pair mapping pool, and establishing a corresponding logic converter based on the key value pair mapping pool, wherein the mapping relation has uniqueness; on the basis, when the actual Chinese words input by the user are received, the actual Chinese words are converted into corresponding target keywords through the logic converter, and corresponding target scripts are generated according to the target keywords. By means of the method, on the premise that no professional staff arrives at an application site, the corresponding script can be automatically generated only by inputting the required actual Chinese words by the user, so that the script configuration period is greatly shortened, meanwhile, the labor consumption is reduced, the script configuration cost is correspondingly reduced, and the method and the device are suitable for large-scale popularization and use.
It should be noted that the above implementation procedures are only for illustrating the applicability of the present application, but this does not represent that the software script generation method of the present application has only the above-mentioned one implementation procedure, and on the contrary, the software script generation method of the present application can be incorporated into the feasible embodiments of the present application as long as the software script generation method of the present application can be implemented.
In summary, the software script generating method provided by the above embodiment of the present invention can automatically generate the corresponding script only by inputting the required actual chinese word by the user on the premise that no professional staff arrives at the application site, thereby greatly shortening the script configuration period, reducing the manpower consumption, correspondingly reducing the script configuration cost, and being suitable for wide popularization and use.
A second embodiment of the present invention also provides a software script generating method, and the software script generating method provided in this embodiment is different from the software script generating method provided in the first embodiment in that:
specifically, in this embodiment, it should be noted that the step of acquiring the keywords with the highest frequency of use in each script includes:
acquiring a plurality of scripts of each field, and detecting script rules used in the scripts one by one, wherein the script rules comprise variable rules, condition rules and cycle rules;
detecting words with highest use frequency in the variable rule, the condition rule and the cycle rule, and defining the words with highest use frequency as the keywords.
Specifically, in this embodiment, it should be noted that, in order to simultaneously meet the use requirements of different users, the embodiment obtains a plurality of scripts in various fields in real time, for example, obtains scripts in education software, scripts in game software, and scripts in video software, and the like, which are within the protection scope of this embodiment.
It should be noted that the script rules used in the scripts in different fields are universal, that is, the scripts in different fields are constructed by using the universal script rules, so in this embodiment, the script rules respectively used in the obtained scripts in each field are detected in real time, and specifically, the script rules provided in this embodiment include a variable rule, a condition rule, and a loop rule. Wherein, it should be noted that the variable rule: integer (int), decimal (float), character (char), string (string), boolean (boolean), list (list); condition rules: if (if), otherwise (else); and (3) circulation rules: and (f) circulation (for).
Further, in this embodiment, the words with the highest usage frequency are detected in the variable rule, the condition rule and the circulation rule obtained in real time, and finally the words with the highest usage frequency are defined as the required keywords. For example, the present embodiment defines "if" and "else" as the required keywords.
It should be noted that, the method provided by the second embodiment of the present invention, which implements the same principle and produces some technical effects as the first embodiment, may refer to the corresponding contents provided by the first embodiment for the sake of brief description, where this embodiment is not mentioned.
In summary, the software script generating method provided by the above embodiment of the present invention can automatically generate the corresponding script only by inputting the required actual chinese word by the user on the premise that no professional staff arrives at the application site, thereby greatly shortening the script configuration period, reducing the manpower consumption, correspondingly reducing the script configuration cost, and being suitable for wide popularization and use.
A third embodiment of the present invention also provides a software script generating method, and the software script generating method provided in this embodiment is different from the software script generating method provided in the first embodiment in that:
specifically, in this embodiment, it should be noted that the step of establishing a mapping relationship corresponding to each keyword and each target Chinese word respectively to generate a corresponding key-value pair mapping pool includes:
detecting Chinese meanings corresponding to the key words one by one, and finding out corresponding target Chinese words in a preset Chinese database according to the Chinese meanings, wherein the target Chinese words have uniqueness;
establishing a mapping relation between each keyword and each target Chinese word based on a preset mapping algorithm, and classifying a plurality of keywords to generate a plurality of classes of corresponding mapping tables;
and integrating a plurality of classes of the mapping tables to generate the key-value pair mapping pool.
Specifically, in this embodiment, it should be noted that, after a plurality of keywords are obtained in real time, the corresponding chinese meanings of each keyword are further detected one by one, and corresponding target chinese words are immediately found in a preset chinese database according to the obtained chinese meanings, specifically, each target chinese word has uniqueness. Preferably, in this embodiment, for example, if the obtained keyword is "if", it is detected that the chinese meaning corresponding to the current keyword may be "if" and "or" and the like, and then the embodiment can find out the target chinese word corresponding to the current meaning from a preset chinese lexicon, so as to further establish a mapping relationship between the current keyword and the current target chinese word.
Further, in this embodiment, the mapping relationship between each keyword and each target Chinese word is further established based on a preset mapping algorithm, and based on this, the keywords for which the mapping relationship is established are further classified, preferably, in this embodiment, the keywords belonging to the variable rule are classified into one type, the keywords belonging to the condition rule are classified into one type, the keywords belonging to the circulation rule are classified into one type, corresponding mapping tables are respectively generated according to each type of keywords, and finally, the key-value pair mapping pool can be generated by only integrating a plurality of types of current mapping tables.
It should be noted that, the method provided by the third embodiment of the present invention, which implements the same principle and produces some technical effects as the first embodiment, may refer to the corresponding contents provided by the first embodiment for the sake of brief description, where this embodiment is not mentioned.
In summary, the software script generating method provided by the above embodiment of the present invention can automatically generate the corresponding script only by inputting the required actual chinese word by the user on the premise that no professional staff arrives at the application site, thereby greatly shortening the script configuration period, reducing the manpower consumption, correspondingly reducing the script configuration cost, and being suitable for wide popularization and use.
A fourth embodiment of the present invention also provides a software script generating method, and the software script generating method provided in this embodiment is different from the software script generating method provided in the first embodiment in that:
specifically, in this embodiment, it should be noted that the step of converting the actual chinese word into the corresponding target keyword through the logic converter includes:
when the actual Chinese words input by a user are received, detecting character strings contained in the actual Chinese words, and segmenting the character strings to split the character strings into a plurality of corresponding characters;
and converting each character into a corresponding target keyword through the logic converter according to the key-value pair mapping pool.
Specifically, in this embodiment, it should be noted that, when an actual chinese word input by a user is received in real time, this embodiment detects a character string included in the current actual chinese word in real time, and immediately performs a segmentation process on the current character string to split the current character string into a plurality of corresponding characters, and preferably, this embodiment performs a segmentation process on the current character string through a space character. On this basis, the present embodiment further converts each current character into a corresponding target keyword through the logic converter according to the key-value pair mapping pool.
Preferably, in this embodiment, for example, the actual chinese words input by the user are: "integer a =10", the present embodiment immediately divides the current actual chinese word into: the "integer a =10" enables the above-described logic converter to recognize each character and perform conversion processing for each character, respectively.
In this embodiment, it should be noted that, after the step of converting each character into the corresponding target keyword through the logic converter according to the key-value pair mapping pool, the method further includes:
when a plurality of target keywords are obtained, the target keywords are respectively subjected to coding processing to generate a plurality of corresponding codes, and the codes are subjected to line division processing according to preset script logic to generate the target script.
Specifically, after the target keywords are obtained, the target keywords are further encoded, that is, the target keywords are encoded into corresponding computer codes to be identified by the computer, and then the real-time encoded codes are further processed according to preset script logic to finally generate the required target script.
Further, in this embodiment, it should be further noted that the step of performing line splitting processing on a plurality of codes according to a preset script logic to generate the target script includes:
constructing a corresponding script logic flow chart according to the actual requirements of a user, and performing branch processing on a plurality of codes according to the script logic flow chart;
and calling a grammar decorator corresponding to the logic converter, and performing ending processing on each line of the codes through the grammar decorator based on script grammar rules to generate the target script.
Specifically, the step also receives the script requirement input by the user in real time, and immediately constructs a corresponding script logic flow chart according to the actual requirement input by the user in real time, so as to further perform branch processing on a plurality of current codes according to the script logic flow chart, thereby forming a preliminary script.
On the basis, the step also calls a grammar decorator corresponding to the logic converter, and further carries out ending processing on each line of codes through the grammar decorator based on the general script grammar rule, namely, a semicolon is added at the end of each line of codes, so that a complete target script can be finally generated.
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 logic converter is: "int a =10", and further, the result output by the above-mentioned grammar decorator is: "int a =10; ", i.e., a simple target script is generated.
It should be noted that, the method provided by the fourth embodiment of the present invention, which implements the same principle and produces some technical effects as the first embodiment, can refer to the corresponding contents provided by the first embodiment for the sake of brief description, where this embodiment is not mentioned.
In summary, the software script generating method provided by the above embodiment of the present invention can automatically generate the corresponding script only by inputting the required actual chinese word by the user on the premise that no professional staff arrives at the application site, thereby greatly shortening the script configuration period, reducing the manpower consumption, correspondingly reducing the script configuration cost, and being suitable for wide popularization and use.
A fifth embodiment of the present invention also provides a software script generating method, where the software script generating method provided in this embodiment is different from the software script generating method provided in the first embodiment in that:
specifically, in this embodiment, it should be noted that the method further includes:
establishing wireless communication connection with a user application terminal, and packaging the target script to transmit the packaged target script to the user application terminal;
performing durability test on the target script in the user application terminal based on an error deduction algorithm to generate a corresponding test result, and judging whether the test result meets a preset requirement or not through an equivalence class test method;
and if the test result meets the preset requirement, judging that the target script meets the preset requirement, and storing the target script into 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 in the above manner, so that the process that a worker goes to the user application site can be omitted, the efficiency of configuring the script is correspondingly and greatly improved, and the method and the device are suitable for large-scale popularization and use.
Performing durability test on the target script in the user application terminal based on an error deduction algorithm to generate a corresponding test result, and judging whether the test result meets a preset requirement or not by an equivalence class test method;
and if the test result meets the preset requirement, judging that the target script meets the preset requirement, and storing the target script into the user application terminal according to a preset format.
It should be noted that, the method provided by the fifth embodiment of the present invention, which implements the same principle and produces some technical effects as the first embodiment, may refer to the corresponding contents provided by the first embodiment for the sake of brief description, where this embodiment is not mentioned.
In summary, the software script generating method provided by the above embodiment of the present invention can automatically generate the corresponding script only by inputting the required actual chinese word by the user on the premise that no professional staff arrives at the application site, thereby greatly shortening the script configuration period, reducing the manpower consumption, correspondingly reducing the script configuration cost, and being suitable for wide popularization and use.
Referring to fig. 2, a software script generating system according to a sixth embodiment of the present invention is shown, where the system includes:
an obtaining module 12, configured to obtain a plurality of keywords with the highest frequency of use in each script, and find out a target chinese word corresponding to each keyword, where the keywords are english words;
the mapping module 22 is configured to establish a mapping relationship corresponding to each keyword and each target Chinese word, so as to generate a corresponding key-value pair mapping pool, and establish a corresponding logic converter based on the key-value pair mapping pool, where the mapping relationship has uniqueness;
the conversion module 32 is configured to, when an actual Chinese word input by a user is received, 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.
In the software script generating system, the obtaining module 12 is specifically configured to:
acquiring a plurality of scripts of each field, and detecting script rules used in the plurality of scripts one by one, wherein the script rules comprise variable rules, condition rules and cycle rules;
detecting words with highest use frequency in the variable rule, the condition rule and the cycle rule, and defining the words with highest use frequency as the keywords.
In the software script generating system, the mapping module 22 is specifically configured to:
detecting Chinese meanings corresponding to the key words one by one, and finding out corresponding target Chinese words in a preset Chinese database according to the Chinese meanings, wherein the target Chinese words have uniqueness;
establishing a mapping relation between each keyword and each target Chinese word based on a preset mapping algorithm, and classifying a plurality of keywords to generate a plurality of classes of corresponding mapping tables;
and integrating a plurality of types of mapping tables to generate the key-value pair mapping pool.
In the software script generating system, the conversion module 32 is specifically configured to:
when the actual Chinese words input by a user are received, detecting character strings contained in the actual Chinese words, and segmenting the character strings to split the character strings into a plurality of corresponding characters;
and converting each character into a corresponding target keyword through the logic converter according to the key-value pair mapping pool.
In the software script generating system, the software script generating system further includes an encoding module 42, where the encoding module 42 is specifically configured to:
when a plurality of target keywords are obtained, the target keywords are respectively subjected to coding processing to generate a plurality of corresponding codes, and the codes are subjected to line division processing according to preset script logic to generate the target script.
In the software script generating system, the encoding module 42 is further specifically configured to:
constructing a corresponding script logic flow chart according to the actual requirements of a user, and performing branch processing on a plurality of codes according to the script logic flow chart;
and calling a grammar decorator corresponding to the logic converter, and performing ending processing on each line of the codes through the grammar decorator based on script grammar rules to generate the target script.
In the software script generating system, the software script generating system further includes a transmission module 52, where the transmission module 52 is specifically configured to:
establishing wireless communication connection with a user application terminal, and packaging the target script to transmit the packaged target script to the user application terminal;
performing durability test on the target script in the user application terminal based on an error deduction algorithm to generate a corresponding test result, and judging whether the test result meets a preset requirement or not by an equivalence class test method;
and if the test result meets the preset requirement, judging that the target script meets the preset requirement, and storing the target script into the user application terminal according to a preset format.
A seventh embodiment of the present invention provides a computer, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the software script generation method provided in the above embodiments.
An eighth embodiment of the present invention provides a storage medium having stored thereon a computer program that, when executed by a processor, implements the software script generating method provided as the above-described embodiments.
In summary, the software script generating method, system, computer and readable storage medium provided by the embodiments of the present invention can automatically generate the corresponding script only by inputting the required actual chinese word by the user on the premise of not requiring professional staff to arrive at the application site, thereby greatly shortening the script configuration period, reducing the manpower consumption, correspondingly reducing the script configuration cost, and being suitable for large-scale popularization and use.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular 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 embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent should be subject to the appended claims.

Claims (10)

1. A method for generating a software script, the method comprising:
acquiring a plurality of keywords with the highest use frequency in each script, and finding out target Chinese words corresponding to each keyword respectively, wherein the keywords are English words;
establishing mapping relations respectively corresponding to each keyword and each target Chinese word to generate corresponding key value pair mapping pools, and constructing corresponding logic converters based on the key value pair mapping pools, wherein the mapping relations have uniqueness;
when receiving an actual Chinese word input by a user, converting the actual Chinese word into a corresponding target keyword through the logic converter, and generating a corresponding target script according to the target keyword.
2. The software script generating method of claim 1, wherein: the step of obtaining a plurality of keywords with the highest use frequency in each script comprises the following steps:
acquiring a plurality of scripts of each field, and detecting script rules used in the scripts one by one, wherein the script rules comprise variable rules, condition rules and cycle rules;
detecting a plurality of words with highest usage frequency in the variable rule, the condition rule and the circulation rule, and defining the plurality of words with highest usage frequency as a plurality of keywords.
3. The software script generation method of claim 1, wherein: the step of establishing a mapping relation corresponding to each keyword and each target Chinese word respectively to generate a corresponding key value pair mapping pool comprises the following steps:
detecting Chinese meanings corresponding to the key words one by one, and finding out corresponding target Chinese words in a preset Chinese database according to the Chinese meanings, wherein the target Chinese words have uniqueness;
establishing a mapping relation between each keyword and each target Chinese word based on a preset mapping algorithm, and classifying the keywords to generate mapping tables corresponding to a plurality of classes;
and integrating a plurality of classes of the mapping tables to generate the key-value pair mapping pool.
4. The software script generation method of claim 1, wherein: the step of converting the actual Chinese words into corresponding target keywords by the logic converter comprises:
when the actual Chinese words input by a user are received, detecting character strings contained in the actual Chinese words, and segmenting the character strings to split the character strings into a plurality of corresponding characters;
and converting each character into a corresponding target keyword through the logic converter according to the key-value pair mapping pool.
5. The software script generation method of claim 4, wherein: after the step of converting, by the logic converter, each of the characters into a corresponding target keyword according to the key-value pair mapping pool, the method further includes:
when the target keywords are obtained, the target keywords are respectively subjected to coding processing to generate a plurality of corresponding codes, and the codes are subjected to line division processing according to preset script logic to generate the target script.
6. The software script generation method of claim 5, wherein: the step of performing the line splitting processing on the plurality of codes according to the preset script logic to generate the target script comprises the following steps:
constructing a corresponding script logic flow chart according to the actual requirements of a user, and performing branch processing on a plurality of codes according to the script logic flow chart;
and calling a grammar decorator corresponding to the logic converter, and performing ending processing on each line of the codes through the grammar decorator based on script grammar rules to generate the target script.
7. The software script generation method of claim 1, wherein: the method further comprises the following steps:
establishing wireless communication connection with a user application terminal, and packaging the target script to transmit the packaged target script to the user application terminal;
performing durability test on the target script in the user application terminal based on an error deduction algorithm to generate a corresponding test result, and judging whether the test result meets a preset requirement or not by an equivalence class test method;
and if the test result meets the preset requirement, judging that the target script meets the preset requirement, and storing the target script into the user application terminal according to a preset format.
8. A software script generation system, said system comprising:
the acquisition module is used for acquiring a plurality of keywords with the highest use frequency in each script and finding out target Chinese words corresponding to each keyword, wherein the keywords are English words;
the mapping module is used for establishing a mapping relation between each keyword and each target Chinese word to generate a corresponding key value pair mapping pool, and establishing a corresponding logic converter based on the key value pair mapping pool, wherein the mapping relation has uniqueness;
and the conversion module is used for converting the actual Chinese words into corresponding target keywords through the logic converter when the actual Chinese words input by a user are received, and generating corresponding target scripts according to the target keywords.
9. A computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the software script generation method of any one of claims 1 to 7 when executing the computer program.
10. A storage medium on which a computer program is stored, the program, when executed by a processor, implementing a software script generation method as claimed in any one of claims 1 to 7.
CN202310108631.4A 2023-02-14 2023-02-14 Software script generation method, system, computer and readable storage medium Active CN115826991B (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117217185A (en) * 2023-11-07 2023-12-12 江西五十铃汽车有限公司 Document generation method and system

Citations (12)

* Cited by examiner, † Cited by third party
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 and 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

Patent Citations (12)

* Cited by examiner, † Cited by third party
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 and storage medium
CN115687136A (en) * 2022-11-09 2023-02-03 平安付科技服务有限公司 Script program processing method, system, computer equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
符永铨等: ""网络行为仿真综述"" *

Cited By (2)

* Cited by examiner, † Cited by third party
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
CN109658928B (en) Cloud multi-mode conversation method, device and system for home service robot
US11210608B2 (en) Method and apparatus for generating model, method and apparatus for recognizing information
CN115826991A (en) Software script generation method, system, computer and readable storage medium
CN116340778B (en) Medical large model construction method based on multiple modes and related equipment thereof
CN112364622B (en) Dialogue text analysis method, device, electronic device and storage medium
CN116303558A (en) Query statement generation method, data query method and generation model training method
CN104391586A (en) Detection method and detection system for keyboard input based on mobile terminal
CN117370523A (en) Large language model application service method and device
CN116756564A (en) Training method and using method of task solution-oriented generation type large language model
CN117290411B (en) Multimode database query method and device, electronic equipment and storage medium
CN113792033A (en) Spark-based data quality checking method and device, storage medium and terminal
CN109359055A (en) A kind of method and apparatus of data test
CN111625858B (en) Intelligent multi-mode data desensitization method and device in vertical field
CN117493505A (en) Intelligent question-answering method, device, equipment and storage medium
CN116149632A (en) Business logic customizing method and device, computer equipment and storage medium
CN113672522B (en) Test resource compression method and related equipment
CN116069324A (en) Dynamic form construction method and device based on Vue
CN112925889B (en) Natural language processing method, device, electronic equipment and storage medium
CN115577363A (en) Detection method and device for deserialization utilization chain of malicious code
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN113408298A (en) Semantic analysis method and device, electronic equipment and storage medium
CN117875267B (en) Method and system for converting Chinese characters into pinyin
CN112069214A (en) Rule processing method, device, equipment and storage medium
CN114302425B (en) Equipment network distribution method and device, storage medium and electronic equipment
CN112799638B (en) Non-invasive rapid development method, platform, terminal 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

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

CB03 Change of inventor or designer information