CN106293863B - The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling - Google Patents

The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling Download PDF

Info

Publication number
CN106293863B
CN106293863B CN201610599948.2A CN201610599948A CN106293863B CN 106293863 B CN106293863 B CN 106293863B CN 201610599948 A CN201610599948 A CN 201610599948A CN 106293863 B CN106293863 B CN 106293863B
Authority
CN
China
Prior art keywords
code
service logic
interception
intercept
intercepts
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.)
Active
Application number
CN201610599948.2A
Other languages
Chinese (zh)
Other versions
CN106293863A (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.)
Beijing Beson Cloud Ltd By Share Ltd
Original Assignee
Beijing Beson Cloud Ltd By Share 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 Beijing Beson Cloud Ltd By Share Ltd filed Critical Beijing Beson Cloud Ltd By Share Ltd
Priority to CN201610599948.2A priority Critical patent/CN106293863B/en
Publication of CN106293863A publication Critical patent/CN106293863A/en
Application granted granted Critical
Publication of CN106293863B publication Critical patent/CN106293863B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The method and system for realizing that system function dynamic expansion is replaced are compiled by multilingual cloud the invention discloses a kind of, the present invention is according to label is intercepted, and storage corresponds to the service logic interception code for needing the system function extended in script repository;Blocking apparatus code is compiled at corresponding position addition according to interception label when local compiling, is compiled further according to blocking apparatus code by cloud and corresponding service logic interception code is compiled and is run again.The present invention can add corresponding service logic according to business demand in real time online and intercept code, it is introduced directly into and runs after code is compiled so as to compile to intercept service logic by cloud in system is run, it has no effect to code before, realize dynamic script engine system, then the extension of system function dynamic interception is realized, flexibility, opening, maintainability and the scalability of expanding of system function are improved.

Description

