CN108563437A - Development approach, system, computer equipment and the storage medium of network function - Google Patents

Development approach, system, computer equipment and the storage medium of network function Download PDF

Info

Publication number
CN108563437A
CN108563437A CN201810353209.4A CN201810353209A CN108563437A CN 108563437 A CN108563437 A CN 108563437A CN 201810353209 A CN201810353209 A CN 201810353209A CN 108563437 A CN108563437 A CN 108563437A
Authority
CN
China
Prior art keywords
prediction rule
operation rules
network function
rule
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810353209.4A
Other languages
Chinese (zh)
Other versions
CN108563437B (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.)
Turing Artificial Intelligence Research Institute (nanjing) Co Ltd
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN201810353209.4A priority Critical patent/CN108563437B/en
Publication of CN108563437A publication Critical patent/CN108563437A/en
Application granted granted Critical
Publication of CN108563437B publication Critical patent/CN108563437B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a kind of development approach of network function, system, computer equipment and storage medium.The development approach includes the following steps:Prediction rule and the corresponding operation rules for realizing network function are obtained from a data source;Wherein, the prediction rule includes the prediction rule to the prediction rule of data flow, and/or with the relevant state of the network function, and the operation rules includes the operation rules to the operation rules of the data flow, and/or with the relevant state of the network function;Acquired prediction rule and its operation rules are preserved according to preset description rule.The application greatly reduces the development difficulty of developing network function and effectively reduces the defect generated by artificial logic error.

Description

