CN107908679A - Script sentence conversion method, device and computer-readable recording medium - Google Patents

Script sentence conversion method, device and computer-readable recording medium Download PDF

Info

Publication number
CN107908679A
CN107908679A CN201711030554.6A CN201711030554A CN107908679A CN 107908679 A CN107908679 A CN 107908679A CN 201711030554 A CN201711030554 A CN 201711030554A CN 107908679 A CN107908679 A CN 107908679A
Authority
CN
China
Prior art keywords
converted
sentence
script sentence
script
conversion
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
CN201711030554.6A
Other languages
Chinese (zh)
Other versions
CN107908679B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201711030554.6A priority Critical patent/CN107908679B/en
Priority to PCT/CN2018/074809 priority patent/WO2019080401A1/en
Publication of CN107908679A publication Critical patent/CN107908679A/en
Application granted granted Critical
Publication of CN107908679B publication Critical patent/CN107908679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)
  • Machine Translation (AREA)

Abstract

The present invention discloses a kind of script sentence conversion method, device and computer-readable recording medium, and the script sentence conversion method includes:Script sentence to be converted is received in the transition interface of terminal, and detects whether to receive transition trigger instruction;When receiving transition trigger instruction, the type of transition trigger instruction is determined;The type instructed according to the transition trigger, target script sentence corresponding with the type is converted to by script sentence to be converted.The type that this programme is instructed according to transition trigger, script sentence to be converted is converted into target script sentence, when the type of transition trigger instruction is to increase script sentence to be converted branch or comma formation querying condition, branch can be increased to script to be converted by conversion or comma generates target script sentence.Instructed for different types of transition trigger, it is convertible to obtain different target script sentences, avoid developer's from writing script, high conversion efficiency manually.

Description

Script sentence conversion method, device and computer-readable recording medium
Technical field
The invention mainly relates to Computer Applied Technology field, specifically, is related to a kind of script sentence conversion method, dress Put and computer-readable recording medium.
Background technology
Database is completed to develop, before the use that puts goods on the market, it is necessary to by test;Or in use, occur , it is necessary to be detected definite problem points during problem;This test or detection process are required to the condition query using SQL.Condition is looked into Inquired about as querying condition in the form of " IN " is with variable during inquiry, quoted between each variable with single quotation marks, and items Between separated with comma, such as IN (' A ', ' B ', ' C ');When the variable of IN bands is especially more, being manually entered querying condition needs to spend Plenty of time.
The content of the invention
The main object of the present invention is to provide a kind of script sentence conversion method, device and computer-readable recording medium, Aim to solve the problem that and be manually entered querying condition in the prior art, expend the time it is more the problem of.
To achieve the above object, the present invention provides a kind of script sentence conversion method, the script sentence conversion method bag Include following steps:
Script sentence to be converted is received in the transition interface of terminal, and detects whether to receive transition trigger instruction;
When receiving transition trigger instruction, the type of transition trigger instruction is determined;
The type instructed according to the transition trigger, target corresponding with the type is converted to by script sentence to be converted Script sentence.
Preferably, the script sentence to be converted includes query statement and function block statement;
The type instructed according to the transition trigger, script sentence to be converted is converted to corresponding with the type The step of target script sentence, includes:
When the type of transition trigger instruction is the first translation type corresponding with query statement, in script sentence to be converted Row and row between increase first flag symbol, script sentence to be converted is converted into target foot corresponding with the first translation type This sentence;
When the type of transition trigger instruction is the second translation type corresponding with function block statement, in script language to be converted Increase second identifier symbol between the row and row of sentence, script sentence to be converted is converted into target corresponding with the second translation type Script sentence.
Preferably, it is described to increase first flag symbol between the row and row of script sentence to be converted, by script to be converted Sentence, which is converted to the step of target script sentence corresponding with the first translation type, to be included:
Whether the current line number for judging script sentence to be converted is the last column for changing line number;
When the current line number of script sentence to be converted be change line number last column when, by the row at last column end with Blank character between row is cancelled, and script sentence to be converted is converted to target script sentence corresponding with the first translation type.
Preferably, it is described to increase by the second separator between the row and row of script sentence to be converted, by script to be converted Sentence includes after being converted to the step of target script sentence corresponding with the second translation type:
When receiving variable replacement request, corresponding replacement amount and variable to be replaced with variable replacement request are obtained, And determine the replacement quantity of variable to be replaced;
It is replacement amount by variable replacement to be replaced corresponding with replacing quantity in target script sentence.
Preferably, the transition interface in terminal includes before receiving the step of script sentence to be converted:
When terminal receives the enabled instruction for starting conversion application, conversion application is started;
When conversion application receives the triggering command of query statement conversion, control conversion application jumps to query statement Transition interface;
When conversion application receives the triggering command of function block statement conversion, control conversion application jumps to functional block language The transition interface of sentence.
Preferably, it is described when receive transition trigger instruction when, determine transition trigger instruction type the step of include:
When receiving transition trigger instruction, current interface is determined using the control type of current display interface according to conversion Type;
If current interface is the transition interface of query statement, transition trigger instruction is first turn corresponding with query statement Change type;
If current interface is the transition interface of function block statement, transition trigger instruction is corresponding with function block statement the Two translation types.
Preferably, it is described by script sentence to be converted be converted to the step of conversion line number corresponding target script sentence it After include:
The line number of script sentence to be converted is shown in transition interface, and by the script sentence and target to be converted of the line number Script sentence corresponds to display.
Preferably, after described the step of showing the script sentence and target script sentence to be converted correspondence of the line number Including:
It is when receiving clearance order, script sentence and the target script sentence to be converted shown in transition interface is clear Remove.
In addition, to achieve the above object, the present invention also proposes a kind of script sentence conversion equipment, the script sentence conversion Device includes:Memory, processor, communication bus and the script sentence conversion program being stored on the memory;
The communication bus is used for realization the connection communication between processor and memory;
The processor is used to perform the script sentence conversion program, to realize following steps:
Script sentence to be converted is received in the transition interface of terminal, and detects whether to receive transition trigger instruction;
When receiving transition trigger instruction, the type of transition trigger instruction is determined;
The type instructed according to the transition trigger, target corresponding with the type is converted to by script sentence to be converted Script sentence.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer-readable recording medium Storage medium be stored with one either more than one program the one or more programs can by one or one with On processor perform for:
Script sentence to be converted is received in the transition interface of terminal, and detects whether to receive transition trigger instruction;
When receiving transition trigger instruction, the type of transition trigger instruction is determined;
The type instructed according to the transition trigger, target corresponding with the type is converted to by script sentence to be converted Script sentence.
The script sentence conversion method of the present embodiment, when the transition interface of terminal receives script sentence to be converted, really The conversion line number of fixed script sentence to be converted;And when receiving transition trigger instruction, determine the type of transition trigger instruction, with The type instructed according to transition trigger, target script sentence is converted to by script sentence to be converted.This programme is according to transition trigger The type of instruction, target script sentence is converted to by script sentence to be converted, when the type of transition trigger instruction is to be converted When script sentence increases branch or comma formation querying condition, branch can be increased to script to be converted by conversion or comma is given birth to Into target script sentence.Instructed for different types of transition trigger, it is convertible to obtain different target script sentences, avoid out Hair personnel's writes script, high conversion efficiency manually.
Brief description of the drawings
Fig. 1 is the flow diagram of the script sentence conversion method first embodiment of the present invention;
Fig. 2 is the flow diagram of the script sentence conversion method second embodiment of the present invention;
Fig. 3 is the flow diagram of the script sentence conversion method 3rd embodiment of the present invention;
Fig. 4 is the device structure schematic diagram for the hardware running environment that present invention method is related to;
Fig. 5 is the query statement transition diagram of the script sentence conversion method of the present invention;
Fig. 6 is the function block statement transition diagram of the script sentence conversion method of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of script sentence conversion method.
Fig. 1 is refer to, Fig. 1 is the flow diagram of script sentence conversion method first embodiment of the present invention.In this implementation In example, the script sentence conversion method includes:
Step S10, when the transition interface of terminal receives script sentence to be converted, determines turning for script sentence to be converted Enter a new line number;
The script sentence conversion method of the present embodiment is suitable for changing sentence input by user, obtains meeting user The target script sentence of demand, wherein the query statement that the sentence changed can be wall scroll can also be a plurality of functional block language Sentence.Script is the extension of autoexec, is the program that a kind of plain text preserves, is made of the written order of a rule, each Bar written order is a script sentence.For sentence before being changed into script sentence to be converted, user will have conversion to need The script sentence to be converted asked is input to the transition interface of terminal, and terminal can be tablet computer or removable computer, transition interface To be used for realization the interface of the switching software of script sentence conversion.Switching software is installed in terminal, is shown on the desktop of terminal It is shown with shortcut icon;When there are conversion requirements, double-click shortcut icon and open switching software, show transition interface, The transition interface that this terminal is shown inputs script sentence to be converted.The transition interface of terminal connects script sentence to be converted Receive, and detect whether to receive transition trigger instruction, transition trigger instruction is to start to turn the script sentence to be converted of reception Triggering is changed, when receiving transition trigger instruction, starts to change script sentence to be converted.
Step S20, when receiving transition trigger instruction, determines the type of transition trigger instruction;
Further, when receive transition trigger instruction when, then illustrate user have by the script sentence to be converted of input into The demand of row conversion, can start conversion operation.It is contemplated that the conversion of the present embodiment can be directed to the wall scroll language of query statement Sentence is changed, and a plurality of sentence that can also be directed to the whole functional block for realizing some function is changed;For different classes The conversion of type, the type of transition trigger instruction also differ, so that after transition trigger instruction is received, carry out changing it It is preceding, it is necessary to transition trigger instruction type be determined.Because of conversion circle of both the conversion of wall scroll sentence and the conversion of a plurality of sentence Face is different, and the interface so as to be instructed by receiving transition trigger determines the type that transition trigger instructs.Such as receive and turn Change triggering command interface be for wall scroll sentence conversion transition interface, then can by transition trigger instruct type be determined as with Wall scroll sentence changes corresponding type, and when the interface for receiving transition trigger instruction is conversion circle for the conversion of a plurality of sentence The type that transition trigger instructs, then can be determined as and the corresponding type of a plurality of sentence conversion by face.And then referred to according to transition trigger The particular type of order, treats branch statement and is targetedly changed.
Step S30, the type instructed according to the transition trigger, script sentence to be converted is converted to and the type pair The target script sentence answered.
Determine transition trigger instruction type after, according to transition trigger instruct type, to script sentence to be converted into Row conversion.Script sentence to be converted includes query statement and function block statement, the type of transition trigger instruction be also accordingly divided into Corresponding first translation type of query statement and the second conversion type corresponding with function block statement.So as to be touched according to the conversion The type to send instructions, the step of script sentence to be converted is converted to target script sentence corresponding with the type, include:
Step S31, when the type of transition trigger instruction is the first translation type corresponding with query statement, to be converted Increase first flag symbol between the row and row of script sentence, script sentence to be converted is converted to corresponding with the first translation type Target script sentence;
Step S32, when the type of transition trigger instruction is the second translation type corresponding with function block statement, is waiting to turn Changing between the row of script sentence and row increases second identifier symbol, and script sentence to be converted is converted to and the second translation type pair The target script sentence answered.
When the type of transition trigger instruction is the first translation type, illustrates that script sentence to be converted is converted to for needs and look into The script sentence of statement type is ask, the item of query statement can be quoted with single quotation marks, separated between item and item with comma.So as to turn When the type for changing triggering command is the first translation type, then increase first flag between the row to script sentence to be converted and row Script sentence to be converted, is converted to the target script sentence of query statement by symbol.When script sentence to be converted is individual event, then One identifier is to increase single quotation marks to the script sentence to be converted of this individual event;When script sentence to be converted has multinomial, then first Identifier is to increase single quotation marks to the script sentence to be converted of multinomial middle each single item, and increases between multinomial item and item and tease Number.Fig. 5 is refer to, in the transition interface of a terminal, including the display box of left and right two, and used between two display boxes In the virtual key for sending transition trigger instruction, left side display box, which is used to receive, shows script sentence to be converted, turns when detecting When changing the virtual key of triggering command and being triggered, the script sentence to be converted in left side is changed, and will be obtained after conversion Target script sentence is shown in the display box on right side.Left side display box has many items sentence to be converted, each is to occupy a line Mode be shown in the display box of left side, upon the transition, the target script sentence of generation it is same occupy a line with one Mode is shown in the display box on right side, and each both increases the single quotation marks and comma as first flag symbol, to carry out item Difference between item, and the condition query of the target script sentence progress SQL accorded with according to this increase first flag.This first mark It can also be double quotation marks, bracket etc. to know symbol, it can be set according to user demand.
When the type of transition trigger instruction is the second translation type, illustrate script sentence to be converted to need to be converted to work( The script sentence of energy block statement type, then increase second identifier symbol between the row to script sentence to be converted and row, will be to be converted Script sentence is converted to the target script sentence of function block statement.Function block statement includes multiple line statement, and it is more that database performs this Line statement realizes a certain function.During code development, it is contemplated that the agility of written in code, for the function of identity function Block can carry out written in code by way of Code copying, stickup, and speed is write to improve.Such as the function class of function A and function B Seemingly, realize that the code of function A is errorless through database execution, be used for realization so as to which the function block statement for realizing function A is replicated The function of function B.During use is replicated, the newline in function block statement, space etc. can be deleted, form monoblock generation Code, does not go according to former function block statement and is divided with row, and the reading for being unfavorable for code is inherited.So as to need the work(to this duplication Energy block statement increase newline, space etc., the present embodiment can be realized to the function block statement increase as script sentence to be converted Newline, space as second identifier symbol etc., generate target script sentence, avoid developer from writing increase line feed manually Symbol, space etc..Fig. 6 is refer to, in the transition interface of a terminal, including upper and lower two display boxes, and positioned at two displays It is used for the virtual key for sending transition trigger instruction between frame, top display box is used for reception display and is used as script sentence to be converted Function block statement, when detect transition trigger instruction virtual key be triggered when, the function block statement of top is turned Change, and the target script sentence obtained after conversion is included in the display box of lower section.The function block statement bag of top display box Include multiple and different rows, upon the transition, to every row increase as second identifier symbol newline and branch, with carry out item and Segmentation difference between, when making to replicate the target script sentence of this increase second identifier symbol, can obtain and to be converted Script sentence corresponds to the script sentence of form.This second identifier symbol can also be single quotation marks, double quotation marks etc., it can be according to user's need Ask and set.
Further, it is described in script sentence to be converted in another embodiment of script sentence conversion method of the present invention Row and row between increase first flag symbol, script sentence to be converted is converted into target script corresponding with the first translation type The step of sentence, includes:
Step S311, whether the current line number for judging script sentence to be converted is the last column for changing line number;
Step S312, when the current line number of script sentence to be converted is to change last column of line number, by last column Blank character between the row and row at end is cancelled, and script sentence to be converted is converted to target foot corresponding with the first translation type This sentence.
Understandably, when script sentence to be converted is query statement, its may have it is multinomial, i.e., as script sentence to be converted Query statement have it is a plurality of.When changing, while increasing single quotation marks to items, it is also necessary to increase between item and item is used as and is divided Every the comma of symbol.When be transformed into multinomial query statement last, thereafter without other query statements when, it is not necessary to this most Latter increases separator.So as to which whether the present embodiment is last that change line number to the current line number of script sentence to be converted Row is judged, specifically, is judged by the rear data line for reading current line number, if current line number is last column, Thereafter when a line does not have data, the data of reading are null value;If current line number is not last column, a line has data thereafter, then The data of reading are not null value;So as to whether be that null value is judged by the data of reading.When the data of reading are null value, The current line number for then illustrating script sentence to be converted is to change last column of line number, by the row and row at this last column end Between blank character cancel, i.e., it is not increased row row between decollator, complete looking into as script sentence to be converted Ask the conversion that sentence is converted to target script sentence.
Further, it is described in script sentence to be converted in another embodiment of script sentence conversion method of the present invention Row and row between increase by the second separator, script sentence to be converted is converted into target script corresponding with the second translation type Include after the step of sentence:
Step S33, when receiving variable replacement request, obtains the replacement amount corresponding with variable replacement request and is replaced with waiting Transformation amount, and determine the replacement quantity of variable to be replaced;
Step S33, is replacement amount by variable replacement to be replaced corresponding with replacing quantity in target script sentence.
Further, when sentence to be converted is function block statement, there may be for for extraneous in function block statement The variable of information is inputted, according to the difference of extraneous input information, the result obtained by perform function block statement has differences.Changing During, without the identification function to variable, in fact it could happen that variable is changed as common amount, makes function block statement not It can realize its script function, or occur abnormal situation in transfer process.The present embodiment is provided with replacement work(in transition interface Can, by the variable replacement that cannot be identified in transfer process it is identifiable value by replacement function.With further reference to Fig. 6, Two input frames and a virtual key are provided between two display boxes up and down in transition interface, two input frames are used respectively In input variable and replacement amount, variable replacement is replacement amount by virtual key user triggering.When detecting that this virtual key is touched Hair, is asked as variable replacement, after the request of this variable replacement is received, is obtained and the corresponding replacement of variable replacement request Amount and variable to be replaced.Variable wherein to be replaced is variable, and determines the quantity for the variable to be replaced that needs are replaced.According to The quantity for the variable to be replaced that this needs is replaced, is replacement by the variable replacement to be replaced in transformed target script sentence Amount, to ensure the function of function block statement after changing.
Further, Fig. 2 is refer to, on the basis of script sentence conversion method first embodiment of the present invention, proposes this Invention script sentence conversion method second embodiment, in a second embodiment, the transition interface in terminal receive to be converted Include before the step of script sentence:
Step S40, when terminal receives the enabled instruction for starting conversion application, starts conversion application;
Step S50, when conversion application receives the triggering command of query statement conversion, control conversion application, which jumps to, looks into Ask the transition interface of sentence;
Step S60, when conversion application receives the triggering command of function block statement conversion, control conversion application jumps to The transition interface of function block statement.
Further, script sentence to be converted is carried out by changing application software, and conversion application software is installed on terminal On, so that, it is necessary to start to conversion application software before script sentence conversion to be converted is carried out.Opened when terminal receives When turn changes the enabled instruction of application, this conversion application is started, enters the homepage face of conversion application.In its homepage face Selection key is provided with, is made choice with the type to script sentence to be converted, that is, is selected to query statement or function block statement Changed.When conversion application receives the triggering command of query statement conversion, then control conversion application jumps to inquiry language The transition interface of sentence, to carry out query statement conversion;And when conversion application receives the triggering command of function block statement conversion, Then control conversion application jumps to the transition interface of function block statement, to carry out function block statement conversion;Pass through this different choosing Triggering is selected, realizes the conversion of different types of script sentence to be converted, meets the different demands of user.
Further, it is described to receive transition trigger in another embodiment of script sentence conversion method of the present invention During instruction, determine transition trigger instruction type the step of include:
Step S21, when receiving transition trigger instruction, determines according to conversion using the control type of current display interface The type of current interface;
Step S22, if current interface is the transition interface of query statement, transition trigger instruction is corresponding with query statement The first translation type;
Step S23, if current interface is the transition interface of function block statement, transition trigger instruction is and function block statement Corresponding second translation type.
Understandably, the type of script sentence to be converted is different, the class of corresponding transition interface and transition trigger instruction Type is different, so as to determine the type of transition trigger instruction by the type of current interface, with what is instructed according to transition trigger Type pair script sentence to be converted corresponding with this type is changed.Specifically, when receiving transition trigger instruction, determine The type of current interface, wherein definite mode can be used to show that the control of current interface to be carried out by detecting backstage, control is Component with user interface.When for show current interface control be query statement conversion control, i.e., currently show boundary The transition interface of query statement is shown in face, then current interface can be determined as to the transition interface of query statement;When for showing The control for showing current interface is the conversion control of function block statement, i.e. the conversion of function block statement is shown in current display interface Current interface, then can be determined as the transition interface of function block statement by interface.According to the type of this current interface, determine that conversion is touched The type to send instructions;If current interface is the transition interface of query statement, it is determined that transition trigger instruction is and query statement Corresponding first translation type;And current interface be function block statement transition interface when, it is determined that transition trigger instruction be with Corresponding second translation type of function block statement;According to this first translation type or the second translation type, to script language to be converted Sentence is changed.
Further, Fig. 3 is refer to, in the base of script sentence conversion method first embodiment of the present invention or second embodiment On plinth, script sentence conversion method 3rd embodiment of the present invention is proposed, it is in the third embodiment, described by script sentence to be converted Include after the step of being converted to target script sentence corresponding with conversion line number:
Step S60, the line number of script sentence to be converted is shown in transition interface, and by the script language to be converted of the line number Sentence display corresponding with target script sentence.
With further reference to Fig. 5 or Fig. 6, in order to preferably embody transformation result, to script to be converted in transition interface The line number of sentence is shown, while script sentence and the target script sentence to be converted of this line number also is corresponded to display.User Pass through the line number of sentence after the line number of sentence before conversion and conversion, you can grasp the basic condition of conversion.Before conversion line number and Line number is identical after conversion, then shows that conversion is preliminary normal, and lacks line number after changing, or increase line number etc., is all abnormal Situation.Script sentence to be converted when being input to the display box of transition interface by the line number of script sentence wherein to be converted, to defeated The script sentence to be converted entered is detected line by line, determines whether detection row has script sentence to be converted.When there is script to be converted During sentence, then to the line number of script sentence to be converted, count is incremented, to the last a line, and it is whole language to be converted to count summation The line number of sentence.Script sentence to be converted and target script sentence are corresponded into display, contrast is carried out and determines transformed target script Whether the every a line whether sentence lacks line number, increase line number or target script sentence adds first flag symbol or the second mark Know symbol etc..In addition transition interface is additionally provided with removing virtual key, for removing the content shown in transition interface in display box. When receiving clearance order, script sentence and the target script sentence to be converted shown in transition interface is removed, after removing The conversion of script sentence to be converted can be carried out again, meet the different conversion requirements of user.
With reference to Fig. 4, Fig. 4 is the apparatus structure schematic diagram for the hardware running environment that present invention method is related to.
Script sentence of embodiment of the present invention conversion equipment can be PC or smart mobile phone, tablet computer, e-book Reader, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard Audio aspect 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert Compression standard audio aspect 3) terminal device such as player, pocket computer.
As shown in figure 4, the script sentence conversion equipment can include:Processor 1001, such as CPU, memory 1005, leads to Believe bus 1002.Wherein, communication bus 1002 is used for realization the connection communication between processor 1001 and memory 1005.Storage Device 1005 can be high-speed RAM memory or the memory (non-volatile memory) of stabilization, such as disk Memory.Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
Alternatively, which can also include user interface, network interface, camera, RF (Radio Frequency, radio frequency) circuit, sensor, voicefrequency circuit, WiFi module etc..User interface can include display screen (Display), input unit such as keyboard (Keyboard), optional user interface can also include wireline interface, the nothing of standard Line interface.Network interface can optionally include standard wireline interface and wireless interface (such as WI-FI interfaces).
It will be understood by those skilled in the art that the script sentence conversion device structure shown in Fig. 4 is not formed to script The restriction of sentence conversion equipment, can include than illustrating more or fewer components, either combine some components or different Component is arranged.
As shown in figure 4, it can lead to as in a kind of memory 1005 of computer-readable storage medium including operating system, network Believe module and script sentence conversion program.Operating system is management and control script sentence conversion equipment hardware and software resource Program, support the operation of script sentence conversion program and other softwares and/or program.Network communication module, which is used for realization, to be deposited Communication between each component in the inside of reservoir 1005, and with communicating in script sentence conversion equipment between other hardware and softwares.
In script sentence conversion equipment shown in Fig. 4, processor 1001 is used to perform the foot stored in memory 1005 This sentence conversion program, realizes following steps:
Script sentence to be converted is received in the transition interface of terminal, and detects whether to receive transition trigger instruction;
When receiving transition trigger instruction, the type of transition trigger instruction is determined;
The type instructed according to the transition trigger, target corresponding with the type is converted to by script sentence to be converted Script sentence.
Further, the script sentence to be converted includes query statement and function block statement;
The type instructed according to the transition trigger, script sentence to be converted is converted to corresponding with the type The step of target script sentence, includes:
When the type of transition trigger instruction is the first translation type corresponding with query statement, in script sentence to be converted Row and row between increase first flag symbol, script sentence to be converted is converted into target foot corresponding with the first translation type This sentence;
When the type of transition trigger instruction is the second translation type corresponding with function block statement, in script language to be converted Increase second identifier symbol between the row and row of sentence, script sentence to be converted is converted into target corresponding with the second translation type Script sentence.
Further, it is described to increase first flag symbol between the row and row of script sentence to be converted, by foot to be converted This sentence, which is converted to the step of target script sentence corresponding with the first translation type, to be included:
Whether the current line number for judging script sentence to be converted is the last column for changing line number;
When the current line number of script sentence to be converted be change line number last column when, by the row at last column end with Blank character between row is cancelled, and script sentence to be converted is converted to target script sentence corresponding with the first translation type.
Further, it is described to increase by the second separator between the row and row of script sentence to be converted, by foot to be converted After this sentence is converted to the step of target script sentence corresponding with the second translation type, processor 1001 is used to perform storage The script sentence conversion program stored in device 1005, realizes following steps:
When receiving variable replacement request, corresponding replacement amount and variable to be replaced with variable replacement request are obtained, And determine the replacement quantity of variable to be replaced;
It is replacement amount by variable replacement to be replaced corresponding with replacing quantity in target script sentence.
Further, before the transition interface in terminal receives the step of script sentence to be converted, processor 1001 For performing the script sentence conversion program stored in memory 1005, following steps are realized:
When terminal receives the enabled instruction for starting conversion application, conversion application is started;
When conversion application receives the triggering command of query statement conversion, control conversion application jumps to query statement Transition interface;
When conversion application receives the triggering command of function block statement conversion, control conversion application jumps to functional block language The transition interface of sentence.
Further, it is described when receive transition trigger instruction when, determine transition trigger instruction type the step of include:
When receiving transition trigger instruction, current interface is determined using the control type of current display interface according to conversion Type;
If current interface is the transition interface of query statement, transition trigger instruction is first turn corresponding with query statement Change type;
If current interface is the transition interface of function block statement, transition trigger instruction is corresponding with function block statement the Two translation types.
Further, described the step of script sentence to be converted is converted into target script sentence corresponding with conversion line number Afterwards, processor 1001 is used to perform the script sentence conversion program stored in memory 1005, realizes following steps:
The line number of script sentence to be converted is shown in transition interface, and by the script sentence and target to be converted of the line number Script sentence corresponds to display.
Further, script sentence and the target script sentence to be converted by the line number correspond to the step of display it Afterwards, processor 1001 is used to perform the script sentence conversion program stored in memory 1005, realizes following steps:
It is when receiving clearance order, script sentence and the target script sentence to be converted shown in transition interface is clear Remove.
Script sentence conversion equipment embodiment of the present invention and above-mentioned each embodiment of script sentence conversion method are basic Identical, details are not described herein.
The present invention provides a kind of computer-readable recording medium, the computer-readable recording medium storage have one or More than one program of person, the one or more programs can also be performed by one or more than one processor with In:
Script sentence to be converted is received in the transition interface of terminal, and detects whether to receive transition trigger instruction;
When receiving transition trigger instruction, the type of transition trigger instruction is determined;
The type instructed according to the transition trigger, target corresponding with the type is converted to by script sentence to be converted Script sentence.
Further, the script sentence to be converted includes query statement and function block statement;
The type instructed according to the transition trigger, script sentence to be converted is converted to corresponding with the type The step of target script sentence, includes:
When the type of transition trigger instruction is the first translation type corresponding with query statement, in script sentence to be converted Row and row between increase first flag symbol, script sentence to be converted is converted into target foot corresponding with the first translation type This sentence;
When the type of transition trigger instruction is the second translation type corresponding with function block statement, in script language to be converted Increase second identifier symbol between the row and row of sentence, script sentence to be converted is converted into target corresponding with the second translation type Script sentence.
Further, it is described to increase first flag symbol between the row and row of script sentence to be converted, by foot to be converted This sentence, which is converted to the step of target script sentence corresponding with the first translation type, to be included:
Whether the current line number for judging script sentence to be converted is the last column for changing line number;
When the current line number of script sentence to be converted be change line number last column when, by the row at last column end with Blank character between row is cancelled, and script sentence to be converted is converted to target script sentence corresponding with the first translation type.
Further, it is described to increase by the second separator between the row and row of script sentence to be converted, by foot to be converted After this sentence is converted to the step of target script sentence corresponding with the second translation type, the one or more journey Sequence can also be performed by one or more than one processor for:
When receiving variable replacement request, corresponding replacement amount and variable to be replaced with variable replacement request are obtained, And determine the replacement quantity of variable to be replaced;
It is replacement amount by variable replacement to be replaced corresponding with replacing quantity in target script sentence.
Further, before the transition interface in terminal receives the step of script sentence to be converted, it is one or Person more than one program can also be performed by one or more than one processor for:
When terminal receives the enabled instruction for starting conversion application, conversion application is started;
When conversion application receives the triggering command of query statement conversion, control conversion application jumps to query statement Transition interface;
When conversion application receives the triggering command of function block statement conversion, control conversion application jumps to functional block language The transition interface of sentence.
Further, it is described when receive transition trigger instruction when, determine transition trigger instruction type the step of include:
When receiving transition trigger instruction, current interface is determined using the control type of current display interface according to conversion Type;
If current interface is the transition interface of query statement, transition trigger instruction is first turn corresponding with query statement Change type;
If current interface is the transition interface of function block statement, transition trigger instruction is corresponding with function block statement the Two translation types.
Further, described the step of script sentence to be converted is converted into target script sentence corresponding with conversion line number Afterwards, the one or more programs can also be performed by one or more than one processor for:
The line number of script sentence to be converted is shown in transition interface, and by the script sentence and target to be converted of the line number Script sentence corresponds to display.
Further, script sentence and the target script sentence to be converted by the line number correspond to the step of display it Afterwards, the one or more programs can also be performed by one or more than one processor for:
It is when receiving clearance order, script sentence and the target script sentence to be converted shown in transition interface is clear Remove..
Computer-readable recording medium embodiment of the present invention and each embodiment base of above-mentioned script sentence conversion method This is identical, and details are not described herein.
It should also be noted that, herein, term " comprising ", "comprising" or its any other variant are intended to non- It is exclusive to include, so that process, method, article or device including a series of elements not only include those key elements, But also including other elements that are not explicitly listed, or further include solid by this process, method, article or device Some key elements.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including Also there are other identical element in the process of the key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme substantially in other words does the prior art Going out the part of contribution can be embodied in the form of software product, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone, Computer, server, or network equipment etc.) perform method described in each embodiment of the present invention.
The foregoing is merely the preferred embodiment of the present invention, is not intended to limit the scope of the invention, every at this Under the design of invention, the equivalent structure transformation made using description of the invention and accompanying drawing content, or directly/it is used in indirectly His relevant technical field is included in the scope of patent protection of the present invention.

Claims (10)

1. a kind of script sentence conversion method, it is characterised in that the script sentence conversion method comprises the following steps:
Script sentence to be converted is received in the transition interface of terminal, and detects whether to receive transition trigger instruction;
When receiving transition trigger instruction, the type of transition trigger instruction is determined;
The type instructed according to the transition trigger, target script corresponding with the type is converted to by script sentence to be converted Sentence.
2. script sentence conversion method as claimed in claim 1, it is characterised in that the script sentence to be converted includes inquiry Sentence and function block statement;
The type instructed according to the transition trigger, target corresponding with the type is converted to by script sentence to be converted The step of script sentence, includes:
When the type of transition trigger instruction is the first translation type corresponding with query statement, in the row of script sentence to be converted Increase first flag symbol between row, script sentence to be converted is converted into target script language corresponding with the first translation type Sentence;
When the type of transition trigger instruction is the second translation type corresponding with function block statement, in script sentence to be converted Increase second identifier symbol between row and row, script sentence to be converted is converted into target script corresponding with the second translation type Sentence.
3. script sentence conversion method as claimed in claim 2, it is characterised in that the row in script sentence to be converted with Increase first flag symbol between row, script sentence to be converted is converted into target script sentence corresponding with the first translation type The step of include:
Whether the current line number for judging script sentence to be converted is the last column for changing line number;
When the current line number of script sentence to be converted is to change last column of line number, by the row at last column end and row Between blank character cancel, script sentence to be converted is converted into target script sentence corresponding with the first translation type.
4. script sentence conversion method as claimed in claim 2, it is characterised in that the row in script sentence to be converted with Increase by the second separator between row, script sentence to be converted is converted into target script sentence corresponding with the second translation type The step of after include:
When receiving variable replacement request, corresponding replacement amount and variable to be replaced with variable replacement request are obtained, and really The replacement quantity of fixed variable to be replaced;
It is replacement amount by variable replacement to be replaced corresponding with replacing quantity in target script sentence.
5. script sentence conversion method as claimed in claim 2, it is characterised in that the transition interface in terminal is received and treated Include before the step of changing script sentence:
When terminal receives the enabled instruction for starting conversion application, conversion application is started;
When conversion application receives the triggering command of query statement conversion, control conversion application jumps to the conversion of query statement Interface;
When conversion application receives the triggering command of function block statement conversion, control conversion application jumps to function block statement Transition interface.
6. script sentence conversion method as claimed in claim 5, it is characterised in that described to receive transition trigger instruction When, determine transition trigger instruction type the step of include:
When receiving transition trigger instruction, the class of current interface is determined using the control type of current display interface according to conversion Type;
If current interface is the transition interface of query statement, transition trigger instruction is the corresponding with query statement first conversion class Type;
If current interface is the transition interface of function block statement, transition trigger instruction is second turn corresponding with function block statement Change type.
7. such as claim 1-6 any one of them script sentence conversion methods, it is characterised in that described by script language to be converted Sentence includes after being converted to the step of target script sentence corresponding with conversion line number:
The line number of script sentence to be converted is shown in transition interface, and by script sentence and the target script to be converted of the line number Sentence corresponds to display.
8. script sentence conversion method as claimed in claim 7, it is characterised in that the script to be converted by the line number Include after the step of sentence and target script sentence correspond to display:
When receiving clearance order, script sentence and the target script sentence to be converted shown in transition interface is removed.
9. a kind of script sentence conversion equipment, it is characterised in that the script sentence conversion equipment includes:Memory, processor, Communication bus and the script sentence conversion program being stored on the memory;
The communication bus is used for realization the connection communication between processor and memory;
The processor is used to perform the script sentence conversion program, to realize as any one of claim 1-8 The step of script sentence conversion method.
10. a kind of computer-readable recording medium, it is characterised in that the computer class is read to be stored with script language on storage medium Sentence conversion program, is realized as any one of claim 1-8 when the script sentence conversion program is executed by processor The step of script sentence conversion method.
CN201711030554.6A 2017-10-26 2017-10-26 Script statement conversion method and device and computer readable storage medium Active CN107908679B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711030554.6A CN107908679B (en) 2017-10-26 2017-10-26 Script statement conversion method and device and computer readable storage medium
PCT/CN2018/074809 WO2019080401A1 (en) 2017-10-26 2018-01-31 Method and apparatus for converting script statement, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711030554.6A CN107908679B (en) 2017-10-26 2017-10-26 Script statement conversion method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107908679A true CN107908679A (en) 2018-04-13
CN107908679B CN107908679B (en) 2020-11-27

Family

ID=61841942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711030554.6A Active CN107908679B (en) 2017-10-26 2017-10-26 Script statement conversion method and device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN107908679B (en)
WO (1) WO2019080401A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875378A (en) * 2018-06-12 2018-11-23 珠海市君天电子科技有限公司 Script virus detection method, device, electronic equipment and storage medium
CN109376166A (en) * 2018-08-20 2019-02-22 中国平安财产保险股份有限公司 Script conversion method, device, computer equipment and storage medium
CN110060667A (en) * 2019-03-15 2019-07-26 平安科技(深圳)有限公司 Batch processing method, device, computer equipment and the storage medium of voice messaging
CN115470229A (en) * 2022-08-30 2022-12-13 昆仑数智科技有限责任公司 Data table processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102426534A (en) * 2011-11-02 2012-04-25 大唐移动通信设备有限公司 Method and system for converting test script language into executable instruction
CN103529773A (en) * 2013-09-18 2014-01-22 国家电网公司 Automatic conversion method for behavior control scripting language
CN104932974A (en) * 2015-05-28 2015-09-23 国家计算机网络与信息安全管理中心 Script conversion method and script conversion device
CN105868204A (en) * 2015-01-21 2016-08-17 中国移动(深圳)有限公司 Method and apparatus for converting script language SQL of Oracle
US20170206245A1 (en) * 2016-01-20 2017-07-20 Oracle International Corporation System and method for dynamic conversion of database accessing scripts during runtime in a mainframe rehosting platform

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7117225B2 (en) * 2001-08-13 2006-10-03 Jasmin Cosic Universal data management interface
CN100489860C (en) * 2007-03-16 2009-05-20 华为技术有限公司 Method and apparatus for updating object local attribute to related database
CN103365847B (en) * 2012-03-27 2016-02-24 腾讯科技(深圳)有限公司 A kind of generation method and apparatus of self-defined web page files
CN103092980A (en) * 2013-01-31 2013-05-08 中国科学院自动化研究所 Method and system of data automatic conversion and storage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102426534A (en) * 2011-11-02 2012-04-25 大唐移动通信设备有限公司 Method and system for converting test script language into executable instruction
CN103529773A (en) * 2013-09-18 2014-01-22 国家电网公司 Automatic conversion method for behavior control scripting language
CN105868204A (en) * 2015-01-21 2016-08-17 中国移动(深圳)有限公司 Method and apparatus for converting script language SQL of Oracle
CN104932974A (en) * 2015-05-28 2015-09-23 国家计算机网络与信息安全管理中心 Script conversion method and script conversion device
US20170206245A1 (en) * 2016-01-20 2017-07-20 Oracle International Corporation System and method for dynamic conversion of database accessing scripts during runtime in a mainframe rehosting platform

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108875378A (en) * 2018-06-12 2018-11-23 珠海市君天电子科技有限公司 Script virus detection method, device, electronic equipment and storage medium
CN109376166A (en) * 2018-08-20 2019-02-22 中国平安财产保险股份有限公司 Script conversion method, device, computer equipment and storage medium
CN109376166B (en) * 2018-08-20 2023-07-04 中国平安财产保险股份有限公司 Script conversion method, script conversion device, computer equipment and storage medium
CN110060667A (en) * 2019-03-15 2019-07-26 平安科技(深圳)有限公司 Batch processing method, device, computer equipment and the storage medium of voice messaging
CN110060667B (en) * 2019-03-15 2023-05-30 平安科技(深圳)有限公司 Batch processing method and device for voice information, computer equipment and storage medium
CN115470229A (en) * 2022-08-30 2022-12-13 昆仑数智科技有限责任公司 Data table processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2019080401A1 (en) 2019-05-02
CN107908679B (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN107908679A (en) Script sentence conversion method, device and computer-readable recording medium
CN107438814A (en) Entity action suggestion on mobile device
CN102073670B (en) Method, equipment and system for debugging online webpage template
CN103761110B (en) browser font display processing method and device
CN108399072A (en) Five application page update method and device
CN108804188A (en) Changing an interface skin method and device
CN107958365B (en) Material information changing method and device, storage medium and electronic equipment
CN106874328A (en) A kind of data processing method and equipment
CN106909429A (en) A kind of synchronous upgrade method and device
CN104572219A (en) Photographing mode switching method and photographing mode switching device
CN105005448A (en) Method and equipment for starting application programs as well as terminal device
CN106407199A (en) Network article comment processing method and apparatus
CN107911741A (en) Free memory method for improving, smart television and computer-readable recording medium
CN108733797A (en) Document handling method and relevant apparatus
CN103294805A (en) Creation method and device for data warehouse personalized dimension table
CN107632872A (en) Desktop layouts processing method, user data processing method and processing device
CN105955507B (en) A kind of display methods and terminal of soft keyboard
CN105573757A (en) Language updating method and device of Android system
CN107423395A (en) Navigation data processing system
CN107391003A (en) Navigation data processing method
CN106341731A (en) Method and device for responding to remote-control key of intelligent television
JP2019109924A (en) Information processing system, information processing method, and program
CN107193450A (en) Page elements system of selection and device
CN111553749A (en) Activity push strategy configuration method and device
CN106293356A (en) A kind of desktop layouts is changed planes method and system

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