CN106250179A - The method that system dynamics function intercepts extension is realized by the compiling of multilingual cloud - Google Patents

The method that system dynamics function intercepts extension is realized by the compiling of multilingual cloud Download PDF

Info

Publication number
CN106250179A
CN106250179A CN201610597848.6A CN201610597848A CN106250179A CN 106250179 A CN106250179 A CN 106250179A CN 201610597848 A CN201610597848 A CN 201610597848A CN 106250179 A CN106250179 A CN 106250179A
Authority
CN
China
Prior art keywords
code
extension
script
interception
dynamic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610597848.6A
Other languages
Chinese (zh)
Other versions
CN106250179B (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 CN201610597848.6A priority Critical patent/CN106250179B/en
Publication of CN106250179A publication Critical patent/CN106250179A/en
Application granted granted Critical
Publication of CN106250179B publication Critical patent/CN106250179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Abstract

The invention discloses a kind of method realizing the interception extension of system dynamics function by the compiling of multilingual cloud, the present invention is by intercepting label, realize service logic and intercept compiling and the execution of code, particularly as follows: detect whether that there is extension intercepts, and determines blocking apparatus code if existing;Utilize blocking apparatus code to search the example of correspondence from internal memory, and utilize multilingual dynamic script enforcement engine to call and run the example of correspondence;If there is not the example of correspondence, then corresponding script compiler engine is utilized to be compiled according to the language form of blocking apparatus code, generate corresponding example, such that it is able to be introduced directly into and run after blocking apparatus code being compiled by the compiling of multilingual cloud in system is run, code before is had no effect, achieve dynamic script engine system, then achieve the extension of systemic-function dynamic interception, improve the motility of expanding of system function, opening, maintainability and scalability.

Description

The method that system dynamics function intercepts extension is realized by the compiling of multilingual cloud
Technical field
The present invention relates to software dynamic expansion field, be more particularly to a kind of compiling by multilingual cloud and realize system dynamics Function intercepts the method for extension.
Background technology
Along with the fast development of science and technology, improving constantly of social informatization degree, computer application penetrates into The every field of society, the competition between enterprise and diversified customer demand, cause enterprise application software system more and more huger Big and complicated.The individual demand of software system is changed frequently by client, requires that the construction cycle is short, mark general in reality simultaneously The product of standardization is difficult to meet the business demand that client is complicated.System development is complete, has met the demand of user, but has worked as user When constantly proposing new requirement, original software architecture may cannot be competent at the demand of newly-increased task, be needed again to set Meter develops this application system, serious waste manpower and other unnecessary resources.Even if again developing a satisfied visitor The application system of the customization demand at family, can not ensure that the demand of user will not again change or have new customer demand simultaneously Propose.If therefore the constantly upgrading of software system does special personalized customization to client, by the quality of software, efficiency, Management brings serious problems.Adding the most codes on the basis of original design, original code can be by the most rotten simultaneously Erosion, the architecture of system also will be increasingly difficult to safeguard, it is seen that the architecture design at initial stage simply meets the standard of a part Customer demand, can not meet all demands, if the software system of enterprise allows this unpredictable change to start, that is whole The code of individual software system will be not controlled by.
Below by a scene, illustrate the polytropy of customer requirement:
Example: in certain online recruitment system, logic originally is, when resume enters system, is all newly added one Record, there are (mailbox, mobile phone are different), is unfavorable for that interviewer checks letter in the resume thus having a large amount of repetition in systems Go through;Client A proposes new demand now, and when the information automatic log-on of applicant's resume, system needs according to applicant Identification card number, detect and judge the most whether exist before this applicant is whether, if there is then by two resumes letters Breath merges and preserves, if there is no being then added again;And the demand of another one client B is, when system enters resume Time, judge according to cell-phone number or mailbox, if system has existed this resume, the most no longer add;The demand of client C is, when This resume is frequently delivered entrance system within a period of time and more than predetermined number of times and is met the primary condition set by position, then certainly Moving and send an envelope mail to interviewer, show that this applicant has strong registration hope, interviewer should pay close attention;Client D's Demand is, needs when resume enters system to carry out applicant's scoring according to the key element in resume, such as 985, the school of 211 adds 10 points, English 6 grades adds 8 points, and English 4 grades adds 6 and grades, it is simple to interviewer carries out integrated ordered screening operation;The demand of client E It is to need select qualified resume according to specific custom rule and the specified conditions Automatic sieve of client and then automatically enter Enter interview stage or superseded state, also needing to send note and mail arrangement interview to interviewer if entering the interview stage, entering Row prompting etc..From above case it can be seen that client is for the operation expanding demand numerous and complicated of system, different, as How customers as center, fast custom spreads and sends the individualized software system being adapted to client, for client with enterprise extremely Close important.
In prior art, when adding in systems or extend new function, be all use in corresponding functional module soft Part developing instrument directly adds code logic, then carries out manual recompility, packs, disposes, and this method is for software Developer's workload to some degree is relatively big, inefficiency, and owing to being directly to add in existing system module Adding code, error rate is higher, may destroy the architectural configurations of original system simultaneously.Although it is current by certain technology Factory/IOC/AOP mechanism, to some extent solves this problem, can be directly injected into during developing in system New code, and do not change the architectural configurations of original system, but these modes are also present in all limitation and deficiency, pass through The patented technology below retrieved is explained.
1, " a kind of water analysis supporting on-the-flier compiler calculates service system to the patent of Patent No. CN 102708452A System ", disclose techniques below feature: water analysis algorithmic code user can input voluntarily, 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 real Shi Gengxin water analysis algorithms library, carrys out dynamic replacement with this and fixes algorithm, reaches to extend the purpose of system algorithm, improves motility And opening.There is the deficiency of the following aspects in this invention: first this invents used on-the-flier compiler is Microsoft CodeDOM ICodeCompiler compiles mode, is to utilize to comprise an entitled " code document object in .NET Framework Model " mechanism of (CodeDOM), this mechanism makes the developer writing the program of source code can operationally, according to expression The single model of presented code, obtains compiling result by programming language text generation compilation of source code, and it is the most completely One flight data recorder, after can only providing compiling, compiling, result is success or failure;Secondly each time, code is compiled Time, all can restart csc.exe or the vbc.exe compilation process that another one is new, ICodeCompiler outside current process Compiling mode is only the packaging to csc.exe and vbc.exe, this old mode, through test, if in multiple script generations When code compiles simultaneously, CPU causes certain pressure, makes CPU usage steeply rise, and additionally restarts new entering outside current process Journey removes compilation script code, and to the stability for a system own and performance, and the input and output of compiling result have one Fixed impact.
2, patent " the pluggable Web service dynamic call based on DotNet platform of Patent No. CN 101534324A Method " use on-the-flier compiler to generate Client Agent class, decide whether to call remote Web services according to configuration file, hold Row calls the service logic method of remote Web services, and the result finally method performed returns to software system, and this is in certain journey The degree of coupling between caller and Web service is reduced, it is achieved there is pluggable property and dynamic call on degree.But it is dynamic in this invention State compiling is only applied in client, and the service logic and the generation that decide whether to call remote web server with this are called The dynamic proxy that remote service is called, remote Web services service logic is fixing, if system needs extension, in addition it is also necessary to soft Develop under part developer's line, manually compile, pack, dispose.Secondly, when calling remote Web services, the configuration literary composition first read Part, information that in this configuration file, only whether remote service is opened and the message of separate unit remote web server, if open Whether configuration decision systems can call remote Web services, and remote web server information determines which platform service is system to call The Web service of device, a configuration here only station server rather than have multiple servers, this can not realize patrolling business Volume it is deployed on multiple servers, it is achieved the load balancing of service logic is extending transversely and distributed deployment simultaneously, thus one Determine degree ceiling system and will not adapt to multi-user, high concurrent request;The WSProxy class again said in this invention is basis Remotely WSDL (Web Services Description Language) describes information, generates Client Agent SProxy, and This proxy class of on-the-flier compiler in internal memory, that on-the-flier compiler used herein uses equally is also CodeDOM ICodeCompiler Compiling mode, shortcoming are as described above with deficiency;The WebService delivery protocol again used in this invention is SOAP (Simple Object Access Protocol Simple Object Access Protocol), its internal principle of SOAP is to carry out transmitting data by XML, Owing to the most tediously long parsing of XML is time-consuming, much bigger compared to for binary file, more Internet resources and relatively can be consumed Many CPU and memory source, therefore use XML also to become a drawback.
3, the patent " a kind of cooperation based on bridge architecture reflects dynamic technique " of Patent No. CN 103823658A provides one Coordinate reflection dynamic technique based on bridge architecture, be convenient to program dynamic expansion flexible configuration, can realize that assembly is pluggable or even generation The flexible expansion change of code level.6th step in this invention: quote dynamic reflective, dynamic mapping is set up in statement, reads from configuration file Value to this assignment, reads class to be radiated, the base class of abstract change from configuration file.Here there are 2 aspects not Foot: first this invention employs reflection technology, and reflection technology is actually the operation of a kind of explanation, needs inside bottom run mode Do a lot of work: binding procedure, metadata character string comparison, parameter verification, type checking, safety check, generation is faced in a large number Time object etc., cause great burden can to CPU and GC Garbage Collector, and the lowest in operational efficiency and performance.Secondly, dynamically The service logic of reflection is relatively-stationary, is belonging to the file of its exterior, and these files are to need software developer Manually developing, manually dispose, the pluggable heat not being the most real is disposed, and is also not carried out the flexible expansion of code level Exhibition.
4, the patent " a kind of elastic extendible multi-data source mvc model framework " of Patent No. CN 104484182A carries For a kind of elastic extendible multi-data source mvc model framework, solve on the most same view View interface, permissible The multiple different data source business logic of Selection and call the most flexibly, user has only to increase relevant configuration and data by extension The mapping code of storehouse table, can realize the problem that existing application dynamic expansion multi-data source is difficult to other related services. Its internal principle uses be the ioc pattern using Spring to EB (EntityBean) layer, Service layer (Business Logic), DAO layer (persistence object additions and deletions are looked into and changed) and PO (the persistence entity object that the data of ORD map HibernateORM) carry out seamless integration management and control, realized by configuration file dynamic assembly.Have among these following some can change Entering, first employ the ioc pattern of Spring in this invention, ioc can add by the way of code and configuration, and this invention is The extension carrying out data source by the way of a large amount of configuration files is the most loaded down with trivial details, and this is to need to configure manually, Causing extra maintenance cost, coupled relation is all at configuration file, and can only obtain data in the most conventional relationship type number storehouse, The most this owing to using IOC pattern (reflection) that performance issue can be produced, again at Service Business Logic, the need to The data source taken out is carried out secondary filter processed, then needs to develop under boostrap, dispose, configure.
Comprehensive statement above understands, and has the disadvantage in that (1) extension complexity: code has direct-coupling in prior art In existing system or in reflection configuration to system, this makes whole expansion process extremely complex loaded down with trivial details, and broken reduction There is the structure of code;(2) reuse of code is low: the code logic of new extension is intended merely to currently developed and is coupled to system In, it reduce code reuses rate;(3) performance loss: by reflection or configuration mechanism do in systems and extend, can cause be One rank of hydraulic performance decline of system.(4) construction cycle long efficiency is low: when extending or add new demand, need developer's line Under again develop, compile, test, upload, configure, pack, deployment system, this makes construction cycle the longest efficiency the lowest.(5) difficult To safeguard: the application of system developer and technology the most iteration is crossed many times, mutual between code in system Calling, be mutually coupled the most intricate, the people not quite understanding system dare not act rashly.Along with the summation function that needs of system is got over Coming the most, team is increasing, links up cost accordingly, development cost, management cost all can be multiplied, when lacking occurs in system Fall into time, will also result in problem analysis, orientation problem, reparation problem time longer;Along with the increase of size of code is also possible to lead Cause the vicious cycle of " repairing the most, defect is the most ";In system, a little change is accomplished by redeploying whole application system. (6) development language limitation: if application system uses certain language development, then again then must also be during demand extension This language is extended, it is impossible to attempt new programming language or framework, and this is also impossible to use a technology at present in reality Platform or scheme solve all problems.(7) hardware cost is high-leveled and difficult with horizontal extension: same at server of all of program code In one process, the situation that horizontal extension is difficult and cost is high can be caused, because functions of modules different in system is actually to clothes The requirement of business device is different, has plenty of CPU intensive computer type, it is desirable to have the CPU processor that performance is stronger, has plenty of needs Internal memory I/O intensive type, needs to use a large amount of internal memory to carry out data buffer storage, if pressed by the infrastructure server required by system Same standard goes buying, then hardware cost can be the highest.(8) reliability is low: all functions of modules all operate in a process In, a wrong bug in any one functions of modules, such as RAM leakage/CPU Continued, it will likely do collapse or Drag slow whole process, thus have influence on the reliability of whole application.(9) cannot distributed deployment support high concurrent: due to cannot With existing system program, Dll or Jar that outside relies on is carried out physical machine efficiently separate, along with the continuous upgrading of system And extension, the hugest and complicated system, to stretch and be necessary for all-in-one-piece flexible, it is impossible to the formula that efficiently separates is stretched, system Required for middle user, the core business point of often operation may only have 30%, and to do now same by non-core 70% Dispose flexible, it is impossible to reach the maximization intensive use of resource.(10) continuous integrating and payment are affected: due to the Pang of operation system Big complicated, add extension upgrading many times, also can be the veryest long so building the time once, failed number of times also can be significantly Increasing, if building process mistake, investigation problem also can be extremely difficult.The trickle amendment in any point of additionally making system is all Need whole system to be rebuild, redeploy.One system of multiple developer's joint developments, in addition it is also necessary to wait that other are opened The personnel of sending out could dispose after completing, this motility greatly reducing team and function delivery frequency;(11) additionally beat in project Open and run very slowly, system is difficult to exploitation, test, continuous integrating difficulty, deployed environment rely on complicated, technology stack binding, Programming language, framework, the upgrading of data base and change extremely difficult etc..
How to tackle these problems, to the motility of software system, opening, maintainability, scalability, and software System is proposed higher requirement for the respond in market and client.Increase the most rapidly, extend, upgrade and currently mark Accurate systemic-function is that client is customized, and effectively ensures lifting software development quality and development efficiency, has become as The significant challenge of Software Industry.
Summary of the invention
(1) to solve the technical problem that
The technical problem to be solved in the present invention is how to improve the motility of expanding of system function, opening, maintainability And scalability, Remote Dynamic extension systemic-function on the basis of original code not being impacted.
(2) technical scheme
In order to solve above-mentioned technical problem, the invention provides a kind of compiling by multilingual cloud and realize system dynamics function The method intercepting extension, said method comprising the steps of:
S1, according to business demand, the method needing extension identifies the interception label of correspondence;
S2, for each intercept label, add corresponding to required extension systemic-function service logic intercept generation Code;Wherein said service logic intercepts code for realizing needing the described systemic-function of extension;
Compiling blocking apparatus code is added according to described interception label in corresponding position, wherein when S3, local compiling Described blocking apparatus code intercepts code for the service logic inweaving correspondence, is compiled by cloud according to described blocking apparatus code Again the corresponding service logic of storage in described script thesaurus is intercepted code to be compiled and run, wherein according to following step Suddenly corresponding service logic intercepted code compilation and run:
S31, detect whether exist extension intercept, if exist, then according to current extensions intercept identification information determine correspondence Service logic intercept code;
S32, the service logic utilizing described step S31 to obtain intercept code building identification code, and according to described identification code Search whether to there is corresponding example from internal memory;
If S33 exists corresponding example, then multilingual dynamic script enforcement engine is utilized to call and run the reality of correspondence Example;If there is not the example of correspondence, then intercept the script compiling of the language form utilization correspondence of code according to described service logic Engine is compiled, and generates corresponding example, utilizes multilingual dynamic script enforcement engine to call and run the reality of correspondence afterwards Example.
Preferably, described service logic interception code includes following information: category of language, extension that code uses intercept generation Code, described extension intercept the purposes of code, run time-out time, error process mode, interception mode, interception rank, block Cut the client acted on.
Preferably, described error process mode includes interrupting and continuing to run with.
Preferably, described interception mode includes synchronous intercepting and asynchronous interception.
Preferably, described step S32 generates described identification code to comprise the following steps:
Described service logic is intercepted code and carries out virtual class packaging, and carry out uniqueness Hash, generate MD5 character string.
Preferably, described step S33 utilize multilingual dynamic script enforcement engine to call and run the example bag of correspondence Include following steps:
If the operation time exceedes described operation time-out time or occurs abnormal, then record running log, time-consuming situation and Abnormal information;
If running without exception and not less than described operation time-out time, then operation result is returned.
Preferably, described method utilizes event to call or the mode automatically called utilizes multilingual dynamic script enforcement engine Run corresponding example.
Preferably, described method is further comprising the steps of:
S4, set up dynamic script enumerator for each described example;
S5, described example run once, and corresponding dynamic script enumerator adds 1, and updates last allocating time;
S6, according to described last allocating time and the value of dynamic script enumerator, it is judged that institute in predetermined time period State the count value of dynamic script enumerator whether less than pre-determined number, if less than described pre-determined number, then by corresponding example from Internal memory unloads.
Preferably, described method is the most further comprising the steps of:
S7, according to described last allocating time, search the described example of never call within a predetermined period of time, and from internal memory Unloading.
Preferably, corresponding example unloaded from internal memory by described step S6 specifically include following steps:
Corresponding example is added and removes mark;
According to described mark of removing by corresponding example unloading.
(3) beneficial effect
The invention provides a kind of method realizing the interception extension of system dynamics function by the compiling of multilingual cloud, the present invention First according to business demand, the method needing extension identifies the interception label of correspondence;Afterwards label is intercepted for each, The service logic adding the systemic-function corresponding to required extension intercepts code;Wherein said service logic intercepts code and is used for Realize needing the described systemic-function of extension;Add compiling according to described interception label in corresponding position during local compiling to block Cutting device code, wherein said blocking apparatus code intercepts code for the service logic inweaving correspondence, intercepts dress according to described Put code to be compiled by cloud and the more corresponding service logic of storage in described script thesaurus is intercepted code and be compiled and transport OK, wherein and run corresponding service logic interception code compilation according to following steps: detect whether that there is extension intercepts, if Exist, then the identification information intercepted according to current extensions determines that the service logic of correspondence intercepts code;The business obtained is utilized to patrol Collect and intercept code building identification code, and search whether to there is corresponding example from internal memory according to described identification code;If it is right to exist The example answered, then utilize multilingual dynamic script enforcement engine to call and run the example of correspondence;If there is not the example of correspondence, The script compiler engine of the language form utilization correspondence then intercepting code according to described service logic is compiled, and generates correspondence Example, utilizes multilingual dynamic script enforcement engine to call and run the example of correspondence afterwards.The present invention is led to according to business demand Cross interception label and can remotely add the service logic interception code of correspondence with Real-time and Dynamic, such that it is able to pass through in system is run Service logic is intercepted after code is compiled and is introduced directly into and runs by the compiling of multilingual cloud, has no effect code before, Achieve dynamic script engine system, then achieve the extension of systemic-function dynamic interception, improve the spirit of expanding of system function Activity, open, maintainable and scalability.
The present invention by arrange interception label, blocking apparatus code, service logic intercept code, multilingual cloud compile and Dynamic Execution, segments the functions of modules in software development utilizing dynamic script engine system to be, makes developer to use Different language at line development, Dynamical Deployment, Dynamic Weave, the scheme of dynamic operation, write reducing duplicated code, be then System run when needing compile, load, when running and inweave the framework of original system, this overlaps frame system can improve development efficiency Programming idea.In the present invention, the module of online dynamic scalable script even can give third company's exploitation, improves row Cooperation in the industry, reaches the purpose having complementary advantages.After exploitation completes, script module function also can be adjusted by other programming systems With, the reusability of software can be improved.Therefore, the present invention propose by intercept label realize dynamic scalable structure for Software architecture development also has Practical significance widely.
Traditional software development methodology increasingly demonstrates its intrinsic limitation, and requires operationally to change its row For, support dynamic expansion and upgrading.Different from traditional software architecture integrated all function of program, energy of the present invention Enough functions by major part extension are placed in outer remote server, due to convenience and the motility of this method, it is possible to pass through Inserting dynamic script and change external dynamic script realizes the expansion of software function, improves, this is also that the present invention is led to Cross interception label and realize the advantage place of dynamic script engine architecture exploitation
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to Other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is the flow chart adding in the present invention and intercepting label;
Fig. 2 is to add service logic in the present invention to intercept the flow chart of code;
Fig. 3 is the flow chart of compilation run in the present invention;
Fig. 4 is the structural representation of script thesaurus in the present invention;
Fig. 5 is to realize, by the compiling of multilingual cloud, the device signal that the extension of systemic-function dynamic interception is replaced 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 this locality 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 representation of legacy system;
Figure 10 B is expansible system structure schematic diagram in the present invention;
Figure 11 is multilingual dynamic script code listing schematic diagram in the present invention;
Figure 12 is the interface schematic diagram that the service logic added in the present invention intercepts code Rest;
Figure 13 is to add service logic in the present invention to intercept the interface schematic diagram of code;
Figure 14 is to add the interface schematic diagram that service logic intercepts the data source code interface of code in the present invention.
Detailed description of the invention
With embodiment, the present invention is described in further detail below in conjunction with the accompanying drawings.Following example are used for this is described Bright, but can not be used for limiting the scope of the present invention.
A kind of method realizing the interception extension of system dynamics function by the compiling of multilingual cloud, described method includes following step Rapid:
S1, according to business demand, the method needing extension identifies the interception label of correspondence;
S2, for each intercept label, add corresponding to required extension systemic-function service logic intercept generation Code;Wherein said service logic intercepts code for realizing needing the described systemic-function of extension;
Compiling blocking apparatus code is added according to described interception label in corresponding position, wherein when S3, local compiling Described blocking apparatus code intercepts code for the service logic inweaving correspondence, is compiled by cloud according to described blocking apparatus code Again the corresponding service logic of storage in described script thesaurus is intercepted code to be compiled and run, wherein according to following step Suddenly corresponding service logic intercepted code compilation and run:
S31, detect whether exist extension intercept, if exist, then according to current extensions intercept identification information determine correspondence Service logic intercept code;
S32, the service logic utilizing described step S31 to obtain intercept code building identification code, and according to described identification code Search whether to there is corresponding example from internal memory;
If S33 exists corresponding example, then multilingual dynamic script enforcement engine is utilized to call and run the reality of correspondence Example;If there is not the example of correspondence or having occurred and that change, then read corresponding described service logic from described script thesaurus Intercept code, and the script compiler engine that described service logic intercepts the corresponding language form of code loading is compiled, and generates Corresponding example, utilizes multilingual dynamic script enforcement engine to call and run the example of correspondence afterwards.
The present invention according to business demand by intercept label add remotely can add with Real-time and Dynamic correspondence service logic intercept Code, such that it is able to be introduced directly into after being compiled service logic interception code by the compiling of multilingual cloud in system is run And run, code before is had no effect, it is achieved that dynamic script engine system, then achieve systemic-function dynamic interception Extension, improves the motility of expanding of system function, opening, maintainability and scalability.
Further, described service logic interception code includes following information: category of language, extension that code uses intercept Code, described extension intercept the purposes of code, run time-out time, error process mode, interception mode, interception rank, Interception function in client.Described error process mode includes interrupting and continuing to run with.Described interception mode includes synchronizing Intercept and asynchronous interception.
Further, described step S32 generates described identification code to comprise the following steps:
Described service logic is intercepted code and carries out virtual class packaging, and carry out uniqueness Hash, generate MD5 character string.
The example utilizing multilingual dynamic script enforcement engine to call and run correspondence in described step S33 includes following step Rapid:
If the operation time exceedes described operation time-out time or occurs abnormal, then record running log, time-consuming situation and Abnormal information;
If running without exception and not less than described operation time-out time, then operation result is returned.
Said method utilizes event to call or the mode automatically called to utilize multilingual dynamic script enforcement engine to run right The example answered.
Further, described method is further comprising the steps of:
S4, set up dynamic script enumerator for each described example;
S5, described example run once, and corresponding dynamic script enumerator adds 1, and updates last allocating time;
S6, according to described last allocating time and the value of dynamic script enumerator, it is judged that institute in predetermined time period State the count value of dynamic script enumerator whether less than pre-determined number, if less than described pre-determined number, then by corresponding example from Internal memory unloads.
Further, described method is the most further comprising the steps of:
S7, according to described last allocating time, search the described example of never call within a predetermined period of time, and from internal memory Unloading.
Further, corresponding example unloaded from internal memory by described step S6 specifically include following steps:
Corresponding example is added and removes mark;
According to described mark of removing by corresponding example unloading.
The waste of resource can be reduced by the example that unloading is corresponding, improve the speed of service.
The present invention by arrange interception label, blocking apparatus code, service logic intercept code, multilingual cloud compile and Dynamic Execution, segments the functions of modules in software development utilizing dynamic script engine system to be, makes developer to use Different language at line development, Dynamical Deployment, Dynamic Weave, the scheme of dynamic operation, write reducing duplicated code, be then System run when needing compile, load, when running and inweave the framework of original system, this overlaps frame system can improve development efficiency Programming idea.In the present invention, the module of online dynamic scalable script even can give third company's exploitation, improves row Cooperation in the industry, reaches the purpose having complementary advantages.After exploitation completes, script module function also can be adjusted by other programming systems With, the reusability of software can be improved.Therefore, the present invention propose by intercept label realize dynamic scalable structure for Software architecture development also has Practical significance widely.
Below by a specific embodiment, said method and other steps are described in detail.
As it is shown in figure 1, the method adding interception label of this enforcement comprises the following steps:
(1) needing or the requirement of customer personalized customized demand according to operation system, determines at system function Stamping Attributeintercept by IDE in the method for required extension and intercept label, wherein these intercept on label Information spinner to have: whether generates blocking apparatus code, and interception is enumerated: intercepts before and after interception, method after interception, method before method. Intercept the position of label, have decided to the place module of method code, function, method name space, category information, needs are extended The general core business intercepted reserves corresponding interface.
As it is shown in figure 9, intercepting position can intercept or side after interception, method according to before practical situation selection specially method Intercept before and after method.
Above is by beating and intercept the mode of label and add intercept point, it is also possible to visual by the way of instrument will be with Upper interception label information adds in interception configuration file.Add information except there being information above, 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) above blocking apparatus information is preserved to XML information.
(3) by IDE plug-in unit, read before compiling project and intercept label information or XML file information.
(4) by IDE plug-in unit, it is judged that whether have interception label information in each class method of project or in XML information.
(5) by IDE plug-in unit, before and after having mark to intercept the method for label information, static state inweaves, and i.e. adds blocking apparatus Code, forms the code of a kind of mixing.
When using IDE compiling system project, by the IDE plug-in unit of self-defined exploitation, will intercept according to information above Label information or interception configuration file, automatically by corresponding for blocking apparatus code insertion position.It should be noted that this Attribute intercepts label, and the blocking apparatus code being only intended to judge to add before compiling is in apoplexy due to endogenous wind method name position, if Need to add, intercept before or after, use and synchronize or asynchronous, with reflection reflection irrelevant.
(6) each method of each class in detection project again, jumps to step 4.
The method of above-described embodiment utilizes dynamic script IDE card module, dynamic script code blocking module and dynamically Scripted code request communication module completes, as it is shown in figure 5, after completing to intercept the arranging of label, will intercept the configuration information of label Notify dynamic script code blocking module server end, record.
Add after intercepting label and service logic interception code interpolation, proceed service logic and intercept code, volume Translate operation and can be achieved with the extension of systemic-function dynamic interception, below service logic is intercepted code interpolation, the step of compilation run It is described in detail.
Service logic intercepts code and adds and specifically include following steps:
As in figure 2 it is shown, comprise the steps:
(1) according to operation system functions of modules point Xml file add online/editor's need extension intercept service logic Scripted code, i.e. service logic intercept code.The information added has: extension intercepts language;Extension intercepts code;Extension intercepts generation The effect of code describes;Extension interception mode: synchronous intercepting, asynchronous interception;Intercept code and perform time-out time;Interception code performs Fault processing mode: interrupt, continue to run with;Interception rank: system-level interception (and acting on all clients in system), client level Intercept (acting only on the client of use system);This extension intercept code acted on client Id (required for each client Property service logic is different).
(2) service logic scripted code is carried out virtual class packaging, and carry out uniqueness Hash, generate 36 MD5 Character string, it is possible to unique this script of mark.Uniqueness Hash information except there being service logic scripted code, also system banner, Customer ID (systems buying person), class method manes mark, language used.
(3) judge NoSql script storage repository (Redis) has existed according to this uniqueness cryptographic Hash.
(4) if NoSql script storage repository does not exists, then step (six) is jumped to
(5) if NoSql script storage repository exists, then (eight) are jumped to.
(6) without compiling syntax error, then service logic scripted code is saved in NoSql script storage repository.
(7) if there being compiling syntax error, then step (eight) is jumped to
(8) based on context prompting script adder, Already in NoSql script storage repository or compiling exist Syntax error or interpolation are edited successfully, jump to step (), again operate new, for self-defined extension interception service logic Behavior, before and after functions of modules method Method, it is allowed to insert the order that infinitely an interception, interception perform suitable according to configure Sequence performs successively, it is also possible to extension after interpolation at any time intercept list adjusts execution sequence at any time or it is opened or Disable or edit replacement again.
The service logic such as added intercepts code and is used for realizing Rest service, adds interface as shown in figure 12, can be by step The most simple and efficient.Add service logic and intercept the interface of code as shown in figure 13, add service logic and intercept the data source of code Code interface is as shown in figure 14.
As shown in Figure 10 A, 10B, compared to the fixing implementation of traditional application program system, i.e. each function mould The interface that block is provided and realization are all the modules defined before, it is impossible to according to some conditions in the running of program Judge that new function is added in behavior or the extension of the program that dynamically changes.The present invention can be in the time of running of system according to fortune Row environmental context judges whether to need to 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 the most clearly, dynamic script engine management program Dynamic script functional template can be completely independent exploitation or third company exploitation, this be conducive in large-scale software development mistake Cheng Zhong, enables exploitation to carry out parallel, improves efficiency and the quality of exploitation.And during exploitation and debugging, when part is dynamic The when of state script module generation problem, due to relatively independent between each dynamic script card module, can't be had influence on it His module, is beneficial to carrying out and carrying out of Experience of Software Testing Work, it is simple to solution of pinpointing the problems during test and debugging Problem.It addition, the amendment to partial dynamic script, do not interfere with other dynamic scripts, it is to avoid draw because of righting a wrong Go out the situation of new problem, and system can dynamically replace assembly at run time, according to the change of running environment or some Condition and cause new behavior, thus improve the adaptivity of software system dynamically.
Service logic intercepts code adds is to utilize dynamic script to add module and scripted code spreading code process mould Block completes, as it is shown in figure 5, satisfactory code is entered dynamic script code storage by dynamic script code storage module stores.
Intercept label and service logic intercepts after code adds well and can form multilingual dynamic script code listing, such as figure Shown in 11.
It should be noted that blocking apparatus code and service logic intercept code there is difference substantially, service logic Intercept code and be used for realizing the function of system extension, can be modified in real time, carry out cloud compiling by remote server and realize Run;And blocking apparatus code is a shell, simply one section inweaves program, is directed to specifically need Remote Expansion In method, carrying out local compiling, the real logical code write, i.e. service logic intercept code and intercept dress not included in this Put inside code.The most here blocking apparatus code is such as: RunDynamicScript (" SendSms ", " 13011199191 ", " you get well this is note ");But the actual functional capability code (i.e. service logic interception code) sending note is at remote server.
Compilation run specifically includes following steps, as shown in Figure 3:
1) calling service functions of modules method, system extends interception parameter from a high speed according to operation system functions of modules point Caching Redis judging whether, extension intercepts and (only takes System level business logical extension and ought be up till now for enabling state The individual business logical extension of client).If not enabled state, then operation system functions of modules point calls extended method, passes Entering contextual information to remotely, the extension interception parameter of its kind of transmission mainly has: service logic scripted code mark, system mark Know, customer ID (systems buying person), class method manes mark and the contextual information such as method parameter.
2) if detection exists extension and intercepts, by system banner, customer ID (systems buying person), class method manes mark etc. Information is transmitted, and reads extension according to these marks from script NoSql storage repository and intercepts the information such as scripted code, and does script generation Code uniqueness Hash.These information include: extension intercepts language;Extension intercepts code;Extension interception mode: synchronous intercepting, different Step intercepts;Intercept code and perform time-out time;Intercept code error process mode: interrupt, continue to run with;Interception rank: System-level interception, client level intercept;
3) intercepting scripted code uniqueness Hash according to extension, the scripted code the most compiled from detection internal memory is real Example (there is not the most compiled example, then have two may, first, run first, only compiling once, second, extension intercept script Code changing, needs to be replaced).Dynamic script is loaded into frame system and creates the principle that example observed and be: It is loaded into again the when of operation, it is not necessary to or need replacement just script module to be unloaded, so can reduce accounting for of internal memory With.
4) if internal memory existing this extension intercept scripted code example, then 6 are redirected.
5) if internal memory not existing this extension intercept scripted code example, then 11 are redirected.
6) read, from internal memory, the memory instance that location has compiled.
7) dynamic script enforcement engine is according to context letters such as class method manes mark and method parameter, the language that used Breath, is driven running example to run simultaneously specified function method (if asynchronous operation, then by multilingual dynamic script enforcement engine Processed by other thread queue on backstage and run), delivery protocol uses thrift.
8) if running and exception occurring or exceedes the time specified, then 9 are jumped to.
9) system asynchronous record running log & performance, time-consuming situation, abnormal information returns.
10) normal operating results returns, and jumps to 12.
11) dynamic script example adds 1 enumerator, and updates last allocating time.
12) system detects whether there is extension or intercept again, jumps to 1.Multiple extensions intercept the execution of scripted code Result last directly return, before and the execution result of centre can add what system provided especially to ApplicationContext currently performs thread-data groove (ApplicationContextDataSlot), can be in process Or transmission obtains in the most back and forth.
Above-mentioned execution process is applicable to teleaction service extension, is simultaneously suitable for local service and extends, as shown in Figure 7,8, by Multilingual dynamic script code compilation engine device and enforcement engine device complete compiling and perform, and wherein running example is stored in In internal memory, operate in script and exist in script warehouse.Extension blocking apparatus is for realizing interception label and intercepting code Add.
Wherein generate extension interception scripted code example to comprise the following steps:
(1) read extension from NoSql script storage repository and intercept scripted code, the wherein structure in script warehouse such as Fig. 4 institute Show.
(2) extension is intercepted scripted code and be loaded into multilingual dynamic script compiler engine.Different language, is loaded onto not Same compiler engine is compiled.
(3) load the outside relating module required for extension intercepts language and resource is compiled.Complicated service logic, Usual one section of scripted code cannot complete, and need to rely on the resources such as outside dll or jar and participates in common compiling.
(4) the internal memory byte after compiling is positioned over internal memory and corresponding initialization operation is done in instantiation.
Above-mentioned compilation run method by dynamic script code blocking module server end, dynamic language management engine module with And dynamic script example runs calling module and has coordinated, as it is shown in figure 5, run time-out time by the abnormal overtime mould of dynamic script Block processes accordingly.
Dynamic script example is called two ways: event is called and automatically called.Event calls finger, and certain is special Fixed event message is triggered, if the mouse of user is when clicking on certain function point, and the method etc. will called after this operation Extension intercept information passes to system framework, and system judges that calling corresponding dynamic script instance processes runs.Automatically call Be then system can according to the needs of system itself or the needs of user, when reaching certain time point or during certain condition or By certain time interval (per second/minute/hour/week/moon), system framework automatically triggers and dynamic expansion is intercepted scripted code Example calls or automatically at running background.The invoked procedure that system framework intercepts scripted code example to dynamic expansion is: Dynamic script example is first carried out, then judges whether next extension intercept point, if there is again extension point in Kuo Zhan Or have other parallel extension point, then continuing executing with down, so these extension intercept points are the formation of the expansion of having an opportunity of Exhibition chain, thus extend the difference in functionality required for completion system and client.
The personalized customization service logic of client there may come a time when more complicated, utilizes extension to intercept scripted code service logic Unloading mechanism, memory source can be greatly reduced to a certain extent and take, concrete unloading mechanism comprises the steps:
1) it is that each dynamic script example arranges enumerator and last allocating time.
2) call a dynamic script example and i.e. enumerator is added 1, and update last allocating time.
3) according to being arranged in the cycle interior timing detection counter and last allocating time specified, will call secondary less than appointment The dynamic script example of number and big never call the most always adds removes mark.
4) system will have dynamic script example dynamic offloading from internal memory of the mark of removal, and wherein this step is by dynamic foot This example Unload module or dynamic script example replacement module complete, as shown in Figure 5.
As shown in Figure 6, the operation system of the present invention carries out operation expanding point definition by intercepting the setting of label, exists afterwards Corresponding extension point adds service logic and intercepts code, and is stored in script warehouse.Operationally, by multilingual script compiling/ Enforcement engine is from script warehouse Download Script and controls the outside relating module of associated language and carries out the compiling of multilingual code and transport OK, the online extension of finishing service systemic-function.
What dynamic script engine system represented is a horizontal relation, if " system " is a hollow cylinder Body, wherein encapsulate is attribute and the behavior of object;So dynamic script engine, the most seemingly a sharp sword, by these open circles Cylinder is cut open, to obtain its internal message.Then the tangent plane that these are cut open by the most dexterously restores to the original state.This characteristic carries High development efficiency, makes the impact localization that change causes, and code develops to modularity direction, and then reduces coupling, reaches soft Summary is safeguarded in part exploitation, the target that software iteration simplifies.
Compared with prior art, technical scheme has the advantage that (1) comes into force immediately: owing to being to burst at the seams out Send out, compiled online, so service can be immediately generated after exploitation compiling, calls the most immediately for application system, all need not out The personnel of sending out recompilate, and heat is disposed without restarting system;(2) strengthen code maintainability: code line development, on-line debugging, On-line operation, if encountered problems, can repair online, and quickly upgrading extends or replaces, enables or disable, it is achieved dynamically can insert Pull out.(3) reduce the complexity of business, force classifying rationally system boundary, appropriate design domain model, make the cycle of iteration more Short, can be with multi version, gray scale is upgraded, service degradation, service distributed tracking etc..(4) reuse of code is high: dynamic script engine Each aspect is embodied as independent module, is loosely-coupled between module.Loosely-coupled realization generally means that more preferably Code reusability, its shifting can be worth in other system and directly invoke, thus reduce development cost and the difficulty of software, Primary development, can call anywhere (remotely/local).(5) performance is high: based on context dynamic script framework calls and need Wanting, be immediately compiled by script, the example after compiling is positioned in internal memory, convenient and high just as direct reference object Effect, and have synchronization, asynchronous (the non-obstruction of queue), the most multiple call processing mode.(6) polyglot support: for application system System, if needing extension to add new function, is possible not only to use existing language development, it is also possible to develop with other Languages, And can cross-platform run.(7) be easily managed: each developer can individually develop, integrated, test, dispose, complete Line flow process, effectively reduces O&M cost and management cost, improves development efficiency.(8) technological innovation: easily attempt technological innovation, The most each Function Extension point can use different programming languages to write.(9) stability strengthens: system stability strengthens, The inefficacy of single service does not interferes with other services, can to a certain degree realize service degradation.(10) be prone to exploitation: each dynamically Script extension focus all uses minimum coupling to process, and the module in system is refined further, 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) code set should be readily appreciated that.Use dynamic script engine technique nonexpondable for needs public code can be focused on one Place realizes, and the amendment scope of such code can be obtained by strict control, reduces the code revision impact on system stability, Reduce the redundancy of code and the degree of coupling, strengthen readability, improve software quality, solve that OOP is cross-module to be caused Code confusion and code scattering problem.(12) system easily extends.It is easy to by setting up new dynamic script addition new Function is activated business logic rule.When adding new functions of modules in system, existing dynamic script the most crosscutting enter Come, make system be prone to extension;Can be on-demand to systemic-function on the premise of need not recompilating original system after system is issued Expanding, thus can develop the more dynamic scripts of extension, quick customer in response individual demand changes.(13) distribution Formula: realize can being simultaneously deployed on multiple servers the service logic of the most online extension, it is achieved the load of service logic Equalize extending transversely and distributed deployment, thus adapt to multi-user, high concurrent request.
The present invention uses a new generation of Microsoft compiling system (Roslyn), and this is a compiler the most open, with Different toward opaque compilation process, developer can access and analyze compiling data in compilation process and such as resolve code, language Justice is analyzed, and this is encapsulated and again extends by the present invention, carries out resolving compiling source code file, dynamically for compiling by compiler Cheng Yuyan increases the operation such as function, self-defined compilation facility action, after extension and be allowed to convenient easy-to-use.Adopted by comparison Roslyn then from more setting up on the basis of end Managed Code, when compiling multiple script at the same time, CPU takies Rate can be relatively less, and compilation process is more stable efficiently, and performance is higher, and can do more control and expansion in compilation process Exhibition operation.
The present invention can realize by the way of the most online instant interpolation code compilation code more efficiently, specifically side Case is can only to use an action Action of Controller, according to the data of transmittance process on view in this Action Source key parameter, goes Dynamic trigger to perform the scripted code of various different relational database/non-relational NoSql data source, obtains Fetch data and also can process with secondary filter, then presenting returning to view in final data assignment to entity B ean.
The invention provides a kind of brand-new, more efficient, instant, online programming compiling efficiently, dynamic expansion The pluggable square law device of intercepting system function, when in system certain function need on the original basis to activate business logic, When triggering new action or newly increase the new function of extension, can be with online programming, Just-In-Time, dynamic expansion systemic-function, this Plant Function Extension and interception is possible not only to be system level, it is also possible to be levels of clients extension and interception, additionally without weight under line Newly developed upload, it is achieved the quick dynamic expansion of systemic-function and resource and effectively utilizing, and be allowed to interconnect, mutually prop up Support, cooperate, thus provide value for client, additionally the present invention can with the fault in on-line amending software, debug, survey Examination, quickly comes into force, quickly applies, bring great motility, autgmentability and maintainability to original system.
Dynamic script engine technique in the present invention, is each demand client (relevant to business or unrelated logic) Being mapped as one section of dynamic script code, the extension in system clicks on Mobile state extension, when calling for the first time, compiler turns over it It is translated into executable code and is positioned in the middle of local/remote (Remote Dynamic script micro services) internal memory that (this section of code can be with common Programming language C#, VB.NET, JAVA, Python etc. write), solve in code set the problem of coupling with this, improve software weight By property, reduce code complexity and the problem of duplicated code of nucleus module, and then reduce development cost and the cost of project;Should With the software development methodology of dynamic script, it is also possible to make system development phase each module function definitely, functional template Between coupling the loosest, the system of exploitation has more extensibility, maintainability.Build online programming Just-In-Time engine, The function increasing original system can be extended dynamically.When finding that current system can not meet current demand, it is only necessary to Line increases a corresponding dynamic script, in the case of not stopping existing system operation, existing module carries out function expansion online Exhibition or supplementary, and need not the most lower develop, structure whole system redeploys again, thus realizes quick business expansion Launch to send out, immediately meet customer personalized customized demand.
Dynamic script engine system provides good platform, service dynamic script logic for extension during running software Instruction set can support common languages (C#/VB.NET/JAVA/Python), CompilerTools can generate low by framework The object identification code of level instruction, whole system disposably inweaves when running first at bytecode, and the code inweaved dynamically is compiled It is translated into efficient source code, and is positioned among internal memory, substantially increase the execution speed of system.
Dynamic script engine system segments the functions of modules in software development, makes developer that different language can be used to exist Line development, Dynamical Deployment, Dynamic Weave, the scheme of dynamic operation, write reducing duplicated code, then running in system needs Time compile, load, when running and inweave the framework of original system, the programming that this set frame system can improve development efficiency is thought Think.Online dynamic scalable script module even can give third company's exploitation, improves the cooperation in industry, reaches advantage Complementary purpose.After exploitation completes, script module function also can be called by other programming systems, can improve weighing of software The property used.Therefore, the dynamic scalable structure that the present invention proposes also has Practical significance widely for software architecture development.
In terms of architecture, traditional software architecture is unfavorable for the exploitation of large-scale clustered, disposes, to the modern times The development of software industry causes restriction greatly.Use the online programming Just-In-Time engine architecture of dynamic scalable, Each functional module can be made to have bigger independence, improve testability and the maintainability of software.Soft with traditional Part architecture is compared, and in dynamic scalable structure, it is mutually coordinated that mastery routine completes between each dynamic scalable module Work, and be relatively independent between the module of each new extension, this makes the simple in construction of calling program, and each several part can be the most only Vertical exploitation, independent deployment, independent operating, be conducive to improving concurrency and the efficiency of exploitation during large-scale software development. The function that major part extends is placed in outer remote server by dynamic script engine architecture, due to the convenience of this method And motility, it is possible to realize the expansion of software function by inserting dynamic script and change external dynamic script, improve and carry Height, this is also the advantage place of dynamic script engine architecture development approach.
Inventing and provide a kind of method utilizing dynamic script quickly to increase extension systemic-function for developer, it allows certainly The relation of definition program code execution sequence and execution logic, each dynamic scalable script can individually be adjusted by online programming Examination, upgrade maintenance, configuration, can on-the-flier compiler as required, install, be loaded into, run, stop, enabling, disable, unload, neither Affect the work of its existing functional module, there is again great motility.
The invention is not limited in this kind of language used by application software, it is possible to achieve .Net, VB.NET, Java, Python compiled online services, it is not necessary to as traditional approach, uses exploitation software Visual Studio or Eclipse at electricity Brain this locality is developed, but direct-on-line exploitation, online on-the-flier compiler, realizes compiling and i.e. services and to pass through spare interface dynamic Incision current system, it is achieved the Quick Extended of original function.
The invention is not limited in the dynamic foot of the system-level and client level of the standard module functional method to original system This extension, is possibly even user class, it is also possible to it is straight for the system needed that disengaging is provided separately the long-range RPC service of dynamic script Connect and call, it is also possible to generate online Restful service, directly invoke for front and back end developer that (system-level finger is applicable to own All users of client, client level refer to be only applicable to all users of existing customer, and user class refers to indivedual in client level or part Specify user).
The invention is not limited on the existing functional method of operation system of standard, do local dynamic expansion, if you Operation system be forming types based on SOA/ESB/MicroService, such dynamic expansion can also be melted by directly transplanting Close teleaction service interface or add the place that you need to extend to, between different dynamic expansion, can call mutually, it is possible to To call other interface outside, thus the dynamic assembly that structure is compound, it is allowed to more flexible and changeable.
Various embodiments above only in order to technical scheme to be described, is not intended to limit;Although with reference to aforementioned each reality Execute example the present invention has been described in detail, it will be understood by those within the art that: its still can to aforementioned respectively Technical scheme described in embodiment is modified, or the most some or all of technical characteristic is carried out equivalent;And These amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme, its All should contain in the middle of the claim of the present invention and the scope of description.

Claims (10)

1. one kind realizes, by the compiling of multilingual cloud, the method that system dynamics function intercepts extension, it is characterised in that described method Comprise the following steps:
S1, according to business demand, the method needing extension identifies the interception label of correspondence;
S2, for each intercept label, add corresponding to required extension systemic-function service logic intercept code;Its Described in service logic intercept code for realize need extension described systemic-function;
Compiling blocking apparatus code is added according to described interception label in corresponding position when S3, local compiling, wherein said Blocking apparatus code intercepts code for the service logic inweaving correspondence, compiles general again according to described blocking apparatus code by cloud In described script thesaurus, the corresponding service logic interception code of storage is compiled and runs, wherein will according to following steps Corresponding service logic intercepts code compilation and runs:
S31, detect whether exist extension intercept, if exist, then according to current extensions intercept identification information determine correspondence industry Business logic intercepts code;
S32, the service logic utilizing described step S31 to obtain intercept code building identification code, and according to described identification code from interior Search whether in depositing to there is corresponding example;
If S33 exists corresponding example, then multilingual dynamic script enforcement engine is utilized to call and run the example of correspondence;If There is not the example of correspondence or have occurred and that change, then reading corresponding described service logic from described script thesaurus and intercept generation Yard, and the script compiler engine of the described service logic interception corresponding language form of code loading is compiled, generate correspondence Example, utilizes multilingual dynamic script enforcement engine to call and run the example of correspondence afterwards.
Method the most according to claim 1, it is characterised in that described service logic intercepts code and includes following information: generation The category of language of code use, extension intercept code, the purposes of described extension interception code, run at time-out time, execution mistake Reason mode, interception mode, interception rank, interception function in client.
Method the most according to claim 2, it is characterised in that described error process mode includes interrupting and continuing fortune OK.
Method the most according to claim 2, it is characterised in that described interception mode includes synchronous intercepting and asynchronous interception.
Method the most according to claim 1, it is characterised in that generate described identification code in described step S32 and include following Step:
Described service logic is intercepted code and carries out virtual class packaging, and carry out uniqueness Hash, generate MD5 character string.
Method the most according to claim 2, it is characterised in that utilize multilingual dynamic script to perform in described step S33 Engine calling and run correspondence example comprise the following steps:
If the operation time exceedes described operation time-out time or occurs abnormal, then record running log, time-consuming situation and exception Information;
If running without exception and not less than described operation time-out time, then operation result is returned.
Method the most according to claim 1, it is characterised in that the mode that described method utilizes event to call or automatically calls Multilingual dynamic script enforcement engine is utilized to run corresponding example.
Method the most according to claim 1, it is characterised in that described method is further comprising the steps of:
S4, set up dynamic script enumerator for each described example;
S5, described example run once, and corresponding dynamic script enumerator adds 1, and updates last allocating time;
S6, according to described last allocating time and the value of dynamic script enumerator, it is judged that described dynamic in predetermined time period Whether the count value of state script enumerator is less than pre-determined number, if less than described pre-determined number, then by corresponding example from internal memory Middle unloading.
Method the most according to claim 8, it is characterised in that described method is the most further comprising the steps of:
S7, according to described last allocating time, search the described example of never call within a predetermined period of time, and unload from internal memory Carry.
Method the most according to claim 8, it is characterised in that in described step S6, corresponding example is unloaded from internal memory Carrier body comprises the following steps:
Corresponding example is added and removes mark;
According to described mark of removing by corresponding example unloading.
CN201610597848.6A 2016-07-26 2016-07-26 The method that realization system dynamic function intercepts extension is compiled by multilingual cloud Active CN106250179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610597848.6A CN106250179B (en) 2016-07-26 2016-07-26 The method that realization system dynamic function intercepts extension is compiled by multilingual cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610597848.6A CN106250179B (en) 2016-07-26 2016-07-26 The method that realization system dynamic function intercepts extension is compiled by multilingual cloud

Publications (2)

Publication Number Publication Date
CN106250179A true CN106250179A (en) 2016-12-21
CN106250179B CN106250179B (en) 2019-10-25

Family

ID=57603739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610597848.6A Active CN106250179B (en) 2016-07-26 2016-07-26 The method that realization system dynamic function intercepts extension is compiled by multilingual cloud

Country Status (1)

Country Link
CN (1) CN106250179B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667919A (en) * 2018-04-25 2018-10-16 金蝶软件(中国)有限公司 Data processing method, device, computer equipment and storage medium
CN108804113A (en) * 2018-06-07 2018-11-13 东软集团股份有限公司 Dispose the method, apparatus and storage medium and electronic equipment that micro services are applied
CN109240662A (en) * 2018-08-09 2019-01-18 赛尔网络有限公司 A kind of software development methodology based on cloud platform, cloud platform, equipment and medium
CN109491689A (en) * 2018-11-20 2019-03-19 中国建设银行股份有限公司 Client process method, apparatus and system
CN112106023A (en) * 2018-05-09 2020-12-18 日本电信电话株式会社 Offload server and offload program
CN112363857A (en) * 2021-01-12 2021-02-12 恒生电子股份有限公司 Application system, synchronization method, storage medium and device of micro front-end architecture
CN112506625A (en) * 2020-11-16 2021-03-16 国家卫星气象中心(国家空间天气监测预警中心) Automatic service start-stop control method
CN113656291A (en) * 2021-08-04 2021-11-16 成都中科合迅科技有限公司 Dynamic calling method for software script engine

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949185A (en) * 2005-10-13 2007-04-18 同济大学 Parallel adjusting and performance analyzing method of supporting multi-language multi-platform under isomerized environment
CN102004648A (en) * 2010-12-27 2011-04-06 用友软件股份有限公司 Program customization method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949185A (en) * 2005-10-13 2007-04-18 同济大学 Parallel adjusting and performance analyzing method of supporting multi-language multi-platform under isomerized environment
CN102004648A (en) * 2010-12-27 2011-04-06 用友软件股份有限公司 Program customization method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何腾飞: ""面向方面程序并行化技术研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667919A (en) * 2018-04-25 2018-10-16 金蝶软件(中国)有限公司 Data processing method, device, computer equipment and storage medium
CN108667919B (en) * 2018-04-25 2021-06-15 金蝶软件(中国)有限公司 Data processing method, data processing device, computer equipment and storage medium
CN112106023A (en) * 2018-05-09 2020-12-18 日本电信电话株式会社 Offload server and offload program
CN108804113A (en) * 2018-06-07 2018-11-13 东软集团股份有限公司 Dispose the method, apparatus and storage medium and electronic equipment that micro services are applied
CN108804113B (en) * 2018-06-07 2022-03-22 东软集团股份有限公司 Method, device and storage medium for deploying microservice application and electronic equipment
CN109240662A (en) * 2018-08-09 2019-01-18 赛尔网络有限公司 A kind of software development methodology based on cloud platform, cloud platform, equipment and medium
CN109491689A (en) * 2018-11-20 2019-03-19 中国建设银行股份有限公司 Client process method, apparatus and system
CN112506625A (en) * 2020-11-16 2021-03-16 国家卫星气象中心(国家空间天气监测预警中心) Automatic service start-stop control method
CN112506625B (en) * 2020-11-16 2024-03-12 国家卫星气象中心(国家空间天气监测预警中心) Automatic start-stop control method for business
CN112363857A (en) * 2021-01-12 2021-02-12 恒生电子股份有限公司 Application system, synchronization method, storage medium and device of micro front-end architecture
CN113656291A (en) * 2021-08-04 2021-11-16 成都中科合迅科技有限公司 Dynamic calling method for software script engine
CN113656291B (en) * 2021-08-04 2023-04-28 成都中科合迅科技有限公司 Dynamic calling method for software script engine

Also Published As

Publication number Publication date
CN106250179B (en) 2019-10-25

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
CA3008844C (en) Automatic generation of microservices based on technical description of legacy code
CN106250199B (en) A kind of the dynamic micro services call method and device of multilingual cloud compiling
CN105022630B (en) A kind of assembly management system and assembly management method
CN106293704B (en) Dynamic micro services edit methods, device and the server of multilingual cloud compiling
US9075596B2 (en) Deployment
US7299382B2 (en) System and method for automatic test case generation
US8533676B2 (en) Single development test environment
US10489274B2 (en) Using emulation to disassociate verification from stimulus in functional test
CN106227611A (en) The dynamic micro services call method of a kind of multilingual cloud compiling and device
US20070250574A1 (en) Continuous deployment
CA2773981C (en) System and method of substituting parameter sets in self-contained mini-applications
AU2012201749B2 (en) Single development test environment
CN103180827A (en) Device and method for executing task files in a game server
CN112148278A (en) Visual block chain intelligent contract framework and intelligent contract development and deployment method
CN115220863A (en) Operation and maintenance method and device for container application, computer equipment and storage medium
Schroder-Preikschat et al. Static and dynamic weaving in system software with AspectC++
CN115525255A (en) Construction method of intelligent contract system
Eddin Towards a Taxonomy of Dynamic Reconfiguration Approaches.
Prajapati et al. High quality web-application development on java EE platform
Chatterjee et al. Dynamic weaving of aspects in C/C++ using PIN

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