Development approach, system, computer equipment and the storage medium of network function
Technical field
This application involves computer software technical fields, more particularly to a kind of development approach of network function, system, meter Calculate machine equipment and storage medium.
Background technology
NF (Network Functions, network function) is mainly used for realizing resource-sharing, realizes the quick of data information It transmits, improves network reliability, load balancing and distributed treatment ability, centralized management and integrated information service are provided. The NF modules known usually are introduced to the market the product for carrying core NF functions (such as fire wall) by NF suppliers.However, NF is handed over It is still a dull and of a high price process to pay, and hinders NFV (Network Function Virtualization, network function virtualization) ecosystem development.NF deliver difficult point be include standard of delivery NF not The different of heterogeneous networks can be met to require.For example, the operator from heterogeneous networks may be required for one " load equalizer ", But they may have different requirements:The non-homogeneous load balance proportional to its isomery back-end server may be needed, it can It can need the blacklist function in load equalizer, it is desirable alternatively to can be stream distribution priority.Known certain methods are purchases It buys various NF and links them to obtain required function, this can introduce the expense of multiple NF examples and delay on chain, heavier It wants, this method pushes management complexity to NF user.In another approach, NF user requires NF supplier developments fixed Product processed usually requires to test for a long time, in addition, normally resulting in software and becoming redundancy functional be added in software of institute And with strong coupling, it is difficult to safeguard.
Invention content
In view of the foregoing deficiencies of prior art, the application is designed to provide a kind of exploitation side of network function Method, system, computer equipment and storage medium are difficult to quick, succinct reality for solving in NF development processes in the prior art The problem of existing customized solution.
In order to achieve the above objects and other related objects, the first aspect of the application provides a kind of exploitation side of network function Method, including:Prediction rule and the corresponding operation rules for realizing network function are obtained from a data source;Wherein, described Prediction rule includes the prediction rule to the prediction rule of data flow, and/or with the relevant state of the network function, the behaviour Make rule and includes the operation rules to the operation rules of the data flow, and/or with the relevant state of the network function;By institute The prediction rule and its operation rules of acquisition are preserved according to preset description rule.
In certain implementation steps of the first aspect of the application, the prediction rule of the data flow includes:Data-oriented The prediction rule of at least one feature locations in stream.
In certain implementation steps of the first aspect of the application, the development approach is further comprising the steps of:From described Data source obtains and the relevant original state of the network function.
In certain implementation steps of the first aspect of the application, the operation rules to data flow include it is following at least It is a kind of:To the operation rules of data flow executive editor, forwarding, discarding or delay process, the behaviour resubmited is executed to data flow Make rule.
In certain implementation steps of the first aspect of the application, the data source be an editing machine, further include with down toward A few step:The editing machine will be imported comprising the source file of the prediction rule and corresponding operation rules;In the volume Collect editor's prediction rule and corresponding operation rules in device.
It is described to be obtained from a data source for realizing network function in certain implementation steps of the first aspect of the application Prediction rule and the step of corresponding operation rules include following at least one:It is obtained from the data source for describing State the text of prediction rule and corresponding operation rules;It is right for describing the prediction rule and institute to be obtained from the data source The table for the operation rules answered;It is obtained from the data source for describing having for the prediction rule and corresponding operation rules Xiang Tu.
It is described by acquired prediction rule and its operation rules in certain implementation steps of the first aspect of the application The step of being preserved according to preset description rule include:Acquired prediction rule and its operation rules are preserved at can quilt The source file of the editing machine multiplexing editor.
It is described by acquired prediction rule and its operation rules in certain implementation steps of the first aspect of the application The step of being preserved according to preset description rule include:It, will be described according to the conversion logic expressed by the description rule Prediction rule and operation rules are handled, to obtain the program file described by program language.
In certain implementation steps of the first aspect of the application, it is with the prediction rule and corresponding operation rules Entry, the conversion logic according to expressed by description rule, the step of the prediction rule and operation rules are handled Including:It is one by one conditional statement by the prediction rule processing in each entry according to the conversion logic, by corresponding operation Rule process is the action statement under the conditional statement.
In certain implementation steps of the first aspect of the application, it is described according to expressed by description rule by the pre- gauge Then processing is conditional statement, and the step of by corresponding operation rules processing being the action statement under the conditional statement includes: The sentence of multiple entries is optimized processing by the conversion logic expressed by context according to multiple entries.
In certain implementation steps of the first aspect of the application, turn expressed by the context according to multiple entries It includes following any to change the step of sentence of multiple entries is optimized processing by logic:According to the context institute of multiple entries The conversion logic of expression is by each entry process at state machine;The conversion logic expressed by context according to multiple entries will be multiple Entry sequentially handles, fusion treatment, skips at least one of processing and rearrangement processing.
It is described to handle prediction rule and operation rules in certain implementation steps of the first aspect of the application Step includes:The prediction rule and operation rules are processed into the program text with Domain Specific Language or programming language description Part.
The application second aspect provides a kind of development system of network function, including:Interactive module is used for from a data source Obtain the prediction rule for realizing network function and corresponding operation rules;Wherein, the prediction rule includes to data The prediction rule of stream, and/or prediction rule with the relevant state of the network function, the operation rules include to the number According to the operation rules of stream, and/or the operation rules with the relevant state of the network function;Processing module, being used for will be acquired Prediction rule and its operation rules preserved according to preset description rule.
In the certain embodiments of the second aspect of the application, the prediction rule of the data flow includes:Data-oriented The prediction rule of at least one feature locations in stream.
In the certain embodiments of the second aspect of the application, the interactive module is additionally operable to obtain from the data source With the relevant original state of the network function.
In the certain embodiments of the second aspect of the application, the operation rules to data flow include it is following at least It is a kind of:To the operation rules of data flow executive editor, forwarding, discarding or delay process, the behaviour resubmited is executed to data flow Make rule.
In the certain embodiments of the second aspect of the application, the data source is an editing machine, the interactive module It is additionally operable to a following at least step:The editor will be imported comprising the source file of the prediction rule and corresponding operation rules Device;Prediction rule and corresponding operation rules are edited in the editing machine.
In the certain embodiments of the second aspect of the application, the interactive module is for executing following at least one behaviour Make:The text for describing the prediction rule and corresponding operation rules is obtained from the data source;From the data source Obtain the table for describing the prediction rule and corresponding operation rules;It is obtained from the data source described for describing The digraph of prediction rule and corresponding operation rules.
In the certain embodiments of the second aspect of the application, the processing module is used for acquired prediction rule And its operation rules is preserved into the source file that can be multiplexed editor by the editing machine.
In the certain embodiments of the second aspect of the application, the processing module is used for according to the description rule institute The conversion logic of expression handles the prediction rule and operation rules, to obtain the program text described by program language Part.
In the certain embodiments of the second aspect of the application, it is with the prediction rule and corresponding operation rules Prediction rule processing in each entry is one by one conditional statement according to the conversion logic by entry, the processing module, will Corresponding operation rules processing is the action statement under the conditional statement.
In the certain embodiments of the second aspect of the application, the processing module according to multiple entries context institute The sentence of multiple entries is optimized processing by the conversion logic of expression.
In the certain embodiments of the second aspect of the application, the processing module executes following any step:It presses The conversion logic expressed by context according to multiple entries is by each entry process at state machine;According to the context institute of multiple entries The conversion logic of expression sequentially handles multiple entries, fusion treatment, skip in processing and rearrangement processing at least one Kind.
In the certain embodiments of the second aspect of the application, the processing module is used for the prediction rule and behaviour Make rule process into the program file with Domain Specific Language or programming language description.
The application third aspect provides a kind of computer equipment, including:Memory, for storing at least one program;Place Manage device, for transferring and executing at least one program stored, to execute it is preceding it is any as described in development approach.
The application fourth aspect provides a kind of computer readable storage medium, is stored with the calculating developed for network function Machine program, which is characterized in that the computer program, which is performed, realizes as above any network function development approach.
As described above, the development approach of the network function of the application, system, computer equipment and storage medium, have with Lower advantageous effect:The application obtains state, prediction rule and the operation rules described according to description rule using data source, and raw At the program file described by program language, and then software program is obtained after being compiled to program file, due to only according to network work( Involved state, prediction rule and operation rules can be described, thus greatly reduces the development difficulty of developing network function;Separately Outside, acquired state, prediction rule and operation rules etc. are converted into program language by scheme provided herein, effectively Reduce the defect generated by artificial logic error.
Description of the drawings
Fig. 1 is shown configured with the structural schematic diagram of the computer equipment of the development system of the application.
Fig. 2 is shown as the flow chart of the development approach of the application network function in one embodiment.
Fig. 3 is shown as including the text schematic diagram of prediction rule and corresponding operation rules.
Fig. 4 is shown as including the table schematic diagram of prediction rule and corresponding operation rules.
Fig. 5 is shown as including the digraph schematic diagram of prediction rule and corresponding operation rules.
Fig. 6 is shown as the configuration diagram of the development system of the application network function in one embodiment.
Fig. 7 is shown as a kind of flow chart of Compilation Method of the application.
Fig. 8 is shown as a kind of signal of embodiment provided herein that running environment option is shown on editing machine Figure.
Fig. 9 is shown as the another embodiment of the running environment option provided herein shown on editing machine Schematic diagram.
Figure 10 is shown as the configuration diagram of the compiling system of the application in one embodiment.
Figure 11 is shown as the flow chart of the development approach of the application in one embodiment.
Figure 12 is shown as the configuration diagram of the development system of the application in one embodiment.
Figure 13 is shown as showing for the various files generated by the development plan operation editing machine described in Figure 11 and Figure 12 It is intended to.
Figure 14 is shown as the structural schematic diagram of one embodiment of computer equipment of the application.
Specific implementation step
Illustrate that the implementation steps of the application, those skilled in the art can be by this explanations by particular specific embodiment below Content disclosed by book understands other advantages and effect of the application easily.
In described below, refer to the attached drawing, attached drawing describes several embodiments of the application.It should be appreciated that also can be used Other embodiment, and can be carried out without departing substantially from spirit and scope of the present disclosure mechanical composition, structure, electrically with And the operational detailed description changed below should not be considered limiting, and the range of embodiments herein The limited of claims terms used herein of patent only by announcing are merely to describe specific embodiment, and be not It is intended to limitation the application.
Although term first, second etc. are used for describing various elements herein in some instances, these elements It should not be limited by these terms.These terms are only used for distinguishing an element with another element.For example, first is pre- If threshold value can be referred to as the second predetermined threshold value, and similarly, the second predetermined threshold value can be referred to as the first predetermined threshold value, and The range of various described embodiments is not departed from.First predetermined threshold value and predetermined threshold value are to describe a threshold value, still Unless context is explicitly pointed out with other steps, otherwise they are not the same predetermined threshold values.Similar situation further includes first Volume and the second volume.
Furthermore as used in herein, singulative " one ", "one" and "the" are intended to also include plural number shape Formula, unless having opposite instruction in context it will be further understood that term "comprising", " comprising " show that there are the spies Sign, step, operation, element, component, project, type, and/or group, but it is not excluded for other one or more features, step, behaviour Presence, appearance or the addition term "or" used herein and "and/or" quilt of work, element, component, project, type, and/or group It is construed to inclusive, or means any one or any combinations.Therefore, " A, B or C " or " A, B and/or C " mean " with Descend any one:A;B;C;A and B;A and C;B and C;A, B and C ".Only when element, function, step or the combination of operation are in certain steps When inherently mutually exclusive under rapid, it just will appear the exception of this definition.
It is privately owned from providing with the extension of cloud service institute coverage area, and based on NF suppliers caused by cloud service The NFV modules that special network element device provides flexibly configurable network capabilities to the professional standard based on certain hardware/softwares Transformation, NF suppliers have fettered the speed of product renewing using existing NF development modes, and to optimizing core network function With the flexibility of complementary network function.
For this purpose, itself please provide a kind of using structuring exploitation NF modules, the especially exploitation of exploitation core network function Mode, have between each function for generating due to break away from a manner of writing code using logical language it is strong coupling, and because strong Various maintenances, optimization problem caused by coupling.
The application provides a kind of development approach of network function, and the development approach is mainly executed by development system.Institute State the software and hardware that development system includes computer equipment, wherein the computer equipment includes but not limited to be configured with to open Send out PC device, the server etc. of software section.Referring to Fig. 1, it is shown configured with the meter of the development system Calculate the structural schematic diagram of machine equipment.The computer equipment includes storage unit 11, processing unit 12, interface unit 13 and display Unit 14 etc..The computer equipment can also configure each hardware in the hardware device for being useful for executing developed network function Unit, to provide running environment for the network function developed.
Wherein, the storage unit 11 is stored with the software section of the development system, and the storage unit 11 includes height Fast random access memory, nonvolatile memory and Memory Controller, such as one or more disk storage equipments, flash memory Equipment or other non-volatile solid-state memory devices.In certain embodiments, memory can also include far from one or more The memory of processor, such as via RF circuits or outside port and the network attached storage of communication network (not shown) access Device, wherein the communication network can be internet, one or more intranets, LAN (LAN), wide area network (WLAN), deposit It stores up LAN (SAN) etc. or its is appropriately combined.Such as CPU and Peripheral Interface of the Memory Controller controllable device it Access of the other assemblies of class to memory.Storage component software in the memory unit include operating system, communication module (or Instruction set), contact/motion module (or instruction set), figure module (or instruction set), haptic feedback module (or instruction set), text This input module (or instruction set) and application (or instruction set).
The processing unit 12 is operationally coupled with storage unit 11.It is being deposited more specifically, processing unit 12 can perform The instruction stored in reservoir and/or non-volatile memory device such as generates program file to execute operation in computing device And/or by described in program file prediction rule and operation rules be transferred to electronic console.In this way, processor may include One or more general purpose microprocessors, one or more application specific processors (ASIC), one or more field programmable logic battle arrays Arrange (FPGA) or any combination of them.
The processing unit 12 is also operatively coupled to interface unit 13 and input structure, which may make Computing device can be interacted with various other electronic equipments, which may make user that can be carried out with computing device Interaction, for example, the interface unit 13 includes the ports I/O, and/or network interface etc..Therefore, input structure may include button, Keyboard, mouse, Trackpad etc..In addition, display unit 14 may include that the electronic console with touch component, the touch component are logical It crosses detection object and touches generation and/or the position of its screen (for example, surface of electronic console) to promote user to input.
Referring to Fig. 2, it is shown as the flow chart of the development approach of the application network function in one embodiment.It is described Processing unit is by calling the exploitation software stored in storage unit to execute each step in the development approach.
In step s 110, it obtains from a data source and is advised for realizing the prediction rule of network function and corresponding operation Then.Wherein, the data source includes the source file or tables of data for Storage Estimation rule and operation rules.For example, data source Including but not limited to database or document storage server.The processing unit can be by interface unit from such as database or file The data sources such as storage server obtain the prediction rule preserved according to preset description rule and corresponding operation rules.
The data source further includes the editing machine for showing and editing prediction rule and operation rules.In a specific example In, the editing machine as the part in development system and include software in computer equipment where the development system and Hardware.For example, the editing machine includes display unit, processing unit and storage unit.Processing unit is shown in display unit certainly Editor interface obtain prediction rule for realizing network function and corresponding operation rules.Wherein, research staff is logical Cross prediction rule and corresponding operation rules described in the operational design on editing interface.The processing unit is also based on research and development Import operation of the personnel on editing interface is compiled being imported comprising the source file of the prediction rule and corresponding operation rules Device is collected, so that research staff updates the prediction rule and operation rules that have created, and in the edited, described in acquisition Prediction rule and corresponding operation rules.
Research staff can according to the development approach provide format by prediction rule and operation rules editor and preserve at File is stored in the data source.The development system obtains the prediction rule and operation rules from the data source.Its In, the format edited includes at least one of text, table and digraph.
In some embodiments, the development system can obtain in text, table and the digraph that data source is provided Any source file.For example, referring to Fig. 3, it is shown as the text signal comprising prediction rule and corresponding operation rules Figure.Wherein, research staff is in editing machine or text writing software, according to preset initialization text block (Basic Types and expression), prediction rule text block (Predicates), operation rules text block (Policies) and turn Change the text formatting of logic text block (Model), developing network function is simultaneously preserved into text file, and the development system is from data Source obtains the text file.For another example, referring to Fig. 4, its table for being shown as including prediction rule and corresponding operation rules Lattice schematic diagram.Wherein, research staff is in editing machine or table-form making software, according to allocation list column (Configuration), prediction rule table column (Match), operation rules table column (Action) are compiled developing network function and are preserved At form document, the development system obtains the form document from data source.For another example, referring to Fig. 5, it is shown as comprising pre- Gauge then with the digraph schematic diagram of corresponding operation rules.Wherein, research staff passes through in editing machine or mapping software Routing diagram, fire wall diagram and the speed limiting device diagram provided in selectionbar carries out digraph attended operation, wherein according to Each attribute field provided in diagram fills in corresponding description original state, prediction rule, operation rules etc., the development system The digraph combination with attribute information and connection relation is obtained from data source.
In other embodiments, the development system obtains the prediction rule according to preset format editor from editing machine With corresponding operation rules.For example, operation of the development system according to research staff, appoints what is generated in the manner previously described When one source file imports editing machine and edits and preserve again, each rule edited in editing machine is obtained.
Here, the network function includes but not limited to following at least one:Firewall functionality, speed limiting function, load are equal Weigh function, key message filtering function, customization network function and other network functions etc. generated based on NFV.
The description of edited prediction rule, operation rules and state, the exploitation system are selected for the ease of research staff The data bank such as sentence, symbol, the operator of auxiliary regular description are preset in system.Wherein, the sentence provided includes but unlimited In:Forward sentence, match statement, configure sentence, delay operation sentence, resubmit sentence etc., for example, the sentence of delay operation For timer (Δ t), wherein Δ t is editable parameter.The symbol provided includes but not limited to:Asterisk wildcard, any character, Batch processing symbol etc., for example, utilizing * symbolic indication asterisk wildcards.The operator provided includes but not limited to:Mathematical operator Number, logic connective etc., for example, utilizing ^ symbolic indication logical ANDs.
Here, the constraints that the prediction rule is arranged for being described as realization network function.For example, to realize net The forbid Data flow function that forwarding includes blacklist IP address, the prediction rule in network function include judging IP in data flow Whether address belongs to the rule etc. of preset blacklist IP address list.For another example, the rate limit work(to realize in network function Can, the prediction rule include judge data flow length whether the rule within preset length.For another example, it is realization network work( The transport protocol statistical function of data flow in energy, the prediction rule include the rule for the protocol type for judging data flow.
The prediction rule includes the prediction rule to data flow, is used to define received data stream and meets/be not inconsistent Close the condition of network function.The prediction rule to data flow includes the prediction of at least one feature locations in Data Flow Oriented Rule.Wherein, the feature locations include can predetermined character or byte location in data flow.In a specific example, The feature locations include according to protocol specification be arranged in data flow packet header and packet tail in each character or byte location.Wherein, The protocol specification includes international agreement specification for network transmission, national protocol specification and proprietary protocol specification etc..Example Such as, the feature locations include but not limited to:Ethernet information, IP address, port, protocol type, check information, flag Deng.The wherein described flag citing includes TTL (Time To Live lifetime values) etc..Accordingly, the prediction rule is used In description according to network function the rule of matching characteristic position.The feature locations further include that cannot be predefined in data flow Character or byte location, in a specific example, prediction rule is described carries out matched rule to data content in data flow Then, accordingly, the feature locations include the character or byte location being matched in a stream according to the prediction rule.Example Such as, preset rules include the rule for the bytes match predetermined keyword chosen in data flow;Accordingly, the feature locations are According to the prediction rule it is currently selected during ergodic data stream in byte location.
In addition, the prediction rule further includes the prediction rule with the relevant state of the network function.Wherein, the shape State is included in the variable information for the when of realizing a complicated network function multiple prediction rule being executed with same data flow, and/or The shared variable information of each data flow when realizing the network function of multiple data flows.The state includes but not limited to:Token Information, the source address of data flow and destination address list, clocking information, count information etc..The original state of the state can be Default conditions, for example, assert that the initial value of statistical counting is 0.The original state can also be obtained from the data source, example Such as, the initialization text block or allocation list column that the development system is provided according to editing machine obtain original state.The prediction Rule is for defining the condition for including state.For example, the prediction rule includes:Based on the temporal information that timer is provided Data flow is transmitted in limited time and does not transmit the rule of data flow in limited time.For another example, the prediction rule includes:Received data stream accords with Close and do not meet the rule of default token information.For another example, the prediction rule includes:The source address of received data stream meets And the rule for the destination address list being maintained is not met.
Here, the operation that the operation rules is used to describe to execute needed for the NF modules in the case where meeting corresponding prediction rule. Each prediction rule and corresponding operation rules may include one or more items as an entry in one network function Mesh.Can only include a prediction rule and corresponding one or more in each entry according to the design needs of network function Operation rules;Alternatively, comprising multiple prediction rules and meeting all prediction rules and need to execute one or more in each entry A operation rules.For example, in the function of filtering data flow using blacklist IP address, prediction rule is to received data Stream meets the rule of IP address in blacklist, and corresponding operation rules is to abandon respective stream of data.For another example, table 1 is please referred to, Be shown as realizing in speed limiting device function prediction rule and corresponding operation rules, wherein the pre- gauge in table 1 Then (Match) includes to the prediction rule table column (flow) of data flow and the prediction rule table column (state) of state, operation rules (Action) include operation rules table column (flow) and state to data flow operation rules table column (state).
Table 1
By the type of operation rules described in table 1, operation rules provided herein includes the behaviour to data flow Make rule.The operation rules to data flow includes following at least one:To data flow executive editor, forwarding, abandons or prolong When the operation rules that handles, the operation rules resubmited is executed to data flow.
The operation rules further includes the operation rules with the relevant state of the network function.Such operation rules includes But it is not limited to:The operation rules of Dynamic Maintenance state changes the operation rules of state.
By taking table 1 as an example, the prediction rule of first entry is to meet response traffic f [BR]=REF, corresponding operation in table Rule includes delay process f [output]:=timer (Δ t) rules and addition token information tkn:=token;Second in table The prediction rule of entry includes meeting response traffic f [BR]=REF and data flow length less than or equal to token information f [size] ≤ tkn, corresponding operation rules include transmitting data flow f [output]:=IFACE and modification token information tkn:=tkn-f [size];The prediction rule of third entry includes meeting response traffic f [BR]=REF and data flow length more than token in table Information f [size]>Tkn, corresponding operation rules include abandoning data flow f [output]:=∈.
The prediction rule being shown as in firewall functionality by taking table 2 as an example and corresponding operation rules.Wherein, first Prediction rule in entry is that data flow meets configured list (f ∈ OK), and corresponding operation rules includes transmitting data flow f [output]:=the IFACE and address table seen for safeguarding the data flow forwarded:=seen ∪ { f };Pre- gauge in second entry Then belong to safeguarded address table f ∈ seen including data flow, corresponding operation rules is transmitting data flow f [output]:= IFACE;Prediction rule includes that data flow is not belonging to safeguarded address table in second entryCorresponding operation rules To abandon data flow f [output]:=∈.
Table 2
In order to simplify the repeated description of prediction rule, in above-mentioned example with some symbols (such as *) indicate in previous entry The prediction rule or operation rules that corresponding table column mutually repeats are indicated with other symbols (such as -) without considering in respective table column Prediction rule or respective table column are without executable operation.Above-mentioned asterisk wildcard is only for example, rather than the limitation to the application.
After the development system obtains the entry comprising prediction rule and corresponding operation rules, step is executed S120。
In the step s 120, acquired prediction rule and its operation rules are protected according to preset description rule It deposits.Wherein, the description rule is used to describe hierarchical relationship in same entry between multiple prediction rules, more in same entry The correspondence etc. for executing prediction rule and operation rules in sequence and same entry between a operation operation rules.Example Such as, the description rule include but not limited to the table column form and table column content of table, the paragraph format of text and textual annotation, The picture and text description of digraph and the order of connection etc..
In some embodiments, development system advises acquired prediction rule and its operation according to the description rule It then preserves into the source file that can be multiplexed editor by editing machine.For example, it includes prediction rule and its operation rules to be obtained from database Data object list, the development system is using each data object in data object list as entry, according to the table of table Column form corresponds to acquired each data object in the table column for indicating an entry in write-in table, and according to acquired The sequence of data object in data object list, each data object is sequentially written in table, thus obtains to be answered by editing machine With the source file of editor.For another example, the text file comprising prediction rule and its operation rules, institute are obtained from document storage server Development system is stated according to the description rule in the text file, by prediction rule in text file and its operation rules with entry The description order of each entry of Reconfiguration of form, and preserve into the source file that can be multiplexed editor by editing machine.For another example, it is obtained from editing machine Including prediction rule and its textual form (or digraph form or form) of operation rules, the development system according to Description rule in the textual form (or digraph form or form), by textual form (or digraph form or Form) it preserves into the source file that can be multiplexed editor by editing machine.
Acquired prediction rule and corresponding operation rules according to network function be grouped into multiple text fragments (or The digraph form of multiple independent forms or multiple connectionless relationships), the development system is advised according to preset description Then the prediction rule of each grouping and corresponding operation rules are engaged togather.Wherein, the preset description rule includes But it is not limited to:The rule that the information such as original state in each grouping are uniformly processed, and/or the variable name according to each grouping The rule of each variable of structure of weighing.For example, the variable comprising same names and different definition in different grouping, according to preset description The definition of each variable is carried out Hash processing by rule, then its dependent variable in Hash treated variable and each grouping is unified Be arranged to header, then by each grouping prediction rule and operation rules carry out linking processing, obtain including the header With the source file of multiple entries after linking.
In other embodiments, the step S120 includes:According to the conversion logic expressed by the description rule, The prediction rule and operation rules are handled, to obtain the program file described by program language.In other words, described to open Entry and original state that hair system can also be edited obtained source file, editing machine or according to description rule institute The prediction rule of description and its text file (or form document or oriented map file) of operation rules, are converted by program word Say the program file of description.Wherein, described program language is represented by Domain Specific Language or programming language, for example, the journey Sequence language is C language, C Plus Plus .NET language or DSL etc., or is the interpretable type language such as JAVA, Python.
In some instances, the development system obtains initial state information, will according to the description rule of original state Original state is converted to the program statement of variable-definition.For example, acquired original state is:Config:DENY=r1, R2 }, the corresponding C Plus Plus that is converted into is:
In other examples, the development system obtains initial state information, the conversion logic of description rule expression For:Prediction rule is the condition in conditional statement, and operation rules is the action executed under corresponding conditions, by acquired pre- gauge Condition-execution the sentence described with program language is then converted to corresponding operation rules.For example, acquired prediction rule For f [TTL]==0, corresponding operation rules be f [output]:=∈ is converted into C Plus Plus then according to above-mentioned conversion logic For:If (TTL==0) { f [output]=DROP;}.For another example, prediction rule is f [BR]=INIT, corresponding operation rules For f [TTL] --, f [BR]=X, f [output]=resubmit, then according to description rule described in prediction rule, to f The conversion logic of [BR] initialization, above-mentioned prediction rule and operation rules, which are converted into C Plus Plus, is:If (f [BR]== INIT){f[TTL]--;F [BR]=X;F [output]=RESUBMIT };
Operation (such as resubmit or timer (*)), a complete network work(are resubmited using in operation rules It can one by one be executed and be realized by multiple entries.In other example, the development system can according to the conversion logic by It is conditional statement to handle the prediction rule in each entry to item, is under the conditional statement by corresponding operation rules processing Action statement.For example, acquired multiple entries are as shown in table 3:
Table 3
Match Action
F [BR]=INIT F [TTL] --, f [BR]=X, f [output]=resubmit
F [BR]=X ∧ f [TTL]==0 F [output]=∈
F [BR]=X ∧ f [TTL] ≠ 0 F [output]=IFACE
It is as follows to be converted into C Plus Plus by the conversion logic provided according to table for table:
In order to simplify the program file that is described by program language, in other example, the development system not only according to The conversion logic of prediction rule and operation rules is handled in each entry, expressed by the context according further to multiple entries The sentence of multiple entries is optimized processing by conversion logic.Wherein, the conversion logic packet expressed by the context of multiple entries It includes but is not limited to following at least one:1) conversion logic of multiple entries of determination according to asterisk wildcard, for example, according to preceding article is worked as Asterisk wildcard * in mesh and determine in current predictive rule comprising corresponding prediction rule in previous entry;2) according to multiple entries Whether middle prediction rule has the conversion logic of alternative and multiple entries of determination, for example, according to the prediction in two entries Separately included in rule f ∈ OK andDetermine that two entries have alternative;3) based on same state and determination it is more The conversion logic of a entry, for example, original state is OK ∈ { r1, r2 ... }, the prediction rule in an entry includes f ∈ OK, Operation rules in another entry includes OK:=OK ∪ { f } are determined corresponding more according to transfers of the state OK in multiple entries The conversion logic of a entry.Above-mentioned each conversion logic can be combined according to the entry of actual design network function, herein no longer Enumerate, technical staff can improve according to the conversion logic expressed by above-mentioned context, be superimposed, delete obtained from convert Logic should be considered as based on the specific example under present techniques thought.
Include in such a way that identified conversion logic optimizes processing to the sentence of multiple entries:According to multiple Multiple entries are sequentially handled, fusion treatment, are skipped at processing and rearrangement by the conversion logic expressed by purpose context At least one of reason.
Wherein, the sequentially processing citing includes that each entry is converted to condition 1- operation 1- conditions 2- according to Entry order The program statement of operation 2.For example, table 3 provides two entries with alternative, respectively:Including prediction rule f [BR]= X ∧ f [TTL]==0 second entry, and the third entry including prediction rule f [BR]=X ∧ f [TTL] ≠ 0 just have mutual exclusion Property, then corresponding conversion is at C++ sentences:
If (f [BR]==X&&TTL==0) { f [output]=DROP;}
Else if (f [BR]==X&&TTL!=0) { f [output]=PASS;}
The fusion treatment includes but not limited to following at least one:The entry of redundancy is merged, utilizes loop body Multiple entries are iterated the fusion treatment of formula or the program statement of multiple condition-operations is subjected to nested type processing, are utilized Multiple states are carried out fusion treatment etc. by the relationship of abstract-example.For example, according to<Sip, dip, sport, dport, proto> Granularity will comprising varigrained state carry out Hash handle to obtain the object represented by cryptographic Hash, by each prediction rule And the state in operation rules as the example of object to effectively prevent the bug patch between different conditions.For another example, according to multiple To the modification operation rules of state and based on the prediction rule of state in entry, development system carries out each entry according to loop body The fusion treatment of iteration.For example, please refer to table 4, be shown as acquired in development system for realizing the pre- of flow monitor Gauge then f ∈ NET and operation rules pass and cnt++ and original state NET={ sip:INTRTNEL_NET}
Table 4
Then development system is converted into C Plus Plus and indicates as follows:
It is described to skip processing and include but not limited to:Invalid entry is deleted, according to operation rules not according to entry The operation processing etc. that sequence executes.For example, including out-of-order, layer between several entries and other entries in continuous multiple entries The incidence relations such as grade, then development system skips the entry of onrelevant, and turns associated entry according to the context of relevant entry Change the usability of program fragments described by program language into.
The rearrangement is handled:Each entry is arranged again according to the prediction rule to data flow Sequence is to build the thread etc. that can be executed parallel.For example, being grouped each entry according to the different prediction rules to data flow, and build each Thus communication thread between grouping improves the data processing performance of NF.
It should be noted that above-mentioned each example only symbolically describes the conversion expressed by the context according to multiple entries Logic optimizes multiple entries the mode of processing, rather than the restricted description to optimization processing.In fact, according to acquired Prediction rule and corresponding operation rules and each entry between context relation relationship, development system in combination with according to Order processing, fusion treatment, skip the means such as processing, rearrangement processing more simplify by the conversion logic expressed by each entry Be processed into program language description program file, to effectively reduce because program language it is strong coupling due to cause in program optimization Period generates redundancy program.
Further include in such a way that identified conversion logic optimizes processing to the sentence of multiple entries:According to multiple Conversion logic expressed by the context of entry is by each entry process at state machine;In order to optimize ergodic condition-in program language The efficiency of action statement, the development system can also describe state machine and the selection mechanism to state machine using program language. For example, according to the different prediction rules to data flow in each entry, by acquired each entry packet transaction at multiple states Machine, and build the selection mechanism to state machine.Wherein, each state machine realizes corresponding network work(according to each entry in grouping It can module.The development system can be used state machine pattern and optimize processing to corresponding entry, such as according in each grouping State machine pattern, the behavior tree state machine etc. that conversion logic structure expressed by the context of multiple entries is layered.
Development approach provided herein turns the prediction rule of acquisition and operation rules according to any of the above-described kind of mode It changes the program documentaion described by program language into and preserves the mode at program file, solve research staff according to program language Logic carry out network function exploitation it is strong coupling caused by not easy exploiting, maintenance, upgrading the problems such as.
Referring to Fig. 6, it is shown as the configuration diagram of the development system of the application network function in one embodiment. The development system 21 includes interactive module 211 and processing module 212.
The interactive module 211 is used to obtain for realizing the prediction rule of network function and corresponding from a data source Operation rules.Wherein, the data source includes the source file or tables of data for Storage Estimation rule and operation rules.For example, Data source includes but not limited to database or document storage server.The interactive module 211 is stored from such as database or file The data sources such as server obtain the prediction rule preserved according to preset description rule and corresponding operation rules.
The data source further includes the editing machine for showing and editing prediction rule and operation rules.In a specific example In, the editing machine as the part in development system and include software in computer equipment where the development system and Hardware.For example, the editing machine includes display unit, processing unit and storage unit.Interactive module 211 is provided from editing machine Editing interface obtain prediction rule for realizing network function and corresponding operation rules.Wherein, research staff passes through Prediction rule and corresponding operation rules described in operational design on editing interface.The interactive module 211 is also based on grinding Import operation of the hair personnel on editing interface will be imported comprising the source file of the prediction rule and corresponding operation rules Editing machine obtains institute so that research staff updates the prediction rule and operation rules that have created, and in the edited State prediction rule and corresponding operation rules.
Research staff can according to the development system provide format by prediction rule and operation rules editor and preserve at File is stored in the data source.The interactive module 211 obtains the prediction rule from the data source and operation is advised Then.Wherein, the format edited includes at least one of text, table and digraph.
In some embodiments, the interactive module 211 can obtain text, table and the digraph that data source is provided In any source file.For example, referring to Fig. 3, it is shown as showing comprising the text of prediction rule and corresponding operation rules It is intended to.Wherein, research staff is in editing machine or text writing software, according to preset initialization text block (Basic Types and expression), prediction rule text block (Predicates), operation rules text block (Policies) and turn The text formatting of logic text block (Model) is changed, developing network function is simultaneously preserved into text file, and the interactive module 211 is certainly Data source obtains the text file.For another example, referring to Fig. 4, it is shown as including prediction rule and corresponding operation rules Table schematic diagram.Wherein, research staff is in editing machine or table-form making software, according to allocation list column (Configuration), prediction rule table column (Match), operation rules table column (Action) are compiled developing network function and are preserved At form document, the development system obtains the form document from data source.For another example, referring to Fig. 5, it is shown as comprising pre- Gauge then with the digraph schematic diagram of corresponding operation rules.Wherein, research staff passes through in editing machine or mapping software Routing diagram, fire wall diagram and the speed limiting device diagram provided in selectionbar carries out digraph attended operation, wherein according to Each attribute field provided in diagram fills in corresponding description original state, prediction rule, operation rules etc., the development system The digraph combination with attribute information and connection relation is obtained from data source.
In other embodiments, the interactive module 211 obtains the prediction according to preset format editor from editing machine Regular and corresponding operation rules.For example, operation of the interactive module 211 according to research staff, it will in the manner previously described When any source file generated imports editing machine and edits and preserve again, each rule edited in editing machine is obtained.
Here, the network function includes but not limited to following at least one:Firewall functionality, speed limiting function, load are equal Weigh function, key message filtering function, customization network function and other network functions etc. generated based on NFV.
The description of edited prediction rule, operation rules and state, the interactive mould are selected for the ease of research staff The data bank such as sentence, symbol, the operator of auxiliary regular description are preset in block 211.Wherein, the sentence provided includes but not It is limited to:Forward sentence, match statement, configure sentence, delay operation sentence, resubmit sentence etc., for example, the language of delay operation Sentence is timer (Δ t), wherein Δ t is editable parameter.The symbol provided includes but not limited to:Asterisk wildcard, arbitrary word Symbol, batch processing symbol etc., for example, utilizing * symbolic indication asterisk wildcards.The operator provided includes but not limited to:Mathematical operation Symbol, logic connective etc., for example, utilizing ^ symbolic indication logical ANDs.
Here, the constraints that the prediction rule is arranged for being described as realization network function.For example, to realize net The forbid Data flow function that forwarding includes blacklist IP address, the prediction rule in network function include judging IP in data flow Whether address belongs to the rule etc. of preset blacklist IP address list.For another example, the rate limit work(to realize in network function Can, the prediction rule include judge data flow length whether the rule within preset length.For another example, it is realization network work( The transport protocol statistical function of data flow in energy, the prediction rule include the rule for the protocol type for judging data flow.
The prediction rule includes the prediction rule to data flow, is used to define received data stream and meets/be not inconsistent Close the condition of network function.The prediction rule to data flow includes the prediction of at least one feature locations in Data Flow Oriented Rule.Wherein, the feature locations include can predetermined character or byte location in data flow.In a specific example, The feature locations include according to protocol specification be arranged in data flow packet header and packet tail in each character or byte location.Wherein, The protocol specification includes international agreement specification for network transmission, national protocol specification and proprietary protocol specification etc..Example Such as, the feature locations include but not limited to:Ethernet information, IP address, port, protocol type, check information, flag Deng.The wherein described flag citing includes TTL (Time To Live lifetime values) etc..Accordingly, the prediction rule is used In description according to network function the rule of matching characteristic position.The feature locations further include that cannot be predefined in data flow Character or byte location, in a specific example, prediction rule is described carries out matched rule to data content in data flow Then, accordingly, the feature locations include the character or byte location being matched in a stream according to the prediction rule.Example Such as, preset rules include the rule for the bytes match predetermined keyword chosen in data flow;Accordingly, the feature locations are According to the prediction rule it is currently selected during ergodic data stream in byte location.
In addition, the prediction rule further includes the prediction rule with the relevant state of the network function.Wherein, the shape State is included in the variable information for the when of realizing a complicated network function multiple prediction rule being executed with same data flow, and/or The shared variable information of each data flow when realizing the network function of multiple data flows.The state includes but not limited to:Token Information, the source address of data flow and destination address list, clocking information, count information etc..The original state of the state can be Default conditions, for example, assert that the initial value of statistical counting is 0.The original state can also be obtained from the data source, example Such as, the initialization text block or allocation list column that the interactive module 211 is provided according to editing machine obtain original state.It is described pre- Gauge is then used to define the condition for including state.For example, the prediction rule includes:The temporal information provided based on timer And data flow is transmitted in limited time and does not transmit the rule of data flow in limited time.For another example, the prediction rule includes:Received data stream Meet and do not meet the rule of default token information.For another example, the prediction rule includes:The source address of received data stream accords with Close and do not meet the rule for the destination address list being maintained.
Here, the operation that the operation rules is used to describe to execute needed for the NF modules in the case where meeting corresponding prediction rule. Each prediction rule and corresponding operation rules may include one or more items as an entry in one network function Mesh.Can only include a prediction rule and corresponding one or more in each entry according to the design needs of network function Operation rules;Alternatively, comprising multiple prediction rules and meeting all prediction rules and need to execute one or more in each entry A operation rules.For example, in the function of filtering data flow using blacklist IP address, prediction rule is to received data Stream meets the rule of IP address in blacklist, and corresponding operation rules is to abandon respective stream of data.For another example, table 1 is please referred to, Be shown as realizing in speed limiting device function prediction rule and corresponding operation rules, wherein the pre- gauge in table 1 Then (Match) includes to the prediction rule table column (flow) of data flow and the prediction rule table column (state) of state, operation rules (Action) include operation rules table column (flow) and state to data flow operation rules table column (state).
Table 1
By the type of operation rules described in table 1, operation rules provided herein includes the behaviour to data flow Make rule.The operation rules to data flow includes following at least one:To data flow executive editor, forwarding, abandons or prolong When the operation rules that handles, the operation rules resubmited is executed to data flow.
The operation rules further includes the operation rules with the relevant state of the network function.Such operation rules includes But it is not limited to:The operation rules of Dynamic Maintenance state changes the operation rules of state.
By taking table 1 as an example, the prediction rule of first entry is to meet response traffic f [BR]=REF, corresponding operation in table Rule includes delay process f [output]:=timer (Δ t) rules and addition token information tkn:=token;Second in table The prediction rule of entry includes meeting response traffic f [BR]=REF and data flow length less than or equal to token information f [size] ≤ tkn, corresponding operation rules include transmitting data flow f [output]:=IFACE and modification token information tkn:=tkn-f [size];The prediction rule of third entry includes meeting response traffic f [BR]=REF and data flow length more than token in table Information f [size]>Tkn, corresponding operation rules include abandoning data flow f [output]:=∈.
The prediction rule being shown as in firewall functionality by taking table 2 as an example and corresponding operation rules.Wherein, first Prediction rule in entry is that data flow meets configured list (f ∈ OK), and corresponding operation rules includes transmitting data flow f [output]:=the IFACE and address table seen for safeguarding the data flow forwarded:=seen ∪ { f };Pre- gauge in second entry Then belong to safeguarded address table f ∈ seen including data flow, corresponding operation rules is transmitting data flow f [output]:= IFACE;Prediction rule includes that data flow is not belonging to safeguarded address table in second entryCorresponding operation rules To abandon data flow f [output]:=∈.
Table 2
In order to simplify the repeated description of prediction rule, in above-mentioned example with some symbols (such as *) indicate in previous entry The prediction rule or operation rules that corresponding table column mutually repeats are indicated with other symbols (such as -) without considering in respective table column Prediction rule or respective table column are without executable operation.Above-mentioned asterisk wildcard is only for example, rather than the limitation to the application.
After the interactive module 211 obtains the entry comprising prediction rule and corresponding operation rules, processing module 212 are preserved acquired prediction rule and its operation rules according to preset description rule.Wherein, the description rule For describing in hierarchical relationship in same entry between multiple prediction rules, same entry between multiple operation operation rules Execute the correspondence etc. of prediction rule and operation rules in sequence and same entry.For example, the description rule include but It is not limited to table column form and table column content, the paragraph format of text and textual annotation, the picture and text description of digraph and the company of table Connect sequence etc..
In some embodiments, processing module 212 according to the description rule by acquired prediction rule and its behaviour Make rule to preserve into the source file that can be multiplexed editor by editing machine.For example, it includes prediction rule and its operation to be obtained from database The data object list of rule, the processing module 212 is using each data object in data object list as entry, according to table The table column form of lattice corresponds to acquired each data object in the table column for indicating an entry in write-in table, and according to institute The sequence of data object in the data object list of acquisition, each data object is sequentially written in table, thus obtains to be compiled Collect the source file of device multiplexing editor.For another example, the text comprising prediction rule and its operation rules is obtained from document storage server File, the processing module 212 is according to the description rule in the text file, by prediction rule in text file and its operation Rule is preserved with the description order of each entry of entry Reconfiguration of form into the source file that can be multiplexed editor by editing machine.For another example, certainly Editing machine obtains the textual form (or digraph form or form) comprising prediction rule and its operation rules, the place Module 212 is managed according to the description rule in the textual form (or digraph form or form), by textual form (or Digraph form or form) it preserves into the source file that can be multiplexed editor by editing machine.
Acquired prediction rule and corresponding operation rules according to network function be grouped into multiple text fragments (or The digraph form of multiple independent forms or multiple connectionless relationships), the processing module 212 is retouched according to preset It states rule the prediction rule of each grouping and corresponding operation rules are engaged togather.Wherein, the preset description rule Including but not limited to:The rule that the information such as original state in each grouping are uniformly processed, and/or the change according to each grouping Amount title reconstructs the rule of each variable.For example, the variable comprising same names and different definition in different grouping, according to preset The definition of each variable is carried out Hash processing by description rule, then by its dependent variable in Hash treated variable and each grouping Uniformly be arranged to header, then by each grouping prediction rule and operation rules carry out linking processing, obtain including the head The source file of multiple entries after information and linking.
In other embodiments, the step S120 includes:According to the conversion logic expressed by the description rule, The prediction rule and operation rules are handled, to obtain the program file described by program language.In other words, the place The entry that obtained source file, editing machine can also be edited of reason module 212 and original state or according to description rule The text file (or form document or oriented map file) of described prediction rule and its operation rules, is converted by program The program file of language description.Wherein, described program language is represented by Domain Specific Language or programming language, for example, described Program language is C language, C Plus Plus .NET language or DSL etc., or is the interpretable type language such as JAVA, Python.
In some instances, the processing module 212 obtains initial state information, is advised according to the description of original state Then, original state is converted to the program statement of variable-definition.For example, acquired original state is:Config:DENY= { r1, r2 }, the corresponding C Plus Plus that is converted into are:
In other examples, the processing module 212 obtains initial state information, and the conversion of description rule expression is patrolled It collects and is:Prediction rule is the condition in conditional statement, and operation rules is the action executed under corresponding conditions, by acquired prediction Regular and corresponding operation rules is converted to the condition-execution sentence described with program language.For example, acquired pre- gauge Then be f [TTL]==0, corresponding operation rules be f [output]:=∈ is converted into C++ languages then according to above-mentioned conversion logic Yan Wei:If (TTL==0) { f [output]=DROP;}.For another example, prediction rule is f [BR]=INIT, corresponding operation rule It is then f [TTL] --, f [BR]=X, f [output]=resubmit, then according to description rule described in prediction rule, to f The conversion logic of [BR] initialization, above-mentioned prediction rule and operation rules, which are converted into C Plus Plus, is:If (f [BR]== INIT){f[TTL]--;F [BR]=X;F [output]=RESUBMIT;}
Operation (such as resubmit or timer (*)), a complete network work(are resubmited using in operation rules It can one by one be executed and be realized by multiple entries.In other example, the processing module 212 can be according to the conversion logic It is one by one conditional statement by the prediction rule processing in each entry, is the conditional statement by corresponding operation rules processing Under action statement.For example, acquired multiple entries are as shown in table 3:
Table 3
Match Action
F [BR]=INIT F [TTL] --, f [BR]=X, f [output]=resubmit
F [BR]=X ∧ f [TTL]==0 F [output]=∈
F [BR]=X ∧ f [TTL] ≠ 0 F [output]=IFACE
It is as follows to be converted into C Plus Plus by the conversion logic provided according to table for table:
In order to simplify the program file described by program language, in other example, the processing module 212 is not only pressed It is handled according to the conversion logic of prediction rule and operation rules in each entry, expressed by the context according further to multiple entries Conversion logic the sentence of multiple entries is optimized into processing.Wherein, the conversion logic expressed by the context of multiple entries It is including but not limited to following at least one:1) conversion logic of multiple entries of determination according to asterisk wildcard, for example, according to current Asterisk wildcard * in entry and determine in current predictive rule comprising corresponding prediction rule in previous entry;2) according to multiple Whether prediction rule has the conversion logic of alternative and multiple entries of determination in mesh, for example, according to pre- in two entries Gauge then in separately include f ∈ OK andDetermine that two entries have alternative;3) based on same state and determination The conversion logic of multiple entries, for example, original state is OK ∈ { r1, r2 ... }, the prediction rule in an entry includes f ∈ OK, the operation rules in another entry includes OK:=OK ∪ { f } determine phase according to transfers of the state OK in multiple entries Answer the conversion logic of multiple entries.Above-mentioned each conversion logic can be combined according to the entry of actual design network function, herein Will not enumerate, technical staff can improve according to the conversion logic expressed by above-mentioned context, be superimposed, delete obtained from Conversion logic should be considered as based on the specific example under present techniques thought.
Include in such a way that identified conversion logic optimizes processing to the sentence of multiple entries:According to multiple Multiple entries are sequentially handled, fusion treatment, are skipped at processing and rearrangement by the conversion logic expressed by purpose context At least one of reason.
Wherein, the sequentially processing citing includes that each entry is converted to condition 1- operation 1- conditions 2- according to Entry order The program statement of operation 2.For example, table 3 provides two entries with alternative, respectively:Including prediction rule f [BR]= X ∧ f [TTL]==0 second entry, and the third entry including prediction rule f [BR]=X ∧ f [TTL] ≠ 0 just have mutual exclusion Property, then corresponding conversion is at C++ sentences:
If (f [BR]==X&&TTL==0) { f [output]=DROP;}
Else if (f [BR]==X&&TTL!=0) { f [output]=PASS;}
The fusion treatment includes but not limited to following at least one:The entry of redundancy is merged, utilizes loop body Multiple entries are iterated the fusion treatment of formula or the program statement of multiple condition-operations is subjected to nested type processing, are utilized Multiple states are carried out fusion treatment etc. by the relationship of abstract-example.For example, according to<Sip, dip, sport, dport, proto> Granularity will comprising varigrained state carry out Hash handle to obtain the object represented by cryptographic Hash, by each prediction rule And the state in operation rules as the example of object to effectively prevent the bug patch between different conditions.For another example, according to multiple To the modification operation rules of state and based on the prediction rule of state in entry, processing module 212 is according to loop body to each entry The fusion treatment being iterated.For example, please refer to table 4, be shown as acquired in processing module 212 for realizing traffic monitoring The prediction rule f ∈ NET and operation rules pass and cnt++ and original state NET={ sip of device:INTRTNEL_NET}
Table 4
Then processing module 212 is converted into C Plus Plus and indicates as follows:
It is described to skip processing and include but not limited to:Invalid entry is deleted, according to operation rules not according to entry The operation processing etc. that sequence executes.For example, including out-of-order, layer between several entries and other entries in continuous multiple entries The incidence relations such as grade, then processing module 212 skip the entry of onrelevant, and according to the context of relevant entry by associated entry It is converted into the usability of program fragments described by program language.
The rearrangement is handled:Each entry is arranged again according to the prediction rule to data flow Sequence is to build the thread etc. that can be executed parallel.For example, being grouped each entry according to the different prediction rules to data flow, and build each Thus communication thread between grouping improves the data processing performance of NF.
It should be noted that above-mentioned each example only symbolically describes the conversion expressed by the context according to multiple entries Logic optimizes multiple entries the mode of processing, rather than the restricted description to optimization processing.In fact, according to acquired Prediction rule and corresponding operation rules and each entry between context relation relationship, processing module 212 is combinable Sequentially processing, fusion treatment, skip processing, rearrangement processing etc. means the conversion expressed by each entry is patrolled with more simplifying Volume be processed into the program file of program language description, to effectively reduce because program language it is strong coupling due to cause it is excellent in program Redundancy program is generated during change.
Further include in such a way that identified conversion logic optimizes processing to the sentence of multiple entries:According to multiple Conversion logic expressed by the context of entry is by each entry process at state machine;In order to optimize ergodic condition-in program language The efficiency of action statement, the processing module 212 can also describe state machine and the selection machine to state machine using program language System.For example, according to the different prediction rules to data flow in each entry, by acquired each entry packet transaction at multiple shapes State machine, and build the selection mechanism to state machine.Wherein, each state machine realizes corresponding network according to each entry in grouping Function module.The processing module 212 can be used state machine pattern and optimize processing to corresponding entry, such as according to each point State machine pattern, the behavior tree state machine etc. that conversion logic structure in group expressed by the context of multiple entries is layered.
Since the program of existing network function virtualization is constrained by running environment, it, need to be according in functional development Used hardware and software environment carries out program development when operation, this make in network function function realize and running environment without Method is effectively decoupled conjunction.The program operation which has limited network function virtualizations under different running environment.To such end it is known that way It is to configure corresponding network function program for each running environment, i.e., the program library provided according to different running environment is to same A kind of network function carries out multiplicating exploitation.
Obviously, aforesaid way be redundancy for research staff, it is inefficient.For this purpose, the application provides a kind of compiling Method, the program file preserved according to development approach provided herein is compiled processing, obtaining can be The software program run under default running environment.That is, described program file is to be used to execute prediction rule and behaviour according to preset The conversion logic for making rule carries out the prediction rule and operation rules obtained from program language processing.Alternatively, the application The Compilation Method provided is carried out obtained by can be used for be developed using other manner for realizing the program file of network function Process of compilation obtains the software program that can be run under default running environment.By taking the program file of C Plus Plus description as an example, Acquired program file is the program file of suffix .cpp, the software program that can be run in running environment obtained after compiling For the software program of suffix .exe.
Referring to Fig. 7, it is shown as a kind of flow chart of Compilation Method of the application.The Compilation Method is mainly by compiling System executes.Wherein, the compiling system includes the software and hardware of installation on a computing device.The computer equipment It can share or be separately configured with computer equipment where development system.At least one running environment is preset in the compiling system Program library.The compiling system is compiled the acquired program file for only describing network function by executing following steps At the software program that can be run under a kind of running environment wherein.Wherein, the running environment includes software runtime environment and hard Part running environment.The software runtime environment includes but not limited to operating system or virtual machine;The hardware running environment includes But be not limited to processor etc..
Wherein, the computer equipment includes storage unit, processing unit and interface unit.Here, the storage unit, The hardware configuration of processing unit and interface unit can be same or similar with computer equipment where aforementioned development system, herein no longer It is described in detail.The difference is that the storage unit in computer equipment where the compiling system is stored with for executing the volume The program of method and the program library of corresponding at least one running environment are translated, processing unit is by executing described program by program text Part and the program library of one of which running environment are combined, and obtain the software program that can be run under corresponding running environment.
In step S210, the program file for realizing network function is obtained.Here, described program file can be by compiling The input interface that system is provided, which imports, to be obtained, for example, being obtained from a file server or local storage unit.Described program File can also be obtained from the editing machine of program file.For example, described program file is carried by the editing machine in above-mentioned development approach The compiling button in editing machine is clicked for, research staff, and development system is by the original state edited in the editing machine, pre- gauge It is then converted into program file with operation rules, and described program file is supplied to the compiling system.When the compiling system When presetting a kind of running environment, processing can be compiled to acquired program file by executing step S230.
When the compiling system includes a variety of running environment, the Compilation Method further includes step S220.
In step S220, the running environment information is obtained from a data source.Here, to be different from institute in development approach Data source mentioned in the development approach is known as the first data source, is carried in the Compilation Method by the data source of description And data source be known as the second data source.First data source can also be same data source with the second data source;Also may be used To adhere to different data sources separately.The running environment information can show user by multiple individual running environment options, or by User is showed by the running environment option of multiple packet configurations.The step S220 includes being carried based on second data source The step of running environment option of confession determines corresponding running environment information.
For example, referring to Fig. 8, its signal for being shown as showing a kind of embodiment of running environment option on editing machine Figure.Wherein, second data source is an editing machine, and available fortune in each classification is shown according to software and hardware classification Row environment option, user choose each running environment option of corresponding software, and each running environment option of corresponding hardware respectively And submit to compiling system.The compiling system obtains corresponding running environment information from the editing machine.Operation is being determined After environmental information, step S230 is executed.
For another example, referring to Fig. 9, it is shown as the another embodiment of the running environment option shown on editing machine Schematic diagram.Second data source is an editing machine, and grouping running environment choosing is provided according to the software and hardware of packet configuration , user is by choosing respective packets and submitting to compiling system.The compiling system obtains corresponding fortune from the editing machine Row environmental information.After running environment information is determined, step S230 is executed.
In step S230, the running environment information of the network module based on described program file to be run, by the journey Preface part is compiled into the software program that can be executed under corresponding running environment.
Here, being pre-configured with the program library and compiling core of corresponding identified running environment information, compiling in compiling system System by by described program file add configuration file, adaptedly change program file and based on determine running environment believe Breath executes at least one of order line, is pre-processed to program file and corresponding compiling core is called to be compiled processing, Obtain the software program that can be executed by the network equipment configured with corresponding running environment.
In some embodiments, the volume configured based on each running environment information option is preset in the compiling system Device is translated, compiling system is according to identified running environment information configuration translation and compiling environment;And selection and deployment has the running environment Compiler, described program file is compiled and obtains corresponding software program.In a specific example, the compiling system System is that program file configures configuration file according to identified running environment information, for example, the compiling system is according to operation ring Border information adds the command line parameter etc. used in the compiler that need to start and compiler operation in configuration file, and presses Corresponding compiler is called to be compiled operation to described program file according to configuration file.Wherein, the compiler is built-in with base Program library corresponding to running environment carries out pretreated function to program file so that the function in program file and operation Environment mutually couples.For example, the routine interface of routine interface and network function in the preconfigured program library of compiler It should be related to, the routine interface in program file is connected to the corresponding program interface in program library according to the correspondence, by This is adjusted program file by more optimized program in program library.For another example, the compiler is according in configuration file Configuration information adds the program of specified hardware (such as given processor) operation in program file, and will according to specified hardware Program file is compiled into software program.
In other embodiments, the step S230 includes the following steps:Believe according to the preset running environment Breath, described program file is pre-processed;And be compiled into pretreated program file can be under corresponding running environment The software program of execution.
Here, the compiling system can be corresponding to multiple compilers for providing of preset supplier and each compiler program Library determines corresponding compiler according to acquired running environment information, and according to the identifiable program statement of corresponding compiler Described program file is pre-processed.Wherein, the pretreatment includes but not limited to following at least one:According to preset institute Running environment information is stated, is increased in described program file, operation is deleted or modified.In some instances, the compiling System is implanted into according to the parameter construction procedures segment in running environment information in described program file.For example, the compiling system System adds the sentence that program is executed using GPU according to the GPU parameters in running environment information in program file.Other In example, program library that the compiling system is provided according to corresponding compiler increases described program file, delete and At least one of modification operation.For example, the compiling system presets each program file in the program library corresponding to each compiler It, will according to the correspondence with the correspondence between each program file in the program library cited in acquired program file Header file, interface document in acquired program file etc. are replaced, integrate.
Then, pretreated program file is transferred to identified compiler to be compiled by the compiling system, is obtained The software program that can be executed under corresponding running environment.
The network that the software program obtained according to herein described Compilation Method can directly be configured to corresponding running environment is set Standby upper operation, greatly reduces overlapping development network function of the research staff based on running environment.
Referring to Fig. 10, it is shown as the configuration diagram of the compiling system of the application in one embodiment.The volume It includes interactive module 311 and process of compilation module 312 to translate system 31.
The interactive module 311 is used to obtain the program file for realizing network function.Here, described program file can It is imported and is obtained by the input interface that compiling system 31 is provided, for example, being obtained from a file server or local storage unit. Described program file can also be obtained from the editing machine of program file.For example, described program file is by above-mentioned development approach Editing machine provides, and research staff clicks the compiling button in editing machine, the initial shape that development system will be edited in the editing machine State, prediction rule and operation rules are converted into program file, and described program file is supplied to the interactive module 311.When When the interactive module 311 presets a kind of running environment, can start process of compilation module 312 come to acquired program file into Row process of compilation.
When the compiling system 31 includes a variety of running environment, the interactive module 311 is additionally operable to obtain from a data source Take the running environment information.Here, to be different from the data source described in development system, will be carried in the development system And data source be known as the first data source, the data source mentioned in the compiling system 31 be known as the second data source.It is described First data source can also be same data source with the second data source;Different data sources can also be adhered to separately.Wherein, second number Can be the part in compiling system 31 according to source.The running environment information can be shown by multiple individual running environment options User is showed to user, or by the running environment option of multiple packet configurations.The interactive module 311 is based on described second The step of running environment option that data source is provided determines corresponding running environment information.
For example, referring to Fig. 8, its signal for being shown as showing a kind of embodiment of running environment option on editing machine Figure.Wherein, second data source is an editing machine, and available fortune in each classification is shown according to software and hardware classification Row environment option, user choose each running environment option of corresponding software, and each running environment option of corresponding hardware respectively And submit to compiling system 31.The compiling system 31 obtains corresponding running environment information from the editing machine.It is determining After running environment information, start process of compilation module 312.
For another example, referring to Fig. 9, it is shown as the another embodiment of the running environment option shown on editing machine Schematic diagram.Second data source is an editing machine, and grouping running environment choosing is provided according to the software and hardware of packet configuration , user is by choosing respective packets and submitting to compiling system 31.The compiling system 31 obtains corresponding from the editing machine Running environment information.After running environment information is determined, start process of compilation module 312.
Running environment of the process of compilation module 312 for the network module based on described program file to be run is believed Described program file, is compiled into the software program that can be executed under corresponding running environment by breath.
Here, being pre-configured with program library and the compiling of corresponding identified running environment information in process of compilation module 312 Core, process of compilation module 312 for described program file by adding configuration file, adaptedly changing program file and being based on institute It determines that running environment information executes at least one of order line, program file is pre-processed and calls corresponding compiling core It is compiled processing, obtains the software program that can be executed by the network equipment configured with corresponding running environment.
In some embodiments, be preset in the process of compilation module 312 based on each running environment information option and The compiler of configuration, process of compilation module 312 is according to identified running environment information configuration translation and compiling environment;And selection and deployment The compiler for having the running environment is compiled described program file and obtains corresponding software program.Specifically show one In example, the process of compilation module 312 is program file configuration configuration file according to identified running environment information, for example, The process of compilation module 312 adds the compiler and compiler that need to start according to running environment information in configuration file The used command line parameter etc. of operation, and call corresponding compiler to be compiled described program file according to configuration file Operation.Wherein, the compiler is built-in with carries out pretreated work(based on the program library corresponding to running environment to program file It can so that the function in program file is mutually coupled with running environment.For example, the journey in the preconfigured program library of compiler The routine interface of sequence interface and network function should be related to, connect the routine interface in program file according to the correspondence To the corresponding program interface in program library, thus program file is adjusted by more optimized program in program library.For another example, The compiler adds specified hardware (such as given processor) operation according to the configuration information in configuration file in program file Program, and program file is compiled into software program according to specified hardware.
In other embodiments, the process of compilation module 312, will according further to the preset running environment information Described program file is pre-processed;And pretreated program file is compiled into and can be executed under corresponding running environment Software program.
Here, the process of compilation module 312 can multiple compilers for providing of preset supplier and each compiler institute it is right The program library answered determines corresponding compiler according to acquired running environment information, and identifiable according to corresponding compiler Program statement pre-processes described program file.Wherein, the pretreatment includes but not limited to following at least one:According to The preset running environment information, is increased in described program file, operation is deleted or modified.In some instances, The process of compilation module 312 is implanted into according to the parameter construction procedures segment in running environment information in described program file. For example, the process of compilation module 312 according to the GPU parameters in running environment information, is added in program file and is held using GPU The sentence of line program.In other example, program library pair that the process of compilation module 312 is provided according to corresponding compiler Described program file is increased, deleted and is changed at least one of operation.For example, the process of compilation module 312 is default Each program file and each program text in the program library cited in acquired program file in program library corresponding to each compiler Correspondence between part, according to the correspondence by progress such as header file, interface documents in acquired program file Replace, integrate etc..
Then, pretreated program file is transferred to identified compiler to compile by the process of compilation module 312 It translates, obtains the software program that can be executed under corresponding running environment.
The application also provides a kind of development approach, will come from prediction rule and the corresponding operation rule of data source Then, original state etc. carries out program file processing and compiling according to the conversion logic expressed by description rule, and obtaining can be specified The software program executed under running environment.
1 is please referred to Fig.1, the flow chart of development approach in one embodiment is shown as.The development approach is by developing System executes.The development system includes the software and hardware of computer equipment.The structure of the computer equipment can be with Fig. 1 Shown in structure and its description it is same or similar, this will not be detailed here.
In step S310, obtains from a data source and advised for realizing the prediction rule of network function and corresponding operation Then;Wherein, the prediction rule includes to the prediction rule of data flow, and/or pre- with the relevant state of the network function Gauge then, the operation rules include to the operation rules of the data flow, and/or with the relevant state of the network function Operation rules.
It should be noted that the concrete mode performed by step S310 is identical as the implementation procedure in step S110 in Fig. 2 Or it is similar, this will not be detailed here.
In step s 320, according to the conversion logic expressed by preset description rule, by the prediction rule and operation Rule is handled, to obtain the program file described by program language.
It should be noted that by the prediction rule in step S120 in concrete mode and Fig. 2 performed by step S320 The implementation procedure handled with operation rules is same or similar, and this will not be detailed here.
In step S330, described program file is compiled into the software journey that can be executed under the running environment of pre-determining Sequence.Wherein, in one embodiment, described program file is described by interpreted languages, wherein the interpreted languages include But it is not limited to:Python, JavaScript, Perl etc..In a specific example, the development system can be based on explaining the journey A variety of running environment that the interpreter of preface part is supported, described program file is compiled into can be by the operation of different running environment When the software program that identifies.In another specific example, described program file is stored in the network equipment configured with interpreter In, when running described program file, it is construed as to be provided in the network equipment by network equipment instruction interpreter Running environment under the software program that is executed.
In another embodiment, the step S320 can be obtained by the step S220 shown in Fig. 7 modes provided To software program.This will not be detailed here.
2 are please referred to Fig.1, a kind of configuration diagram of development system is shown as.The development system 41 includes:Interaction mould Block 411, processing module 412 and collector 413.
The interactive module 411 obtains prediction rule and the corresponding operation for realizing network function from a data source Rule;Wherein, the prediction rule include to the prediction rule of data flow, and/or with the relevant state of the network function Prediction rule, the operation rules include to the operation rules of the data flow, and/or with the relevant state of the network function Operation rules.
It should be noted that holding in interactive module 211 in concrete mode and Fig. 6 performed by the interactive module 411 Row process is same or similar, and this will not be detailed here.
Processing module 412 is used for according to the conversion logic expressed by preset description rule, by the prediction rule and behaviour It is handled as rule, to obtain the program file described by program language.
It should be noted that will be described pre- in processing module 212 in concrete mode and Fig. 6 performed by processing module 412 The implementation procedure that gauge is then handled with operation rules is same or similar, and this will not be detailed here.
Collector 413 is used to described program file being compiled into the software journey that can be executed under the running environment of pre-determining Sequence.Wherein, in one embodiment, described program file is described by interpreted languages, wherein the interpreted languages include But it is not limited to:Python, JavaScript, Perl etc..In a specific example, the collector 413 can be based on explaining institute A variety of running environment that the interpreter of program file is supported are stated, described program file is compiled into can be by different running environment The software program identified when operation.In another specific example, described program file is stored in the network configured with interpreter In equipment, when running described program file, being construed as by network equipment instruction interpreter can be in the network equipment institute The software program executed under the running environment of offer.
In another embodiment, the collector 413 can be carried by process of compilation module 312 shown in Fig. 10 The mode of confession obtains software program.This will not be detailed here.
3 are please referred to Fig.1, the various texts generated by the development plan operation editing machine described in Figure 11 and Figure 12 are shown as The implementation procedure of the schematic diagram of part, development approach provided by the present application is exemplified below:
Editing machine in development system provides an editing interface, toolbar is may include in editing interface, to provide packet Further include master editor column in editing interface containing graph text informations such as prediction rule, operation rules, description rule, original states, uses To show prediction rule, operation rules, description rule, original state etc. that research staff is inputted, and, in editor circle The A1 and source file import option A2 that saves options of source file is also provided on face.For example, research staff uses in master editor column Textual form input respectively configuration the character block of original state, the character block of prediction rule, operation rules character block and be used for The character block for describing the description rule of correspondence between prediction rule and operation rules, when the A1 that monitors to save options is selected Operation when, acquired character block is preserved into text file by development system successively.When the guiding according to import option A2 to When editing machine imports source file, show the character block in source file so that research staff edits successively in master editor column.
The conversion options A3 of program file is also provided on the editing interface.When monitoring that conversion options A3 is selected When operation, development system configures each original state according to the character block of original state, and according to description rule to prediction rule It is handled with operation rules to obtain the program file described by program language.For example, development system will be based on data flow not One-size and the original state concentration that is arranged is converted into being based on the matched object of Hash, and described using object-way of example In prediction rule and operation rules with the relevant part of state, and based on the conversion logic expressed by description rule to prediction rule Processing etc. is handled and redirects with operation rules progress successively processing, fusion treatment, rearrangement, to obtain being described with program language The usability of program fragments of communication control thread, the usability of program fragments of network function, be introduced into and execute specific logic in network function and execute institute The header file usability of program fragments etc. needed, and obtained program is preserved into program file.
The compiling option A4 of program file is also provided on the editing interface.When monitoring that compiling option A4 is selected When operation, the editing interface also provides the selection interface of running environment option, the operation provided according to the selection interface Environment option, development system pre-process program file, then pretreated program file is transferred to based on running environment Compiler determined by option, and processing is compiled to program file and obtains to hold in the network equipment of corresponding running environment Capable software program.For example, being preset with multiple compilers of corresponding running environment option and multiple program libraries in development system, press According to the hardware parameter in acquired running environment option, generates and execute command line parameter to be added in described program file The sentence of software program is executed according to command line parameter;And according to the running software ring in acquired running environment option Border information and corresponding program library, the processing such as header in program file is modified, is added;It again will treated program File transfers to corresponding compiler to be compiled, and obtains the software program that can be executed under corresponding running environment.
It should be noted that the above process is only for example rather than the limitation to the application, in fact, being illustrated according to aforementioned Various exemplary combinations, can build but be not limited to build network function development plan below:Table is inputted in master editor column Case form, the prediction rule of digraph form and operation rules;The information such as each rule, the state edited in master editor column are protected It is saved as being different from the source file of institute's display form in formula bar;The program text that source file is converted into being described by interpreted languages Part;Program file is directly configured on the network equipment comprising interpreter, by when network equipment operation described program file pairs Network function is explained and is executed.It can be seen that being designed specific based on exploitation provided herein and compiling thought Technical solution can also be enumerated several, not be described in detail one by one herein.
4 are please referred to Fig.1, the structural schematic diagram of one embodiment of computer equipment of the application is shown as.As shown, this The computer equipment 5 that embodiment provides mainly including memory 51, one or more processors 52 and is stored in the storage One or more of device 51 program, wherein the storage of memory 51 executes instruction, when computer equipment 5 is run, processor 52 It is communicated between memory 51.
Wherein, one or more of programs are stored in the memory and are configured as by one or more of Processor executes instruction, one or more of processors execute described in execute instruction so that the electronic equipment execute it is above-mentioned The development approach of network function, the i.e. processor 52 execute instruction so that computer equipment 5 executes side as shown in Figure 1 Method thereby come the network function of flexible configuration complexity and can improve development efficiency by way of Development of Modular.
It should be understood that in the various embodiments of the application, size of the sequence numbers of the above procedures is not meant to execute suitable The execution sequence of the priority of sequence, each process should be determined by its function and internal logic, the implementation without coping with the embodiment of the present application Process constitutes any restriction.
Those of ordinary skill in the art may realize that lists described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, depends on the specific application and design constraint of technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed Scope of the present application.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.
The application provide again it is a kind of it is computer-readable write storage medium, be stored thereon with the calculating developed for network function Machine program, described be stored with when the computer program developed for network function is executed by processor realize that above-mentioned network function is opened The step of forwarding method, i.e., described in Fig. 1 the step of.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer read/write memory medium.Based on this understanding, the technical solution of the application is substantially in other words The part of the part that contributes to existing technology or the technical solution can be expressed in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be People's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of step.
In embodiment provided by the present application, the computer-readable storage medium of writing may include read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), EEPROM, CD-ROM Or it other optical disk storage apparatus, disk storage device or other magnetic storage apparatus, flash memory, USB flash disk, mobile hard disk or can use In desired program code of the storage with instruction or data structure form and can be by computer into any other of line access Medium.In addition, any connection can be properly termed as computer-readable medium.For example, if instruction be using coaxial cable, The wireless technology of optical fiber cable, twisted-pair feeder, digital subscriber line (DSL) or such as infrared ray, radio and microwave etc, from net Stand, server or other remote sources send, then the coaxial cable, optical fiber cable, twisted-pair feeder, DSL or such as infrared ray, The wireless technology of radio and microwave etc is included in the definition of the medium.It is to be understood, however, that computer-readable It includes connection, carrier wave, signal or other fugitive mediums to write storage medium and data storage medium not, and is intended to be directed to Non-transitory, tangible storage medium.Disk and CD as used in application include compact disk (CD), laser-optical disk, CD, digital versatile disc (DVD), floppy disk and Blu-ray Disc, wherein disk usually magnetically replicate data, and CD is then With laser come optically replicate data.
It is advised in conclusion the application obtains the state, prediction rule and operation described according to description rule using data source Then, and generate the program file that describe by program language, and then to obtaining software program after program file compiling, due to only according to Network function description involved state, prediction rule and operation rules, thus greatly reduce the exploitation of developing network function Difficulty;In addition, acquired state, prediction rule and operation rules etc. are converted into program word by scheme provided herein Speech, effectively reduces the defect generated by artificial logic error;In addition, by scheme provided herein to it is generated only It is compiled device adaptation processing for realizing the program file of network function, effectively by running environment and function research and development phase point From reducing the overlapping development workload of programmer.
The principles and effects of the application are only illustrated in above-described embodiment, not for limitation the application.It is any ripe Know the personage of this technology all can without prejudice to spirit herein and under the scope of, carry out modifications and changes to above-described embodiment.Cause This, those of ordinary skill in the art is complete without departing from spirit disclosed herein and institute under technological thought such as At all equivalent modifications or change, should be covered by claims hereof.

Claims (26)

1. a kind of development approach of network function, which is characterized in that including:
Prediction rule and the corresponding operation rules for realizing network function are obtained from a data source;Wherein, the prediction Rule includes the prediction rule to the prediction rule of data flow, and/or with the relevant state of the network function, the operation rule It include then the operation rules to the operation rules of the data flow, and/or with the relevant state of the network function;
Acquired prediction rule and its operation rules are preserved according to preset description rule.
2. the development approach of network function according to claim 1, which is characterized in that the prediction rule packet of the data flow Contain:The prediction rule of at least one feature locations in Data Flow Oriented.
3. the development approach of network function according to claim 1, which is characterized in that further comprising the steps of:From described Data source obtains and the relevant original state of the network function.
4. the development approach of network function according to claim 1, which is characterized in that the operation rules to data flow Including following at least one:To the operation rules of data flow executive editor, forwarding, discarding or delay process, data flow is executed The operation rules resubmited.
5. the development approach of network function according to claim 1, which is characterized in that the data source is an editing machine, It further include a following at least step:
The editing machine will be imported comprising the source file of the prediction rule and corresponding operation rules;
Prediction rule and corresponding operation rules are edited in the editing machine.
6. according to the development approach of any network function in claim 1-5, which is characterized in that described from a data source The step of obtaining prediction rule and the corresponding operation rules for realizing network function includes following at least one:
The text for describing the prediction rule and corresponding operation rules is obtained from the data source;
The table for describing the prediction rule and corresponding operation rules is obtained from the data source;
The digraph for describing the prediction rule and corresponding operation rules is obtained from the data source.
7. the development approach of network function according to claim 5, which is characterized in that described by acquired prediction rule And its operation rules the step of being preserved according to preset description rule, includes:By acquired prediction rule and its operation rule It then preserves into the source file that can be multiplexed editor by the editing machine.
8. the development approach of network function according to claim 1, which is characterized in that described by acquired prediction rule And its operation rules the step of being preserved according to preset description rule, includes:According to the conversion expressed by the description rule Logic handles the prediction rule and operation rules, to obtain the program file described by program language.
9. the development approach of network function according to claim 8, which is characterized in that with the prediction rule and corresponding Operation rules be entry, the conversion logic according to expressed by description rule, by the prediction rule and operation rules into Row processing the step of include:
It is one by one conditional statement by the prediction rule processing in each entry according to the conversion logic, corresponding operation is advised Then processing is the action statement under the conditional statement.
10. the development approach of network function according to claim 9, which is characterized in that described according to description rule institute table It is the operation language under the conditional statement by corresponding operation rules processing up to being conditional statement by prediction rule processing Sentence the step of include:The sentence of multiple entries is optimized place by the conversion logic expressed by context according to multiple entries Reason.
11. the development approach of network function according to claim 10, which is characterized in that described according to the upper of multiple entries The step of hereafter sentence of multiple entries is optimized processing by expressed conversion logic includes following any:
The conversion logic expressed by context according to multiple entries is by each entry process at state machine;
Multiple entries are sequentially handled, fusion treatment, skip place by the conversion logic expressed by context according to multiple entries At least one of reason and rearrangement processing.
12. the development approach of network function according to claim 9, which is characterized in that described by prediction rule and operation The step of rule is handled include:The prediction rule and operation rules are processed into Domain Specific Language or programming language The program file of description.
13. a kind of development system of network function, which is characterized in that including:
Interactive module, for obtaining prediction rule and corresponding operation rules for realizing network function from a data source; Wherein, the prediction rule includes the pre- gauge to the prediction rule of data flow, and/or with the relevant state of the network function Then, the operation rules includes the operation to the operation rules of the data flow, and/or with the relevant state of the network function Rule;
Processing module, for being preserved acquired prediction rule and its operation rules according to preset description rule.
14. the development system of network function according to claim 13, which is characterized in that the prediction rule of the data flow Including:The prediction rule of at least one feature locations in Data Flow Oriented.
15. the development system of network function according to claim 13, which is characterized in that the interactive module is additionally operable to certainly The data source obtains and the relevant original state of the network function.
16. the development system of network function according to claim 13, which is characterized in that the operation to data flow is advised It include then following at least one:To the operation rules of data flow executive editor, forwarding, discarding or delay process, data flow is held The operation rules that row resubmits.
17. the development system of network function according to claim 13, which is characterized in that the data source is an editor Device, the interactive module are additionally operable to a following at least step:
The editing machine will be imported comprising the source file of the prediction rule and corresponding operation rules;
Prediction rule and corresponding operation rules are edited in the editing machine.
18. according to the development system of any network function in claim 13-17, which is characterized in that the interactive mould Block is for executing following at least one operation:
The text for describing the prediction rule and corresponding operation rules is obtained from the data source;
The table for describing the prediction rule and corresponding operation rules is obtained from the data source;
The digraph for describing the prediction rule and corresponding operation rules is obtained from the data source.
19. the development system of network function according to claim 17, which is characterized in that the processing module is used for institute The prediction rule and its operation rules of acquisition are preserved into the source file that can be multiplexed editor by the editing machine.
20. the development system of network function according to claim 13, which is characterized in that the processing module be used for according to Conversion logic expressed by the description rule handles the prediction rule and operation rules, to obtain by program word Say the program file of description.
21. the development system of network function according to claim 20, which is characterized in that right with the prediction rule and institute The operation rules answered is entry, and the processing module one by one is handled the prediction rule in each entry according to the conversion logic It is the action statement under the conditional statement by corresponding operation rules processing for conditional statement.
22. the development system of network function according to claim 21, which is characterized in that the processing module is according to multiple The sentence of multiple entries is optimized processing by the conversion logic expressed by the context of entry.
23. the development system of network function according to claim 22, which is characterized in that the processing module executes following Any step:
The conversion logic expressed by context according to multiple entries is by each entry process at state machine;
Multiple entries are sequentially handled, fusion treatment, skip place by the conversion logic expressed by context according to multiple entries At least one of reason and rearrangement processing.
24. the development system of network function according to claim 20, which is characterized in that the processing module is used for institute It states prediction rule and operation rules is processed into the program file described with Domain Specific Language or programming language.
25. a kind of computer equipment, which is characterized in that including:
Memory, for storing at least one program;
Processor, for transferring and executing at least one program stored, to execute such as any institute in claim 1-12 The development approach stated.
26. a kind of computer readable storage medium is stored with the computer program developed for network function, which is characterized in that The computer program, which is performed, realizes any network function development approach in claim 1-12.
CN201810353209.4A 2018-04-19 2018-04-19 Network function development method, system, computer device and storage medium Active CN108563437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810353209.4A CN108563437B (en) 2018-04-19 2018-04-19 Network function development method, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810353209.4A CN108563437B (en) 2018-04-19 2018-04-19 Network function development method, system, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN108563437A true CN108563437A (en) 2018-09-21
CN108563437B CN108563437B (en) 2021-08-20

Family

ID=63535693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810353209.4A Active CN108563437B (en) 2018-04-19 2018-04-19 Network function development method, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN108563437B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930154A (en) * 2016-04-19 2016-09-07 烽火通信科技股份有限公司 Method and apparatus for establishing and using device hardware model in network operation system
CN106155658A (en) * 2015-04-08 2016-11-23 广州四三九九信息科技有限公司 The behavior tree editing machine realized based on U3D Plugin Mechanism
US20170123641A1 (en) * 2015-10-28 2017-05-04 Adobe Systems Incorporated Automatically generating network applications from design mock-ups

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155658A (en) * 2015-04-08 2016-11-23 广州四三九九信息科技有限公司 The behavior tree editing machine realized based on U3D Plugin Mechanism
US20170123641A1 (en) * 2015-10-28 2017-05-04 Adobe Systems Incorporated Automatically generating network applications from design mock-ups
CN105930154A (en) * 2016-04-19 2016-09-07 烽火通信科技股份有限公司 Method and apparatus for establishing and using device hardware model in network operation system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WENFEI WU等: "Network Function Modeling and Its Applications", 《IEEE INTERNET COMPUTING》 *

Also Published As

Publication number Publication date
CN108563437B (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN108563448A (en) Compilation Method, system, computer equipment and the storage medium of program file
EP3483740B1 (en) Method, device and system for stream computation
CN102754411B (en) Use client-server bridge management object
US11394604B2 (en) Closed-loop automation of a managed network
CN109460250A (en) A kind of generation method and equipment of application program
Bhadoria et al. Analyzing the role of interfaces in enterprise service bus: A middleware epitome for service-oriented systems
CN117941330A (en) Describing network-level behavior using domain-specific language
Jan et al. Flex‐eWare: a flexible model driven solution for designing and implementing embedded distributed systems
CN108614691A (en) Development approach, system, computer equipment and the storage medium of network function
US11349729B2 (en) Network service requests
US7756801B2 (en) Systems and methods for architecture independent programming and synthesis of network applications
Xiu et al. Change management of service-based business processes
CN108563437A (en) Development approach, system, computer equipment and the storage medium of network function
Brogi et al. Service adaptation through trace inspection
CN110275701A (en) Data processing method, device, medium and calculating equipment
Schmiedmayer et al. Reducing the impact of breaking changes to web service clients during web API evolution
US11157513B2 (en) Data synchronization in a micro services environment
Sheng et al. Designing and building context-aware services: the contextserv project
Mezei et al. The dynamic sensor data description and data format conversion language.
EP1350165A2 (en) Event bus architecture
Liu et al. Composition of engineering web services with distributed data-flows and computations
Schmid Modeling and Simulation of Message-Driven Self-Adaptive Systems
KR100973543B1 (en) Modeling Method and Device for Dynamic Architecture of Mobile Application
Zhang et al. Runtime verification of parametric properties using smedl
Tsagkaropoulos et al. Extending tosca for edge and fog deployment support. electronics 2021 10 737

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20181019

Address after: 210046 601 room, No. 6, Qi Min Road, Xianlin street, Qixia District, Nanjing, Jiangsu, China. 6

Applicant after: Turing Artificial Intelligence Research Institute (Nanjing) Co., Ltd.

Address before: 100084 Tsinghua Yuan, Beijing, Haidian District

Applicant before: Tsinghua University

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant