CN104182234B - A kind of method for processing business and operation system - Google Patents

A kind of method for processing business and operation system Download PDF

Info

Publication number
CN104182234B
CN104182234B CN201410421735.1A CN201410421735A CN104182234B CN 104182234 B CN104182234 B CN 104182234B CN 201410421735 A CN201410421735 A CN 201410421735A CN 104182234 B CN104182234 B CN 104182234B
Authority
CN
China
Prior art keywords
business
configuration data
data
script file
index information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410421735.1A
Other languages
Chinese (zh)
Other versions
CN104182234A (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.)
Huawei Technologies Co Ltd
Original Assignee
Hangzhou Huawei Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huawei Digital Technologies Co Ltd filed Critical Hangzhou Huawei Digital Technologies Co Ltd
Priority to CN201410421735.1A priority Critical patent/CN104182234B/en
Publication of CN104182234A publication Critical patent/CN104182234A/en
Application granted granted Critical
Publication of CN104182234B publication Critical patent/CN104182234B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application provides a kind of method for processing business and operation system, performance and efficiency for improving business processing.Methods described, applied to operation system, the operation system includes configuration data internal storage location, and the configuration data internal storage location is used to deposit the data needed for the operation system, including:It is determined that at least one business for handling pending data bag, and the corresponding script file of at least one described business;Call the script file;Based on the data access index information, the configuration data is obtained from the configuration data internal storage location;The business execution logic is performed, and calls the configuration data in the process of implementation, to realize at least one described business.

Description

