CN102023856A - Method for outputting and operating data at server in formatting way according to demands of user - Google Patents
Method for outputting and operating data at server in formatting way according to demands of user Download PDFInfo
- Publication number
- CN102023856A CN102023856A CN201010514918XA CN201010514918A CN102023856A CN 102023856 A CN102023856 A CN 102023856A CN 201010514918X A CN201010514918X A CN 201010514918XA CN 201010514918 A CN201010514918 A CN 201010514918A CN 102023856 A CN102023856 A CN 102023856A
- Authority
- CN
- China
- Prior art keywords
- script
- server
- code
- data
- engine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention relates to a method for outputting and operating data at a server in a formatting way according to the demands of a user. The method comprises the following steps of: 1. selecting a script language and a script language execute engine; 2. writing script codes in the script language by the user according to business requirements; 3. sending or saving the script codes to the server by a client side; 4. executing the script codes by the script language execute engine at the server; and 5. outputting and feeding back execution result data to the client side. The method can be used for realizing online development and convenient and quick developed application of service providers, has the advantage of flexible codes, is easier for API (Application Program Interface) opening by service suppliers and can flexibly and normatively output and operate business data at the server in a formatting way according to the demands of the user by applying data exchange, service integration and collaborative application among service systems on the basis of the script language and a cloud computing mode.
Description
Technical field
The present invention relates to a kind ofly self-servicely to build a station, the method for internet open platform, cloud computing, the online application service in internet and software development, software and service SAAS, exchanges data, more particularly, relate to a kind of method of exporting and operating the server-side business datum according to user's demand format.
Background technology
Along with Facebook passes through open platform and properly lighted, each big Internet firm of the whole world begins competitively to release the open platform strategy of oneself, and is good to prospect a slice of open platform both at home and abroad.Open platform (Open Platform) is in software industry and network, open platform is meant that software systems pass through to disclose the resource that its application programming interface (API) or process (function) make outside program can increase the function of these software systems or use these software systems, and does not need to change the source code of these software systems.Open platform mainly by the opening of following several technological means implementation platform data, with third-party exchanges data, is built some and the professional relevant application in this website at present.
(1)REST。REST is the abbreviation of English Representational State Transfer, translator of Chinese is " the statement sexual state shifts ", and he is a term that is proposed in his paper " Architectural Styles and the Design of Network-based Software Architectures " by Roy Thomas doctor Fielding.A kind of framework style that REST itself just designs for distributed hyper-media system, rather than standard.
The REST framework is used and is designed at Web, its objective is in order to reduce the complicacy of exploitation, improves the scalability of system.REST has proposed following design criteria: 1. all things on the network all are conceptualized as resource (resource); 2. corresponding unique resource identifier (resource identifier) of each resource; 3. by general attachment unit interface (generic connector interface) resource is operated; 4. the various operations to resource can not change resource identifier; 5. all operations all are stateless (stateless).
Resource indication among the REST be not data, but the combination of the data and the form of expression, on data, have overlapping or identical such as " 10 members of up-to-date visit " and " most active 10 are the member ", and because their form of expression difference, so be classified as different resources, this just why full name of REST be the reason of Representational State Transfer.Resource identifier is exactly URI (Uniform Resource Identifier), no matter be picture, and Word or video file, even be a kind of virtual service, also no matter you are the xml form, the txt file form still is other file layout, all by URI resource is carried out unique sign.
REST is based on the Http agreement, and any operation behavior to resource all is to realize by the Http agreement.
At present, 51, in the school, through the country, Ali's software etc. is all realized open platform by the REST framework.
Widgets, the Gadgets of Google and the UWA of Netvibes etc.The widget classification is a lot, as Internet user rather than developer, and Web Widget that is useful on webpage that we use always and two kinds of the Desktop widget that is used for operating system:
Widget, iGoogle Gadget, bean cotyledon API.Wikipedia web widget says and is called badge, module, webjit, capsule, snippet, mini and flake.DHTML, JavaScript, Adobe Flash.
Desktop widget is little that operates on the PC operating system, Apple dashboard widget for example, Windows Sidebar and gadgets, one by one little application on the Google desktop sidebar (Google WDS side hurdle), be usually directed to notion widget engine, the i.e. running environment of widget.
(3)OpenSocial。The social application program that OpenSocial strides a plurality of websites for structure provides one group of general API.The developer can use standard JavaScript and HTML to create application program, in order to friend in the visit social networks and the corresponding Feeds of renewal.Opensocial provides a cover unified social networks framework and development model for social network sites.
(4) Mashup mixes, and is emerging a kind of network phenomenon on the current network, and web two or more uses are public or the private data storehouse uses, and adds together, forms one and integrates application.
(5) cloud computing, the App Engine of Google and the EC2 of Amazon and S3 etc.
Summary of the invention
The purpose of this invention is to provide and a kind ofly can be implemented in line development, it is convenient that service provider expands application service, source code flexible, (API) is easier for service provider's opening interface, based on this script and cloud computing pattern, the exchanges data between the application service system, service assembly, synergistic application are flexibly and the demand format according to the user of standard is exported and the method for operation server-side business datum.
Technical scheme of the present invention is such:
A kind of according to user's the demand format output and the method for operation server-side business datum, method is as follows:
(1) selected script and script are carried out engine;
(2) user uses above-mentioned language according to business demand compile script code;
(3) client sends or is saved in server-side to scripted code;
(4) carry out engine by the server-side script and carry out above-mentioned scripted code;
(5) the result data output of carrying out returns to client.
Described script is formatting script language (GScript).
Described execution engine is that engine (GScriptEngine) carried out in the formatting script language, be used to receive the scripted code that imports into, binding cache session (context) is resolved with request (request), run time version, encapsulates the required data of output user successively according to code command in resolving implementation.
The pointer of described buffer memory session (context) the storage referencing operation structuring/pointer in unstructured data storehouse, the pointer of referencing operation file/data cached/other data resource, other hardware device of referencing operation CPU/, and be stored in the code process according to the interim variable that produces of user instruction.
The parameter name and the parameter value of the request of described request (request) memory page.
Described formatting script language is carried out engine (GScriptEngine) suction parameter and is mainly comprised scripted code inlet flow (inputstream), buffer memory session (context), request (request), output encoder (encoding), result data output stream (outputstream), enables debugging mode (debug).
The algorithm that the engine resolving code carried out in described formatting script language be become-minute method, described change is meant that text-string constantly becomes new character string through the overmatching replacement, described branch is meant that the character string that is replaced is separated and develops into a plurality of new character strings, algorithm by become-minute-become-minute-become circular treatment.
The process steps that engine processing code carried out in described formatting script language is as follows:
(1) converts the scripted code inlet flow to text-string;
(2) form the instruction functions set successively according to directive script function grammer change-divisional processing;
(3) function that executes instruction successively in order;
(4) the instruction functions result calculated encapsulates the required data of output user successively according to the characteristic of instruction functions.
Described instruction functions is in proper order: carry out its function parameter set earlier, then carry out the sub-instructions function of function body inside successively.
When the instruction functions parameter sets is carried out, the parameter character string is carried out divisional processing, be divided into a plurality of parameter character strings successively, become processing then.
The scripted code instruction that the form of the result data of described execution is write based on the user.
The output content of described business datum and form can be XML, JSON, XML+XSL, XML+XSLT.
The step that scripted code sent or be saved in server-side is: provided access by service provider, transmit or be saved to server-side by network; Server-side can be carried out engine to its parsing, execution by automatic invoke script language when client-requested accesses script code, and the return results data.
Call the attribute or the method for reference pointer by instruction functions business datum is operated, the result data of carrying out is exported by the instruction functions format again.
Based on script language extensions opening interface (API), can pass through the extended instruction function, or be easy to the growth data interface by the mode of introducing pointer to object in buffer memory session (context), or the definition class name uses assign instruction functions structure class object.
Scripted code adopts PKI security system and technology in the trust of server-side.
Server-side is resolved the safety protecting method of carrying out scripted code can be as follows:
(1) engine itself is guaranteed the safety of resolving, the safety that instruction functions is carried out, and the method for employing is white-box testing, Black-box Testing; Or
(2) pointer to object of quoting strategy file safe in utilization limits addressable attribute and method; Or
(3) in the runtime environment environment of script execution engine, add security strategy; Or
(4) the parsing implementation status of monitoring script code.
Described security strategy can be:
(1) uses sandbox, allow scripted code resolve execution and in limited sandbox, move; Or
(2) handling duration timing, the time of scripted code resolve is carried out in control, reach binding hours after, processing will be interrupted; Or
(3) file size, the statement quantity of restriction scripted code; Or
(4) quantity and the size of restriction temporary variable buffer memory are perhaps used the hard disk cache strategy; Or
(5) utilize the idle and sleep sleep control CPU usage of thread; Or
(6) control exists the instruction functions of cyclical factor to be recycled the number of times that calls; Or
(7) adopt virtual machine.
Beneficial effect of the present invention is as follows:
(1) follow the custom that the developer uses the code compiling program, open up the software development new model---at line development: the developer just can encode, test, finish application and development on browser.
(2) why be referred to as script, promptly need not on server-side, to dispose, expand application service for service provider very easily.
(3) the changeable demand of user is satisfied in the dirigibility of code more flexibly.
(4) based on the easier service provider's opening interface (API) that makes of this script.
(5) cloud computing pattern: the user can be by network with as required, easily the mode of expansion---script obtains required resource.User side only need be write demand script and demonstrating data, gives server calculating.Make user terminal be simplified to a simple input-output device, and enjoy the powerful computing ability of server end (" cloud ") as required.
(6) very flexibly and the exchanges data between a plurality of application service systems of realization of standard, service assembly, synergistic application etc. by script.
Description of drawings
Fig. 1 is the opening of implementation platform data of the present invention, finishes the synoptic diagram with third-party exchanges data.
Fig. 2 is the design sketch of the embodiment of the invention.
Embodiment
Below in conjunction with embodiment the present invention is further elaborated:
A kind of according to user's the demand format output and the method for operation server-side business datum, method is as follows:
(1) selected script and script are carried out engine;
(2) user uses above-mentioned language according to business demand compile script code;
(3) client sends or is saved in server-side to scripted code;
(4) carry out engine by the server-side script and carry out above-mentioned scripted code;
(5) the result data output of carrying out returns to client.
Described script is formatting script language (GScript).
Described execution engine is that engine (GScriptEngine) carried out in the formatting script language, be used to receive the scripted code that imports into, binding cache session (context) is resolved with request (request), run time version, encapsulates the required data of output user successively according to code command in resolving implementation.
The pointer of described buffer memory session (context) the storage referencing operation structuring/pointer in unstructured data storehouse, the pointer of referencing operation file/data cached/other data resource, other hardware device of referencing operation CPU/, and be stored in the code process according to the interim variable that produces of user instruction.
The parameter name and the parameter value of the request of described request (request) memory page.
Described formatting script language is carried out engine (GScriptEngine) suction parameter and is mainly comprised scripted code inlet flow (inputstream), buffer memory session (context), request (request), output encoder (encoding), result data output stream (outputstream), enables debugging mode (debug).
The algorithm that the engine resolving code carried out in described formatting script language be become-minute method, described change is meant that text-string constantly becomes new character string through the overmatching replacement, described branch is meant that the character string that is replaced is separated and develops into a plurality of new character strings, algorithm by become-minute-become-minute-become circular treatment.
The process steps that engine processing code carried out in described formatting script language is as follows:
(1) converts the scripted code inlet flow to text-string;
(2) form the instruction functions set successively according to directive script function grammer change-divisional processing;
(3) function that executes instruction successively in order;
(4) the instruction functions result calculated encapsulates the required data of output user successively according to the characteristic of instruction functions.
Described instruction functions is in proper order: carry out its function parameter set earlier, then carry out the sub-instructions function of function body inside successively.
When the instruction functions parameter sets is carried out, the parameter character string is carried out divisional processing, be divided into a plurality of parameter character strings successively, become processing then.
The scripted code instruction that the form of the result data of described execution is write based on the user.
The output content of described business datum and form can be XML, JSON, XML+XSL, XML+XSLT.
The step that scripted code sent or be saved in server-side is: provided access by service provider, transmit or be saved to server-side by network; Server-side can be carried out engine to its parsing, execution by automatic invoke script language when client-requested accesses script code, and the return results data.
Call the attribute or the method for reference pointer by instruction functions business datum is operated, the result data of carrying out is exported by the instruction functions format again.
Based on script language extensions opening interface (API), can pass through the extended instruction function, or be easy to the growth data interface by the mode of introducing pointer to object in buffer memory session (context), or the definition class name uses assign instruction functions structure class object.
Scripted code adopts PKI security system and technology in the trust of server-side.
Server-side is resolved the safety protecting method of carrying out scripted code can be as follows:
(1) engine itself is guaranteed the safety of resolving, the safety that instruction functions is carried out, and the method for employing is white-box testing, Black-box Testing; Or
(2) pointer to object of quoting strategy file safe in utilization limits addressable attribute and method; Or
(3) in the runtime environment environment of script execution engine, add security strategy; Or
(4) the parsing implementation status of monitoring script code.
The process that engine itself is resolved, through (1) strict test, and (2) verify the safety of guaranteeing resolving to each link of variational method.Its resolving still is limited in the 15th described security strategy in addition.
The safety that instruction functions is carried out also is similar, and (1) strict test (2) is carried out strict checking to the parameter of input and guaranteed the safety carried out.
At test, adopt Black-box Testing.By using whole software or certain software function strictly to test, and specifically how not design by the source code of scrutiny program or the source code program that is well understood to very much this software or certain software function.The tester sees then that by the data of importing them thereby the result of output understands software and how to work.Usually the tester not only uses the input data that go out correct result certainly when testing, but also how the input data that can use challenging input data and possible outcome to make mistakes handle various types of data so that understand software.
At checking, adopt white-box testing.Test by the source code of program and do not use user interface.Such test need be overflowed from code sentence structure discovery internal code at algorithm, the path, and shortcoming in condition or the like or mistake, and then revised.
Its implementation also is limited in the following security strategy in addition.
Carrying out the security strategy that adds in the runtime environment environment of engine at script can be:
(1) uses sandbox, allow scripted code resolve execution and in limited sandbox, move; Or
(2) handling duration timing, the time of scripted code resolve is carried out in control, reach binding hours after, processing will be interrupted; Or
(3) file size, the statement quantity of restriction scripted code; Or
(4) quantity and the size of restriction temporary variable buffer memory are perhaps used the hard disk cache strategy; Or
(5) utilize the idle and sleep sleep control CPU usage of thread; Or
(6) control exists the instruction functions of cyclical factor to be recycled the number of times that calls; Or
(7) adopt virtual machine.
As shown in Figure 1, the opening of implementation platform data is finished and third-party exchanges data, satisfies and builds some and the professional relevant application demand in this website.
Client, or be called user side (Client).In the world of computing machine, we are called server-side (Server) every side that service is provided, and accept service the opposing party we be called client (Client).Therefore the client of indication is not limited to browser here.If a server-side is request or acceptance service with respect to the another one server-side, this server-side also is considered to the client of another server-side so.
Here the residing hardware device of the client of indication and server-side is not limited to computing machine, also should comprise embedded device etc.
The formatting script language, so-called format, its meaning purpose just is the intention format output data according to the user.Therefore we provide instruction functions for this script, can be with form the various data resources of server-side need be calculated and export according to the user of XML.Here it is has very big different with other Languages.Existing version has been upgraded to the 2.0.5 version.
The GScript script is a form with the code mainly, is similar to the js script, and script file then is suffix with .gs.
Also there is the form of XML in the GScript script, but does not recommend the developer to use, and only is used for constrained qualification.Its script file is suffix with .gsxml.
The GScript script is made of instruction functions, operational character, operating function, and wherein instruction functions is a main body.In fact the instruction of GScript scripted code is exactly the set of a series of instruction functions.So the form of GScript code command is very simple, for:
<function name〉(<function parameter 1 〉,<function parameter 2〉...)
<function body 〉
};
Instruction functions is used; As end mark.The parameter of function name back is to wrap up with (), and usefulness between a plurality of parameters separates.Be not that all functions all have parameter.As printenv then () can omit.Function body wraps up with { }.A plurality of instruction functions then can be write in function body inside.Be not that all functions all have function body.As do not have function body then { } can omit.
The central role that script is carried out engine (GScriptEngine) is to receive the scripted code that imports into, binding cache session (context) is resolved with request (request), run time version, encapsulates the required data of output user successively according to code command in resolving implementation.
A) pointer of buffer memory session (context) the storage referencing operation structuring/pointer in unstructured data storehouse, the pointer of referencing operation file/data cached/other data resource, other hardware device of referencing operation CPU/ or the like.And be stored in the code process according to the interim variable that produces of user instruction.
B) parameter name and the parameter value of the request of request (request) memory page.
The GScriptEngine suction parameter is mainly scripted code inlet flow (inputstream), buffer memory session (context), request (request), output encoder (encoding), result data output stream (outputstream), enables debugging mode (debug).
Example JAVA code:
void?write(
// scripted code inlet flow (inputstream)
java.io.InputStream?is,
// buffer memory session (context)
java.util.Map<String,Object>context,
// request (request)
com.onegrid.grid.platform.gscript.HGScriptRequest?request,
// output encoder (encoding)
String?encoding,
// result data output stream (outputstream)
java.io.OutputStream?os,
// enable debugging mode (debug)
boolean?debug
)throws?HGScriptException;
The algorithm of GScriptEngine resolving code be adopt to become-minute method.
A) change is meant that text-string constantly becomes new character string through the overmatching replacement.For example wrap up with () in the text, perhaps use { } to wrap up, that uses perhaps that [] wrap up is replaced by new character string for example # (0_0).
B) branch is meant the character string process that is replaced;~wait to separate to develop into a plurality of new character strings.For example its quilt of character string that wraps up with () in the text is separated into a plurality of new character strings., be usually used in parameter and separate; Be usually used in statement separator ,~be usually used in scope to separate.
Become successively-minute-become-minute-become in this way and handle.
The process steps that GScriptEngine handles code is as follows:
A) convert the scripted code inlet flow to text-string.Filter comment statement in this process.
B) carry out () { } become and right according to directive script function grammatic function name (function parameter set) { function body }; Divide and form the instruction functions set successively.Here only ground floor () is done change, any variation is not done in the inside () of ().And { } and inner { } thereof all done change. Only exist in the function body according to grammer.Pass through in the function body thus; A plurality of sub-instructions functions have been separated to form.
Example:
assign(“a”,“/default/entity/ThingQueryHelper”){
setProperty(“pagesize”,20);
setProperty(“currow”,0);
}
Change as follows during processing:
0 assign# (0_0) #{0_0} ← whole sentence becomes () { }
1 | ← #{0_0} is right; Divide
2 |-setProperty# (0_1) ← () become
3 |-setProperty# (0_2) ← () become
C) function that executes instruction successively in order.Instruction functions is carried out earlier its function parameter set, then the sub-instructions function of function body inside successively.
When d) the instruction functions parameter sets is carried out, right to the parameter character string in (), divide then to be divided into a plurality of parameter character strings successively, () to inside becomes then.The parameter character string is calculated according to script operation symbol grammer and priority, script operating function.Result after the calculating is successively as the parameter of this instruction functions.Also handle in this way for [] array range.
Example:
assign(“a”,((1+2)+3));
Carry out as follows during processing:
0 assign# (0_0) ← whole sentence becomes ()
1 | ← # (0_0), right, divide and inner () become
2 |-" a " ← result of calculation: character string a
3 |-# (0_1) ← character string (1+2)+3 inside () is become again
4 | ←#{0_2}+3
5 |-#(0_2) ←1+2
6 |-3 ← result of calculation: numeral 3
7 |-3 ← result of calculation: numeral 3
E) the instruction functions result calculated encapsulates the required data of output user successively according to the characteristic of instruction functions.For example the out instruction functions is exclusively used in the output result data.Not all instruction functions all possesses the characteristic of encapsulation output result data.There is for example XML of certain format specification in the result data of output according to the instruction functions upper and lower relation.This form is easy in the resolved processing of client.
GScriptEngine uses the various pointers and the variable of @ operational character reference cache session (context) storage.When being cited, pointer or variable can use. and operational character is got its attribute or manner of execution.Property value after obtaining or the result after the manner of execution are both can be by using. and operational character is got its attribute or manner of execution.
Example:
Following context is the pointer of quoting transaction session of buffer memory session (context) storage
1 @context.actionLanguage ← actionLanguage is the attribute of context
2 @context.pageLink (" 1234567890 ") ← pageLink is the method for context
3 @context.sessionContext.logged ← sessionContext is the attribute of context
← logged is the attribute of attribute sessionContext
4 @context.transfer.stringIdentity (" 1234567890 ") ← transfer is the attribute of context
← stringIdentity is an attribute
The method of transfer
5 @context.transfer.hadoopFile(“1234567890”).accessLink
← transfer is the attribute of context
← hadoopFile is the method for attribute transfer
← accessLink is the attribute of the result object pointer after the method hadoopFile of attribute transfer carries out
With the upper type is that service provider's expansion opening interface (API) provides the foundation.
But the characteristic of bounded attribute and method for example can be used the characteristic of JAVABEAN usually in the JAVA code, bounded attribute and method can only be got getXxx, the isXxx form.
Also can limit which attribute and method can be acquired or carry out by security strategy policy file.This document can carry out self-defined according to real needs.
Example:
<?xml?version=″1.0″?>
<policy>
<deny?class=″java.lang.Class″mode=″GET″/>
</policy>
All properties and method in the above strategy file qualification JAVA code under the java.lang.Class all can not be acquired or carry out.
GScriptEngine uses the $ operational character to obtain the parameter value of page request (request).
Example:
1 ← obtain the parameter value of required parameter parameter paramName by name
GScriptEngine is not when adding $ operational character and @ operational character before pointer name, variable name, parameter name, acquiescence with form value of getting parms from request (request) of parameter name, is then obtained pointer or the variable of quoting earlier in buffer memory session (context).
How scripted code sends or is saved in server-side.
Provide access by service provider, can be sent to server-side by network (for example HTTP, FTP).Server-side can be carried out engine to its parsing, execution by automatic invoke script language when client-requested is visited this scripted code, and the return results data.
The outgoing traffic data.
The scripted code instruction that the output content of business datum and form are write based on the user, the dirigibility that provides data to obtain largely.It is XML that formatting script language GScript acquiescence provides output format.XML is an extending mark language, is a kind of simple data storage language, uses a series of simple mark data of description, extremely simply is easy to grasp and use.It simply make it be easy in Any Application, read and write data, this makes XML become unique common language of exchanges data very soon.
Example:
out(“bookstore”){
out(“book”){
out(“title”,“C++Programming?Language”);
}
}
The result of output is:
<?xml?version=”1.0”?>
<data>
<bookstore>
<book>
<title>C++Programming?Language</title>
</book>
</bookstore>
</data>
The data of XML form are easy to carry out alternately with other any application program.And be easy to convert to other format file for example HTML, XHTML or text in conjunction with XSL (Extensible Stylesheet Language (XSL)).We have just fully used XML+XSLT on the grating platform of company's research and development.
(5) operation service data.
For example void calls the attribute of reference pointer or thereby method reaches interpolation, deletion, revise the purpose of business datum by instruction functions.The result data of carrying out is exported by the instruction functions format again.
(6) based on script language extensions service provider opening interface (API).
Service provider can pass through 1. extended instruction function, or 2. is easy to growth data interface (API) by the mode of introducing pointer to object in buffer memory session (context), or 3. defines class name use assign instruction functions structure class object.1. we expanded css (for webpage style of loading file), js (for webpage loads the javascript script file), text instruction functions such as (obtaining the internationalization language) at present on the grating platform of company's research and development, 2. also provide the function of email (mail transmission), xml (processing of XML format file) to use, 3. for example requestor of a lot of class name also be provided simultaneously with plug-in unit (plugin) form "/default/entity/ThingQueryHelper " the structure class object.
Scripted code is in the trust of server-side.
Adopt existing PKI security system and technology of generally acknowledging just can effectively solve the trust problem of scripted code at server-side.
Server-side is resolved the security protection of carrying out scripted code.
It is relevant with the pointer to object of quoting that server-side resolve to be carried out the safety of scripted code, relevant with script execution engine etc.
(1) engine itself is guaranteed the safety of resolving, the safety that instruction functions is carried out.
(2) pointer to object of quoting can limit addressable attribute and method by strategy file safe in utilization.
(3) script is carried out engine.The runtime environment at its place is its required JVM virtual machine of JAVA language for example.
(4) can in runtime environment, add security strategy.
(4.1) use sandbox.Allowing scripted code resolve execution moves in limited sandbox.
(4.3) handling duration timing.The time of carrying out scripted code is resolved in control.After reaching binding hours, processing will be interrupted.
(4.4) file size, the statement quantity of restriction scripted code.
(4.5) quantity and the size of restriction temporary variable buffer memory are perhaps used the hard disk cache strategy.
(4.6) utilize the idle and sleep sleep control CPU usage of thread.
(4.7) control exists the instruction functions of cyclical factor to be recycled the number of times that calls.
(4.8) adopt virtual machine.
(4.9) other safety practice.
(5) the parsing implementation status of monitoring script code, the auxiliary security protection.
Information input, output corresponding in the flow process of the present invention are as follows:
1, compile script code;
2, XML form output;
GScriptEngine resolved and the Debugging message of carrying out when 3, scripted code moved;
4, use the XML formatted data of following XLST conversion GScript output;
5, the design sketch after the conversion, as shown in Figure 2.
Above-described only is preferred implementation of the present invention; should be understood that; for those of ordinary skill in the art; under the prerequisite that does not break away from core technology feature of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (18)
1. the demand according to the user formats the method for exporting and operating the server-side business datum, it is characterized in that method is as follows:
(1) selected script and script are carried out engine;
(2) user uses above-mentioned language according to business demand compile script code;
(3) client sends or is saved in server-side to scripted code;
(4) carry out engine by the server-side script and carry out above-mentioned scripted code;
(5) the result data output of carrying out returns to client.
2. method according to claim 1 is characterized in that, described script is formatting script language (GScript).
3. method according to claim 1, it is characterized in that, described execution engine is that engine (GScriptEngine) carried out in the formatting script language, be used to receive the scripted code that imports into, binding cache session (context) is resolved with request (request), run time version, encapsulates the required data of output user successively according to code command in resolving implementation.
4. method according to claim 3, it is characterized in that, the pointer of described buffer memory session (context) the storage referencing operation structuring/pointer in unstructured data storehouse, the pointer of referencing operation file/data cached/other data resource, other hardware device of referencing operation CPU/, and be stored in the code process according to the interim variable that produces of user instruction.
5. method according to claim 3 is characterized in that, the parameter name and the parameter value of the request of described request (request) memory page.
6. method according to claim 3, it is characterized in that described formatting script language is carried out engine (GScriptEngine) suction parameter and mainly comprised scripted code inlet flow (inputstream), buffer memory session (context), request (request), output encoder (encoding), result data output stream (outputstream), enables debugging mode (debug).
7. method according to claim 3, it is characterized in that, the algorithm that the engine resolving code carried out in described formatting script language be become-minute method, described change is meant that text-string constantly becomes new character string through the overmatching replacement, described branch is meant that the character string that is replaced is separated and develops into a plurality of new character strings, algorithm by become-minute-become-minute-become circular treatment.
8. method according to claim 3 is characterized in that, the process steps that engine processing code carried out in described formatting script language is as follows:
(1) converts the scripted code inlet flow to text-string;
(2) form the instruction functions set successively according to directive script function grammer change-divisional processing;
(3) function that executes instruction successively in order;
(4) the instruction functions result calculated encapsulates the required data of output user successively according to the characteristic of instruction functions.
9. method according to claim 8 is characterized in that, described instruction functions is in proper order: carry out its function parameter set earlier, then carry out the sub-instructions function of function body inside successively.
10. method according to claim 9 is characterized in that, when the instruction functions parameter sets is carried out, the parameter character string is carried out divisional processing, is divided into a plurality of parameter character strings successively, becomes processing then.
11. method according to claim 1 is characterized in that, the scripted code instruction that the form of the result data of described execution is write based on the user.
12. method according to claim 11 is characterized in that, the output content of described business datum and form can be XML, JSON, XML+XSL, XML+XSLT.
13. method according to claim 1 is characterized in that, the step that scripted code sent or be saved in server-side is: provided access by service provider, transmit or be saved to server-side by network; Server-side can be carried out engine to its parsing, execution by automatic invoke script language when client-requested accesses script code, and the return results data.
14. method according to claim 1 is characterized in that, calls the attribute or the method for reference pointer by instruction functions business datum is operated, and the result data of carrying out is exported by the instruction functions format again.
15. method according to claim 1, it is characterized in that, based on script language extensions opening interface (API), can pass through the extended instruction function, or be easy to the growth data interface by the mode of introducing pointer to object in buffer memory session (context), or the definition class name uses assign instruction functions structure class object.
16. method according to claim 1 is characterized in that, scripted code adopts PKI security system and technology in the trust of server-side.
17. method according to claim 1 is characterized in that, server-side is resolved the safety protecting method of carrying out scripted code can be as follows:
(1) engine itself is guaranteed the safety of resolving, the safety that instruction functions is carried out, and the method for employing is white-box testing, Black-box Testing; Or
(2) pointer to object of quoting strategy file safe in utilization limits addressable attribute and method; Or
(3) in the runtime environment environment of script execution engine, add security strategy; Or
(4) the parsing implementation status of monitoring script code.
18. method according to claim 17 is characterized in that, described security strategy can be:
(1) uses sandbox, allow scripted code resolve execution and in limited sandbox, move; Or
(2) handling duration timing, the time of scripted code resolve is carried out in control, reach binding hours after, processing will be interrupted; Or
(3) file size, the statement quantity of restriction scripted code; Or
(4) quantity and the size of restriction temporary variable buffer memory are perhaps used the hard disk cache strategy; Or
(5) utilize the idle and sleep sleep control CPU usage of thread; Or
(6) control exists the instruction functions of cyclical factor to be recycled the number of times that calls; Or
(7) adopt virtual machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010514918XA CN102023856A (en) | 2010-10-21 | 2010-10-21 | Method for outputting and operating data at server in formatting way according to demands of user |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010514918XA CN102023856A (en) | 2010-10-21 | 2010-10-21 | Method for outputting and operating data at server in formatting way according to demands of user |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102023856A true CN102023856A (en) | 2011-04-20 |
Family
ID=43865178
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010514918XA Pending CN102023856A (en) | 2010-10-21 | 2010-10-21 | Method for outputting and operating data at server in formatting way according to demands of user |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102023856A (en) |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231111A (en) * | 2011-07-25 | 2011-11-02 | 杨海 | Programming realization method based on browser |
CN102393831A (en) * | 2011-07-28 | 2012-03-28 | 南京中兴软创科技股份有限公司 | SAAS service testing engine based on JAVASCRIPT |
CN102685217A (en) * | 2012-04-25 | 2012-09-19 | 诚云科技股份有限公司 | Cloud end system capable of being used elastically |
CN103324567A (en) * | 2012-03-22 | 2013-09-25 | 百度在线网络技术(北京)有限公司 | App engine debugging method and debugging system |
CN103729266A (en) * | 2013-12-30 | 2014-04-16 | 安徽科大讯飞信息科技股份有限公司 | Method and system for dial testing of terminal and cloud terminal |
CN104081748A (en) * | 2012-01-25 | 2014-10-01 | 微软公司 | Document communication runtime interface |
CN104077141A (en) * | 2014-07-04 | 2014-10-01 | 用友软件股份有限公司 | Optimization device and optimization method of Rserve interactive mechanism |
CN104104679A (en) * | 2014-07-18 | 2014-10-15 | 四川中亚联邦科技有限公司 | Data processing method based on private cloud |
CN105335132A (en) * | 2014-06-13 | 2016-02-17 | 阿里巴巴集团控股有限公司 | Method, apparatus and system for user-defined application function |
CN105376237A (en) * | 2015-11-24 | 2016-03-02 | 华为技术有限公司 | Information control method, device and system |
CN105468776A (en) * | 2015-12-11 | 2016-04-06 | 北京奇虎科技有限公司 | Method, device and system for operating database |
CN105471665A (en) * | 2014-08-21 | 2016-04-06 | 北京奇虎科技有限公司 | Website function testing method, website function testing system and website server |
CN107111487A (en) * | 2014-12-12 | 2017-08-29 | 高通股份有限公司 | Early stage instruction is provided in out of order (OOO) processor to perform, and relevant device, method and computer-readable media |
CN107256514A (en) * | 2017-06-05 | 2017-10-17 | 深圳易嘉恩科技有限公司 | The method that CaaS plateform systems based on financial cloud realize open book keeping operation business |
CN107844465A (en) * | 2017-11-11 | 2018-03-27 | 江西金格科技股份有限公司 | A kind of method that OFD format files support script |
CN108829467A (en) * | 2018-04-28 | 2018-11-16 | 广东蜂助手网络技术股份有限公司 | Third-party platform docks implementation method, device, equipment and storage medium |
CN109327521A (en) * | 2018-10-22 | 2019-02-12 | 中国银联股份有限公司 | A kind of method and device of network communication |
CN109597618A (en) * | 2018-10-23 | 2019-04-09 | 深圳微迅信息科技有限公司 | Program developing method, device, computer equipment and storage medium |
CN110045962A (en) * | 2019-01-15 | 2019-07-23 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus for supporting multilingual script execution |
CN110096259A (en) * | 2019-03-15 | 2019-08-06 | 佛山青藤信息科技有限公司 | A kind of Web page surface element localization method and system |
CN110244956A (en) * | 2019-06-04 | 2019-09-17 | 北京中亦安图科技股份有限公司 | Data analysis method, device and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1996287A (en) * | 2006-11-02 | 2007-07-11 | 武汉软想科技有限公司 | Distribution Web system with embedded command codes in web page |
CN101005536A (en) * | 2007-01-18 | 2007-07-25 | 北京邮电大学 | Telecommunication traffic forming method and system facing position service |
CN101340688A (en) * | 2007-07-04 | 2009-01-07 | 中兴通讯股份有限公司 | Configuration script configuring method based on strip operation tag in network management system |
CN101739277A (en) * | 2009-12-08 | 2010-06-16 | 南京联创科技集团股份有限公司 | Self-defined script mode-based method for managing service monitoring system |
-
2010
- 2010-10-21 CN CN201010514918XA patent/CN102023856A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1996287A (en) * | 2006-11-02 | 2007-07-11 | 武汉软想科技有限公司 | Distribution Web system with embedded command codes in web page |
CN101005536A (en) * | 2007-01-18 | 2007-07-25 | 北京邮电大学 | Telecommunication traffic forming method and system facing position service |
CN101340688A (en) * | 2007-07-04 | 2009-01-07 | 中兴通讯股份有限公司 | Configuration script configuring method based on strip operation tag in network management system |
CN101739277A (en) * | 2009-12-08 | 2010-06-16 | 南京联创科技集团股份有限公司 | Self-defined script mode-based method for managing service monitoring system |
Non-Patent Citations (1)
Title |
---|
CSDN: "PHP代码如何被执行", 《HTTP://BLOG.CSDN.NET/PHPKERNEL/ARTICLE/DETAILS/5714302》, 5 July 2010 (2010-07-05) * |
Cited By (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231111A (en) * | 2011-07-25 | 2011-11-02 | 杨海 | Programming realization method based on browser |
CN102393831A (en) * | 2011-07-28 | 2012-03-28 | 南京中兴软创科技股份有限公司 | SAAS service testing engine based on JAVASCRIPT |
CN102393831B (en) * | 2011-07-28 | 2014-04-16 | 南京中兴软创科技股份有限公司 | SAAS service testing engine based on JAVASCRIPT |
CN104081748A (en) * | 2012-01-25 | 2014-10-01 | 微软公司 | Document communication runtime interface |
CN104081748B (en) * | 2012-01-25 | 2017-02-22 | 微软技术许可有限责任公司 | Document communication runtime interface |
CN103324567B (en) * | 2012-03-22 | 2016-03-02 | 百度在线网络技术(北京)有限公司 | A kind of adjustment method of application engine and debug system |
CN103324567A (en) * | 2012-03-22 | 2013-09-25 | 百度在线网络技术(北京)有限公司 | App engine debugging method and debugging system |
CN102685217A (en) * | 2012-04-25 | 2012-09-19 | 诚云科技股份有限公司 | Cloud end system capable of being used elastically |
CN103729266A (en) * | 2013-12-30 | 2014-04-16 | 安徽科大讯飞信息科技股份有限公司 | Method and system for dial testing of terminal and cloud terminal |
CN105335132A (en) * | 2014-06-13 | 2016-02-17 | 阿里巴巴集团控股有限公司 | Method, apparatus and system for user-defined application function |
CN104077141A (en) * | 2014-07-04 | 2014-10-01 | 用友软件股份有限公司 | Optimization device and optimization method of Rserve interactive mechanism |
CN104077141B (en) * | 2014-07-04 | 2017-09-29 | 用友网络科技股份有限公司 | The optimization device and optimization method of Rserve interaction mechanisms |
CN104104679A (en) * | 2014-07-18 | 2014-10-15 | 四川中亚联邦科技有限公司 | Data processing method based on private cloud |
CN104104679B (en) * | 2014-07-18 | 2017-07-11 | 四川中亚联邦科技有限公司 | A kind of data processing method based on private clound |
CN105471665A (en) * | 2014-08-21 | 2016-04-06 | 北京奇虎科技有限公司 | Website function testing method, website function testing system and website server |
CN107111487A (en) * | 2014-12-12 | 2017-08-29 | 高通股份有限公司 | Early stage instruction is provided in out of order (OOO) processor to perform, and relevant device, method and computer-readable media |
CN105376237A (en) * | 2015-11-24 | 2016-03-02 | 华为技术有限公司 | Information control method, device and system |
CN105468776A (en) * | 2015-12-11 | 2016-04-06 | 北京奇虎科技有限公司 | Method, device and system for operating database |
CN107256514A (en) * | 2017-06-05 | 2017-10-17 | 深圳易嘉恩科技有限公司 | The method that CaaS plateform systems based on financial cloud realize open book keeping operation business |
CN107844465A (en) * | 2017-11-11 | 2018-03-27 | 江西金格科技股份有限公司 | A kind of method that OFD format files support script |
CN108829467A (en) * | 2018-04-28 | 2018-11-16 | 广东蜂助手网络技术股份有限公司 | Third-party platform docks implementation method, device, equipment and storage medium |
CN108829467B (en) * | 2018-04-28 | 2020-05-22 | 蜂助手股份有限公司 | Third-party platform docking implementation method, device, equipment and storage medium |
CN109327521A (en) * | 2018-10-22 | 2019-02-12 | 中国银联股份有限公司 | A kind of method and device of network communication |
CN109327521B (en) * | 2018-10-22 | 2021-03-23 | 中国银联股份有限公司 | Network communication method and device |
CN109597618A (en) * | 2018-10-23 | 2019-04-09 | 深圳微迅信息科技有限公司 | Program developing method, device, computer equipment and storage medium |
CN110045962A (en) * | 2019-01-15 | 2019-07-23 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus for supporting multilingual script execution |
CN110096259A (en) * | 2019-03-15 | 2019-08-06 | 佛山青藤信息科技有限公司 | A kind of Web page surface element localization method and system |
CN110244956A (en) * | 2019-06-04 | 2019-09-17 | 北京中亦安图科技股份有限公司 | Data analysis method, device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102023856A (en) | Method for outputting and operating data at server in formatting way according to demands of user | |
US9442700B2 (en) | API notebook tool | |
JP6494609B2 (en) | Method and apparatus for generating a customized software development kit (SDK) | |
KR102243793B1 (en) | Method and apparatus for code virtualization and remote process call generation | |
WO2019072110A1 (en) | Method for generating application program, apparatus, system, device, and medium | |
US8843941B2 (en) | Adaptable application programming interfaces and specification of same | |
CN103164249A (en) | Extension mechanism for scripting language compiler | |
US9894185B2 (en) | System and method for condition-based application logic shifting between a client and a server | |
WO2011156112A2 (en) | Web site implementation by mapping expression evaluation | |
CN102323880A (en) | Mobile phone application interface development method and terminal based on browser parsing mode | |
CN103443763A (en) | ISA bridging including support for call to overidding virtual functions | |
CN113778897B (en) | Automatic test method, device and equipment for interface and storage medium | |
CN113312046A (en) | Sub-application page processing method and device and computer equipment | |
Wilkinson et al. | QMachine: commodity supercomputing in web browsers | |
Bojinov | RESTful Web API Design with Node. js 10: Learn to create robust RESTful web services with Node. js, MongoDB, and Express. js | |
CN111723314B (en) | Webpage display method and device, electronic equipment and computer readable storage medium | |
CN107608672A (en) | A kind of UI module managements, UI module management methods and system | |
CN115022312B (en) | Method and device for realizing multi-intelligent contract engine, electronic equipment and storage medium | |
Haller et al. | RaUL: RDFa User Interface Language–A data processing model for web applications | |
Layka | Learn java for web development: Modern java web development | |
Zheng et al. | Preparation | |
US7366722B2 (en) | System and method for specifying application services and distributing them across multiple processors using XML | |
Brookes et al. | GSoC 2015 student contributions to GenApp and Airavata | |
Peres | Modern Web Development with ASP. NET Core 3: An end to end guide covering the latest features of Visual Studio 2019, Blazor and Entity Framework | |
CN104065507A (en) | Access device service configuration method and system based on dual-platform multiplex technique |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20110420 |