The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling
Technical field
The present invention relates to software dynamic expansion fields, are more particularly to a kind of compile by multilingual cloud and realize system function The method and system of dynamic expansion replacement.
Background technique
With the fast development of science and technology, the continuous improvement of social informatization degree, computer application has been penetrated into The every field of society, competition and diversified customer demand between enterprise, causes enterprise application software system more and more huger It is big and complicated.Client changes frequently the individual demand of software systems, while requiring the development cycle short, general mark in reality The product of standardization is difficult to meet the business demand of client's complexity.System development finishes, and has met the needs of users, but works as user When constantly proposing new requirement, original software architecture can not may be competent at the demand of newly-increased task, need to set again Meter develops this application system, serious waste manpower and other unnecessary resources.Meet a visitor even if developing again The application system of the customization demand at family can not guarantee that the demand of user will not change again or have new customer demand simultaneously It proposes.So if special personalized customization is done in the continuous upgrading of software systems to client, by the quality of software, efficiency, Management brings serious problems.More codes is added on the basis of original design simultaneously, original code can be by continuous rotten Erosion, the architecture of system will be also increasingly difficult to safeguard, it is seen that the architecture design at initial stage is to meet the standard of a part Customer demand is not able to satisfy all demands, if the software systems of enterprise allow this unpredictable variation to start, that is whole The code of a software systems will not be controlled.
Below by a scene, the variability of customer requirement is illustrated:
Example: in some online recruitment system, logic originally is, is all new addition one when resume enters system Record thus has a large amount of duplicate resumes and there are (mailbox, mobile phone are different) in systems, is unfavorable for interviewer and checks letter It goes through;Present client A proposes new demand, and when the information automatic log-on of applicant's resume, system is needed according to applicant Identification card number, come detect judge this applicant whether before whether there is in systems, and if so, two resumes are believed Breath is merged and is saved again, if there is no being then added;And the demand of another client B is, when system enters resume When, judged according to cell-phone number or mailbox, if having existed this resume in system, is no longer added;The demand of client C is, when This resume is frequently delivered whithin a period of time to be entered system greater than predetermined number of times and meets primary condition set by position, then certainly It moves and sends an envelope mail to interviewer, show that this applicant has strong registration hope, interviewer should pay close attention;Client D's Demand is to need to carry out applicant's scoring according to the element in resume when resume enters system, for example 985,211 school adds 10 points, 6 grades of English plus 8 points, 4 grades of English plus 6 points etc., integrated ordered screening operation is carried out convenient for interviewer;The demand of client E Be need to be selected according to the specific custom rule and specified conditions Automatic sieve of client qualified resume so that automatically into Enter interview stage or superseded state, if also needing to send short message and mail arrangement interview to interviewer into the interview stage, into Row prompting etc..It can be seen that client for the operation expanding demand numerous and complicated of system from the above case, it is different, such as How customers as center, fast custom, which is spread, issues the individualized software system of client of being adapted to, extremely for client and enterprise It closes important.
It in the prior art, is all in corresponding functional module using soft when adding in systems or extending new function Part developing instrument directly adds code logic, then carries out manual recompility, packing, deployment, this method is for software Developer's larger workload to some degree, working efficiency is low, and due to being directly to add in existing system module Add code, error rate is higher, while may destroy the architectural configurations of original system.Although currently passing through certain technology Factory/IOC/AOP mechanism, solves this problem in that a certain extent, can be directly injected into during system is in differentiation New code, the architectural configurations without changing original system, but these modes are also present in various limitations and deficiency, pass through The patented technology retrieved below is explained.
1, patent " a kind of water analysis calculating service system for supporting on-the-flier compiler of 102708452 A of Patent No. CN System ", disclose following technical characteristic: water analysis algorithmic code user can voluntarily input, then by calling on-the-flier compiler Server carries out on-the-flier compiler to text codes, generates new dynamic link library or updates already present dynamic link library, and is real Shi Gengxin water analysis algorithms library carrys out the fixed algorithm of dynamic replacement with this, achievees the purpose that expansion system algorithm, improve flexibility And opening.There are the deficiencies of the following aspects for the invention: be on-the-flier compiler used in the invention being first Microsoft CodeDOM ICodeCompiler compiles mode, is utilized in .NET Framework comprising an entitled " code document object The mechanism of model " (CodeDOM), which allows the developer for the program for writing source code at runtime, according to expression The single model of presented code is compiled with programming language text generation compilation of source code as a result, it is substantially complete One flight data recorder, result is success or failure after can only providing compiling, compiling;Secondly code is compiled each time When, it can all restart another new csc.exe or vbc.exe compilation process, ICodeCompiler except current process Compiling mode is only the packaging to csc.exe and vbc.exe, this old mode, by test, if in multiple script generations For code simultaneously when compiling, CPU causes certain pressure, steeply rises CPU usage, in addition restart except current process it is new into Journey removes compilation script code, has one for the stability and performance of a system, and the input and output of compiling result to itself Fixed influence.
2, patent " the pluggable Web service dynamic call based on DotNet platform of Patent No. CN 101534324A Method " using on-the-flier compiler generation Client Agent class, it is decided whether to call remote Web services according to configuration file, be held Row calls the service logic method of remote Web services, the result that method executes finally is returned to software systems, this is in certain journey The degree of coupling between caller and Web service is reduced on degree, realizing has pluggable property and dynamic call.But it is moved in the invention State compiling is only applied the service logic for deciding whether to call remote web server with this in client and is generated and calls The dynamic proxy that remote service is called, remote Web services service logic is fixed, if system needs to extend, it is also necessary to soft Exploitation, manually compiling, packing, deployment under part developer's line.Secondly, the configuration first read is literary when calling remote Web services Part, the only message of information and separate unit remote web server whether opened of remote service in this configuration file, if open Whether configuration decision systems can call remote Web services, and remote web server information determines which platform service is system will call The Web service of device, configuration here only has a server, rather than has multiple servers, this will can not achieve and patrol business Volume at the same be deployed on multiple servers, realize that the load balancing of service logic is extending transversely and distributed deployment, thus one Multi-user, high concurrent request will not be adapted to by determining degree ceiling system;The WSProxy class said in the invention again is basis Long-range WSDL (Web Services Description Language) description information, generation Client Agent SProxy, and This proxy class of on-the-flier compiler in memory, that on-the-flier compiler used herein equally uses is also CodeDOM ICodeCompiler Compiling mode, shortcoming and deficiency are as described above;WebService delivery protocol used in the invention is SOAP (Simple again Object Access Protocol Simple Object Access Protocol), its internal principle of SOAP is to carry out transmitting data by XML, Due to XML more it is tediously long parsing it is time-consuming, it is much bigger compared to for binary file, can consume more Internet resources and compared with More CPU and memory source, therefore a drawback is also become using XML.
3, the patent " one kind is based on bridge architecture cooperation reflection dynamic technique " of 103823658 A of Patent No. CN provides one Kind based on bridge architecture cooperation reflection dynamic technique, be convenient to program dynamic expansion flexible configuration, it can be achieved that component it is pluggable or even The flexible expansion of code level changes.Step 6 in this invention: reference dynamic reflective, dynamic mapping is established in statement, from configuration file Reading value and to this assignment, the class to be radiated is read in configuration file, is abstracted the base class of variation.There are 2 aspects herein Insufficient: the invention has used reflection technology first, and reflection technology is actually a kind of operation of explanation, inside bottom run mode Need to do many work: binding procedure, the comparison of metadata character string, parameter verification, type checking, safety check generates a large amount of Temporary object etc. can cause great burden to CPU and GC Garbage Collector, and very low in operational efficiency and performance.Secondly, dynamic The service logic of state reflection is relatively-stationary, is to belong to the file of exterior, and these files are to need software development people Member's exploitation, manually dispose manually, is not real pluggable heat deployment in a sense, is not carried out the flexible of code level yet Extension.
4, a kind of patent " multi-data source mvc model framework that elasticity is expansible " of 104484182 A of Patent No. CN mentions For a kind of multi-data source mvc model framework that elasticity is expansible, solve on the interface the same view View in systems, it can be with Flexible choice calls a variety of different data source business logics simultaneously, and user only needs to increase relevant configuration and data by extension The problem of existing application dynamic expansion multi-data source and other related services are not easy can be realized in the mapping code of library table. Its internal principle using be using Spring ioc mode to EB (EntityBean) layer, Service layers (Business Logic), DAO layers (persistence object additions and deletions, which are looked into, to be changed) and PO (the persistence entity object of the data mapping of Object Relational Database HibernateORM seamless integration control) is carried out, is realized by configuration file dynamic assembly.There is the following that can change among these Into the ioc mode of Spring having been used in the invention first, ioc can be added by way of code and configuration, and the invention is The extension that data source is carried out by way of a large amount of configuration files is very cumbersome, and this is to need manually to be configured, Additional maintenance cost is caused, coupled relation only a conventional relationship type number library can only obtain data all in configuration file, Secondly this due to using IOC mode (reflection) that performance issue can be generated, again in Service Business Logic, if necessary Secondary filter working process is carried out to the data source of taking-up, then needs to develop under boostrap, dispose, configuration.
Comprehensive statement above is it is found that exist in the prior art following disadvantage: (1) extension is complicated: code has direct-coupling In existing system or by reflection configuration into system, this makes entire expansion process extremely complex cumbersome, and broken reduction There is the structure of code;(2) reuse of code is low: the code logic newly extended is intended merely to currently developed and is coupled to system In, it reduce the reuse rates of code;(3) performance is lost: doing extend in systems by reflection or configuration mechanism, will lead to and be The performance of system declines a rank.(4) when development cycle long low efficiency: extending or adds new demand, developer's line is needed Under develop again, compile, test, uploading, configuring, being packaged, deployment system, this makes development cycle very long efficiency very low.(5) difficult To safeguard: the application of system developer and technology is possible to that all iteration has been crossed many times, mutual between code in system It calls, be mutually coupled also intricate, the people for not quite understanding system dare not act rashly.Summation function is needed to get over system Come more, team is increasing, and linking up cost, development cost, management cost accordingly can all be multiplied, when system lacks Fall into when, will also result in problem analysis, orientation problem, repair problem time it is longer;As the increase of size of code is also possible to lead Cause the vicious circle of " reparation is more, and defect is more ";A small change is with regard to needing to redeploy entire application system in system. (6) development language limitation: if application system using certain language development, then must also be when demand extends again This language is extended, and can not attempt new programming language or frame, this is also impossible at present using a technology in reality Platform or scheme solve all problems.(7) hardware cost is high-leveled and difficult with horizontal extension: all program codes are in the same of server In one process, horizontal extension difficulty and situation at high cost will lead to, because functions of modules different in system is actually to clothes The requirement of business device is different, and is had plenty of CPU intensive computer type, is needed the stronger CPU processor of performance, have plenty of needs Memory I/O intensive type needs to carry out data buffer storage using a large amount of memories, if infrastructure server required by system pressed Same standard goes to purchase, then hardware cost can be very high.(8) reliability is low: all functions of modules all operate in a process In, a mistake bug in any one functions of modules, such as RAM leakage/CPU Continued, it will it is possible that do to collapse or Slow entire process is dragged, to influence the reliability entirely applied.(9) can not distributed deployment support high concurrent: due to can not Dll or Jar that outside relies on are carried out physical machine with existing system program to efficiently separate, with the continuous upgrading of system And extension, huge in this way and complicated system, it to stretch and be necessary for the flexible of monoblock type, formula can not be efficiently separated and stretched, system The core business point often operated required for middle user may only have 30%, and do now by non-core 70% same Deployment is flexible, cannot reach the maximization intensive use of resource.(10) continuous integrating and delivery are influenced: due to the Pang of operation system Big complicated, in addition extension upgrading many times, so constructing the primary time also can be very very long, the number of failure also can be significantly Increase, if building process mistake, investigation problem also can be extremely difficult.In addition the subtle modification in any point made to system is all It needs to rebuild whole system, redeploy.One system of multiple developer's joint developments, it is also necessary to other be waited to open Hair personnel could dispose after the completion, this greatly reduces the flexibility of team and function delivery frequency;(11) it is in addition beaten in project Very slow, system is opened and runs to be difficult to develop, test, continuous integrating difficulty, deployed environment dependence complexity, technology stack binding, Programming language, frame, the upgrading of database and replacement are extremely difficult etc..
How these problems are coped with, to the flexibility of software systems, opening, maintainability, scalability and software System made higher requirement the respond of market and client.How rapidly to increase, extend, upgrade current mark Quasi- system function is that client is customized, and effectively ensures and promote software development quality and development efficiency, is had become The significant challenge of Software Industry.
Summary of the invention
(1) technical problems to be solved
The technical problem to be solved by the present invention is to how improve the flexibility of expanding of system function, opening, maintainability And scalability, Remote Dynamic expansion system function on the basis of not impacted to original code.
(2) technical solution
In order to solve the above-mentioned technical problems, the present invention provides a kind of multilingual cloud compilings to realize system function dynamic expansion The method of replacement, the described method comprises the following steps:
S1, according to business demand, identify corresponding interception label on needing the method extended;
S2, label is intercepted for each, addition, which corresponds to, needs the service logic of the system function extended to intercept code;
S3, code building identification code is intercepted according to the service logic, and script repository is judged according to the identification code In whether have existed the service logic and intercept code, wherein being stored with the service logic in the script repository intercepts generation Code and corresponding identification code;
If S4, the script repository do not store the service logic being currently generated and intercept code, by what is be currently generated Service logic intercepts code and is saved in the script repository;
S5, according to business demand, when local compiling add at corresponding position according to the interceptions label compiles interception Device code, wherein the blocking apparatus code intercepts code for being woven into corresponding service logic, according to the blocking apparatus Code is compiled by cloud and the corresponding service logic stored in the script repository interception code is compiled and is run again.
Preferably, it includes following information that the service logic, which intercepts code: category of language that code uses, extension intercept generation Code section, the extension intercept the purposes of code, operation time-out time, error process mode, interception mode, intercept rank, Interception function in client.
Preferably, the error process mode includes interrupting and continuing to run.
Preferably, the interception mode includes synchronous intercepting and asynchronous interception.
Preferably, generate the identification code in the step S3 the following steps are included:
Code is intercepted to the service logic and carries out virtual class packaging, and carries out uniqueness Hash, generates MD5 character string.
Preferably, the step S4 specifically includes the following steps:
If the script repository does not store the service logic being currently generated and intercepts code, the service logic is checked Intercepting code whether there is syntax error, and the service logic being currently generated interception code is then saved in by syntax error if it does not exist In the script repository, syntax error then prompts operator if it exists.
Preferably, in the step S1, multiple interception labels are added in the same method.
A kind of system that the replacement of system function dynamic expansion is realized in multilingual cloud compiling, the system comprises intercept label to add Add unit, intercepts code adding unit, intercepts code process unit and compilation run unit;
The interception label adding unit is used to identify corresponding interception on needing the method extended according to business demand Label;
The interception code adding unit is used to intercept each on label, and addition corresponds to the system function for needing to extend The service logic of energy intercepts code;
The interception code process unit is used to intercept code building identification code according to the service logic, and according to described Identification code judges that the service logic whether is had existed in script repository intercepts code, wherein storing in the script repository There is the service logic to intercept code and corresponding identification code;If the script repository does not store the business being currently generated Logic intercepts code, then the service logic being currently generated interception code is saved in the script repository;
The compilation run unit is used for according to business demand, according to the interception label in corresponding position when locally compiling Place's addition compiling blocking apparatus code is set, wherein the blocking apparatus code intercepts code for being woven into corresponding service logic, It is compiled according to the blocking apparatus code by cloud and the corresponding service logic stored in the script repository is intercepted into generation again Code is compiled and runs.
Preferably, it includes following information that the service logic, which intercepts code: category of language that code uses, extension intercept generation Code section, the extension intercept the purposes of code, operation time-out time, error process mode, interception mode, intercept rank, Interception function in client.
Preferably, the error process mode includes interrupting and continuing to run.
(3) beneficial effect
The method and system for realizing that system function dynamic expansion is replaced are compiled by multilingual cloud the present invention provides a kind of, The present invention identifies corresponding interception label on needing the method extended according to business demand;Label is intercepted for each, is added Add and corresponds to the service logic interception code for needing the system function extended;Code building mark is intercepted according to service logic later Code, and judge whether to have existed service logic interception code in script repository according to identification code, wherein script repository In be stored with service logic and intercept code and corresponding identification code;If script repository does not store the business being currently generated and patrols It collects and intercepts code, then the service logic being currently generated interception code is saved in the script repository;Finally according to business Demand locally adds compiling blocking apparatus code according to interception label when compiling, wherein the interception fills at corresponding position It sets code and intercepts code for being woven into corresponding service logic, again deposited the script by cloud compiling according to blocking apparatus code The corresponding service logic stored in storage cavern intercepts code and is compiled and runs.The present invention can move in real time according to business demand State, which remotely passes through to intercept label and blocking apparatus code and run corresponding service logic, intercepts code, so as in system It is compiled in operation by cloud and is introduced directly into and runs after service logic interception code is compiled, have no shadow to code before It rings, realizes dynamic script engine system, then realize the extension of system function dynamic interception, improve expanding of system function Flexibility, opening, maintainability and scalability.
The present invention intercepts label, blocking apparatus code and service logic by setting and intercepts code, recycles dynamic foot This engine system is to make developer that different language can be used in line development, dynamic the functions of modules subdivision in software development Deployment, Dynamic Weave, the scheme of dynamic operation are write with reducing duplicated code, are then compiled, are added when system operation needs When carrying, running and it is woven into the frame of original system, the programming idea of development efficiency can be improved in this set frame system.In the present invention The module of online dynamic scalable script can even give third company's exploitation, improve the cooperation in industry, reach advantage Complementary purpose.After the completion of exploitation, script module function can also be called by other programming systems, can improve weighing for software The property used.Therefore, proposed by the present invention to intercept the dynamic that code is realized by intercepting label, blocking apparatus code and service logic Expandable structure, which develops software architecture, also has extensive Practical significance.
Traditional software development methodology increasingly shows its intrinsic limitation, and requires to change its row at runtime To support dynamic expansion and upgrading.Different, the energy of the present invention that integrates all functions from a program of traditional software architecture It is enough that the function of largely extending is placed in outer remote server, due to the convenience and flexibility of this method, can pass through It is inserted into dynamic script and changes external dynamic script to realize the expansion of software function, improve, this is also that the present invention is logical It crosses where intercepting the advantage that label realizes the exploitation of dynamic script engine architecture
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the flow chart that addition intercepts label in the present invention;
Fig. 2 is the flow chart for adding service logic in the present invention and intercepting code;
Fig. 3 is the flow chart of compilation run in the present invention;
Fig. 4 is the structural schematic diagram of script repository in the present invention;
Fig. 5 is to compile to realize that the device of system function dynamic interception extension replacement is illustrated by multilingual cloud in the present invention Figure;
Fig. 6 is multilingual on-the-flier compiler/execution entire block diagram in the present invention;
Fig. 7 is operation system function local mode of extension structure chart in the present invention;
Fig. 8 is operation system function Remote Expansion model structure chart in the present invention;
Fig. 9 is interception label point of addition schematic diagram in the present invention;
Figure 10 A is the structural schematic diagram of legacy system;
Figure 10 B is expansible system structure diagram in the present invention;
Figure 11 is multilingual dynamic script code listing schematic diagram in the present invention;
Figure 12 is that the service logic added in the present invention intercepts the interface schematic diagram of code Rest;
Figure 13 is the interface schematic diagram added service logic in the present invention and intercept code;
Figure 14 is the interface schematic diagram added service logic in the present invention and intercept the data source code interface of code.
Specific embodiment
Present invention is further described in detail with reference to the accompanying drawings and examples.Following embodiment is for illustrating this hair It is bright, but cannot be used to limit the scope of the invention.
A method of it is compiled by multilingual cloud and realizes the replacement of system function dynamic expansion, the method includes following steps It is rapid:
S1, according to business demand, identify corresponding interception label on needing the method extended;Wherein, in the same side Multiple interception labels can be added in method;
S2, label is intercepted for each, addition, which corresponds to, needs the service logic of the system function extended to intercept code; It includes following information that wherein service logic, which intercepts code: category of language that code uses, extension intercept code segment, the expansion Exhibition intercept code purposes, operation time-out time, error process mode, interception mode, intercept rank, interception function in Client;The error process mode includes interrupting and continuing to run;The interception mode includes synchronous intercepting and asynchronous blocks It cuts;
S3, code building identification code is intercepted according to the service logic, and script repository is judged according to the identification code In whether have existed the service logic and intercept code, wherein being stored with the service logic in the script repository intercepts generation Code code and corresponding identification code;
Wherein, the identification code is generated the following steps are included: intercepting code to the service logic carries out virtual class packaging, And uniqueness Hash is carried out, generate MD5 character string;
If S4, the script repository do not store the service logic being currently generated and intercept code, by what is be currently generated Service logic intercepts code and is saved in the script repository;
S5, according to business demand, when local compiling add at corresponding position according to the interceptions label compiles interception Device code, wherein the blocking apparatus code intercepts code for being woven into corresponding service logic, according to the blocking apparatus Code is compiled by cloud and the corresponding service logic stored in the script repository interception code is compiled and is run again.
The present invention can dynamically add corresponding service logic according to business demand in real time online and intercept code, so as to Service logic is intercepted by cloud compiling in system operation and is introduced directly into and runs after code is compiled, to code before It has no effect, realizes dynamic script engine system, then realize the extension of system function dynamic interception, improve system function Flexibility, opening, maintainability and the scalability of extension.
Further, step S4 specifically includes the following steps:
If the script repository does not store the service logic being currently generated and intercepts code, the service logic is checked Intercepting code whether there is syntax error, and the service logic being currently generated interception code is then saved in by syntax error if it does not exist In the script repository, syntax error then prompts operator if it exists.
Corresponding to the above method, the invention also discloses a kind of compiled by multilingual cloud to realize system function dynamic expansion The system of replacement, the system comprises intercept label adding unit, intercept code adding unit, intercept code process unit and Compilation run unit;
The interception label adding unit is used to identify corresponding interception on needing the method extended according to business demand Label;
The interception code adding unit is used to intercept each on label, and addition corresponds to the system function for needing to extend The service logic of energy intercepts code;
The interception code process unit is used to intercept code building identification code according to the service logic, and according to described Identification code judges that the service logic whether is had existed in script repository intercepts code, wherein storing in the script repository There is the service logic to intercept code and corresponding identification code;If the script repository does not store the business being currently generated Logic intercepts code, then the service logic being currently generated interception code is saved in the script repository;
The compilation run unit is used for according to business demand, according to the interception label in corresponding position when locally compiling Place's addition compiling blocking apparatus code is set, wherein the blocking apparatus code intercepts code for being woven into corresponding service logic, It is compiled according to the blocking apparatus code by cloud and the corresponding service logic stored in the script repository is intercepted into generation again Code is compiled and runs.
The present invention intercepts label, blocking apparatus code and service logic by setting and intercepts code, is utilizing dynamic foot This engine system is to make developer that different language can be used in line development, dynamic the functions of modules subdivision in software development Deployment, Dynamic Weave, the scheme of dynamic operation are write with reducing duplicated code, are then compiled, are added when system operation needs When carrying, running and it is woven into the frame of original system, the programming idea of development efficiency can be improved in this set frame system.In the present invention The module of online dynamic scalable script can even give third company's exploitation, improve the cooperation in industry, reach advantage Complementary purpose.After the completion of exploitation, script module function can also be called by other programming systems, can improve weighing for software The property used.Therefore, proposed by the present invention that software architecture is developed by intercepting the dynamic scalable structure that label is realized With extensive Practical significance.
The above method or system are added dynamic may be implemented online and function by way of service logic intercepts code Extension, function replacement and function disabling etc., it is convenient, flexible.
The above method and other steps are described in detail below by a specific embodiment.
As shown in Figure 1, the present embodiment addition intercept label method the following steps are included:
(1) it according to the requirement of the needs of operation system or customer personalized customized demand, determines in system function Attribute intercept is stamped by IDE in the method for required extension and intercepts label, wherein these are intercepted on label Information mainly has: whether generating blocking apparatus code, interception is enumerated: intercepting before method, intercepts after method, intercepts before and after method. Intercept the position of label, the place module, function of determining method code, method name space, category information, to needing to extend The general core business intercepted reserves corresponding interface.
As shown in figure 9, intercepting position can be selected to intercept before specially method according to the actual situation, be intercepted after method or side It is intercepted before and after method.
It, can also visually will be with by way of tool above is by beating the mode for intercepting label to add intercept point Upper interception label information, which is added to, to be intercepted in configuration file.The information of addition in addition to there is information above, there are also system item title, Chinese and English mark, module name Chinese and English mark, function name Chinese and English mark, method name Chinese and English mark.
(2) by the above blocking apparatus information preservation into XML information.
(3) it by IDE plug-in unit, is read before compiling project and intercepts label information or XML file information.
(4) by IDE plug-in unit, judge whether there is interception label information in each class method of project or in XML information.
(5) pass through IDE plug-in unit, the static weaving before and after the method for having mark interception label information, i.e. addition blocking apparatus Code forms a kind of mixed code.
When using IDE compiling system project, by the IDE plug-in unit of customized exploitation, it will be intercepted according to information above Label information intercepts configuration file, automatically by the corresponding position of blocking apparatus code insertion.It should be noted this Attribute intercepts label, is only intended to judge the blocking apparatus code of addition method name position in class before compiling, if Before needing to add, intercepting or it is rear, using synchronous or asynchronous, with reflection reflection and irrelevant.
(6) each each method of class in detection project again, gos to step four.
The method of above-described embodiment utilizes dynamic script IDE card module, dynamic script code blocking module and dynamic Scripted code requests communication module to be completed, as shown in figure 5, will intercept the setting information of label after the setting of completion interception label It notifies dynamic script code blocking module server end, is recorded.
After addition intercepts label and service logic interception code addition, continues service logic and intercept code, compile Translate the step of operation can be achieved with the extension of system function dynamic interception, intercept code addition, compilation run to service logic below It is described in detail.
Service logic intercepts code addition and specifically comprises the following steps:
As shown in Fig. 2, including the following steps:
(1) according to operation system functions of modules point Xml file, addition/editor needs to extend the service logic intercepted online Scripted code, i.e. service logic intercept code.The information of addition has: extension intercepts language;Extension intercepts code segment;Extension intercepts The effect of code describes;Extend interception mode: synchronous intercepting, asynchronous interception;It intercepts code and executes time-out time;Code is intercepted to hold Row error handling method: it interrupts, continue to run;Intercept rank: system-level interception (and acting on all clients in system), client Grade intercepts (acting only on the client using system);The client Id that this extension interception code is acted on is (required for each client Individual business logic is different).
(2) service logic scripted code is subjected to virtual class packaging, and carries out uniqueness Hash, generates 36 MD5 Character string, being capable of unique identification this script.Uniqueness Hash information in addition to there is service logic scripted code, there are also system banner, Customer ID (systems buying person), class method manes mark, language used.
(3) judge whether have existed in NoSql script storage repository (Redis) according to this uniqueness cryptographic Hash.
(4) if be not present in NoSql script storage repository, step (6) is jumped to
(5) if existed in NoSql script storage repository, (eight) are jumped to.
(6) if not compiling syntax error, service logic scripted code is saved in NoSql script storage repository.
(7) if there is compiling syntax error, then step (8) is jumped to
(8) script adder is based on context prompted, presence is already present in NoSql script storage repository or compiles Syntax error or addition are edited successfully, and step (1) is jumped to, and are operated again newly, for customized extension interception service logic Behavior allows to be inserted into unlimited and intercepts, intercepts the sequence executed according to the suitable of configuration before and after functions of modules method Method Sequence successively executes, can also extension after addition at any time intercept execution sequence is adjusted in list at any time or it open or Deactivate or edit again replacement.
Such as the service logic of addition intercepts code for realizing Rest service, addition interface is as shown in figure 12, can be by step It is rapid simple and efficient.The interface for adding service logic interception code is as shown in figure 13, and addition service logic intercepts the data source of code Code interface is as shown in figure 14.
As shown in Figure 10 A, 10B, compared to the implementation of the fixation of traditional application program system, i.e., each function mould The module that interface provided by block and realization define before being all, cannot be in the operational process of program according to some conditions Judge to dynamically change the behavior of program or extension and add new function.The present invention can system the time of running according to fortune Row environmental context is to determine whether need change or the behavior of extender.And in the program of dynamic script engine architecture In, the division between dynamic script engine management program and dynamic script is very clearly dynamic script engine management program Dynamic script functional template can be completely independent exploitation or third company exploitation, this is conducive in large-scale software development mistake Cheng Zhong carry out exploitation can parallel, improve the efficiency and quality of exploitation.And in exploitation and debugging process, when part is dynamic When problem occurs for state script module, due to relatively independent between each dynamic script card module, it is not interfered with His module, is beneficial to the development and progress of Experience of Software Testing Work, convenient for solution of finding the problem during test and debugging Problem.In addition, the modification to partial dynamic script, does not interfere with other dynamic scripts, avoids and draw because of righting a wrong Out the case where new problem, and system can dynamically replace component at run time, according to the variation of running environment or certain Condition and cause new behavior, thus dynamically improve software systems adaptivity.
It is to utilize dynamic script adding module and scripted code spreading code processing mould that service logic, which intercepts code addition, Block is completed, as shown in figure 5, satisfactory code is stored into dynamic script code storage by dynamic script code storage module.
Interception label and service logic, which intercept after code adds, can form multilingual dynamic script code listing, such as scheme Shown in 11.
It should be noted that blocking apparatus code and service logic intercept code in the presence of difference substantially, service logic Intercept the function that extend for realizing system of code, can real-time perfoming change, carry out cloud by remote server and compile to realize Operation;And blocking apparatus code is a shell, only one section of weaving program, is specifically directed to and needs Remote Expansion In method, local compiling is carried out, the logical code really write, i.e. service logic intercept code and be not included in this interception dress It sets inside code.Such as blocking apparatus code here is such as: RunDynamicScript (" SendSms ", " 13011199191 ", " it is short message that you, which get well this, ");But the actual functional capability code (i.e. service logic interception code) for sending short message is in remote server.
Compilation run specifically comprises the following steps, as shown in Figure 3:
1) calling service functions of modules method, system extend interception parameter from high speed according to operation system functions of modules point Extension is judged whether there is in caching Redis to intercept and (only take System level business logical extension and ought be up till now for initiate mode The individual business logical extension of client).The extension interception parameter of transmitting mainly has: service logic scripted code mark, system Mark, customer ID (systems buying person), the contextual informations such as class method manes mark and method parameter.
If 2) detection has extension and intercepts, by system banner, customer ID (systems buying person), class method manes mark etc. Information transmitting reads extension from script NoSql storage repository according to these marks and intercepts the information such as scripted code, and does script generation Code uniqueness Hash.These information include: that extension intercepts language;Extension intercepts code;Extend interception mode: synchronous intercepting, different Step intercepts;It intercepts code and executes time-out time;It intercepts code error process mode: interrupting, continues to run;Intercept rank: System-level interception, client level intercept;
3) scripted code uniqueness Hash is intercepted according to extension, whether compiled the scripted code from detection memory be real Example (there is no compiled examples, then have two may, first, operation for the first time, only compile it is primary, second, extension intercept script Code is replaced by editor's needs that change).Dynamic script is loaded into frame system and creates the original that example is abided by It is then: is loaded into again when operation, does not need or need to replace just to unload script module, can reduce so interior The occupancy deposited.
If 4) extend in memory there are this and intercept scripted code example, 6 are jumped.
5), if there is no this extensions to intercept scripted code example in memory, jumps 11.
6) it is read from memory and positions compiled memory instance.
7) dynamic script enforcement engine is identified according to class method manes and the contexts such as method parameter, used language are believed Breath runs simultaneously specified function method (if it is asynchronous operation, then by multilingual dynamic script enforcement engine driving running example Handled and run by other thread queues on backstage), delivery protocol uses thrift.
8) if operation exception occurred or more than the specified time, 9 are jumped to.
9) system asynchronous record running log & performance, time-consuming situation, exception information return.
10) normal operating results return, and jump to 12.
11) counter is added 1 by dynamic script example, and updates last allocating time.
12) system is detected whether to have extension again or be intercepted, and jumps to 1.Multiple extensions intercept the execution of scripted code As a result the last one is directly returned, and before and intermediate implementing result can be added to what system especially provided The current execution thread slot data (ApplicationContextDataSlot) of ApplicationContext, can be in process Or long-range transmitting middle back and forth obtains.
Above-mentioned implementation procedure is extended suitable for teleaction service, while being suitable for local service and being extended, as shown in Figure 7,8, by Multilingual dynamic script code compilation engine device and enforcement engine device are completed compiling and are executed, and wherein running example is stored in In memory, operates in script and exist in script warehouse.Blocking apparatus is extended for realizing intercepting label and intercepting code Addition.
Wherein generate extension intercept scripted code example the following steps are included:
(1) extension is read from NoSql script storage repository and intercept scripted code, wherein the construction in script warehouse such as Fig. 4 institute Show.
(2) extension is intercepted into scripted code and is loaded into multilingual dynamic script compiler engine.Different language, is loaded onto not It is compiled in same compiler engine.
(3) load extension intercepts external relating module and resource required for language and is compiled.Complicated service logic, Usual one section of scripted code is impossible, the common compiling of the resources such as external dll or jar that need to rely on participation.
(4) the memory byte after compiling is placed in memory and instantiated and do corresponding initialization operation.
Above-mentioned compilation run method by dynamic script code blocking module server end, dynamic language management engine module with And the operation calling module cooperation of dynamic script example is completed, as shown in figure 5, operation time-out time is by the extremely overtime mould of dynamic script Block performs corresponding processing.
To the calling of dynamic script example, there are two types of modes: event is called and automatic is called.Event calling refers to certain spy Fixed event message is triggered, and if the mouse of user is when clicking some function point, this is operated the method etc. called below Extension intercept information passes to system framework, and corresponding dynamic script instance processes operation is called in system judgement.It is automatic to call Be then system can according to the needs of system itself or the needs of user, when reaching some time point or when some condition or By certain time interval (per second/minute/hour/week/moon), system framework automatic trigger intercepts scripted code to dynamic expansion Example is called or automatically in running background.The calling process that system framework intercepts scripted code example to dynamic expansion is: Dynamic script example is first carried out, then judges whether there is next extension intercept point, if there is extension point in extension again Or have parallel other extension points, then it continues to execute down, these extension intercept points are formed one and have an opportunity to expand in this way Chain is opened up, to extend different function required for completion system and client.
The personalized customization service logic of client there may come a time when it is more complicated, utilize extension intercept scripted code service logic Unloading mechanism, memory source occupancy can be greatly reduced to a certain extent, specific unloading mechanism includes the following steps:
1) counter and last allocating time are set for each dynamic script example.
2) it calls a dynamic script example that counter is added 1, and updates last allocating time.
3) according to timing detection counter and last allocating time within the specified period is configured, specified calling time will be less than The dynamic script example addition removal mark of several and big never call always at fixed time.
4) system by the dynamic script example for the mark for having removal the dynamic offloading from memory, wherein this step is by dynamic foot This example Unload module or dynamic script example replacement module are completed, as shown in Figure 5.
As shown in fig. 6, operation system of the invention carries out the definition of operation expanding point, Zhi Hou by intercepting the setting of label Corresponding extension point addition service logic intercepts code, and stores into script warehouse.At runtime, by multilingual script compiling/ Enforcement engine is from script warehouse Download Script and controls compiling and fortune that relating module outside associated language carries out multilingual code Row, the online extension of finishing service system function.
What dynamic script engine system represented is the relationship of a transverse direction, if " system " is a hollow cylinder Body, wherein what is encapsulated is attribute and the behavior of object;So dynamic script engine, just seemingly one sharp sword, by these open circles Cylinder is splitted, to obtain its internal message.Then the section that it again dexterously splits these restores to the original state.This characteristic mentions High development efficiency, makes to influence localization caused by variation, code develops to modularization direction, and then reduces coupling, reaches soft Part exploitation maintenance summary, the target that software iteration simplifies.
Compared with prior art, technical solution of the present invention has the advantage that (1) comes into force immediately: due to being to burst at the seams out Hair, compiled online directly call so can be immediately generated service after exploitation compiling for application system immediately, all not need out Hair personnel recompilate, and heat deployment is without restarting system;(2) enhance code maintainability: code line development, on-line debugging, On-line operation can be repaired online if encountered problems, and quickly upgrading is extended or replaced, enables or deactivates, and realizing can dynamically insert It pulls out.(3) complexity for reducing business, forces classifying rationally system boundary, rationally designs domain model, makes the period of iteration more It is short, it can be with multi version, gray scale upgrading, service degradation, service distributed tracking etc..(4) reuse of code is high: dynamic script engine The realization of each aspect is independent module, is loose couplings between module.The realization of loose couplings is generally meant that more preferably Code reusability, its shifting value can be called directly into other systems, to reduce the development cost and difficulty of software, Anywhere primary development can call (long-range/local).(5) performance is high: based on context dynamic script frame calls needs It wants, is immediately compiled script, the example after compiling is placed in memory, is facilitated just as direct reference object and high Effect, and have synchronous, asynchronous (the non-obstruction of queue), a variety of calling processing modes of timing.(6) multilingual is supported: being for application System adds new function if necessary to extension, can not only use existing language development, can also be developed with other Languages, And it cross-platform can run.(7) be easily managed: each developer can individually develop, integrate, testing, disposing, in completion Line process effectively reduces O&M cost and management cost, improves development efficiency.(8) technological innovation: being easy to attempt technological innovation, Even each Function Extension point can be write using different programming languages.(9) stability enhances: system stability enhancing, The failure individually serviced will not influence other services, can realize service degradation to a certain degree.(10) it is easy to develop: each dynamic Script extension focus is all handled using minimum coupling, and the module in system further refined, reduce module it Between the degree of coupling, different experts and team are responsible for developing different modules, are independent of each other to each other.Realize quick agile development. (11) it should be readily appreciated that in code set.Nonexpondable public code can will be needed to focus on one using dynamic script engine technique Place realizes that the modification range of such code can be obtained by stringent control, reduces influence of the code revision to system stability, The redundancy and the degree of coupling of code are reduced, enhancing is readable, improves software quality, solves that Object-Oriented Programming is cross-module to be caused Code confusion and code the dispersion.(12) system is easy extension.It is easy to be added newly by establishing new dynamic script Function is come logic rules of activating business.When new functions of modules is added into system, existing dynamic script it is automatic it is crosscutting into Come, system is made to be easy to extend;It can be under the premise of need not recompilate original system on demand to system function after system publication Expanded, can thus develop the more dynamic scripts of extension, the customer personalized changes in demand of quick response.(13) it is distributed Formula: the service logic dynamically extended online can be deployed on multiple servers by realization simultaneously, realize the load of service logic Balanced extending transversely and distributed deployment, to adapt to multi-user, high concurrent request.
The present invention use a new generation, Microsoft compiling system (Roslyn), this is a more open compiler, with Different toward opaque compilation process, developer can access and analyze compiling data in compilation process and such as parse code, language Justice analysis, the present invention encapsulate this and are extended again, carry out parsing compiling source code file by compiler, are dynamically to compile Cheng Yuyan increases the operations such as function, the movement of customized compilation facility, after extension and is allowed to more convenient easy-to-use.It is adopted by comparison Roslyn is then from more setting up on the basis of the Managed Code of bottom, and when compiling multiple scripts at the same time, CPU is occupied Rate can be relatively less, and compilation process is more stable, and efficiently performance is higher, and can do more controls in compilation process and expand Exhibition operation.
The present invention can be realized more efficiently by way of the dynamically online code compilation code of addition immediately, specific square Case is the movement Action that can only use Controller, according to the data of transmittance process on view in this Action Source key parameter goes Dynamic trigger to execute the scripted code of various different relational database/non-relational NoSql data sources, obtains It fetches according to and can be processed with secondary filter, view presentation then will be returned in final data assignment to entity B ean.
The present invention provides a kind of completely new, more efficiently, immediately, efficiently online programming compilings, dynamic expansion The pluggable square law device of intercepting system function, when in system some function need to activate business on the original basis logic, It triggers new movement or newly increases when extending new function, can be with online programming, Just-In-Time, dynamic expansion system function, this Kind Function Extension and interception not only can be system level, are also possible to levels of clients extension and intercept, are in addition not necessarily to weight under line Upload newly developed, realizes the quick dynamic expansion and effective use of system function and resource, and is allowed to interconnect, mutually prop up It supports, cooperate, to provide value for client, in addition the present invention can be with the failure in on-line amending software, debugging, survey Examination, quickly comes into force, and quickly applies, brings great flexibility, scalability and maintainability to original system.
Dynamic script engine technique in the present invention is each demand (logic relevant or unrelated to business) client It is mapped as one section of dynamic script code, Mobile state extension is clicked through to the extension in system, in first call, compiler turns over it It is translated into executable code and is placed in local/remote (Remote Dynamic script micro services) memory that (this section of code can be with common Programming language C#, VB.NET, JAVA, Python etc. write), solve the problems, such as to couple in code set with this, improve software weight With property, the problem of reducing the code complexity and duplicated code of nucleus module, and then reduce the development cost and cost of project;It answers With the software development methodology of dynamic script, can also make system development phase each module function definitely, functional template Between coupling it is more loose, the system of exploitation has more scalability, maintainability.Online programming Just-In-Time engine is constructed, The function of increasing original system can dynamically be extended.When finding that current system is not able to satisfy current demand, it is only necessary to Line increases a corresponding dynamic script, in the case where not stopping existing system operation, carries out function expansion online to existing module Exhibition or supplement, and do not have to again online lower exploitation, constructing whole system again redeploys, to realize that quick business expands Expansion hair, meets customer personalized customized demand immediately.
Extension when dynamic script engine system runs software provides good platform, service dynamic script logic Instruction set common languages (C#/VB.NET/JAVA/Python), CompilerTools can be supported to can be generated by frame low The object identification code of grade instruction, whole system are disposably woven into bytecode when running for the first time, and the code being woven into dynamically is compiled It is translated into efficient source code, and is placed among memory, the execution speed of system is substantially increased.
Dynamic script engine system segments the functions of modules in software development, makes developer that different language can be used and exists Line development, Dynamical Deployment, Dynamic Weave, the scheme of dynamic operation are write with reducing duplicated code, are then run and are needed in system When compiling, load, running and be woven into the frame of original system, the programming that development efficiency can be improved in this set frame system is thought Think.Online dynamic scalable script module can even give third company's exploitation, improve the cooperation in industry, reach advantage Complementary purpose.After the completion of exploitation, script module function can also be called by other programming systems, can improve weighing for software The property used.Therefore, dynamic scalable structure proposed by the present invention, which develops software architecture, also has extensive Practical significance.
In terms of architecture, traditional software architecture is unfavorable for large-scale clustering exploitation, deployment, to the modern times The development of software industry causes great limitation.Using the online programming Just-In-Time engine architecture of dynamic scalable, It can make each functional module that there is bigger independence, improve the testability and maintainability of software.With it is traditional soft Part architecture is compared, and in dynamic scalable structure, main program is completed mutually coordinated between each dynamic scalable module Work, and be between the module of each new extension it is relatively independent, this keeps the structure of calling program simple, each section can completely solely Vertical exploitation, independent deployment, independent operating, is conducive to concurrency and efficiency that exploitation is improved during large-scale software development. The function of largely extending is placed in outer remote server by dynamic script engine architecture, due to the convenience of this method And flexibility, the expansion of software function can be realized by insertion dynamic script and change external dynamic script, improve and mention Height, this is also the advantage place of dynamic script engine architecture development approach.
Invention provides a kind of method for quickling increase expansion system function using dynamic script for developer, it allows certainly It defines the relationship of program code execution sequence and executes logic, each dynamic scalable script can independent online programming tune Examination, upgrade maintenance, configuration can according to need on-the-flier compiler, installation, loading, operation, stopping, enabling, deactivating, unloading, neither The work of its existing functional module is influenced, and there is great flexibility.
The invention is not limited to this kind of language used in application software, may be implemented .Net, VB.NET, Java, Python compiled online service, does not need as traditional approach, using exploitation software Visual Studio or Eclipse in electricity Brain is locally developed, but direct-on-line is developed, and online on-the-flier compiler realizes compiling i.e. service and by spare interface dynamic Current system is cut, realizes the Quick Extended of original function.
The invention is not limited to the dynamic feet of the system-level and client level of the standard module functional method to original system This extension is possibly even user class, can also be detached from that the long-range RPC service of dynamic script is provided separately is straight for the system of needs Calling is connect, online Restful service also can be generated, called directly for front and back end developer (system-level to refer to suitable for all All users of client, client level refer to all users for being only applicable to existing customer, and user class refers to individual or part in client level Designated user).
The invention is not limited to doing local dynamic expansion on the existing functional method of operation system in standard, if you Operation system be the forming types based on SOA/ESB/MicroService, such dynamic expansion can also be melted with directly transplanting It closes teleaction service interface or is added to the place that you need to extend, between different dynamic expansions, can call mutually, it can also To call external other interfaces to be allowed to more flexible changeable to construct compound dynamic assembly.
The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;Although referring to aforementioned each reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified, or equivalent substitution of some or all of the technical features;And These are modified or replaceed, the range for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution, It should all cover within the scope of the claims and the description of the invention.

Claims (10)

1. a kind of method that the replacement of system function dynamic expansion is realized in multilingual cloud compiling, which is characterized in that the method includes Following steps:
S1, according to business demand, identify corresponding interception label on needing the method extended;
S2, label is intercepted for each, addition, which corresponds to, needs the service logic of the system function extended to intercept code;It is described It includes online addition side dynamic in real time that addition, which corresponds to the mode for needing the service logic of the system function extended to intercept code, Formula;
S3, according to the service logic intercept code building identification code, and judged according to the identification code be in script repository The no service logic that has existed intercepts code, wherein be stored in the script repository service logic intercept code with And corresponding identification code;
If S4, the script repository do not store the service logic being currently generated and intercept code, the business that will be currently generated Logic intercepts code and is saved in the script repository;
S5, according to business demand, when local compiling adds at corresponding position according to the interceptions label compiles blocking apparatus Code, wherein the blocking apparatus code intercepts code for being woven into corresponding service logic, according to the blocking apparatus code The corresponding service logic stored in the script repository interception code is compiled and is run again by cloud compiling.
2. the method according to claim 1, wherein it includes following information: generation that the service logic, which intercepts code, Code use category of language, extension intercept code segment, it is described extension intercept code purposes, operation time-out time, execute mistake Processing mode, interception mode, intercept rank and interception function in client.
3. according to the method described in claim 2, it is characterized in that, the error process mode includes interrupting and after reforwarding Row.
4. according to the method described in claim 2, it is characterized in that, the interception mode includes synchronous intercepting and asynchronous interception.
5. the method according to claim 1, wherein generating the identification code in the step S3 includes following step It is rapid:
Code is intercepted to the service logic and carries out virtual class packaging, and carries out uniqueness Hash, generates MD5 character string.
6. the method according to claim 1, wherein the step S4 specifically includes the following steps:
If the script repository does not store the service logic being currently generated and intercepts code, check that the service logic intercepts Code whether there is syntax error, and the service logic being currently generated interception code is then saved in described by syntax error if it does not exist In script repository, syntax error then prompts operator if it exists.
7. the method according to claim 1, wherein being added in the same method multiple in the step S1 The interception label.
8. a kind of system that the replacement of system function dynamic expansion is realized in multilingual cloud compiling, which is characterized in that the system comprises Label adding unit is intercepted, code adding unit is intercepted, intercepts code process unit and compilation run unit;
The interception label adding unit is used to identify corresponding interception mark on needing the method extended according to business demand Label;
The interception code adding unit is used to intercept each on label, and addition corresponds to the system function for needing to extend Service logic intercepts code;The addition corresponds to the mode for needing the service logic of the system function extended to intercept code Online dynamic addition manner in real time;
The interception code process unit is used to intercept code building identification code according to the service logic, and according to the mark Code judges that the service logic whether is had existed in script repository intercepts code, wherein storing in the script repository It states service logic and intercepts code and corresponding identification code;If the script repository does not store the service logic being currently generated Code is intercepted, then the service logic being currently generated interception code is saved in the script repository;
The compilation run unit is used for according to business demand, when locally compiling according to the interception label at corresponding position Addition compiling blocking apparatus code, wherein the blocking apparatus code intercepts code for being woven into corresponding service logic, according to The blocking apparatus code by cloud compile again by the corresponding service logic stored in the script repository intercept code into Row is compiled and is run.
9. system according to claim 8, which is characterized in that it includes following information: generation that the service logic, which intercepts code, Code use category of language, extension intercept code segment, it is described extension intercept code purposes, operation time-out time, execute mistake Processing mode, interception mode, intercept rank and interception function in client.
10. system according to claim 9, which is characterized in that the error process mode includes interrupting and continuing Operation.
CN201610599948.2A 2016-07-26 2016-07-26 The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling Active CN106293863B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610599948.2A CN106293863B (en) 2016-07-26 2016-07-26 The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610599948.2A CN106293863B (en) 2016-07-26 2016-07-26 The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling

Publications (2)

Publication Number Publication Date
CN106293863A CN106293863A (en) 2017-01-04
CN106293863B true CN106293863B (en) 2019-10-25

Family

ID=57662412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610599948.2A Active CN106293863B (en) 2016-07-26 2016-07-26 The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling

Country Status (1)

Country Link
CN (1) CN106293863B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678864A (en) * 2017-01-13 2018-02-09 北京资配易投资顾问有限公司 The call method and system of interface
CN108459846B (en) * 2018-03-14 2022-03-04 广东洪睿信息科技有限公司 Software cloud customization method and platform
CN108509201A (en) * 2018-03-20 2018-09-07 深圳神州数码云科数据技术有限公司 A kind of code generating method and device
CN109445955B (en) * 2018-09-13 2020-09-04 武汉斗鱼网络科技有限公司 Counting method and counting system
CN111443901B (en) * 2018-12-27 2024-02-09 三六零科技集团有限公司 Java reflection-based service expansion method and device
CN110045962B (en) * 2019-01-15 2022-08-30 创新先进技术有限公司 Method and device for supporting multi-language script execution
CN111488140B (en) * 2019-01-29 2023-10-27 杭州海康威视数字技术股份有限公司 Method, device and computer equipment for supporting multiple programming libraries in multiple programming languages
CN111008015B (en) * 2019-11-22 2023-07-04 广联达科技股份有限公司 Micro front-end application framework based on front-end technology
CN111782230B (en) * 2020-07-07 2022-05-31 联想(北京)有限公司 Program installation control method and device and electronic equipment
CN112954075B (en) * 2021-03-29 2023-04-07 中信银行股份有限公司 Business function implementation method, system, corresponding device and storage medium
CN113867832B (en) * 2021-09-15 2024-04-02 广州云徙科技有限公司 Method, system, computer equipment and medium for dynamically modifying business data logic
CN113791979B (en) * 2021-09-16 2023-12-22 平安国际智慧城市科技股份有限公司 Dynamic debugging method and device for software product, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5621169A (en) * 1994-01-18 1997-04-15 Restech, Inc. Method for determining hydrocarbon/water contact level for oil and gas wells
CN102799493A (en) * 2012-06-21 2012-11-28 北京伸得纬科技有限公司 Method for intercepting target progress with self-protection
CN103150155A (en) * 2011-12-07 2013-06-12 金蝶软件(中国)有限公司 Data interception method and device
CN104657189A (en) * 2013-11-20 2015-05-27 财团法人资讯工业策进会 Hybrid dynamic code compiling device, method and service system thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9110737B1 (en) * 2014-05-30 2015-08-18 Semmle Limited Extracting source code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5621169A (en) * 1994-01-18 1997-04-15 Restech, Inc. Method for determining hydrocarbon/water contact level for oil and gas wells
CN103150155A (en) * 2011-12-07 2013-06-12 金蝶软件(中国)有限公司 Data interception method and device
CN102799493A (en) * 2012-06-21 2012-11-28 北京伸得纬科技有限公司 Method for intercepting target progress with self-protection
CN104657189A (en) * 2013-11-20 2015-05-27 财团法人资讯工业策进会 Hybrid dynamic code compiling device, method and service system thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"面向方面程序并行化技术研究";何腾飞;《中国优秀硕士学位论文全文数据库 信息科技辑》;20111215(第S2期);第I138-156页 *
一种基于微服务架构的新型云件PaaS平台;郭栋等;《信息网络安全》;20151110(第11期);第15-20页 *

Also Published As

Publication number Publication date
CN106293863A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN106250178B (en) The method that realization system dynamic function intercepts extension online is compiled by multilingual cloud
CN106293808B (en) The method and system of system function dynamic interception extension are realized in multilingual cloud compiling
CN106293863B (en) The method and system of system function dynamic expansion replacement are realized in multilingual cloud compiling
CN106250179B (en) The method that realization system dynamic function intercepts extension is compiled by multilingual cloud
CN106227605B (en) A kind of the dynamic micro services expansion method and device of multilingual cloud compiling
CN106250199B (en) A kind of the dynamic micro services call method and device of multilingual cloud compiling
US10761810B2 (en) Automating testing and deployment of software code changes
CN106293704B (en) Dynamic micro services edit methods, device and the server of multilingual cloud compiling
US10162612B2 (en) Method and apparatus for inventory analysis
CN110825362A (en) Low-code application software development system and method
US8645326B2 (en) System to plan, execute, store and query automation tests
Jayasinghe et al. Expertus: A generator approach to automate performance testing in iaas clouds
US9075596B2 (en) Deployment
CN106227611A (en) The dynamic micro services call method of a kind of multilingual cloud compiling and device
US10489274B2 (en) Using emulation to disassociate verification from stimulus in functional test
CN106708740B (en) Script testing method and device
US20190243665A1 (en) Application runtime configuration using design time artifacts
US20130232245A1 (en) Automation for virtualized it environments
CN109683899A (en) A kind of software integrating method and device
JP5396979B2 (en) Software development support device, system, software development support device function expansion method, and program
Bartusevics et al. Models for implementation of software configuration management
Chardet et al. Toward safe and efficient reconfiguration with concerto
CN112596779A (en) Dual-version-compatible dependency package generation method, device, equipment and storage medium
CN115220863A (en) Operation and maintenance method and device for container application, computer equipment and storage medium
WO2015015406A1 (en) System for distributing software applications to pos payment terminals

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant