CN104932870B - A kind of data processing method and device to illusory script - Google Patents

A kind of data processing method and device to illusory script Download PDF

Info

Publication number
CN104932870B
CN104932870B CN201410100922.XA CN201410100922A CN104932870B CN 104932870 B CN104932870 B CN 104932870B CN 201410100922 A CN201410100922 A CN 201410100922A CN 104932870 B CN104932870 B CN 104932870B
Authority
CN
China
Prior art keywords
illusory
scripting object
script
scripting
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410100922.XA
Other languages
Chinese (zh)
Other versions
CN104932870A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410100922.XA priority Critical patent/CN104932870B/en
Priority to PCT/CN2015/074572 priority patent/WO2015139646A1/en
Publication of CN104932870A publication Critical patent/CN104932870A/en
Application granted granted Critical
Publication of CN104932870B publication Critical patent/CN104932870B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • G06F9/45512Command shells
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Abstract

The embodiment of the invention discloses a kind of data processing methods and device to illusory script, and wherein the realization of method includes: the script sentence read in illusory script file;Successively each script sentence is executed: according to the information of script sentence, determining structured sort belonging to script sentence, essential information and relation information;The structured sort is the structured sort of predefined illusory scripting object structure;The determining essential information and relation information are updated into illusory scripting object structure corresponding with structured sort, illusory scripting object collection is obtained.To automatically construct the structure of new illusory scripting object, the essential information that the structure not only contains object further comprises the classification and relation information of structure, to improve inquiry velocity and providing condition to realize that the functions such as the script automated comparison, script information screening, information separation and classification are realized.

Description