A kind of method for processing business and operation system
Technical field
The present invention relates to computer realm, more particularly to a kind of method for processing business and operation system.
Background technology
Strategy configuration is come control business processing logic, so as to hold by modes such as script file, parameter or configuration files The corresponding business of row.The mode of strategy configuration can influence the efficiency of business processing to a certain extent.
In the prior art, generally the configuration data used required for business processing is write in script file, while pin Also include the business execution logic of execution business in this document.During Run Script file execution business, when business is held , it is necessary to the data structure of the interim conversion configurations data of script file when row logic needs configuration data, then by the configuration changed Data are transmitted to business execution logic.
It can be seen that, in above-mentioned tactics configuring method, configuration data is saved in script file, when business processing needs During using configuration data, it is necessary to by the data conversion in script file into the data structure for meeting the business processing data, So frequent transitions configuration data of having to, then can all have an impact to service process performance and efficiency.So, in the prior art Business processing performance and efficiency it is not good.
The content of the invention
The invention provides a kind of method for processing business and operation system, performance and efficiency for improving business processing.
Method for processing business during first aspect present invention provides one, applied to operation system, the operation system includes Configuration data internal storage location, the configuration data internal storage location is used to deposit the data needed for the operation system, including:
It is determined that at least one business for handling pending data bag, and the corresponding script of at least one described business File;
Call the script file;Wherein, the script file includes data access index information, and for performing The business execution logic of at least one business, the data access index information includes being used to characterize at least one described industry Storage address of the configuration data in the configuration data internal storage location needed for business;
Based on the data access index information, the configuration data is obtained from the configuration data internal storage location;
The business execution logic is performed, and calls the configuration data in the process of implementation, to realize described at least one Individual business.
With reference in a first aspect, in the first possible implementation of first aspect, determining to treat for processing described Before at least one business of processing data bag, and the corresponding script file of at least one described business, methods described is also wrapped Include:
By the data structure of the unconverted configuration data in the corresponding original script file of the script file, it is converted into The data structure that the configuration data internal storage location is read-write and described at least one business is recognizable;Wherein, the original pin Do not include the data access index information in this document;
Configuration data after conversion is stored into the configuration data internal storage location;
The number is generated according to storage address of the configuration data after the conversion in the configuration data internal storage location According to access index information, and by data access index information storage into the original script file;
The business execution logic is converted into computer executable program, to obtain the script file;
Configuration data after the conversion is specially the configuration data needed at least one described business.
In the first possible implementation with reference to first aspect or first aspect, second in first aspect may Implementation in, described at least one business determined for handling pending data bag is specifically included:
First rule match is carried out to the packet, the first matching result is obtained;
Based on first matching result, the packet at least one business to be carried out is determined;
It is determined that the corresponding script file of described at least one business.
With reference to first aspect or first aspect the first possible implementation to second of first aspect it is possible Any one in implementation, in the third possible implementation of first aspect, is visited described based on the data Index information is asked, the configuration number performed required at least one described business is obtained from the configuration data internal storage location According to before, methods described also includes:
Second Rule matching is carried out to the packet, the second matching result is obtained;
Based on second matching result, it is determined that performing at least one business function of at least one business and needing The configuration data wanted.
With reference to the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect In, it is described to perform the business execution logic, and call the configuration data in the process of implementation, with realize it is described at least one Business, is specifically included:
By at least one incoming described business function of the data access index information in the script file;
During at least one described business function is performed, according to the data access index information from the configuration The configuration data needed at least one described business function is obtained in datarams unit.
Second aspect of the present invention is provided in a kind of operation system, including configuration data internal storage location, the configuration data Memory cell is used to deposit the data needed for the operation system, and the system also includes:
Determining unit, for determining to be used for handle at least one business of pending data bag, and it is described at least one The corresponding script file of business;
Call unit, for calling the corresponding script file of at least one described business;Wherein, wrapped in the script file Data access index information is included, and for performing the business execution logic of at least one business, the data access rope Fuse breath includes being used to characterize configuration data the depositing in the configuration data internal storage location needed at least one described business Store up address;
Business execution unit, for based on the data access index information, being obtained from the configuration data internal storage location Obtain the configuration data;And the business execution logic is performed, and the configuration data is called in the process of implementation, to realize At least one described business.
With reference to second aspect, in the first possible implementation of second aspect, the system also includes:
Script converting unit, for determining at least one industry for handling pending data bag in the determining unit Business, and before the corresponding script file of at least one described business, by the corresponding original script file of the script file Unconverted configuration data data structure, be converted into the configuration data internal storage location it is read-write and it is described at least one The recognizable data structure of business;Wherein, the data access index information is not included in the original script file;Will conversion Configuration data afterwards is stored into the configuration data internal storage location;According to the configuration data after the conversion in the configuration number The data access index information is generated according to the storage address in internal storage location, and the data access index information storage is arrived In the original script file;The business execution logic is converted into computer executable program, to obtain the script text Part;Configuration data after the conversion is specially the configuration data needed at least one described business.
With reference to the first possible implementation of second aspect or second aspect, second of possible reality of second aspect In existing mode, the determining unit, specifically for:
First rule match is carried out to the packet, the first matching result is obtained;Based on first matching result, really The fixed packet at least one business to be carried out;It is determined that the corresponding script file of described at least one business.
With reference to second aspect or second aspect the first possible implementation to second of second aspect it is possible Any one in implementation, in the third possible implementation of second aspect, the business execution unit is specific For:
Be based on the data access index information described, obtained from the configuration data internal storage location execution it is described to Before the configuration data required for a few business, Second Rule matching is carried out to the packet, second is obtained and matches As a result;Based on second matching result, it is determined that performing at least one business function and needs of at least one business The configuration data.
With reference to the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect In, the business execution unit is specifically additionally operable to:
By at least one incoming described business function of the data access index information in the script file;
During at least one described business function is performed, according to the data access index information from the configuration The configuration data needed at least one described business function is obtained in datarams unit.
Third aspect present invention provides a kind of operation system, including:
Processor, at least one business for determining to be used to handle pending data bag, and at least one described industry It is engaged in corresponding script file;Call the script file;Wherein, the script file includes data access index information, with And for performing the business execution logic of at least one business, the data access index information includes described for characterizing Storage address of the configuration data in the configuration data internal storage location needed at least one business;Based on the data access Index information, the configuration data is obtained from the configuration data internal storage location;The business execution logic is performed, and is being held The configuration data is called during row, to realize at least one described business.
With reference to the third aspect, in the first possible implementation of the third aspect, the processor is additionally operable to:
In described at least one business determined for handling pending data bag, and at least one described business correspondence Script file before, by the data knot of the unconverted configuration data in the corresponding original script file of the script file Structure, is converted into the data structure that the configuration data internal storage location is read-write and described at least one business is recognizable;Wherein, Do not include the data access index information in the original script file;
Configuration data after conversion is stored into the configuration data internal storage location;
The number is generated according to storage address of the configuration data after the conversion in the configuration data internal storage location According to access index information, and by data access index information storage into the original script file;
The business execution logic is converted into computer executable program, to obtain the script file;
Configuration data after the conversion is specially the configuration data needed at least one described business.
In the first possible implementation with reference to first aspect or first aspect, second in first aspect may Implementation in, the processor is additionally operable to:
First rule match is carried out to the packet, the first matching result is obtained;
Based on first matching result, the packet at least one business to be carried out is determined;
It is determined that the corresponding script file of described at least one business.
With reference to the third aspect or the third aspect the first possible implementation to second of the third aspect it is possible Any one in implementation, in the third possible implementation of the third aspect, the processor is additionally operable to:
Be based on the data access index information described, obtained from the configuration data internal storage location execution it is described to Before the configuration data required for a few business,
Second Rule matching is carried out to the packet, the second matching result is obtained;
Based on second matching result, it is determined that performing at least one business function of at least one business and needing The configuration data wanted.
With reference to the third possible implementation of the third aspect, in the 4th kind of possible implementation of the third aspect In, the processor specifically for:
By at least one incoming described business function of the data access index information in the script file;
During at least one described business function is performed, according to the data access index information from the configuration The configuration data needed at least one described business function is obtained in datarams unit.
The one or more technical schemes provided in the embodiment of the present invention, have at least the following technical effects or advantages:
In embodiments of the present invention, at least one business is carried out to packet, needed at least one business of acquisition is needed Configuration data when, operation system can correspondence at least one business script file in obtain data access index information, And then the configuration data needed at least one business is directly obtained from configuration data internal memory based on data access index information.Institute With, it is no longer necessary to configuration data is obtained from script frequent transitions, so as to improve the performance and effect of operation system processing business Rate.
Brief description of the drawings
Fig. 1 is the operation system configuration processing stage schematic diagram in the embodiment of the present invention;
Fig. 2 is the operation system business processing stage schematic diagram in the embodiment of the present invention;
Fig. 3 is the execution operational approach flow chart in the embodiment of the present invention;
Fig. 4 is the script conversion method flow chart in the embodiment of the present invention;
Fig. 5 is the specific implementation step figure of the business of the embodiment of the present invention one;
Fig. 6 is the operation system structural representation in the embodiment of the present invention;
Fig. 7 be the embodiment of the present invention in operation system hard-wired instance concepts figure.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, represents there may be three kinds of passes System, for example, A and/or B, can be represented:Individualism A, while there is A and B, these three situations of individualism B.In addition, herein Middle character "/", it is a kind of relation of "or" to typically represent forward-backward correlation object.In embodiments of the present invention, packet is carried out At least one business, when the configuration data needed for needing at least one business of acquisition, operation system can be in correspondence at least one Data access index information is obtained in the script file of individual business, and then based on data access index information directly from configuration data The configuration data needed at least one business is obtained in internal memory.So, it is no longer necessary to configuration number is obtained from script frequent transitions According to so as to improve the performance and efficiency of operation system processing business.
The basic thought of the present invention is to make script and operation system running environment unified, the script logic and industry of control business Business performs interaction no data conversion between configuration data separation, script and the business processing needed, and business processing is passed by script Data needed for the data referencing entered is directly accessed.Specifically, comprising following two stages:
(1) processing stage is configured:
The main principle of present invention configuration processing stage is configuration data as script data, and all data are all stored in In script, script is after script is changed, and the data division in script can be converted into configuration data internal storage location, in script The business execution logic part preserved simultaneously in the reference of configuration data, i.e. data access index information, script is constant.
Reference picture 1, configures the key step of processing stage:Write configuration file->Write script file->Script is changed (after system starts)->Configuration data management module->Business execution logic->Business processing thread starts.
Write configuration file:Prepare file in first comprising configuration data division, configuration data be script format table and What data structure was preserved.It can also be write in single file in script file.In configuration data, system institute is included The various static configurations and control business flow path conditions configuration data needed, such as business process rule, 3 layers, 4 layers, 7 layers of network message Condition etc..
Write script file:Script file can use scripting language, such as:Tcl, lua, pythen etc., these pin Originally configuration data can also can be directly used in different files, script, it is entered with configuration file in identical file Row processing, such as addition field, change field value therein, therefrom extract partial data and are converted to the operation such as other forms.Script In include various event handling logics, each event has in corresponding processing script, script and can carried out with transaction processing system Interaction, can directly invoke the function of operation system or trigger other events.
Script is changed:Script is converted to the important ring of the present invention, and script conversion first can carry out the data of configuration pre- General configuration file in processing, script is obtained, and is transformed into script structure, the part script conversion in script logic, from The script of convenient writing is changed to the script that can be run, increase configuration number in the macro-variable replacement, data structure in such as script According to ID, index or pointer etc..Script conversion portion can be with the configuration data internal storage location interaction in system.Configuration data part The interaction of configuration data internal storage location can be passed to, the interaction of configuration data internal storage location can convert data to suitable data knot Data structure in structure, and the pointer or index of returned data, script logic can preserve the pointer or rope of the internal memory of corresponding data Draw, used when being run for script.After script is converted, the data of configuration not part is no longer preserved in configuration script, is only preserved Data pointer or index that logic script part needs.
Configuration data internal storage location is interacted:The interaction of configuration data internal storage location is usually to be write by other Languages, receives pin The incoming configuration data of this document, is converted into the various data structures needed to use during business, is saved in deposit receipt in configuration data In member interaction.Its configuration data internal storage location interaction can use ID or index, the mode of pointer to be mapped.In configuration data Memory cell interaction is the various configuration datas in a part for operation system, key management system, is stored in rational data knot In structure, to facilitate system business to be used when handling.
After the completion of configuration processing, system is carried out business execution logic, into business processing status.
(2) the business processing stage:
Reference picture 2, business processing step mainly includes:Operation system trigger event or script call->Trigger respective foot This->Logic script execution->Operation system interface interchange->Each business is performed.
Logic script is performed:Logical gate in script includes the script logic write of itself script, while The system function called comprising needs;Logic script is mainly the logic of control business execution, also referred to as business execution logic, and Specific business processing is all that operation system is realized.Each business is needed to perform the configuration data needed in operation system function, no Same business, its configuration data is different.Logic script is according to logic, and incoming corresponding business configuration data connect to operation system Mouthful, now incoming configuration data is data access index information of the configuration data in being interacted in configuration data internal storage location, This configuration data internal storage location is interacted and operation system is same system, and during which no data is changed.The operation ring of this script logic It with system is unification that border, which is, script running environment is contained in itself in system so that with the script of general scripting language Interaction with the operation system by other high level languages is simpler.
Operation system interface interchange:The function of system, and incoming corresponding configuration data, no data are directly invoked in script Structure is changed, and is the ability to easily control the logic of business, drives the execution of business.
It should be noted that the operation system in the embodiment of the present invention, refers to the equipment for being deployed with one or more business, The such as network equipment, the wherein network equipment generally comprise multiple Service Processing Modules, for being carried out to the packet received Processing, to realize corresponding business function, the network equipment also includes configuration data internal memory, required for depositing business execution Data, and script executor, the conversion for script file.
Embodiments of the present invention are described in more detail below.
Embodiment one:
First, the method for processing business that refer in Fig. 3, the embodiment of the present invention includes herein below:
S101:It is determined that at least one business for handling pending data bag, and at least one described business correspondence Script file..
S102:Call the script file.
S103:Based on the data access index information, the configuration number is obtained from the configuration data internal storage location According to.
S104:Perform the business execution logic, and call the configuration data in the process of implementation, with realize it is described extremely A few business.
Optionally, the technical scheme in the embodiment of the present invention includes two stages, and wherein S101 to S104 is business processing Stage, and before the business processing stage, configuration processing stage can also be included.Specifically, as shown in figure 4, step S101 it Before, configuration processing stage includes the conversion of script file, specifically includes:
S201:By the data structure of the unconverted configuration data in the corresponding original script file of the script file, It is converted into the data structure that the configuration data internal storage location is read-write and described at least one business is recognizable.
S202:Configuration data after conversion is stored into the configuration data internal storage location.
S203:Institute is generated according to storage address of the configuration data after the conversion in the configuration data internal storage location Data access index information is stated, and by data access index information storage into the original script file.
S204:The business execution logic is converted into computer executable program, to obtain the script file.
Specifically, unconverted data and business execution logic separation in the original script file of the embodiment of the present invention. Embedded script executor in operation system so that script file and operation system running environment are unified, so that script file and industry Without data conversion between business.Script executor is used for the conversion of script file, is connected with configuration data internal storage location, configures number Further it is connected according to internal storage location with business execution unit, business execution unit is obtained from configuration data internal storage location after conversion Configuration data.
Script file in the embodiment of the present invention is before being changed, namely before configuration processing stage, including industry Unconverted configuration data and business execution logic that business needs.The static state that unconverted configuration data includes system and needed is matched somebody with somebody Put, such as default browser, procotol (English:Internet Protocol;Referred to as:IP) port or URL (English:Uniform Resource Locator;Referred to as:URL) etc., include the condition of control business flow, such as business is advised Then, Internet or transport layer condition etc..Unconverted configuration data is preserved by script format table and data structure, included in Put in file.Configuration file is write by technical staff, can be in single file, can also be in script file, the present invention This is not particularly limited.
Generally, after operation system startup, the script conversion of operation system meeting automatic start script file enters Enter to configure processing stage.In embodiments of the present invention, script conversion includes the conversion of two aspects:On the one hand, in order that business System to packet when carrying out business, it is to avoid is now brought from script file transfer and obtains configuration data, in the embodiment of the present invention, It will be stored before carry out business after the unconverted configuration data conversion in script file in configuration data internal memory.
Specifically, original script file be by scripting language, such as tcl, lua, pythen script, And operation system is typically with programming language, such as C language, Java language, C# language, so in original script file In unconverted configuration data data structure, operation system may not recognize or be written and read.Therefore, on the one hand in order to Configuration data internal storage location in operation system can read and write configuration data, on the other hand in order to carry out business when, original script Unconverted configuration data in file can meet the operation system of the data type of different business needs, such as the first business Write by C voices, therefore the data structure in C language can only be recognized, and the operation system of the second business is write by Java voices, Java object can only be recognized, so firstly the need of the unconverted configuration data of conversion.
Wherein, the data structure of unconverted configuration data is data structure of the configuration data in original script file, Data structure after conversion is read-write for configuration data internal storage location, and can recognize that corresponding data knot with least one business Structure, such as integer type, floating type type or C-structure body, and Java object etc..
After the completion of unconverted configuration data is converted, configuration data internal storage location is arrived into the configuration data storage after conversion In, so that the configuration data after converting can be read and be write by operation system, it can be used during different business to perform.
After being stored in after conversion in configuration data internal storage location, in order to facilitate operation system when the business of execution Configuration data needed for obtaining, configuration data internal storage location in the embodiment of the present invention can according to the configuration data after conversion with The storage address generation data access index information in datarams unit is put, and data access index information is sent to original Script file, is preserved for script file.
Specifically, data access index information characterizes storage address of the configuration data in configuration data internal storage location, Particular location of the configuration data in configuration data internal storage location is namely characterized, can be direct by data access index information Or indirect gain configuration data.During implementing, data access index information includes but is not limited to point to configuration data Pointer, index or ID of address etc., those of skill in the art of the present invention can be configured according to actual needs, and the present invention does not make Specific limitation.
Next, due to the unconverted configuration data in original script file have been carried out conversion, and store to Configuration data internal storage location is suffered, while also saving the corresponding data access index information of configuration data after conversion, is being needed When obtaining configuration data, as long as can just get required configuration data based on data access information, it is to avoid from original Beginning script file is changed to obtain data, therefore, in embodiments of the present invention, data access institute is saved in original script file After information, unconverted configuration data can be no longer preserved.
Wherein, the configuration data in the configuration data internal storage location stored after conversion, specially business processing stage Configuration data needed at least one business, therefore in the description of the embodiment of the present invention, the configuration data after conversion and at least one Configuration data needed for individual business, and configuration data reference are identical.
The another aspect of script conversion, when carrying out script conversion, except handling configuration data, in addition it is also necessary to pin Business execution logic in this document is converted, that is, performs S204, and controlling the business execution logic to be converted into computer can Configuration processor.
Specifically, the business execution logic in original script file uses scripting language by technical staff.Compiling When writing, the form of scripts that technical staff writes is probably the form of convenient writing, but conveniently the form of writing is not necessarily counted Program or the form of operation that calculation machine can be performed directly, so, in embodiments of the present invention, needed when script is changed by original The business execution logic of beginning script file is converted to computer executable program.For example the macro-variable in script file is replaced Change, code conversion etc..
After the completion of the conversion in terms of above-mentioned two, original script file has been converted to the script text that can be called in S102 Part, that is, obtain script file.
Certainly,, can first conversion configurations for the conversion in terms of above-mentioned two when script is changed during implementing Data, reconvert business execution logic is performed by S201, S202, S203 and S204 order, can also first transformation service hold Row logic, reconvert configuration data is performed by the order of S204, S201, S202 and S203 sum, can also be turned simultaneously Change, i.e., S201, S202, S203 and S204 are carried out simultaneously, those of skill in the art of the present invention can be set according to actual needs Put, the present invention does not make specific limitation.
It can be seen from above description in embodiments of the present invention, before carry out business, by original script file Configuration data is stored into configuration data internal storage location, and the data access of preservation configuration data is indexed in original script file Information, can cause operation system in the business of progress, directly to be obtained according to data access information from configuration data internal storage location Configuration data is taken, and no longer needs the conversion from original script file to obtain data, so as to improve the efficiency of business processing.
S101 is described below implements process.
Specifically, S101 implements process and can be:
(1) the first rule match is carried out to the packet, obtains the first matching result.
(2) first matching result is based on, the packet at least one business to be carried out is determined.
(3) the corresponding script file of at least one described business is determined.
First, operation system obtains a packet, actively can obtain a packet to upper layer request for operation system, The packet that upper strata is actively handed down can be received for operation system, this present invention is not limited.
Then, in order to determine to the packet received at least one business to be carried out, the can be carried out to packet One rule match, obtains the first matching result.First rule is the conventional rules in operation system, such as canonical matching or multimode With etc..By the first rule match, it can primarily determine that to packet at least one to be performed business.
Next, based on the first matching result, operation system is assured that at least one industry to be carried out to packet Business.For example, operation system receives the packet that upper strata is handed down, and packet is carried out after canonical matching, the first matching As a result show that packet will access a HTTP (English:Hypertext transfer protocol;Referred to as: Http) webpage, then it is exactly to access a http webpages that can determine at least one business to be carried out to packet.
Finally, in multiple script files of operation system, according at least one business to be carried out to packet, it is determined that The corresponding script file of at least one business.That is, after by the first rule match, the first matching knot in operation system Fruit can trigger a corresponding event, and this event can trigger a corresponding script file operation.Continue to use packet access The example of http webpages illustrates, after it is determined that at least one business carried out to packet is to access http webpages, business system System can trigger the event of an access http webpages, and the script file that this event can trigger access http webpages brings into operation.
Further, after triggering script file, operation system carries out the business execution logic in script file, so that Realize and perform at least one business.
Specifically, it can be the script after S201 to S204 conversions to obtain the script file triggered after packet File, i.e. script file are before packet is obtained by the storage of unconverted configuration data is into configuration data internal storage location and protects Deposit data access index information.It can also be the unconverted default script file of triggering, but protected in default script file There is data access index information.That is, in the embodiment of the present invention, the script file triggered according at least one business, The data access index information of configuration data can inherently be included or data access index is just obtained after conversion The script file of information, is not particularly limited to this present invention.
After the corresponding script file of at least one business is triggered, S102 is performed., can also not during implementing Carry out above-mentioned steps (1)-(3) and directly perform S102, this present invention is not limited.
Optionally, before S103 is performed, the embodiment of the present invention also includes:
Second Rule matching is carried out to the packet, the second matching result is obtained;
Based on second matching result, it is determined that performing at least one business function of at least one business and needing The configuration data wanted.
Specifically, the business execution logic of script file includes being also referred to as interface in multiple functions, this area.Its In, system function can call one or more business functions, and business function performs specific business, certain business function One or more business functions can be called.Therefore, in embodiments of the present invention, operation system is first by the incoming business of packet System function in execution logic, carries out Second Rule matching, such as mark of packet IP address, purpose IP in system function Address, the length of IP address, application layer data matching etc., obtain the second matching result.
After the second matching result is obtained, at least one industry of execution is assured that according to the second matching result operation system Business needs at least one the business function called and required configuration data.
Above packet is continued to use to access the example of a http webpages to illustrate.The script text of http webpages is accessed in operation After part, Second Rule matching is carried out to packet.Assuming that the Second Rule matching obtained shows that packet will specifically access 163 nets Page, then operation system is assured that at least one business to be carried out is specially to access 163 webpages to packet, and adjusts With the business function of 163 webpages of access so that packet is accessed.
Or assume that the Second Rule obtained matching shows that packet will specifically access one group of painting of Leonardo da Vinci, and access The video of one Leonardo da Vinci's biography, then operation system is assured that at least one business to be carried out is specific to packet To access the business of one group of image and a video.Operation system, which is based on the second matched rule, can call access painting of Leonardo da Vinci business Function and the video traffic function for accessing Leonardo da Vinci's biography.
Next, performing S103:Based on the data access index information, obtained from the configuration data internal storage location The configuration data.
Determine after at least one business function and required configuration data, in embodiments of the present invention, at least one industry Business is realized that therefore, during implementing, S103's is specifically as follows by least one business function:
By at least one incoming described business function of the data access index information in the script file;
During at least one described business function is performed, according to the data access index information from the configuration The configuration data needed at least one described business function is obtained in datarams unit.
Specifically, when at least one business function performs at least one business, it is necessary to using with least one business Related configuration data, in order to avoid frequent transitions are obtained from script file when needing configuration data, of the invention real Apply in example, operation system will be according to the second matching result by least one incoming business letter of corresponding data access index information Number.
Certainly, prior to, concurrently with, or after at least one incoming business function by data access index information, business system System is also needed at least one incoming business function of the packet of acquisition.But, operation system, may when obtaining packet Some preliminary treatments can be carried out to packet, such as stream process, IP are reset, thus the packet of final incoming business function with just The data for beginning to obtain can be different, but the essence of packet is constant.
During at least one business function is performed, when needing to use configuration data, business function can be direct Configuration data in configuration data internal storage location is obtained by data access index information.For example when data access index information has When body is the pointer of configuration data, business function obtains configuration data according to pointer from configuration data internal storage location;Work as data When access index information is specially index information, business function is by the incoming configuration data internal storage location of index information, configuration data Internal storage location finds after configuration data according to incoming index information configuration data being transmitted to business function.
Next S104 is performed:The business execution logic is performed, and calls the configuration data in the process of implementation, with Realize at least one described business.
Further, at least one business function can perform each self-corresponding service logic respectively and carry out business to packet. And during at least one business function performs business execution logic, other business functions, such as industry may be called Business function 1 may trigger other again during may calling business function 2, or business function execution business execution logic Event, and then other scripts operation etc. is triggered, until packet is produced or abandoned from operation system.
The entire protocol of business processing of the present invention is described below by a specific embodiment, Fig. 5, operation system tool is refer to It is as follows that body performs step:
S301:Packet is obtained, processing data packets are carried out.
Operation system may carry out some preliminary treatments, such as stream process, IP are reset, with side when obtaining packet Just subsequent module or unit can be handled.
S302:The first rule match is carried out, corresponding event is triggered.
During processing data packets, simple first rule match is had first, such as canonical matching, multimode matching, sentence Whether disconnected message is that new message, mark or purpose IP address to packet IP address are matched etc., hit corresponding first After rule, corresponding event will be triggered, it is assumed that triggering " ON_CLIENT_NEW_CONN " event.
S303:Acquisition event correspondence script file.
In order to handle event, operation system can obtain the corresponding script file of event, such as triggering thing according to the event of triggering Part is " ON_CLIENT_NEW_CONN ", then operation system will obtain " ON_CLIENT_NEW_CONN " corresponding script text Part.
S304:Run Script file.
Corresponding script file is run, patrolling to the business of packet is controlled by the business execution logic in script file Volume.
S305:Second Rule matching is carried out based on the business execution logic in script file.
TCP layer and IP layers of some fields match, and application layer matching etc. are for example carried out to packet.
S306:Obtain the second matching result.
In the second matching result, including perform specific one or many that " ON_CLIENT_NEW_CONN " business to be called The configuration data that individual business function and execution " ON_CLIENT_NEW_CONN " business are needed to use.
S307:Specific business function is called to perform business.
Specific business function is called based on the second matching result, and " ON_CLIENT_NEW_CONN " business institute will be performed The incoming specific business function of data access index information of the configuration data needed.Business function performs business, is needing to use During configuration data, configuration data is obtained from configuration data internal storage location according to data access index information.In the mistake of the business of execution Cheng Zhong, if business function triggers other events, performs S202.Otherwise, S208 is performed.
S308:Finishing service.
Embodiment two:
Fig. 6 is refer to, the embodiments of the invention provide a kind of operation system, including configuration data internal storage location, number is configured It is used to deposit the data needed for the operation system according to internal storage location, including:
Determining unit 101, at least one business for determining to be used to handle pending data bag, and described at least one The corresponding script file of individual business.
Call unit 102, for calling the script file;Wherein, the script file includes data access index Information, and for performing the business execution logic of at least one business, the data access index information includes being used for Storage address of the configuration data in the configuration data internal storage location described in characterizing needed at least one business.
Business execution unit 103, for based on the data access index information, from the configuration data internal storage location Obtain the configuration data;And the business execution logic is performed, and the configuration data is called in the process of implementation, with reality At least one existing described business.
Further, the operation system in the embodiment of the present invention can also include:
Script converting unit 104, for the determining unit determine for handle pending data bag at least one Before business, and the corresponding script file of at least one described business, by the corresponding original script file of the script file In unconverted configuration data data structure, be converted into the configuration data internal storage location read-write and described at least one The recognizable data structure of individual business;Wherein, the data access index information is not included in the original script file;It will turn Configuration data after change is stored into the configuration data internal storage location;According to the configuration data after the conversion in the configuration Storage address in datarams unit generates the data access index information, and the data access index information is stored Into the original script file;The business execution logic is converted into computer executable program, to obtain the script File;Configuration data after the conversion is specially the configuration data needed at least one described business.
Specifically, in embodiments of the present invention, determining unit 101 specifically for:
First rule match is carried out to the packet, the first matching result is obtained;Based on first matching result, really The fixed packet at least one business to be carried out;It is determined that the corresponding script file of described at least one business.
Business execution unit 103 specifically for:
Be based on the data access index information described, obtained from the configuration data internal storage location execution it is described to Before the configuration data required for a few business, Second Rule matching is carried out to the packet, second is obtained and matches As a result;Based on second matching result, it is determined that performing at least one business function and needs of at least one business The configuration data.
Further, the business execution unit 103 in the embodiment of the present invention also particularly useful for:
By at least one incoming described business function of the data access index information in the script file;
During at least one described business function is performed, according to the data access index information from the configuration The configuration data needed at least one described business function is obtained in datarams unit.
Invention is based on same inventive concept due to the present embodiment two and embodiment one, therefore repetition part is just no longer gone to live in the household of one's in-laws on getting married one by one State.
Embodiment three:
The embodiment of the present invention provides a kind of operation system.The implication for the term that operation system shown in Fig. 7 is related to and Implement, may be referred to earlier figures 1 to Fig. 6 and the associated description of embodiment.
It refer to shown in Fig. 7, the system includes:
Processor 202, for determining to be used for handle at least one business of pending data bag, and it is described at least one The corresponding script file of business;Call the script file;Wherein, the script file includes data access index information, And for performing the business execution logic of at least one business, the data access index information includes being used to characterize institute State storage address of the configuration data needed at least one business in the configuration data internal storage location;Visited based on the data Index information is asked, the configuration data is obtained from the configuration data internal storage location;Perform the business execution logic, and The configuration data is called in implementation procedure, to realize at least one described business.
During implementing, the operation system of the embodiment of the present invention can be invention load equalizer, multiple services Device front end, data switching exchane or router etc., the present invention is not particularly limited.
Optionally, processor 202 is additionally operable to:
In described at least one business determined for handling pending data bag, and at least one described business correspondence Script file before, by the data knot of the unconverted configuration data in the corresponding original script file of the script file Structure, is converted into the data structure that the configuration data internal storage location is read-write and described at least one business is recognizable;Wherein, Do not include the data access index information in the original script file;
Configuration data after conversion is stored into the configuration data internal storage location;
The number is generated according to storage address of the configuration data after the conversion in the configuration data internal storage location According to access index information, and by data access index information storage into the original script file;
The business execution logic is converted into computer executable program, to obtain the script file;
Configuration data after the conversion is specially the configuration data needed at least one described business.
Optionally, processor 202 is additionally operable to:
First rule match is carried out to the packet, the first matching result is obtained;
Based on first matching result, the packet at least one business to be carried out is determined;
It is determined that the corresponding script file of described at least one business.
Optionally, processor 202 specifically for:
Be based on the data access index information described, obtained from the configuration data internal storage location execution it is described to Before the configuration data required for a few business,
Second Rule matching is carried out to the packet, the second matching result is obtained;
Based on second matching result, it is determined that performing at least one business function of at least one business and needing The configuration data wanted.
Optionally, processor 202 is specifically additionally operable to:
By at least one incoming described business function of the data access index information in the script file;
During at least one described business function is performed, according to the data access index information from the configuration The configuration data needed at least one described business function is obtained in datarams unit.
Wherein, in the figure 7, bus architecture (being represented with bus 200), bus 200 can include any number of interconnection Bus and bridge, bus 200 is by depositing that the one or more processors including being represented by processor 202 and memory 204 are represented The various circuits of reservoir are linked together.Bus 200 can also by ancillary equipment, voltage-stablizer and management circuit etc. it Various other circuits of class are linked together, and these are all it is known in the art, therefore, no longer being carried out further to it herein Description.EBI 206 provides interface between bus 200 and receiver 201 and transmitter 203.Receiver 201 and transmitter 203 can be that there is provided the unit for being communicated over a transmission medium with various other devices for same element, i.e. transceiver.
Processor 202 is responsible for bus 200 and common processing, and memory 204 can be used to store processor 202 perform operation when used data.
The various change mode and instantiation of process of service execution described in previous embodiment are equally applicable to this reality The operation system of example is applied, by foregoing detailed description, those skilled in the art are clear that business in the present embodiment The implementation of system, thus it is succinct for specification, it will not be described in detail herein.
The one or more technical schemes provided in the embodiment of the present invention, have at least the following technical effects or advantages:
In embodiments of the present invention, at least one business is carried out to packet, needed at least one business of acquisition is needed Configuration data when, operation system can correspondence at least one business script file in obtain data access index information, And then the configuration data needed at least one business is directly obtained from configuration data internal memory based on data access index information.Institute With, it is no longer necessary to configuration data is obtained from script frequent transitions, so as to improve the performance and effect of operation system processing business Rate.Invention
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code The shape for the computer program product that usable storage medium is implemented on (including but is not limited to magnetic disk storage and optical memory etc.) Formula.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising including these changes and modification.

Claims (10)

1. a kind of method for processing business, applied to operation system, the operation system includes configuration data internal storage location, described to match somebody with somebody Putting datarams unit is used to deposit the data needed for the operation system, it is characterised in that methods described includes:
It is determined that at least one business for handling pending data bag, and the corresponding script text of at least one described business Part;
Call the script file;Wherein, the script file includes data access index information, and described for performing The business execution logic of at least one business, the data access index information includes being used to characterize at least one described business institute Storage address of the configuration data needed in the configuration data internal storage location;
Based on the data access index information, the configuration data is obtained from the configuration data internal storage location;
The business execution logic is performed, and calls the configuration data in the process of implementation, to realize at least one described industry Business.
2. the method as described in claim 1, it is characterised in that it is described determine for handle pending data bag at least one Before individual business, and the corresponding script file of at least one described business, methods described also includes:
By the data structure of the unconverted configuration data in the corresponding original script file of the script file, it is converted into described The data structure that configuration data internal storage location is read-write and described at least one business is recognizable;Wherein, the original script text Do not include the data access index information in part;
Configuration data after conversion is stored into the configuration data internal storage location;
The data are generated according to storage address of the configuration data after the conversion in the configuration data internal storage location to visit Index information is asked, and by data access index information storage into the original script file;
The business execution logic is converted into computer executable program, to obtain the script file;
Configuration data after the conversion is specially the configuration data needed at least one described business.
3. method as claimed in claim 1 or 2, it is characterised in that the determination is used to handle pending data bag at least One business, and the corresponding script file of at least one described business, are specifically included:
First rule match is carried out to the packet, the first matching result is obtained;
Based on first matching result, the packet at least one business to be carried out is determined;
It is determined that the corresponding script file of described at least one business.
4. method as claimed in claim 1 or 2, it is characterised in that the data access index information is based on described, from institute Before stating the configuration data for obtaining and being performed required at least one described business in configuration data internal storage location, methods described Also include:
Second Rule matching is carried out to the packet, the second matching result is obtained;
Based on second matching result, it is determined that performing at least one business function and needs of at least one business The configuration data.
5. method as claimed in claim 4, it is characterised in that the execution business execution logic, and in implementation procedure In call the configuration data, to realize that at least one described business is specifically included:
By at least one incoming described business function of the data access index information in the script file;
During at least one described business function is performed, according to the data access index information from the configuration data The configuration data needed at least one described business function is obtained in internal storage location.
6. a kind of operation system, including configuration data internal storage location, the configuration data internal storage location are used to deposit the business Data needed for system, it is characterised in that the system also includes:
Determining unit, at least one business for determining to be used to handle pending data bag, and at least one described business Corresponding script file;
Call unit, for calling the script file;Wherein, the script file includes data access index information, with And for performing the business execution logic of at least one business, the data access index information includes described for characterizing Storage address of the configuration data in the configuration data internal storage location needed at least one business;
Business execution unit, for based on the data access index information, institute to be obtained from the configuration data internal storage location State configuration data;And the business execution logic is performed, and the configuration data is called in the process of implementation, it is described to realize At least one business.
7. system as claimed in claim 6, it is characterised in that the system also includes:
Script converting unit, for determining at least one business for handling pending data bag in the determining unit, with And before the corresponding script file of described at least one business, by not turning in the corresponding original script file of the script file The data structure of the configuration data of change, is converted into that the configuration data internal storage location is read-write and described at least one business can The data structure of identification;Wherein, the data access index information is not included in the original script file;
Configuration data after conversion is stored into the configuration data internal storage location;
The data are generated according to storage address of the configuration data after the conversion in the configuration data internal storage location to visit Index information is asked, and by data access index information storage into the original script file;
The business execution logic is converted into computer executable program, to obtain the script file;
Configuration data after the conversion is specially the configuration data needed at least one described business.
8. system as claimed in claims 6 or 7, it is characterised in that the determining unit, specifically for:
First rule match is carried out to the packet, the first matching result is obtained;Based on first matching result, institute is determined State packet at least one business to be carried out;It is determined that the corresponding script file of described at least one business processing.
9. system as claimed in claims 6 or 7, it is characterised in that the business execution unit specifically for:
The data access index information is based on described, is obtained from the configuration data internal storage location at least one described in execution Before the configuration data required for individual business, Second Rule matching is carried out to the packet, the second matching result is obtained; Based on second matching result, it is determined that perform at least one business at least one business function and needs it is described Configuration data.
10. system as claimed in claim 9, it is characterised in that the business execution unit is additionally operable to:
By at least one incoming described business function of the data access index information in the script file;
During at least one described business function is performed, according to the data access index information from the configuration data The configuration data needed at least one described business function is obtained in internal storage location.
CN201410421735.1A 2014-08-25 2014-08-25 A kind of method for processing business and operation system Active CN104182234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410421735.1A CN104182234B (en) 2014-08-25 2014-08-25 A kind of method for processing business and operation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410421735.1A CN104182234B (en) 2014-08-25 2014-08-25 A kind of method for processing business and operation system

Publications (2)

Publication Number Publication Date
CN104182234A CN104182234A (en) 2014-12-03
CN104182234B true CN104182234B (en) 2017-10-10

Family

ID=51963313

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410421735.1A Active CN104182234B (en) 2014-08-25 2014-08-25 A kind of method for processing business and operation system

Country Status (1)

Country Link
CN (1) CN104182234B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677306A (en) * 2014-11-18 2016-06-15 中兴通讯股份有限公司 Automation script compiling method and device
CN107885541A (en) * 2016-09-30 2018-04-06 北京京东尚科信息技术有限公司 The method and device of processing system configuration
CN106610838B (en) * 2016-12-27 2020-04-24 北京酷我科技有限公司 Conversion method of multiple scripting languages
CN108632300B (en) * 2017-03-15 2021-12-10 阿里巴巴集团控股有限公司 Data synchronization system, method, server, client and electronic equipment
CN107528839A (en) * 2017-08-18 2017-12-29 深圳乐信软件技术有限公司 The collocation method and device of a kind of interface packets
CN109377393A (en) * 2018-10-18 2019-02-22 阳光人寿保险股份有限公司 Regular method of calibration and device
CN109447443A (en) * 2018-10-18 2019-03-08 阳光人寿保险股份有限公司 Index calculating method and device
CN109597661B (en) * 2018-10-26 2021-10-22 创新先进技术有限公司 Service function configuration method and device
CN109271809A (en) * 2018-12-03 2019-01-25 南方电网科学研究院有限责任公司 A kind of method, system and relevant apparatus that database is reinforced
CN112950299A (en) * 2019-11-26 2021-06-11 浙江大搜车软件技术有限公司 Scheme design method, device, computer equipment and storage medium
CN113760343A (en) * 2020-06-05 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for processing service request

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064670A (en) * 2006-04-30 2007-10-31 互联天下科技发展(深圳)有限公司 Network multi-service processing method and system
CN102147726A (en) * 2011-04-01 2011-08-10 烽火通信科技股份有限公司 Script-based method for implementing service configuration
CN102385527A (en) * 2010-09-01 2012-03-21 中兴通讯股份有限公司 Device and method for improving execution efficiency of service scripts
CN103902270A (en) * 2012-12-27 2014-07-02 纽海信息技术(上海)有限公司 Dynamic business building, managing and processing methods and dynamic business system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064670A (en) * 2006-04-30 2007-10-31 互联天下科技发展(深圳)有限公司 Network multi-service processing method and system
CN102385527A (en) * 2010-09-01 2012-03-21 中兴通讯股份有限公司 Device and method for improving execution efficiency of service scripts
CN102147726A (en) * 2011-04-01 2011-08-10 烽火通信科技股份有限公司 Script-based method for implementing service configuration
CN103902270A (en) * 2012-12-27 2014-07-02 纽海信息技术(上海)有限公司 Dynamic business building, managing and processing methods and dynamic business system

Also Published As

Publication number Publication date
CN104182234A (en) 2014-12-03

Similar Documents

Publication Publication Date Title
CN104182234B (en) A kind of method for processing business and operation system
US11734421B2 (en) Systems and methods to detect and neutralize malware infected electronic communications
US10530711B2 (en) Extensible virtual switch datapath
US8621495B2 (en) Methods and apparatus for securing frames from other frames
CN106598549A (en) Intelligent agreement system based on block chain and implementation method
US7996822B2 (en) User/process runtime system trace
CA2674000A1 (en) Web server for managing session and method thereof
CN106484425B (en) A kind of abnormality eliminating method of policy-based configuration
CN104168250B (en) Business Process Control method and device based on CGI frames
US11709716B2 (en) Hardware offload support for an operating system offload interface using operation code verification
CN104461862B (en) Resource recovery method and apparatus after data handling system and thread collapse
CN107133243A (en) A kind of data processing method and server
US7818726B2 (en) Script-based object adaptation
CN109218296A (en) Based on the XSS defensive system and method for improving CSP strategy
CN104423932B (en) The method that Binary Element is called in Javascript
US9229980B2 (en) Composition model for cloud-hosted serving applications
CN103559097B (en) The method of interprocess communication, device and browser in a kind of browser
CN110321510A (en) Page rendering method and system
CN107273127A (en) Method and device for realizing page plug-in web application
CN105404635A (en) Character string matching method and device and heterogeneous computing system
CN116668202A (en) Method and system for detecting memory horses in container environment
CN110633162A (en) Remote call implementation method and device, computer equipment and storage medium
CN108647087A (en) Realize the reentrant method, apparatus of PHP kernels, server and storage medium
CN107643892A (en) Interface processing method, apparatus, storage medium and processor
CN105407075B (en) The method and system of service logic

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
TR01 Transfer of patent right

Effective date of registration: 20200417

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee after: HUAWEI TECHNOLOGIES Co.,Ltd.

Address before: 301, A building, room 3, building 301, foreshore Road, No. 310052, Binjiang District, Zhejiang, Hangzhou

Patentee before: Huawei Technologies Co.,Ltd.

TR01 Transfer of patent right