CN109799980A - Method, apparatus and computer equipment based on the more programming language interconnection of data processing - Google Patents

Method, apparatus and computer equipment based on the more programming language interconnection of data processing Download PDF

Info

Publication number
CN109799980A
CN109799980A CN201811527212.XA CN201811527212A CN109799980A CN 109799980 A CN109799980 A CN 109799980A CN 201811527212 A CN201811527212 A CN 201811527212A CN 109799980 A CN109799980 A CN 109799980A
Authority
CN
China
Prior art keywords
script
programming language
engineering
exploitation
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811527212.XA
Other languages
Chinese (zh)
Inventor
吕三
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201811527212.XA priority Critical patent/CN109799980A/en
Publication of CN109799980A publication Critical patent/CN109799980A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

Method, apparatus, computer equipment and storage medium proposed by the present invention based on the more programming language interconnection of data processing, wherein method includes: reception call instruction;The system command of corresponding second programming language is called according to the call instruction;The specifying variable in the exploitation script write by second programming language is substituted for corresponding first parameter of first engineering according to the system command, to form the target script, and executes the target script;The result information for having executed the target script is generated into return value, and the down-stream of first engineering is completed according to the return value, for developer, without can two kinds of programming languages, only need to can be currently used programming language, and development difficulty is lower, on the other hand, it realizes and is communicated with each other between different programming language code engineerings, allow the different common concurrent developments of programming language, the exploitation and use of tool platform is greatly facilitated.

Description

Method, apparatus and computer equipment based on the more programming language interconnection of data processing
Technical field
The present invention relates to the technical fields of data processing, especially relate to a kind of based on the more programming languages of data processing Method, apparatus, computer equipment and the storage medium of interconnection.
Background technique
When using programming language, it is possible that the same project needs to be opened jointly using different programming languages The case where hair, at this moment need to be interconnected communication between different programming languages or currently used programming language need using The section business logic developed to other language increases, writes code time energy to save, at this moment two programming language Between be also required to interconnection communicate.
Currently, the communication interconnection method between different programming languages generally uses programming language interfacing, programming language Interfacing is to realize that bilingual is interconnected by a macaronic interface document, realizes the common of this interfacing Tool is to simplify encapsulation and interface generator (SWIG), and complicated LISP program LISP can be parsed and be encapsulated by interface generator Come, and the simple function interface of a corresponding LISP program LISP be provided, need using when institute called by function interface Package file is needed, realizes and is interconnected between different programming languages, such interfacing not only requirement ratio to software developer It is higher, the two different programming languages of meeting are needed, and development difficulty is big.
Summary of the invention
The main object of the present invention be provide it is a kind of small more based on data processing to the low development difficulty of exploitation personnel requirement Method, apparatus, computer equipment and the storage medium of programming language interconnection.
The present invention proposes a kind of method based on the more programming language interconnection of data processing, comprising:
Call instruction is received, the operation that the call instruction is used to indicate the first programming language script is converted into the second programming The operation of language scripts;
The system command of corresponding second programming language is called according to the call instruction, the system command is first The order of engineering operation target script, first engineering are the service logic write by the first programming language, the target foot This be corresponding first engineering and be the script for the service logic write by second programming language;
The specifying variable in the exploitation script write by second programming language is substituted for according to the system command Corresponding first parameter of first engineering, to form the target script, and executes the target script;
The result information for having executed the target script is generated into return value, and completes described first according to the return value The down-stream of engineering, to realize the interconnection of first programming language and second programming language.
Further, the finger in the exploitation script that will be write by second programming language according to the system command Variable replacement is determined into corresponding first parameter of first engineering, the step of to form the target script, comprising:
Specified node is parsed according to the system command, the specified node corresponds to the specified logic of the exploitation script Module;
The specified logic module for going out the exploitation script according to the specified node checks, will be in the specified logic module Specifying variable be substituted for corresponding first parameter of first engineering, to form the target script.
Further, before the step of reception call instruction, comprising:
First engineering and the exploitation script are uploaded into svn;
First engineering of the svn is detected by assigned frequency, and judges whether first engineering changes;
If so, the exploitation script is copied under the first specified path, first specified path is described in execution The path that the exploitation script can be read out when system command.
Further, before the step of call instruction, comprising:
Multiple and different first engineerings and the corresponding exploitation script are uploaded into svn;
Each first engineering is detected from the svn to different given servers respectively, and corresponding described Exploitation script copies under the second specified path of each given server, and second specified path is to execute the system The path that the exploitation script can be read out when order.
Further, the finger in the exploitation script that will be write by second programming language according to the system command Variable replacement is determined into corresponding first parameter of first engineering, to form the target script, and executes the target script The step of after, comprising:
Execution journal is generated according to the event for executing the target script, the execution journal is described in record executes The log of the process of target script;
The execution journal is read by assigned frequency, and the position of reading is rested on the execution journal the last one Character.
Further, the finger in the exploitation script that will be write by second programming language according to the system command Variable replacement is determined into corresponding first parameter of first engineering, to form the target script, and executes the target script The step of after, comprising:
Whether the indicator for judging user's input is halt instruction;
If so, stopping executing the target script according to the halt instruction.
Further, described that the result information for having executed the target script is generated into return value, and according to the return Value was completed after the step of down-stream of first engineering, comprising:
Displayed page is generated according to the return value;
The displayed page is shown.
The present invention also provides a kind of devices based on the more programming language interconnection of data processing, comprising:
Command unit is received, for receiving call instruction, the call instruction is used to indicate the first programming language script Operation is converted into the operation of the second programming language script;
Call instruction unit, for calling the system command of corresponding second programming language according to the call instruction, The system command is the order of the first engineering operation target script, and first engineering is the industry write by the first programming language Business logic, the target script are service logic corresponding first engineering and to be write by second programming language Script;
Alternative parameter unit, for will be in the exploitation script that write by second programming language according to the system command Specifying variable be substituted for corresponding first parameter of first engineering, to form the target script, and execute the target Script;
Unit is returned the result, the result information for that will execute the target script generates return value, and according to described Return value completes the down-stream of first engineering, to realize the mutual of first programming language and second programming language Even.
The present invention also provides a kind of computer equipment, including memory and processor, the memory is stored with computer The step of program, the processor realizes the above method when executing the computer program.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer The step of above method is realized when program is executed by processor.
The invention has the benefit that passing through the engineering calling system order of the first programming language, replaced by system command The parameter of target programmed script is changed, the script after alternative parameter is then executed, and obtains the program for reflecting above-mentioned script Return value for developer, without two kinds of programming languages of meeting, only needs to continue down-stream according to above-mentioned return value The currently used programming language of meeting, and by package system order, and return value is obtained to complete different programming languages Communication, development difficulty is lower.On the other hand, it realizes and is communicated with each other between different programming language code engineerings, so that different compile Cheng Yuyan can common concurrent development, the exploitation and use of tool platform is greatly facilitated, makes different programming languages respective The chief is played, is utilized mutually.
Detailed description of the invention
Fig. 1 is the step schematic diagram of the method based on the more programming language interconnection of data processing in one embodiment of the invention;
Fig. 2 is the structural schematic block diagram of the device based on the more programming language interconnection of data processing in one embodiment of the invention;
Fig. 3 is the structural schematic block diagram of the computer equipment of one embodiment of the 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.
Specific 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.
Referring to Fig.1, the method based on the more programming language interconnection of data processing in the present embodiment, comprising:
Step S1: receiving call instruction, and the operation that the call instruction is used to indicate the first programming language script is converted into The operation of second programming language script;
Step S2: the system command of corresponding second programming language, the system life are called according to the call instruction The order for the first engineering operation target script is enabled, first engineering is the service logic write by the first programming language, institute Stating target script is the script of service logic corresponding first engineering and to be write by second programming language;
Step S3: the specifying variable developed in script that will be write by second programming language according to the system command It is substituted for corresponding first parameter of first engineering, to form the target script, and executes the target script;
Step S4: the result information for having executed the target script is generated into return value, and is completed according to the return value The down-stream of first engineering, to realize the interconnection of first programming language and second programming language.
As described in above-mentioned steps S1-S2, above-mentioned more programming language interconnection refer to be carried out between two different programming languages Mutual Transfer Parameters or engineering are called, execute the script that the programming language being different from is write, and engineering herein is by programming Language writes the project of service logic (code) realization;It is understood that in the prior art, programming language include it is a variety of, such as Java, jmeter etc., above system order are that (such as windows system, Linux system) execution in a system is above-mentioned The order of the script of programming language, in the present embodiment, above-mentioned call instruction is different from the first programming language classification for calling The system command of second programming language, when executing system command, current operation work can write from the first programming language is executed The transfer of the first engineering to execute the script write of the second programming language, i.e., above-mentioned call instruction is to be used to indicate the first programming language The operation of speech script is converted into the instruction of the operation of the second programming language script, and such as the first programming language is Java, in Java It develops an engineering, and wherein needs to use the service logic that one section of jmeter had been developed, i.e., above-mentioned second programming language For jmeter, the text presentation mode of above-mentioned service logic is above-mentioned exploitation script, at this time can be according to above-mentioned call instruction tune With above system order, the system command is for executing that section business logic developed in above-mentioned jmeter.
In one embodiment, before step S1, the system command of the second programming language is first packaged in the first programming In first engineering of language, i.e., the code for executing above system order is write into the first engineering code, when running the first work Journey, then call instruction can be issued by running to designated position, received the call instruction and passed through the call instruction calling system later Then order executes system command, and then execute the target script of the second programming voice, is reflected to obtain the target script Service logic result information, the subsequent exploitation of the first engineering can be continued according to these result informations, be achieved not With between programming language can common concurrent development project, the exploitation and use of tool platform is greatly facilitated, so that different compile Cheng Yuyan can respectively play the chief, and utilize mutually.
As described in above-mentioned steps S3, above-mentioned first parameter is relevant to the first engineering and transports for above-mentioned target script Capable parameter, before receiving call instruction, which has been programmed in the service logic of the first engineering, when needed Calling.It is known that script is also different according to the different postrun result of assignment of variable, so will be compiled by second The specifying variable in exploitation script that Cheng Yuyan writes is substituted for above-mentioned first parameter, i.e., by the first parameter assignment to above-mentioned specified Then variable executes the target script to generate above-mentioned target script.Citing ground, when needing to carry out interface calling or data Library access (as increase, delete, search or change), at this moment then can by by the specifying variable in corresponding script be substituted for Calling interface or the parameter for accessing database form the target script that can be performed, then execute above-mentioned target script, real in this way The parameter transmitting across programming language is showed.
As described in above-mentioned steps S4, above-mentioned return value is raw by having executed the result information obtained after above-mentioned target script At specifically, after the completion of above-mentioned target script is performed, the result information executed is stored to a temporary file In, read the result information in temporary file then to generate corresponding return value.Above-mentioned return value reflects above-mentioned performance objective It is after script as a result, its form of expression can be character string, digital combination, key assignments, code or character etc., for example, return Value can be an application number such as YD201809076654, and the down-stream of the first engineering is then completed according to return value, is such as opened Hair or operation, through the above steps to the interconnection of realization the first programming language and second programming language.
In one embodiment, above-mentioned steps S3, comprising:
Step S30: specified node is parsed according to the system command, the specified node corresponds to the exploitation script Specified logic module;
Step S31: go out the specified logic module of the exploitation script according to the specified node checks, described specify is patrolled The specifying variable collected in module is substituted for corresponding first parameter of first engineering, to form the target script.
As described in above-mentioned steps S30, above-mentioned specified node be for in above-mentioned exploitation script specify service logic into A kind of limitation parameter of row operation, the i.e. specified logic module of the specified corresponding exploitation script of node.In the present embodiment, according to system System order parses above-mentioned specified node in the service logic from the first engineering, which can be preset by developer, Due to specifying the corresponding specified logic module of node, so it is corresponding that node can be specified to search in above-mentioned exploitation script according to this Specified logic module, is then substituted for above-mentioned first parameter for the specifying variable in specified logic module, to obtain above-mentioned mesh Mark script.
In one embodiment, before the step S1, comprising:
Step S10: first engineering and the exploitation script are uploaded into svn;
Step S11: first engineering of the svn is detected by assigned frequency, and judges whether first engineering is sent out It changes more;
Step S12: if so, the exploitation script is copied under the first specified path, first specified path is The path that the exploitation script can be read out when executing the system command.
In the present embodiment, above-mentioned svn (Subversion) is the version control system of an open source code, can be used for putting Above-mentioned first engineering of operation and target script, and the version and access path of detection target script are set and trigger, it is above-mentioned specified Frequency can be user's self-setting, and specifically, above-mentioned first programming language is Java, in a jenkins (open source software item Mesh is a kind of continuous integrating tool based on Java exploitation, for monitoring persistently duplicate work, in the present embodiment The first engineering of above-mentioned first programming language exploitation is run in Jenkins platform) building a Job in platform, (Job is jenkins Upper smallest executable unit), above-mentioned assigned frequency configures in job, at the appointed time triggers the execution of job, and job executes Shi Huijian Engineering code on svn out, as the job on Jenkins be configured with will be gone every 1 minute detection svn on the first engineering be It is no to have changed, if having changed, can automatic trigger job operation, the first engineering for having changed and exploitation foot are detected from svn This, and exploitation script is copied into the first specified path, which is that can read when executing above-mentioned first engineering To the path of exploitation script.This ensure that the first engineering is in last state and corresponding exploitation script is in and can be read Under path.
In another embodiment, before the step S1, comprising:
Step S13: multiple and different first engineerings and the corresponding exploitation script are uploaded into svn;
Step S14: each first engineering is detected from the svn to different given servers respectively, and right The exploitation script answered copies under the second specified path of each given server, and second specified path is to execute The path that the exploitation script can be read out when the system command.
In the present embodiment, above-mentioned multiple given servers are the multiple servers configured on jenkins platform, i.e., corresponding Multiple execution machines of host where jenkins establish multiple job on jenkins, and each job is corresponding to specify a server, The function of above-mentioned job will be that the first engineering of difference on svn is detected to given server, and above-mentioned first work of the correspondence of detection The exploitation script of journey copies under the second specified path of given server, when so as to the first engineering operation, above-mentioned exploitation script In the path that can be read.When calling above system order, multiple and different first can be separately operable in multiple given servers Engineering, i.e. each first engineering correspond to a given server, may be performed simultaneously the first multiple and different engineerings in this way, no With waiting or in order execute;And be distributed to pressure is executed on different servers, avoid individual server pressure excessive.
In one embodiment, after the step S3, comprising:
Step S5: execution journal is generated according to the event for executing the target script, the execution journal is record Execute the log of the process of the target script;
Step S6: the execution journal is read by assigned frequency, and the position of reading is rested on into the execution journal Last character.
It, can be above-mentioned according to executing when executing above-mentioned target script according to above system order as described in above-mentioned steps S5 The event of target script generates execution journal, that is, generates the real-time logs of the corresponding target script, at this moment can be the execution day Will prints on current platform, so as to subsequent reference processing.Citing ground, when executing jmeter script, can generate one The log journal file of jmeter, and the information for executing jmeter scenario process is constantly written in the journal file.
As described in above-mentioned steps S6, above-mentioned assigned frequency can be arranged according to the actual situation by user, and such as 2 seconds, then every 2 seconds Primary above-mentioned execution journal is read, and the position of reading is rested on to the last character of execution journal, that is, while reading Vernier is always navigated into last character, thus guarantee that the content read every time is all docked at the ending of last reading, It after reading can be by the page of content real-time display to current platform, to realize the real-time output of log.
The functional based method of the built-in reading file of java offer can be used in specific position fixing process, and this method can be realized often Vernier is located in behind the last character of last line after secondary reading file, after file is added content, is adjusted again With the method for the reading file, log content can be then read from last time vernier.It, can according to above-mentioned steps S5 and step S6 It is wrong when above-mentioned target script, which is run, to malfunction with the information for the execution journal that real time inspection runs above-mentioned target script and generates False information can export in log, to handle in time.
In one embodiment, after the step S3, comprising:
Step S7: whether the indicator for judging user's input is halt instruction;
Step S8: if so, stopping executing the target script according to the halt instruction.
As described in above-mentioned steps S7-S8, user can stop performance objective script by order out of service, it is specific and Stop button is arranged in speech, issues indicator when stop button when the user clicks, and system judges that the indicator of user's input is No is halt instruction, if so, i.e. system receives the halt instruction that user inputs, calls kill order in turn according to halt instruction Above-mentioned target script out of service.
In one embodiment, after the step S4, comprising:
Step S5 ': displayed page is generated according to the return value;
Step S6 ': the displayed page is shown.
As described in above-mentioned steps S5 ' and S6 ', after receiving return value, that is, life after the complete script of above-mentioned operation is received At result information after, result information can be further processed, for example this return value can be saved in an object In file, in case in the present embodiment, return value can be generated displayed page needed for successive projects exploitation, such as directly show In front end page, or migrates into the pattern of some HTML and show again.
The above-mentioned method based on the more programming language interconnection of data processing, further includes: multiple threads are established, then in each institute It states and is respectively completed above-mentioned steps S1-S4 in thread.In the present embodiment, in order to save the runing time of the first engineering, establish multiple Thread, when initiating to make several, can set for making number and make several stroke counts, start after making number, each pen all can be established individually One new thread, the java code of per thread can all go individually to run a target script.
Device referring to Fig. 2, based on the more programming language interconnection of data processing in the present embodiment, comprising:
Command unit 100 is received, call instruction is used for, the call instruction is used to indicate the fortune of the first programming language script Row is converted into the operation of the second programming language script;
Call instruction unit 200, for calling the system command of corresponding second programming language, institute according to the call instruction The order that system command is the first engineering operation target script is stated, first engineering is the business write by the first programming language Logic, the target script are service logic corresponding first engineering and to be write by second programming language Script;
Alternative parameter unit 300, the exploitation foot for will be write by second programming language according to the system command Specifying variable in this is substituted for corresponding first parameter of first engineering, to form the target script, and described in execution Target script;
Unit 400 is returned the result, the result information for that will execute the target script generates return value, and according to institute The down-stream that return value completes first engineering is stated, to realize first programming language and second programming language Interconnection.
As described in above-mentioned reception command unit 100 and call instruction unit 200, above-mentioned more programming language interconnection refer to two Mutual Transfer Parameters are carried out between different programming languages or engineering is called, executes what the programming language being different from was write Script, engineering herein are that the project of service logic (code) realization is write by programming language;It is understood that the prior art In, programming language includes a variety of, such as Java, jmeter, and above system order is (such as windows system in a system System, Linux system etc.) execute above-mentioned programming language script order, in the present embodiment, above-mentioned call instruction for call with The system command of the second different programming language of first programming language classification, it is current to run work meeting when executing system command It is the script for executing the second programming language and writing from the first engineering transfer that the first programming language is write is executed, i.e., above-mentioned calling refers to The operation for being used to indicate the first programming language script is enabled to be converted into the instruction of the operation of the second programming language script, such as the first programming Language is Java, and an engineering is developed in Java, and wherein needs to use the service logic that one section of jmeter had been developed, I.e. above-mentioned second programming language is jmeter, and the text presentation mode of above-mentioned service logic is above-mentioned exploitation script, at this time can be with Above system order is called according to above-mentioned call instruction, the system command is for executing that section developed in above-mentioned jmeter Service logic.
In one embodiment, the system command of the second programming language is first packaged in the first engineering of the first programming language In, i.e., the code for executing above system order is write into the first engineering code, when running the first engineering, then runs to specified Position can trigger sending call instruction, receive the call instruction and pass through the call instruction calling system order later, then hold Row system command, and then the target script of the second programming voice is executed, to obtain the service logic that the target script is reflected Result information, the subsequent exploitation of the first engineering can be continued according to these result informations, different programming languages have been achieved Between can common concurrent development project, the exploitation and use of tool platform is greatly facilitated, so that different programming languages can be with The chief is respectively played, and is utilized mutually.
As described in above-mentioned alternative parameter unit 300, above-mentioned first parameter is relevant to the first engineering and is used for above-mentioned mesh The parameter of script operation is marked, before receiving call instruction, which has been programmed in the service logic of the first engineering, It calls when needed.It is known that script is also different according to the different postrun result of assignment of variable, so will The specifying variable in exploitation script write by the second programming language is substituted for above-mentioned first parameter, i.e., gives the first parameter assignment Then above-mentioned specifying variable executes the target script to generate above-mentioned target script.Citing ground, when needing to carry out interface tune With or database access (as increase, delete, search or change), at this moment then can be by by the specifying variable in corresponding script It is substituted for calling interface or is accessed the parameter of database, forms the target script that can be performed, then execute above-mentioned target foot This, has been achieved the parameter transmitting across programming language.
It is above-mentioned return the result unit 400 as described in, above-mentioned return value is by having executed the knot obtained after above-mentioned target script Fruit information generates, and specifically, after the completion of above-mentioned target script is performed, the result information executed is stored to one and faces When file in, then read temporary file in result information to generate corresponding return value.Above-mentioned return value reflection is above-mentioned to hold It is after row target script as a result, its form of expression can be character string, digital combination, key assignments, code or character etc., than Such as, return value can be an application number such as YD201809076654, and the rear onward encoding of the first engineering is then completed according to return value Sequence is such as developed or is run, through the above steps to the interconnection of realization the first programming language and second programming language.
In one embodiment, above-mentioned alternative parameter unit 300, comprising:
Parsing subunit is opened described in the specified node correspondence for parsing specified node according to the system command Send out the specified logic module of script;
Subelement is replaced, for going out the specified logic module of the exploitation script according to the specified node checks, by institute It states the specifying variable in specified logic module and is substituted for corresponding first parameter of first engineering, to form the target foot This.
As described in above-mentioned parsing subunit, above-mentioned specified node is for the service logic specified in above-mentioned exploitation script A kind of limitation parameter run, the i.e. specified logic module of the specified corresponding exploitation script of node.In the present embodiment, foundation System command parses above-mentioned specified node in the service logic from the first engineering, which can be pre- by developer If due to the logic module for specifying node corresponding specified, so node can be specified to search in above-mentioned exploitation script pair according to this Then specifying variable in specified logic module is substituted for above-mentioned first parameter, to obtain by the specified logic module answered State target script.
In one embodiment, the device based on the more programming language interconnection of data processing, comprising:
First uploading unit, for first engineering and the exploitation script to be uploaded to svn;
Judging unit is detected, for detecting first engineering of the svn by assigned frequency, and judges first work Whether journey changes;
The exploitation script when for judging that first engineering changes, is copied to first by the first copied cells Under specified path, first specified path is the road that can be read out to the exploitation script when executing the system command Diameter.
In the present embodiment, above-mentioned svn (Subversion) is the version control system of an open source code, can be used for putting Set and trigger above-mentioned first engineering of operation and target script, and the version and access path of detection target script, above-mentioned finger Determining frequency can be user's self-setting, and specifically, above-mentioned first programming language is Java, in a jenkins (open source software Project is a kind of continuous integrating tool based on Java exploitation, for monitoring persistently duplicate work, in the present embodiment The first engineering of above-mentioned first programming language exploitation is run in Jenkins platform) building a Job in platform, (Job is jenkins Upper smallest executable unit), above-mentioned assigned frequency configures in job, at the appointed time triggers the execution of job, and job executes Shi Huijian Engineering code on svn out, as the job on Jenkins be configured with will be gone every 1 minute detection svn on the first engineering be It is no to have changed, if having changed, can automatic trigger job operation, the first engineering for having changed and exploitation foot are detected from svn This, and exploitation script is copied into the first specified path, which is that can read when executing above-mentioned first engineering To the path of exploitation script.This ensure that the first engineering is in last state and corresponding exploitation script is in and can be read Under path.
In another embodiment, the device based on the more programming language interconnection of data processing, comprising:
Second uploading unit, for uploading to multiple and different first engineerings and the corresponding exploitation script svn;
Copied cells are detected, for detecting each first engineering from the svn to different specified services respectively Device, and the corresponding exploitation script is copied under the second specified path of each given server, described second is specified Path is the path that can be read out to the exploitation script when executing the system command.
In the present embodiment, above-mentioned multiple given servers are the multiple servers configured on jenkins platform, i.e., corresponding Multiple execution machines of host where jenkins establish multiple job on jenkins, and each job is corresponding to specify a server, The function of above-mentioned job will be that the first engineering of difference on svn is detected to given server, and above-mentioned first work of the correspondence of detection The exploitation script of journey copies under the second specified path of given server, when so as to the first engineering operation, above-mentioned exploitation script In the path that can be read.When calling above system order, multiple and different first can be separately operable in multiple given servers Engineering, i.e. each first engineering correspond to a given server, may be performed simultaneously the first multiple and different engineerings in this way, no With waiting or in order execute;And be distributed to pressure is executed on different servers, avoid individual server pressure excessive.
In one embodiment, the device based on the more programming language interconnection of data processing, comprising:
Log unit is generated, for generating execution journal, the execution according to the event for executing the target script Log is the log for the process that record executes the target script;
Reading position unit for reading the execution journal by assigned frequency, and the position of reading is rested on described The last character of execution journal.
As described in above-mentioned generation log unit, when executing above-mentioned target script according to above system order, meeting basis is held The event of the above-mentioned target script of row generates execution journal, that is, generates the real-time logs of the corresponding target script, at this moment can be this Execution journal prints on current platform, so as to subsequent reference processing.Citing ground, when executing jmeter script, can generate one The log journal file of a jmeter, and the information for executing jmeter scenario process is constantly written in the journal file.
As described in above-mentioned reading position unit, above-mentioned assigned frequency can be arranged according to the actual situation by user, and such as 2 seconds, then Primary above-mentioned execution journal was read every 2 seconds, and the position of reading is rested on to the last character of execution journal, that is, was read While vernier always navigated into last character, to guarantee that the content read every time all dock the last knot read It, after reading can be by the page of content real-time display to current platform, to realize the real-time output of log at tail.
The functional based method of the built-in reading file of java offer can be used in specific position fixing process, and this method can be realized often Vernier is located in behind the last character of last line after secondary reading file, after file is added content, is adjusted again With the method for the reading file, log content can be then read from last time vernier.According to above-mentioned generation log unit and reading Position units are taken, above-mentioned target script can be run with real time inspection and the information of execution journal that generates, when above-mentioned target script When operation error, error message can be exported in log, to handle in time.
In one embodiment, the device based on the more programming language interconnection of data processing, comprising:
Stop unit is judged, for judging whether the indicator of user's input is halt instruction;
Stopping execution unit, when for judging the indicator of user's input for halt instruction, then referring to according to the stopping It enables and stops executing the target script.
In the present embodiment, user can stop performance objective script by order out of service, specifically, setting stops Only button, issues indicator when the user clicks when stop button, system judges whether the indicator of user's input is stopping Instruction calls kill order out of service in turn if so, i.e. system receives the halt instruction that user inputs according to halt instruction Above-mentioned target script.
In one embodiment, the device based on the more programming language interconnection of data processing, further includes:
Units of pages is generated, for generating displayed page according to the return value;
Displayed page unit, for the displayed page to be shown.
In the present embodiment, after receiving return value, that is, the result information generated after the complete script of above-mentioned operation is received Afterwards, result information can be further processed, for example this return value can be saved in an obj ect file, in case after Needed for continuous engineering development, in the present embodiment, return value can be generated into displayed page, such as directly shown in front end page, or Person migrates into the pattern of some HTML and shows again.
Referring to Fig. 3, a kind of computer equipment is also provided in the embodiment of the present invention, which can be server, Its internal structure can be as shown in Figure 3.The computer equipment includes processor, the memory, network connected by system bus Interface and database.Wherein, the processor of the Computer Design is for providing calculating and control ability.The computer equipment is deposited Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program And database.The internal memory provides environment for the operation of operating system and computer program in non-volatile memory medium.It should The database of computer equipment is for storing all data required when more programming languages are interconnected.The net of the computer equipment Network interface is used to communicate with external terminal by network connection.To realize a kind of base when the computer program is executed by processor In the method for the more programming language interconnection of data processing.
Above-mentioned processor executes the step of above-mentioned method based on the more programming language interconnection of data processing: receiving calling and refers to It enables, the operation that the call instruction is used to indicate the first programming language script is converted into the operation of the second programming language script;According to The system command of corresponding second programming language is called according to the call instruction, the system command is the first engineering operation target foot This order, first engineering be the service logic write by the first programming language, and the target script is correspondence described the One engineering and the script of service logic to be write by second programming language;It will be by described according to the system command The specifying variable in exploitation script that second programming language is write is substituted for corresponding first parameter of first engineering, to be formed The target script, and execute the target script;Will execute the target script result information generate return value, and according to The down-stream of first engineering is completed, according to the return value to realize first programming language and second programming language The interconnection of speech.
Above-mentioned computer equipment, the above-mentioned exploitation script that will be write by second programming language according to the system command In specifying variable be substituted for corresponding first parameter of first engineering, the step of to form the target script, comprising: according to Specified node is parsed according to the system command, the specified node corresponds to the specified logic module of the exploitation script;Foundation The specified node checks go out the specified logic module of the exploitation script, and the specifying variable in the specified logic module is replaced Corresponding first parameter of first engineering is changed into, to form the target script.
In one embodiment, before the step of above-mentioned reception call instruction, comprising: by first engineering and described Exploitation script uploads to svn;First engineering of the svn is detected by assigned frequency, and whether judges first engineering It changes;If so, the exploitation script is copied under the first specified path, first specified path is described in execution The path that the exploitation script can be read out when system command.
In one embodiment, before the step of above-mentioned reception call instruction, comprising: by multiple and different first works Journey and the corresponding exploitation script upload to svn;Each first engineering is detected from the svn to different respectively Given server, and the corresponding exploitation script is copied under the second specified path of each given server, it is described Second specified path is the path that can be read out to the exploitation script when executing the system command.
In one embodiment, the above-mentioned exploitation script that will be write by second programming language according to the system command In specifying variable be substituted for corresponding first parameter of first engineering, to form the target script, and execute the mesh After the step of marking script, comprising: generate execution journal, the execution journal according to the event for executing the target script The log of the process of the target script is executed for record;The execution journal is read by assigned frequency, and by the position of reading Rest on the last character of the execution journal.
In one embodiment, in the above-mentioned script that will be write by second programming language according to the system command Specifying variable is substituted for corresponding first parameter of first engineering, to form the target script, and executes the target foot After this step of, comprising: whether the indicator for judging user's input is halt instruction;If so, referring to according to the stopping It enables and stops executing the target script.
In one embodiment, above-mentioned that the result information for having executed the target script is generated into return value, and according to institute After stating the step of return value completes the down-stream of first engineering, comprising: generate displayed page according to the return value; The displayed page is shown.
It will be understood by those skilled in the art that structure shown in Fig. 3, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme.
One embodiment of the invention also provides a kind of computer readable storage medium, is stored thereon with computer program, calculates Machine program realizes a kind of method based on the more programming language interconnection of data processing when being executed by processor, specifically: it receives and calls Instruction, the operation that the call instruction is used to indicate the first programming language script are converted into the operation of the second programming language script; The system command of corresponding second programming language is called according to the call instruction, the system command is the first engineering operation target The order of script, first engineering are the service logic write by the first programming language, and the target script is described in correspondence First engineering and the script of service logic to be write by second programming language;It will be by institute according to the system command The specifying variable stated in the exploitation script that the second programming language is write is substituted for corresponding first parameter of first engineering, with shape At the target script, and execute the target script;The result information for having executed the target script is generated into return value, and The down-stream of first engineering is completed, according to the return value to realize first programming language and second programming The interconnection of language.
Above-mentioned computer readable storage medium, it is above-mentioned to be write by second programming language according to the system command Specifying variable in exploitation script is substituted for corresponding first parameter of first engineering, to form the step of the target script Suddenly, comprising: parse specified node according to the system command, the specified node corresponds to the specified logic of the exploitation script Module;The specified logic module for going out the exploitation script according to the specified node checks, will be in the specified logic module Specifying variable is substituted for corresponding first parameter of first engineering, to form the target script.
Above-mentioned computer equipment, the above-mentioned exploitation script that will be write by second programming language according to the system command In specifying variable be substituted for corresponding first parameter of first engineering, the step of to form the target script, comprising: according to Specified node is parsed according to the system command, the specified node corresponds to the specified logic module of the exploitation script;Foundation The specified node checks go out the specified logic module of the exploitation script, and the specifying variable in the specified logic module is replaced Corresponding first parameter of first engineering is changed into, to form the target script.
In one embodiment, before the step of above-mentioned reception call instruction, comprising: by first engineering and described Exploitation script uploads to svn;First engineering of the svn is detected by assigned frequency, and whether judges first engineering It changes;If so, the exploitation script is copied under the first specified path, first specified path is described in execution The path that the exploitation script can be read out when system command.
In one embodiment, before the step of above-mentioned reception call instruction, comprising: by multiple and different first works Journey and the corresponding exploitation script upload to svn;Each first engineering is detected from the svn to different respectively Given server, and the corresponding exploitation script is copied under the second specified path of each given server, it is described Second specified path is the path that can be read out to the exploitation script when executing the system command.
In one embodiment, the above-mentioned exploitation script that will be write by second programming language according to the system command In specifying variable be substituted for corresponding first parameter of first engineering, to form the target script, and execute the mesh After the step of marking script, comprising: generate execution journal, the execution journal according to the event for executing the target script The log of the process of the target script is executed for record;The execution journal is read by assigned frequency, and by the position of reading Rest on the last character of the execution journal.
In one embodiment, in the above-mentioned script that will be write by second programming language according to the system command Specifying variable is substituted for corresponding first parameter of first engineering, to form the target script, and executes the target foot After this step of, comprising: whether the indicator for judging user's input is halt instruction;If so, referring to according to the stopping It enables and stops executing the target script.
In one embodiment, above-mentioned that the result information for having executed the target script is generated into return value, and according to institute After stating the step of return value completes the down-stream of first engineering, comprising: generate displayed page according to the return value; The displayed page is shown.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can store and a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, Any reference used in provided herein and embodiment to memory, storage, database or other media, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, mono- diversified forms of RAM can obtain, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double speed are according to rate SDRAM (SSRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, device, article or the method that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, device of element, article or method.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all utilizations Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content is applied directly or indirectly in other correlations Technical field, be included within the scope of the present invention.

Claims (10)

1. a kind of method based on the more programming language interconnection of data processing characterized by comprising
Call instruction is received, the operation that the call instruction is used to indicate the first programming language script is converted into the second programming language The operation of script;
The system command of corresponding second programming language is called according to the call instruction, the system command is the first engineering The order of operational objective script, first engineering are the service logic write by the first programming language, and the target script is Corresponding first engineering and be the script for the service logic write by second programming language;
The specifying variable in the exploitation script write by second programming language is substituted for according to the system command described Corresponding first parameter of first engineering to form the target script, and executes the target script;
The result information for having executed the target script is generated into return value, and completes first engineering according to the return value Down-stream, to realize the interconnection of first programming language and second programming language.
2. the method according to claim 1 based on the more programming language interconnection of data processing, which is characterized in that the foundation Specifying variable in the exploitation script write by second programming language is substituted for first engineering by the system command Corresponding first parameter, the step of to form the target script, comprising:
Specified node is parsed according to the system command, the specified node corresponds to the specified logic mould of the exploitation script Block;
The specified logic module for going out the exploitation script according to the specified node checks, by the finger in the specified logic module Variable replacement is determined at corresponding first parameter of first engineering, to form the target script.
3. the method according to claim 1 based on the more programming language interconnection of data processing, which is characterized in that the reception Before the step of call instruction, comprising:
First engineering and the exploitation script are uploaded into svn;
First engineering of the svn is detected by assigned frequency, and judges whether first engineering changes;
If so, the exploitation script is copied under the first specified path, first specified path is to execute the system The path that the exploitation script can be read out when order.
4. the method according to claim 1 based on the more programming language interconnection of data processing, which is characterized in that the reception Before the step of call instruction, comprising:
Multiple and different first engineerings and the corresponding exploitation script are uploaded into svn;
Each first engineering is detected from the svn to different given servers respectively, and the corresponding exploitation Script copies under the second specified path of each given server, and second specified path is to execute the system command When can be to the path that be read out of exploitation script.
5. the method according to claim 1 based on the more programming language interconnection of data processing, which is characterized in that the foundation Specifying variable in the exploitation script write by second programming language is substituted for first engineering by the system command Corresponding first parameter, to form the target script, and after the step of executing the target script, comprising:
Execution journal is generated according to the event for executing the target script, the execution journal is that record executes the target The log of the process of script;
The execution journal is read by assigned frequency, and the position of reading is rested on to the last character of the execution journal Symbol.
6. the method according to claim 1 based on the more programming language interconnection of data processing, which is characterized in that the foundation Specifying variable in the exploitation script write by second programming language is substituted for first engineering by the system command Corresponding first parameter, to form the target script, and after the step of executing the target script, comprising:
Whether the indicator for judging user's input is halt instruction;
If so, stopping executing the target script according to the halt instruction.
7. the method according to claim 1 based on the more programming language interconnection of data processing, which is characterized in that described to hold The result information of the target script of having gone generates return value, and completes according to the return value rear onward encoding of first engineering After the step of sequence, comprising:
Displayed page is generated according to the return value;
The displayed page is shown.
8. a kind of device based on the more programming language interconnection of data processing characterized by comprising
Command unit is received, for receiving call instruction, the call instruction is used to indicate the operation of the first programming language script It is converted into the operation of the second programming language script;
Call instruction unit, it is described for calling the system command of corresponding second programming language according to the call instruction System command is the order of the first engineering operation target script, and first engineering is to be patrolled by the business that the first programming language is write Volume, the target script is the foot of service logic corresponding first engineering and to be write by second programming language This;
Alternative parameter unit, the finger developed in script for will be write by second programming language according to the system command Variable replacement is determined into corresponding first parameter of first engineering, to form the target script, and executes the target script;
Unit is returned the result, the result information for that will execute the target script generates return value, and according to the return Value completes the down-stream of first engineering, to realize the interconnection of first programming language and second programming language.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201811527212.XA 2018-12-13 2018-12-13 Method, apparatus and computer equipment based on the more programming language interconnection of data processing Pending CN109799980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811527212.XA CN109799980A (en) 2018-12-13 2018-12-13 Method, apparatus and computer equipment based on the more programming language interconnection of data processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811527212.XA CN109799980A (en) 2018-12-13 2018-12-13 Method, apparatus and computer equipment based on the more programming language interconnection of data processing

Publications (1)

Publication Number Publication Date
CN109799980A true CN109799980A (en) 2019-05-24

Family

ID=66556610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811527212.XA Pending CN109799980A (en) 2018-12-13 2018-12-13 Method, apparatus and computer equipment based on the more programming language interconnection of data processing

Country Status (1)

Country Link
CN (1) CN109799980A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502241A (en) * 2019-08-23 2019-11-26 深圳前海环融联易信息科技服务有限公司 Intelligent contract online editing method, apparatus, computer equipment and storage medium
CN111522536A (en) * 2020-04-21 2020-08-11 艾普阳科技(深圳)有限公司 Method for calling programming language and related equipment thereof
CN111782420A (en) * 2020-06-24 2020-10-16 中国工商银行股份有限公司 Information processing method, device, equipment and medium based on Java Web framework
CN112799715A (en) * 2021-01-28 2021-05-14 中国工商银行股份有限公司 Heterogeneous system adaptation method and device
CN113342329A (en) * 2021-05-31 2021-09-03 北京顶象技术有限公司 Multi-language fusion modeling system
CN114443019A (en) * 2020-11-03 2022-05-06 福建天泉教育科技有限公司 Asynchronous calling method and terminal for graphical programming multi-language interaction thread
CN110874214B (en) * 2019-11-14 2023-06-16 北京明略软件系统有限公司 Function calling method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242409A (en) * 2008-01-18 2008-08-13 南京邮电大学 An efficient filtering method for multi-language network data packets
CN106445564A (en) * 2016-12-23 2017-02-22 携程旅游网络技术(上海)有限公司 Mixed reference method and mixed reference system for items with different programming languages of platform
CN107066265A (en) * 2017-03-15 2017-08-18 杭州华澜微电子股份有限公司 The interconnecting method and system of different programming languages

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242409A (en) * 2008-01-18 2008-08-13 南京邮电大学 An efficient filtering method for multi-language network data packets
CN106445564A (en) * 2016-12-23 2017-02-22 携程旅游网络技术(上海)有限公司 Mixed reference method and mixed reference system for items with different programming languages of platform
CN107066265A (en) * 2017-03-15 2017-08-18 杭州华澜微电子股份有限公司 The interconnecting method and system of different programming languages

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
XINJIU3355: "如何在jmeter中调用自己写的java工具包", pages 1 - 3, Retrieved from the Internet <URL:https://jingyan.baidu.com/article/e9fb46e17e35707520f76647.html> *
止步前行: "持续集成工具Jenkins结合SVN的安装和使用", pages 1 - 22, Retrieved from the Internet <URL:https://blog.csdn.net/zxd1435513775/article/details/80618640> *
百度网友669AB0C: "一个编程语言对另一个编程语言的某个库进行封装是什么意思,怎么实现的?", pages 1, Retrieved from the Internet <URL:https://zhidao.baidu.com/question/414030901.html 1/> *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502241A (en) * 2019-08-23 2019-11-26 深圳前海环融联易信息科技服务有限公司 Intelligent contract online editing method, apparatus, computer equipment and storage medium
CN110874214B (en) * 2019-11-14 2023-06-16 北京明略软件系统有限公司 Function calling method and device, electronic equipment and storage medium
CN111522536A (en) * 2020-04-21 2020-08-11 艾普阳科技(深圳)有限公司 Method for calling programming language and related equipment thereof
CN111782420A (en) * 2020-06-24 2020-10-16 中国工商银行股份有限公司 Information processing method, device, equipment and medium based on Java Web framework
CN111782420B (en) * 2020-06-24 2023-09-05 中国工商银行股份有限公司 Information processing method, device, equipment and medium based on Java Web framework
CN114443019A (en) * 2020-11-03 2022-05-06 福建天泉教育科技有限公司 Asynchronous calling method and terminal for graphical programming multi-language interaction thread
CN112799715A (en) * 2021-01-28 2021-05-14 中国工商银行股份有限公司 Heterogeneous system adaptation method and device
CN113342329A (en) * 2021-05-31 2021-09-03 北京顶象技术有限公司 Multi-language fusion modeling system

Similar Documents

Publication Publication Date Title
CN109799980A (en) Method, apparatus and computer equipment based on the more programming language interconnection of data processing
CN108319547B (en) Test case generation method, device and system
US10618137B2 (en) Automated constructing method of cloud manufacturing service and cloud manufacturing system
CN109189684A (en) Automatic interface testing method based on Python
CN109189469B (en) Reflection-based android application micro-servitization method and system
US6941546B2 (en) Method and apparatus for testing a software component using an abstraction matrix
CN109344642A (en) Interface rules method of calibration, device, computer equipment and storage medium
CN109582563B (en) Test method, device, computer equipment and storage medium for test cases
CN109766263A (en) Automatic test analysis and processing method, device, computer equipment and storage medium
CN109240666B (en) Function calling code generation method and system based on call stack and dependent path
CN111984228B (en) Interface document processing method and device, computer equipment and storage medium
WO2017078686A1 (en) Translation of natural language into user interface actions
CN115562690B (en) Algorithm service processing method, device and medium based on Docker container
CN112363953B (en) Interface test case generation method and system based on crawler technology and rule engine
CN105556505A (en) Legacy system
CN109766261A (en) Coverage test method, device, computer equipment and storage medium
CN109783533A (en) Collecting method, device, computer equipment and storage medium
CN110471838A (en) Method of calibration, device, computer equipment and the storage medium of test case
CN112328219A (en) Service access processing method, device and system and computer equipment
CN107451058A (en) A kind of software development methodology and device
CN110515514A (en) A kind of data processing method, device and storage medium
CN113138808B (en) Integration method, device, computer equipment and storage medium
US20220374345A1 (en) Techniques for similarity determination across software testing configuration data entities
CN109710517A (en) Integration test method, device and computer equipment based on automated test tool
CN105027089B (en) Core functions detector

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