A kind of data processing method and device to illusory script
Technical field
The present invention relates to field of computer technology, in particular to a kind of data processing method and device to illusory script.
Background technique
UE(Unreal Script, illusory script) it is commonly referred to as UE script, refer to application developer according to Unreal The executable file script (sometimes referred to as macro or autoexec) that Script grammer is write.These scripts are mainly realized in advance Fixed logic function, such as: player creates room, movement, shooting etc. in game.It include UE scripting object, UE in UE script Scripting object is in Unreal Script script, according to the class of Unreal Script syntactic definition, state, function and category Property.
Currently in the tool of the support of Unreal Script script, the mainly tool of editing machine class and solution Scheme.These schemes mainly support developer to write Unreal Script script, or further provide for syntax check.It is right In the inquiry of UE script be more by NotePad++(note) etc. similar text query tool inquired.It is main Thinking is that the mode based on text traversal traverses file content, and traversing result can show all comprising keyword content All text informations.
By taking the UE script of 16M or so as an example, current query scheme execute every time inquiry and screening time all 10S with On, therefore current inquiry velocity is slow, and also cannot achieve the comparison between two UE scripts at present.Based on current script Structure, the realization that can not be automated separate the arrangement of UE script information and information, can not also automate realization to script information Screening, classification and differentiation comparison.
Summary of the invention
The embodiment of the invention provides a kind of data processing methods and device to illusory script, a kind of new for providing Illusory script data processing scheme, for improve inquiry velocity and be realize automation script compare, script information sieve Choosing, information separation and classification offer condition.
A kind of data processing method to illusory script, comprising:
Read the script sentence in illusory script file;
Successively each script sentence is executed: according to the information of script sentence, determining structured sort belonging to script sentence, base This information and relation information;The structured sort is the structured sort of predefined illusory scripting object structure;
The determining essential information and relation information are updated and arrive illusory scripting object knot corresponding with structured sort In structure, illusory scripting object collection is obtained.
A kind of data processing equipment to illusory script, comprising:
Script reading unit, for reading the script sentence in illusory script file;
Information reading unit, for successively being executed to each script sentence: according to the information of script sentence, determining script sentence Affiliated structured sort, essential information and relation information;The structured sort is predefined illusory scripting object structure Structured sort;
Object formation unit, for updating the essential information and relation information that determine to corresponding with structured sort Illusory scripting object structure in, obtain illusory scripting object collection.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that predefines according to structured sort Illusory scripting object structure, and each script sentence is executed according to this: according to the information of script sentence, determine belonging to script sentence Structured sort, essential information and relation information;Then will by the essential information and relation information that determine update to In the corresponding illusory scripting object structure of structured sort, illusory scripting object collection is obtained.To automatically construct newly The structure of illusory scripting object, the essential information which not only contains object further comprise the classification and relationship letter of structure Breath, to improve inquiry velocity and being the function such as the script comparison for realizing automation, script information screening, information separation and classification Offer condition is provided.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without any creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is present invention method flow diagram;
Fig. 2 is present invention method flow diagram;
Fig. 3 is present invention method flow diagram;
Fig. 4 is present invention method flow diagram;
Fig. 5 is present invention method flow diagram;
Fig. 6 is present invention method flow diagram;
Fig. 7 is the device of that embodiment of the invention structural schematic diagram;
Fig. 8 is the device of that embodiment of the invention structural schematic diagram;
Fig. 9 is the device of that embodiment of the invention structural schematic diagram;
Figure 10 is the device of that embodiment of the invention structural schematic diagram;
Figure 11 is the device of that embodiment of the invention structural schematic diagram;
Figure 12 is the device of that embodiment of the invention structural schematic diagram.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into It is described in detail to one step, it is clear that the described embodiments are only some of the embodiments of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts All other embodiment, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of data processing methods to illusory script, as shown in Figure 1, comprising:
101: reading the script sentence in illusory script file;
Illusory script file is the executable file script write according to Unreal Script grammer, in other words illusory foot This document is made of script sentence, and what this step executed is that the illusory script file of decoding obtains its source code, by source code The process read out.
102: successively each script sentence being executed: according to the information of script sentence, determining structure class belonging to script sentence Not, essential information and relation information;Above structure classification is the structured sort of predefined illusory scripting object structure;
In this step, the structured sort of illusory scripting object structure can be according to being set.In each class In other illusory scripting object structure, essential information and relation information are contained.Essential information and relation information are empty Two class parameter informations in unreal scripting object.Wherein essential information is to describe the information of illusory scripting object, may include identification Category information, such as: key assignments (Key), title etc.;Also other be may include for example: the information such as file, the content at place;Relationship letter Breath is then the category information for being different from essential information, for indicating the relationship between other illusory scripting objects, be may include: Such as status list, function list, attribute list, the class list of dependence and parent, default property information, be relied on list, by after Hold list etc..
103: determining above-mentioned essential information and relation information being updated and arrive illusory script pair corresponding with structured sort In image structures, illusory scripting object collection is obtained.
Above embodiments predefine illusory scripting object structure according to structured sort, and hold according to this to each script sentence Row: according to the information of script sentence, structured sort belonging to script sentence, essential information and relation information are determined;Then will Determining above-mentioned essential information and relation information are updated into illusory scripting object structure corresponding with structured sort, obtained Illusory scripting object collection.To automatically construct the structure of new illusory scripting object, which is not only contained pair The essential information of elephant further comprises the classification and relation information of structure, to improve inquiry velocity and being the foot for realizing automation The functions such as this comparison, script information screening, information separation and classification realize offer condition.
It is as follows the embodiment of the invention provides the specific implementation of information inquiry based on the above illusory scripting object collection: The above method further include:
Read illusory scripting object collection, and the illusory scripting object for the illusory scripting object concentrated according to illusory scripting object Relation information in structure determines the relation information between illusory scripting object;And export above-mentioned relation information.
Optionally, the embodiment of the invention also provides the citing of the type of illusory scripting object structure, following citing is The more preferred implementation that the embodiment of the present invention is provided based on illusory script this application scenarios, based on different demand skills Art personnel can carry out other kinds of division, refuse uniqueness to this embodiment of the present invention and limit, specific as follows: above-mentioned predetermined The type of the illusory scripting object structure of justice includes: the structure of the structure of class, the structure of state, the structure of function and attribute.
Optionally, the structure based on different illusory scripts, the embodiment of the present invention give the structure packet of illusory script The citing of the essential information and relation information that contain, based on the illusory script file for being applied to different scenes, included is basic Information and relation information are difference can be not limited in following citing, therefore following citing should not be construed as to this The uniqueness of inventive embodiments limits.It is specific as follows:
If the type of the structure of above-mentioned illusory scripting object is the structure of class, above-mentioned essential information includes: object key assignments At least one of in Key, title, place file and content;Above-mentioned relation information includes: status list, function list, attribute List, the class list of dependence and parent, default property information are relied on list and by least one in succession list;
If the type of the structure of above-mentioned illusory scripting object be state structure, above-mentioned essential information include: object Key, At least one of in title, place file, content and Status Type;Above-mentioned relation information includes: function list and/or affiliated Class;
If the type of the structure of above-mentioned illusory scripting object be function structure, above-mentioned essential information include: object Key, At least one of in title, place file, content, function parameter and type function;Above-mentioned relation information includes: calling function At least one of in list, attribute assignment list, called function list and affiliated class;
If the type of the structure of above-mentioned illusory scripting object be attribute structure, above-mentioned essential information include: object Key, At least one of in title, place file, content, attribute type and affiliated class;Above-mentioned relation information includes: that attribute is made Information.
Due to including relation information in the structure of predefined illusory scripting object in embodiments of the present invention, based on obtaining Much illusory scripting object collection can carry out being derived by more relation informations by these relation informations, so as to from The information directly obtained in script file further improved it is extendible, it is specific as follows: if above-mentioned relation information include void At least one of in the dependence of unreal scripting object, inheritance and call relation;The above method further include: according to it is above-mentioned according to The relationship of relying, inheritance and/or call relation backstepping obtain new relation information, and update into illusory scripting object structure.
Structure based on the illusory scripting object that the embodiment of the present invention provides, it may be convenient to determine between illusory script Difference, it is specific as follows: in the illusory of the illusory scripting object collection and the second illusory script file for obtaining the first illusory script file After scripting object collection, further includes: compare the illusory scripting object collection and the second illusory script file of the first illusory script file Illusory scripting object collection between existing illusory scripting object difference.
Above-mentioned first illusory script file and the second illusory script file are illusory script file, using " first " and It is and not have other limit to distinguish two illusory script files of difference that will be compared that " second ", which is defined, Meaning.Therefore the acquisition pattern of the illusory scripting object collection of the first illusory script file and the second illusory script file is all made of this Scheme in inventive embodiments is realized.
Based on the illusory scripting object structure that the embodiment of the present invention provides, the embodiment of the present invention is preferred to furthermore presenting Alignment schemes, come obtain between two illusory script files compared to respectively relatively newly-increased illusory scripting object set and Or the illusory scripting object set of modification, concrete scheme are as follows: the illusory scripting object of the illusory script file of above-mentioned comparison first The difference of existing illusory scripting object includes: between collection and the illusory scripting object collection of the second illusory script file
Compare the illusory scripting object collection of the first illusory script file and the illusory scripting object of the second illusory script file Collection, excludes identical illusory scripting object first, obtains the illusory scripting object of newly-increased illusory scripting object set and modification Set;Then the illusory scripting object set progress for obtaining newly-increased illusory scripting object set and modification is mutually exclusive, it obtains The illusory scripting object set of the illusory scripting object set and deletion that are increased newly into the first illusory script file;Finally Exclusion increases newly in the illusory scripting object set of the illusory scripting object set and deletion that increase newly in one illusory script file Illusory scripting object set is obtained compared to the illusory script pair deleted in the second illusory script file of illusory script file first As set.
Following embodiment will carry out detailed illustration to the embodiment of the present invention by taking game scripts as an example.The present invention is implemented Example mainly provides the structural scheme of objectification for UE script, to be able to carry out with the UE script of UE engine class game based on object The inquiry of collection and screening provide data set, allow UE scripting object, and recall precision can be improved and provide richer look into Ask information.Suitable for attending a day school to the scripted code of game, (code walk-through refers to: random mutual reading generation between developer Code, checks that it writes the code check mode of correctness) and inspection have the scheme of demand.Subsequent embodiment for convenience, Illusory scripting object is known as scripting object.
Be divided into three parts in embodiments of the present invention: input, processing and output, the function of executing respectively are as follows:
Input: game UE script file is provided;
Processing: participating in without artificial, carries out backstage construction scripting object according to algorithm and combs the pass between scripting object Then system compares the UE scripting object difference of two game versions;
Output: UE scripting object collection is provided for user.
Processing is the core of the embodiment of the present invention in above step, and mainly include is two aspects: object formation It is compared with object.
It please refers to shown in Fig. 2, it is assumed that be new version Unreal Script script and early version Unreal Script script Comparison, it is specific as follows:
In Part.1, the construction of objectification is mainly carried out to the UE script of two versions of game, these scripts are sealed It dresses up as object set.The UE scripting object set building method of two versions is identical.According to being capable of script in UE script file The difference of code content data, there may be differences for the UE scripting object set of two versions.The step can execute reading script Information, and the type for judging script information is decomposed, construct UE scripting object collection.
In Part.2, contrast difference's algorithm for UE scripting object aggregate form is provided, which executes comparison two The scripting object difference of a version.Object set can specifically be classified according to algorithm in this step, respectively obtain newly-increased pair As the object set for collecting, modifying object set, delete object set and do not change.
The detailed technology details of the present apparatus is elaborated in terms of object formation and object compare two separately below.
One, object formation:
In embodiments of the present invention, UE scripting object construction process is carried out substantially according to following four sequence of steps, such as Fig. 3 It is shown:
Step 1: defining the structure of UE scripting object.
In UE script, all UE scripted codes are from can grammatically be abstracted into as the object of four seed types.This hair The structure of four kinds of UE scripting objects is defined as follows shown in table 1~4 by bright embodiment combination UE script grammer:
Table 1
Include relation information two parts in essential information and class in the structure of class.Essential information, which specifically includes that, shows this Class is capable of the object Key of unique identification, such title and such is in which UE script file and that such includes is detailed Thin content.The detailed content of class can play crucial effect, can filter out content modification by it in comparison below Executable file script class object.In addition, the relation information of class is saved in structure, it can be in the relationship and class between class State, function and attribute combed.
Table 2
Comparatively the structure of state is that information is fairly simple similar with class formation, same includes essential information and class Relation information two parts.Wherein, essential information specifically includes that object Key, Status Name and the state class of state unique identification The information such as type, state particular content.In state relation information, content mainly includes function information and state institute in state Belong to category information.
Table 3
Essential information and front class in the structure of function is similar with state, only more type declarations of a function, Here type is mainly determined according to the keyword of the function of Unreal Script syntactic definition.For the pass in function Be information mainly include calling function information in function and called function list information can according to the two lists To establish mutual call relation chain between function object.In addition, for the attribute assignment and local variable of function body class The monitoring of assignment has the relationship improved between attribute important meaning.
Table 4
In the structure of attribute, other than the information such as object Key Property Name, it is also necessary to know the type of attribute, these classes Type provides important foundation to supplement the called relationship of some functions, such as: the function call of instance object passes through object category Property type, can find call function object, and with called object opening relationships table.
By the definition of the above object structure, UE script can be subjected to difference according to Unreal Script taxeme The object structure of change saves.
Step 2: in the first step, the relationship between the structure and object of UE scripting object is defined, Next it needs to construct series of rules to identify the scripting object of UE, these rules specifically include that Object identifying shape State collection and object matching rule two parts.Four kinds of UE scripting objects that current statement constructs in front are mainly saved in state set Grammer state.These states in state set will provide reference for the filling of scripting object data in third step.
Specifically as shown in figure 4, successively executing: one script file of reading, init state concentration institute is stateful, reading is first Then sentence script executes always a following steps to the last script sentence: judging whether it is that class object starts, if it is Class object opening flag is set;Judge whether it is that class object terminates, class object end mark is if it is set;Judge whether be Status object starts, and status object opening flag is if it is arranged;Judge whether it is that status object terminates, is if it is arranged Status object end mark;Judge whether it is that function object starts, function object opening flag is if it is set;Judge whether It is that function object terminates, function object end mark is if it is set;Judge whether it is that attributes object starts, if it is sets Set attributes object opening flag;Judge whether it is that attributes object terminates, if it is set a property object end mark;It has executed Next script is read after finishing the above judgement.Judge that no situation enters next judgement above.Above judgment step is not With proper logic precedence, the sequence of judgement shown in Fig. 4 should not be construed as the uniqueness to judgement sequence It limits.
And the mode of object matching rule can be by updating the state of state set to the judgement of sentence.These objects It can be realized by regular expression with rule, the regular expression for such as obtaining class name is as follows:
@"^\s*(interface|class)\s+(?<search_data1>[\w_]+)\s*(extends?\s+[\w_] +(\s+within\s+[\w_]+)?\s*(\s+implements\([\W\w_]+\))?\s*(\s+placeable[\W\w_] +)?\s*(\s+dependson\([\W\w_]+\))?\s*(\s+config\([\W\w_]+\))?)?\s*;?\s*[\w\W]* $"
Step 3: the embodiment of the present invention is the rule defined according to second step in the groundwork of this step, to UE script Object is automatically performed the preservation of object classification, the filling of object data and object set.Conservation object concentration mainly has following 3 passes Key point:
1, the preservation of all object essential informations is completed first.Specifically as shown in figure 5, including the following:
It reads in Unreal Script script sentence, state set is updated according to matching rule, then by judging whether to belong to Whether class belongs to state, whether belongs to function and whether belongs to attribute to determine institute in the case where the judgment result is yes Then the structure type of category determines the need for creation new object, if it is, creating class object, creation state pair accordingly As, creation function object or creation attributes object, then add sentence information into class object structure;If you do not need to creation New object then directly adds sentence information into class object structure;According to processing result state set after being finished, finally determine Whether all processing, can if it is terminate process, otherwise re-execute the above process.
In the filling of object master data, realized substantially according to process above.After reading in sentence, retouched according to second step The mode stated updates state set, then according to the judgement of sentence, deciding whether to create new UE scripting object and more in state set The information of new UE scripting object, so handles whole sentences of all UE script files.
2, class object is traversed, obtains the relationship between class, the relation chain between ultimately constructed class, and in functional relation below In there are in parent defined function and function call, the definition of class object provides reference, here mainly according to class object The object Key of middle dependence class object and parent object fills parent and relies on being relied in class object and believed by succession list Breath.Such as: there are tri- UE script types of A, B, C in certain game, B inherits A, and B relies on C.In embodiments of the present invention, Front tri- UE scripting object classes of constructed good A, B, C, groundwork here is:
The object Key of C object is added in the class list attribute of the dependence of B object;It is added in the parent attribute of B object The object Key of A object.
3, function object is traversed, the call relation between function, the call relation between function, the main foundation of rule are established The function call mode of Unreal Script grammer, main as shown in table 4 below:
Table 4
Above embodiments, while saving master data, creation rule closes the relationship of class, function in UE scripting object System is saved.
Step 4: improving relation information in all objects.Since in the third step, the embodiment of the present invention has been completed Most of relation information of UE scripting object, but there is also partial informations to establish when constructing object.Such as: this function The class list information etc. that the called list information of object, this class object are relied on and inherit.This step mainly passes through The dependence of constructed good UE scripting object, inheritance and call relation is counter is pushed away, establish the quilt of called object Dependence and called relationship etc. are in the unfilled relation information of third step.Such as: there are tri- UE scripts of A, B, C in certain game Class, B inherits A, and B relies on C.In embodiments of the present invention, tri- UE scripting object classes of constructed good A, B, C before, And dependence and inheritance are established, groundwork here is:
According to the class list attribute of the dependence of B object, addition B object Key in list attribute is relied in C object;Root According to the parent attribute of B object, in the object Key by addition B object in succession list of A object.
In front after four the end of the step, in embodiments of the present invention, the object set of UE scripting object has been obtained, this Inventive embodiments are exactly to need to classify these object sets in following work.
Two, object compares:
Object comparison and the generation of difference set are accomplished that in this part.
In embodiments of the present invention, the UE scripting object data difference of two versions is compared substantially by following flow chart Shown in 6:
All the type object sets of new version and all the type object sets of early version are read, are then executed It is mutually exclusive, it obtains: the object set deleted and modified in the object set and new version for increasing newly and modifying in new version; Then it executes mutually exclusive, obtains: the object set deleted in the object set and new version increased newly in new version;Then With the object set for increasing newly and modifying in the object set and new version increased newly in new version, mutually exclusive obtains: new edition is executed The object set modified in this.
Flow chart shown in fig. 6 above can be seen that in embodiments of the present invention comparison mainly divides the following steps:
First: excluding same object present in early version object set in new version object set, obtain new version In increase newly and modification object set;The similar same object present in new version that excludes in early version object set obtains The object set deleted and modified in new version.
Then: increasing newly and modify in the new version that the first step is operated and delete and modify in object set and new version Object set carries out the mutually exclusive object set for obtaining increasing newly in new version, increases the object set deleted in version newly.
It is last: to exclude newly-increased object set in newly-increased and modification the object set in new version, modified Object set.
The embodiment of the present invention in UE scripting object class, state, four kinds of object sets of function and attribute are respectively according to upper Process shown in the Fig. 6 in face is operated, and the new version of four kinds of objects just has been obtained and newly-increased object set that early version is compared It closes, delete object set and modification object set.
The embodiment of the invention also provides a kind of data processing equipments to illusory script, as shown in fig. 7, comprises:
Script reading unit 701, for reading the script sentence in illusory script file;
Information reading unit 702, for successively being executed to each script sentence: according to the information of script sentence, determining script Structured sort belonging to sentence, essential information and relation information;Above structure classification is predefined illusory scripting object knot The structured sort of structure;
Object formation unit 703, for arriving and structured sort the update of the above-mentioned essential information and relation information that determine In corresponding illusory scripting object structure, illusory scripting object collection is obtained.
Illusory script file is the executable file script write according to Unreal Script grammer, in other words illusory foot This document is made of script sentence, and what this step executed is that the illusory script file of decoding obtains its source code, by source code The process read out.
The structured sort of illusory scripting object structure can be according to being set.In the illusory script of each classification In object structure, essential information and relation information are contained.Essential information and relation information are in illusory scripting object Two class parameter informations.Wherein essential information is to describe the information of illusory scripting object, may include identification category information, such as: Key assignments (Key), title etc.;Also other be may include for example: the information such as file, the content at place;Relation information is then different from One category information of essential information may include for indicating the relationship between other illusory scripting objects: as status list, Function list, attribute list, the class list of dependence and parent, default property information are relied on list, by succession list etc..
Above embodiments predefine illusory scripting object structure according to structured sort, and hold according to this to each script sentence Row: according to the information of script sentence, structured sort belonging to script sentence, essential information and relation information are determined;Then will Determining above-mentioned essential information and relation information are updated into illusory scripting object structure corresponding with structured sort, obtained Illusory scripting object collection.To automatically construct the structure of new illusory scripting object, which is not only contained pair The essential information of elephant further comprises the classification and relation information of structure, to improve inquiry velocity and being the foot for realizing automation The functions such as this comparison, script information screening, information separation and classification realize offer condition.
It is as follows the embodiment of the invention provides the specific implementation of information inquiry based on the above illusory scripting object collection: Further, as shown in figure 8, above-mentioned apparatus, further includes:
Relation determination unit 801, for reading illusory scripting object collection, and the illusory foot concentrated according to illusory scripting object Relation information in the illusory scripting object structure of this object, determines the relation information between illusory scripting object;
Information output unit 802, the relation information determined for exporting above-mentioned relation determination unit 801.
Optionally, the embodiment of the invention also provides the citing of the type of illusory scripting object structure, following citing is The more preferred implementation that the embodiment of the present invention is provided based on illusory script this application scenarios, based on different demand skills Art personnel can carry out other kinds of division, refuse uniqueness to this embodiment of the present invention and limit, specific as follows: optionally, The type of above-mentioned object formation unit 703, the above-mentioned predefined illusory scripting object structure for update includes: the knot of class Structure, the structure of state, the structure of the structure of function and attribute.
Optionally, the structure based on different illusory scripts, the embodiment of the present invention give the structure packet of illusory script The citing of the essential information and relation information that contain, based on the illusory script file for being applied to different scenes, included is basic Information and relation information are difference can be not limited in following citing, therefore following citing should not be construed as to this The uniqueness of inventive embodiments limits.It is specific as follows:
Optionally, above-mentioned object formation unit 703, in the above-mentioned predefined illusory scripting object structure of update, If the type of the structure of above-mentioned illusory scripting object is the structure of class, above-mentioned essential information includes: object key value Key, title, institute At least one of in file and content;Above-mentioned relation information includes: status list, function list, attribute list, dependence Class list and parent, default property information are relied on list and by least one in succession list;
If the type of the structure of above-mentioned illusory scripting object be state structure, above-mentioned essential information include: object Key, At least one of in title, place file, content and Status Type;Above-mentioned relation information includes: function list and/or affiliated Class;
If the type of the structure of above-mentioned illusory scripting object be function structure, above-mentioned essential information include: object Key, At least one of in title, place file, content, function parameter and type function;Above-mentioned relation information includes: calling function At least one of in list, attribute assignment list, called function list and affiliated class;
If the type of the structure of above-mentioned illusory scripting object be attribute structure, above-mentioned essential information include: object Key, At least one of in title, place file, content, attribute type and affiliated class;Above-mentioned relation information includes: that attribute is made Information.
Due to including relation information in the structure of predefined illusory scripting object in embodiments of the present invention, based on obtaining Much illusory scripting object collection can carry out being derived by more relation informations by these relation informations, so as to from The information directly obtained in script file further improved it is extendible, it is specific as follows: further, as shown in figure 9, on State device further include:
Relation derivation unit 901, if dependence, inheritance for above-mentioned relation information comprising illusory scripting object With at least one in call relation;Then new pass is obtained according to above-mentioned dependence, inheritance and/or call relation backstepping It is information;
Above-mentioned object formation unit 703 is also used to 901 backstepping of above-mentioned relation derivation unit obtaining new relation information more It newly arrives in illusory scripting object structure.
Structure based on the illusory scripting object that the embodiment of the present invention provides, it may be convenient to determine between illusory script Difference, specific as follows: further, as shown in Figure 10, above-mentioned apparatus further include:
Comparing unit 1001, for obtaining the illusory script of the first illusory script file in above-mentioned object formation unit 703 After the illusory scripting object collection of object set and the second illusory script file, the illusory script pair of the first illusory script file is compared As the difference of existing illusory scripting object between collection and the illusory scripting object collection of the second illusory script file.
Above-mentioned first illusory script file and the second illusory script file are illusory script file, using " first " and It is and not have other limit to distinguish two illusory script files of difference that will be compared that " second ", which is defined, Meaning.Therefore the acquisition pattern of the illusory scripting object collection of the first illusory script file and the second illusory script file is all made of this Scheme in inventive embodiments is realized.
Based on the illusory scripting object structure that the embodiment of the present invention provides, the embodiment of the present invention is preferred to furthermore presenting Alignment schemes, come obtain between two illusory script files compared to respectively relatively newly-increased illusory scripting object set and Or the illusory scripting object set of modification, concrete scheme are as follows: above-mentioned comparing unit 1001, for comparing the first illusory script text The illusory scripting object collection of part and the illusory scripting object collection of the second illusory script file, exclude identical illusory script pair first As obtaining the illusory scripting object set of newly-increased illusory scripting object set and modification;Then newly-increased illusory foot will be obtained This object set and the progress of the illusory scripting object set of modification are mutually exclusive, obtain the void increased newly in the first illusory script file Unreal scripting object set and the illusory scripting object set of deletion;The illusory foot finally increased newly in the first illusory script file Newly-increased illusory scripting object set is excluded in this object set and the illusory scripting object set of deletion, is obtained compared to The illusory scripting object set deleted in the two illusory script files of illusory script file first.
The embodiment of the invention also provides another kinds to the data processing equipment of illusory script, as shown in figure 11, comprising: connect Receive device 1101, transmitter 1102, processor 1103 and memory 1104.
Wherein, processor 1104, for reading the script sentence in illusory script file;Successively each script sentence is held Row: according to the information of script sentence, structured sort belonging to script sentence, essential information and relation information are determined;Above-mentioned knot Structure classification is the structured sort of predefined illusory scripting object structure;More by determining above-mentioned essential information and relation information It newly arrives in illusory scripting object structure corresponding with structured sort, obtains illusory scripting object collection.
Illusory script file is the executable file script write according to Unreal Script grammer, in other words illusory foot This document is made of script sentence, and what this step executed is that the illusory script file of decoding obtains its source code, by source code The process read out.
In the present embodiment, the structured sort of illusory scripting object structure can be according to being set.In each class In other illusory scripting object structure, essential information and relation information are contained.Essential information and relation information are empty Two class parameter informations in unreal scripting object.Wherein essential information is to describe the information of illusory scripting object, may include identification Category information, such as: key assignments (Key), title etc.;Also other be may include for example: the information such as file, the content at place;Relationship letter Breath is then the category information for being different from essential information, for indicating the relationship between other illusory scripting objects, be may include: Such as status list, function list, attribute list, the class list of dependence and parent, default property information, be relied on list, by after Hold list etc..
Above embodiments predefine illusory scripting object structure according to structured sort, and hold according to this to each script sentence Row: according to the information of script sentence, structured sort belonging to script sentence, essential information and relation information are determined;Then will Determining above-mentioned essential information and relation information are updated into illusory scripting object structure corresponding with structured sort, obtained Illusory scripting object collection.To automatically construct the structure of new illusory scripting object, which is not only contained pair The essential information of elephant further comprises the classification and relation information of structure, to improve inquiry velocity and being the foot for realizing automation The functions such as this comparison, script information screening, information separation and classification realize offer condition.
It is as follows the embodiment of the invention provides the specific implementation of information inquiry based on the above illusory scripting object collection: Above-mentioned processor 1104 is also used to read illusory scripting object collection, and the illusory scripting object concentrated according to illusory scripting object Illusory scripting object structure in relation information, determine the relation information between illusory scripting object;And export above-mentioned relation Information.
Optionally, the embodiment of the invention also provides the citing of the type of illusory scripting object structure, following citing is The more preferred implementation that the embodiment of the present invention is provided based on illusory script this application scenarios, based on different demand skills Art personnel can carry out other kinds of division, refuse uniqueness to this embodiment of the present invention and limit, specific as follows: above-mentioned processing Device 1104, the type for handling the predefined illusory scripting object structure used include: the structure of class, the structure of state, The structure of function and the structure of attribute.
Optionally, the structure based on different illusory scripts, the embodiment of the present invention give the structure packet of illusory script The citing of the essential information and relation information that contain, based on the illusory script file for being applied to different scenes, included is basic Information and relation information are difference can be not limited in following citing, therefore following citing should not be construed as to this The uniqueness of inventive embodiments limits.It is specific as follows: above-mentioned processor 1104, if structure for above-mentioned illusory scripting object Type is the structure of class, and above-mentioned essential information includes: at least one in object key value Key, title, place file and content ?;Above-mentioned relation information includes: status list, function list, attribute list, the class list of dependence and parent, default property letter It ceases, be relied on list and by least one in succession list;
If the type of the structure of above-mentioned illusory scripting object be state structure, above-mentioned essential information include: object Key, At least one of in title, place file, content and Status Type;Above-mentioned relation information includes: function list and/or affiliated Class;
If the type of the structure of above-mentioned illusory scripting object be function structure, above-mentioned essential information include: object Key, At least one of in title, place file, content, function parameter and type function;Above-mentioned relation information includes: calling function At least one of in list, attribute assignment list, called function list and affiliated class;
If the type of the structure of above-mentioned illusory scripting object be attribute structure, above-mentioned essential information include: object Key, At least one of in title, place file, content, attribute type and affiliated class;Above-mentioned relation information includes: that attribute is made Information.
Due to including relation information in the structure of predefined illusory scripting object in embodiments of the present invention, based on obtaining Much illusory scripting object collection can carry out being derived by more relation informations by these relation informations, so as to from The information directly obtained in script file further improved it is extendible, it is specific as follows: if above-mentioned relation information include void At least one of in the dependence of unreal scripting object, inheritance and call relation;Above-mentioned processor 1104, is also used to foundation Above-mentioned dependence, inheritance and/or call relation backstepping obtain new relation information, and update and arrive illusory scripting object knot In structure.
Structure based on the illusory scripting object that the embodiment of the present invention provides, it may be convenient to determine between illusory script Difference, specific as follows: above-mentioned processor 1104 is also used in the illusory scripting object collection and for obtaining the first illusory script file After the illusory scripting object collection of two illusory script files, the illusory scripting object collection and second of the first illusory script file is compared The difference of existing illusory scripting object between the illusory scripting object collection of illusory script file.
Above-mentioned first illusory script file and the second illusory script file are illusory script file, using " first " and It is and not have other limit to distinguish two illusory script files of difference that will be compared that " second ", which is defined, Meaning.Therefore the acquisition pattern of the illusory scripting object collection of the first illusory script file and the second illusory script file is all made of this Scheme in inventive embodiments is realized.
Based on the illusory scripting object structure that the embodiment of the present invention provides, the embodiment of the present invention is preferred to furthermore presenting Alignment schemes, come obtain between two illusory script files compared to respectively relatively newly-increased illusory scripting object set and Or the illusory scripting object set of modification, concrete scheme are as follows: above-mentioned processor 1104 is used for the illusory script of above-mentioned comparison first Existing illusory scripting object between the illusory scripting object collection of file and the illusory scripting object collection of the second illusory script file Difference include: compare the first illusory script file illusory scripting object collection and the second illusory script file illusory script pair As collection, identical illusory scripting object is excluded first, obtains the illusory script pair of newly-increased illusory scripting object set and modification As set;It is then the illusory scripting object set progress for obtaining newly-increased illusory scripting object set and modification is mutually exclusive, Obtain the illusory scripting object set of the illusory scripting object set increased newly in the first illusory script file and deletion;Finally exist It is excluded in the illusory scripting object set of the illusory scripting object set and deletion that are increased newly in first illusory script file newly-increased Illusory scripting object set, obtain compared to the illusory script deleted in the second illusory script file of illusory script file first Object set.
Figure 12 is a kind of data processing equipment to illusory script provided in an embodiment of the present invention, which can be service Device, server architecture schematic diagram is as shown in figure 12, which can generate bigger difference because configuration or performance are different It is different, it may include one or more central processing unit (central processing units, CPU) 1222(for example, one A or more than one processor) and memory 1232, one or more storage application programs 1242 or data 1244 are deposited Storage media 1230(such as one or more mass memory units).Wherein, memory 1232 and storage medium 1230 can be with It is of short duration storage or persistent storage.The program for being stored in storage medium 1230 may include one or more module (diagrams Do not mark), each module may include to the series of instructions operation in server.Further, central processing unit 1222 It can be set to communicate with storage medium 1230, the series of instructions behaviour in storage medium 1230 executed on server 1200 Make.
Server 1200 can also include one or more power supplys 1226, one or more wired or wireless nets Network interface 1250, one or more input/output interfaces 1258, and/or, one or more operating systems 1241, example Such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
The step as performed by the data processing equipment to illusory script can be based on shown in the Figure 12 in above-described embodiment Server architecture.
It is worth noting that, included each unit is only drawn according to function logic in above-mentioned apparatus embodiment Point, but be not limited to the above division, as long as corresponding functions can be realized;In addition, each functional unit is specific Title is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
In addition, those of ordinary skill in the art will appreciate that realizing all or part of the steps in above-mentioned each method embodiment It is that relevant hardware can be instructed to complete by program, corresponding program can store in a kind of computer readable storage medium In, storage medium mentioned above can be read-only memory, disk or CD etc..
The above is only the preferable specific embodiments of the present invention, but scope of protection of the present invention is not limited thereto, any Those familiar with the art the variation that can readily occur in or replaces in the technical scope that the embodiment of the present invention discloses It changes, should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with the protection model of claim Subject to enclosing.

Claims (12)

1. a kind of data processing method to illusory script characterized by comprising
Read the script sentence in illusory script file;
Successively each script sentence is executed: according to the information of script sentence, determining structured sort belonging to script sentence, basic letter Breath and relation information;The structured sort is the structured sort of predefined illusory scripting object structure;
The determining essential information and relation information are updated into illusory scripting object structure corresponding with structured sort, Obtain illusory scripting object collection;
Read illusory scripting object collection, and the illusory scripting object structure for the illusory scripting object concentrated according to illusory scripting object Interior relation information determines the relation information between illusory scripting object;And export the relation information.
2. method according to claim 1, which is characterized in that the type packet of the predefined illusory scripting object structure It includes:
The structure of class, the structure of state, the structure of the structure of function and attribute.
3. method according to claim 2, which is characterized in that
If the type of the structure of the illusory scripting object is the structure of class, the essential information includes: object key value Key, name At least one of in title, place file and content;The relation information include: status list, function list, attribute list, The class list of dependence and parent, default property information are relied on list and by least one in succession list;
If the type of the structure of the illusory scripting object be state structure, the essential information include: object Key, title, At least one of in place file, content and Status Type;The relation information includes: function list and/or affiliated class;
If the type of the structure of the illusory scripting object be function structure, the essential information include: object Key, title, At least one of in place file, content, function parameter and type function;The relation information include: call function list, At least one of in attribute assignment list, called function list and affiliated class;
If the type of the structure of the illusory scripting object be attribute structure, the essential information include: object Key, title, At least one of in place file, content, attribute type and affiliated class;The relation information includes: what attribute was used Information.
4. according to claim 1 to 3 any one the methods, which is characterized in that if the relation information includes illusory script At least one of in the dependence of object, inheritance and call relation;The method also includes:
New relation information is obtained according to the dependence, inheritance and/or call relation backstepping, and updates and arrives illusory foot In this object structure.
5. according to claim 1 to 3 any one the methods, which is characterized in that in the void for obtaining the first illusory script file After the illusory scripting object collection of unreal scripting object collection and the second illusory script file, further includes:
Compare the first illusory script file illusory scripting object collection and the second illusory script file illusory scripting object collection it Between existing illusory scripting object difference.
6. method according to claim 5, which is characterized in that the illusory scripting object for comparing the first illusory script file The difference of existing illusory scripting object includes: between collection and the illusory scripting object collection of the second illusory script file
The illusory scripting object collection of the first illusory script file and the illusory scripting object collection of the second illusory script file are compared, it is first Identical illusory scripting object is first excluded, the illusory scripting object set of newly-increased illusory scripting object set and modification is obtained; Then the illusory scripting object set progress for obtaining newly-increased illusory scripting object set and modification is mutually exclusive, obtain first The illusory scripting object set of the illusory scripting object set and deletion that are increased newly in illusory script file;It is finally illusory first Newly-increased illusory foot is excluded in the illusory scripting object set of the illusory scripting object set and deletion that increase newly in script file This object set is obtained compared to the illusory scripting object collection deleted in the second illusory script file of illusory script file first It closes.
7. a kind of data processing equipment to illusory script characterized by comprising
Script reading unit, for reading the script sentence in illusory script file;
Information reading unit, for successively being executed to each script sentence: according to the information of script sentence, determining belonging to script sentence Structured sort, essential information and relation information;The structured sort is the structure of predefined illusory scripting object structure Classification;
Object formation unit arrives void corresponding with structured sort for updating the essential information and relation information that determine In unreal scripting object structure, illusory scripting object collection is obtained;
Relation determination unit, for reading illusory scripting object collection, and the illusory scripting object concentrated according to illusory scripting object Illusory scripting object structure in relation information, determine the relation information between illusory scripting object;
Information output unit, the relation information determined for exporting the relation determination unit.
8. device according to claim 7, which is characterized in that
The type of the object formation unit, the predefined illusory scripting object structure for update includes: the knot of class Structure, the structure of state, the structure of the structure of function and attribute.
9. device according to claim 8, which is characterized in that
The object formation unit, in the predefined illusory scripting object structure of update,
If the type of the structure of the illusory scripting object is the structure of class, the essential information includes: object key value Key, name At least one of in title, place file and content;The relation information include: status list, function list, attribute list, The class list of dependence and parent, default property information are relied on list and by least one in succession list;
If the type of the structure of the illusory scripting object be state structure, the essential information include: object Key, title, At least one of in place file, content and Status Type;The relation information includes: function list and/or affiliated class;
If the type of the structure of the illusory scripting object be function structure, the essential information include: object Key, title, At least one of in place file, content, function parameter and type function;The relation information include: call function list, At least one of in attribute assignment list, called function list and affiliated class;
If the type of the structure of the illusory scripting object be attribute structure, the essential information include: object Key, title, At least one of in place file, content, attribute type and affiliated class;The relation information includes: what attribute was used Information.
10. according to claim 7 to 9 any one described device, which is characterized in that described device further include:
Relation derivation unit, if dependence, inheritance and calling for the relation information comprising illusory scripting object At least one of in relationship;Then new relationship letter is obtained according to the dependence, inheritance and/or call relation backstepping Breath;
The object formation unit is also used to obtain the relation derivation unit backstepping new relation information and updates to illusory foot In this object structure.
11. according to claim 7 to 9 any one described device, which is characterized in that further include:
Comparing unit, for obtaining the illusory scripting object collection and second of the first illusory script file in the object formation unit After the illusory scripting object collection of illusory script file, the illusory scripting object collection and the second void of the first illusory script file are compared The difference of existing illusory scripting object between the illusory scripting object collection of unreal script file.
12. device according to claim 11, which is characterized in that
The comparing unit, for comparing the illusory scripting object collection and the second illusory script file of the first illusory script file Illusory scripting object collection excludes identical illusory scripting object first, obtains newly-increased illusory scripting object set and modification Illusory scripting object set;Then the illusory scripting object set for obtaining newly-increased illusory scripting object set and modification is carried out It is mutually exclusive, obtain the illusory scripting object collection of the illusory scripting object set increased newly in the first illusory script file and deletion It closes;In the illusory scripting object set of the illusory scripting object set and deletion that are finally increased newly in the first illusory script file It excludes newly-increased illusory scripting object set, obtains compared to being deleted in the second illusory script file of illusory script file first Illusory scripting object set.
CN201410100922.XA 2014-03-18 2014-03-18 A kind of data processing method and device to illusory script Active CN104932870B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410100922.XA CN104932870B (en) 2014-03-18 2014-03-18 A kind of data processing method and device to illusory script
PCT/CN2015/074572 WO2015139646A1 (en) 2014-03-18 2015-03-19 Data processing method and apparatus for unrealscript

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410100922.XA CN104932870B (en) 2014-03-18 2014-03-18 A kind of data processing method and device to illusory script

Publications (2)

Publication Number Publication Date
CN104932870A CN104932870A (en) 2015-09-23
CN104932870B true CN104932870B (en) 2019-05-24

Family

ID=54120048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410100922.XA Active CN104932870B (en) 2014-03-18 2014-03-18 A kind of data processing method and device to illusory script

Country Status (2)

Country Link
CN (1) CN104932870B (en)
WO (1) WO2015139646A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874001A (en) * 2017-02-17 2017-06-20 济南浪潮高新科技投资发展有限公司 A kind of script method for packing and device and script operation method and device
CN108427559B (en) * 2018-03-14 2022-10-11 新华三技术有限公司 Script file generation and calling method and device
CN110851131B (en) * 2019-11-14 2023-05-23 拉扎斯网络科技(上海)有限公司 Script generation method, script generation device, electronic equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data
CN101719096A (en) * 2009-12-29 2010-06-02 北京航空航天大学 Method for improving executing speed of test script of real-time embedded system
CN102693396A (en) * 2012-06-11 2012-09-26 中南大学 Flash bug detection method based on virtual execution mode

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5100820B2 (en) * 2010-11-25 2012-12-19 株式会社東芝 Query expression conversion apparatus, method and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data
CN101719096A (en) * 2009-12-29 2010-06-02 北京航空航天大学 Method for improving executing speed of test script of real-time embedded system
CN102693396A (en) * 2012-06-11 2012-09-26 中南大学 Flash bug detection method based on virtual execution mode

Also Published As

Publication number Publication date
CN104932870A (en) 2015-09-23
WO2015139646A1 (en) 2015-09-24

Similar Documents

Publication Publication Date Title
CN107302450B (en) Data acquisition task changing method and device
CN103761189B (en) Test case management method and system
CN107451068A (en) Use-case operation method, device, computing device and storage medium
US20110016451A1 (en) Method and system for generating test cases for a software application
KR20060045780A (en) Method and system for graph analysis and synchronization
CN106960143A (en) The recognition methods of user account and device, storage medium, electronic equipment
CN110442847B (en) Code similarity detection method and device based on code warehouse process management
CN104932870B (en) A kind of data processing method and device to illusory script
CN110825615A (en) Software defect prediction method and system based on network embedding
CN109408821A (en) A kind of corpus generation method, calculates equipment and storage medium at device
CN110706015A (en) Advertisement click rate prediction oriented feature selection method
CN105677306A (en) Automation script compiling method and device
CN109271313A (en) Code test method, device and computer readable storage medium
CN108363660B (en) Test program generation method and device
CN104156308A (en) Mobile application testing method on basis of playback of execution trace of users
CN103425795A (en) Radar data analyzing method based on cloud calculation
CN111090401B (en) Storage device performance prediction method and device
CN112559525A (en) Data checking system, method, device and server
CN112966947B (en) Intelligent tourist attraction management method and system based on Internet of things
CN112306850B (en) Test case generation method, device and storage medium
Jin et al. A center-based community detection method in weighted networks
CN104111965B (en) OGC geographic information services based on differential matrix describe vocabulary reduction method
CN112907055A (en) Data processing aging test method and device
CN108762752B (en) A kind of the Android application program function class drawing generating method and device of combination dynamic and static code analysis technology
CN109669996A (en) Information dynamic updating method and device

Legal Events

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